@voltro/protocol 0.79.1 → 0.81.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 +169 -0
- package/dist/apikey.d.ts +8 -0
- package/dist/index.d.ts +394 -14
- package/dist/index.js +601 -556
- package/dist/jwt.d.ts +8 -0
- package/dist/rest.d.ts +84 -16
- package/dist/rest.js +228 -218
- package/dist/{restFormat-ChSVyufA.js → restFormat-CzdGVkuB.js} +72 -60
- package/dist/{scopes-BbIyym8y.js → scopes-CvU5QBQ4.js} +110 -79
- package/dist/session.d.ts +20 -0
- package/dist/session.js +6 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as
|
|
2
|
-
import { C as
|
|
3
|
-
import { Context as
|
|
4
|
-
import { Rpc as
|
|
5
|
-
import { VersionConflict as
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as ee, J as te, K as ne, L as re, M as ie, N as ae, O as oe, P as se, Q as ce, R as le, S as ue, T as de, U as fe, V as pe, W as me, X as he, Y as ge, Z as _e, _ as l, a as ve, at as ye, b as be, c as xe, d as Se, et as Ce, f as we, g as Te, h as Ee, i as De, it as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne, nt as Pe, o as u, p as Fe, q as Ie, r as Le, rt as Re, s as ze, t as Be, tt as Ve, u as He, v as Ue, w as d, x as f, y as We, z as p } from "./scopes-CvU5QBQ4.js";
|
|
2
|
+
import { A as Ge, C as Ke, D as qe, E as Je, O as Ye, S as Xe, T as Ze, _ as Qe, a as $e, b as et, c as tt, d as nt, f as rt, g as it, h as at, i as ot, k as st, l as ct, m as lt, n as ut, o as dt, p as ft, r as pt, s as mt, t as ht, u as gt, v as _t, w as vt, x as yt, y as bt } from "./restFormat-CzdGVkuB.js";
|
|
3
|
+
import { Context as xt, Layer as St, Schema as m } from "effect";
|
|
4
|
+
import { Rpc as h } from "@effect/rpc";
|
|
5
|
+
import { VersionConflict as Ct } from "@voltro/database/wire";
|
|
6
6
|
//#region src/rowPatch.ts
|
|
7
|
-
var
|
|
8
|
-
key:
|
|
9
|
-
value:
|
|
10
|
-
}).pipe(
|
|
11
|
-
op:
|
|
12
|
-
path:
|
|
13
|
-
value:
|
|
14
|
-
}),
|
|
15
|
-
op:
|
|
16
|
-
path:
|
|
17
|
-
value:
|
|
18
|
-
}),
|
|
19
|
-
op:
|
|
20
|
-
path:
|
|
21
|
-
}),
|
|
22
|
-
op:
|
|
23
|
-
path:
|
|
24
|
-
value:
|
|
25
|
-
key:
|
|
26
|
-
value:
|
|
7
|
+
var wt = m.Union(m.String, m.Number), Tt = m.Record({
|
|
8
|
+
key: m.String,
|
|
9
|
+
value: m.Unknown
|
|
10
|
+
}).pipe(m.filter((e) => "id" in e, { message: () => "patch row must carry an id" })), Et = m.Union(m.Struct({
|
|
11
|
+
op: m.Literal("add"),
|
|
12
|
+
path: m.String,
|
|
13
|
+
value: Tt
|
|
14
|
+
}), m.Struct({
|
|
15
|
+
op: m.Literal("replace"),
|
|
16
|
+
path: m.String,
|
|
17
|
+
value: Tt
|
|
18
|
+
}), m.Struct({
|
|
19
|
+
op: m.Literal("remove"),
|
|
20
|
+
path: m.String
|
|
21
|
+
}), m.Struct({
|
|
22
|
+
op: m.Literal("mergeCells"),
|
|
23
|
+
path: m.String,
|
|
24
|
+
value: m.Record({
|
|
25
|
+
key: m.String,
|
|
26
|
+
value: m.Unknown
|
|
27
27
|
})
|
|
28
|
-
})),
|
|
29
|
-
ops:
|
|
30
|
-
order:
|
|
31
|
-
}), g = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
28
|
+
})), Dt = m.Struct({
|
|
29
|
+
ops: m.Array(Et),
|
|
30
|
+
order: m.Array(wt)
|
|
31
|
+
}), g = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`, Ot = (e) => (e.startsWith("/") ? e.slice(1) : e).replace(/~1/g, "/").replace(/~0/g, "~"), _ = (e) => {
|
|
32
32
|
let t = Object.keys(e).sort(), n = {};
|
|
33
33
|
for (let r of t) n[r] = e[r];
|
|
34
34
|
return JSON.stringify(n);
|
|
35
|
-
}, v = (e, t) => _(e) === _(t),
|
|
35
|
+
}, v = (e, t) => _(e) === _(t), kt = (e, t) => {
|
|
36
36
|
if (e instanceof Uint8Array && t instanceof Uint8Array) {
|
|
37
37
|
if (e.length !== t.length) return !1;
|
|
38
38
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
@@ -45,14 +45,14 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
45
45
|
id: 0,
|
|
46
46
|
v: t
|
|
47
47
|
});
|
|
48
|
-
},
|
|
48
|
+
}, At = (e, t, n = {}) => {
|
|
49
49
|
let r = /* @__PURE__ */ new Map();
|
|
50
50
|
for (let t of e) r.set(t.id, t);
|
|
51
51
|
let i = [], a = [], o = /* @__PURE__ */ new Set(), s = n.crdt, c = (e, t) => {
|
|
52
52
|
if (s === void 0 || s.columns.size === 0) return;
|
|
53
53
|
let n = {}, r = !1;
|
|
54
54
|
for (let i of s.columns) {
|
|
55
|
-
if (!(i in t) ||
|
|
55
|
+
if (!(i in t) || kt(e[i], t[i])) continue;
|
|
56
56
|
let a = s.incremental(i, e[i], t[i]);
|
|
57
57
|
if (a === void 0) return;
|
|
58
58
|
n[i] = a, r = !0;
|
|
@@ -98,15 +98,15 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
98
98
|
ops: i,
|
|
99
99
|
order: a
|
|
100
100
|
};
|
|
101
|
-
},
|
|
101
|
+
}, jt = (e) => e.every((e) => {
|
|
102
102
|
let t = e.id;
|
|
103
103
|
return typeof t == "string" || typeof t == "number";
|
|
104
|
-
}),
|
|
104
|
+
}), Mt = (e, t, n = {}) => {
|
|
105
105
|
let r = /* @__PURE__ */ new Map();
|
|
106
106
|
for (let t of e) r.set(t.id, t);
|
|
107
107
|
for (let e of t.ops) {
|
|
108
108
|
if (e.op === "mergeCells") {
|
|
109
|
-
let t =
|
|
109
|
+
let t = Ot(e.path), i = r.get(t) ?? r.get(Number(t)), a = r.has(t) ? t : Number(t);
|
|
110
110
|
if (i === void 0) continue;
|
|
111
111
|
let o = { ...i };
|
|
112
112
|
for (let [t, r] of Object.entries(e.value)) o[t] = n.mergeCell === void 0 ? r : n.mergeCell(t, i[t], r);
|
|
@@ -121,57 +121,69 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
121
121
|
t !== void 0 && i.push(t);
|
|
122
122
|
}
|
|
123
123
|
return i;
|
|
124
|
-
},
|
|
125
|
-
_tag:
|
|
126
|
-
revision:
|
|
124
|
+
}, Nt = (e) => m.Union(m.Struct({
|
|
125
|
+
_tag: m.Literal("snapshot"),
|
|
126
|
+
revision: m.Number,
|
|
127
127
|
data: e,
|
|
128
|
-
computed:
|
|
129
|
-
reconciles:
|
|
130
|
-
}),
|
|
131
|
-
_tag:
|
|
132
|
-
revision:
|
|
133
|
-
emittedAt:
|
|
134
|
-
patch:
|
|
135
|
-
}),
|
|
136
|
-
_tag:
|
|
137
|
-
error:
|
|
138
|
-
revision:
|
|
139
|
-
})),
|
|
128
|
+
computed: m.optional(m.Boolean),
|
|
129
|
+
reconciles: m.optional(m.String)
|
|
130
|
+
}), m.Struct({
|
|
131
|
+
_tag: m.Literal("delta"),
|
|
132
|
+
revision: m.Number,
|
|
133
|
+
emittedAt: m.Number,
|
|
134
|
+
patch: Dt
|
|
135
|
+
}), m.Struct({
|
|
136
|
+
_tag: m.Literal("error"),
|
|
137
|
+
error: m.Unknown,
|
|
138
|
+
revision: m.optional(m.Number)
|
|
139
|
+
})), Pt = (e, t, n) => {
|
|
140
|
+
if (!t || typeof t != "object" || !("_tag" in t)) return t;
|
|
141
|
+
let r = t;
|
|
142
|
+
switch (r._tag) {
|
|
143
|
+
case "snapshot": return r.data;
|
|
144
|
+
case "error": {
|
|
145
|
+
let t = r.error;
|
|
146
|
+
throw Object.assign(Error(`${n} ${e}: ${t?._tag ?? "error"}${t?.message ? ` — ${t.message}` : ""}`, { cause: r.error }), { voltroError: r.error });
|
|
147
|
+
}
|
|
148
|
+
case "delta": throw Error(`${n} ${e}: received a 'delta' as the first event, which should be impossible — a subscription always opens with a snapshot. This is a framework bug.`);
|
|
149
|
+
default: return t;
|
|
150
|
+
}
|
|
151
|
+
}, Ft = (e, t) => {
|
|
140
152
|
let n = `${e ?? "this procedure"} input`;
|
|
141
153
|
return t === !0 ? `${n} (guarded — the guard did NOT run: the payload failed to decode first, so this says nothing about access)` : n;
|
|
142
|
-
},
|
|
154
|
+
}, It = (e) => {
|
|
143
155
|
let t = e.ast;
|
|
144
156
|
return t._tag === "TypeLiteral" && (t.propertySignatures?.length ?? 0) === 0 && (t.indexSignatures?.length ?? 0) === 0;
|
|
145
|
-
},
|
|
146
|
-
let r =
|
|
157
|
+
}, y = (e, t, n) => {
|
|
158
|
+
let r = Ft(t, n), i = e.annotations({
|
|
147
159
|
parseOptions: { onExcessProperty: "error" },
|
|
148
160
|
parseIssueTitle: () => r
|
|
149
161
|
});
|
|
150
|
-
return
|
|
151
|
-
},
|
|
152
|
-
rule:
|
|
153
|
-
params:
|
|
154
|
-
key:
|
|
155
|
-
value:
|
|
162
|
+
return It(e) ? m.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;
|
|
163
|
+
}, Lt = class extends m.TaggedError()("BusinessRuleViolation", {
|
|
164
|
+
rule: m.String,
|
|
165
|
+
params: m.optional(m.Record({
|
|
166
|
+
key: m.String,
|
|
167
|
+
value: m.Unknown
|
|
156
168
|
})),
|
|
157
|
-
field:
|
|
158
|
-
message:
|
|
159
|
-
severity:
|
|
160
|
-
}) {},
|
|
161
|
-
field:
|
|
162
|
-
message:
|
|
163
|
-
params:
|
|
164
|
-
key:
|
|
165
|
-
value:
|
|
169
|
+
field: m.optional(m.String),
|
|
170
|
+
message: m.optional(m.String),
|
|
171
|
+
severity: m.Literal("error", "warning")
|
|
172
|
+
}) {}, Rt = m.Struct({
|
|
173
|
+
field: m.String,
|
|
174
|
+
message: m.String,
|
|
175
|
+
params: m.optional(m.Record({
|
|
176
|
+
key: m.String,
|
|
177
|
+
value: m.Unknown
|
|
166
178
|
}))
|
|
167
|
-
}),
|
|
168
|
-
field:
|
|
169
|
-
message:
|
|
170
|
-
params:
|
|
171
|
-
key:
|
|
172
|
-
value:
|
|
179
|
+
}), zt = class extends m.TaggedError()("ValidationError", {
|
|
180
|
+
field: m.String,
|
|
181
|
+
message: m.String,
|
|
182
|
+
params: m.optional(m.Record({
|
|
183
|
+
key: m.String,
|
|
184
|
+
value: m.Unknown
|
|
173
185
|
}))
|
|
174
|
-
}) {},
|
|
186
|
+
}) {}, Bt = class extends m.TaggedError()("ValidationErrors", { issues: m.Array(Rt).pipe(m.minItems(1)) }) {}, Vt = (e) => {
|
|
175
187
|
if (typeof e != "object" || !e) return [];
|
|
176
188
|
let t = e._tag;
|
|
177
189
|
if (t === "ValidationError") {
|
|
@@ -197,69 +209,69 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
197
209
|
}];
|
|
198
210
|
}
|
|
199
211
|
return [];
|
|
200
|
-
},
|
|
201
|
-
approvalId:
|
|
202
|
-
procedure:
|
|
203
|
-
expiresAt:
|
|
204
|
-
requiredScopes:
|
|
205
|
-
reason:
|
|
206
|
-
created:
|
|
207
|
-
}) {},
|
|
208
|
-
approvalId:
|
|
209
|
-
subjectId:
|
|
210
|
-
}) {},
|
|
211
|
-
approvalId:
|
|
212
|
-
decidedBy:
|
|
213
|
-
note:
|
|
214
|
-
}) {},
|
|
215
|
-
approvalId:
|
|
216
|
-
expiredAt:
|
|
217
|
-
}) {},
|
|
218
|
-
approvalId:
|
|
219
|
-
status:
|
|
220
|
-
}) {},
|
|
221
|
-
approvalId:
|
|
222
|
-
required:
|
|
223
|
-
message:
|
|
224
|
-
}) {},
|
|
225
|
-
procedure:
|
|
226
|
-
message:
|
|
227
|
-
}) {},
|
|
228
|
-
id:
|
|
229
|
-
procedure:
|
|
230
|
-
kind:
|
|
231
|
-
requestedBy:
|
|
232
|
-
status:
|
|
233
|
-
reason:
|
|
234
|
-
requiredScopes:
|
|
235
|
-
requestedAt:
|
|
236
|
-
expiresAt:
|
|
237
|
-
decidedBy:
|
|
238
|
-
decidedAt:
|
|
239
|
-
note:
|
|
240
|
-
relation:
|
|
241
|
-
}),
|
|
242
|
-
if (
|
|
212
|
+
}, Ht = class extends m.TaggedError()("ApprovalRequired", {
|
|
213
|
+
approvalId: m.String,
|
|
214
|
+
procedure: m.String,
|
|
215
|
+
expiresAt: m.String,
|
|
216
|
+
requiredScopes: m.Array(m.String),
|
|
217
|
+
reason: m.NullOr(m.String),
|
|
218
|
+
created: m.Boolean
|
|
219
|
+
}) {}, Ut = class extends m.TaggedError()("ApprovalNotFound", { approvalId: m.String }) {}, Wt = class extends m.TaggedError()("ApprovalSelfApproval", {
|
|
220
|
+
approvalId: m.String,
|
|
221
|
+
subjectId: m.NullOr(m.String)
|
|
222
|
+
}) {}, Gt = class extends m.TaggedError()("ApprovalRejected", {
|
|
223
|
+
approvalId: m.String,
|
|
224
|
+
decidedBy: m.NullOr(m.String),
|
|
225
|
+
note: m.NullOr(m.String)
|
|
226
|
+
}) {}, b = class extends m.TaggedError()("ApprovalExpired", {
|
|
227
|
+
approvalId: m.String,
|
|
228
|
+
expiredAt: m.String
|
|
229
|
+
}) {}, Kt = class extends m.TaggedError()("ApprovalNotPending", {
|
|
230
|
+
approvalId: m.String,
|
|
231
|
+
status: m.String
|
|
232
|
+
}) {}, qt = class extends m.TaggedError()("ApprovalForbidden", {
|
|
233
|
+
approvalId: m.String,
|
|
234
|
+
required: m.NullOr(m.String),
|
|
235
|
+
message: m.String
|
|
236
|
+
}) {}, x = class extends m.TaggedError()("ApprovalUnavailable", {
|
|
237
|
+
procedure: m.String,
|
|
238
|
+
message: m.String
|
|
239
|
+
}) {}, Jt = m.Union(Ht, Gt, b, x), Yt = m.Union(Ut, Wt, b, Kt, qt, x), Xt = m.Struct({
|
|
240
|
+
id: m.String,
|
|
241
|
+
procedure: m.String,
|
|
242
|
+
kind: m.Literal("mutation", "action"),
|
|
243
|
+
requestedBy: m.NullOr(m.String),
|
|
244
|
+
status: m.Literal("pending", "approved", "rejected", "expired", "consumed"),
|
|
245
|
+
reason: m.NullOr(m.String),
|
|
246
|
+
requiredScopes: m.Array(m.String),
|
|
247
|
+
requestedAt: m.String,
|
|
248
|
+
expiresAt: m.String,
|
|
249
|
+
decidedBy: m.NullOr(m.String),
|
|
250
|
+
decidedAt: m.NullOr(m.String),
|
|
251
|
+
note: m.NullOr(m.String),
|
|
252
|
+
relation: m.Literal("to-decide", "requested")
|
|
253
|
+
}), S = "channel:", Zt = Symbol.for("@voltro/protocol/reactivityChannels"), Qt = globalThis, C = Qt[Zt] ?? (Qt[Zt] = /* @__PURE__ */ new Map()), $t = /^[a-z][a-z0-9-]*(\.[a-z0-9-]+)*$/, en = (e) => {
|
|
254
|
+
if (!$t.test(e)) throw Error(`reactivityChannel('${e}'): invalid channel name.\n Use lowercase kebab segments separated by dots — \`presence\`, \`job-queue\`,
|
|
243
255
|
\`billing.usage\`. A \`:\` is refused because it is the namespace separator in
|
|
244
|
-
the routing key (\`${
|
|
256
|
+
the routing key (\`${S}<name>\`), and an uppercase letter is\n refused because a key that differs only by case reads as one channel and
|
|
245
257
|
routes as two.`);
|
|
246
|
-
let t =
|
|
258
|
+
let t = C.get(e);
|
|
247
259
|
if (t !== void 0) return t;
|
|
248
|
-
let n = `${
|
|
260
|
+
let n = `${S}${e}`, r = Object.freeze({
|
|
249
261
|
kind: "reactivity-channel",
|
|
250
262
|
name: e,
|
|
251
263
|
key: n,
|
|
252
264
|
toString: () => n
|
|
253
265
|
});
|
|
254
|
-
return
|
|
255
|
-
},
|
|
256
|
-
let t =
|
|
257
|
-
for (let r of e) for (let e of
|
|
266
|
+
return C.set(e, r), r;
|
|
267
|
+
}, tn = (e) => typeof e == "object" && !!e && e.kind === "reactivity-channel", nn = (e) => e.startsWith(S), rn = () => new Set([...C.values()].map((e) => e.key)), w = (e) => tn(e) ? e.key : e, an = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map(w) : [w(e)], on = (e) => e === void 0 ? void 0 : Array.isArray(e) ? e.map(w) : w(e), sn = (e) => {
|
|
268
|
+
let t = rn(), n = [];
|
|
269
|
+
for (let r of e) for (let e of an(r.source)) nn(e) && !t.has(e) && n.push({
|
|
258
270
|
procedure: r.name,
|
|
259
271
|
key: e
|
|
260
272
|
});
|
|
261
273
|
return n;
|
|
262
|
-
},
|
|
274
|
+
}, cn = (e, t) => {
|
|
263
275
|
let n = e?.injectExternalChange;
|
|
264
276
|
return n !== void 0 && (n.call(e, {
|
|
265
277
|
table: t.key,
|
|
@@ -268,8 +280,8 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
268
280
|
old: {},
|
|
269
281
|
origin: "inline"
|
|
270
282
|
}), !0);
|
|
271
|
-
},
|
|
272
|
-
if (
|
|
283
|
+
}, T = (e) => e.internal !== !0, ln = (e) => e.service === void 0 ? "client" : "service", un = (e) => T(e) && e.service === void 0, dn = (e) => T(e) && e.service !== void 0, E = /^[a-z][a-z0-9-]{0,55}$/i, D = (e) => {
|
|
284
|
+
if (pn(e), fn(e), e.idempotencyScope !== void 0 && e.idempotencyScope !== "subject" && e.idempotencyScope !== "connection") throw Error(`${e.name}: idempotencyScope must be 'subject' or 'connection'`);
|
|
273
285
|
let t = e.serialize;
|
|
274
286
|
if (t !== void 0) {
|
|
275
287
|
if (typeof t.key != "function") throw Error(`${e.name}: serialize.key must be a function of the input`);
|
|
@@ -293,7 +305,27 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
293
305
|
let r = [e.publicApi === void 0 ? void 0 : "publicApi", e.exposeAsTool === void 0 ? void 0 : "exposeAsTool"].filter((e) => e !== void 0);
|
|
294
306
|
if (r.length === 0) return e;
|
|
295
307
|
throw Error(`${e.name}: \`internal: true\` cannot be combined with ${r.map((e) => `\`${e}\``).join(" or ")}. \`internal\` takes the procedure OFF the wire; those put it back ON a different one (${r.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 ${r.join(" / ")} annotation if it is not.`);
|
|
296
|
-
},
|
|
308
|
+
}, fn = (e) => {
|
|
309
|
+
let t = e.service;
|
|
310
|
+
if (t === void 0) return;
|
|
311
|
+
let n = t.callers;
|
|
312
|
+
if (!Array.isArray(n) || n.length === 0) throw Error(`${e.name}: \`service.callers\` is empty, so NO app may call this procedure —\n and no browser either. Name the calling app(s), e.g. \`service: { callers: ['worker'] }\`,
|
|
313
|
+
or drop \`service:\` if the procedure is meant for this app's own clients.`);
|
|
314
|
+
let r = n.filter((e) => typeof e != "string" || !E.test(e));
|
|
315
|
+
if (r.length > 0) throw Error(`${e.name}: \`service.callers\` holds ${r.map((e) => JSON.stringify(e)).join(", ")} — a caller is an\n app name (letters, digits, dashes; starting with a letter; at most 56 characters), the same name this app
|
|
316
|
+
lists in \`serviceCallers\` and the caller's credential resolves to.`);
|
|
317
|
+
if (new Set(n).size !== n.length) throw Error(`${e.name}: \`service.callers\` lists the same app twice`);
|
|
318
|
+
let i = [
|
|
319
|
+
e.internal === !0 ? "`internal: true` (it removes the wire surface a service calls over)" : void 0,
|
|
320
|
+
e.publicApi === void 0 ? void 0 : "`publicApi` (a REST route is for callers that are not the listed apps)",
|
|
321
|
+
e.exposeAsTool === void 0 ? void 0 : "`exposeAsTool` (an agent tool is not one of the listed apps)",
|
|
322
|
+
e.requiresApproval === void 0 ? void 0 : "`requiresApproval` (a second HUMAN cannot approve a machine call)",
|
|
323
|
+
e.overridesPlugin === !0 ? "`overridesPlugin` (a plugin route is a client surface; replacing it with a service-only one breaks its clients)" : void 0,
|
|
324
|
+
e.idempotencyScope === "connection" ? "`idempotencyScope: 'connection'` (a service call dedups per service, across reconnects)" : void 0
|
|
325
|
+
].filter((e) => e !== void 0);
|
|
326
|
+
if (i.length !== 0) throw Error(`${e.name}: \`service:\` cannot be combined with ${i.join("; ")}.\n A service procedure is callable only by the listed apps of this project, over the
|
|
327
|
+
socket, with their service credential. Drop the other field, or drop \`service:\`.`);
|
|
328
|
+
}, pn = (e) => {
|
|
297
329
|
let t = e.requiresApproval;
|
|
298
330
|
if (t !== void 0) {
|
|
299
331
|
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
|
|
@@ -303,23 +335,29 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
303
335
|
human from every other, and the second-pair-of-eyes control would enforce nothing.
|
|
304
336
|
Give the procedure a \`guards:\` decision, or drop \`requiresApproval\`.`);
|
|
305
337
|
}
|
|
306
|
-
},
|
|
338
|
+
}, mn = (e) => e.action !== void 0 && e.resourceType !== void 0, hn = (e) => e.authenticated === !0, gn = (e) => e.openAccess !== void 0 || e.guards !== void 0 && e.guards.length > 0, O = (e, t, n, r) => {
|
|
339
|
+
if (r !== void 0) {
|
|
340
|
+
if (n !== void 0 || t !== void 0 && t.length > 0) throw Error(`${e}: \`service:\` is an access decision of its own — only the listed apps may\n call this procedure — so it cannot sit beside \`guards:\` or \`openAccess:\`. A service
|
|
341
|
+
holds no scopes, and no user may call a service procedure. Keep exactly one.`);
|
|
342
|
+
return Array.isArray(r.callers) ? [d(r.callers)] : void 0;
|
|
343
|
+
}
|
|
307
344
|
if (n === void 0) return t;
|
|
308
345
|
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
|
|
309
346
|
without an authorization check — e.g. \`openAccess: 'public pricing, no caller data'\`.`);
|
|
310
347
|
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
|
|
311
348
|
caller must hold a scope; drop them if anyone may call it.`);
|
|
312
|
-
return [
|
|
349
|
+
return [f(n.trim())];
|
|
313
350
|
}, k = (e) => D({
|
|
314
351
|
kind: "query",
|
|
315
352
|
name: e.name,
|
|
316
353
|
input: e.input,
|
|
317
354
|
output: e.output,
|
|
318
|
-
error: e.error ??
|
|
319
|
-
source:
|
|
355
|
+
error: e.error ?? m.Never,
|
|
356
|
+
source: on(e.source),
|
|
320
357
|
cache: e.cache,
|
|
321
|
-
guards: O(e.name, e.guards, e.openAccess),
|
|
358
|
+
guards: O(e.name, e.guards, e.openAccess, e.service),
|
|
322
359
|
openAccess: e.openAccess,
|
|
360
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
323
361
|
publicApi: e.publicApi,
|
|
324
362
|
exposeAsTool: e.exposeAsTool,
|
|
325
363
|
internal: e.internal,
|
|
@@ -329,12 +367,13 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
329
367
|
name: e.name,
|
|
330
368
|
input: e.input,
|
|
331
369
|
output: e.output,
|
|
332
|
-
error: e.error ??
|
|
370
|
+
error: e.error ?? m.Never,
|
|
333
371
|
...e.idempotencyScope === void 0 ? {} : { idempotencyScope: e.idempotencyScope },
|
|
334
372
|
...e.serialize === void 0 ? {} : { serialize: e.serialize },
|
|
335
373
|
target: e.target,
|
|
336
|
-
guards: O(e.name, e.guards, e.openAccess),
|
|
374
|
+
guards: O(e.name, e.guards, e.openAccess, e.service),
|
|
337
375
|
openAccess: e.openAccess,
|
|
376
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
338
377
|
publicApi: e.publicApi,
|
|
339
378
|
exposeAsTool: e.exposeAsTool,
|
|
340
379
|
requiresApproval: e.requiresApproval,
|
|
@@ -345,9 +384,10 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
345
384
|
name: e.name,
|
|
346
385
|
input: e.input,
|
|
347
386
|
output: e.output,
|
|
348
|
-
error: e.error ??
|
|
349
|
-
guards: O(e.name, e.guards, e.openAccess),
|
|
387
|
+
error: e.error ?? m.Never,
|
|
388
|
+
guards: O(e.name, e.guards, e.openAccess, e.service),
|
|
350
389
|
openAccess: e.openAccess,
|
|
390
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
351
391
|
source: e.source,
|
|
352
392
|
target: e.target,
|
|
353
393
|
publicApi: e.publicApi,
|
|
@@ -355,54 +395,54 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
355
395
|
requiresApproval: e.requiresApproval,
|
|
356
396
|
internal: e.internal,
|
|
357
397
|
overridesPlugin: e.overridesPlugin
|
|
358
|
-
}),
|
|
398
|
+
}), _n = (e) => D({
|
|
359
399
|
kind: "stream",
|
|
360
400
|
name: e.name,
|
|
361
401
|
input: e.input,
|
|
362
402
|
element: e.element,
|
|
363
|
-
error: e.error ??
|
|
403
|
+
error: e.error ?? m.Never,
|
|
364
404
|
internal: e.internal,
|
|
365
405
|
overridesPlugin: e.overridesPlugin,
|
|
366
406
|
guards: O(e.name, e.guards, e.openAccess),
|
|
367
407
|
openAccess: e.openAccess
|
|
368
|
-
}), M = (e, t) => t && t.length > 0 ?
|
|
369
|
-
let n =
|
|
408
|
+
}), M = (e, t) => t && t.length > 0 ? m.Union(e, ...t) : e, N = (e) => e !== void 0 && e.some((e) => !l(e)), vn = (e) => m.Union(e, u, p), yn = (e) => m.Union(e, Lt), bn = (e) => m.Union(e, zt, Bt), xn = (e, t) => t === void 0 ? e : m.Union(e, Jt), P = (e, t) => {
|
|
409
|
+
let n = vn(e.error);
|
|
370
410
|
if (t === "stream" || t === "query") return n;
|
|
371
|
-
let r = t === "mutation" ?
|
|
372
|
-
return
|
|
373
|
-
},
|
|
411
|
+
let r = t === "mutation" ? m.Union(yn(n), Xe, Ct) : n;
|
|
412
|
+
return xn(bn(t === "mutation" && e.idempotencyScope === "connection" ? m.Union(r, yt) : r), e.requiresApproval);
|
|
413
|
+
}, Sn = (e, t) => M(vn(e.errorSchema), t), Cn = (e, t) => ({
|
|
374
414
|
...e,
|
|
375
415
|
name: t
|
|
376
|
-
}),
|
|
377
|
-
payload:
|
|
378
|
-
success:
|
|
416
|
+
}), wn = (e, t) => h.make(e.name, {
|
|
417
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
418
|
+
success: Nt(e.output),
|
|
379
419
|
error: M(P(e, "query"), t),
|
|
380
420
|
stream: !0
|
|
381
|
-
}),
|
|
382
|
-
payload:
|
|
421
|
+
}), Tn = (e, t) => h.make(e.name, {
|
|
422
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
383
423
|
success: e.output,
|
|
384
424
|
error: M(P(e, "mutation"), t)
|
|
385
|
-
}),
|
|
386
|
-
payload:
|
|
425
|
+
}), En = (e, t) => h.make(e.name, {
|
|
426
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
387
427
|
success: e.output,
|
|
388
428
|
error: M(P(e, "action"), t)
|
|
389
|
-
}),
|
|
390
|
-
payload:
|
|
429
|
+
}), Dn = (e, t) => h.make(e.name, {
|
|
430
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
391
431
|
success: e.element,
|
|
392
432
|
error: M(e.error, t),
|
|
393
433
|
stream: !0
|
|
394
|
-
}),
|
|
434
|
+
}), On = (e) => {
|
|
395
435
|
if (typeof e != "object" || !e) return;
|
|
396
436
|
let t = e._tag;
|
|
397
437
|
return typeof t == "string" ? t : void 0;
|
|
398
|
-
},
|
|
438
|
+
}, kn = (e) => {
|
|
399
439
|
switch (e.kind) {
|
|
400
|
-
case "query": return
|
|
401
|
-
case "mutation": return
|
|
402
|
-
case "action": return
|
|
403
|
-
case "stream": return
|
|
440
|
+
case "query": return wn(e);
|
|
441
|
+
case "mutation": return Tn(e);
|
|
442
|
+
case "action": return En(e);
|
|
443
|
+
case "stream": return Dn(e);
|
|
404
444
|
}
|
|
405
|
-
},
|
|
445
|
+
}, An = (e) => {
|
|
406
446
|
let t = e.input, n = t === void 0 ? {} : { input: t }, r = e.output, i = r === void 0 ? {} : { output: r };
|
|
407
447
|
if (e.kind === "query") return {
|
|
408
448
|
kind: "query",
|
|
@@ -448,7 +488,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
448
488
|
..."relations" in e && e.relations !== void 0 ? { relations: e.relations } : {}
|
|
449
489
|
}))
|
|
450
490
|
};
|
|
451
|
-
},
|
|
491
|
+
}, jn = 7500, Mn = (e) => typeof e == "object" && !!e && e.kind === "event", Nn = (e) => {
|
|
452
492
|
if (e.name.length === 0) throw Error("defineEvent: `name` must not be empty");
|
|
453
493
|
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
|
|
454
494
|
whitespace and delivers nothing — silently, and only on that broker, so an
|
|
@@ -477,68 +517,68 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
477
517
|
name: e.name,
|
|
478
518
|
key: e.key,
|
|
479
519
|
payload: e.payload,
|
|
480
|
-
guards: e.openAccess === void 0 ? e.guards : [
|
|
520
|
+
guards: e.openAccess === void 0 ? e.guards : [f(e.openAccess.trim())],
|
|
481
521
|
openAccess: e.openAccess,
|
|
482
522
|
rewind: e.rewind,
|
|
483
523
|
webhook: e.webhook,
|
|
484
524
|
delivery: e.delivery
|
|
485
525
|
};
|
|
486
|
-
},
|
|
487
|
-
_tag:
|
|
488
|
-
origin:
|
|
489
|
-
n:
|
|
490
|
-
emittedAt:
|
|
526
|
+
}, Pn = (e) => m.Struct({
|
|
527
|
+
_tag: m.Literal("event"),
|
|
528
|
+
origin: m.String,
|
|
529
|
+
n: m.Number,
|
|
530
|
+
emittedAt: m.Number,
|
|
491
531
|
payload: e
|
|
492
|
-
}),
|
|
493
|
-
_tag:
|
|
494
|
-
missed:
|
|
495
|
-
reason:
|
|
496
|
-
}),
|
|
497
|
-
origin:
|
|
498
|
-
n:
|
|
499
|
-
}),
|
|
532
|
+
}), Fn = m.Struct({
|
|
533
|
+
_tag: m.Literal("gap"),
|
|
534
|
+
missed: m.Number,
|
|
535
|
+
reason: m.Literal("buffer", "resume")
|
|
536
|
+
}), In = m.Struct({ _tag: m.Literal("attached") }), Ln = (e) => m.Union(In, Pn(e), Fn), Rn = m.Struct({
|
|
537
|
+
origin: m.String,
|
|
538
|
+
n: m.Number
|
|
539
|
+
}), zn = (e) => m.Struct({
|
|
500
540
|
key: e,
|
|
501
|
-
resume:
|
|
502
|
-
}),
|
|
503
|
-
let n = e.guards !== void 0 && e.guards.some((e) => !
|
|
504
|
-
return
|
|
505
|
-
payload:
|
|
506
|
-
success:
|
|
541
|
+
resume: m.optional(m.Array(Rn))
|
|
542
|
+
}), Bn = (e, t) => {
|
|
543
|
+
let n = e.guards !== void 0 && e.guards.some((e) => !l(e)) ? m.Union(u, p) : p, r = t && t.length > 0 ? m.Union(n, ...t) : n;
|
|
544
|
+
return h.make(e.name, {
|
|
545
|
+
payload: y(zn(e.key), e.name, N(e.guards)),
|
|
546
|
+
success: Ln(e.payload),
|
|
507
547
|
error: r,
|
|
508
548
|
stream: !0
|
|
509
549
|
});
|
|
510
|
-
},
|
|
511
|
-
event:
|
|
512
|
-
message:
|
|
513
|
-
}) {},
|
|
514
|
-
event:
|
|
515
|
-
message:
|
|
516
|
-
}) {},
|
|
517
|
-
event:
|
|
518
|
-
bytes:
|
|
519
|
-
limit:
|
|
520
|
-
}) {},
|
|
550
|
+
}, Vn = class extends m.TaggedError()("EventPayloadInvalid", {
|
|
551
|
+
event: m.String,
|
|
552
|
+
message: m.String
|
|
553
|
+
}) {}, Hn = class extends m.TaggedError()("EventKeyInvalid", {
|
|
554
|
+
event: m.String,
|
|
555
|
+
message: m.String
|
|
556
|
+
}) {}, Un = class extends m.TaggedError()("EventPayloadTooLarge", {
|
|
557
|
+
event: m.String,
|
|
558
|
+
bytes: m.Number,
|
|
559
|
+
limit: m.Number
|
|
560
|
+
}) {}, Wn = (e) => {
|
|
521
561
|
if (typeof e != "object" || !e) return JSON.stringify(e) ?? "null";
|
|
522
562
|
let t = Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
523
563
|
return JSON.stringify(t);
|
|
524
|
-
},
|
|
564
|
+
}, Gn = "\0", Kn = (e, t, n) => [
|
|
525
565
|
e ?? "~",
|
|
526
566
|
t,
|
|
527
|
-
|
|
528
|
-
].join("\0"),
|
|
567
|
+
Wn(n)
|
|
568
|
+
].join("\0"), qn = (e) => {
|
|
529
569
|
let [t = "~", n = "", r = ""] = e.split("\0");
|
|
530
570
|
return {
|
|
531
571
|
tenantId: t === "~" ? null : t,
|
|
532
572
|
event: n,
|
|
533
573
|
key: r
|
|
534
574
|
};
|
|
535
|
-
},
|
|
575
|
+
}, Jn = (e) => e.split("\0").join(" · "), F = Symbol.for("@voltro/protocol/workflow-access"), Yn = {
|
|
536
576
|
guards: void 0,
|
|
537
577
|
openAccess: void 0,
|
|
538
578
|
internal: !1,
|
|
539
579
|
controls: void 0,
|
|
540
580
|
controlsOpenAccess: void 0
|
|
541
|
-
},
|
|
581
|
+
}, Xn = (e, t) => {
|
|
542
582
|
let n = t.guards;
|
|
543
583
|
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
|
|
544
584
|
and decide with \`openAccess\` or \`internal\`, or list the scopes that may start it.`);
|
|
@@ -564,22 +604,22 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
564
604
|
if (r !== void 0 && r.length > 0) throw Error(`workflow("${e}"): \`controls\` takes \`guards\` OR \`openAccess\`, not both.\n Two answers to one question; keep the guards if a caller needs a scope.`);
|
|
565
605
|
}
|
|
566
606
|
return {
|
|
567
|
-
guards: t.openAccess === void 0 ? t.guards : [
|
|
607
|
+
guards: t.openAccess === void 0 ? t.guards : [f(t.openAccess.trim())],
|
|
568
608
|
openAccess: t.openAccess?.trim(),
|
|
569
609
|
internal: t.internal === !0,
|
|
570
|
-
controls: i === void 0 ? r : [
|
|
610
|
+
controls: i === void 0 ? r : [f(i.trim())],
|
|
571
611
|
controlsOpenAccess: i?.trim()
|
|
572
612
|
};
|
|
573
|
-
},
|
|
613
|
+
}, Zn = (e, t) => {
|
|
574
614
|
Object.defineProperty(e, F, {
|
|
575
615
|
value: t,
|
|
576
616
|
enumerable: !1
|
|
577
617
|
});
|
|
578
618
|
}, I = (e) => {
|
|
579
|
-
if (typeof e != "object" || !e) return
|
|
619
|
+
if (typeof e != "object" || !e) return Yn;
|
|
580
620
|
let t = e[F];
|
|
581
|
-
return t === void 0 ?
|
|
582
|
-
},
|
|
621
|
+
return t === void 0 ? Yn : t;
|
|
622
|
+
}, Qn = (e) => {
|
|
583
623
|
let t = I(e);
|
|
584
624
|
return {
|
|
585
625
|
name: e.name,
|
|
@@ -588,18 +628,23 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
588
628
|
openAccess: t.openAccess,
|
|
589
629
|
controls: t.controls
|
|
590
630
|
};
|
|
591
|
-
},
|
|
631
|
+
}, $n = class extends m.TaggedError()("ApiUnavailable", {
|
|
632
|
+
api: m.String,
|
|
633
|
+
tag: m.String,
|
|
634
|
+
reason: m.Literal("timeout", "transport", "closed"),
|
|
635
|
+
message: m.String
|
|
636
|
+
}) {}, er = (e) => typeof e == "object" && !!e && e._tag === "ApiUnavailable", tr = (e) => e, nr = (e) => e, rr = (e) => {
|
|
592
637
|
let t = e.alias?.trim(), n = e.instance?.trim(), r = t !== void 0 && t !== "" ? t : e.base;
|
|
593
638
|
return n !== void 0 && n !== "" ? `${r}#${n}` : r;
|
|
594
|
-
},
|
|
639
|
+
}, ir = (e) => {
|
|
595
640
|
if (e.length !== 0) return (t, n) => e.reduceRight((e, t) => t(e, n), t);
|
|
596
|
-
},
|
|
597
|
-
let n =
|
|
641
|
+
}, ar = (e, t) => {
|
|
642
|
+
let n = xt.GenericTag(e);
|
|
598
643
|
return {
|
|
599
644
|
Tag: n,
|
|
600
|
-
Live:
|
|
645
|
+
Live: St.succeed(n, t)
|
|
601
646
|
};
|
|
602
|
-
},
|
|
647
|
+
}, or = (e, t, n) => {
|
|
603
648
|
if (!t) return { ok: !0 };
|
|
604
649
|
let r = n === void 0 ? null : L(n);
|
|
605
650
|
if (!r) return {
|
|
@@ -609,7 +654,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
609
654
|
let i = t.trim();
|
|
610
655
|
if (i === "*" || i === "") return { ok: !0 };
|
|
611
656
|
let a = i.split(/\s+/).filter((e) => e.length > 0);
|
|
612
|
-
for (let i of a) if (!
|
|
657
|
+
for (let i of a) if (!sr(i, r)) return {
|
|
613
658
|
ok: !1,
|
|
614
659
|
reason: `plugin "${e}" requires framework ${t}, running ${n}`
|
|
615
660
|
};
|
|
@@ -622,7 +667,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
622
667
|
patch: Number(t[3]),
|
|
623
668
|
pre: t[4] ?? ""
|
|
624
669
|
} : null;
|
|
625
|
-
}, R = (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,
|
|
670
|
+
}, R = (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, sr = (e, t) => {
|
|
626
671
|
if (e === "*") return !0;
|
|
627
672
|
if (e.startsWith("^")) {
|
|
628
673
|
let n = L(e.slice(1));
|
|
@@ -644,87 +689,87 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
644
689
|
}
|
|
645
690
|
let r = L(e);
|
|
646
691
|
return r ? R(t, r) === 0 : !1;
|
|
647
|
-
},
|
|
692
|
+
}, cr = (e) => {
|
|
648
693
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
649
694
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
|
|
650
|
-
},
|
|
695
|
+
}, lr = (e) => {
|
|
651
696
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
652
697
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
653
|
-
},
|
|
654
|
-
let e = globalThis, t = e[
|
|
698
|
+
}, ur = Symbol.for("@voltro/protocol/pluginAliases"), z = () => {
|
|
699
|
+
let e = globalThis, t = e[ur];
|
|
655
700
|
if (t instanceof Map) return t;
|
|
656
701
|
let n = /* @__PURE__ */ new Map();
|
|
657
|
-
return e[
|
|
658
|
-
},
|
|
702
|
+
return e[ur] = n, n;
|
|
703
|
+
}, dr = (e) => {
|
|
659
704
|
let t = z();
|
|
660
705
|
for (let [n, r] of Object.entries(e)) {
|
|
661
706
|
if (r === "") continue;
|
|
662
707
|
let e = t.get(n);
|
|
663
708
|
e === void 0 ? t.set(n, /* @__PURE__ */ new Set([r])) : e.add(r);
|
|
664
709
|
}
|
|
665
|
-
},
|
|
710
|
+
}, fr = () => {
|
|
666
711
|
z().clear();
|
|
667
|
-
},
|
|
712
|
+
}, pr = (e, t) => {
|
|
668
713
|
let n = z().get(e);
|
|
669
|
-
if (n === void 0 || n.size === 0) return `${
|
|
714
|
+
if (n === void 0 || n.size === 0) return `${cr(e)}.${t}`;
|
|
670
715
|
if (n.size === 1) return `${[...n][0]}.${t}`;
|
|
671
716
|
let r = [...n].filter((e) => !e.includes("#"));
|
|
672
717
|
if (r.length === 1) return `${r[0]}.${t}`;
|
|
673
718
|
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}').`);
|
|
674
|
-
}, B =
|
|
675
|
-
kind:
|
|
676
|
-
at:
|
|
677
|
-
retryAfterMs:
|
|
678
|
-
}),
|
|
679
|
-
kind:
|
|
680
|
-
at:
|
|
681
|
-
executionId:
|
|
682
|
-
runId:
|
|
683
|
-
}),
|
|
684
|
-
kind:
|
|
685
|
-
at:
|
|
686
|
-
}),
|
|
687
|
-
kind:
|
|
688
|
-
at:
|
|
689
|
-
}),
|
|
690
|
-
kind:
|
|
691
|
-
at:
|
|
692
|
-
failureId:
|
|
693
|
-
})), V =
|
|
694
|
-
id:
|
|
695
|
-
workflowName:
|
|
696
|
-
executionId:
|
|
697
|
-
status:
|
|
698
|
-
output:
|
|
699
|
-
error:
|
|
700
|
-
tag:
|
|
701
|
-
message:
|
|
719
|
+
}, B = m.Union(m.Struct({
|
|
720
|
+
kind: m.Literal("dropped"),
|
|
721
|
+
at: m.Number,
|
|
722
|
+
retryAfterMs: m.Number
|
|
723
|
+
}), m.Struct({
|
|
724
|
+
kind: m.Literal("skipped"),
|
|
725
|
+
at: m.Number,
|
|
726
|
+
executionId: m.String,
|
|
727
|
+
runId: m.String
|
|
728
|
+
}), m.Struct({
|
|
729
|
+
kind: m.Literal("superseded"),
|
|
730
|
+
at: m.Number
|
|
731
|
+
}), m.Struct({
|
|
732
|
+
kind: m.Literal("cancelled"),
|
|
733
|
+
at: m.Number
|
|
734
|
+
}), m.Struct({
|
|
735
|
+
kind: m.Literal("abandoned"),
|
|
736
|
+
at: m.Number,
|
|
737
|
+
failureId: m.NonEmptyString
|
|
738
|
+
})), V = m.Literal("running", "succeeded", "failed", "cancelled", "suspended"), H = m.Struct({
|
|
739
|
+
id: m.String,
|
|
740
|
+
workflowName: m.String,
|
|
741
|
+
executionId: m.String,
|
|
742
|
+
status: m.Union(V, m.Literal("unknown")),
|
|
743
|
+
output: m.optional(m.Unknown),
|
|
744
|
+
error: m.optional(m.Struct({
|
|
745
|
+
tag: m.NullOr(m.String),
|
|
746
|
+
message: m.String
|
|
702
747
|
}))
|
|
703
|
-
}), U =
|
|
704
|
-
operation:
|
|
705
|
-
kind:
|
|
706
|
-
requestId:
|
|
748
|
+
}), U = m.Struct({
|
|
749
|
+
operation: m.Literal("cancel", "resume"),
|
|
750
|
+
kind: m.Literal("accepted", "confirmed", "unknown", "already-terminal"),
|
|
751
|
+
requestId: m.NullOr(m.NonEmptyString),
|
|
707
752
|
snapshot: H
|
|
708
|
-
}).pipe(
|
|
709
|
-
operation:
|
|
710
|
-
workflowName:
|
|
711
|
-
receiptId:
|
|
712
|
-
requestId:
|
|
713
|
-
kind:
|
|
714
|
-
observation:
|
|
715
|
-
kind:
|
|
716
|
-
outcome:
|
|
717
|
-
kind:
|
|
718
|
-
failureId:
|
|
753
|
+
}).pipe(m.filter((e) => e.kind === "unknown" ? !0 : e.kind === "accepted" ? e.requestId !== null && (e.snapshot.status === "running" || e.snapshot.status === "suspended") : e.kind === "already-terminal" ? e.snapshot.status === "succeeded" || e.snapshot.status === "failed" || e.snapshot.status === "cancelled" : e.operation === "cancel" ? e.snapshot.status === "cancelled" : e.requestId !== null && e.snapshot.status === "running", { message: () => "Workflow control acknowledgement contradicts its observed state or receipt identity" })), W = m.Struct({
|
|
754
|
+
operation: m.Literal("cancel"),
|
|
755
|
+
workflowName: m.NonEmptyString,
|
|
756
|
+
receiptId: m.NonEmptyString,
|
|
757
|
+
requestId: m.NullOr(m.NonEmptyString),
|
|
758
|
+
kind: m.Literal("accepted", "confirmed", "unknown", "already-terminal"),
|
|
759
|
+
observation: m.Union(m.Struct({ kind: m.Literal("pending") }), m.Struct({
|
|
760
|
+
kind: m.Literal("admission"),
|
|
761
|
+
outcome: m.Union(B, m.Struct({
|
|
762
|
+
kind: m.Literal("rejected"),
|
|
763
|
+
failureId: m.NonEmptyString
|
|
719
764
|
}))
|
|
720
|
-
}),
|
|
721
|
-
kind:
|
|
765
|
+
}), m.Struct({
|
|
766
|
+
kind: m.Literal("execution"),
|
|
722
767
|
snapshot: H
|
|
723
|
-
}),
|
|
724
|
-
kind:
|
|
725
|
-
reason:
|
|
768
|
+
}), m.Struct({
|
|
769
|
+
kind: m.Literal("unavailable"),
|
|
770
|
+
reason: m.Literal("missing-request", "missing-run", "unconfirmed-generation", "unbound-submission")
|
|
726
771
|
}))
|
|
727
|
-
}).pipe(
|
|
772
|
+
}).pipe(m.filter((e) => {
|
|
728
773
|
let t = e.observation;
|
|
729
774
|
if (t.kind === "unavailable") return e.kind === "unknown" && (t.reason === "missing-request" ? e.requestId === null : e.requestId !== null);
|
|
730
775
|
if (e.requestId === null) return !1;
|
|
@@ -732,307 +777,307 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
732
777
|
if (t.kind === "admission") return e.kind === (t.outcome.kind === "cancelled" ? "confirmed" : "already-terminal");
|
|
733
778
|
let n = t.snapshot;
|
|
734
779
|
return n.workflowName !== e.workflowName || n.id.length === 0 || n.executionId.length === 0 ? !1 : e.kind === "accepted" ? n.status === "running" || n.status === "suspended" : e.kind === "confirmed" ? n.status === "cancelled" : e.kind === "already-terminal" && (n.status === "succeeded" || n.status === "failed" || n.status === "cancelled");
|
|
735
|
-
}, { message: () => "Queued cancellation acknowledgement contradicts its receipt or observation" })),
|
|
736
|
-
mode:
|
|
737
|
-
dueAt:
|
|
738
|
-
retryAfterMs:
|
|
739
|
-
intentId:
|
|
740
|
-
}),
|
|
741
|
-
id:
|
|
742
|
-
workflowName:
|
|
743
|
-
executionId:
|
|
744
|
-
status:
|
|
745
|
-
deferral:
|
|
746
|
-
}),
|
|
780
|
+
}, { message: () => "Queued cancellation acknowledgement contradicts its receipt or observation" })), mr = m.Literal("cancel", "terminate", "abandon"), hr = m.Struct({
|
|
781
|
+
mode: m.String,
|
|
782
|
+
dueAt: m.NullOr(m.Number),
|
|
783
|
+
retryAfterMs: m.NullOr(m.Number),
|
|
784
|
+
intentId: m.NullOr(m.String)
|
|
785
|
+
}), gr = m.Struct({
|
|
786
|
+
id: m.String,
|
|
787
|
+
workflowName: m.String,
|
|
788
|
+
executionId: m.NullOr(m.String),
|
|
789
|
+
status: m.Literal("running", "succeeded", "queued", "dropped", "skipped", "replayed"),
|
|
790
|
+
deferral: m.optional(hr)
|
|
791
|
+
}), _r = (e, t) => {
|
|
747
792
|
let n = I(e);
|
|
748
|
-
return
|
|
749
|
-
payload:
|
|
750
|
-
success:
|
|
751
|
-
error:
|
|
793
|
+
return h.make(e.name, {
|
|
794
|
+
payload: y(e.payloadSchema, e.name, N(n.guards)),
|
|
795
|
+
success: gr,
|
|
796
|
+
error: Sn({
|
|
752
797
|
errorSchema: e.errorSchema,
|
|
753
798
|
guards: n.guards
|
|
754
799
|
}, t)
|
|
755
800
|
});
|
|
756
|
-
}, G =
|
|
757
|
-
id:
|
|
758
|
-
tag:
|
|
759
|
-
executionId:
|
|
801
|
+
}, G = m.Struct({
|
|
802
|
+
id: m.String,
|
|
803
|
+
tag: m.String,
|
|
804
|
+
executionId: m.String,
|
|
760
805
|
status: V,
|
|
761
|
-
payload:
|
|
762
|
-
workflowVersion:
|
|
763
|
-
workflowPatches:
|
|
764
|
-
output:
|
|
765
|
-
subject:
|
|
766
|
-
source:
|
|
767
|
-
errorTag:
|
|
768
|
-
errorMessage:
|
|
769
|
-
cancelled:
|
|
770
|
-
startedAt:
|
|
771
|
-
completedAt:
|
|
772
|
-
durationMs:
|
|
773
|
-
traceId:
|
|
774
|
-
parentExecutionId:
|
|
775
|
-
parentClosePolicy:
|
|
776
|
-
}),
|
|
777
|
-
tag:
|
|
778
|
-
status:
|
|
779
|
-
limit:
|
|
780
|
-
}),
|
|
781
|
-
id:
|
|
782
|
-
runId:
|
|
783
|
-
stepName:
|
|
784
|
-
attempt:
|
|
785
|
-
status:
|
|
786
|
-
input:
|
|
787
|
-
retryPolicy:
|
|
788
|
-
output:
|
|
789
|
-
errorTag:
|
|
790
|
-
errorMessage:
|
|
791
|
-
errorCause:
|
|
792
|
-
startedAt:
|
|
793
|
-
completedAt:
|
|
794
|
-
durationMs:
|
|
795
|
-
}),
|
|
796
|
-
id:
|
|
797
|
-
runId:
|
|
798
|
-
eventType:
|
|
799
|
-
payload:
|
|
800
|
-
occurredAt:
|
|
801
|
-
stepName:
|
|
802
|
-
attempt:
|
|
803
|
-
}),
|
|
804
|
-
id:
|
|
805
|
-
name:
|
|
806
|
-
payload:
|
|
807
|
-
source:
|
|
808
|
-
subject:
|
|
809
|
-
traceId:
|
|
810
|
-
occurredAt:
|
|
811
|
-
}),
|
|
812
|
-
id:
|
|
813
|
-
eventId:
|
|
814
|
-
eventName:
|
|
815
|
-
triggerId:
|
|
816
|
-
workflowName:
|
|
817
|
-
executionId:
|
|
818
|
-
status:
|
|
819
|
-
idempotencyKey:
|
|
820
|
-
skipped:
|
|
821
|
-
errorMessage:
|
|
822
|
-
createdAt:
|
|
823
|
-
completedAt:
|
|
824
|
-
}),
|
|
825
|
-
name:
|
|
826
|
-
limit:
|
|
827
|
-
}),
|
|
828
|
-
requestId:
|
|
829
|
-
cause:
|
|
830
|
-
reason:
|
|
831
|
-
detail:
|
|
832
|
-
key:
|
|
833
|
-
value:
|
|
806
|
+
payload: m.Unknown,
|
|
807
|
+
workflowVersion: m.NullOr(m.String),
|
|
808
|
+
workflowPatches: m.NullOr(m.Unknown),
|
|
809
|
+
output: m.NullOr(m.Unknown),
|
|
810
|
+
subject: m.NullOr(m.Unknown),
|
|
811
|
+
source: m.NullOr(m.String),
|
|
812
|
+
errorTag: m.NullOr(m.String),
|
|
813
|
+
errorMessage: m.NullOr(m.String),
|
|
814
|
+
cancelled: m.Boolean,
|
|
815
|
+
startedAt: m.Date,
|
|
816
|
+
completedAt: m.NullOr(m.Date),
|
|
817
|
+
durationMs: m.NullOr(m.Number),
|
|
818
|
+
traceId: m.NullOr(m.String),
|
|
819
|
+
parentExecutionId: m.NullOr(m.String),
|
|
820
|
+
parentClosePolicy: m.NullOr(mr)
|
|
821
|
+
}), vr = m.Struct({
|
|
822
|
+
tag: m.optional(m.String),
|
|
823
|
+
status: m.optional(V),
|
|
824
|
+
limit: m.optional(m.Number)
|
|
825
|
+
}), yr = m.Struct({
|
|
826
|
+
id: m.String,
|
|
827
|
+
runId: m.String,
|
|
828
|
+
stepName: m.String,
|
|
829
|
+
attempt: m.Number,
|
|
830
|
+
status: m.Literal("running", "succeeded", "failed"),
|
|
831
|
+
input: m.NullOr(m.Unknown),
|
|
832
|
+
retryPolicy: m.NullOr(m.Unknown),
|
|
833
|
+
output: m.NullOr(m.Unknown),
|
|
834
|
+
errorTag: m.NullOr(m.String),
|
|
835
|
+
errorMessage: m.NullOr(m.String),
|
|
836
|
+
errorCause: m.NullOr(m.Unknown),
|
|
837
|
+
startedAt: m.Date,
|
|
838
|
+
completedAt: m.NullOr(m.Date),
|
|
839
|
+
durationMs: m.NullOr(m.Number)
|
|
840
|
+
}), br = m.Struct({
|
|
841
|
+
id: m.String,
|
|
842
|
+
runId: m.String,
|
|
843
|
+
eventType: m.String,
|
|
844
|
+
payload: m.NullOr(m.Unknown),
|
|
845
|
+
occurredAt: m.Date,
|
|
846
|
+
stepName: m.NullOr(m.String),
|
|
847
|
+
attempt: m.NullOr(m.Number)
|
|
848
|
+
}), xr = m.Struct({
|
|
849
|
+
id: m.String,
|
|
850
|
+
name: m.String,
|
|
851
|
+
payload: m.Unknown,
|
|
852
|
+
source: m.String,
|
|
853
|
+
subject: m.NullOr(m.Unknown),
|
|
854
|
+
traceId: m.NullOr(m.String),
|
|
855
|
+
occurredAt: m.Date
|
|
856
|
+
}), Sr = m.Struct({
|
|
857
|
+
id: m.String,
|
|
858
|
+
eventId: m.String,
|
|
859
|
+
eventName: m.String,
|
|
860
|
+
triggerId: m.String,
|
|
861
|
+
workflowName: m.String,
|
|
862
|
+
executionId: m.NullOr(m.String),
|
|
863
|
+
status: m.Literal("starting", "started", "skipped", "failed"),
|
|
864
|
+
idempotencyKey: m.String,
|
|
865
|
+
skipped: m.Boolean,
|
|
866
|
+
errorMessage: m.NullOr(m.String),
|
|
867
|
+
createdAt: m.Date,
|
|
868
|
+
completedAt: m.NullOr(m.Date)
|
|
869
|
+
}), Cr = m.Struct({ id: m.String }), K = m.Struct({ runId: m.String }), wr = m.Struct({
|
|
870
|
+
name: m.optional(m.String),
|
|
871
|
+
limit: m.optional(m.Number)
|
|
872
|
+
}), Tr = m.Struct({ eventId: m.String }), q = m.Struct({
|
|
873
|
+
requestId: m.NonEmptyString,
|
|
874
|
+
cause: m.optionalWith(m.Struct({
|
|
875
|
+
reason: m.NonEmptyString,
|
|
876
|
+
detail: m.optional(m.Record({
|
|
877
|
+
key: m.String,
|
|
878
|
+
value: m.Unknown
|
|
834
879
|
}))
|
|
835
880
|
}), { exact: !0 })
|
|
836
|
-
}), J =
|
|
837
|
-
workflowName:
|
|
838
|
-
executionId:
|
|
839
|
-
control:
|
|
840
|
-
}),
|
|
841
|
-
workflowName:
|
|
842
|
-
executionId:
|
|
843
|
-
operation:
|
|
844
|
-
requestId:
|
|
845
|
-
}), Y =
|
|
846
|
-
workflowName:
|
|
847
|
-
receiptId:
|
|
848
|
-
requestId:
|
|
849
|
-
}),
|
|
881
|
+
}), J = m.Struct({
|
|
882
|
+
workflowName: m.String,
|
|
883
|
+
executionId: m.String,
|
|
884
|
+
control: m.optional(q)
|
|
885
|
+
}), Er = m.Struct({
|
|
886
|
+
workflowName: m.NonEmptyString,
|
|
887
|
+
executionId: m.NonEmptyString,
|
|
888
|
+
operation: m.Literal("cancel", "resume"),
|
|
889
|
+
requestId: m.NonEmptyString
|
|
890
|
+
}), Y = m.Struct({
|
|
891
|
+
workflowName: m.NonEmptyString,
|
|
892
|
+
receiptId: m.NonEmptyString,
|
|
893
|
+
requestId: m.NonEmptyString
|
|
894
|
+
}), Dr = m.Struct({
|
|
850
895
|
...Y.fields,
|
|
851
896
|
cause: q.fields.cause
|
|
852
|
-
}),
|
|
897
|
+
}), Or = j({
|
|
853
898
|
name: "__voltro.workflow.queued.cancel",
|
|
854
|
-
input:
|
|
899
|
+
input: Dr,
|
|
855
900
|
output: W,
|
|
856
901
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
857
|
-
}),
|
|
902
|
+
}), kr = k({
|
|
858
903
|
name: "__voltro.workflow.queued.control",
|
|
859
904
|
input: Y,
|
|
860
905
|
output: W,
|
|
861
906
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
862
|
-
}),
|
|
907
|
+
}), Ar = k({
|
|
863
908
|
name: "__voltro.workflow.control",
|
|
864
|
-
input:
|
|
909
|
+
input: Er,
|
|
865
910
|
output: U,
|
|
866
911
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
867
|
-
}),
|
|
868
|
-
id:
|
|
869
|
-
signalName:
|
|
870
|
-
payload:
|
|
871
|
-
}),
|
|
872
|
-
id:
|
|
873
|
-
updateName:
|
|
874
|
-
payload:
|
|
875
|
-
timeoutMs:
|
|
876
|
-
}),
|
|
877
|
-
eventId:
|
|
878
|
-
updateId:
|
|
879
|
-
completedEventId:
|
|
880
|
-
result:
|
|
881
|
-
}),
|
|
912
|
+
}), jr = m.Struct({
|
|
913
|
+
id: m.String,
|
|
914
|
+
signalName: m.String,
|
|
915
|
+
payload: m.optional(m.Unknown)
|
|
916
|
+
}), Mr = m.Struct({
|
|
917
|
+
id: m.String,
|
|
918
|
+
updateName: m.String,
|
|
919
|
+
payload: m.optional(m.Unknown),
|
|
920
|
+
timeoutMs: m.optional(m.Number)
|
|
921
|
+
}), Nr = m.Struct({
|
|
922
|
+
eventId: m.String,
|
|
923
|
+
updateId: m.String,
|
|
924
|
+
completedEventId: m.String,
|
|
925
|
+
result: m.Unknown
|
|
926
|
+
}), Pr = k({
|
|
882
927
|
name: "__voltro.workflow.run",
|
|
883
928
|
source: "_voltro_workflow_runs",
|
|
884
|
-
input:
|
|
885
|
-
output:
|
|
929
|
+
input: Cr,
|
|
930
|
+
output: m.Array(G),
|
|
886
931
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
887
|
-
}),
|
|
932
|
+
}), Fr = k({
|
|
888
933
|
name: "__voltro.workflow.runs",
|
|
889
934
|
source: "_voltro_workflow_runs",
|
|
890
|
-
input:
|
|
891
|
-
output:
|
|
935
|
+
input: vr,
|
|
936
|
+
output: m.Array(G),
|
|
892
937
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
893
|
-
}),
|
|
938
|
+
}), Ir = k({
|
|
894
939
|
name: "__voltro.workflow.run.steps",
|
|
895
940
|
source: "_voltro_workflow_run_steps",
|
|
896
941
|
input: K,
|
|
897
|
-
output:
|
|
942
|
+
output: m.Array(yr),
|
|
898
943
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
899
|
-
}),
|
|
944
|
+
}), Lr = k({
|
|
900
945
|
name: "__voltro.workflow.run.events",
|
|
901
946
|
source: "_voltro_workflow_run_events",
|
|
902
947
|
input: K,
|
|
903
|
-
output:
|
|
948
|
+
output: m.Array(br),
|
|
904
949
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
905
|
-
}),
|
|
950
|
+
}), Rr = k({
|
|
906
951
|
name: "__voltro.workflow.domainEvents",
|
|
907
952
|
source: "_voltro_workflow_events",
|
|
908
|
-
input:
|
|
909
|
-
output:
|
|
953
|
+
input: wr,
|
|
954
|
+
output: m.Array(xr),
|
|
910
955
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
911
|
-
}),
|
|
956
|
+
}), zr = k({
|
|
912
957
|
name: "__voltro.workflow.event.deliveries",
|
|
913
958
|
source: "_voltro_workflow_event_deliveries",
|
|
914
|
-
input:
|
|
915
|
-
output:
|
|
959
|
+
input: Tr,
|
|
960
|
+
output: m.Array(Sr),
|
|
916
961
|
openAccess: "the answer is scoped to the caller in the executor — a system or admin:full subject sees every row, an authenticated subject the rows of its own tenant, an anonymous caller none"
|
|
917
|
-
}),
|
|
962
|
+
}), Br = j({
|
|
918
963
|
name: "__voltro.workflow.cancel",
|
|
919
964
|
input: J,
|
|
920
965
|
output: U,
|
|
921
966
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
922
|
-
}),
|
|
967
|
+
}), Vr = j({
|
|
923
968
|
name: "__voltro.workflow.resume",
|
|
924
969
|
input: J,
|
|
925
970
|
output: U,
|
|
926
971
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
927
|
-
}),
|
|
972
|
+
}), Hr = j({
|
|
928
973
|
name: "__voltro.workflow.signal",
|
|
929
|
-
input:
|
|
930
|
-
output:
|
|
974
|
+
input: jr,
|
|
975
|
+
output: m.Struct({ eventId: m.String }),
|
|
931
976
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
932
|
-
}),
|
|
977
|
+
}), Ur = j({
|
|
933
978
|
name: "__voltro.workflow.update",
|
|
934
|
-
input:
|
|
935
|
-
output:
|
|
979
|
+
input: Mr,
|
|
980
|
+
output: Nr,
|
|
936
981
|
openAccess: "authorization happens in the executor against the target run — the caller must be authenticated and belong to the run's tenant, and a missing run answers exactly like a foreign one"
|
|
937
|
-
}),
|
|
938
|
-
runId:
|
|
939
|
-
requestId:
|
|
940
|
-
}),
|
|
941
|
-
...
|
|
942
|
-
payloadOverride:
|
|
982
|
+
}), Wr = m.NonEmptyString.pipe(m.filter((e) => e.trim().length > 0, { message: () => "A workflow retry identity must not be blank" })), Gr = m.Struct({
|
|
983
|
+
runId: Wr,
|
|
984
|
+
requestId: Wr
|
|
985
|
+
}), Kr = m.Struct({
|
|
986
|
+
...Gr.fields,
|
|
987
|
+
payloadOverride: m.optional(m.Unknown)
|
|
943
988
|
}), X = {
|
|
944
|
-
requestId:
|
|
945
|
-
originalRunId:
|
|
946
|
-
originalExecutionId:
|
|
947
|
-
workflowName:
|
|
948
|
-
},
|
|
989
|
+
requestId: m.NonEmptyString,
|
|
990
|
+
originalRunId: m.NonEmptyString,
|
|
991
|
+
originalExecutionId: m.NonEmptyString,
|
|
992
|
+
workflowName: m.NonEmptyString
|
|
993
|
+
}, qr = m.Union(m.Struct({
|
|
949
994
|
...X,
|
|
950
|
-
kind:
|
|
951
|
-
nextAttemptAt:
|
|
952
|
-
}),
|
|
995
|
+
kind: m.Literal("queued"),
|
|
996
|
+
nextAttemptAt: m.NullOr(m.Number)
|
|
997
|
+
}), m.Struct({
|
|
953
998
|
...X,
|
|
954
|
-
kind:
|
|
955
|
-
executionId:
|
|
956
|
-
}).pipe(
|
|
999
|
+
kind: m.Literal("accepted"),
|
|
1000
|
+
executionId: m.NonEmptyString
|
|
1001
|
+
}).pipe(m.filter((e) => e.executionId !== e.originalExecutionId, { message: () => "A retry cannot accept its original execution identity" })), m.Struct({
|
|
957
1002
|
...X,
|
|
958
|
-
kind:
|
|
959
|
-
automaticRetryStopped:
|
|
960
|
-
nextAttemptAt:
|
|
961
|
-
}).pipe(
|
|
1003
|
+
kind: m.Literal("unconfirmed"),
|
|
1004
|
+
automaticRetryStopped: m.Boolean,
|
|
1005
|
+
nextAttemptAt: m.NullOr(m.Number)
|
|
1006
|
+
}).pipe(m.filter((e) => !e.automaticRetryStopped || e.nextAttemptAt === null, { message: () => "Stopped automatic retries cannot have a next attempt" })), m.Struct({
|
|
962
1007
|
...X,
|
|
963
|
-
kind:
|
|
1008
|
+
kind: m.Literal("not-started"),
|
|
964
1009
|
outcome: B
|
|
965
|
-
}),
|
|
1010
|
+
}), m.Struct({
|
|
966
1011
|
...X,
|
|
967
|
-
kind:
|
|
968
|
-
failureId:
|
|
969
|
-
})),
|
|
970
|
-
id:
|
|
971
|
-
tag:
|
|
972
|
-
label:
|
|
973
|
-
undone:
|
|
974
|
-
crossesAction:
|
|
975
|
-
createdAt:
|
|
976
|
-
}),
|
|
977
|
-
invocationId:
|
|
978
|
-
reason:
|
|
979
|
-
}) {},
|
|
980
|
-
name:
|
|
1012
|
+
kind: m.Literal("rejected"),
|
|
1013
|
+
failureId: m.NonEmptyString
|
|
1014
|
+
})), Jr = "__voltro.undo.log", Yr = "__voltro.undo.apply", Xr = "__voltro.undo.redo", Zr = m.Struct({
|
|
1015
|
+
id: m.String,
|
|
1016
|
+
tag: m.String,
|
|
1017
|
+
label: m.NullOr(m.String),
|
|
1018
|
+
undone: m.Boolean,
|
|
1019
|
+
crossesAction: m.Boolean,
|
|
1020
|
+
createdAt: m.String
|
|
1021
|
+
}), Qr = class extends m.TaggedError()("UndoNotFound", { invocationId: m.String }) {}, $r = class extends m.TaggedError()("UndoForbidden", { invocationId: m.String }) {}, ei = class extends m.TaggedError()("UndoConflict", {
|
|
1022
|
+
invocationId: m.String,
|
|
1023
|
+
reason: m.Literal("conflict", "action")
|
|
1024
|
+
}) {}, ti = m.Union(Qr, $r, ei), ni = k({
|
|
1025
|
+
name: Jr,
|
|
981
1026
|
source: "_voltro_undo_log",
|
|
982
|
-
input:
|
|
983
|
-
output:
|
|
1027
|
+
input: m.Struct({ limit: m.optional(m.Number) }),
|
|
1028
|
+
output: m.Array(Zr),
|
|
984
1029
|
openAccess: "subject-scoped by construction: lists only the calling subject's own undoable actions"
|
|
985
|
-
}),
|
|
986
|
-
name:
|
|
987
|
-
input:
|
|
988
|
-
output:
|
|
989
|
-
error:
|
|
1030
|
+
}), ri = A({
|
|
1031
|
+
name: Yr,
|
|
1032
|
+
input: m.Struct({ invocationId: m.String }),
|
|
1033
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1034
|
+
error: ti,
|
|
990
1035
|
openAccess: "subject-scoped by construction: undo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
991
|
-
}),
|
|
992
|
-
name:
|
|
993
|
-
input:
|
|
994
|
-
output:
|
|
995
|
-
error:
|
|
1036
|
+
}), ii = A({
|
|
1037
|
+
name: Xr,
|
|
1038
|
+
input: m.Struct({ invocationId: m.String }),
|
|
1039
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1040
|
+
error: ti,
|
|
996
1041
|
openAccess: "subject-scoped by construction: redo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
997
|
-
}),
|
|
998
|
-
table:
|
|
999
|
-
reason:
|
|
1000
|
-
}) {},
|
|
1001
|
-
operation:
|
|
1002
|
-
table:
|
|
1003
|
-
cause:
|
|
1042
|
+
}), ai = class extends m.TaggedError()("TenantScopeViolation", {
|
|
1043
|
+
table: m.String,
|
|
1044
|
+
reason: m.String
|
|
1045
|
+
}) {}, oi = class extends m.TaggedError()("StoreOperationFailed", {
|
|
1046
|
+
operation: m.String,
|
|
1047
|
+
table: m.String,
|
|
1048
|
+
cause: m.String
|
|
1004
1049
|
}) {
|
|
1005
1050
|
get message() {
|
|
1006
1051
|
return `${this.operation} on '${this.table}' failed: ${this.cause}`;
|
|
1007
1052
|
}
|
|
1008
|
-
},
|
|
1009
|
-
table:
|
|
1010
|
-
found:
|
|
1053
|
+
}, si = class extends m.TaggedError()("NoRowFound", {
|
|
1054
|
+
table: m.String,
|
|
1055
|
+
found: m.Number
|
|
1011
1056
|
}) {
|
|
1012
1057
|
get message() {
|
|
1013
1058
|
return this.found === 0 ? `expected exactly one row in '${this.table}', found none` : `expected exactly one row in '${this.table}', found more than one`;
|
|
1014
1059
|
}
|
|
1015
|
-
},
|
|
1016
|
-
table:
|
|
1017
|
-
summary:
|
|
1018
|
-
issues:
|
|
1019
|
-
path:
|
|
1020
|
-
message:
|
|
1060
|
+
}, ci = class extends m.TaggedError()("TableValidationFailed", {
|
|
1061
|
+
table: m.String,
|
|
1062
|
+
summary: m.String,
|
|
1063
|
+
issues: m.Array(m.Struct({
|
|
1064
|
+
path: m.String,
|
|
1065
|
+
message: m.String
|
|
1021
1066
|
}))
|
|
1022
|
-
}) {},
|
|
1023
|
-
table:
|
|
1024
|
-
id:
|
|
1025
|
-
reason:
|
|
1026
|
-
}) {},
|
|
1027
|
-
table:
|
|
1028
|
-
columns:
|
|
1029
|
-
}) {},
|
|
1030
|
-
kind:
|
|
1031
|
-
table:
|
|
1032
|
-
operation:
|
|
1033
|
-
constraint:
|
|
1034
|
-
column:
|
|
1035
|
-
detail:
|
|
1067
|
+
}) {}, li = class extends m.TaggedError()("TenantRowNotFound", {
|
|
1068
|
+
table: m.String,
|
|
1069
|
+
id: m.String,
|
|
1070
|
+
reason: m.String
|
|
1071
|
+
}) {}, ui = class extends m.TaggedError()("ServerOnlyColumnWrite", {
|
|
1072
|
+
table: m.String,
|
|
1073
|
+
columns: m.Array(m.String)
|
|
1074
|
+
}) {}, di = class extends m.TaggedError()("ConstraintViolation", {
|
|
1075
|
+
kind: m.Literal("foreignKey", "foreignKeyInUse", "unique", "notNull", "check"),
|
|
1076
|
+
table: m.String,
|
|
1077
|
+
operation: m.String,
|
|
1078
|
+
constraint: m.optional(m.String),
|
|
1079
|
+
column: m.optional(m.String),
|
|
1080
|
+
detail: m.optional(m.String)
|
|
1036
1081
|
}) {
|
|
1037
1082
|
get message() {
|
|
1038
1083
|
if (this.detail !== void 0) return this.detail;
|
|
@@ -1045,86 +1090,86 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
1045
1090
|
case "check": return `check constraint ${t}: the row does not satisfy it`;
|
|
1046
1091
|
}
|
|
1047
1092
|
}
|
|
1048
|
-
},
|
|
1049
|
-
name:
|
|
1093
|
+
}, fi = "__voltro.approvals.pending", pi = "__voltro.approvals.decide", mi = k({
|
|
1094
|
+
name: fi,
|
|
1050
1095
|
source: "_voltro_approvals",
|
|
1051
|
-
input:
|
|
1052
|
-
output:
|
|
1096
|
+
input: m.Struct({ limit: m.optional(m.Number) }),
|
|
1097
|
+
output: m.Array(Xt),
|
|
1053
1098
|
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"
|
|
1054
|
-
}),
|
|
1055
|
-
name:
|
|
1056
|
-
input:
|
|
1057
|
-
approvalId:
|
|
1058
|
-
decision:
|
|
1059
|
-
note:
|
|
1099
|
+
}), hi = A({
|
|
1100
|
+
name: pi,
|
|
1101
|
+
input: m.Struct({
|
|
1102
|
+
approvalId: m.String,
|
|
1103
|
+
decision: m.Literal("approve", "reject"),
|
|
1104
|
+
note: m.optional(m.String)
|
|
1060
1105
|
}),
|
|
1061
|
-
output:
|
|
1062
|
-
approvalId:
|
|
1063
|
-
status:
|
|
1106
|
+
output: m.Struct({
|
|
1107
|
+
approvalId: m.String,
|
|
1108
|
+
status: m.Literal("approved", "rejected")
|
|
1064
1109
|
}),
|
|
1065
|
-
error:
|
|
1110
|
+
error: Yt,
|
|
1066
1111
|
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"
|
|
1067
|
-
}),
|
|
1068
|
-
connectionId:
|
|
1112
|
+
}), gi = "__voltro.connections.list", _i = "__voltro.connections.start", vi = "__voltro.connections.submitToken", Z = "__voltro.connections.disconnect", Q = m.Literal("oauth2", "pat"), yi = m.Literal("disconnected", "connected", "expired", "revoked", "error"), bi = m.Struct({
|
|
1113
|
+
connectionId: m.String,
|
|
1069
1114
|
kind: Q,
|
|
1070
|
-
label:
|
|
1071
|
-
status:
|
|
1072
|
-
accountId:
|
|
1073
|
-
accountLabel:
|
|
1074
|
-
scopes:
|
|
1075
|
-
expiresAt:
|
|
1076
|
-
lastError:
|
|
1077
|
-
connectedAt:
|
|
1078
|
-
}),
|
|
1079
|
-
connectionId:
|
|
1115
|
+
label: m.String,
|
|
1116
|
+
status: yi,
|
|
1117
|
+
accountId: m.NullOr(m.String),
|
|
1118
|
+
accountLabel: m.NullOr(m.String),
|
|
1119
|
+
scopes: m.Array(m.String),
|
|
1120
|
+
expiresAt: m.NullOr(m.String),
|
|
1121
|
+
lastError: m.NullOr(m.String),
|
|
1122
|
+
connectedAt: m.NullOr(m.String)
|
|
1123
|
+
}), xi = class extends m.TaggedError()("ConnectionNotDeclared", { connectionId: m.String }) {}, Si = class extends m.TaggedError()("ConnectionSubjectRequired", { connectionId: m.String }) {}, Ci = class extends m.TaggedError()("ConnectionKindMismatch", {
|
|
1124
|
+
connectionId: m.String,
|
|
1080
1125
|
expected: Q,
|
|
1081
1126
|
actual: Q
|
|
1082
|
-
}) {},
|
|
1083
|
-
connectionId:
|
|
1084
|
-
reason:
|
|
1085
|
-
transient:
|
|
1086
|
-
}) {}, $ =
|
|
1087
|
-
name:
|
|
1127
|
+
}) {}, wi = class extends m.TaggedError()("ConnectionHandshakeFailed", {
|
|
1128
|
+
connectionId: m.String,
|
|
1129
|
+
reason: m.String,
|
|
1130
|
+
transient: m.Boolean
|
|
1131
|
+
}) {}, $ = m.Union(xi, Si, Ci, wi), Ti = k({
|
|
1132
|
+
name: gi,
|
|
1088
1133
|
source: "_voltro_connections",
|
|
1089
|
-
input:
|
|
1090
|
-
output:
|
|
1134
|
+
input: m.Struct({}),
|
|
1135
|
+
output: m.Array(bi),
|
|
1091
1136
|
openAccess: "self-scoped read: projects the declared connections for the calling subject only (its own connect/disconnect state)"
|
|
1092
|
-
}),
|
|
1093
|
-
name:
|
|
1094
|
-
input:
|
|
1095
|
-
connectionId:
|
|
1096
|
-
redirectTo:
|
|
1137
|
+
}), Ei = j({
|
|
1138
|
+
name: _i,
|
|
1139
|
+
input: m.Struct({
|
|
1140
|
+
connectionId: m.String,
|
|
1141
|
+
redirectTo: m.optional(m.String)
|
|
1097
1142
|
}),
|
|
1098
|
-
output:
|
|
1099
|
-
authorizeUrl:
|
|
1100
|
-
state:
|
|
1143
|
+
output: m.Struct({
|
|
1144
|
+
authorizeUrl: m.String,
|
|
1145
|
+
state: m.String
|
|
1101
1146
|
}),
|
|
1102
1147
|
error: $,
|
|
1103
1148
|
openAccess: "self-service: begins an oauth handshake that stores a credential for the calling subject only; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
1104
|
-
}),
|
|
1105
|
-
name:
|
|
1106
|
-
input:
|
|
1107
|
-
connectionId:
|
|
1108
|
-
token:
|
|
1149
|
+
}), Di = A({
|
|
1150
|
+
name: vi,
|
|
1151
|
+
input: m.Struct({
|
|
1152
|
+
connectionId: m.String,
|
|
1153
|
+
token: m.String
|
|
1109
1154
|
}),
|
|
1110
|
-
output:
|
|
1155
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1111
1156
|
error: $,
|
|
1112
1157
|
openAccess: "self-service: stores a pasted token as the calling subject's own credential; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
1113
|
-
}),
|
|
1114
|
-
name:
|
|
1115
|
-
input:
|
|
1116
|
-
output:
|
|
1158
|
+
}), Oi = A({
|
|
1159
|
+
name: Z,
|
|
1160
|
+
input: m.Struct({ connectionId: m.String }),
|
|
1161
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1117
1162
|
error: $,
|
|
1118
1163
|
openAccess: "self-service: deletes only the calling subject's own credential row for this connection"
|
|
1119
|
-
}),
|
|
1164
|
+
}), ki = (e) => {
|
|
1120
1165
|
let t = e instanceof Date ? e.getTime() : typeof e == "number" ? e : typeof e == "string" ? new Date(e).getTime() : 0;
|
|
1121
1166
|
return Number.isNaN(t) ? 0 : t;
|
|
1122
|
-
},
|
|
1167
|
+
}, Ai = 4001, ji = /* @__PURE__ */ new Set(["/rpc", "/ws"]), Mi = (e) => {
|
|
1123
1168
|
for (let [t, n] of Object.entries(e.limits ?? {})) if (n !== void 0 && (!Number.isSafeInteger(n) || n <= 0)) throw Error(`defineWebSocket: limits.${t} must be a positive safe integer`);
|
|
1124
1169
|
if (!e.path.startsWith("/")) throw Error(`defineWebSocket: path must be absolute, got '${e.path}'`);
|
|
1125
|
-
if (
|
|
1170
|
+
if (ji.has(e.path)) throw Error(`defineWebSocket: '${e.path}' is the framework's own socket surface — mount the gateway elsewhere`);
|
|
1126
1171
|
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)}'`);
|
|
1127
1172
|
return e;
|
|
1128
|
-
},
|
|
1173
|
+
}, Ni = 1;
|
|
1129
1174
|
//#endregion
|
|
1130
|
-
export {
|
|
1175
|
+
export { Be as ADMIN_SCOPE, Ne as APIKEY_ISSUE_ORG_SCOPE, Le as APIKEY_ISSUE_OTHER_SCOPE, De as APIKEY_ISSUE_SELF_SCOPE, pi as APPROVALS_DECIDE_TAG, fi as APPROVALS_PENDING_TAG, $n as ApiUnavailable, Yt as ApprovalDecisionErrors, Jt as ApprovalErrors, b as ApprovalExpired, qt as ApprovalForbidden, Ut as ApprovalNotFound, Kt as ApprovalNotPending, Gt as ApprovalRejected, Ht as ApprovalRequired, Wt as ApprovalSelfApproval, x as ApprovalUnavailable, t as AuthMiddleware, Lt as BusinessRuleViolation, gi as CONNECTIONS_LIST_TAG, Z as CONNECTION_DISCONNECT_TAG, _i as CONNECTION_START_TAG, vi as CONNECTION_SUBMIT_TOKEN_TAG, wi as ConnectionHandshakeFailed, ke as ConnectionInfo, ie as ConnectionInfoMiddleware, Q as ConnectionKind, Ci as ConnectionKindMismatch, xi as ConnectionNotDeclared, bi as ConnectionState, yi as ConnectionStatus, Si as ConnectionSubjectRequired, di as ConstraintViolation, bt as DEFAULT_IN_FLIGHT_LEASE_MS, ae as DEFAULT_SCOPE_CACHE_MAX_ENTRIES, se as DEFAULT_SCOPE_CACHE_TTL_MS, ve as DEVICES_MANAGE_SCOPE, Gn as EVENT_ROUTE_SEP, Hn as EventKeyInvalid, Vn as EventPayloadInvalid, Un as EventPayloadTooLarge, Ai as GATEWAY_CREDENTIAL_EXPIRED_CLOSE_CODE, o as IMPERSONATION_METADATA_KEY, ht as JSONAPI_MEDIA_TYPE, jn as MAX_EVENT_ENVELOPE_BYTES, et as MUTATION_IN_FLIGHT_RETRY_AFTER_MS, yt as MutationConnectionRequired, Xe as MutationInFlight, si as NoRowFound, ut as PROBLEM_JSON, Ni as PROTOCOL_VERSION, Xt as PendingApproval, S as REACTIVITY_CHANNEL_PREFIX, pt as REST_PROFILE_NAMES, E as SERVICE_NAME_PATTERN, u as ScopeError, ui as ServerOnlyColumnWrite, oi as StoreOperationFailed, ee as Subject, re as SubjectIdentity, le as SubjectService, ci as TableValidationFailed, li as TenantRowNotFound, ai as TenantScopeViolation, Re as TenantSelectionRefused, Yr as UNDO_APPLY_TAG, Jr as UNDO_LOG_TAG, Xr as UNDO_REDO_TAG, p as Unauthenticated, ei as UndoConflict, $r as UndoForbidden, Zr as UndoLogEntry, Qr as UndoNotFound, zt as ValidationError, Bt as ValidationErrors, Rt as ValidationIssue, F as WorkflowAccessProperty, J as WorkflowControlInputSchema, q as WorkflowControlIntentSchema, Er as WorkflowControlReadInputSchema, U as WorkflowControlResultSchema, xr as WorkflowDomainEventRowSchema, wr as WorkflowDomainEventsInputSchema, Tr as WorkflowEventDeliveriesInputSchema, Sr as WorkflowEventDeliveryRowSchema, mr as WorkflowParentClosePolicySchema, Dr as WorkflowQueuedCancelInputSchema, W as WorkflowQueuedCancellationResultSchema, Y as WorkflowQueuedControlTargetSchema, Kr as WorkflowRetryCommandSchema, qr as WorkflowRetryObservationSchema, Gr as WorkflowRetryTargetSchema, br as WorkflowRunEventRowSchema, gr as WorkflowRunHandleSchema, Cr as WorkflowRunRefSchema, G as WorkflowRunRowSchema, H as WorkflowRunSnapshotSchema, V as WorkflowRunStatusSchema, yr as WorkflowRunStepRowSchema, K as WorkflowRunTableRefSchema, vr as WorkflowRunsInputSchema, jr as WorkflowSignalInputSchema, hr as WorkflowStartDeferralSchema, B as WorkflowStartTerminalOutcomeSchema, Mr as WorkflowUpdateInputSchema, Nr as WorkflowUpdateResultSchema, En as actionToRpc, ze as advisoryResourceGuardWarning, n as anonymousSubject, Mt as applyRowPatch, pe as applyScopeDecision, hi as approvalsDecideDescriptor, mi as approvalsPendingQueryDescriptor, c as assertAuthenticated, Zn as attachWorkflowAccess, Ke as beginIdempotent, or as checkFrameworkCompat, xe as checkGuards, je as checkGuardsEffect, lt as compareSurfaces, fe as composeAuthStrategies, ir as composeRpcInterceptors, Oi as connectionDisconnectDescriptor, Ei as connectionStartDescriptor, Di as connectionSubmitTokenDescriptor, Ti as connectionsListQueryDescriptor, rn as declaredReactivityChannelKeys, j as defineAction, Nn as defineEvent, A as defineMutation, tr as definePlugin, nr as definePluginRoute, ar as definePluginService, k as defineQuery, _n as defineStream, Mi as defineWebSocket, At as diffRows, He as effectiveScopes, Wn as encodeEventKey, ot as encodeRestError, $e as encodeRestSuccess, On as errorTag, In as eventAttached, Pn as eventEnvelope, Fn as eventGap, Rn as eventResumePoint, Kn as eventRoute, Ln as eventStreamEvent, zn as eventSubscribeInput, Bn as eventToRpc, vt as failIdempotent, Vt as fieldIssuesOf, Se as findAdvisoryResourceGuards, Ze as finishIdempotent, Pt as firstEventValue, Jn as formatEventRoute, Je as freshFor, we as getPolicyGuardResolver, Fe as getResourceScopeResolver, I as getWorkflowAccess, at as groupShapeDigests, gn as hasAccessDecision, me as hasCallbackRoutes, Me as hasEffectiveScope, N as hasEnforcedGuard, Ee as hasScope, qe as holdIdempotentClaim, g as idToPath, Ye as idempotencyScope, Ft as inputLabel, er as isApiUnavailable, Te as isAuthenticatedCheck, hn as isAuthenticatedGuard, un as isClientReachable, Mn as isEventDescriptor, jt as isIdKeyed, s as isMachineSubject, l as isOpenAccess, Ue as isPolicyCheck, mn as isPolicyGuard, tn as isReactivityChannel, nn as isReactivityChannelKey, We as isServiceAccess, dn as isServiceReachable, ne as isServiceSubject, Ie as isSystemSubject, Oe as isTenantSelectable, T as isWireReachable, te as makeScopeCache, st as memoryIdempotencyStore, be as missingAccessDecision, Tn as mutationToRpc, dt as nextLink, An as normalizeDescriptor, on as normalizeSource, f as openAccessSpec, ge as orderByBearerPrefix, qn as parseEventRoute, Ot as pathToId, cr as pluginAlias, rr as pluginInstanceName, lr as pluginSlug, pr as pluginTag, mt as problemDetails, tt as problemTypeOf, it as procedureShapeDigest, cn as publishReactivity, rt as publishServerError, wn as queryToRpc, he as rawImpersonationMark, en as reactivityChannel, dr as registerPluginAliases, ue as requireScope, fr as resetPluginAliases, r as resolvePolicyAction, ct as resolveRestFormat, Xn as resolveWorkflowAccess, gt as restViewSchema, Et as rowPatchOpSchema, Dt as rowPatchSchema, Qe as schemaShape, _e as scopeCacheKey, ye as selectSubjectTenant, d as serviceAccessSpec, de as serviceCallersOf, ce as serviceSubject, a as setEffectiveScopes, i as setPolicyGuardResolver, oe as setResourceScopeResolver, _t as shapeDigest, an as sourceKeys, Dn as streamToRpc, y as strictInput, e as subjectAuditActorId, Ce as subjectIdentity, Ae as subjectScopes, ft as subscribeServerErrors, Nt as subscriptionEvent, Ve as systemSubject, Pe as tenantScopedSubject, kn as toRpc, nt as toSnakeCase, ki as tsMs, sn as undeclaredChannelKeys, ri as undoApplyDescriptor, ni as undoLogQueryDescriptor, ii as undoRedoDescriptor, ln as wireAudienceOf, P as wireErrorUnion, Cn as withRpcTag, Qn as workflowAccessDescriptor, Br as workflowCancelDescriptor, Ar as workflowControlQueryDescriptor, Rr as workflowDomainEventsQueryDescriptor, zr as workflowEventDeliveriesQueryDescriptor, Or as workflowQueuedCancelDescriptor, kr as workflowQueuedControlQueryDescriptor, Vr as workflowResumeDescriptor, Lr as workflowRunEventsQueryDescriptor, Pr as workflowRunQueryDescriptor, Ir as workflowRunStepsQueryDescriptor, Fr as workflowRunsQueryDescriptor, Hr as workflowSignalDescriptor, _r as workflowToRpc, Ur as workflowUpdateDescriptor, Sn as workflowWireErrorUnion, Ge as wsMutationIdempotencyScope };
|