@voltro/client 0.89.1 → 0.90.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.js CHANGED
@@ -1,87 +1,89 @@
1
1
  import { registerCellMerger as e, registeredCellMerger as t } from "./cellMerger.js";
2
- import { publishClientTrace as n, subscribeClientTraces as r } from "./traceBus.js";
3
- import { clearClientDiagnostics as i, clientDiagnosticsSnapshot as a, disableClientDiagnosticsPersistence as o, enableClientDiagnosticsPersistence as s, recordClientDiagnostic as c, subscribeClientDiagnostics as l } from "./clientDiagnostics.js";
4
- import { stableKey as u } from "./stableKey.js";
5
- import { LoadingSubscriptionCache as d, SubscriptionCache as f, supersedesConfirmedPatches as p } from "./subscriptionCache.js";
6
- import { publishClientError as m, reportClientError as h, subscribeClientErrors as g } from "./clientErrorBus.js";
7
- import { RpcErrorBus as _ } from "./rpcErrorBus.js";
8
- import { apiConnectivity as v } from "./apiConnectivity.js";
9
- import { INITIAL_RECOVERY_SNAPSHOT as y, RecoveryCoordinator as b, recoveryCoordinatorFor as x, resolveRecoveryOptions as S } from "./recoveryCoordinator.js";
10
- import { globalContext as C } from "./globalContext.js";
11
- import { FrameworkRuntimesContext as w, isUnresolvedApi as T, unknownApiError as E } from "./frameworkRuntimesContext.js";
12
- import { _resetFrameworkRuntimesWarning as D, _resetSsrDescriptors as O, registerSsrDescriptors as k, ssrClientProxy as A, ssrDescriptorsFor as j, ssrStubHandle as M, useFrameworkApi as N, useFrameworkRuntimes as P } from "./runtimeContext.js";
13
- import { resolveByTag as F } from "./tagWalk.js";
14
- import { buildApiRuntime as I, makeProtocolOpenRecovery as L } from "./apiRuntime.js";
15
- import { startApiSupervisor as R } from "./apiSupervisor.js";
16
- import { FrameworkRuntimesProvider as z } from "./provider.js";
17
- import { browserStoreStorage as B, resetStoreStorageForTest as V, resolveStoreStorage as H, setStoreStorage as U } from "./storeStorage.js";
18
- import { applyStoreSeeds as W, clearStoreHistory as G, defineStore as K, definedStores as q, makeStoreSeedBag as J, resetStoreRegistryForTests as Y, seedStore as X, setStoreSeedResolver as Z, shallow as Q, storeHistory as $, subscribeStoreHistory as ee, travelToStoreState as te } from "./store.js";
19
- import { browserOnlineSource as ne } from "./onlineSource.js";
20
- import { browserPlatform as re, capabilitiesOf as ie, currentPlatform as ae, definePlatform as oe, installPlatform as se, isPlatformInstalled as ce, isStandaloneDisplay as le, memoryTokenStore as ue, refusingTokenStore as de, resetPlatformForTest as fe, usePlatform as pe, useShellExtension as me } from "./platform.js";
21
- import { deepLinkHref as he, defineDeepLink as ge, dispatchDeepLink as _e, matchDeepLink as ve, matchFirstDeepLink as ye, runDeepLink as be } from "./deepLink.js";
22
- import { useSubscription as xe } from "./useSubscription.js";
23
- import { clearMutations as Se, getMutations as Ce, settleMutation as we, startMutation as Te, subscribeMutations as Ee } from "./mutationsBus.js";
24
- import { freshIdempotencyKey as De, withIdempotencyKey as Oe } from "./mutationIdentity.js";
25
- import { MutationSerialExecutionError as ke } from "./mutationSerialExecution.js";
26
- import { getMutationNotifier as Ae, setMutationNotifier as je, useMutation as Me } from "./useMutation.js";
27
- import { useAction as Ne } from "./useAction.js";
28
- import { formField as Pe, formSections as Fe, schemaToColumns as Ie, schemaToFields as Le } from "./schemaFields.js";
29
- import { decodeFieldIssues as Re, documentLocale as ze, resolveValidationMessage as Be, restrictToSchema as Ve, validateFields as He } from "./formBinding.js";
30
- import { ValidationMessagesProvider as Ue, useValidationMessages as We } from "./validationMessages.js";
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";
2
+ import { publishClientTrace as n, publishClientTraceRefusal as r, subscribeClientTraceRefusals as i, subscribeClientTraces as a } from "./traceBus.js";
3
+ import { clearClientDiagnostics as o, clientDiagnosticsSnapshot as s, disableClientDiagnosticsPersistence as c, enableClientDiagnosticsPersistence as l, recordClientDiagnostic as u, subscribeClientDiagnostics as d } from "./clientDiagnostics.js";
4
+ import { stableKey as f } from "./stableKey.js";
5
+ import { LoadingSubscriptionCache as p, SubscriptionCache as m, supersedesConfirmedPatches as h } from "./subscriptionCache.js";
6
+ import { publishClientError as g, reportClientError as _, subscribeClientErrors as v } from "./clientErrorBus.js";
7
+ import { RpcErrorBus as y } from "./rpcErrorBus.js";
8
+ import { apiConnectivity as b } from "./apiConnectivity.js";
9
+ import { INITIAL_RECOVERY_SNAPSHOT as x, RecoveryCoordinator as S, recoveryCoordinatorFor as C, resolveRecoveryOptions as w } from "./recoveryCoordinator.js";
10
+ import { globalContext as T } from "./globalContext.js";
11
+ import { FrameworkRuntimesContext as E, isUnresolvedApi as D, unknownApiError as O } from "./frameworkRuntimesContext.js";
12
+ import { _resetFrameworkRuntimesWarning as k, _resetSsrDescriptors as A, registerSsrDescriptors as j, ssrClientProxy as M, ssrDescriptorsFor as N, ssrStubHandle as P, useFrameworkApi as F, useFrameworkRuntimes as I } from "./runtimeContext.js";
13
+ import { resolveByTag as L } from "./tagWalk.js";
14
+ import { buildApiRuntime as R, makeProtocolOpenRecovery as z } from "./apiRuntime.js";
15
+ import { startApiSupervisor as B } from "./apiSupervisor.js";
16
+ import { FrameworkRuntimesProvider as V } from "./provider.js";
17
+ import { browserStoreStorage as H, resetStoreStorageForTest as U, resolveStoreStorage as W, setStoreStorage as G } from "./storeStorage.js";
18
+ import { applyStoreSeeds as K, clearStoreHistory as q, defineStore as J, definedStores as Y, makeStoreSeedBag as X, resetStoreRegistryForTests as Z, seedStore as Q, setStoreSeedResolver as $, shallow as ee, storeHistory as te, subscribeStoreHistory as ne, travelToStoreState as re } from "./store.js";
19
+ import { browserOnlineSource as ie } from "./onlineSource.js";
20
+ import { browserPlatform as ae, capabilitiesOf as oe, currentPlatform as se, definePlatform as ce, installPlatform as le, isPlatformInstalled as ue, isStandaloneDisplay as de, memoryTokenStore as fe, refusingTokenStore as pe, resetPlatformForTest as me, usePlatform as he, useShellExtension as ge } from "./platform.js";
21
+ import { deepLinkHref as _e, defineDeepLink as ve, dispatchDeepLink as ye, matchDeepLink as be, matchFirstDeepLink as xe, runDeepLink as Se } from "./deepLink.js";
22
+ import { useSubscription as Ce } from "./useSubscription.js";
23
+ import { useRpcDeclared as we } from "./rpcDeclared.js";
24
+ import { clearMutations as Te, getMutations as Ee, omitMutationInputs as De, omitMutationOutputs as Oe, startMutation as ke, subscribeMutations as Ae } from "./mutationsBus.js";
25
+ import { freshIdempotencyKey as je, withIdempotencyKey as Me } from "./mutationIdentity.js";
26
+ import { MutationSerialExecutionError as Ne } from "./mutationSerialExecution.js";
27
+ import { getMutationNotifier as Pe, setMutationNotifier as Fe, useMutation as Ie } from "./useMutation.js";
28
+ import { useAction as Le } from "./useAction.js";
29
+ import { formField as Re, formSections as ze, schemaToColumns as Be, schemaToFields as Ve } from "./schemaFields.js";
30
+ import { decodeFieldIssues as He, documentLocale as Ue, resolveValidationMessage as We, restrictToSchema as Ge, validateFields as Ke } from "./formBinding.js";
31
+ import { ValidationMessagesProvider as qe, useValidationMessages as Je } from "./validationMessages.js";
32
+ import { RICH_TEXT_MARKS as Ye, RICH_TEXT_MAX_NODES as Xe, RichTextDocument as Ze, emptyRichTextDocument as Qe, isRichTextDocument as $e, isSafeHref as et, parseRichText as tt, richTextToPlainText as nt, serializeRichText as rt } from "./richText.js";
33
+ import { FORM_FLASH_SCRIPT_ID as it } from "./formFlashId.js";
34
+ import { FORM_CAPTURE_FIELD as at, FORM_CAPTURE_META_NAME as ot, FORM_KEY_FIELD as st, FORM_PATH_PREFIX as ct, FORM_REDIRECT_FIELD as lt, FORM_SOURCE_FIELD as ut, encodeNativeFormCapture as dt, formActionPath as ft, formCaptureSource as pt, formSourcePath as mt, readFormCaptureSource as ht } from "./formSource.js";
35
+ import { formDataToInput as gt, recoverNativeFormValues as _t } from "./formData.js";
36
+ import { ServerRequestContext as vt, ServerRequestProvider as yt, useFormCapture as bt, useFormFlash as xt, useServerRequest as St } from "./serverRequest.js";
37
+ import { FormBindingProvider as Ct, useFormBinding as wt, useFormBindingContext as Tt, useFormField as Et, useSchemaFormBinding as Dt } from "./useFormBinding.js";
38
+ import { useConnectionSetup as Ot } from "./useConnectionSetup.js";
39
+ import { createHooks as kt } from "./createHooks.js";
40
+ import { applyPreloadSeeds as At, makePreloadSeedBag as jt, readPreloadedSeedOutcome as Mt, readPreloadedSnapshot as Nt, resetPreloadSeeds as Pt, seedPreloadedSubscription as Ft, seedPreloadedSubscriptionFailure as It, setPreloadSeedResolver as Lt } from "./preloadSeed.js";
41
+ import { usePreloadedSubscription as Rt } from "./usePreloadedSubscription.js";
42
+ import { useEvent as zt } from "./useEvent.js";
43
+ import { runSequence as Bt, sequence as Vt } from "./sequence.js";
44
+ import { useSequence as Ht } from "./useSequence.js";
45
+ import { useRpcCaller as Ut } from "./useRpcCaller.js";
46
+ import { useUpload as Wt } from "./useUpload.js";
47
+ import { useTranscription as Gt } from "./useTranscription.js";
48
+ import { useWorkflow as Kt, useWorkflowDomainEvents as qt, useWorkflowEventDeliveries as Jt, useWorkflowEvents as Yt, useWorkflowRun as Xt, useWorkflowRunEvents as Zt, useWorkflowRunSteps as Qt, useWorkflowRuns as $t, useWorkflowSignal as en, useWorkflowUpdate as tn } from "./useWorkflow.js";
49
+ import { useWorkflowRunState as nn } from "./useWorkflowRunState.js";
50
+ import { useAgentStream as rn } from "./useAgentStream.js";
51
+ import { resumableConsumeProgram as an, useResumableAgentStream as on } from "./useResumableAgentStream.js";
52
+ import { useAgentChat as sn } from "./useAgentChat.js";
53
+ import { useAgent as cn } from "./useAgent.js";
54
+ import { useDataCopilot as ln } from "./useDataCopilot.js";
55
+ import { useRefreshSubscription as un, useRefreshSubscriptions as dn } from "./useRefreshSubscriptions.js";
56
+ import { queryOnce as fn } from "./query.js";
57
+ import { isUnauthenticated as pn, wireAuthRefresh as mn } from "./authRefresh.js";
58
+ import { useOnRawRpcError as hn, useOnRpcError as gn } from "./useOnRpcError.js";
59
+ import { useSubscriptionHealth as _n } from "./useSubscriptionHealth.js";
60
+ import { encodeFormRejection as vn } from "./formRejection.js";
61
+ import { rowsToOptions as yn, useQueryField as bn } from "./useQueryField.js";
62
+ import { useDataTable as xn } from "./useDataTable.js";
63
+ import { provenanceUrl as Sn, useProvenance as Cn } from "./useProvenance.js";
64
+ import { ADMIN_SCOPE as wn, PermissionProvider as Tn, canCall as En, canCallAny as Dn, useCan as On, useCanAny as kn, usePermissions as An } from "./permissions.js";
65
+ import { decideAccess as jn, deriveEntityAdmins as Mn, manifestUrl as Nn, openAccessReason as Pn, requiredScopes as Fn, useAccessDecision as In, useCapabilityManifest as Ln } from "./useCapabilityManifest.js";
66
+ import { useUndo as Rn } from "./useUndo.js";
67
+ import { UNDO_APPLY_TAG as zn, UNDO_LOG_TAG as Bn, UNDO_REDO_TAG as Vn, useUndoLog as Hn } from "./useUndoLog.js";
68
+ import { defineTracking as Un, resolveTrackingEvent as Wn, useTracking as Gn, wrapTrackedCallbacks as Kn } from "./tracking.js";
69
+ import { useFormSkeleton as qn, useTableSkeleton as Jn } from "./useSkeleton.js";
70
+ import { shallowArrayEqual as Yn, sourceValues as Xn, useDerived as Zn } from "./useDerived.js";
71
+ import { useResourceCan as Qn, useResourceCans as $n } from "./useResourceCan.js";
72
+ import { filtersFromSchema as er, useQueryFilters as tr } from "./filters.js";
73
+ import { useRecord as nr } from "./useRecord.js";
74
+ import { useAsyncValidation as rr, useDebounced as ir, validationStatus as ar } from "./validation.js";
75
+ import { createAnalytics as or, defineEvent as sr, eventCatalog as cr, validateEventPayload as lr } from "./analyticsCatalog.js";
76
+ import { usePreview as ur } from "./usePreview.js";
77
+ import { readApiOnline as dr, subscribeApiOnline as fr, useApiOnline as pr } from "./useApiOnline.js";
78
+ import { clearSent as mr, defaultOutboxRetryDelay as hr, enqueueEntry as gr, markConflict as _r, markFailed as vr, markSent as yr, replayable as br, resolveConflictEntry as xr, useOutbox as Sr } from "./outbox.js";
79
+ import { OUTBOX_DB_NAME as Cr, OUTBOX_SYNC_TAG as wr, drainOutboxInWorker as Tr, drainOutboxOverHttp as Er, indexedDbOutboxPersistence as Dr, rpcHttpOutcome as Or } from "./outboxHttp.js";
80
+ import { computeWindow as kr, useWindowedSubscription as Ar } from "./useWindowedSubscription.js";
81
+ import { useConnectionStatus as jr } from "./useConnectionStatus.js";
82
+ import { runLocalQuery as Mr, useLocalQuery as Nr } from "./useLocalQuery.js";
83
+ import { CONNECTIONS_LIST_TAG as Pr, CONNECTION_DISCONNECT_TAG as Fr, CONNECTION_START_TAG as Ir, CONNECTION_SUBMIT_TOKEN_TAG as Lr, useConnection as Rr, useConnections as zr } from "./useConnections.js";
84
+ import { makeApiRoleSocketTracker as Br, makeApiSocketTracker as Vr } from "./apiSocketTracker.js";
85
+ import { DEV_ACTIVITY_EVENT as Hr, PAIRING_HOST as Ur, PAIRING_SCHEME as Wr, PAIRING_STORAGE_KEY as Gr, applyPairing as Kr, clearPairing as qr, errorMessage as Jr, errorTag as Yr, jsonSchemaDocumentOf as Xr, jsonSchemaOf as Zr, pairingLink as Qr, parsePairingLink as $r, readPairing as ei } from "@voltro/protocol";
86
+ import { DEFAULT_WEBHOOK_INSPECT_LIST as ti, MAX_WEBHOOK_INSPECT_OFFSET as ni, isWebhookEventActivity as ri, isWebhookInspectActivityStatus as ii, isWebhookInspectPagination as ai, webhookInspectListRequest as oi } from "@voltro/protocol/inspect";
85
87
  // src/index.ts
86
- var Zr = "framework-client";
87
- 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 };
88
+ var si = "framework-client";
89
+ export { wn as ADMIN_SCOPE, si as CLIENT_NAME, Pr as CONNECTIONS_LIST_TAG, Fr as CONNECTION_DISCONNECT_TAG, Ir as CONNECTION_START_TAG, Lr as CONNECTION_SUBMIT_TOKEN_TAG, ti as DEFAULT_WEBHOOK_INSPECT_LIST, Hr as DEV_ACTIVITY_EVENT, at as FORM_CAPTURE_FIELD, ot as FORM_CAPTURE_META_NAME, it as FORM_FLASH_SCRIPT_ID, st as FORM_KEY_FIELD, ct as FORM_PATH_PREFIX, lt as FORM_REDIRECT_FIELD, ut as FORM_SOURCE_FIELD, Ct as FormBindingProvider, E as FrameworkRuntimesContext, V as FrameworkRuntimesProvider, x as INITIAL_RECOVERY_SNAPSHOT, p as LoadingSubscriptionCache, ni as MAX_WEBHOOK_INSPECT_OFFSET, Ne as MutationSerialExecutionError, Cr as OUTBOX_DB_NAME, wr as OUTBOX_SYNC_TAG, Ur as PAIRING_HOST, Wr as PAIRING_SCHEME, Gr as PAIRING_STORAGE_KEY, Tn as PermissionProvider, Ye as RICH_TEXT_MARKS, Xe as RICH_TEXT_MAX_NODES, S as RecoveryCoordinator, Ze as RichTextDocument, y as RpcErrorBus, vt as ServerRequestContext, yt as ServerRequestProvider, m as SubscriptionCache, zn as UNDO_APPLY_TAG, Bn as UNDO_LOG_TAG, Vn as UNDO_REDO_TAG, qe as ValidationMessagesProvider, k as _resetFrameworkRuntimesWarning, A as _resetSsrDescriptors, b as apiConnectivity, Kr as applyPairing, At as applyPreloadSeeds, K as applyStoreSeeds, ie as browserOnlineSource, ae as browserPlatform, H as browserStoreStorage, R as buildApiRuntime, En as canCall, Dn as canCallAny, oe as capabilitiesOf, o as clearClientDiagnostics, Te as clearMutations, qr as clearPairing, mr as clearSent, q as clearStoreHistory, s as clientDiagnosticsSnapshot, kr as computeWindow, or as createAnalytics, kt as createHooks, se as currentPlatform, jn as decideAccess, He as decodeFieldIssues, _e as deepLinkHref, hr as defaultOutboxRetryDelay, ve as defineDeepLink, sr as defineEvent, ce as definePlatform, J as defineStore, Un as defineTracking, Y as definedStores, Mn as deriveEntityAdmins, c as disableClientDiagnosticsPersistence, ye as dispatchDeepLink, Ue as documentLocale, Tr as drainOutboxInWorker, Er as drainOutboxOverHttp, Qe as emptyRichTextDocument, l as enableClientDiagnosticsPersistence, vn as encodeFormRejection, dt as encodeNativeFormCapture, gr as enqueueEntry, Jr as errorMessage, Yr as errorTag, cr as eventCatalog, er as filtersFromSchema, ft as formActionPath, pt as formCaptureSource, gt as formDataToInput, Re as formField, ze as formSections, mt as formSourcePath, je as freshIdempotencyKey, Pe as getMutationNotifier, Ee as getMutations, T as globalContext, Dr as indexedDbOutboxPersistence, le as installPlatform, ue as isPlatformInstalled, $e as isRichTextDocument, et as isSafeHref, de as isStandaloneDisplay, pn as isUnauthenticated, D as isUnresolvedApi, ri as isWebhookEventActivity, ii as isWebhookInspectActivityStatus, ai as isWebhookInspectPagination, Xr as jsonSchemaDocumentOf, Zr as jsonSchemaOf, Br as makeApiRoleSocketTracker, Vr as makeApiSocketTracker, jt as makePreloadSeedBag, z as makeProtocolOpenRecovery, X as makeStoreSeedBag, Nn as manifestUrl, _r as markConflict, vr as markFailed, yr as markSent, be as matchDeepLink, xe as matchFirstDeepLink, fe as memoryTokenStore, De as omitMutationInputs, Oe as omitMutationOutputs, Pn as openAccessReason, Qr as pairingLink, $r as parsePairingLink, tt as parseRichText, Sn as provenanceUrl, g as publishClientError, n as publishClientTrace, r as publishClientTraceRefusal, fn as queryOnce, dr as readApiOnline, ht as readFormCaptureSource, ei as readPairing, Mt as readPreloadedSeedOutcome, Nt as readPreloadedSnapshot, u as recordClientDiagnostic, _t as recoverNativeFormValues, C as recoveryCoordinatorFor, pe as refusingTokenStore, e as registerCellMerger, j as registerSsrDescriptors, t as registeredCellMerger, br as replayable, _ as reportClientError, Fn as requiredScopes, me as resetPlatformForTest, Pt as resetPreloadSeeds, Z as resetStoreRegistryForTests, U as resetStoreStorageForTest, L as resolveByTag, xr as resolveConflictEntry, w as resolveRecoveryOptions, W as resolveStoreStorage, Wn as resolveTrackingEvent, We as resolveValidationMessage, Ge as restrictToSchema, an as resumableConsumeProgram, nt as richTextToPlainText, yn as rowsToOptions, Or as rpcHttpOutcome, Se as runDeepLink, Mr as runLocalQuery, Bt as runSequence, Be as schemaToColumns, Ve as schemaToFields, Ft as seedPreloadedSubscription, It as seedPreloadedSubscriptionFailure, Q as seedStore, Vt as sequence, rt as serializeRichText, Fe as setMutationNotifier, Lt as setPreloadSeedResolver, $ as setStoreSeedResolver, G as setStoreStorage, ee as shallow, Yn as shallowArrayEqual, Xn as sourceValues, M as ssrClientProxy, N as ssrDescriptorsFor, P as ssrStubHandle, f as stableKey, B as startApiSupervisor, ke as startMutation, te as storeHistory, fr as subscribeApiOnline, d as subscribeClientDiagnostics, v as subscribeClientErrors, i as subscribeClientTraceRefusals, a as subscribeClientTraces, Ae as subscribeMutations, ne as subscribeStoreHistory, h as supersedesConfirmedPatches, re as travelToStoreState, O as unknownApiError, In as useAccessDecision, Le as useAction, cn as useAgent, sn as useAgentChat, rn as useAgentStream, pr as useApiOnline, rr as useAsyncValidation, On as useCan, kn as useCanAny, Ln as useCapabilityManifest, Rr as useConnection, Ot as useConnectionSetup, jr as useConnectionStatus, zr as useConnections, ln as useDataCopilot, xn as useDataTable, ir as useDebounced, Zn as useDerived, zt as useEvent, wt as useFormBinding, Tt as useFormBindingContext, bt as useFormCapture, Et as useFormField, xt as useFormFlash, qn as useFormSkeleton, F as useFrameworkApi, I as useFrameworkRuntimes, Nr as useLocalQuery, Ie as useMutation, hn as useOnRawRpcError, gn as useOnRpcError, Sr as useOutbox, An as usePermissions, he as usePlatform, Rt as usePreloadedSubscription, ur as usePreview, Cn as useProvenance, bn as useQueryField, tr as useQueryFilters, nr as useRecord, un as useRefreshSubscription, dn as useRefreshSubscriptions, Qn as useResourceCan, $n as useResourceCans, on as useResumableAgentStream, Ut as useRpcCaller, we as useRpcDeclared, Dt as useSchemaFormBinding, Ht as useSequence, St as useServerRequest, ge as useShellExtension, Ce as useSubscription, _n as useSubscriptionHealth, Jn as useTableSkeleton, Gn as useTracking, Gt as useTranscription, Rn as useUndo, Hn as useUndoLog, Wt as useUpload, Je as useValidationMessages, Ar as useWindowedSubscription, Kt as useWorkflow, qt as useWorkflowDomainEvents, Jt as useWorkflowEventDeliveries, Yt as useWorkflowEvents, Xt as useWorkflowRun, Zt as useWorkflowRunEvents, nn as useWorkflowRunState, Qt as useWorkflowRunSteps, $t as useWorkflowRuns, en as useWorkflowSignal, tn as useWorkflowUpdate, lr as validateEventPayload, Ke as validateFields, ar as validationStatus, oi as webhookInspectListRequest, mn as wireAuthRefresh, Me as withIdempotencyKey, Kn as wrapTrackedCallbacks };
@@ -0,0 +1,14 @@
1
+ // src/invocationWait.ts
2
+ var e = (e, t, n) => t === void 0 ? e : new Promise((r, i) => {
3
+ let a = !1, o = (e) => {
4
+ a || (a = !0, t.removeEventListener("abort", s), e());
5
+ }, s = () => o(() => {
6
+ try {
7
+ n(), i(new DOMException("operation aborted", "AbortError"));
8
+ } catch (e) {
9
+ i(e);
10
+ }
11
+ });
12
+ t.addEventListener("abort", s, { once: !0 }), e.then((e) => o(() => r(e)), (e) => o(() => i(e))), t.aborted && s();
13
+ });
14
+ export { e as waitForInvocation };
@@ -1,39 +1,96 @@
1
1
  // src/mutationsBus.ts
2
- var e = [], t = /* @__PURE__ */ new Set(), n = [], r = () => {
3
- n = e.slice();
4
- }, i = () => {
5
- r();
6
- for (let e of t) try {
2
+ var e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [], i = () => {
3
+ r = e.map((e) => e.event);
4
+ for (let e of n) try {
7
5
  e();
8
6
  } catch {}
9
- }, a = (t) => {
10
- let n = {
11
- ...t,
12
- kind: t.kind ?? "mutation",
13
- status: "pending",
14
- startedAt: Date.now()
15
- };
16
- e.unshift(n), e.length > 100 && (e.length = 100), i();
17
- }, o = (t, n) => {
18
- let r = e.findIndex((e) => e.id === t);
19
- if (r === -1) return;
20
- let a = e[r], o = Date.now();
21
- e[r] = n.status === "success" ? {
22
- ...a,
23
- status: "success",
24
- output: n.output,
25
- settledAt: o,
26
- durationMs: o - a.startedAt
27
- } : {
28
- ...a,
29
- status: "error",
30
- error: n.error,
31
- settledAt: o,
32
- durationMs: o - a.startedAt
33
- }, i();
34
- }, s = () => n, c = (e) => (t.add(e), () => {
35
- t.delete(e);
36
- }), l = () => {
37
- e.length !== 0 && (e.length = 0, i());
7
+ }, a = (e) => {
8
+ let n = t.get(e.subject);
9
+ n?.entries.delete(e), n?.entries.size === 0 && (n.detach(), t.delete(e.subject));
10
+ }, o = (n) => {
11
+ let r = t.get(n);
12
+ if (r) {
13
+ t.delete(n), r.detach();
14
+ for (let t = e.length - 1; t >= 0; t--) r.entries.has(e[t]) && e.splice(t, 1);
15
+ r.entries.clear(), i();
16
+ }
17
+ }, s = (n, r) => {
18
+ if (r.aborted) return { settle: () => {} };
19
+ let s = {
20
+ subject: r,
21
+ event: {
22
+ ...n,
23
+ input: n.inputOmitted === !0 ? void 0 : n.input,
24
+ subjectSignal: r,
25
+ kind: n.kind ?? "mutation",
26
+ status: "pending",
27
+ startedAt: Date.now()
28
+ }
29
+ }, c = t.get(r);
30
+ if (!c) {
31
+ let e = () => o(r);
32
+ c = {
33
+ entries: /* @__PURE__ */ new Set(),
34
+ detach: () => r.removeEventListener("abort", e)
35
+ }, t.set(r, c), r.addEventListener("abort", e, { once: !0 });
36
+ }
37
+ return c.entries.add(s), e.unshift(s), e.length > 100 && a(e.pop()), i(), { settle: (e) => {
38
+ if (r.aborted || s.event.status !== "pending" || !t.get(r)?.entries.has(s)) return;
39
+ let n = Date.now(), a = {
40
+ settledAt: n,
41
+ durationMs: n - s.event.startedAt
42
+ };
43
+ if (e.status === "error") s.event = {
44
+ ...s.event,
45
+ status: "error",
46
+ error: e.error,
47
+ ...a
48
+ };
49
+ else {
50
+ let { output: t, ...n } = s.event;
51
+ s.event = e.outputOmitted === !0 || n.outputOmitted === !0 ? {
52
+ ...n,
53
+ status: "success",
54
+ outputOmitted: !0,
55
+ ...a
56
+ } : {
57
+ ...n,
58
+ status: "success",
59
+ output: e.output,
60
+ ...a
61
+ };
62
+ }
63
+ i();
64
+ } };
65
+ }, c = () => r, l = (e) => (n.add(e), () => {
66
+ n.delete(e);
67
+ }), u = () => {
68
+ if (e.length !== 0) {
69
+ for (let e of t.values()) e.detach(), e.entries.clear();
70
+ t.clear(), e.length = 0, i();
71
+ }
72
+ }, d = (t, n) => {
73
+ let r = !1;
74
+ for (let i = 0; i < e.length; i++) {
75
+ let a = e[i];
76
+ if (!a || a.event.apiName !== t || a.event.tag !== n || a.event.outputOmitted === !0) continue;
77
+ let { output: o, ...s } = a.event;
78
+ a.event = {
79
+ ...s,
80
+ outputOmitted: !0
81
+ }, r = !0;
82
+ }
83
+ r && i();
84
+ }, f = (t, n) => {
85
+ let r = !1;
86
+ for (let i = 0; i < e.length; i++) {
87
+ let a = e[i];
88
+ a && a.event.apiName === t && a.event.tag === n && a.event.inputOmitted !== !0 && (a.event = {
89
+ ...a.event,
90
+ input: void 0,
91
+ inputOmitted: !0
92
+ }, r = !0);
93
+ }
94
+ r && i();
38
95
  };
39
- export { l as clearMutations, s as getMutations, o as settleMutation, a as startMutation, c as subscribeMutations };
96
+ export { u as clearMutations, c as getMutations, f as omitMutationInputs, d as omitMutationOutputs, s as startMutation, l as subscribeMutations };