@voltro/client 0.90.0 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +121 -0
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/apiRuntime.js +50 -50
- package/dist/apiSupervisor.js +25 -25
- package/dist/awaitResolvedApi.js +17 -17
- package/dist/bootstrap.js +8 -8
- package/dist/connectionPrerequisite.js +18 -18
- package/dist/connectionSetupController.js +97 -97
- package/dist/createHooks.js +11 -11
- package/dist/form.js +7 -7
- package/dist/index.js +82 -82
- package/dist/outbox.js +133 -133
- package/dist/platform.js +10 -10
- package/dist/rpcCallOnce.js +10 -10
- package/dist/runtime.js +16 -16
- package/dist/runtimeContext.js +1 -1
- package/dist/serviceClient.js +23 -23
- package/dist/store.js +3 -3
- package/dist/subscriptionCache.js +1 -1
- package/dist/uploadClient.js +35 -35
- package/dist/useAction.js +59 -59
- package/dist/useAgentChat.js +3 -3
- package/dist/useCapabilityManifest.js +7 -7
- package/dist/useConnectionStatus.js +5 -5
- package/dist/useDataTable.js +4 -4
- package/dist/useEvent.js +22 -22
- package/dist/useFormBinding.js +10 -10
- package/dist/useMutation.js +89 -89
- package/dist/useOnRpcError.js +5 -5
- package/dist/usePreloadedSubscription.js +6 -6
- package/dist/useRpcCaller.js +21 -21
- package/dist/useRpcInvocationOwner.js +6 -6
- package/dist/useTranscription.js +27 -27
- package/dist/useWorkflow.js +22 -22
- package/dist/workflowClient.js +33 -33
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { squashRpcCause as e } from "./squashRpcCause.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
2
|
+
import { ConnectionPrerequisite as t, ConnectionPrerequisiteInvalidated as n, SUPERSEDED_BY_LATER_ACTIVATION as r, activationEndReason as i } from "./connectionPrerequisite.js";
|
|
3
|
+
import { connectionScopeForRuntime as a } from "./connectionScope.js";
|
|
4
|
+
import { createConnectionSetupHandle as o } from "./mutationConnectionSetup.js";
|
|
5
|
+
import { freshIdempotencyKey as s, withIdempotencyKey as c } from "./mutationIdentity.js";
|
|
6
|
+
import { recoveryCoordinatorFor as l } from "./recoveryCoordinator.js";
|
|
7
|
+
import { resolveByTag as u } from "./tagWalk.js";
|
|
8
|
+
import { runRpcPromise as d } from "./runRpc.js";
|
|
9
|
+
import { rpcErrorKind as f } from "./rpcErrorKind.js";
|
|
10
|
+
import { omitMutationInputs as p, startMutation as m } from "./mutationsBus.js";
|
|
11
|
+
import { captureRpcInvocationOwner as h, rpcInvocationOwnerCurrent as g } from "./awaitResolvedApi.js";
|
|
12
12
|
import { Cause as _, Effect as v, Exit as y } from "effect";
|
|
13
13
|
// src/connectionSetupController.ts
|
|
14
14
|
var b = class {
|
|
@@ -26,7 +26,7 @@ var b = class {
|
|
|
26
26
|
#s;
|
|
27
27
|
handle;
|
|
28
28
|
constructor(e, t, n) {
|
|
29
|
-
this.#e = e, this.#t = t, this.#n = n, this.handle =
|
|
29
|
+
this.#e = e, this.#t = t, this.#n = n, this.handle = o(e, { capture: () => this.#f() });
|
|
30
30
|
}
|
|
31
31
|
getSnapshot = () => this.#a;
|
|
32
32
|
subscribe = (e) => (this.#r.add(e), () => {
|
|
@@ -34,37 +34,37 @@ var b = class {
|
|
|
34
34
|
});
|
|
35
35
|
clear = (e = !1) => {
|
|
36
36
|
let t = this.#i;
|
|
37
|
-
this.#i = void 0, this.#s = void 0, t && (t.initialDelivery = void 0), t?.detachSubject?.(), t?.controller.abort(e ?
|
|
37
|
+
this.#i = void 0, this.#s = void 0, t && (t.initialDelivery = void 0), t?.detachSubject?.(), t?.controller.abort(e ? r : void 0), this.#h({
|
|
38
38
|
status: "idle",
|
|
39
39
|
data: void 0,
|
|
40
40
|
error: void 0
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
async activate(e,
|
|
43
|
+
async activate(e, n) {
|
|
44
44
|
this.clear(!0);
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
}),
|
|
45
|
+
let r = new AbortController(), i = () => {}, a = new Promise((e) => {
|
|
46
|
+
i = e;
|
|
47
|
+
}), o = {
|
|
48
48
|
input: e,
|
|
49
|
-
key:
|
|
50
|
-
controller:
|
|
49
|
+
key: s(),
|
|
50
|
+
controller: r,
|
|
51
51
|
owner: void 0,
|
|
52
52
|
detachSubject: void 0,
|
|
53
|
-
prerequisite: new
|
|
53
|
+
prerequisite: new t(r.signal, this.#c(this.#n()).options.replayWindowMs),
|
|
54
54
|
established: !1,
|
|
55
55
|
outputs: /* @__PURE__ */ new WeakMap(),
|
|
56
|
-
initialDelivery:
|
|
56
|
+
initialDelivery: i
|
|
57
57
|
};
|
|
58
|
-
this.#i =
|
|
58
|
+
this.#i = o, this.#h({
|
|
59
59
|
status: "pending",
|
|
60
60
|
data: void 0,
|
|
61
61
|
error: void 0
|
|
62
62
|
});
|
|
63
63
|
try {
|
|
64
|
-
let e = await
|
|
65
|
-
return this.#l(
|
|
64
|
+
let e = await n(), t = await this.#p(o, e.runtime, e.client);
|
|
65
|
+
return this.#l(o), o.prerequisite.assertCurrent(e.runtime, t), o.established = !0, await a;
|
|
66
66
|
} catch (e) {
|
|
67
|
-
throw this.#l(
|
|
67
|
+
throw this.#l(o), this.#i === o && (this.clear(), this.#h({
|
|
68
68
|
status: "error",
|
|
69
69
|
data: void 0,
|
|
70
70
|
error: e
|
|
@@ -72,10 +72,10 @@ var b = class {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
watch(e) {
|
|
75
|
-
let t =
|
|
75
|
+
let t = a(e.runtime), n = () => {
|
|
76
76
|
let n = this.#i;
|
|
77
77
|
if (n === void 0 || !n.established || this.#n().runtime !== e.runtime) return;
|
|
78
|
-
if (n.owner === void 0 || !
|
|
78
|
+
if (n.owner === void 0 || !g(n.owner, e)) {
|
|
79
79
|
this.clear();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
@@ -89,21 +89,21 @@ var b = class {
|
|
|
89
89
|
return n(), t?.subscribe(n) ?? (() => {});
|
|
90
90
|
}
|
|
91
91
|
#c(e) {
|
|
92
|
-
return e.recovery ??
|
|
92
|
+
return e.recovery ?? l(e.errorBus, this.#e);
|
|
93
93
|
}
|
|
94
94
|
#l(e) {
|
|
95
|
-
if (this.#i !== e || e.controller.signal.aborted) throw new
|
|
95
|
+
if (this.#i !== e || e.controller.signal.aborted) throw new n(i(e.controller.signal));
|
|
96
96
|
}
|
|
97
|
-
#u(e, t,
|
|
97
|
+
#u(e, t, r) {
|
|
98
98
|
this.#l(e);
|
|
99
|
-
let
|
|
100
|
-
if (e.owner !== void 0 && !
|
|
101
|
-
if (
|
|
102
|
-
return
|
|
99
|
+
let i = this.#n();
|
|
100
|
+
if (e.owner !== void 0 && !g(e.owner, i)) throw new n("inactive");
|
|
101
|
+
if (i.runtime !== t || i.client !== r) throw new n("connection-changed");
|
|
102
|
+
return i;
|
|
103
103
|
}
|
|
104
104
|
#d(e, t) {
|
|
105
105
|
if (e.owner !== void 0) return;
|
|
106
|
-
e.owner =
|
|
106
|
+
e.owner = h(t, this.#e, this.#t);
|
|
107
107
|
let n = e.owner.subject, r = () => {
|
|
108
108
|
this.#i === e && this.clear();
|
|
109
109
|
};
|
|
@@ -111,7 +111,7 @@ var b = class {
|
|
|
111
111
|
}
|
|
112
112
|
#f() {
|
|
113
113
|
let e = this.#i;
|
|
114
|
-
if (e === void 0) throw new
|
|
114
|
+
if (e === void 0) throw new n("inactive");
|
|
115
115
|
return { prepare: async (t, n) => {
|
|
116
116
|
let r = await this.#p(e, t, n);
|
|
117
117
|
return { run: (i) => e.prerequisite.run(t, r, v.try({
|
|
@@ -120,93 +120,93 @@ var b = class {
|
|
|
120
120
|
}).pipe(v.andThen(i))) };
|
|
121
121
|
} };
|
|
122
122
|
}
|
|
123
|
-
async #p(e, t,
|
|
124
|
-
let
|
|
125
|
-
if (
|
|
126
|
-
this.#d(e,
|
|
127
|
-
let c =
|
|
128
|
-
if (c === void 0) throw new
|
|
123
|
+
async #p(e, t, r) {
|
|
124
|
+
let o = this.#u(e, t, r), s = o.descriptors[this.#t];
|
|
125
|
+
if (s?.kind !== "mutation" || s.idempotencyScope !== "connection") throw Error(`Voltro: useConnectionSetup("${this.#t}") requires a mutation declaring idempotencyScope: 'connection'`);
|
|
126
|
+
this.#d(e, o), this.#l(e);
|
|
127
|
+
let c = a(t);
|
|
128
|
+
if (c === void 0) throw new n("connection-unavailable");
|
|
129
129
|
if (c.getSnapshot() === void 0) {
|
|
130
|
-
let
|
|
131
|
-
let
|
|
132
|
-
let
|
|
133
|
-
e.controller.signal.aborted ? t(v.fail(new
|
|
134
|
-
},
|
|
135
|
-
return e.controller.signal.addEventListener("abort",
|
|
136
|
-
|
|
130
|
+
let r = v.callback((t) => {
|
|
131
|
+
let r = () => {
|
|
132
|
+
let r = c.getSnapshot();
|
|
133
|
+
e.controller.signal.aborted ? t(v.fail(new n(i(e.controller.signal)))) : r !== void 0 && t(v.succeed(r));
|
|
134
|
+
}, a = c.subscribe(r);
|
|
135
|
+
return e.controller.signal.addEventListener("abort", r, { once: !0 }), r(), v.sync(() => {
|
|
136
|
+
a(), e.controller.signal.removeEventListener("abort", r);
|
|
137
137
|
});
|
|
138
138
|
}).pipe(v.timeoutOrElse({
|
|
139
|
-
duration: this.#c(
|
|
140
|
-
orElse: () => v.fail(new
|
|
139
|
+
duration: this.#c(o).options.replayWindowMs,
|
|
140
|
+
orElse: () => v.fail(new n("timeout"))
|
|
141
141
|
}));
|
|
142
|
-
await
|
|
142
|
+
await d(t, r);
|
|
143
143
|
}
|
|
144
|
-
this.#u(e, t,
|
|
145
|
-
let
|
|
144
|
+
this.#u(e, t, r);
|
|
145
|
+
let l = c.getSnapshot();
|
|
146
146
|
try {
|
|
147
|
-
let
|
|
148
|
-
return this.#u(e, t,
|
|
147
|
+
let n = await e.prerequisite.prepare(t, this.#m(e, o));
|
|
148
|
+
return this.#u(e, t, r), this.#s = n.lease, this.#n().descriptors[this.#t]?.outputRetention === "none" && (e.outputs = /* @__PURE__ */ new WeakMap()), this.#h({
|
|
149
149
|
status: "ready",
|
|
150
|
-
data: e.outputs.get(
|
|
150
|
+
data: e.outputs.get(n.lease),
|
|
151
151
|
error: void 0
|
|
152
|
-
}), this.#u(e, t,
|
|
153
|
-
} catch (
|
|
154
|
-
throw this.#u(e, t,
|
|
152
|
+
}), this.#u(e, t, r), e.prerequisite.assertCurrent(t, n), n;
|
|
153
|
+
} catch (n) {
|
|
154
|
+
throw this.#u(e, t, r), this.#i === e && this.#n().runtime === t && c.getSnapshot() === l && this.#h({
|
|
155
155
|
status: "error",
|
|
156
156
|
data: void 0,
|
|
157
|
-
error:
|
|
158
|
-
}), this.#u(e, t,
|
|
157
|
+
error: n
|
|
158
|
+
}), this.#u(e, t, r), n;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
#m(
|
|
161
|
+
#m(t, r) {
|
|
162
162
|
return v.suspend(() => {
|
|
163
|
-
let
|
|
164
|
-
if (
|
|
165
|
-
let
|
|
166
|
-
this.#u(
|
|
167
|
-
let
|
|
168
|
-
if (
|
|
169
|
-
let
|
|
170
|
-
id:
|
|
163
|
+
let i = a(r.runtime)?.getSnapshot();
|
|
164
|
+
if (i === void 0) return v.fail(new n("connection-unavailable"));
|
|
165
|
+
let o = `setup_${t.key}_${++this.#o}`;
|
|
166
|
+
this.#u(t, r.runtime, r.client);
|
|
167
|
+
let s = t.owner?.subject;
|
|
168
|
+
if (s === void 0) throw new n("inactive");
|
|
169
|
+
let l = r.descriptors[this.#t]?.outputRetention === "none", d = !r.descriptors[this.#t] || r.descriptors[this.#t]?.clientHistory?.input === "omit", h = m({
|
|
170
|
+
id: o,
|
|
171
171
|
apiName: this.#e,
|
|
172
172
|
tag: this.#t,
|
|
173
|
-
input: d ? void 0 :
|
|
173
|
+
input: d ? void 0 : t.input,
|
|
174
174
|
...d ? { inputOmitted: !0 } : {},
|
|
175
|
-
...
|
|
176
|
-
},
|
|
175
|
+
...l ? { outputOmitted: !0 } : {}
|
|
176
|
+
}, s), g = () => {
|
|
177
177
|
try {
|
|
178
|
-
return this.#u(
|
|
178
|
+
return this.#u(t, r.runtime, r.client), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
return v.suspend(() => {
|
|
184
|
-
this.#u(
|
|
185
|
-
let e =
|
|
186
|
-
return
|
|
187
|
-
}).pipe(v.withSpan(`client.connectionSetup.${this.#t}`)).pipe(v.onExit((
|
|
188
|
-
if (this.#n().descriptors[this.#t]?.clientHistory?.input === "omit" &&
|
|
189
|
-
let e =
|
|
190
|
-
if (
|
|
184
|
+
this.#u(t, r.runtime, r.client);
|
|
185
|
+
let e = u(r.client, this.#t);
|
|
186
|
+
return c(e(t.input), t.key);
|
|
187
|
+
}).pipe(v.withSpan(`client.connectionSetup.${this.#t}`)).pipe(v.onExit((t) => v.sync(() => {
|
|
188
|
+
if (this.#n().descriptors[this.#t]?.clientHistory?.input === "omit" && p(this.#e, this.#t), y.isSuccess(t)) {
|
|
189
|
+
let e = l || this.#n().descriptors[this.#t]?.outputRetention === "none";
|
|
190
|
+
if (h.settle({
|
|
191
191
|
status: "success",
|
|
192
|
-
output: e ? void 0 :
|
|
192
|
+
output: e ? void 0 : t.value,
|
|
193
193
|
...e ? { outputOmitted: !0 } : {}
|
|
194
|
-
}), !
|
|
195
|
-
|
|
194
|
+
}), !g()) return;
|
|
195
|
+
r.errorBus.emitSuccess({
|
|
196
196
|
source: "mutation",
|
|
197
197
|
tag: this.#t
|
|
198
198
|
});
|
|
199
199
|
} else {
|
|
200
|
-
let
|
|
201
|
-
if (
|
|
200
|
+
let n = e(t.cause);
|
|
201
|
+
if (h.settle({
|
|
202
202
|
status: "error",
|
|
203
|
-
error:
|
|
204
|
-
}),
|
|
205
|
-
let e =
|
|
206
|
-
|
|
203
|
+
error: n
|
|
204
|
+
}), g() && !_.hasInterruptsOnly(t.cause)) {
|
|
205
|
+
let e = f(n, "handler");
|
|
206
|
+
r.errorBus.emit({
|
|
207
207
|
source: "mutation",
|
|
208
208
|
tag: this.#t,
|
|
209
|
-
error:
|
|
209
|
+
error: n,
|
|
210
210
|
kind: e,
|
|
211
211
|
outcome: e === "transport" ? "unknown" : "known"
|
|
212
212
|
});
|
|
@@ -214,12 +214,12 @@ var b = class {
|
|
|
214
214
|
}
|
|
215
215
|
})), v.flatMap((e) => v.try({
|
|
216
216
|
try: () => {
|
|
217
|
-
this.#u(
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
let
|
|
222
|
-
|
|
217
|
+
this.#u(t, r.runtime, r.client);
|
|
218
|
+
let o = a(r.runtime)?.getSnapshot();
|
|
219
|
+
if (o !== i || i.signal.aborted) throw new n("connection-changed");
|
|
220
|
+
l || this.#n().descriptors[this.#t]?.outputRetention === "none" ? t.outputs = /* @__PURE__ */ new WeakMap() : t.outputs.set(o, e);
|
|
221
|
+
let s = t.initialDelivery;
|
|
222
|
+
t.initialDelivery = void 0, s?.(e);
|
|
223
223
|
},
|
|
224
224
|
catch: (e) => e
|
|
225
225
|
})));
|
package/dist/createHooks.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useAction as e } from "./useAction.js";
|
|
2
|
+
import { useFormBinding as t } from "./useFormBinding.js";
|
|
3
|
+
import { useMutation as n } from "./useMutation.js";
|
|
4
|
+
import { useConnectionSetup as r } from "./useConnectionSetup.js";
|
|
5
|
+
import { useSubscription as i } from "./useSubscription.js";
|
|
6
6
|
// src/createHooks.ts
|
|
7
|
-
var a =
|
|
8
|
-
useSubscription: (t, n
|
|
9
|
-
useMutation: (
|
|
10
|
-
useConnectionSetup: (
|
|
11
|
-
useAction: (t) =>
|
|
12
|
-
useFormBinding: (
|
|
7
|
+
var a = i, o = (i) => ({
|
|
8
|
+
useSubscription: (e, t, n) => a(i, e, t, n),
|
|
9
|
+
useMutation: (e) => n(i, e),
|
|
10
|
+
useConnectionSetup: (e) => r(i, e),
|
|
11
|
+
useAction: (t) => e(i, t),
|
|
12
|
+
useFormBinding: (e, n) => t(i, e, n ?? {})
|
|
13
13
|
});
|
|
14
14
|
export { o as createHooks };
|
package/dist/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FORM_FLASH_SCRIPT_ID as
|
|
4
|
-
import { FORM_CAPTURE_FIELD as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
1
|
+
import { decodeFieldIssues as e, documentLocale as t, resolveValidationMessage as n, restrictToSchema as r, validateFields as i } from "./formBinding.js";
|
|
2
|
+
import { formDataToInput as a, recoverNativeFormValues as o } from "./formData.js";
|
|
3
|
+
import { FORM_FLASH_SCRIPT_ID as s } from "./formFlashId.js";
|
|
4
|
+
import { FORM_CAPTURE_FIELD as c, FORM_CAPTURE_META_NAME as l, FORM_KEY_FIELD as u, FORM_PATH_PREFIX as d, FORM_REDIRECT_FIELD as f, FORM_SOURCE_FIELD as p, encodeNativeFormCapture as m, formActionPath as h, formCaptureSource as g, formSourcePath as _, readFormCaptureSource as v } from "./formSource.js";
|
|
5
|
+
import { encodeFormRejection as y } from "./formRejection.js";
|
|
6
|
+
import { formField as b, formSections as x, schemaToColumns as S, schemaToFields as C } from "./schemaFields.js";
|
|
7
|
+
export { c as FORM_CAPTURE_FIELD, l as FORM_CAPTURE_META_NAME, s as FORM_FLASH_SCRIPT_ID, u as FORM_KEY_FIELD, d as FORM_PATH_PREFIX, f as FORM_REDIRECT_FIELD, p as FORM_SOURCE_FIELD, e as decodeFieldIssues, t as documentLocale, y as encodeFormRejection, m as encodeNativeFormCapture, h as formActionPath, g as formCaptureSource, a as formDataToInput, b as formField, x as formSections, _ as formSourcePath, v as readFormCaptureSource, o as recoverNativeFormValues, n as resolveValidationMessage, r as restrictToSchema, S as schemaToColumns, C as schemaToFields, i as validateFields };
|
package/dist/index.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { _resetFrameworkRuntimesWarning as e, _resetSsrDescriptors as t, registerSsrDescriptors as n, ssrClientProxy as r, ssrDescriptorsFor as i, ssrStubHandle as a, useFrameworkApi as o, useFrameworkRuntimes as s } from "./runtimeContext.js";
|
|
2
|
+
import { buildApiRuntime as c, makeProtocolOpenRecovery as l } from "./apiRuntime.js";
|
|
3
|
+
import { registerCellMerger as u, registeredCellMerger as d } from "./cellMerger.js";
|
|
4
4
|
import { stableKey as f } from "./stableKey.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { FrameworkRuntimesContext as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { freshIdempotencyKey as
|
|
26
|
-
import { MutationSerialExecutionError as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { FORM_FLASH_SCRIPT_ID as
|
|
34
|
-
import { FORM_CAPTURE_FIELD as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
5
|
+
import { startApiSupervisor as p } from "./apiSupervisor.js";
|
|
6
|
+
import { FrameworkRuntimesProvider as m } from "./provider.js";
|
|
7
|
+
import { LoadingSubscriptionCache as h, SubscriptionCache as g, supersedesConfirmedPatches as _ } from "./subscriptionCache.js";
|
|
8
|
+
import { applyStoreSeeds as v, clearStoreHistory as y, defineStore as b, definedStores as x, makeStoreSeedBag as S, resetStoreRegistryForTests as C, seedStore as w, setStoreSeedResolver as T, shallow as E, storeHistory as D, subscribeStoreHistory as O, travelToStoreState as k } from "./store.js";
|
|
9
|
+
import { browserStoreStorage as A, resetStoreStorageForTest as j, resolveStoreStorage as M, setStoreStorage as N } from "./storeStorage.js";
|
|
10
|
+
import { browserPlatform as P, capabilitiesOf as F, currentPlatform as I, definePlatform as L, installPlatform as R, isPlatformInstalled as z, isStandaloneDisplay as B, memoryTokenStore as V, refusingTokenStore as H, resetPlatformForTest as U, usePlatform as W, useShellExtension as G } from "./platform.js";
|
|
11
|
+
import { FrameworkRuntimesContext as K, isUnresolvedApi as q, unknownApiError as J } from "./frameworkRuntimesContext.js";
|
|
12
|
+
import { browserOnlineSource as Y } from "./onlineSource.js";
|
|
13
|
+
import { deepLinkHref as X, defineDeepLink as Z, dispatchDeepLink as Q, matchDeepLink as $, matchFirstDeepLink as ee, runDeepLink as te } from "./deepLink.js";
|
|
14
|
+
import { resolveByTag as ne } from "./tagWalk.js";
|
|
15
|
+
import { useSubscription as re } from "./useSubscription.js";
|
|
16
|
+
import { useRpcDeclared as ie } from "./rpcDeclared.js";
|
|
17
|
+
import { createHooks as ae } from "./createHooks.js";
|
|
18
|
+
import { applyPreloadSeeds as oe, makePreloadSeedBag as se, readPreloadedSeedOutcome as ce, readPreloadedSnapshot as le, resetPreloadSeeds as ue, seedPreloadedSubscription as de, seedPreloadedSubscriptionFailure as fe, setPreloadSeedResolver as pe } from "./preloadSeed.js";
|
|
19
|
+
import { usePreloadedSubscription as me } from "./usePreloadedSubscription.js";
|
|
20
|
+
import { useEvent as he } from "./useEvent.js";
|
|
21
|
+
import { runSequence as ge, sequence as _e } from "./sequence.js";
|
|
22
|
+
import { useSequence as ve } from "./useSequence.js";
|
|
23
|
+
import { getMutationNotifier as ye, setMutationNotifier as be, useMutation as xe } from "./useMutation.js";
|
|
24
|
+
import { useConnectionSetup as Se } from "./useConnectionSetup.js";
|
|
25
|
+
import { freshIdempotencyKey as Ce, withIdempotencyKey as we } from "./mutationIdentity.js";
|
|
26
|
+
import { MutationSerialExecutionError as Te } from "./mutationSerialExecution.js";
|
|
27
|
+
import { useAction as Ee } from "./useAction.js";
|
|
28
|
+
import { useRpcCaller as De } from "./useRpcCaller.js";
|
|
29
|
+
import { useUpload as Oe } from "./useUpload.js";
|
|
30
|
+
import { useTranscription as ke } from "./useTranscription.js";
|
|
31
|
+
import { useWorkflow as Ae, useWorkflowDomainEvents as je, useWorkflowEventDeliveries as Me, useWorkflowEvents as Ne, useWorkflowRun as Pe, useWorkflowRunEvents as Fe, useWorkflowRunSteps as Ie, useWorkflowRuns as Le, useWorkflowSignal as Re, useWorkflowUpdate as ze } from "./useWorkflow.js";
|
|
32
|
+
import { useWorkflowRunState as Be } from "./useWorkflowRunState.js";
|
|
33
|
+
import { FORM_FLASH_SCRIPT_ID as Ve } from "./formFlashId.js";
|
|
34
|
+
import { FORM_CAPTURE_FIELD as He, FORM_CAPTURE_META_NAME as Ue, FORM_KEY_FIELD as We, FORM_PATH_PREFIX as Ge, FORM_REDIRECT_FIELD as Ke, FORM_SOURCE_FIELD as qe, encodeNativeFormCapture as Je, formActionPath as Ye, formCaptureSource as Xe, formSourcePath as Ze, readFormCaptureSource as Qe } from "./formSource.js";
|
|
35
|
+
import { useAgentStream as $e } from "./useAgentStream.js";
|
|
36
|
+
import { resumableConsumeProgram as et, useResumableAgentStream as tt } from "./useResumableAgentStream.js";
|
|
37
|
+
import { useAgentChat as nt } from "./useAgentChat.js";
|
|
38
|
+
import { useAgent as rt } from "./useAgent.js";
|
|
39
|
+
import { useDataCopilot as it } from "./useDataCopilot.js";
|
|
40
|
+
import { useRefreshSubscription as at, useRefreshSubscriptions as ot } from "./useRefreshSubscriptions.js";
|
|
41
|
+
import { queryOnce as st } from "./query.js";
|
|
42
|
+
import { clearMutations as ct, getMutations as lt, omitMutationInputs as ut, omitMutationOutputs as dt, startMutation as ft, subscribeMutations as pt } from "./mutationsBus.js";
|
|
43
|
+
import { RpcErrorBus as mt } from "./rpcErrorBus.js";
|
|
44
|
+
import { isUnauthenticated as ht, wireAuthRefresh as gt } from "./authRefresh.js";
|
|
45
|
+
import { publishClientTrace as _t, publishClientTraceRefusal as vt, subscribeClientTraceRefusals as yt, subscribeClientTraces as bt } from "./traceBus.js";
|
|
46
|
+
import { publishClientError as xt, reportClientError as St, subscribeClientErrors as Ct } from "./clientErrorBus.js";
|
|
47
|
+
import { useOnRawRpcError as wt, useOnRpcError as Tt } from "./useOnRpcError.js";
|
|
48
|
+
import { useSubscriptionHealth as Et } from "./useSubscriptionHealth.js";
|
|
49
|
+
import { formField as Dt, formSections as Ot, schemaToColumns as kt, schemaToFields as At } from "./schemaFields.js";
|
|
50
|
+
import { RICH_TEXT_MARKS as jt, RICH_TEXT_MAX_NODES as Mt, RichTextDocument as Nt, emptyRichTextDocument as Pt, isRichTextDocument as Ft, isSafeHref as It, parseRichText as Lt, richTextToPlainText as Rt, serializeRichText as zt } from "./richText.js";
|
|
51
|
+
import { decodeFieldIssues as Bt, documentLocale as Vt, resolveValidationMessage as Ht, restrictToSchema as Ut, validateFields as Wt } from "./formBinding.js";
|
|
52
|
+
import { formDataToInput as Gt, recoverNativeFormValues as Kt } from "./formData.js";
|
|
53
|
+
import { encodeFormRejection as qt } from "./formRejection.js";
|
|
54
|
+
import { ServerRequestContext as Jt, ServerRequestProvider as Yt, useFormCapture as Xt, useFormFlash as Zt, useServerRequest as Qt } from "./serverRequest.js";
|
|
55
|
+
import { globalContext as $t } from "./globalContext.js";
|
|
56
|
+
import { FormBindingProvider as en, useFormBinding as tn, useFormBindingContext as nn, useFormField as rn, useSchemaFormBinding as an } from "./useFormBinding.js";
|
|
57
|
+
import { ValidationMessagesProvider as on, useValidationMessages as sn } from "./validationMessages.js";
|
|
58
|
+
import { rowsToOptions as cn, useQueryField as ln } from "./useQueryField.js";
|
|
59
|
+
import { useDataTable as un } from "./useDataTable.js";
|
|
60
|
+
import { provenanceUrl as dn, useProvenance as fn } from "./useProvenance.js";
|
|
61
|
+
import { decideAccess as pn, deriveEntityAdmins as mn, manifestUrl as hn, openAccessReason as gn, requiredScopes as _n, useAccessDecision as vn, useCapabilityManifest as yn } from "./useCapabilityManifest.js";
|
|
62
|
+
import { useUndo as bn } from "./useUndo.js";
|
|
63
|
+
import { UNDO_APPLY_TAG as xn, UNDO_LOG_TAG as Sn, UNDO_REDO_TAG as Cn, useUndoLog as wn } from "./useUndoLog.js";
|
|
64
|
+
import { defineTracking as Tn, resolveTrackingEvent as En, useTracking as Dn, wrapTrackedCallbacks as On } from "./tracking.js";
|
|
65
|
+
import { useFormSkeleton as kn, useTableSkeleton as An } from "./useSkeleton.js";
|
|
66
|
+
import { shallowArrayEqual as jn, sourceValues as Mn, useDerived as Nn } from "./useDerived.js";
|
|
67
|
+
import { ADMIN_SCOPE as Pn, PermissionProvider as Fn, canCall as In, canCallAny as Ln, useCan as Rn, useCanAny as zn, usePermissions as Bn } from "./permissions.js";
|
|
68
|
+
import { useResourceCan as Vn, useResourceCans as Hn } from "./useResourceCan.js";
|
|
69
|
+
import { filtersFromSchema as Un, useQueryFilters as Wn } from "./filters.js";
|
|
70
|
+
import { useRecord as Gn } from "./useRecord.js";
|
|
71
|
+
import { useAsyncValidation as Kn, useDebounced as qn, validationStatus as Jn } from "./validation.js";
|
|
72
|
+
import { createAnalytics as Yn, defineEvent as Xn, eventCatalog as Zn, validateEventPayload as Qn } from "./analyticsCatalog.js";
|
|
73
|
+
import { usePreview as $n } from "./usePreview.js";
|
|
74
|
+
import { clearSent as er, defaultOutboxRetryDelay as tr, enqueueEntry as nr, markConflict as rr, markFailed as ir, markSent as ar, replayable as or, resolveConflictEntry as sr, useOutbox as cr } from "./outbox.js";
|
|
75
|
+
import { OUTBOX_DB_NAME as lr, OUTBOX_SYNC_TAG as ur, drainOutboxInWorker as dr, drainOutboxOverHttp as fr, indexedDbOutboxPersistence as pr, rpcHttpOutcome as mr } from "./outboxHttp.js";
|
|
76
|
+
import { computeWindow as hr, useWindowedSubscription as gr } from "./useWindowedSubscription.js";
|
|
77
|
+
import { useConnectionStatus as _r } from "./useConnectionStatus.js";
|
|
78
|
+
import { INITIAL_RECOVERY_SNAPSHOT as vr, RecoveryCoordinator as yr, recoveryCoordinatorFor as br, resolveRecoveryOptions as xr } from "./recoveryCoordinator.js";
|
|
79
|
+
import { apiConnectivity as Sr } from "./apiConnectivity.js";
|
|
80
|
+
import { readApiOnline as Cr, subscribeApiOnline as wr, useApiOnline as Tr } from "./useApiOnline.js";
|
|
81
|
+
import { runLocalQuery as Er, useLocalQuery as Dr } from "./useLocalQuery.js";
|
|
82
|
+
import { clearClientDiagnostics as Or, clientDiagnosticsSnapshot as kr, disableClientDiagnosticsPersistence as Ar, enableClientDiagnosticsPersistence as jr, recordClientDiagnostic as Mr, subscribeClientDiagnostics as Nr } from "./clientDiagnostics.js";
|
|
83
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
84
|
import { makeApiRoleSocketTracker as Br, makeApiSocketTracker as Vr } from "./apiSocketTracker.js";
|
|
85
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
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";
|
|
87
87
|
// src/index.ts
|
|
88
88
|
var si = "framework-client";
|
|
89
|
-
export {
|
|
89
|
+
export { Pn 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, He as FORM_CAPTURE_FIELD, Ue as FORM_CAPTURE_META_NAME, Ve as FORM_FLASH_SCRIPT_ID, We as FORM_KEY_FIELD, Ge as FORM_PATH_PREFIX, Ke as FORM_REDIRECT_FIELD, qe as FORM_SOURCE_FIELD, en as FormBindingProvider, K as FrameworkRuntimesContext, m as FrameworkRuntimesProvider, vr as INITIAL_RECOVERY_SNAPSHOT, h as LoadingSubscriptionCache, ni as MAX_WEBHOOK_INSPECT_OFFSET, Te as MutationSerialExecutionError, lr as OUTBOX_DB_NAME, ur as OUTBOX_SYNC_TAG, Ur as PAIRING_HOST, Wr as PAIRING_SCHEME, Gr as PAIRING_STORAGE_KEY, Fn as PermissionProvider, jt as RICH_TEXT_MARKS, Mt as RICH_TEXT_MAX_NODES, yr as RecoveryCoordinator, Nt as RichTextDocument, mt as RpcErrorBus, Jt as ServerRequestContext, Yt as ServerRequestProvider, g as SubscriptionCache, xn as UNDO_APPLY_TAG, Sn as UNDO_LOG_TAG, Cn as UNDO_REDO_TAG, on as ValidationMessagesProvider, e as _resetFrameworkRuntimesWarning, t as _resetSsrDescriptors, Sr as apiConnectivity, Kr as applyPairing, oe as applyPreloadSeeds, v as applyStoreSeeds, Y as browserOnlineSource, P as browserPlatform, A as browserStoreStorage, c as buildApiRuntime, In as canCall, Ln as canCallAny, F as capabilitiesOf, Or as clearClientDiagnostics, ct as clearMutations, qr as clearPairing, er as clearSent, y as clearStoreHistory, kr as clientDiagnosticsSnapshot, hr as computeWindow, Yn as createAnalytics, ae as createHooks, I as currentPlatform, pn as decideAccess, Bt as decodeFieldIssues, X as deepLinkHref, tr as defaultOutboxRetryDelay, Z as defineDeepLink, Xn as defineEvent, L as definePlatform, b as defineStore, Tn as defineTracking, x as definedStores, mn as deriveEntityAdmins, Ar as disableClientDiagnosticsPersistence, Q as dispatchDeepLink, Vt as documentLocale, dr as drainOutboxInWorker, fr as drainOutboxOverHttp, Pt as emptyRichTextDocument, jr as enableClientDiagnosticsPersistence, qt as encodeFormRejection, Je as encodeNativeFormCapture, nr as enqueueEntry, Jr as errorMessage, Yr as errorTag, Zn as eventCatalog, Un as filtersFromSchema, Ye as formActionPath, Xe as formCaptureSource, Gt as formDataToInput, Dt as formField, Ot as formSections, Ze as formSourcePath, Ce as freshIdempotencyKey, ye as getMutationNotifier, lt as getMutations, $t as globalContext, pr as indexedDbOutboxPersistence, R as installPlatform, z as isPlatformInstalled, Ft as isRichTextDocument, It as isSafeHref, B as isStandaloneDisplay, ht as isUnauthenticated, q as isUnresolvedApi, ri as isWebhookEventActivity, ii as isWebhookInspectActivityStatus, ai as isWebhookInspectPagination, Xr as jsonSchemaDocumentOf, Zr as jsonSchemaOf, Br as makeApiRoleSocketTracker, Vr as makeApiSocketTracker, se as makePreloadSeedBag, l as makeProtocolOpenRecovery, S as makeStoreSeedBag, hn as manifestUrl, rr as markConflict, ir as markFailed, ar as markSent, $ as matchDeepLink, ee as matchFirstDeepLink, V as memoryTokenStore, ut as omitMutationInputs, dt as omitMutationOutputs, gn as openAccessReason, Qr as pairingLink, $r as parsePairingLink, Lt as parseRichText, dn as provenanceUrl, xt as publishClientError, _t as publishClientTrace, vt as publishClientTraceRefusal, st as queryOnce, Cr as readApiOnline, Qe as readFormCaptureSource, ei as readPairing, ce as readPreloadedSeedOutcome, le as readPreloadedSnapshot, Mr as recordClientDiagnostic, Kt as recoverNativeFormValues, br as recoveryCoordinatorFor, H as refusingTokenStore, u as registerCellMerger, n as registerSsrDescriptors, d as registeredCellMerger, or as replayable, St as reportClientError, _n as requiredScopes, U as resetPlatformForTest, ue as resetPreloadSeeds, C as resetStoreRegistryForTests, j as resetStoreStorageForTest, ne as resolveByTag, sr as resolveConflictEntry, xr as resolveRecoveryOptions, M as resolveStoreStorage, En as resolveTrackingEvent, Ht as resolveValidationMessage, Ut as restrictToSchema, et as resumableConsumeProgram, Rt as richTextToPlainText, cn as rowsToOptions, mr as rpcHttpOutcome, te as runDeepLink, Er as runLocalQuery, ge as runSequence, kt as schemaToColumns, At as schemaToFields, de as seedPreloadedSubscription, fe as seedPreloadedSubscriptionFailure, w as seedStore, _e as sequence, zt as serializeRichText, be as setMutationNotifier, pe as setPreloadSeedResolver, T as setStoreSeedResolver, N as setStoreStorage, E as shallow, jn as shallowArrayEqual, Mn as sourceValues, r as ssrClientProxy, i as ssrDescriptorsFor, a as ssrStubHandle, f as stableKey, p as startApiSupervisor, ft as startMutation, D as storeHistory, wr as subscribeApiOnline, Nr as subscribeClientDiagnostics, Ct as subscribeClientErrors, yt as subscribeClientTraceRefusals, bt as subscribeClientTraces, pt as subscribeMutations, O as subscribeStoreHistory, _ as supersedesConfirmedPatches, k as travelToStoreState, J as unknownApiError, vn as useAccessDecision, Ee as useAction, rt as useAgent, nt as useAgentChat, $e as useAgentStream, Tr as useApiOnline, Kn as useAsyncValidation, Rn as useCan, zn as useCanAny, yn as useCapabilityManifest, Rr as useConnection, Se as useConnectionSetup, _r as useConnectionStatus, zr as useConnections, it as useDataCopilot, un as useDataTable, qn as useDebounced, Nn as useDerived, he as useEvent, tn as useFormBinding, nn as useFormBindingContext, Xt as useFormCapture, rn as useFormField, Zt as useFormFlash, kn as useFormSkeleton, o as useFrameworkApi, s as useFrameworkRuntimes, Dr as useLocalQuery, xe as useMutation, wt as useOnRawRpcError, Tt as useOnRpcError, cr as useOutbox, Bn as usePermissions, W as usePlatform, me as usePreloadedSubscription, $n as usePreview, fn as useProvenance, ln as useQueryField, Wn as useQueryFilters, Gn as useRecord, at as useRefreshSubscription, ot as useRefreshSubscriptions, Vn as useResourceCan, Hn as useResourceCans, tt as useResumableAgentStream, De as useRpcCaller, ie as useRpcDeclared, an as useSchemaFormBinding, ve as useSequence, Qt as useServerRequest, G as useShellExtension, re as useSubscription, Et as useSubscriptionHealth, An as useTableSkeleton, Dn as useTracking, ke as useTranscription, bn as useUndo, wn as useUndoLog, Oe as useUpload, sn as useValidationMessages, gr as useWindowedSubscription, Ae as useWorkflow, je as useWorkflowDomainEvents, Me as useWorkflowEventDeliveries, Ne as useWorkflowEvents, Pe as useWorkflowRun, Fe as useWorkflowRunEvents, Be as useWorkflowRunState, Ie as useWorkflowRunSteps, Le as useWorkflowRuns, Re as useWorkflowSignal, ze as useWorkflowUpdate, Qn as validateEventPayload, Wt as validateFields, Jn as validationStatus, oi as webhookInspectListRequest, gt as wireAuthRefresh, we as withIdempotencyKey, On as wrapTrackedCallbacks };
|