@voltro/protocol 0.63.0 → 0.64.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 +90 -0
- package/dist/index.d.ts +355 -23
- package/dist/index.js +503 -451
- package/dist/rest.d.ts +4 -1
- package/dist/rest.js +13 -13
- package/dist/{scopes-B0kGvAnI.js → scopes-D9t3tYc7.js} +98 -69
- package/dist/{serverErrorBus-BeN9pOpY.js → serverErrorBus-QQgyq6fV.js} +15 -7
- package/dist/session.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as ee, L as te, M as ne, N as c, O as re, P as ie, R as ae, S as oe, T as se, U as ce, V as le, W as ue, _ as de, a as l, b as fe, c as pe, d as me, f as he, g as ge, h as u, i as _e, j as ve, k as ye, l as be, m as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe, v as d, w as ke, x as Ae, y as je, z as Me } from "./scopes-
|
|
2
|
-
import { a as Ne, c as Pe, i as Fe, n as Ie, o as Le, r as Re, s as ze, t as Be } from "./serverErrorBus-
|
|
3
|
-
import { Context as
|
|
4
|
-
import { Rpc as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as ee, L as te, M as ne, N as c, O as re, P as ie, R as ae, S as oe, T as se, U as ce, V as le, W as ue, _ as de, a as l, b as fe, c as pe, d as me, f as he, g as ge, h as u, i as _e, j as ve, k as ye, l as be, m as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe, v as d, w as ke, x as Ae, y as je, z as Me } from "./scopes-D9t3tYc7.js";
|
|
2
|
+
import { a as Ne, c as Pe, i as f, l as Fe, n as Ie, o as Le, r as Re, s as ze, t as Be, u as Ve } from "./serverErrorBus-QQgyq6fV.js";
|
|
3
|
+
import { Context as He, Layer as Ue, Schema as p } from "effect";
|
|
4
|
+
import { Rpc as m } from "@effect/rpc";
|
|
5
|
+
import { VersionConflict as We } from "@voltro/database/wire";
|
|
5
6
|
//#region src/rowPatch.ts
|
|
6
|
-
var
|
|
7
|
-
key:
|
|
8
|
-
value:
|
|
9
|
-
}).pipe(
|
|
10
|
-
op:
|
|
11
|
-
path:
|
|
12
|
-
value:
|
|
13
|
-
}),
|
|
14
|
-
op:
|
|
15
|
-
path:
|
|
16
|
-
value:
|
|
17
|
-
}),
|
|
18
|
-
op:
|
|
19
|
-
path:
|
|
20
|
-
}),
|
|
21
|
-
op:
|
|
22
|
-
path:
|
|
23
|
-
value:
|
|
24
|
-
key:
|
|
25
|
-
value:
|
|
7
|
+
var Ge = p.Union(p.String, p.Number), h = p.Record({
|
|
8
|
+
key: p.String,
|
|
9
|
+
value: p.Unknown
|
|
10
|
+
}).pipe(p.filter((e) => "id" in e, { message: () => "patch row must carry an id" })), g = p.Union(p.Struct({
|
|
11
|
+
op: p.Literal("add"),
|
|
12
|
+
path: p.String,
|
|
13
|
+
value: h
|
|
14
|
+
}), p.Struct({
|
|
15
|
+
op: p.Literal("replace"),
|
|
16
|
+
path: p.String,
|
|
17
|
+
value: h
|
|
18
|
+
}), p.Struct({
|
|
19
|
+
op: p.Literal("remove"),
|
|
20
|
+
path: p.String
|
|
21
|
+
}), p.Struct({
|
|
22
|
+
op: p.Literal("mergeCells"),
|
|
23
|
+
path: p.String,
|
|
24
|
+
value: p.Record({
|
|
25
|
+
key: p.String,
|
|
26
|
+
value: p.Unknown
|
|
26
27
|
})
|
|
27
|
-
})),
|
|
28
|
-
ops:
|
|
29
|
-
order:
|
|
30
|
-
}),
|
|
28
|
+
})), _ = p.Struct({
|
|
29
|
+
ops: p.Array(g),
|
|
30
|
+
order: p.Array(Ge)
|
|
31
|
+
}), v = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`, y = (e) => (e.startsWith("/") ? e.slice(1) : e).replace(/~1/g, "/").replace(/~0/g, "~"), b = (e) => {
|
|
31
32
|
let t = Object.keys(e).sort(), n = {};
|
|
32
33
|
for (let r of t) n[r] = e[r];
|
|
33
34
|
return JSON.stringify(n);
|
|
34
|
-
},
|
|
35
|
+
}, x = (e, t) => b(e) === b(t), Ke = (e, t) => {
|
|
35
36
|
if (e instanceof Uint8Array && t instanceof Uint8Array) {
|
|
36
37
|
if (e.length !== t.length) return !1;
|
|
37
38
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
38
39
|
return !0;
|
|
39
40
|
}
|
|
40
|
-
return
|
|
41
|
+
return b({
|
|
41
42
|
id: 0,
|
|
42
43
|
v: e
|
|
43
|
-
}) ===
|
|
44
|
+
}) === b({
|
|
44
45
|
id: 0,
|
|
45
46
|
v: t
|
|
46
47
|
});
|
|
@@ -69,29 +70,29 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
69
70
|
let t = r.get(e.id);
|
|
70
71
|
if (t === void 0) i.push({
|
|
71
72
|
op: "add",
|
|
72
|
-
path:
|
|
73
|
+
path: v(e.id),
|
|
73
74
|
value: e
|
|
74
75
|
});
|
|
75
|
-
else if (!
|
|
76
|
+
else if (!x(t, e)) {
|
|
76
77
|
let n = ee(t, e);
|
|
77
78
|
n === void 0 ? i.push({
|
|
78
79
|
op: "replace",
|
|
79
|
-
path:
|
|
80
|
+
path: v(e.id),
|
|
80
81
|
value: e
|
|
81
|
-
}) : (
|
|
82
|
+
}) : (x(Object.fromEntries(Object.entries(t).filter(([e]) => !s.columns.has(e))), n.scalars) || i.push({
|
|
82
83
|
op: "replace",
|
|
83
|
-
path:
|
|
84
|
+
path: v(e.id),
|
|
84
85
|
value: n.scalars
|
|
85
86
|
}), i.push({
|
|
86
87
|
op: "mergeCells",
|
|
87
|
-
path:
|
|
88
|
+
path: v(e.id),
|
|
88
89
|
value: n.merges
|
|
89
90
|
}));
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
for (let t of e) o.has(t.id) || i.push({
|
|
93
94
|
op: "remove",
|
|
94
|
-
path:
|
|
95
|
+
path: v(t.id)
|
|
95
96
|
});
|
|
96
97
|
return {
|
|
97
98
|
ops: i,
|
|
@@ -105,7 +106,7 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
105
106
|
for (let t of e) r.set(t.id, t);
|
|
106
107
|
for (let e of t.ops) {
|
|
107
108
|
if (e.op === "mergeCells") {
|
|
108
|
-
let t =
|
|
109
|
+
let t = y(e.path), i = r.get(t) ?? r.get(Number(t)), a = r.has(t) ? t : Number(t);
|
|
109
110
|
if (i === void 0) continue;
|
|
110
111
|
let o = { ...i };
|
|
111
112
|
for (let [t, r] of Object.entries(e.value)) o[t] = n.mergeCell === void 0 ? r : n.mergeCell(t, i[t], r);
|
|
@@ -120,56 +121,56 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
120
121
|
t !== void 0 && i.push(t);
|
|
121
122
|
}
|
|
122
123
|
return i;
|
|
123
|
-
},
|
|
124
|
-
_tag:
|
|
125
|
-
revision:
|
|
124
|
+
}, S = (e) => p.Union(p.Struct({
|
|
125
|
+
_tag: p.Literal("snapshot"),
|
|
126
|
+
revision: p.Number,
|
|
126
127
|
data: e,
|
|
127
|
-
computed:
|
|
128
|
-
}),
|
|
129
|
-
_tag:
|
|
130
|
-
revision:
|
|
131
|
-
emittedAt:
|
|
132
|
-
patch:
|
|
133
|
-
}),
|
|
134
|
-
_tag:
|
|
135
|
-
error:
|
|
136
|
-
revision:
|
|
137
|
-
})),
|
|
128
|
+
computed: p.optional(p.Boolean)
|
|
129
|
+
}), p.Struct({
|
|
130
|
+
_tag: p.Literal("delta"),
|
|
131
|
+
revision: p.Number,
|
|
132
|
+
emittedAt: p.Number,
|
|
133
|
+
patch: _
|
|
134
|
+
}), p.Struct({
|
|
135
|
+
_tag: p.Literal("error"),
|
|
136
|
+
error: p.Unknown,
|
|
137
|
+
revision: p.optional(p.Number)
|
|
138
|
+
})), C = (e, t) => {
|
|
138
139
|
let n = `${e ?? "this procedure"} input`;
|
|
139
140
|
return t === !0 ? `${n} (guarded — the guard did NOT run: the payload failed to decode first, so this says nothing about access)` : n;
|
|
140
141
|
}, Xe = (e) => {
|
|
141
142
|
let t = e.ast;
|
|
142
143
|
return t._tag === "TypeLiteral" && (t.propertySignatures?.length ?? 0) === 0 && (t.indexSignatures?.length ?? 0) === 0;
|
|
143
|
-
},
|
|
144
|
-
let r =
|
|
144
|
+
}, w = (e, t, n) => {
|
|
145
|
+
let r = C(t, n), i = e.annotations({
|
|
145
146
|
parseOptions: { onExcessProperty: "error" },
|
|
146
147
|
parseIssueTitle: () => r
|
|
147
148
|
});
|
|
148
|
-
return Xe(e) ?
|
|
149
|
-
},
|
|
150
|
-
rule:
|
|
151
|
-
params:
|
|
152
|
-
key:
|
|
153
|
-
value:
|
|
149
|
+
return Xe(e) ? p.filter((e) => typeof e == "object" && e && Object.keys(e).length > 0 ? `this procedure declares no input; received: ${Object.keys(e).join(", ")}` : void 0)(i).annotations({ identifier: r }) : i;
|
|
150
|
+
}, T = class extends p.TaggedError()("BusinessRuleViolation", {
|
|
151
|
+
rule: p.String,
|
|
152
|
+
params: p.optional(p.Record({
|
|
153
|
+
key: p.String,
|
|
154
|
+
value: p.Unknown
|
|
154
155
|
})),
|
|
155
|
-
field:
|
|
156
|
-
message:
|
|
157
|
-
severity:
|
|
158
|
-
}) {},
|
|
159
|
-
field:
|
|
160
|
-
message:
|
|
161
|
-
params:
|
|
162
|
-
key:
|
|
163
|
-
value:
|
|
156
|
+
field: p.optional(p.String),
|
|
157
|
+
message: p.optional(p.String),
|
|
158
|
+
severity: p.Literal("error", "warning")
|
|
159
|
+
}) {}, E = p.Struct({
|
|
160
|
+
field: p.String,
|
|
161
|
+
message: p.String,
|
|
162
|
+
params: p.optional(p.Record({
|
|
163
|
+
key: p.String,
|
|
164
|
+
value: p.Unknown
|
|
164
165
|
}))
|
|
165
|
-
}),
|
|
166
|
-
field:
|
|
167
|
-
message:
|
|
168
|
-
params:
|
|
169
|
-
key:
|
|
170
|
-
value:
|
|
166
|
+
}), D = class extends p.TaggedError()("ValidationError", {
|
|
167
|
+
field: p.String,
|
|
168
|
+
message: p.String,
|
|
169
|
+
params: p.optional(p.Record({
|
|
170
|
+
key: p.String,
|
|
171
|
+
value: p.Unknown
|
|
171
172
|
}))
|
|
172
|
-
}) {},
|
|
173
|
+
}) {}, O = class extends p.TaggedError()("ValidationErrors", { issues: p.Array(E).pipe(p.minItems(1)) }) {}, Ze = (e) => {
|
|
173
174
|
if (typeof e != "object" || !e) return [];
|
|
174
175
|
let t = e._tag;
|
|
175
176
|
if (t === "ValidationError") {
|
|
@@ -195,69 +196,69 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
195
196
|
}];
|
|
196
197
|
}
|
|
197
198
|
return [];
|
|
198
|
-
},
|
|
199
|
-
approvalId:
|
|
200
|
-
procedure:
|
|
201
|
-
expiresAt:
|
|
202
|
-
requiredScopes:
|
|
203
|
-
reason:
|
|
204
|
-
created:
|
|
205
|
-
}) {},
|
|
206
|
-
approvalId:
|
|
207
|
-
subjectId:
|
|
208
|
-
}) {},
|
|
209
|
-
approvalId:
|
|
210
|
-
decidedBy:
|
|
211
|
-
note:
|
|
212
|
-
}) {},
|
|
213
|
-
approvalId:
|
|
214
|
-
expiredAt:
|
|
215
|
-
}) {},
|
|
216
|
-
approvalId:
|
|
217
|
-
status:
|
|
218
|
-
}) {},
|
|
219
|
-
approvalId:
|
|
220
|
-
required:
|
|
221
|
-
message:
|
|
222
|
-
}) {},
|
|
223
|
-
procedure:
|
|
224
|
-
message:
|
|
225
|
-
}) {},
|
|
226
|
-
id:
|
|
227
|
-
procedure:
|
|
228
|
-
kind:
|
|
229
|
-
requestedBy:
|
|
230
|
-
status:
|
|
231
|
-
reason:
|
|
232
|
-
requiredScopes:
|
|
233
|
-
requestedAt:
|
|
234
|
-
expiresAt:
|
|
235
|
-
decidedBy:
|
|
236
|
-
decidedAt:
|
|
237
|
-
note:
|
|
238
|
-
relation:
|
|
239
|
-
}),
|
|
199
|
+
}, Qe = class extends p.TaggedError()("ApprovalRequired", {
|
|
200
|
+
approvalId: p.String,
|
|
201
|
+
procedure: p.String,
|
|
202
|
+
expiresAt: p.String,
|
|
203
|
+
requiredScopes: p.Array(p.String),
|
|
204
|
+
reason: p.NullOr(p.String),
|
|
205
|
+
created: p.Boolean
|
|
206
|
+
}) {}, $e = class extends p.TaggedError()("ApprovalNotFound", { approvalId: p.String }) {}, et = class extends p.TaggedError()("ApprovalSelfApproval", {
|
|
207
|
+
approvalId: p.String,
|
|
208
|
+
subjectId: p.NullOr(p.String)
|
|
209
|
+
}) {}, tt = class extends p.TaggedError()("ApprovalRejected", {
|
|
210
|
+
approvalId: p.String,
|
|
211
|
+
decidedBy: p.NullOr(p.String),
|
|
212
|
+
note: p.NullOr(p.String)
|
|
213
|
+
}) {}, k = class extends p.TaggedError()("ApprovalExpired", {
|
|
214
|
+
approvalId: p.String,
|
|
215
|
+
expiredAt: p.String
|
|
216
|
+
}) {}, nt = class extends p.TaggedError()("ApprovalNotPending", {
|
|
217
|
+
approvalId: p.String,
|
|
218
|
+
status: p.String
|
|
219
|
+
}) {}, rt = class extends p.TaggedError()("ApprovalForbidden", {
|
|
220
|
+
approvalId: p.String,
|
|
221
|
+
required: p.NullOr(p.String),
|
|
222
|
+
message: p.String
|
|
223
|
+
}) {}, A = class extends p.TaggedError()("ApprovalUnavailable", {
|
|
224
|
+
procedure: p.String,
|
|
225
|
+
message: p.String
|
|
226
|
+
}) {}, it = p.Union(Qe, tt, k, A), at = p.Union($e, et, k, nt, rt, A), ot = p.Struct({
|
|
227
|
+
id: p.String,
|
|
228
|
+
procedure: p.String,
|
|
229
|
+
kind: p.Literal("mutation", "action"),
|
|
230
|
+
requestedBy: p.NullOr(p.String),
|
|
231
|
+
status: p.Literal("pending", "approved", "rejected", "expired", "consumed"),
|
|
232
|
+
reason: p.NullOr(p.String),
|
|
233
|
+
requiredScopes: p.Array(p.String),
|
|
234
|
+
requestedAt: p.String,
|
|
235
|
+
expiresAt: p.String,
|
|
236
|
+
decidedBy: p.NullOr(p.String),
|
|
237
|
+
decidedAt: p.NullOr(p.String),
|
|
238
|
+
note: p.NullOr(p.String),
|
|
239
|
+
relation: p.Literal("to-decide", "requested")
|
|
240
|
+
}), j = "channel:", st = Symbol.for("@voltro/protocol/reactivityChannels"), ct = globalThis, M = ct[st] ?? (ct[st] = /* @__PURE__ */ new Map()), lt = /^[a-z][a-z0-9-]*(\.[a-z0-9-]+)*$/, ut = (e) => {
|
|
240
241
|
if (!lt.test(e)) throw Error(`reactivityChannel('${e}'): invalid channel name.\n Use lowercase kebab segments separated by dots — \`presence\`, \`job-queue\`,
|
|
241
242
|
\`billing.usage\`. A \`:\` is refused because it is the namespace separator in
|
|
242
|
-
the routing key (\`${
|
|
243
|
+
the routing key (\`${j}<name>\`), and an uppercase letter is\n refused because a key that differs only by case reads as one channel and
|
|
243
244
|
routes as two.`);
|
|
244
|
-
let t =
|
|
245
|
+
let t = M.get(e);
|
|
245
246
|
if (t !== void 0) return t;
|
|
246
|
-
let n = `${
|
|
247
|
+
let n = `${j}${e}`, r = Object.freeze({
|
|
247
248
|
kind: "reactivity-channel",
|
|
248
249
|
name: e,
|
|
249
250
|
key: n,
|
|
250
251
|
toString: () => n
|
|
251
252
|
});
|
|
252
|
-
return
|
|
253
|
-
},
|
|
254
|
-
let t =
|
|
255
|
-
for (let r of e) for (let e of
|
|
253
|
+
return M.set(e, r), r;
|
|
254
|
+
}, dt = (e) => typeof e == "object" && !!e && e.kind === "reactivity-channel", ft = (e) => e.startsWith(j), pt = () => new Set([...M.values()].map((e) => e.key)), N = (e) => dt(e) ? e.key : e, mt = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map(N) : [N(e)], ht = (e) => e === void 0 ? void 0 : Array.isArray(e) ? e.map(N) : N(e), gt = (e) => {
|
|
255
|
+
let t = pt(), n = [];
|
|
256
|
+
for (let r of e) for (let e of mt(r.source)) !ft(e) || t.has(e) || n.push({
|
|
256
257
|
procedure: r.name,
|
|
257
258
|
key: e
|
|
258
259
|
});
|
|
259
260
|
return n;
|
|
260
|
-
},
|
|
261
|
+
}, _t = (e, t) => {
|
|
261
262
|
let n = e?.injectExternalChange;
|
|
262
263
|
return n !== void 0 && (n.call(e, {
|
|
263
264
|
table: t.key,
|
|
@@ -266,8 +267,8 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
266
267
|
old: {},
|
|
267
268
|
origin: "inline"
|
|
268
269
|
}), !0);
|
|
269
|
-
},
|
|
270
|
-
if (
|
|
270
|
+
}, vt = (e) => e.internal !== !0, P = (e) => {
|
|
271
|
+
if (yt(e), Array.isArray(e.guards) && e.guards.length === 0) throw Error(`${e.name}: \`guards: []\` is empty, so it enforces nothing — but it reads\n at the call site as if this procedure were protected. Omit the field for an
|
|
271
272
|
unguarded procedure, or list the scopes required to call it.`);
|
|
272
273
|
let t = typeof e.source == "string" ? [e.source] : Array.isArray(e.source) ? e.source : void 0;
|
|
273
274
|
if (t !== void 0 && (t.length === 0 || t.some((e) => String(e).trim() === ""))) throw Error(`${e.name}: \`source\` is empty, so this query declares reactivity and\n subscribes to nothing — it serves one snapshot and never updates again,
|
|
@@ -284,7 +285,7 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
284
285
|
let n = [e.publicApi === void 0 ? void 0 : "publicApi", e.exposeAsTool === void 0 ? void 0 : "exposeAsTool"].filter((e) => e !== void 0);
|
|
285
286
|
if (n.length === 0) return e;
|
|
286
287
|
throw Error(`${e.name}: \`internal: true\` cannot be combined with ${n.map((e) => `\`${e}\``).join(" or ")}. \`internal\` takes the procedure OFF the wire; those put it back ON a different one (${n.includes("publicApi") ? "a REST route" : "an agent tool"}), and that surface is projected without consulting the flag — so the procedure would be unreachable from your client and reachable from the internet. Drop \`internal: true\` if the wider surface is intended, or remove the ${n.join(" / ")} annotation if it is not.`);
|
|
287
|
-
},
|
|
288
|
+
}, yt = (e) => {
|
|
288
289
|
let t = e.requiresApproval;
|
|
289
290
|
if (t !== void 0) {
|
|
290
291
|
if (!Array.isArray(t.approvers) || t.approvers.length === 0) throw Error(`${e.name}: \`requiresApproval.approvers\` is empty, so NOBODY can approve this\n procedure and every call would park forever. Name the scope(s) an approver must hold
|
|
@@ -294,48 +295,48 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
294
295
|
human from every other, and the second-pair-of-eyes control would enforce nothing.
|
|
295
296
|
Give the procedure a \`guards:\` decision, or drop \`requiresApproval\`.`);
|
|
296
297
|
}
|
|
297
|
-
},
|
|
298
|
+
}, bt = (e) => e.action !== void 0 && e.resourceType !== void 0, xt = (e) => e.openAccess !== void 0 || e.guards !== void 0 && e.guards.length > 0, F = (e, t, n) => {
|
|
298
299
|
if (n === void 0) return t;
|
|
299
300
|
if (n.trim() === "") throw Error(`${e}: \`openAccess\` needs a REASON, not an empty string. It is the sentence a\n reviewer reads to decide whether this procedure should really be callable
|
|
300
301
|
without an authorization check — e.g. \`openAccess: 'public pricing, no caller data'\`.`);
|
|
301
302
|
if (t !== void 0 && t.length > 0) throw Error(`${e}: \`openAccess\` and \`guards\` are two different access decisions, so\n declaring both says the procedure is protected AND open. Keep the guards if a
|
|
302
303
|
caller must hold a scope; drop them if anyone may call it.`);
|
|
303
304
|
return [d(n.trim())];
|
|
304
|
-
},
|
|
305
|
+
}, I = (e) => P({
|
|
305
306
|
kind: "query",
|
|
306
307
|
name: e.name,
|
|
307
308
|
input: e.input,
|
|
308
309
|
output: e.output,
|
|
309
|
-
error: e.error ??
|
|
310
|
-
source:
|
|
310
|
+
error: e.error ?? p.Never,
|
|
311
|
+
source: ht(e.source),
|
|
311
312
|
cache: e.cache,
|
|
312
|
-
guards:
|
|
313
|
+
guards: F(e.name, e.guards, e.openAccess),
|
|
313
314
|
openAccess: e.openAccess,
|
|
314
315
|
publicApi: e.publicApi,
|
|
315
316
|
exposeAsTool: e.exposeAsTool,
|
|
316
317
|
internal: e.internal,
|
|
317
318
|
overridesPlugin: e.overridesPlugin
|
|
318
|
-
}),
|
|
319
|
+
}), L = (e) => P({
|
|
319
320
|
kind: "mutation",
|
|
320
321
|
name: e.name,
|
|
321
322
|
input: e.input,
|
|
322
323
|
output: e.output,
|
|
323
|
-
error: e.error ??
|
|
324
|
+
error: e.error ?? p.Never,
|
|
324
325
|
target: e.target,
|
|
325
|
-
guards:
|
|
326
|
+
guards: F(e.name, e.guards, e.openAccess),
|
|
326
327
|
openAccess: e.openAccess,
|
|
327
328
|
publicApi: e.publicApi,
|
|
328
329
|
exposeAsTool: e.exposeAsTool,
|
|
329
330
|
requiresApproval: e.requiresApproval,
|
|
330
331
|
internal: e.internal,
|
|
331
332
|
overridesPlugin: e.overridesPlugin
|
|
332
|
-
}),
|
|
333
|
+
}), R = (e) => P({
|
|
333
334
|
kind: "action",
|
|
334
335
|
name: e.name,
|
|
335
336
|
input: e.input,
|
|
336
337
|
output: e.output,
|
|
337
|
-
error: e.error ??
|
|
338
|
-
guards:
|
|
338
|
+
error: e.error ?? p.Never,
|
|
339
|
+
guards: F(e.name, e.guards, e.openAccess),
|
|
339
340
|
openAccess: e.openAccess,
|
|
340
341
|
source: e.source,
|
|
341
342
|
target: e.target,
|
|
@@ -344,53 +345,53 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
344
345
|
requiresApproval: e.requiresApproval,
|
|
345
346
|
internal: e.internal,
|
|
346
347
|
overridesPlugin: e.overridesPlugin
|
|
347
|
-
}),
|
|
348
|
+
}), St = (e) => P({
|
|
348
349
|
kind: "stream",
|
|
349
350
|
name: e.name,
|
|
350
351
|
input: e.input,
|
|
351
352
|
element: e.element,
|
|
352
|
-
error: e.error ??
|
|
353
|
+
error: e.error ?? p.Never,
|
|
353
354
|
internal: e.internal,
|
|
354
355
|
overridesPlugin: e.overridesPlugin,
|
|
355
|
-
guards:
|
|
356
|
+
guards: F(e.name, e.guards, e.openAccess),
|
|
356
357
|
openAccess: e.openAccess
|
|
357
|
-
}),
|
|
358
|
+
}), z = (e, t) => t && t.length > 0 ? p.Union(e, ...t) : e, B = (e) => e !== void 0 && e.some((e) => !u(e)), Ct = (e, t) => B(t) ? p.Union(e, l, c) : e, wt = (e) => p.Union(e, T), Tt = (e) => p.Union(e, D, O), Et = (e, t) => t === void 0 ? e : p.Union(e, it), V = (e, t) => {
|
|
358
359
|
if (t === "stream") return e.error;
|
|
359
|
-
let n =
|
|
360
|
-
return t === "query" ? n :
|
|
361
|
-
},
|
|
360
|
+
let n = Ct(e.error, e.guards);
|
|
361
|
+
return t === "query" ? n : Et(Tt(t === "mutation" ? p.Union(wt(n), f, We) : n), e.requiresApproval);
|
|
362
|
+
}, Dt = (e, t) => z(Ct(e.errorSchema, e.guards), t), Ot = (e, t) => ({
|
|
362
363
|
...e,
|
|
363
364
|
name: t
|
|
364
|
-
}),
|
|
365
|
-
payload:
|
|
366
|
-
success:
|
|
367
|
-
error: V(
|
|
365
|
+
}), kt = (e, t) => m.make(e.name, {
|
|
366
|
+
payload: w(e.input, e.name, B(e.guards)),
|
|
367
|
+
success: S(e.output),
|
|
368
|
+
error: z(V(e, "query"), t),
|
|
368
369
|
stream: !0
|
|
369
|
-
}),
|
|
370
|
-
payload:
|
|
370
|
+
}), At = (e, t) => m.make(e.name, {
|
|
371
|
+
payload: w(e.input, e.name, B(e.guards)),
|
|
371
372
|
success: e.output,
|
|
372
|
-
error: V(
|
|
373
|
-
}),
|
|
374
|
-
payload:
|
|
373
|
+
error: z(V(e, "mutation"), t)
|
|
374
|
+
}), jt = (e, t) => m.make(e.name, {
|
|
375
|
+
payload: w(e.input, e.name, B(e.guards)),
|
|
375
376
|
success: e.output,
|
|
376
|
-
error: V(
|
|
377
|
-
}),
|
|
378
|
-
payload:
|
|
377
|
+
error: z(V(e, "action"), t)
|
|
378
|
+
}), Mt = (e, t) => m.make(e.name, {
|
|
379
|
+
payload: w(e.input, e.name, B(e.guards)),
|
|
379
380
|
success: e.element,
|
|
380
|
-
error:
|
|
381
|
+
error: z(e.error, t),
|
|
381
382
|
stream: !0
|
|
382
|
-
}),
|
|
383
|
+
}), Nt = (e) => {
|
|
383
384
|
if (typeof e != "object" || !e) return;
|
|
384
385
|
let t = e._tag;
|
|
385
386
|
return typeof t == "string" ? t : void 0;
|
|
386
|
-
},
|
|
387
|
+
}, Pt = (e) => {
|
|
387
388
|
switch (e.kind) {
|
|
388
|
-
case "query": return
|
|
389
|
-
case "mutation": return
|
|
390
|
-
case "action": return
|
|
391
|
-
case "stream": return
|
|
389
|
+
case "query": return kt(e);
|
|
390
|
+
case "mutation": return At(e);
|
|
391
|
+
case "action": return jt(e);
|
|
392
|
+
case "stream": return Mt(e);
|
|
392
393
|
}
|
|
393
|
-
},
|
|
394
|
+
}, Ft = (e) => {
|
|
394
395
|
let t = e.input, n = t === void 0 ? {} : { input: t }, r = e.output, i = r === void 0 ? {} : { output: r };
|
|
395
396
|
if (e.kind === "query") return {
|
|
396
397
|
kind: "query",
|
|
@@ -432,7 +433,7 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
432
433
|
..."relations" in e && e.relations !== void 0 ? { relations: e.relations } : {}
|
|
433
434
|
}))
|
|
434
435
|
};
|
|
435
|
-
},
|
|
436
|
+
}, It = 7500, Lt = (e) => typeof e == "object" && !!e && e.kind === "event", Rt = (e) => {
|
|
436
437
|
if (e.name.length === 0) throw Error("defineEvent: `name` must not be empty");
|
|
437
438
|
if (/\s/.test(e.name)) throw Error(`defineEvent("${e.name}"): \`name\` must not contain whitespace.\n The name is used as a broker subject segment. NATS refuses a subject with
|
|
438
439
|
whitespace and delivers nothing — silently, and only on that broker, so an
|
|
@@ -467,67 +468,108 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
467
468
|
webhook: e.webhook,
|
|
468
469
|
delivery: e.delivery
|
|
469
470
|
};
|
|
470
|
-
},
|
|
471
|
-
_tag:
|
|
472
|
-
origin:
|
|
473
|
-
n:
|
|
474
|
-
emittedAt:
|
|
471
|
+
}, zt = (e) => p.Struct({
|
|
472
|
+
_tag: p.Literal("event"),
|
|
473
|
+
origin: p.String,
|
|
474
|
+
n: p.Number,
|
|
475
|
+
emittedAt: p.Number,
|
|
475
476
|
payload: e
|
|
476
|
-
}),
|
|
477
|
-
_tag:
|
|
478
|
-
missed:
|
|
479
|
-
reason:
|
|
480
|
-
}),
|
|
481
|
-
origin:
|
|
482
|
-
n:
|
|
483
|
-
}),
|
|
477
|
+
}), Bt = p.Struct({
|
|
478
|
+
_tag: p.Literal("gap"),
|
|
479
|
+
missed: p.Number,
|
|
480
|
+
reason: p.Literal("buffer", "resume")
|
|
481
|
+
}), Vt = p.Struct({ _tag: p.Literal("attached") }), Ht = (e) => p.Union(Vt, zt(e), Bt), Ut = p.Struct({
|
|
482
|
+
origin: p.String,
|
|
483
|
+
n: p.Number
|
|
484
|
+
}), Wt = (e) => p.Struct({
|
|
484
485
|
key: e,
|
|
485
|
-
resume:
|
|
486
|
-
}),
|
|
487
|
-
let n = e.guards !== void 0 && e.guards.some((e) => !u(e)) ?
|
|
488
|
-
return
|
|
489
|
-
payload:
|
|
490
|
-
success:
|
|
486
|
+
resume: p.optional(p.Array(Ut))
|
|
487
|
+
}), Gt = (e, t) => {
|
|
488
|
+
let n = e.guards !== void 0 && e.guards.some((e) => !u(e)) ? p.Union(l, c) : p.Never, r = t && t.length > 0 ? p.Union(n, ...t) : n;
|
|
489
|
+
return m.make(e.name, {
|
|
490
|
+
payload: w(Wt(e.key), e.name, B(e.guards)),
|
|
491
|
+
success: Ht(e.payload),
|
|
491
492
|
error: r,
|
|
492
493
|
stream: !0
|
|
493
494
|
});
|
|
494
|
-
},
|
|
495
|
-
event:
|
|
496
|
-
message:
|
|
497
|
-
}) {},
|
|
498
|
-
event:
|
|
499
|
-
message:
|
|
500
|
-
}) {},
|
|
501
|
-
event:
|
|
502
|
-
bytes:
|
|
503
|
-
limit:
|
|
504
|
-
}) {},
|
|
495
|
+
}, Kt = class extends p.TaggedError()("EventPayloadInvalid", {
|
|
496
|
+
event: p.String,
|
|
497
|
+
message: p.String
|
|
498
|
+
}) {}, qt = class extends p.TaggedError()("EventKeyInvalid", {
|
|
499
|
+
event: p.String,
|
|
500
|
+
message: p.String
|
|
501
|
+
}) {}, Jt = class extends p.TaggedError()("EventPayloadTooLarge", {
|
|
502
|
+
event: p.String,
|
|
503
|
+
bytes: p.Number,
|
|
504
|
+
limit: p.Number
|
|
505
|
+
}) {}, Yt = (e) => {
|
|
505
506
|
if (typeof e != "object" || !e) return JSON.stringify(e) ?? "null";
|
|
506
507
|
let t = Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
507
508
|
return JSON.stringify(t);
|
|
508
|
-
},
|
|
509
|
+
}, Xt = "\0", Zt = (e, t, n) => [
|
|
509
510
|
e ?? "~",
|
|
510
511
|
t,
|
|
511
|
-
|
|
512
|
-
].join("\0"),
|
|
512
|
+
Yt(n)
|
|
513
|
+
].join("\0"), Qt = (e) => {
|
|
513
514
|
let [t = "~", n = "", r = ""] = e.split("\0");
|
|
514
515
|
return {
|
|
515
516
|
tenantId: t === "~" ? null : t,
|
|
516
517
|
event: n,
|
|
517
518
|
key: r
|
|
518
519
|
};
|
|
519
|
-
},
|
|
520
|
+
}, $t = (e) => e.split("\0").join(" · "), H = Symbol.for("@voltro/protocol/workflow-access"), en = {
|
|
521
|
+
guards: void 0,
|
|
522
|
+
openAccess: void 0,
|
|
523
|
+
internal: !1
|
|
524
|
+
}, tn = (e, t) => {
|
|
525
|
+
let n = t.guards;
|
|
526
|
+
if (n !== void 0 && n.length === 0) throw Error(`workflow("${e}"): \`guards: []\` is empty, so it enforces nothing —\n but it reads at the call site as if the start were protected. Omit the field
|
|
527
|
+
and decide with \`openAccess\` or \`internal\`, or list the scopes that may start it.`);
|
|
528
|
+
if (t.openAccess !== void 0) {
|
|
529
|
+
if (t.openAccess.trim() === "") throw Error(`workflow("${e}"): \`openAccess\` needs a REASON, not an empty string. It is\n the sentence a reviewer reads to decide whether anyone should really be able to
|
|
530
|
+
start durable work without an authorization check — e.g. \`openAccess: 'public
|
|
531
|
+
newsletter signup; the payload carries only the address being confirmed'\`.`);
|
|
532
|
+
if (n !== void 0 && n.length > 0) throw Error(`workflow("${e}"): \`openAccess\` and \`guards\` are two different access\n decisions, so declaring both says the start is protected AND open. Keep the
|
|
533
|
+
guards if a caller must hold a scope; drop them if anyone may start it.`);
|
|
534
|
+
if (t.internal === !0) throw Error(`workflow("${e}"): \`internal: true\` cannot be combined with \`openAccess\`.\n \`internal\` takes the start OFF the wire, and \`openAccess\` declares who may
|
|
535
|
+
start it over the wire — a decision about a door that does not exist. Drop
|
|
536
|
+
\`openAccess\` (an internal workflow needs no wire decision), or drop
|
|
537
|
+
\`internal: true\` if the workflow really is meant to be startable by clients.`);
|
|
538
|
+
}
|
|
539
|
+
return {
|
|
540
|
+
guards: t.openAccess === void 0 ? t.guards : [d(t.openAccess.trim())],
|
|
541
|
+
openAccess: t.openAccess?.trim(),
|
|
542
|
+
internal: t.internal === !0
|
|
543
|
+
};
|
|
544
|
+
}, nn = (e, t) => {
|
|
545
|
+
Object.defineProperty(e, H, {
|
|
546
|
+
value: t,
|
|
547
|
+
enumerable: !1
|
|
548
|
+
});
|
|
549
|
+
}, U = (e) => {
|
|
550
|
+
if (typeof e != "object" || !e) return en;
|
|
551
|
+
let t = e[H];
|
|
552
|
+
return t === void 0 ? en : t;
|
|
553
|
+
}, rn = (e) => {
|
|
554
|
+
let t = U(e);
|
|
555
|
+
return {
|
|
556
|
+
name: e.name,
|
|
557
|
+
internal: t.internal,
|
|
558
|
+
guards: t.guards,
|
|
559
|
+
openAccess: t.openAccess
|
|
560
|
+
};
|
|
561
|
+
}, an = (e) => e, on = (e) => e, sn = (e) => {
|
|
520
562
|
let t = e.alias?.trim(), n = e.instance?.trim(), r = t !== void 0 && t !== "" ? t : e.base;
|
|
521
563
|
return n !== void 0 && n !== "" ? `${r}#${n}` : r;
|
|
522
|
-
},
|
|
564
|
+
}, cn = (e) => {
|
|
523
565
|
if (e.length !== 0) return (t, n) => e.reduceRight((e, t) => t(e, n), t);
|
|
524
|
-
},
|
|
525
|
-
let n =
|
|
566
|
+
}, ln = (e, t) => {
|
|
567
|
+
let n = He.GenericTag(e);
|
|
526
568
|
return {
|
|
527
569
|
Tag: n,
|
|
528
|
-
Live:
|
|
570
|
+
Live: Ue.succeed(n, t)
|
|
529
571
|
};
|
|
530
|
-
},
|
|
572
|
+
}, un = (e, t, n) => {
|
|
531
573
|
if (!t) return { ok: !0 };
|
|
532
574
|
let r = n === void 0 ? null : W(n);
|
|
533
575
|
if (!r) return {
|
|
@@ -537,7 +579,7 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
537
579
|
let i = t.trim();
|
|
538
580
|
if (i === "*" || i === "") return { ok: !0 };
|
|
539
581
|
let a = i.split(/\s+/).filter((e) => e.length > 0);
|
|
540
|
-
for (let i of a) if (!
|
|
582
|
+
for (let i of a) if (!dn(i, r)) return {
|
|
541
583
|
ok: !1,
|
|
542
584
|
reason: `plugin "${e}" requires framework ${t}, running ${n}`
|
|
543
585
|
};
|
|
@@ -550,7 +592,7 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
550
592
|
patch: Number(t[3]),
|
|
551
593
|
pre: t[4] ?? ""
|
|
552
594
|
} : null;
|
|
553
|
-
}, G = (e, t) => e.major === t.major ? e.minor === t.minor ? e.patch === t.patch ? e.pre && !t.pre ? -1 : !e.pre && t.pre ? 1 : e.pre && t.pre ? e.pre < t.pre ? -1 : +(e.pre > t.pre) : 0 : e.patch - t.patch : e.minor - t.minor : e.major - t.major,
|
|
595
|
+
}, G = (e, t) => e.major === t.major ? e.minor === t.minor ? e.patch === t.patch ? e.pre && !t.pre ? -1 : !e.pre && t.pre ? 1 : e.pre && t.pre ? e.pre < t.pre ? -1 : +(e.pre > t.pre) : 0 : e.patch - t.patch : e.minor - t.minor : e.major - t.major, dn = (e, t) => {
|
|
554
596
|
if (e === "*") return !0;
|
|
555
597
|
if (e.startsWith("^")) {
|
|
556
598
|
let n = W(e.slice(1));
|
|
@@ -572,234 +614,244 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
572
614
|
}
|
|
573
615
|
let r = W(e);
|
|
574
616
|
return r ? G(t, r) === 0 : !1;
|
|
575
|
-
},
|
|
617
|
+
}, fn = (e) => {
|
|
576
618
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
577
619
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
|
|
578
|
-
},
|
|
620
|
+
}, pn = (e) => {
|
|
579
621
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
580
622
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
581
|
-
},
|
|
582
|
-
let e = globalThis, t = e[
|
|
623
|
+
}, mn = Symbol.for("@voltro/protocol/pluginAliases"), K = () => {
|
|
624
|
+
let e = globalThis, t = e[mn];
|
|
583
625
|
if (t instanceof Map) return t;
|
|
584
626
|
let n = /* @__PURE__ */ new Map();
|
|
585
|
-
return e[
|
|
586
|
-
},
|
|
627
|
+
return e[mn] = n, n;
|
|
628
|
+
}, hn = (e) => {
|
|
587
629
|
let t = K();
|
|
588
630
|
for (let [n, r] of Object.entries(e)) {
|
|
589
631
|
if (r === "") continue;
|
|
590
632
|
let e = t.get(n);
|
|
591
633
|
e === void 0 ? t.set(n, /* @__PURE__ */ new Set([r])) : e.add(r);
|
|
592
634
|
}
|
|
593
|
-
},
|
|
635
|
+
}, gn = () => {
|
|
594
636
|
K().clear();
|
|
595
|
-
},
|
|
637
|
+
}, _n = (e, t) => {
|
|
596
638
|
let n = K().get(e);
|
|
597
|
-
if (n === void 0 || n.size === 0) return `${
|
|
639
|
+
if (n === void 0 || n.size === 0) return `${fn(e)}.${t}`;
|
|
598
640
|
if (n.size === 1) return `${[...n][0]}.${t}`;
|
|
599
641
|
let r = [...n].filter((e) => !e.includes("#"));
|
|
600
642
|
if (r.length === 1) return `${r[0]}.${t}`;
|
|
601
643
|
throw Error(`[voltro] ${e} is installed more than once (${[...n].sort().join(", ")}) and no single install is the primary one, so a plugin hook cannot tell which of them it addresses. Call the route by its full tag instead — e.g. useSubscription(api, '${[...n].sort()[0]}.${t}').`);
|
|
602
|
-
}, q =
|
|
603
|
-
mode:
|
|
604
|
-
dueAt:
|
|
605
|
-
retryAfterMs:
|
|
606
|
-
intentId:
|
|
607
|
-
}),
|
|
608
|
-
id:
|
|
609
|
-
workflowName:
|
|
610
|
-
executionId:
|
|
611
|
-
status:
|
|
612
|
-
deferral:
|
|
613
|
-
}),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
644
|
+
}, q = p.Literal("running", "succeeded", "failed", "cancelled", "suspended"), vn = p.Literal("cancel", "terminate", "abandon"), yn = p.Struct({
|
|
645
|
+
mode: p.String,
|
|
646
|
+
dueAt: p.NullOr(p.Number),
|
|
647
|
+
retryAfterMs: p.NullOr(p.Number),
|
|
648
|
+
intentId: p.NullOr(p.String)
|
|
649
|
+
}), bn = p.Struct({
|
|
650
|
+
id: p.String,
|
|
651
|
+
workflowName: p.String,
|
|
652
|
+
executionId: p.NullOr(p.String),
|
|
653
|
+
status: p.Literal("running", "queued", "dropped", "skipped", "replayed"),
|
|
654
|
+
deferral: p.optional(yn)
|
|
655
|
+
}), xn = (e, t) => {
|
|
656
|
+
let n = U(e);
|
|
657
|
+
return m.make(e.name, {
|
|
658
|
+
payload: w(e.payloadSchema, e.name, B(n.guards)),
|
|
659
|
+
success: bn,
|
|
660
|
+
error: Dt({
|
|
661
|
+
errorSchema: e.errorSchema,
|
|
662
|
+
guards: n.guards
|
|
663
|
+
}, t)
|
|
664
|
+
});
|
|
665
|
+
}, J = p.Struct({
|
|
666
|
+
id: p.String,
|
|
667
|
+
tag: p.String,
|
|
668
|
+
executionId: p.String,
|
|
617
669
|
status: q,
|
|
618
|
-
payload:
|
|
619
|
-
workflowVersion:
|
|
620
|
-
workflowPatches:
|
|
621
|
-
output:
|
|
622
|
-
subject:
|
|
623
|
-
source:
|
|
624
|
-
errorTag:
|
|
625
|
-
errorMessage:
|
|
626
|
-
cancelled:
|
|
627
|
-
startedAt:
|
|
628
|
-
completedAt:
|
|
629
|
-
durationMs:
|
|
630
|
-
traceId:
|
|
631
|
-
parentExecutionId:
|
|
632
|
-
parentClosePolicy:
|
|
633
|
-
}),
|
|
634
|
-
tag:
|
|
635
|
-
status:
|
|
636
|
-
limit:
|
|
637
|
-
}),
|
|
638
|
-
id:
|
|
639
|
-
runId:
|
|
640
|
-
stepName:
|
|
641
|
-
attempt:
|
|
642
|
-
status:
|
|
643
|
-
input:
|
|
644
|
-
retryPolicy:
|
|
645
|
-
output:
|
|
646
|
-
errorTag:
|
|
647
|
-
errorMessage:
|
|
648
|
-
errorCause:
|
|
649
|
-
startedAt:
|
|
650
|
-
completedAt:
|
|
651
|
-
durationMs:
|
|
652
|
-
}),
|
|
653
|
-
id:
|
|
654
|
-
runId:
|
|
655
|
-
eventType:
|
|
656
|
-
payload:
|
|
657
|
-
occurredAt:
|
|
658
|
-
stepName:
|
|
659
|
-
attempt:
|
|
660
|
-
}),
|
|
661
|
-
id:
|
|
662
|
-
name:
|
|
663
|
-
payload:
|
|
664
|
-
source:
|
|
665
|
-
subject:
|
|
666
|
-
traceId:
|
|
667
|
-
occurredAt:
|
|
668
|
-
}),
|
|
669
|
-
id:
|
|
670
|
-
eventId:
|
|
671
|
-
eventName:
|
|
672
|
-
triggerId:
|
|
673
|
-
workflowName:
|
|
674
|
-
executionId:
|
|
675
|
-
status:
|
|
676
|
-
idempotencyKey:
|
|
677
|
-
skipped:
|
|
678
|
-
errorMessage:
|
|
679
|
-
createdAt:
|
|
680
|
-
completedAt:
|
|
681
|
-
}),
|
|
682
|
-
name:
|
|
683
|
-
limit:
|
|
684
|
-
}),
|
|
685
|
-
workflowName:
|
|
686
|
-
executionId:
|
|
687
|
-
}),
|
|
688
|
-
id:
|
|
689
|
-
signalName:
|
|
690
|
-
payload:
|
|
691
|
-
}),
|
|
692
|
-
id:
|
|
693
|
-
updateName:
|
|
694
|
-
payload:
|
|
695
|
-
timeoutMs:
|
|
696
|
-
}),
|
|
697
|
-
eventId:
|
|
698
|
-
updateId:
|
|
699
|
-
completedEventId:
|
|
700
|
-
result:
|
|
701
|
-
}),
|
|
670
|
+
payload: p.Unknown,
|
|
671
|
+
workflowVersion: p.NullOr(p.String),
|
|
672
|
+
workflowPatches: p.NullOr(p.Unknown),
|
|
673
|
+
output: p.NullOr(p.Unknown),
|
|
674
|
+
subject: p.NullOr(p.Unknown),
|
|
675
|
+
source: p.NullOr(p.String),
|
|
676
|
+
errorTag: p.NullOr(p.String),
|
|
677
|
+
errorMessage: p.NullOr(p.String),
|
|
678
|
+
cancelled: p.Boolean,
|
|
679
|
+
startedAt: p.Date,
|
|
680
|
+
completedAt: p.NullOr(p.Date),
|
|
681
|
+
durationMs: p.NullOr(p.Number),
|
|
682
|
+
traceId: p.NullOr(p.String),
|
|
683
|
+
parentExecutionId: p.NullOr(p.String),
|
|
684
|
+
parentClosePolicy: p.NullOr(vn)
|
|
685
|
+
}), Sn = p.Struct({
|
|
686
|
+
tag: p.optional(p.String),
|
|
687
|
+
status: p.optional(q),
|
|
688
|
+
limit: p.optional(p.Number)
|
|
689
|
+
}), Cn = p.Struct({
|
|
690
|
+
id: p.String,
|
|
691
|
+
runId: p.String,
|
|
692
|
+
stepName: p.String,
|
|
693
|
+
attempt: p.Number,
|
|
694
|
+
status: p.Literal("running", "succeeded", "failed"),
|
|
695
|
+
input: p.NullOr(p.Unknown),
|
|
696
|
+
retryPolicy: p.NullOr(p.Unknown),
|
|
697
|
+
output: p.NullOr(p.Unknown),
|
|
698
|
+
errorTag: p.NullOr(p.String),
|
|
699
|
+
errorMessage: p.NullOr(p.String),
|
|
700
|
+
errorCause: p.NullOr(p.Unknown),
|
|
701
|
+
startedAt: p.Date,
|
|
702
|
+
completedAt: p.NullOr(p.Date),
|
|
703
|
+
durationMs: p.NullOr(p.Number)
|
|
704
|
+
}), wn = p.Struct({
|
|
705
|
+
id: p.String,
|
|
706
|
+
runId: p.String,
|
|
707
|
+
eventType: p.String,
|
|
708
|
+
payload: p.NullOr(p.Unknown),
|
|
709
|
+
occurredAt: p.Date,
|
|
710
|
+
stepName: p.NullOr(p.String),
|
|
711
|
+
attempt: p.NullOr(p.Number)
|
|
712
|
+
}), Tn = p.Struct({
|
|
713
|
+
id: p.String,
|
|
714
|
+
name: p.String,
|
|
715
|
+
payload: p.Unknown,
|
|
716
|
+
source: p.String,
|
|
717
|
+
subject: p.NullOr(p.Unknown),
|
|
718
|
+
traceId: p.NullOr(p.String),
|
|
719
|
+
occurredAt: p.Date
|
|
720
|
+
}), En = p.Struct({
|
|
721
|
+
id: p.String,
|
|
722
|
+
eventId: p.String,
|
|
723
|
+
eventName: p.String,
|
|
724
|
+
triggerId: p.String,
|
|
725
|
+
workflowName: p.String,
|
|
726
|
+
executionId: p.NullOr(p.String),
|
|
727
|
+
status: p.Literal("starting", "started", "skipped", "failed"),
|
|
728
|
+
idempotencyKey: p.String,
|
|
729
|
+
skipped: p.Boolean,
|
|
730
|
+
errorMessage: p.NullOr(p.String),
|
|
731
|
+
createdAt: p.Date,
|
|
732
|
+
completedAt: p.NullOr(p.Date)
|
|
733
|
+
}), Dn = p.Struct({ id: p.String }), Y = p.Struct({ runId: p.String }), On = p.Struct({
|
|
734
|
+
name: p.optional(p.String),
|
|
735
|
+
limit: p.optional(p.Number)
|
|
736
|
+
}), kn = p.Struct({ eventId: p.String }), X = p.Struct({
|
|
737
|
+
workflowName: p.String,
|
|
738
|
+
executionId: p.String
|
|
739
|
+
}), An = p.Struct({
|
|
740
|
+
id: p.String,
|
|
741
|
+
signalName: p.String,
|
|
742
|
+
payload: p.optional(p.Unknown)
|
|
743
|
+
}), jn = p.Struct({
|
|
744
|
+
id: p.String,
|
|
745
|
+
updateName: p.String,
|
|
746
|
+
payload: p.optional(p.Unknown),
|
|
747
|
+
timeoutMs: p.optional(p.Number)
|
|
748
|
+
}), Mn = p.Struct({
|
|
749
|
+
eventId: p.String,
|
|
750
|
+
updateId: p.String,
|
|
751
|
+
completedEventId: p.String,
|
|
752
|
+
result: p.Unknown
|
|
753
|
+
}), Nn = I({
|
|
702
754
|
name: "__voltro.workflow.run",
|
|
703
755
|
source: "_voltro_workflow_runs",
|
|
704
|
-
input:
|
|
705
|
-
output:
|
|
706
|
-
}),
|
|
756
|
+
input: Dn,
|
|
757
|
+
output: p.Array(J)
|
|
758
|
+
}), Pn = I({
|
|
707
759
|
name: "__voltro.workflow.runs",
|
|
708
760
|
source: "_voltro_workflow_runs",
|
|
709
|
-
input:
|
|
710
|
-
output:
|
|
711
|
-
}),
|
|
761
|
+
input: Sn,
|
|
762
|
+
output: p.Array(J)
|
|
763
|
+
}), Fn = I({
|
|
712
764
|
name: "__voltro.workflow.run.steps",
|
|
713
765
|
source: "_voltro_workflow_run_steps",
|
|
714
766
|
input: Y,
|
|
715
|
-
output:
|
|
716
|
-
}),
|
|
767
|
+
output: p.Array(Cn)
|
|
768
|
+
}), In = I({
|
|
717
769
|
name: "__voltro.workflow.run.events",
|
|
718
770
|
source: "_voltro_workflow_run_events",
|
|
719
771
|
input: Y,
|
|
720
|
-
output:
|
|
721
|
-
}),
|
|
772
|
+
output: p.Array(wn)
|
|
773
|
+
}), Ln = I({
|
|
722
774
|
name: "__voltro.workflow.domainEvents",
|
|
723
775
|
source: "_voltro_workflow_events",
|
|
724
|
-
input:
|
|
725
|
-
output:
|
|
726
|
-
}),
|
|
776
|
+
input: On,
|
|
777
|
+
output: p.Array(Tn)
|
|
778
|
+
}), Rn = I({
|
|
727
779
|
name: "__voltro.workflow.event.deliveries",
|
|
728
780
|
source: "_voltro_workflow_event_deliveries",
|
|
729
|
-
input:
|
|
730
|
-
output:
|
|
731
|
-
}),
|
|
781
|
+
input: kn,
|
|
782
|
+
output: p.Array(En)
|
|
783
|
+
}), zn = R({
|
|
732
784
|
name: "__voltro.workflow.cancel",
|
|
733
785
|
input: X,
|
|
734
|
-
output:
|
|
735
|
-
}),
|
|
786
|
+
output: p.Struct({ ok: p.Boolean })
|
|
787
|
+
}), Bn = R({
|
|
736
788
|
name: "__voltro.workflow.resume",
|
|
737
789
|
input: X,
|
|
738
|
-
output:
|
|
739
|
-
}),
|
|
790
|
+
output: p.Struct({ ok: p.Boolean })
|
|
791
|
+
}), Vn = R({
|
|
740
792
|
name: "__voltro.workflow.signal",
|
|
741
|
-
input:
|
|
742
|
-
output:
|
|
743
|
-
}),
|
|
793
|
+
input: An,
|
|
794
|
+
output: p.Struct({ eventId: p.String })
|
|
795
|
+
}), Hn = R({
|
|
744
796
|
name: "__voltro.workflow.update",
|
|
745
|
-
input:
|
|
746
|
-
output:
|
|
747
|
-
}),
|
|
748
|
-
id:
|
|
749
|
-
tag:
|
|
750
|
-
label:
|
|
751
|
-
undone:
|
|
752
|
-
crossesAction:
|
|
753
|
-
createdAt:
|
|
754
|
-
}),
|
|
755
|
-
invocationId:
|
|
756
|
-
reason:
|
|
757
|
-
}) {},
|
|
758
|
-
name:
|
|
797
|
+
input: jn,
|
|
798
|
+
output: Mn
|
|
799
|
+
}), Un = "__voltro.undo.log", Wn = "__voltro.undo.apply", Gn = "__voltro.undo.redo", Kn = p.Struct({
|
|
800
|
+
id: p.String,
|
|
801
|
+
tag: p.String,
|
|
802
|
+
label: p.NullOr(p.String),
|
|
803
|
+
undone: p.Boolean,
|
|
804
|
+
crossesAction: p.Boolean,
|
|
805
|
+
createdAt: p.String
|
|
806
|
+
}), qn = class extends p.TaggedError()("UndoNotFound", { invocationId: p.String }) {}, Jn = class extends p.TaggedError()("UndoForbidden", { invocationId: p.String }) {}, Yn = class extends p.TaggedError()("UndoConflict", {
|
|
807
|
+
invocationId: p.String,
|
|
808
|
+
reason: p.Literal("conflict", "action")
|
|
809
|
+
}) {}, Xn = p.Union(qn, Jn, Yn), Zn = I({
|
|
810
|
+
name: Un,
|
|
759
811
|
source: "_voltro_undo_log",
|
|
760
|
-
input:
|
|
761
|
-
output:
|
|
812
|
+
input: p.Struct({ limit: p.optional(p.Number) }),
|
|
813
|
+
output: p.Array(Kn),
|
|
762
814
|
openAccess: "subject-scoped by construction: lists only the calling subject's own undoable actions"
|
|
763
|
-
}),
|
|
764
|
-
name:
|
|
765
|
-
input:
|
|
766
|
-
output:
|
|
767
|
-
error:
|
|
815
|
+
}), Qn = L({
|
|
816
|
+
name: Wn,
|
|
817
|
+
input: p.Struct({ invocationId: p.String }),
|
|
818
|
+
output: p.Struct({ ok: p.Boolean }),
|
|
819
|
+
error: Xn,
|
|
768
820
|
openAccess: "subject-scoped by construction: undo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
769
|
-
}),
|
|
770
|
-
name:
|
|
771
|
-
input:
|
|
772
|
-
output:
|
|
773
|
-
error:
|
|
821
|
+
}), $n = L({
|
|
822
|
+
name: Gn,
|
|
823
|
+
input: p.Struct({ invocationId: p.String }),
|
|
824
|
+
output: p.Struct({ ok: p.Boolean }),
|
|
825
|
+
error: Xn,
|
|
774
826
|
openAccess: "subject-scoped by construction: redo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
775
|
-
}),
|
|
776
|
-
table:
|
|
777
|
-
reason:
|
|
778
|
-
}) {},
|
|
779
|
-
operation:
|
|
780
|
-
table:
|
|
781
|
-
cause:
|
|
782
|
-
}) {},
|
|
783
|
-
table:
|
|
784
|
-
summary:
|
|
785
|
-
issues:
|
|
786
|
-
path:
|
|
787
|
-
message:
|
|
827
|
+
}), er = class extends p.TaggedError()("TenantScopeViolation", {
|
|
828
|
+
table: p.String,
|
|
829
|
+
reason: p.String
|
|
830
|
+
}) {}, tr = class extends p.TaggedError()("StoreOperationFailed", {
|
|
831
|
+
operation: p.String,
|
|
832
|
+
table: p.String,
|
|
833
|
+
cause: p.String
|
|
834
|
+
}) {}, nr = class extends p.TaggedError()("TableValidationFailed", {
|
|
835
|
+
table: p.String,
|
|
836
|
+
summary: p.String,
|
|
837
|
+
issues: p.Array(p.Struct({
|
|
838
|
+
path: p.String,
|
|
839
|
+
message: p.String
|
|
788
840
|
}))
|
|
789
|
-
}) {},
|
|
790
|
-
table:
|
|
791
|
-
id:
|
|
792
|
-
reason:
|
|
793
|
-
}) {},
|
|
794
|
-
table:
|
|
795
|
-
columns:
|
|
796
|
-
}) {},
|
|
797
|
-
kind:
|
|
798
|
-
table:
|
|
799
|
-
operation:
|
|
800
|
-
constraint:
|
|
801
|
-
column:
|
|
802
|
-
detail:
|
|
841
|
+
}) {}, rr = class extends p.TaggedError()("TenantRowNotFound", {
|
|
842
|
+
table: p.String,
|
|
843
|
+
id: p.String,
|
|
844
|
+
reason: p.String
|
|
845
|
+
}) {}, ir = class extends p.TaggedError()("ServerOnlyColumnWrite", {
|
|
846
|
+
table: p.String,
|
|
847
|
+
columns: p.Array(p.String)
|
|
848
|
+
}) {}, ar = class extends p.TaggedError()("ConstraintViolation", {
|
|
849
|
+
kind: p.Literal("foreignKey", "foreignKeyInUse", "unique", "notNull", "check"),
|
|
850
|
+
table: p.String,
|
|
851
|
+
operation: p.String,
|
|
852
|
+
constraint: p.optional(p.String),
|
|
853
|
+
column: p.optional(p.String),
|
|
854
|
+
detail: p.optional(p.String)
|
|
803
855
|
}) {
|
|
804
856
|
get message() {
|
|
805
857
|
if (this.detail !== void 0) return this.detail;
|
|
@@ -812,85 +864,85 @@ var Ue = f.Union(f.String, f.Number), m = f.Record({
|
|
|
812
864
|
case "check": return `check constraint ${t}: the row does not satisfy it`;
|
|
813
865
|
}
|
|
814
866
|
}
|
|
815
|
-
},
|
|
816
|
-
name:
|
|
867
|
+
}, or = "__voltro.approvals.pending", sr = "__voltro.approvals.decide", cr = I({
|
|
868
|
+
name: or,
|
|
817
869
|
source: "_voltro_approvals",
|
|
818
|
-
input:
|
|
819
|
-
output:
|
|
870
|
+
input: p.Struct({ limit: p.optional(p.Number) }),
|
|
871
|
+
output: p.Array(ot),
|
|
820
872
|
openAccess: "the answer is scoped to the caller — a row appears only if they requested it or hold its recorded approver scopes, so an anonymous caller sees nothing"
|
|
821
|
-
}),
|
|
822
|
-
name:
|
|
823
|
-
input:
|
|
824
|
-
approvalId:
|
|
825
|
-
decision:
|
|
826
|
-
note:
|
|
873
|
+
}), lr = L({
|
|
874
|
+
name: sr,
|
|
875
|
+
input: p.Struct({
|
|
876
|
+
approvalId: p.String,
|
|
877
|
+
decision: p.Literal("approve", "reject"),
|
|
878
|
+
note: p.optional(p.String)
|
|
827
879
|
}),
|
|
828
|
-
output:
|
|
829
|
-
approvalId:
|
|
830
|
-
status:
|
|
880
|
+
output: p.Struct({
|
|
881
|
+
approvalId: p.String,
|
|
882
|
+
status: p.Literal("approved", "rejected")
|
|
831
883
|
}),
|
|
832
|
-
error:
|
|
884
|
+
error: at,
|
|
833
885
|
openAccess: "the approver authority is the PENDING ROW's own recorded scopes (plus an unconditional self-approval refusal), checked in-handler — a descriptor-level scope would have to be the union of every approval-requiring procedure in the app"
|
|
834
|
-
}),
|
|
835
|
-
connectionId:
|
|
886
|
+
}), Z = "__voltro.connections.list", ur = "__voltro.connections.start", dr = "__voltro.connections.submitToken", fr = "__voltro.connections.disconnect", Q = p.Literal("oauth2", "pat"), pr = p.Literal("disconnected", "connected", "expired", "revoked", "error"), mr = p.Struct({
|
|
887
|
+
connectionId: p.String,
|
|
836
888
|
kind: Q,
|
|
837
|
-
label:
|
|
838
|
-
status:
|
|
839
|
-
accountId:
|
|
840
|
-
accountLabel:
|
|
841
|
-
scopes:
|
|
842
|
-
expiresAt:
|
|
843
|
-
lastError:
|
|
844
|
-
connectedAt:
|
|
845
|
-
}),
|
|
846
|
-
connectionId:
|
|
889
|
+
label: p.String,
|
|
890
|
+
status: pr,
|
|
891
|
+
accountId: p.NullOr(p.String),
|
|
892
|
+
accountLabel: p.NullOr(p.String),
|
|
893
|
+
scopes: p.Array(p.String),
|
|
894
|
+
expiresAt: p.NullOr(p.String),
|
|
895
|
+
lastError: p.NullOr(p.String),
|
|
896
|
+
connectedAt: p.NullOr(p.String)
|
|
897
|
+
}), hr = class extends p.TaggedError()("ConnectionNotDeclared", { connectionId: p.String }) {}, gr = class extends p.TaggedError()("ConnectionSubjectRequired", { connectionId: p.String }) {}, _r = class extends p.TaggedError()("ConnectionKindMismatch", {
|
|
898
|
+
connectionId: p.String,
|
|
847
899
|
expected: Q,
|
|
848
900
|
actual: Q
|
|
849
|
-
}) {},
|
|
850
|
-
connectionId:
|
|
851
|
-
reason:
|
|
852
|
-
transient:
|
|
853
|
-
}) {}, $ =
|
|
854
|
-
name:
|
|
901
|
+
}) {}, vr = class extends p.TaggedError()("ConnectionHandshakeFailed", {
|
|
902
|
+
connectionId: p.String,
|
|
903
|
+
reason: p.String,
|
|
904
|
+
transient: p.Boolean
|
|
905
|
+
}) {}, $ = p.Union(hr, gr, _r, vr), yr = I({
|
|
906
|
+
name: Z,
|
|
855
907
|
source: "_voltro_connections",
|
|
856
|
-
input:
|
|
857
|
-
output:
|
|
908
|
+
input: p.Struct({}),
|
|
909
|
+
output: p.Array(mr),
|
|
858
910
|
openAccess: "self-scoped read: projects the declared connections for the calling subject only (its own connect/disconnect state)"
|
|
859
|
-
}),
|
|
860
|
-
name:
|
|
861
|
-
input:
|
|
862
|
-
connectionId:
|
|
863
|
-
redirectTo:
|
|
911
|
+
}), br = R({
|
|
912
|
+
name: ur,
|
|
913
|
+
input: p.Struct({
|
|
914
|
+
connectionId: p.String,
|
|
915
|
+
redirectTo: p.optional(p.String)
|
|
864
916
|
}),
|
|
865
|
-
output:
|
|
866
|
-
authorizeUrl:
|
|
867
|
-
state:
|
|
917
|
+
output: p.Struct({
|
|
918
|
+
authorizeUrl: p.String,
|
|
919
|
+
state: p.String
|
|
868
920
|
}),
|
|
869
921
|
error: $,
|
|
870
922
|
openAccess: "self-service: begins an oauth handshake that stores a credential for the calling subject only; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
871
|
-
}),
|
|
872
|
-
name:
|
|
873
|
-
input:
|
|
874
|
-
connectionId:
|
|
875
|
-
token:
|
|
923
|
+
}), xr = L({
|
|
924
|
+
name: dr,
|
|
925
|
+
input: p.Struct({
|
|
926
|
+
connectionId: p.String,
|
|
927
|
+
token: p.String
|
|
876
928
|
}),
|
|
877
|
-
output:
|
|
929
|
+
output: p.Struct({ ok: p.Boolean }),
|
|
878
930
|
error: $,
|
|
879
931
|
openAccess: "self-service: stores a pasted token as the calling subject's own credential; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
880
|
-
}),
|
|
881
|
-
name:
|
|
882
|
-
input:
|
|
883
|
-
output:
|
|
932
|
+
}), Sr = L({
|
|
933
|
+
name: fr,
|
|
934
|
+
input: p.Struct({ connectionId: p.String }),
|
|
935
|
+
output: p.Struct({ ok: p.Boolean }),
|
|
884
936
|
error: $,
|
|
885
937
|
openAccess: "self-service: deletes only the calling subject's own credential row for this connection"
|
|
886
|
-
}),
|
|
938
|
+
}), Cr = (e) => {
|
|
887
939
|
let t = e instanceof Date ? e.getTime() : typeof e == "number" ? e : typeof e == "string" ? new Date(e).getTime() : 0;
|
|
888
940
|
return Number.isNaN(t) ? 0 : t;
|
|
889
|
-
},
|
|
941
|
+
}, wr = 4001, Tr = /* @__PURE__ */ new Set(["/rpc", "/ws"]), Er = (e) => {
|
|
890
942
|
if (!e.path.startsWith("/")) throw Error(`defineWebSocket: path must be absolute, got '${e.path}'`);
|
|
891
|
-
if (
|
|
943
|
+
if (Tr.has(e.path)) throw Error(`defineWebSocket: '${e.path}' is the framework's own socket surface — mount the gateway elsewhere`);
|
|
892
944
|
if (e.auth !== "subject" && e.auth !== "public") throw Error(`defineWebSocket: auth must be 'subject' or 'public' (explicitly — an unauthenticated socket has to be a decision somebody wrote down), got '${String(e.auth)}'`);
|
|
893
945
|
return e;
|
|
894
|
-
},
|
|
946
|
+
}, Dr = 1;
|
|
895
947
|
//#endregion
|
|
896
|
-
export { De as ADMIN_SCOPE, Se as APIKEY_ISSUE_ORG_SCOPE, Te as APIKEY_ISSUE_OTHER_SCOPE, _e as APIKEY_ISSUE_SELF_SCOPE,
|
|
948
|
+
export { De as ADMIN_SCOPE, Se as APIKEY_ISSUE_ORG_SCOPE, Te as APIKEY_ISSUE_OTHER_SCOPE, _e as APIKEY_ISSUE_SELF_SCOPE, sr as APPROVALS_DECIDE_TAG, or as APPROVALS_PENDING_TAG, at as ApprovalDecisionErrors, it as ApprovalErrors, k as ApprovalExpired, rt as ApprovalForbidden, $e as ApprovalNotFound, nt as ApprovalNotPending, tt as ApprovalRejected, Qe as ApprovalRequired, et as ApprovalSelfApproval, A as ApprovalUnavailable, ke as AuthMiddleware, T as BusinessRuleViolation, Z as CONNECTIONS_LIST_TAG, fr as CONNECTION_DISCONNECT_TAG, ur as CONNECTION_START_TAG, dr as CONNECTION_SUBMIT_TOKEN_TAG, vr as ConnectionHandshakeFailed, se as ConnectionInfo, i as ConnectionInfoMiddleware, Q as ConnectionKind, _r as ConnectionKindMismatch, hr as ConnectionNotDeclared, mr as ConnectionState, pr as ConnectionStatus, gr as ConnectionSubjectRequired, ar as ConstraintViolation, r as DEFAULT_SCOPE_CACHE_MAX_ENTRIES, re as DEFAULT_SCOPE_CACHE_TTL_MS, Xt as EVENT_ROUTE_SEP, qt as EventKeyInvalid, Kt as EventPayloadInvalid, Jt as EventPayloadTooLarge, wr as GATEWAY_CREDENTIAL_EXPIRED_CLOSE_CODE, ye as IMPERSONATION_METADATA_KEY, It as MAX_EVENT_ENVELOPE_BYTES, Re as MUTATION_IN_FLIGHT_RETRY_AFTER_MS, f as MutationInFlight, Dr as PROTOCOL_VERSION, ot as PendingApproval, j as REACTIVITY_CHANNEL_PREFIX, l as ScopeError, ir as ServerOnlyColumnWrite, tr as StoreOperationFailed, e as Subject, ve as SubjectIdentity, ne as SubjectService, nr as TableValidationFailed, rr as TenantRowNotFound, er as TenantScopeViolation, Wn as UNDO_APPLY_TAG, Un as UNDO_LOG_TAG, Gn as UNDO_REDO_TAG, c as Unauthenticated, Yn as UndoConflict, Jn as UndoForbidden, Kn as UndoLogEntry, qn as UndoNotFound, D as ValidationError, O as ValidationErrors, E as ValidationIssue, H as WorkflowAccessProperty, X as WorkflowControlInputSchema, Tn as WorkflowDomainEventRowSchema, On as WorkflowDomainEventsInputSchema, kn as WorkflowEventDeliveriesInputSchema, En as WorkflowEventDeliveryRowSchema, vn as WorkflowParentClosePolicySchema, wn as WorkflowRunEventRowSchema, bn as WorkflowRunHandleSchema, Dn as WorkflowRunRefSchema, J as WorkflowRunRowSchema, q as WorkflowRunStatusSchema, Cn as WorkflowRunStepRowSchema, Y as WorkflowRunTableRefSchema, Sn as WorkflowRunsInputSchema, An as WorkflowSignalInputSchema, yn as WorkflowStartDeferralSchema, jn as WorkflowUpdateInputSchema, Mn as WorkflowUpdateResultSchema, jt as actionToRpc, Ce as advisoryResourceGuardWarning, ie as anonymousSubject, Ye as applyRowPatch, a as applyScopeDecision, lr as approvalsDecideDescriptor, cr as approvalsPendingQueryDescriptor, ee as assertAuthenticated, nn as attachWorkflowAccess, Ne as beginIdempotent, un as checkFrameworkCompat, Ee as checkGuards, pe as checkGuardsEffect, te as composeAuthStrategies, cn as composeRpcInterceptors, Sr as connectionDisconnectDescriptor, br as connectionStartDescriptor, xr as connectionSubmitTokenDescriptor, yr as connectionsListQueryDescriptor, pt as declaredReactivityChannelKeys, R as defineAction, Rt as defineEvent, L as defineMutation, an as definePlugin, on as definePluginRoute, ln as definePluginService, I as defineQuery, St as defineStream, Er as defineWebSocket, qe as diffRows, be as effectiveScopes, Yt as encodeEventKey, Nt as errorTag, Vt as eventAttached, zt as eventEnvelope, Bt as eventGap, Ut as eventResumePoint, Zt as eventRoute, Ht as eventStreamEvent, Wt as eventSubscribeInput, Gt as eventToRpc, Le as failIdempotent, Ze as fieldIssuesOf, Oe as findAdvisoryResourceGuards, ze as finishIdempotent, $t as formatEventRoute, me as getPolicyGuardResolver, he as getResourceScopeResolver, U as getWorkflowAccess, xt as hasAccessDecision, ae as hasCallbackRoutes, we as hasEffectiveScope, B as hasEnforcedGuard, xe as hasScope, v as idToPath, Pe as idempotencyScope, C as inputLabel, Lt as isEventDescriptor, Je as isIdKeyed, u as isOpenAccess, ge as isPolicyCheck, bt as isPolicyGuard, dt as isReactivityChannel, ft as isReactivityChannelKey, Me as isSystemSubject, vt as isWireReachable, t as makeScopeCache, Fe as memoryIdempotencyStore, de as missingAccessDecision, At as mutationToRpc, Ft as normalizeDescriptor, ht as normalizeSource, d as openAccessSpec, Qt as parseEventRoute, y as pathToId, fn as pluginAlias, sn as pluginInstanceName, pn as pluginSlug, _n as pluginTag, _t as publishReactivity, Be as publishServerError, kt as queryToRpc, le as rawImpersonationMark, ut as reactivityChannel, hn as registerPluginAliases, je as requireScope, gn as resetPluginAliases, tn as resolveWorkflowAccess, g as rowPatchOpSchema, _ as rowPatchSchema, s as scopeCacheKey, fe as setEffectiveScopes, Ae as setPolicyGuardResolver, oe as setResourceScopeResolver, mt as sourceKeys, Mt as streamToRpc, w as strictInput, ce as subjectIdentity, n as subjectScopes, Ie as subscribeServerErrors, S as subscriptionEvent, ue as systemSubject, o as tenantScopedSubject, Pt as toRpc, Cr as tsMs, gt as undeclaredChannelKeys, Qn as undoApplyDescriptor, Zn as undoLogQueryDescriptor, $n as undoRedoDescriptor, V as wireErrorUnion, Ot as withRpcTag, rn as workflowAccessDescriptor, zn as workflowCancelDescriptor, Ln as workflowDomainEventsQueryDescriptor, Rn as workflowEventDeliveriesQueryDescriptor, Bn as workflowResumeDescriptor, In as workflowRunEventsQueryDescriptor, Nn as workflowRunQueryDescriptor, Fn as workflowRunStepsQueryDescriptor, Pn as workflowRunsQueryDescriptor, Vn as workflowSignalDescriptor, xn as workflowToRpc, Hn as workflowUpdateDescriptor, Dt as workflowWireErrorUnion, Ve as wsMutationIdempotencyScope };
|