@voltro/client 0.86.0 → 0.87.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/dist/index.d.ts CHANGED
@@ -8,10 +8,14 @@ import { DEV_ACTIVITY_EVENT } from '@voltro/protocol';
8
8
  import { DevActivityMessage } from '@voltro/protocol';
9
9
  import { DragEvent as DragEvent_2 } from 'react';
10
10
  import { Effect } from 'effect';
11
+ import { encodeNativeFormCapture } from '@voltro/protocol';
11
12
  import { errorMessage } from '@voltro/protocol';
12
13
  import { errorTag } from '@voltro/protocol';
13
14
  import { EventDescriptor as EventDescriptor_2 } from '@voltro/protocol';
14
15
  import { Fiber } from 'effect';
16
+ import { FORM_CAPTURE_FIELD } from '@voltro/protocol';
17
+ import { FORM_CAPTURE_META_NAME } from '@voltro/protocol';
18
+ import { formCaptureSource } from '@voltro/protocol';
15
19
  import { JsonSchemaDocument } from '@voltro/protocol';
16
20
  import { jsonSchemaDocumentOf } from '@voltro/protocol';
17
21
  import { jsonSchemaOf } from '@voltro/protocol';
@@ -26,6 +30,7 @@ import { PairingStorage } from '@voltro/protocol';
26
30
  import { parsePairingLink } from '@voltro/protocol';
27
31
  import { ReactElement } from 'react';
28
32
  import { ReactNode } from 'react';
33
+ import { readFormCaptureSource } from '@voltro/protocol';
29
34
  import { readPairing } from '@voltro/protocol';
30
35
  import { Rpc } from 'effect/rpc';
31
36
  import { RpcClient } from 'effect/rpc';
@@ -233,6 +238,8 @@ export declare interface ApiHandle {
233
238
  readonly errorBus: RpcErrorBus;
234
239
  /** Stable UI/raw transport recovery state for this logical api. */
235
240
  readonly recovery?: RecoveryCoordinator;
241
+ /** Identity lifetime captured when this transport was built. */
242
+ readonly subjectSignal?: AbortSignal;
236
243
  }
237
244
 
238
245
  /**
@@ -287,6 +294,8 @@ export declare interface ApiHooks<P extends ProcedureTypeMap> {
287
294
  readonly useAction: <Tag extends ActionTag<P>>(tag: Tag) => ActionState<ProcedureInput<P[Tag]>, ProcedureOutput<P[Tag]>>;
288
295
  }
289
296
 
297
+ export declare type ApiSocketIssue = 'close' | 'error' | 'connect-timeout';
298
+
290
299
  export { applyPairing }
291
300
 
292
301
  /**
@@ -419,6 +428,8 @@ export declare interface BuildApiRuntimeOptions {
419
428
  readonly generation?: number;
420
429
  /** WebSocket URL of the api (`ws(s)://host:port/ws`). */
421
430
  readonly wsUrl: string;
431
+ /** Captured deployment role endpoint manifest; partition this group's transports by tag/workload. */
432
+ readonly roleEndpoints?: unknown;
422
433
  /**
423
434
  * The api's rpc group, as the ERASED `RpcGroup.Any`.
424
435
  *
@@ -477,6 +488,8 @@ export declare interface BuiltApiRuntime {
477
488
  readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
478
489
  readonly errorBus: RpcErrorBus;
479
490
  readonly recovery: RecoveryCoordinator;
491
+ /** Identity lifetime captured when this transport was built. */
492
+ readonly subjectSignal?: AbortSignal;
480
493
  }
481
494
 
482
495
  declare interface CacheEntry {
@@ -1014,7 +1027,8 @@ export declare interface DataTableState<Row> {
1014
1027
  * Decide, from the DECLARED access and the subject's global scopes, whether the
1015
1028
  * caller may invoke a procedure. Pure — the matcher core, mirroring the
1016
1029
  * server's `checkGuards`: entries are ANDed, `mode` controls AND/OR within one
1017
- * entry, and `admin:full` satisfies anything.
1030
+ * entry. `admin:full` satisfies scope and relationship checks, but cannot
1031
+ * establish registered-account identity from scopes alone.
1018
1032
  *
1019
1033
  * `guards === undefined` (neither `guards:` nor `openAccess:`) is `unknown`,
1020
1034
  * not `allowed`: an undeclared procedure is refused outright under
@@ -1220,6 +1234,13 @@ export declare const emptyRichTextDocument: RichTextDocument;
1220
1234
  */
1221
1235
  export declare const enableClientDiagnosticsPersistence: (storage: ClientDiagnosticsStorage) => void;
1222
1236
 
1237
+ /** Encode only a declared public tagged error. Run in the schema's own module graph,
1238
+ * including a production SSR bundle. Defects, invalid values, service-dependent
1239
+ * codecs and oversized errors contribute no structured form state. */
1240
+ export declare const encodeFormRejection: (schema: Schema.Top | undefined, error: unknown) => unknown;
1241
+
1242
+ export { encodeNativeFormCapture }
1243
+
1223
1244
  export declare const enqueueEntry: (queue: Outbox, id: string, tag: string, input: unknown, stamp?: string) => Outbox;
1224
1245
 
1225
1246
  /**
@@ -1452,20 +1473,23 @@ export declare type FilterKind = 'text' | 'select' | 'multi-select' | 'number-ra
1452
1473
  * input field → one FilterDescriptor. Pure. */
1453
1474
  export declare const filtersFromSchema: (schema: Schema.Top) => ReadonlyArray<FilterDescriptor>;
1454
1475
 
1476
+ export { FORM_CAPTURE_FIELD }
1477
+
1478
+ export { FORM_CAPTURE_META_NAME }
1479
+
1455
1480
  /** DOM id of the JSON script the 422 re-render embeds (survives the
1456
1481
  * `interactive:'none'` strip — it is neither `type="module"` nor `src`). */
1457
1482
  export declare const FORM_FLASH_SCRIPT_ID = "__voltro_form_flash__";
1458
1483
 
1459
- /** Hidden field carrying the form's instance key (multi-form pages). */
1460
1484
  export declare const FORM_KEY_FIELD = "__voltro_form";
1461
1485
 
1462
- /** URL prefix the web listener mounts the no-JS endpoint under. */
1463
1486
  export declare const FORM_PATH_PREFIX = "/form/";
1464
1487
 
1465
- /** Hidden field carrying the declared success-redirect path. */
1466
1488
  export declare const FORM_REDIRECT_FIELD = "__voltro_redirect";
1467
1489
 
1468
- /** The path a native `<AutoForm>` POST goes to. */
1490
+ /** The original page, distinct from an optional success redirect. */
1491
+ export declare const FORM_SOURCE_FIELD = "__voltro_source";
1492
+
1469
1493
  export declare const formActionPath: (mutationTag: string) => string;
1470
1494
 
1471
1495
  /** A field ARRAY (`entries[]`): items + structural operations + per-item
@@ -1545,6 +1569,8 @@ export declare const FormBindingProvider: <Input extends Record<string, unknown>
1545
1569
  readonly children?: ReactNode;
1546
1570
  }) => ReactElement;
1547
1571
 
1572
+ export { formCaptureSource }
1573
+
1548
1574
  /**
1549
1575
  * Convert posted form entries into the input object the mutation's schema
1550
1576
  * decodes — the shape `validateFields` (and the RPC payload) expects.
@@ -1636,6 +1662,11 @@ export declare interface FormFlashPayload {
1636
1662
  readonly errors: Readonly<Record<string, string>>;
1637
1663
  /** A non-field error (the RPC refused after valid input: guard, server). */
1638
1664
  readonly formError?: string;
1665
+ /** JSON encoded through the procedure's declared error schema. Private to
1666
+ * this failed submit; never a publication or permission proof. */
1667
+ readonly rejection?: unknown;
1668
+ /** Admitted original page for repeated native errors and late hydration. */
1669
+ readonly sourcePath?: string;
1639
1670
  }
1640
1671
 
1641
1672
  /** A mutation's input as the form binding's value shape. A struct input is its
@@ -1651,6 +1682,9 @@ declare type FormInput<P extends ProcedureTypeMap, Tag extends keyof P> = Proced
1651
1682
  */
1652
1683
  export declare const formSections: (fields: ReadonlyArray<FieldDescriptor>) => ReadonlyArray<FieldSection>;
1653
1684
 
1685
+ /** Admit a local source page; native form endpoints cannot be their own source. */
1686
+ export declare const formSourcePath: (raw: unknown) => string | undefined;
1687
+
1654
1688
  /** The full form state, engine + mutation, in ONE place — a save button reads
1655
1689
  * `canSubmit`/`pending`, a dialog closes on `isSubmitSuccessful`, a banner
1656
1690
  * listens to `submitError`. */
@@ -1951,6 +1985,22 @@ export declare interface LocalQueryOptions<Row> {
1951
1985
  readonly limit?: number;
1952
1986
  }
1953
1987
 
1988
+ export declare const makeApiRoleSocketTracker: (group: RpcGroup.Any, wsUrl: string, endpoints: unknown, onOpen: () => void, onIssue: (kind: ApiSocketIssue) => void) => {
1989
+ begin: (url: string) => {
1990
+ open: () => void;
1991
+ issue: (kind: ApiSocketIssue) => void;
1992
+ };
1993
+ };
1994
+
1995
+ /** One supervisor edge for a logical API, latest physical attempt per endpoint.
1996
+ * Raw open is supervisor/backstop evidence only; protocol leases stay separate. */
1997
+ export declare const makeApiSocketTracker: (urls: ReadonlyArray<string>, onOpen: () => void, onIssue: (kind: ApiSocketIssue) => void) => {
1998
+ begin: (url: string) => {
1999
+ open: () => void;
2000
+ issue: (kind: ApiSocketIssue) => void;
2001
+ };
2002
+ };
2003
+
1954
2004
  export declare const makePreloadSeedBag: () => PreloadSeedBag;
1955
2005
 
1956
2006
  /* Excluded from this release type: makeProtocolOpenRecovery */
@@ -1961,11 +2011,13 @@ export declare const makeStoreSeedBag: () => StoreSeedBag;
1961
2011
  * The access a procedure DECLARES, as data — the same declaration the server
1962
2012
  * enforces, mirrored from @voltro/cli's `SerialisedGuard`.
1963
2013
  *
1964
- * Three variants for the three states an access decision has. `open` is the
2014
+ * The variants describe the three states an access decision has. `open` is the
1965
2015
  * erased form of `openAccess: '<why>'`; it is a DECISION, and distinguishing it
1966
2016
  * from "nobody declared anything" is the whole reason it travels.
1967
2017
  */
1968
2018
  export declare type ManifestGuard = {
2019
+ readonly kind: 'upgraded';
2020
+ } | {
1969
2021
  readonly kind: 'scope';
1970
2022
  readonly scope: ReadonlyArray<string>;
1971
2023
  /** `all` — every scope; `any` — at least one. */
@@ -2040,6 +2092,7 @@ export declare interface MountedApi {
2040
2092
  readonly group: RpcGroup.Any;
2041
2093
  readonly descriptors: ClientDescriptorMap;
2042
2094
  readonly wsUrl: string;
2095
+ readonly roleEndpoints?: unknown;
2043
2096
  readonly headers?: ResolvableHeaders | undefined;
2044
2097
  readonly recovery?: RecoveryOptions | undefined;
2045
2098
  /** Durable local mirror, resolved per transport generation — see
@@ -2609,6 +2662,8 @@ export declare type RawTransportStatus = 'connected' | 'disconnected';
2609
2662
  /** The current answer, outside React. */
2610
2663
  export declare const readApiOnline: (apiName?: string) => boolean;
2611
2664
 
2665
+ export { readFormCaptureSource }
2666
+
2612
2667
  export { readPairing }
2613
2668
 
2614
2669
  /**
@@ -2642,6 +2697,12 @@ export declare interface RecordState<R> {
2642
2697
  readonly error: unknown | undefined;
2643
2698
  }
2644
2699
 
2700
+ /** Recover edits made to one native form before its JavaScript booted.
2701
+ * Uses the ordinary native schema mapper; only changed, editable controls
2702
+ * replace initial values. Hidden metadata and unrelated forms stay intact.
2703
+ * Call once when initializing state, never as a submission or authority check. */
2704
+ export declare const recoverNativeFormValues: (schema: Schema.Top, formKey: string, values: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>>;
2705
+
2645
2706
  /**
2646
2707
  * State owned by one logical API, not by one socket or one React hook.
2647
2708
  *
@@ -2833,6 +2894,8 @@ export declare interface ResolvedClient {
2833
2894
  readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
2834
2895
  readonly errorBus?: RpcErrorBus;
2835
2896
  readonly recovery?: RecoveryCoordinator;
2897
+ /** Identity lifetime captured when this transport was built. */
2898
+ readonly subjectSignal?: AbortSignal;
2836
2899
  }
2837
2900
 
2838
2901
  export declare interface ResolvedRecoveryOptions {
@@ -2995,9 +3058,9 @@ export declare const RICH_TEXT_MARKS: readonly ["bold", "italic", "code", "strik
2995
3058
  * unbounded tree is a decode bomb on a server thread. */
2996
3059
  export declare const RICH_TEXT_MAX_NODES = 5000;
2997
3060
 
2998
- export declare type RichTextBlock = typeof RichTextBlock_2.Type;
3061
+ export declare type RichTextBlock = typeof RichTextBlockSchema.Type;
2999
3062
 
3000
- declare const RichTextBlock_2: Schema.Union<readonly [Schema.Struct<{
3063
+ declare const RichTextBlockSchema: Schema.Union<readonly [Schema.Struct<{
3001
3064
  readonly type: Schema.Literal<"paragraph">;
3002
3065
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3003
3066
  readonly type: Schema.Literal<"text">;
@@ -3084,8 +3147,6 @@ declare const RichTextBlock_2: Schema.Union<readonly [Schema.Struct<{
3084
3147
  readonly text: Schema.String;
3085
3148
  }>]>;
3086
3149
 
3087
- declare type RichTextBlock = typeof RichTextBlock_2.Type;
3088
-
3089
3150
  /**
3090
3151
  * The rich-text field's value. Use it directly in a mutation input:
3091
3152
  *
@@ -3187,9 +3248,9 @@ export declare const RichTextDocument: Schema.Struct<{
3187
3248
 
3188
3249
  export declare type RichTextDocument = typeof RichTextDocument.Type;
3189
3250
 
3190
- export declare type RichTextInline = typeof RichTextInline_2.Type;
3251
+ export declare type RichTextInline = typeof RichTextInlineSchema.Type;
3191
3252
 
3192
- declare const RichTextInline_2: Schema.Union<readonly [Schema.Struct<{
3253
+ declare const RichTextInlineSchema: Schema.Union<readonly [Schema.Struct<{
3193
3254
  readonly type: Schema.Literal<"text">;
3194
3255
  readonly text: Schema.String;
3195
3256
  readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
@@ -3203,11 +3264,9 @@ declare const RichTextInline_2: Schema.Union<readonly [Schema.Struct<{
3203
3264
  }>>;
3204
3265
  }>]>;
3205
3266
 
3206
- declare type RichTextInline = typeof RichTextInline_2.Type;
3267
+ export declare type RichTextListItem = typeof RichTextListItemSchema.Type;
3207
3268
 
3208
- export declare type RichTextListItem = typeof RichTextListItem_2.Type;
3209
-
3210
- declare const RichTextListItem_2: Schema.Struct<{
3269
+ declare const RichTextListItemSchema: Schema.Struct<{
3211
3270
  readonly type: Schema.Literal<"listItem">;
3212
3271
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3213
3272
  readonly type: Schema.Literal<"text">;
@@ -3224,8 +3283,6 @@ declare const RichTextListItem_2: Schema.Struct<{
3224
3283
  }>]>>;
3225
3284
  }>;
3226
3285
 
3227
- declare type RichTextListItem = typeof RichTextListItem_2.Type;
3228
-
3229
3286
  export declare type RichTextMark = (typeof RICH_TEXT_MARKS)[number];
3230
3287
 
3231
3288
  /** The document's text, with no markers — for search indexing, excerpts and
@@ -3236,6 +3293,13 @@ export declare const richTextToPlainText: (value: unknown) => string;
3236
3293
  * when the label field is absent. Exported for direct testing + reuse. */
3237
3294
  export declare const rowsToOptions: (rows: ReadonlyArray<Record<string, unknown>>, labelField: string, valueField: string) => ReadonlyArray<FieldOption>;
3238
3295
 
3296
+ export declare interface RpcCaller {
3297
+ /** Call one rpc by tag. Rejects with the server's typed error; `signal` interrupts the call. */
3298
+ call(tag: string, input: unknown, options?: {
3299
+ readonly signal?: AbortSignal | undefined;
3300
+ }): Promise<unknown>;
3301
+ }
3302
+
3239
3303
  /** What the client can prove about a unary call's server-side result. */
3240
3304
  export declare type RpcCallOutcome = 'not-applicable' | 'not-started' | 'known' | 'unknown';
3241
3305
 
@@ -3483,6 +3547,8 @@ export declare interface ServerRequestContextValue {
3483
3547
  * would add a fiber fork the client boot does not have, and every
3484
3548
  * ancestor arity difference shifts every useId in the app. */
3485
3549
  readonly formFlash?: FormFlashPayload;
3550
+ /** Public captured build/class selection, never a credential or write permit. */
3551
+ readonly formSource?: string;
3486
3552
  }
3487
3553
 
3488
3554
  export declare const ServerRequestProvider: ({ value, children, }: {
@@ -4445,8 +4511,12 @@ export declare interface SupervisorHandle {
4445
4511
  readonly dispose: () => void;
4446
4512
  /** Force a fresh ws connect for every api (carrying the browser's current
4447
4513
  * cookies) so a cookie-based login re-resolves the authenticated Subject
4448
- * in place, without a page reload. No-op for UI-only (no-api) apps. */
4449
- readonly reconnect: () => void;
4514
+ * in place, without a page reload. Resolves once every api runs on a
4515
+ * runtime built after this call (or the supervisor is gone): a call made
4516
+ * after that goes out as the next Subject. Never rejects; a failing build
4517
+ * keeps retrying and the promise waits for the one that lands. Resolves
4518
+ * at once for UI-only (no-api) apps. */
4519
+ readonly reconnect: () => Promise<void>;
4450
4520
  /** Re-resolve `authHeaders` and rebuild the transport, SAME subject — for a
4451
4521
  * rotated token on a long-lived tab. Unlike `reconnect()` this seeds the new
4452
4522
  * cache from the old one, because nobody's entitlement changed. */
@@ -4979,6 +5049,9 @@ export declare interface UseFormBindingOptions<Input> {
4979
5049
  readonly schema?: Schema.Top;
4980
5050
  /** Initial field values. */
4981
5051
  readonly defaults?: Partial<Input>;
5052
+ /** Native form identity for recovering browser edits before bootstrap.
5053
+ * Defaults to the failed POST's key, then the mutation tag. */
5054
+ readonly formKey?: string;
4982
5055
  /** The failed no-JS POST's payload for THIS form (`useFormFlash` from
4983
5056
  * @voltro/web resolves it, SSR and client alike). When present it seeds
4984
5057
  * the initial values + field errors, so the 422 re-render shows the
@@ -5063,6 +5136,9 @@ export declare interface UseFormBindingOptions<Input> {
5063
5136
  readonly subscribe?: 'all' | 'fields';
5064
5137
  }
5065
5138
 
5139
+ /** Relay the server-rendered public source pin for native POST and hydration. */
5140
+ export declare const useFormCapture: () => string | undefined;
5141
+
5066
5142
  /**
5067
5143
  * Narrow per-field subscription — the render-performance half of the engine.
5068
5144
  *
@@ -5247,6 +5323,9 @@ export declare interface UseResourceCanState {
5247
5323
 
5248
5324
  export declare const useResumableAgentStream: <E = unknown>(apiName: string, rpcTag: string, options?: ResumableAgentStreamOptions<E>) => ResumableAgentStreamControls<E>;
5249
5325
 
5326
+ /** A stable `RpcCaller` for one api. The same object across renders; each call reads the latest handle. */
5327
+ export declare const useRpcCaller: (apiName: string) => RpcCaller;
5328
+
5250
5329
  /** A schema-owned form for actions, parent plans, and local saves. It uses the
5251
5330
  * same validation/field engine without connecting to an API or inventing a tag. */
5252
5331
  export declare const useSchemaFormBinding: <Input extends Record<string, unknown>, Encoded, Output>(options: Omit<UseFormBindingOptions<Input>, "schema" | "onSubmit"> & {
package/dist/index.js CHANGED
@@ -28,57 +28,61 @@ import { useAction as Ne } from "./useAction.js";
28
28
  import { formField as Pe, formSections as Fe, schemaToColumns as Ie, schemaToFields as Le } from "./schemaFields.js";
29
29
  import { decodeFieldIssues as Re, documentLocale as ze, resolveValidationMessage as Be, restrictToSchema as Ve, validateFields as He } from "./formBinding.js";
30
30
  import { ValidationMessagesProvider as Ue, useValidationMessages as We } from "./validationMessages.js";
31
- import { FormBindingProvider as Ge, useFormBinding as Ke, useFormBindingContext as qe, useFormField as Je, useSchemaFormBinding as Ye } from "./useFormBinding.js";
32
- import { useConnectionSetup as Xe } from "./useConnectionSetup.js";
33
- import { createHooks as Ze } from "./createHooks.js";
34
- import { applyPreloadSeeds as Qe, makePreloadSeedBag as $e, readPreloadedSeedOutcome as et, readPreloadedSnapshot as tt, resetPreloadSeeds as nt, seedPreloadedSubscription as rt, seedPreloadedSubscriptionFailure as it, setPreloadSeedResolver as at } from "./preloadSeed.js";
35
- import { usePreloadedSubscription as ot } from "./usePreloadedSubscription.js";
36
- import { useEvent as st } from "./useEvent.js";
37
- import { runSequence as ct, sequence as lt } from "./sequence.js";
38
- import { useSequence as ut } from "./useSequence.js";
39
- import { useUpload as dt } from "./useUpload.js";
40
- import { useTranscription as ft } from "./useTranscription.js";
41
- import { useWorkflow as pt, useWorkflowDomainEvents as mt, useWorkflowEventDeliveries as ht, useWorkflowEvents as gt, useWorkflowRun as _t, useWorkflowRunEvents as vt, useWorkflowRunSteps as yt, useWorkflowRuns as bt, useWorkflowSignal as xt, useWorkflowUpdate as St } from "./useWorkflow.js";
42
- import { useWorkflowRunState as Ct } from "./useWorkflowRunState.js";
43
- import { useAgentStream as wt } from "./useAgentStream.js";
44
- import { resumableConsumeProgram as Tt, useResumableAgentStream as Et } from "./useResumableAgentStream.js";
45
- import { useAgentChat as Dt } from "./useAgentChat.js";
46
- import { useAgent as Ot } from "./useAgent.js";
47
- import { useDataCopilot as kt } from "./useDataCopilot.js";
48
- import { useRefreshSubscription as At, useRefreshSubscriptions as jt } from "./useRefreshSubscriptions.js";
49
- import { queryOnce as Mt } from "./query.js";
50
- import { isUnauthenticated as Nt, wireAuthRefresh as Pt } from "./authRefresh.js";
51
- import { useOnRawRpcError as Ft, useOnRpcError as It } from "./useOnRpcError.js";
52
- import { useSubscriptionHealth as Lt } from "./useSubscriptionHealth.js";
53
- import { RICH_TEXT_MARKS as Rt, RICH_TEXT_MAX_NODES as zt, RichTextDocument as Bt, emptyRichTextDocument as Vt, isRichTextDocument as Ht, isSafeHref as Ut, parseRichText as Wt, richTextToPlainText as Gt, serializeRichText as Kt } from "./richText.js";
54
- import { FORM_FLASH_SCRIPT_ID as qt } from "./formFlashId.js";
55
- import { FORM_KEY_FIELD as Jt, FORM_PATH_PREFIX as Yt, FORM_REDIRECT_FIELD as Xt, formActionPath as Zt, formDataToInput as Qt } from "./formData.js";
56
- import { ServerRequestContext as $t, ServerRequestProvider as en, useFormFlash as tn, useServerRequest as nn } from "./serverRequest.js";
57
- import { rowsToOptions as rn, useQueryField as an } from "./useQueryField.js";
58
- import { useDataTable as on } from "./useDataTable.js";
59
- import { provenanceUrl as sn, useProvenance as cn } from "./useProvenance.js";
60
- import { ADMIN_SCOPE as ln, PermissionProvider as un, canCall as dn, canCallAny as fn, useCan as pn, useCanAny as mn, usePermissions as hn } from "./permissions.js";
61
- import { decideAccess as gn, deriveEntityAdmins as _n, manifestUrl as vn, openAccessReason as yn, requiredScopes as bn, useAccessDecision as xn, useCapabilityManifest as Sn } from "./useCapabilityManifest.js";
62
- import { useUndo as Cn } from "./useUndo.js";
63
- import { UNDO_APPLY_TAG as wn, UNDO_LOG_TAG as Tn, UNDO_REDO_TAG as En, useUndoLog as Dn } from "./useUndoLog.js";
64
- import { defineTracking as On, resolveTrackingEvent as kn, useTracking as An, wrapTrackedCallbacks as jn } from "./tracking.js";
65
- import { useFormSkeleton as Mn, useTableSkeleton as Nn } from "./useSkeleton.js";
66
- import { shallowArrayEqual as Pn, sourceValues as Fn, useDerived as In } from "./useDerived.js";
67
- import { useResourceCan as Ln, useResourceCans as Rn } from "./useResourceCan.js";
68
- import { filtersFromSchema as zn, useQueryFilters as Bn } from "./filters.js";
69
- import { useRecord as Vn } from "./useRecord.js";
70
- import { useAsyncValidation as Hn, useDebounced as Un, validationStatus as Wn } from "./validation.js";
71
- import { createAnalytics as Gn, defineEvent as Kn, eventCatalog as qn, validateEventPayload as Jn } from "./analyticsCatalog.js";
72
- import { usePreview as Yn } from "./usePreview.js";
73
- import { readApiOnline as Xn, subscribeApiOnline as Zn, useApiOnline as Qn } from "./useApiOnline.js";
74
- import { clearSent as $n, defaultOutboxRetryDelay as er, enqueueEntry as tr, markConflict as nr, markFailed as rr, markSent as ir, replayable as ar, resolveConflictEntry as or, useOutbox as sr } from "./outbox.js";
75
- import { OUTBOX_DB_NAME as cr, OUTBOX_SYNC_TAG as lr, drainOutboxInWorker as ur, drainOutboxOverHttp as dr, indexedDbOutboxPersistence as fr, rpcHttpOutcome as pr } from "./outboxHttp.js";
76
- import { computeWindow as mr, useWindowedSubscription as hr } from "./useWindowedSubscription.js";
77
- import { useConnectionStatus as gr } from "./useConnectionStatus.js";
78
- import { runLocalQuery as _r, useLocalQuery as vr } from "./useLocalQuery.js";
79
- import { CONNECTIONS_LIST_TAG as yr, CONNECTION_DISCONNECT_TAG as br, CONNECTION_START_TAG as xr, CONNECTION_SUBMIT_TOKEN_TAG as Sr, useConnection as Cr, useConnections as wr } from "./useConnections.js";
80
- import { DEV_ACTIVITY_EVENT as Tr, PAIRING_HOST as Er, PAIRING_SCHEME as Dr, PAIRING_STORAGE_KEY as Or, applyPairing as kr, clearPairing as Ar, errorMessage as jr, errorTag as Mr, jsonSchemaDocumentOf as Nr, jsonSchemaOf as Pr, pairingLink as Fr, parsePairingLink as Ir, readPairing as Lr } from "@voltro/protocol";
31
+ import { RICH_TEXT_MARKS as Ge, RICH_TEXT_MAX_NODES as Ke, RichTextDocument as qe, emptyRichTextDocument as Je, isRichTextDocument as Ye, isSafeHref as Xe, parseRichText as Ze, richTextToPlainText as Qe, serializeRichText as $e } from "./richText.js";
32
+ import { FORM_FLASH_SCRIPT_ID as et } from "./formFlashId.js";
33
+ import { FORM_CAPTURE_FIELD as tt, FORM_CAPTURE_META_NAME as nt, FORM_KEY_FIELD as rt, FORM_PATH_PREFIX as it, FORM_REDIRECT_FIELD as at, FORM_SOURCE_FIELD as ot, encodeNativeFormCapture as st, formActionPath as ct, formCaptureSource as lt, formSourcePath as ut, readFormCaptureSource as dt } from "./formSource.js";
34
+ import { formDataToInput as ft, recoverNativeFormValues as pt } from "./formData.js";
35
+ import { ServerRequestContext as mt, ServerRequestProvider as ht, useFormCapture as gt, useFormFlash as _t, useServerRequest as vt } from "./serverRequest.js";
36
+ import { FormBindingProvider as yt, useFormBinding as bt, useFormBindingContext as xt, useFormField as St, useSchemaFormBinding as Ct } from "./useFormBinding.js";
37
+ import { useConnectionSetup as wt } from "./useConnectionSetup.js";
38
+ import { createHooks as Tt } from "./createHooks.js";
39
+ import { applyPreloadSeeds as Et, makePreloadSeedBag as Dt, readPreloadedSeedOutcome as Ot, readPreloadedSnapshot as kt, resetPreloadSeeds as At, seedPreloadedSubscription as jt, seedPreloadedSubscriptionFailure as Mt, setPreloadSeedResolver as Nt } from "./preloadSeed.js";
40
+ import { usePreloadedSubscription as Pt } from "./usePreloadedSubscription.js";
41
+ import { useEvent as Ft } from "./useEvent.js";
42
+ import { runSequence as It, sequence as Lt } from "./sequence.js";
43
+ import { useSequence as Rt } from "./useSequence.js";
44
+ import { useRpcCaller as zt } from "./useRpcCaller.js";
45
+ import { useUpload as Bt } from "./useUpload.js";
46
+ import { useTranscription as Vt } from "./useTranscription.js";
47
+ import { useWorkflow as Ht, useWorkflowDomainEvents as Ut, useWorkflowEventDeliveries as Wt, useWorkflowEvents as Gt, useWorkflowRun as Kt, useWorkflowRunEvents as qt, useWorkflowRunSteps as Jt, useWorkflowRuns as Yt, useWorkflowSignal as Xt, useWorkflowUpdate as Zt } from "./useWorkflow.js";
48
+ import { useWorkflowRunState as Qt } from "./useWorkflowRunState.js";
49
+ import { useAgentStream as $t } from "./useAgentStream.js";
50
+ import { resumableConsumeProgram as en, useResumableAgentStream as tn } from "./useResumableAgentStream.js";
51
+ import { useAgentChat as nn } from "./useAgentChat.js";
52
+ import { useAgent as rn } from "./useAgent.js";
53
+ import { useDataCopilot as an } from "./useDataCopilot.js";
54
+ import { useRefreshSubscription as on, useRefreshSubscriptions as sn } from "./useRefreshSubscriptions.js";
55
+ import { queryOnce as cn } from "./query.js";
56
+ import { isUnauthenticated as ln, wireAuthRefresh as un } from "./authRefresh.js";
57
+ import { useOnRawRpcError as dn, useOnRpcError as fn } from "./useOnRpcError.js";
58
+ import { useSubscriptionHealth as pn } from "./useSubscriptionHealth.js";
59
+ import { encodeFormRejection as mn } from "./formRejection.js";
60
+ import { rowsToOptions as hn, useQueryField as gn } from "./useQueryField.js";
61
+ import { useDataTable as _n } from "./useDataTable.js";
62
+ import { provenanceUrl as vn, useProvenance as yn } from "./useProvenance.js";
63
+ import { ADMIN_SCOPE as bn, PermissionProvider as xn, canCall as Sn, canCallAny as Cn, useCan as wn, useCanAny as Tn, usePermissions as En } from "./permissions.js";
64
+ import { decideAccess as Dn, deriveEntityAdmins as On, manifestUrl as kn, openAccessReason as An, requiredScopes as jn, useAccessDecision as Mn, useCapabilityManifest as Nn } from "./useCapabilityManifest.js";
65
+ import { useUndo as Pn } from "./useUndo.js";
66
+ import { UNDO_APPLY_TAG as Fn, UNDO_LOG_TAG as In, UNDO_REDO_TAG as Ln, useUndoLog as Rn } from "./useUndoLog.js";
67
+ import { defineTracking as zn, resolveTrackingEvent as Bn, useTracking as Vn, wrapTrackedCallbacks as Hn } from "./tracking.js";
68
+ import { useFormSkeleton as Un, useTableSkeleton as Wn } from "./useSkeleton.js";
69
+ import { shallowArrayEqual as Gn, sourceValues as Kn, useDerived as qn } from "./useDerived.js";
70
+ import { useResourceCan as Jn, useResourceCans as Yn } from "./useResourceCan.js";
71
+ import { filtersFromSchema as Xn, useQueryFilters as Zn } from "./filters.js";
72
+ import { useRecord as Qn } from "./useRecord.js";
73
+ import { useAsyncValidation as $n, useDebounced as er, validationStatus as tr } from "./validation.js";
74
+ import { createAnalytics as nr, defineEvent as rr, eventCatalog as ir, validateEventPayload as ar } from "./analyticsCatalog.js";
75
+ import { usePreview as or } from "./usePreview.js";
76
+ import { readApiOnline as sr, subscribeApiOnline as cr, useApiOnline as lr } from "./useApiOnline.js";
77
+ import { clearSent as ur, defaultOutboxRetryDelay as dr, enqueueEntry as fr, markConflict as pr, markFailed as mr, markSent as hr, replayable as gr, resolveConflictEntry as _r, useOutbox as vr } from "./outbox.js";
78
+ import { OUTBOX_DB_NAME as yr, OUTBOX_SYNC_TAG as br, drainOutboxInWorker as xr, drainOutboxOverHttp as Sr, indexedDbOutboxPersistence as Cr, rpcHttpOutcome as wr } from "./outboxHttp.js";
79
+ import { computeWindow as Tr, useWindowedSubscription as Er } from "./useWindowedSubscription.js";
80
+ import { useConnectionStatus as Dr } from "./useConnectionStatus.js";
81
+ import { runLocalQuery as Or, useLocalQuery as kr } from "./useLocalQuery.js";
82
+ import { CONNECTIONS_LIST_TAG as Ar, CONNECTION_DISCONNECT_TAG as jr, CONNECTION_START_TAG as Mr, CONNECTION_SUBMIT_TOKEN_TAG as Nr, useConnection as Pr, useConnections as Fr } from "./useConnections.js";
83
+ import { makeApiRoleSocketTracker as Ir, makeApiSocketTracker as Lr } from "./apiSocketTracker.js";
84
+ import { DEV_ACTIVITY_EVENT as Rr, PAIRING_HOST as zr, PAIRING_SCHEME as Br, PAIRING_STORAGE_KEY as Vr, applyPairing as Hr, clearPairing as Ur, errorMessage as Wr, errorTag as Gr, jsonSchemaDocumentOf as Kr, jsonSchemaOf as qr, pairingLink as Jr, parsePairingLink as Yr, readPairing as Xr } from "@voltro/protocol";
81
85
  //#region src/index.ts
82
- var Rr = "framework-client";
86
+ var Zr = "framework-client";
83
87
  //#endregion
84
- export { ln as ADMIN_SCOPE, Rr as CLIENT_NAME, yr as CONNECTIONS_LIST_TAG, br as CONNECTION_DISCONNECT_TAG, xr as CONNECTION_START_TAG, Sr as CONNECTION_SUBMIT_TOKEN_TAG, Tr as DEV_ACTIVITY_EVENT, qt as FORM_FLASH_SCRIPT_ID, Jt as FORM_KEY_FIELD, Yt as FORM_PATH_PREFIX, Xt as FORM_REDIRECT_FIELD, Ge as FormBindingProvider, w as FrameworkRuntimesContext, z as FrameworkRuntimesProvider, y as INITIAL_RECOVERY_SNAPSHOT, d as LoadingSubscriptionCache, ke as MutationSerialExecutionError, cr as OUTBOX_DB_NAME, lr as OUTBOX_SYNC_TAG, Er as PAIRING_HOST, Dr as PAIRING_SCHEME, Or as PAIRING_STORAGE_KEY, un as PermissionProvider, Rt as RICH_TEXT_MARKS, zt as RICH_TEXT_MAX_NODES, b as RecoveryCoordinator, Bt as RichTextDocument, _ as RpcErrorBus, $t as ServerRequestContext, en as ServerRequestProvider, f as SubscriptionCache, wn as UNDO_APPLY_TAG, Tn as UNDO_LOG_TAG, En as UNDO_REDO_TAG, Ue as ValidationMessagesProvider, D as _resetFrameworkRuntimesWarning, O as _resetSsrDescriptors, v as apiConnectivity, kr as applyPairing, Qe as applyPreloadSeeds, W as applyStoreSeeds, ne as browserOnlineSource, re as browserPlatform, B as browserStoreStorage, I as buildApiRuntime, dn as canCall, fn as canCallAny, ie as capabilitiesOf, i as clearClientDiagnostics, Se as clearMutations, Ar as clearPairing, $n as clearSent, G as clearStoreHistory, a as clientDiagnosticsSnapshot, mr as computeWindow, Gn as createAnalytics, Ze as createHooks, ae as currentPlatform, gn as decideAccess, Re as decodeFieldIssues, he as deepLinkHref, er as defaultOutboxRetryDelay, ge as defineDeepLink, Kn as defineEvent, oe as definePlatform, K as defineStore, On as defineTracking, q as definedStores, _n as deriveEntityAdmins, o as disableClientDiagnosticsPersistence, _e as dispatchDeepLink, ze as documentLocale, ur as drainOutboxInWorker, dr as drainOutboxOverHttp, Vt as emptyRichTextDocument, s as enableClientDiagnosticsPersistence, tr as enqueueEntry, jr as errorMessage, Mr as errorTag, qn as eventCatalog, zn as filtersFromSchema, Zt as formActionPath, Qt as formDataToInput, Pe as formField, Fe as formSections, De as freshIdempotencyKey, Ae as getMutationNotifier, Ce as getMutations, C as globalContext, fr as indexedDbOutboxPersistence, se as installPlatform, ce as isPlatformInstalled, Ht as isRichTextDocument, Ut as isSafeHref, le as isStandaloneDisplay, Nt as isUnauthenticated, T as isUnresolvedApi, Nr as jsonSchemaDocumentOf, Pr as jsonSchemaOf, $e as makePreloadSeedBag, L as makeProtocolOpenRecovery, J as makeStoreSeedBag, vn as manifestUrl, nr as markConflict, rr as markFailed, ir as markSent, ve as matchDeepLink, ye as matchFirstDeepLink, ue as memoryTokenStore, yn as openAccessReason, Fr as pairingLink, Ir as parsePairingLink, Wt as parseRichText, sn as provenanceUrl, m as publishClientError, n as publishClientTrace, Mt as queryOnce, Xn as readApiOnline, Lr as readPairing, et as readPreloadedSeedOutcome, tt as readPreloadedSnapshot, c as recordClientDiagnostic, x as recoveryCoordinatorFor, de as refusingTokenStore, e as registerCellMerger, k as registerSsrDescriptors, t as registeredCellMerger, ar as replayable, h as reportClientError, bn as requiredScopes, fe as resetPlatformForTest, nt as resetPreloadSeeds, Y as resetStoreRegistryForTests, V as resetStoreStorageForTest, F as resolveByTag, or as resolveConflictEntry, S as resolveRecoveryOptions, H as resolveStoreStorage, kn as resolveTrackingEvent, Be as resolveValidationMessage, Ve as restrictToSchema, Tt as resumableConsumeProgram, Gt as richTextToPlainText, rn as rowsToOptions, pr as rpcHttpOutcome, be as runDeepLink, _r as runLocalQuery, ct as runSequence, Ie as schemaToColumns, Le as schemaToFields, rt as seedPreloadedSubscription, it as seedPreloadedSubscriptionFailure, X as seedStore, lt as sequence, Kt as serializeRichText, je as setMutationNotifier, at as setPreloadSeedResolver, Z as setStoreSeedResolver, U as setStoreStorage, we as settleMutation, Q as shallow, Pn as shallowArrayEqual, Fn as sourceValues, A as ssrClientProxy, j as ssrDescriptorsFor, M as ssrStubHandle, u as stableKey, R as startApiSupervisor, Te as startMutation, $ as storeHistory, Zn as subscribeApiOnline, l as subscribeClientDiagnostics, g as subscribeClientErrors, r as subscribeClientTraces, Ee as subscribeMutations, ee as subscribeStoreHistory, p as supersedesConfirmedPatches, te as travelToStoreState, E as unknownApiError, xn as useAccessDecision, Ne as useAction, Ot as useAgent, Dt as useAgentChat, wt as useAgentStream, Qn as useApiOnline, Hn as useAsyncValidation, pn as useCan, mn as useCanAny, Sn as useCapabilityManifest, Cr as useConnection, Xe as useConnectionSetup, gr as useConnectionStatus, wr as useConnections, kt as useDataCopilot, on as useDataTable, Un as useDebounced, In as useDerived, st as useEvent, Ke as useFormBinding, qe as useFormBindingContext, Je as useFormField, tn as useFormFlash, Mn as useFormSkeleton, N as useFrameworkApi, P as useFrameworkRuntimes, vr as useLocalQuery, Me as useMutation, Ft as useOnRawRpcError, It as useOnRpcError, sr as useOutbox, hn as usePermissions, pe as usePlatform, ot as usePreloadedSubscription, Yn as usePreview, cn as useProvenance, an as useQueryField, Bn as useQueryFilters, Vn as useRecord, At as useRefreshSubscription, jt as useRefreshSubscriptions, Ln as useResourceCan, Rn as useResourceCans, Et as useResumableAgentStream, Ye as useSchemaFormBinding, ut as useSequence, nn as useServerRequest, me as useShellExtension, xe as useSubscription, Lt as useSubscriptionHealth, Nn as useTableSkeleton, An as useTracking, ft as useTranscription, Cn as useUndo, Dn as useUndoLog, dt as useUpload, We as useValidationMessages, hr as useWindowedSubscription, pt as useWorkflow, mt as useWorkflowDomainEvents, ht as useWorkflowEventDeliveries, gt as useWorkflowEvents, _t as useWorkflowRun, vt as useWorkflowRunEvents, Ct as useWorkflowRunState, yt as useWorkflowRunSteps, bt as useWorkflowRuns, xt as useWorkflowSignal, St as useWorkflowUpdate, Jn as validateEventPayload, He as validateFields, Wn as validationStatus, Pt as wireAuthRefresh, Oe as withIdempotencyKey, jn as wrapTrackedCallbacks };
88
+ export { bn as ADMIN_SCOPE, Zr as CLIENT_NAME, Ar as CONNECTIONS_LIST_TAG, jr as CONNECTION_DISCONNECT_TAG, Mr as CONNECTION_START_TAG, Nr as CONNECTION_SUBMIT_TOKEN_TAG, Rr as DEV_ACTIVITY_EVENT, tt as FORM_CAPTURE_FIELD, nt as FORM_CAPTURE_META_NAME, et as FORM_FLASH_SCRIPT_ID, rt as FORM_KEY_FIELD, it as FORM_PATH_PREFIX, at as FORM_REDIRECT_FIELD, ot as FORM_SOURCE_FIELD, yt as FormBindingProvider, w as FrameworkRuntimesContext, z as FrameworkRuntimesProvider, y as INITIAL_RECOVERY_SNAPSHOT, d as LoadingSubscriptionCache, ke as MutationSerialExecutionError, yr as OUTBOX_DB_NAME, br as OUTBOX_SYNC_TAG, zr as PAIRING_HOST, Br as PAIRING_SCHEME, Vr as PAIRING_STORAGE_KEY, xn as PermissionProvider, Ge as RICH_TEXT_MARKS, Ke as RICH_TEXT_MAX_NODES, b as RecoveryCoordinator, qe as RichTextDocument, _ as RpcErrorBus, mt as ServerRequestContext, ht as ServerRequestProvider, f as SubscriptionCache, Fn as UNDO_APPLY_TAG, In as UNDO_LOG_TAG, Ln as UNDO_REDO_TAG, Ue as ValidationMessagesProvider, D as _resetFrameworkRuntimesWarning, O as _resetSsrDescriptors, v as apiConnectivity, Hr as applyPairing, Et as applyPreloadSeeds, W as applyStoreSeeds, ne as browserOnlineSource, re as browserPlatform, B as browserStoreStorage, I as buildApiRuntime, Sn as canCall, Cn as canCallAny, ie as capabilitiesOf, i as clearClientDiagnostics, Se as clearMutations, Ur as clearPairing, ur as clearSent, G as clearStoreHistory, a as clientDiagnosticsSnapshot, Tr as computeWindow, nr as createAnalytics, Tt as createHooks, ae as currentPlatform, Dn as decideAccess, Re as decodeFieldIssues, he as deepLinkHref, dr as defaultOutboxRetryDelay, ge as defineDeepLink, rr as defineEvent, oe as definePlatform, K as defineStore, zn as defineTracking, q as definedStores, On as deriveEntityAdmins, o as disableClientDiagnosticsPersistence, _e as dispatchDeepLink, ze as documentLocale, xr as drainOutboxInWorker, Sr as drainOutboxOverHttp, Je as emptyRichTextDocument, s as enableClientDiagnosticsPersistence, mn as encodeFormRejection, st as encodeNativeFormCapture, fr as enqueueEntry, Wr as errorMessage, Gr as errorTag, ir as eventCatalog, Xn as filtersFromSchema, ct as formActionPath, lt as formCaptureSource, ft as formDataToInput, Pe as formField, Fe as formSections, ut as formSourcePath, De as freshIdempotencyKey, Ae as getMutationNotifier, Ce as getMutations, C as globalContext, Cr as indexedDbOutboxPersistence, se as installPlatform, ce as isPlatformInstalled, Ye as isRichTextDocument, Xe as isSafeHref, le as isStandaloneDisplay, ln as isUnauthenticated, T as isUnresolvedApi, Kr as jsonSchemaDocumentOf, qr as jsonSchemaOf, Ir as makeApiRoleSocketTracker, Lr as makeApiSocketTracker, Dt as makePreloadSeedBag, L as makeProtocolOpenRecovery, J as makeStoreSeedBag, kn as manifestUrl, pr as markConflict, mr as markFailed, hr as markSent, ve as matchDeepLink, ye as matchFirstDeepLink, ue as memoryTokenStore, An as openAccessReason, Jr as pairingLink, Yr as parsePairingLink, Ze as parseRichText, vn as provenanceUrl, m as publishClientError, n as publishClientTrace, cn as queryOnce, sr as readApiOnline, dt as readFormCaptureSource, Xr as readPairing, Ot as readPreloadedSeedOutcome, kt as readPreloadedSnapshot, c as recordClientDiagnostic, pt as recoverNativeFormValues, x as recoveryCoordinatorFor, de as refusingTokenStore, e as registerCellMerger, k as registerSsrDescriptors, t as registeredCellMerger, gr as replayable, h as reportClientError, jn as requiredScopes, fe as resetPlatformForTest, At as resetPreloadSeeds, Y as resetStoreRegistryForTests, V as resetStoreStorageForTest, F as resolveByTag, _r as resolveConflictEntry, S as resolveRecoveryOptions, H as resolveStoreStorage, Bn as resolveTrackingEvent, Be as resolveValidationMessage, Ve as restrictToSchema, en as resumableConsumeProgram, Qe as richTextToPlainText, hn as rowsToOptions, wr as rpcHttpOutcome, be as runDeepLink, Or as runLocalQuery, It as runSequence, Ie as schemaToColumns, Le as schemaToFields, jt as seedPreloadedSubscription, Mt as seedPreloadedSubscriptionFailure, X as seedStore, Lt as sequence, $e as serializeRichText, je as setMutationNotifier, Nt as setPreloadSeedResolver, Z as setStoreSeedResolver, U as setStoreStorage, we as settleMutation, Q as shallow, Gn as shallowArrayEqual, Kn as sourceValues, A as ssrClientProxy, j as ssrDescriptorsFor, M as ssrStubHandle, u as stableKey, R as startApiSupervisor, Te as startMutation, $ as storeHistory, cr as subscribeApiOnline, l as subscribeClientDiagnostics, g as subscribeClientErrors, r as subscribeClientTraces, Ee as subscribeMutations, ee as subscribeStoreHistory, p as supersedesConfirmedPatches, te as travelToStoreState, E as unknownApiError, Mn as useAccessDecision, Ne as useAction, rn as useAgent, nn as useAgentChat, $t as useAgentStream, lr as useApiOnline, $n as useAsyncValidation, wn as useCan, Tn as useCanAny, Nn as useCapabilityManifest, Pr as useConnection, wt as useConnectionSetup, Dr as useConnectionStatus, Fr as useConnections, an as useDataCopilot, _n as useDataTable, er as useDebounced, qn as useDerived, Ft as useEvent, bt as useFormBinding, xt as useFormBindingContext, gt as useFormCapture, St as useFormField, _t as useFormFlash, Un as useFormSkeleton, N as useFrameworkApi, P as useFrameworkRuntimes, kr as useLocalQuery, Me as useMutation, dn as useOnRawRpcError, fn as useOnRpcError, vr as useOutbox, En as usePermissions, pe as usePlatform, Pt as usePreloadedSubscription, or as usePreview, yn as useProvenance, gn as useQueryField, Zn as useQueryFilters, Qn as useRecord, on as useRefreshSubscription, sn as useRefreshSubscriptions, Jn as useResourceCan, Yn as useResourceCans, tn as useResumableAgentStream, zt as useRpcCaller, Ct as useSchemaFormBinding, Rt as useSequence, vt as useServerRequest, me as useShellExtension, xe as useSubscription, pn as useSubscriptionHealth, Wn as useTableSkeleton, Vn as useTracking, Vt as useTranscription, Pn as useUndo, Rn as useUndoLog, Bt as useUpload, We as useValidationMessages, Er as useWindowedSubscription, Ht as useWorkflow, Ut as useWorkflowDomainEvents, Wt as useWorkflowEventDeliveries, Gt as useWorkflowEvents, Kt as useWorkflowRun, qt as useWorkflowRunEvents, Qt as useWorkflowRunState, Jt as useWorkflowRunSteps, Yt as useWorkflowRuns, Xt as useWorkflowSignal, Zt as useWorkflowUpdate, ar as validateEventPayload, He as validateFields, tr as validationStatus, un as wireAuthRefresh, Oe as withIdempotencyKey, Hn as wrapTrackedCallbacks };
package/dist/runtime.d.ts CHANGED
@@ -60,6 +60,8 @@ export declare interface ApiHandle {
60
60
  readonly errorBus: RpcErrorBus;
61
61
  /** Stable UI/raw transport recovery state for this logical api. */
62
62
  readonly recovery?: RecoveryCoordinator;
63
+ /** Identity lifetime captured when this transport was built. */
64
+ readonly subjectSignal?: AbortSignal;
63
65
  }
64
66
 
65
67
  export declare interface AuthRefreshHandle {
@@ -150,6 +152,8 @@ export declare interface BuildApiRuntimeOptions {
150
152
  readonly generation?: number;
151
153
  /** WebSocket URL of the api (`ws(s)://host:port/ws`). */
152
154
  readonly wsUrl: string;
155
+ /** Captured deployment role endpoint manifest; partition this group's transports by tag/workload. */
156
+ readonly roleEndpoints?: unknown;
153
157
  /**
154
158
  * The api's rpc group, as the ERASED `RpcGroup.Any`.
155
159
  *
@@ -208,6 +212,8 @@ export declare interface BuiltApiRuntime {
208
212
  readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
209
213
  readonly errorBus: RpcErrorBus;
210
214
  readonly recovery: RecoveryCoordinator;
215
+ /** Identity lifetime captured when this transport was built. */
216
+ readonly subjectSignal?: AbortSignal;
211
217
  }
212
218
 
213
219
  declare interface CacheEntry {
@@ -567,6 +573,7 @@ export declare interface MountedApi {
567
573
  readonly group: RpcGroup.Any;
568
574
  readonly descriptors: ClientDescriptorMap;
569
575
  readonly wsUrl: string;
576
+ readonly roleEndpoints?: unknown;
570
577
  readonly headers?: ResolvableHeaders | undefined;
571
578
  readonly recovery?: RecoveryOptions | undefined;
572
579
  /** Durable local mirror, resolved per transport generation — see
@@ -742,6 +749,8 @@ export declare interface ResolvedClient {
742
749
  readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
743
750
  readonly errorBus?: RpcErrorBus;
744
751
  readonly recovery?: RecoveryCoordinator;
752
+ /** Identity lifetime captured when this transport was built. */
753
+ readonly subjectSignal?: AbortSignal;
745
754
  }
746
755
 
747
756
  export declare interface ResolvedRecoveryOptions {
@@ -905,6 +914,8 @@ export declare interface ServiceClientOptions {
905
914
  /** The callee's WebSocket endpoint. A function so a late-resolved URL (dev
906
915
  * port discovery) is read at connect time, not at construction. */
907
916
  readonly wsUrl: string | (() => string);
917
+ /** Parsed deployment role endpoint manifest; captured before the lazy connect. */
918
+ readonly roleEndpoints?: unknown;
908
919
  /** The service credential, read at each (re)connect. */
909
920
  readonly token: () => string;
910
921
  /** The callee's `serviceGroup` (erased — see `BuildApiRuntimeOptions.group`). */
@@ -1355,8 +1366,12 @@ export declare interface SupervisorHandle {
1355
1366
  readonly dispose: () => void;
1356
1367
  /** Force a fresh ws connect for every api (carrying the browser's current
1357
1368
  * cookies) so a cookie-based login re-resolves the authenticated Subject
1358
- * in place, without a page reload. No-op for UI-only (no-api) apps. */
1359
- readonly reconnect: () => void;
1369
+ * in place, without a page reload. Resolves once every api runs on a
1370
+ * runtime built after this call (or the supervisor is gone): a call made
1371
+ * after that goes out as the next Subject. Never rejects; a failing build
1372
+ * keeps retrying and the promise waits for the one that lands. Resolves
1373
+ * at once for UI-only (no-api) apps. */
1374
+ readonly reconnect: () => Promise<void>;
1360
1375
  /** Re-resolve `authHeaders` and rebuild the transport, SAME subject — for a
1361
1376
  * rotated token on a long-lived tab. Unlike `reconnect()` this seeds the new
1362
1377
  * cache from the old one, because nobody's entitlement changed. */
@@ -1,14 +1,15 @@
1
1
  import { globalContext as e } from "./globalContext.js";
2
2
  import { FORM_FLASH_SCRIPT_ID as t } from "./formFlashId.js";
3
- import { useContext as n, useMemo as r } from "react";
4
- import { jsx as i } from "react/jsx-runtime";
3
+ import { formCaptureSource as n, readFormCaptureSource as r } from "./formSource.js";
4
+ import { useContext as i, useMemo as a } from "react";
5
+ import { jsx as o } from "react/jsx-runtime";
5
6
  //#region src/serverRequest.tsx
6
- var a = e("serverRequest", null), o = () => n(a), s = ({ value: e, children: t }) => /* @__PURE__ */ i(a.Provider, {
7
+ var s = e("serverRequest", null), c = () => i(s), l = ({ value: e, children: t }) => /* @__PURE__ */ o(s.Provider, {
7
8
  value: e,
8
9
  children: t
9
- }), c = (e) => {
10
- let n = o();
11
- return r(() => {
10
+ }), u = (e) => {
11
+ let n = c();
12
+ return a(() => {
12
13
  if (n !== null) return n.formFlash?.formKey === e ? n.formFlash : void 0;
13
14
  if (typeof document > "u") return;
14
15
  let r = document.getElementById(t);
@@ -19,6 +20,9 @@ var a = e("serverRequest", null), o = () => n(a), s = ({ value: e, children: t }
19
20
  return;
20
21
  }
21
22
  }, [n, e]);
23
+ }, d = () => {
24
+ let e = c();
25
+ return e === null ? r() : n(e.formSource);
22
26
  };
23
27
  //#endregion
24
- export { a as ServerRequestContext, s as ServerRequestProvider, c as useFormFlash, o as useServerRequest };
28
+ export { s as ServerRequestContext, l as ServerRequestProvider, d as useFormCapture, u as useFormFlash, c as useServerRequest };