@voltro/protocol 0.80.0 → 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 +90 -0
- package/dist/apikey.d.ts +8 -0
- package/dist/index.d.ts +342 -11
- package/dist/index.js +590 -557
- package/dist/jwt.d.ts +8 -0
- package/dist/rest.d.ts +81 -16
- package/dist/rest.js +228 -219
- 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,22 +121,22 @@ 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
140
|
if (!t || typeof t != "object" || !("_tag" in t)) return t;
|
|
141
141
|
let r = t;
|
|
142
142
|
switch (r._tag) {
|
|
@@ -148,42 +148,42 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
148
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
149
|
default: return t;
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, Ft = (e, t) => {
|
|
152
152
|
let n = `${e ?? "this procedure"} input`;
|
|
153
153
|
return t === !0 ? `${n} (guarded — the guard did NOT run: the payload failed to decode first, so this says nothing about access)` : n;
|
|
154
|
-
},
|
|
154
|
+
}, It = (e) => {
|
|
155
155
|
let t = e.ast;
|
|
156
156
|
return t._tag === "TypeLiteral" && (t.propertySignatures?.length ?? 0) === 0 && (t.indexSignatures?.length ?? 0) === 0;
|
|
157
|
-
},
|
|
158
|
-
let r =
|
|
157
|
+
}, y = (e, t, n) => {
|
|
158
|
+
let r = Ft(t, n), i = e.annotations({
|
|
159
159
|
parseOptions: { onExcessProperty: "error" },
|
|
160
160
|
parseIssueTitle: () => r
|
|
161
161
|
});
|
|
162
|
-
return
|
|
163
|
-
},
|
|
164
|
-
rule:
|
|
165
|
-
params:
|
|
166
|
-
key:
|
|
167
|
-
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
|
|
168
168
|
})),
|
|
169
|
-
field:
|
|
170
|
-
message:
|
|
171
|
-
severity:
|
|
172
|
-
}) {},
|
|
173
|
-
field:
|
|
174
|
-
message:
|
|
175
|
-
params:
|
|
176
|
-
key:
|
|
177
|
-
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
|
|
178
178
|
}))
|
|
179
|
-
}),
|
|
180
|
-
field:
|
|
181
|
-
message:
|
|
182
|
-
params:
|
|
183
|
-
key:
|
|
184
|
-
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
|
|
185
185
|
}))
|
|
186
|
-
}) {},
|
|
186
|
+
}) {}, Bt = class extends m.TaggedError()("ValidationErrors", { issues: m.Array(Rt).pipe(m.minItems(1)) }) {}, Vt = (e) => {
|
|
187
187
|
if (typeof e != "object" || !e) return [];
|
|
188
188
|
let t = e._tag;
|
|
189
189
|
if (t === "ValidationError") {
|
|
@@ -209,69 +209,69 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
209
209
|
}];
|
|
210
210
|
}
|
|
211
211
|
return [];
|
|
212
|
-
},
|
|
213
|
-
approvalId:
|
|
214
|
-
procedure:
|
|
215
|
-
expiresAt:
|
|
216
|
-
requiredScopes:
|
|
217
|
-
reason:
|
|
218
|
-
created:
|
|
219
|
-
}) {},
|
|
220
|
-
approvalId:
|
|
221
|
-
subjectId:
|
|
222
|
-
}) {},
|
|
223
|
-
approvalId:
|
|
224
|
-
decidedBy:
|
|
225
|
-
note:
|
|
226
|
-
}) {},
|
|
227
|
-
approvalId:
|
|
228
|
-
expiredAt:
|
|
229
|
-
}) {},
|
|
230
|
-
approvalId:
|
|
231
|
-
status:
|
|
232
|
-
}) {},
|
|
233
|
-
approvalId:
|
|
234
|
-
required:
|
|
235
|
-
message:
|
|
236
|
-
}) {},
|
|
237
|
-
procedure:
|
|
238
|
-
message:
|
|
239
|
-
}) {},
|
|
240
|
-
id:
|
|
241
|
-
procedure:
|
|
242
|
-
kind:
|
|
243
|
-
requestedBy:
|
|
244
|
-
status:
|
|
245
|
-
reason:
|
|
246
|
-
requiredScopes:
|
|
247
|
-
requestedAt:
|
|
248
|
-
expiresAt:
|
|
249
|
-
decidedBy:
|
|
250
|
-
decidedAt:
|
|
251
|
-
note:
|
|
252
|
-
relation:
|
|
253
|
-
}),
|
|
254
|
-
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\`,
|
|
255
255
|
\`billing.usage\`. A \`:\` is refused because it is the namespace separator in
|
|
256
|
-
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
|
|
257
257
|
routes as two.`);
|
|
258
|
-
let t =
|
|
258
|
+
let t = C.get(e);
|
|
259
259
|
if (t !== void 0) return t;
|
|
260
|
-
let n = `${
|
|
260
|
+
let n = `${S}${e}`, r = Object.freeze({
|
|
261
261
|
kind: "reactivity-channel",
|
|
262
262
|
name: e,
|
|
263
263
|
key: n,
|
|
264
264
|
toString: () => n
|
|
265
265
|
});
|
|
266
|
-
return
|
|
267
|
-
},
|
|
268
|
-
let t =
|
|
269
|
-
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({
|
|
270
270
|
procedure: r.name,
|
|
271
271
|
key: e
|
|
272
272
|
});
|
|
273
273
|
return n;
|
|
274
|
-
},
|
|
274
|
+
}, cn = (e, t) => {
|
|
275
275
|
let n = e?.injectExternalChange;
|
|
276
276
|
return n !== void 0 && (n.call(e, {
|
|
277
277
|
table: t.key,
|
|
@@ -280,8 +280,8 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
280
280
|
old: {},
|
|
281
281
|
origin: "inline"
|
|
282
282
|
}), !0);
|
|
283
|
-
},
|
|
284
|
-
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'`);
|
|
285
285
|
let t = e.serialize;
|
|
286
286
|
if (t !== void 0) {
|
|
287
287
|
if (typeof t.key != "function") throw Error(`${e.name}: serialize.key must be a function of the input`);
|
|
@@ -305,7 +305,27 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
305
305
|
let r = [e.publicApi === void 0 ? void 0 : "publicApi", e.exposeAsTool === void 0 ? void 0 : "exposeAsTool"].filter((e) => e !== void 0);
|
|
306
306
|
if (r.length === 0) return e;
|
|
307
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.`);
|
|
308
|
-
},
|
|
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) => {
|
|
309
329
|
let t = e.requiresApproval;
|
|
310
330
|
if (t !== void 0) {
|
|
311
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
|
|
@@ -315,23 +335,29 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
315
335
|
human from every other, and the second-pair-of-eyes control would enforce nothing.
|
|
316
336
|
Give the procedure a \`guards:\` decision, or drop \`requiresApproval\`.`);
|
|
317
337
|
}
|
|
318
|
-
},
|
|
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
|
+
}
|
|
319
344
|
if (n === void 0) return t;
|
|
320
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
|
|
321
346
|
without an authorization check — e.g. \`openAccess: 'public pricing, no caller data'\`.`);
|
|
322
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
|
|
323
348
|
caller must hold a scope; drop them if anyone may call it.`);
|
|
324
|
-
return [
|
|
349
|
+
return [f(n.trim())];
|
|
325
350
|
}, k = (e) => D({
|
|
326
351
|
kind: "query",
|
|
327
352
|
name: e.name,
|
|
328
353
|
input: e.input,
|
|
329
354
|
output: e.output,
|
|
330
|
-
error: e.error ??
|
|
331
|
-
source:
|
|
355
|
+
error: e.error ?? m.Never,
|
|
356
|
+
source: on(e.source),
|
|
332
357
|
cache: e.cache,
|
|
333
|
-
guards: O(e.name, e.guards, e.openAccess),
|
|
358
|
+
guards: O(e.name, e.guards, e.openAccess, e.service),
|
|
334
359
|
openAccess: e.openAccess,
|
|
360
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
335
361
|
publicApi: e.publicApi,
|
|
336
362
|
exposeAsTool: e.exposeAsTool,
|
|
337
363
|
internal: e.internal,
|
|
@@ -341,12 +367,13 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
341
367
|
name: e.name,
|
|
342
368
|
input: e.input,
|
|
343
369
|
output: e.output,
|
|
344
|
-
error: e.error ??
|
|
370
|
+
error: e.error ?? m.Never,
|
|
345
371
|
...e.idempotencyScope === void 0 ? {} : { idempotencyScope: e.idempotencyScope },
|
|
346
372
|
...e.serialize === void 0 ? {} : { serialize: e.serialize },
|
|
347
373
|
target: e.target,
|
|
348
|
-
guards: O(e.name, e.guards, e.openAccess),
|
|
374
|
+
guards: O(e.name, e.guards, e.openAccess, e.service),
|
|
349
375
|
openAccess: e.openAccess,
|
|
376
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
350
377
|
publicApi: e.publicApi,
|
|
351
378
|
exposeAsTool: e.exposeAsTool,
|
|
352
379
|
requiresApproval: e.requiresApproval,
|
|
@@ -357,9 +384,10 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
357
384
|
name: e.name,
|
|
358
385
|
input: e.input,
|
|
359
386
|
output: e.output,
|
|
360
|
-
error: e.error ??
|
|
361
|
-
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),
|
|
362
389
|
openAccess: e.openAccess,
|
|
390
|
+
service: e.service === void 0 ? void 0 : { callers: Array.isArray(e.service.callers) ? [...e.service.callers] : e.service.callers },
|
|
363
391
|
source: e.source,
|
|
364
392
|
target: e.target,
|
|
365
393
|
publicApi: e.publicApi,
|
|
@@ -367,54 +395,54 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
367
395
|
requiresApproval: e.requiresApproval,
|
|
368
396
|
internal: e.internal,
|
|
369
397
|
overridesPlugin: e.overridesPlugin
|
|
370
|
-
}),
|
|
398
|
+
}), _n = (e) => D({
|
|
371
399
|
kind: "stream",
|
|
372
400
|
name: e.name,
|
|
373
401
|
input: e.input,
|
|
374
402
|
element: e.element,
|
|
375
|
-
error: e.error ??
|
|
403
|
+
error: e.error ?? m.Never,
|
|
376
404
|
internal: e.internal,
|
|
377
405
|
overridesPlugin: e.overridesPlugin,
|
|
378
406
|
guards: O(e.name, e.guards, e.openAccess),
|
|
379
407
|
openAccess: e.openAccess
|
|
380
|
-
}), M = (e, t) => t && t.length > 0 ?
|
|
381
|
-
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);
|
|
382
410
|
if (t === "stream" || t === "query") return n;
|
|
383
|
-
let r = t === "mutation" ?
|
|
384
|
-
return
|
|
385
|
-
},
|
|
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) => ({
|
|
386
414
|
...e,
|
|
387
415
|
name: t
|
|
388
|
-
}),
|
|
389
|
-
payload:
|
|
390
|
-
success:
|
|
416
|
+
}), wn = (e, t) => h.make(e.name, {
|
|
417
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
418
|
+
success: Nt(e.output),
|
|
391
419
|
error: M(P(e, "query"), t),
|
|
392
420
|
stream: !0
|
|
393
|
-
}),
|
|
394
|
-
payload:
|
|
421
|
+
}), Tn = (e, t) => h.make(e.name, {
|
|
422
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
395
423
|
success: e.output,
|
|
396
424
|
error: M(P(e, "mutation"), t)
|
|
397
|
-
}),
|
|
398
|
-
payload:
|
|
425
|
+
}), En = (e, t) => h.make(e.name, {
|
|
426
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
399
427
|
success: e.output,
|
|
400
428
|
error: M(P(e, "action"), t)
|
|
401
|
-
}),
|
|
402
|
-
payload:
|
|
429
|
+
}), Dn = (e, t) => h.make(e.name, {
|
|
430
|
+
payload: y(e.input, e.name, N(e.guards)),
|
|
403
431
|
success: e.element,
|
|
404
432
|
error: M(e.error, t),
|
|
405
433
|
stream: !0
|
|
406
|
-
}),
|
|
434
|
+
}), On = (e) => {
|
|
407
435
|
if (typeof e != "object" || !e) return;
|
|
408
436
|
let t = e._tag;
|
|
409
437
|
return typeof t == "string" ? t : void 0;
|
|
410
|
-
},
|
|
438
|
+
}, kn = (e) => {
|
|
411
439
|
switch (e.kind) {
|
|
412
|
-
case "query": return
|
|
413
|
-
case "mutation": return
|
|
414
|
-
case "action": return
|
|
415
|
-
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);
|
|
416
444
|
}
|
|
417
|
-
},
|
|
445
|
+
}, An = (e) => {
|
|
418
446
|
let t = e.input, n = t === void 0 ? {} : { input: t }, r = e.output, i = r === void 0 ? {} : { output: r };
|
|
419
447
|
if (e.kind === "query") return {
|
|
420
448
|
kind: "query",
|
|
@@ -460,7 +488,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
460
488
|
..."relations" in e && e.relations !== void 0 ? { relations: e.relations } : {}
|
|
461
489
|
}))
|
|
462
490
|
};
|
|
463
|
-
},
|
|
491
|
+
}, jn = 7500, Mn = (e) => typeof e == "object" && !!e && e.kind === "event", Nn = (e) => {
|
|
464
492
|
if (e.name.length === 0) throw Error("defineEvent: `name` must not be empty");
|
|
465
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
|
|
466
494
|
whitespace and delivers nothing — silently, and only on that broker, so an
|
|
@@ -489,68 +517,68 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
489
517
|
name: e.name,
|
|
490
518
|
key: e.key,
|
|
491
519
|
payload: e.payload,
|
|
492
|
-
guards: e.openAccess === void 0 ? e.guards : [
|
|
520
|
+
guards: e.openAccess === void 0 ? e.guards : [f(e.openAccess.trim())],
|
|
493
521
|
openAccess: e.openAccess,
|
|
494
522
|
rewind: e.rewind,
|
|
495
523
|
webhook: e.webhook,
|
|
496
524
|
delivery: e.delivery
|
|
497
525
|
};
|
|
498
|
-
},
|
|
499
|
-
_tag:
|
|
500
|
-
origin:
|
|
501
|
-
n:
|
|
502
|
-
emittedAt:
|
|
526
|
+
}, Pn = (e) => m.Struct({
|
|
527
|
+
_tag: m.Literal("event"),
|
|
528
|
+
origin: m.String,
|
|
529
|
+
n: m.Number,
|
|
530
|
+
emittedAt: m.Number,
|
|
503
531
|
payload: e
|
|
504
|
-
}),
|
|
505
|
-
_tag:
|
|
506
|
-
missed:
|
|
507
|
-
reason:
|
|
508
|
-
}),
|
|
509
|
-
origin:
|
|
510
|
-
n:
|
|
511
|
-
}),
|
|
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({
|
|
512
540
|
key: e,
|
|
513
|
-
resume:
|
|
514
|
-
}),
|
|
515
|
-
let n = e.guards !== void 0 && e.guards.some((e) => !
|
|
516
|
-
return
|
|
517
|
-
payload:
|
|
518
|
-
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),
|
|
519
547
|
error: r,
|
|
520
548
|
stream: !0
|
|
521
549
|
});
|
|
522
|
-
},
|
|
523
|
-
event:
|
|
524
|
-
message:
|
|
525
|
-
}) {},
|
|
526
|
-
event:
|
|
527
|
-
message:
|
|
528
|
-
}) {},
|
|
529
|
-
event:
|
|
530
|
-
bytes:
|
|
531
|
-
limit:
|
|
532
|
-
}) {},
|
|
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) => {
|
|
533
561
|
if (typeof e != "object" || !e) return JSON.stringify(e) ?? "null";
|
|
534
562
|
let t = Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
535
563
|
return JSON.stringify(t);
|
|
536
|
-
},
|
|
564
|
+
}, Gn = "\0", Kn = (e, t, n) => [
|
|
537
565
|
e ?? "~",
|
|
538
566
|
t,
|
|
539
|
-
|
|
540
|
-
].join("\0"),
|
|
567
|
+
Wn(n)
|
|
568
|
+
].join("\0"), qn = (e) => {
|
|
541
569
|
let [t = "~", n = "", r = ""] = e.split("\0");
|
|
542
570
|
return {
|
|
543
571
|
tenantId: t === "~" ? null : t,
|
|
544
572
|
event: n,
|
|
545
573
|
key: r
|
|
546
574
|
};
|
|
547
|
-
},
|
|
575
|
+
}, Jn = (e) => e.split("\0").join(" · "), F = Symbol.for("@voltro/protocol/workflow-access"), Yn = {
|
|
548
576
|
guards: void 0,
|
|
549
577
|
openAccess: void 0,
|
|
550
578
|
internal: !1,
|
|
551
579
|
controls: void 0,
|
|
552
580
|
controlsOpenAccess: void 0
|
|
553
|
-
},
|
|
581
|
+
}, Xn = (e, t) => {
|
|
554
582
|
let n = t.guards;
|
|
555
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
|
|
556
584
|
and decide with \`openAccess\` or \`internal\`, or list the scopes that may start it.`);
|
|
@@ -576,22 +604,22 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
576
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.`);
|
|
577
605
|
}
|
|
578
606
|
return {
|
|
579
|
-
guards: t.openAccess === void 0 ? t.guards : [
|
|
607
|
+
guards: t.openAccess === void 0 ? t.guards : [f(t.openAccess.trim())],
|
|
580
608
|
openAccess: t.openAccess?.trim(),
|
|
581
609
|
internal: t.internal === !0,
|
|
582
|
-
controls: i === void 0 ? r : [
|
|
610
|
+
controls: i === void 0 ? r : [f(i.trim())],
|
|
583
611
|
controlsOpenAccess: i?.trim()
|
|
584
612
|
};
|
|
585
|
-
},
|
|
613
|
+
}, Zn = (e, t) => {
|
|
586
614
|
Object.defineProperty(e, F, {
|
|
587
615
|
value: t,
|
|
588
616
|
enumerable: !1
|
|
589
617
|
});
|
|
590
618
|
}, I = (e) => {
|
|
591
|
-
if (typeof e != "object" || !e) return
|
|
619
|
+
if (typeof e != "object" || !e) return Yn;
|
|
592
620
|
let t = e[F];
|
|
593
|
-
return t === void 0 ?
|
|
594
|
-
},
|
|
621
|
+
return t === void 0 ? Yn : t;
|
|
622
|
+
}, Qn = (e) => {
|
|
595
623
|
let t = I(e);
|
|
596
624
|
return {
|
|
597
625
|
name: e.name,
|
|
@@ -600,18 +628,23 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
600
628
|
openAccess: t.openAccess,
|
|
601
629
|
controls: t.controls
|
|
602
630
|
};
|
|
603
|
-
},
|
|
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) => {
|
|
604
637
|
let t = e.alias?.trim(), n = e.instance?.trim(), r = t !== void 0 && t !== "" ? t : e.base;
|
|
605
638
|
return n !== void 0 && n !== "" ? `${r}#${n}` : r;
|
|
606
|
-
},
|
|
639
|
+
}, ir = (e) => {
|
|
607
640
|
if (e.length !== 0) return (t, n) => e.reduceRight((e, t) => t(e, n), t);
|
|
608
|
-
},
|
|
609
|
-
let n =
|
|
641
|
+
}, ar = (e, t) => {
|
|
642
|
+
let n = xt.GenericTag(e);
|
|
610
643
|
return {
|
|
611
644
|
Tag: n,
|
|
612
|
-
Live:
|
|
645
|
+
Live: St.succeed(n, t)
|
|
613
646
|
};
|
|
614
|
-
},
|
|
647
|
+
}, or = (e, t, n) => {
|
|
615
648
|
if (!t) return { ok: !0 };
|
|
616
649
|
let r = n === void 0 ? null : L(n);
|
|
617
650
|
if (!r) return {
|
|
@@ -621,7 +654,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
621
654
|
let i = t.trim();
|
|
622
655
|
if (i === "*" || i === "") return { ok: !0 };
|
|
623
656
|
let a = i.split(/\s+/).filter((e) => e.length > 0);
|
|
624
|
-
for (let i of a) if (!
|
|
657
|
+
for (let i of a) if (!sr(i, r)) return {
|
|
625
658
|
ok: !1,
|
|
626
659
|
reason: `plugin "${e}" requires framework ${t}, running ${n}`
|
|
627
660
|
};
|
|
@@ -634,7 +667,7 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
634
667
|
patch: Number(t[3]),
|
|
635
668
|
pre: t[4] ?? ""
|
|
636
669
|
} : null;
|
|
637
|
-
}, 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) => {
|
|
638
671
|
if (e === "*") return !0;
|
|
639
672
|
if (e.startsWith("^")) {
|
|
640
673
|
let n = L(e.slice(1));
|
|
@@ -656,87 +689,87 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
656
689
|
}
|
|
657
690
|
let r = L(e);
|
|
658
691
|
return r ? R(t, r) === 0 : !1;
|
|
659
|
-
},
|
|
692
|
+
}, cr = (e) => {
|
|
660
693
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
661
694
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
|
|
662
|
-
},
|
|
695
|
+
}, lr = (e) => {
|
|
663
696
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
664
697
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
665
|
-
},
|
|
666
|
-
let e = globalThis, t = e[
|
|
698
|
+
}, ur = Symbol.for("@voltro/protocol/pluginAliases"), z = () => {
|
|
699
|
+
let e = globalThis, t = e[ur];
|
|
667
700
|
if (t instanceof Map) return t;
|
|
668
701
|
let n = /* @__PURE__ */ new Map();
|
|
669
|
-
return e[
|
|
670
|
-
},
|
|
702
|
+
return e[ur] = n, n;
|
|
703
|
+
}, dr = (e) => {
|
|
671
704
|
let t = z();
|
|
672
705
|
for (let [n, r] of Object.entries(e)) {
|
|
673
706
|
if (r === "") continue;
|
|
674
707
|
let e = t.get(n);
|
|
675
708
|
e === void 0 ? t.set(n, /* @__PURE__ */ new Set([r])) : e.add(r);
|
|
676
709
|
}
|
|
677
|
-
},
|
|
710
|
+
}, fr = () => {
|
|
678
711
|
z().clear();
|
|
679
|
-
},
|
|
712
|
+
}, pr = (e, t) => {
|
|
680
713
|
let n = z().get(e);
|
|
681
|
-
if (n === void 0 || n.size === 0) return `${
|
|
714
|
+
if (n === void 0 || n.size === 0) return `${cr(e)}.${t}`;
|
|
682
715
|
if (n.size === 1) return `${[...n][0]}.${t}`;
|
|
683
716
|
let r = [...n].filter((e) => !e.includes("#"));
|
|
684
717
|
if (r.length === 1) return `${r[0]}.${t}`;
|
|
685
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}').`);
|
|
686
|
-
}, B =
|
|
687
|
-
kind:
|
|
688
|
-
at:
|
|
689
|
-
retryAfterMs:
|
|
690
|
-
}),
|
|
691
|
-
kind:
|
|
692
|
-
at:
|
|
693
|
-
executionId:
|
|
694
|
-
runId:
|
|
695
|
-
}),
|
|
696
|
-
kind:
|
|
697
|
-
at:
|
|
698
|
-
}),
|
|
699
|
-
kind:
|
|
700
|
-
at:
|
|
701
|
-
}),
|
|
702
|
-
kind:
|
|
703
|
-
at:
|
|
704
|
-
failureId:
|
|
705
|
-
})), V =
|
|
706
|
-
id:
|
|
707
|
-
workflowName:
|
|
708
|
-
executionId:
|
|
709
|
-
status:
|
|
710
|
-
output:
|
|
711
|
-
error:
|
|
712
|
-
tag:
|
|
713
|
-
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
|
|
714
747
|
}))
|
|
715
|
-
}), U =
|
|
716
|
-
operation:
|
|
717
|
-
kind:
|
|
718
|
-
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),
|
|
719
752
|
snapshot: H
|
|
720
|
-
}).pipe(
|
|
721
|
-
operation:
|
|
722
|
-
workflowName:
|
|
723
|
-
receiptId:
|
|
724
|
-
requestId:
|
|
725
|
-
kind:
|
|
726
|
-
observation:
|
|
727
|
-
kind:
|
|
728
|
-
outcome:
|
|
729
|
-
kind:
|
|
730
|
-
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
|
|
731
764
|
}))
|
|
732
|
-
}),
|
|
733
|
-
kind:
|
|
765
|
+
}), m.Struct({
|
|
766
|
+
kind: m.Literal("execution"),
|
|
734
767
|
snapshot: H
|
|
735
|
-
}),
|
|
736
|
-
kind:
|
|
737
|
-
reason:
|
|
768
|
+
}), m.Struct({
|
|
769
|
+
kind: m.Literal("unavailable"),
|
|
770
|
+
reason: m.Literal("missing-request", "missing-run", "unconfirmed-generation", "unbound-submission")
|
|
738
771
|
}))
|
|
739
|
-
}).pipe(
|
|
772
|
+
}).pipe(m.filter((e) => {
|
|
740
773
|
let t = e.observation;
|
|
741
774
|
if (t.kind === "unavailable") return e.kind === "unknown" && (t.reason === "missing-request" ? e.requestId === null : e.requestId !== null);
|
|
742
775
|
if (e.requestId === null) return !1;
|
|
@@ -744,307 +777,307 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
744
777
|
if (t.kind === "admission") return e.kind === (t.outcome.kind === "cancelled" ? "confirmed" : "already-terminal");
|
|
745
778
|
let n = t.snapshot;
|
|
746
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");
|
|
747
|
-
}, { message: () => "Queued cancellation acknowledgement contradicts its receipt or observation" })),
|
|
748
|
-
mode:
|
|
749
|
-
dueAt:
|
|
750
|
-
retryAfterMs:
|
|
751
|
-
intentId:
|
|
752
|
-
}),
|
|
753
|
-
id:
|
|
754
|
-
workflowName:
|
|
755
|
-
executionId:
|
|
756
|
-
status:
|
|
757
|
-
deferral:
|
|
758
|
-
}),
|
|
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) => {
|
|
759
792
|
let n = I(e);
|
|
760
|
-
return
|
|
761
|
-
payload:
|
|
762
|
-
success:
|
|
763
|
-
error:
|
|
793
|
+
return h.make(e.name, {
|
|
794
|
+
payload: y(e.payloadSchema, e.name, N(n.guards)),
|
|
795
|
+
success: gr,
|
|
796
|
+
error: Sn({
|
|
764
797
|
errorSchema: e.errorSchema,
|
|
765
798
|
guards: n.guards
|
|
766
799
|
}, t)
|
|
767
800
|
});
|
|
768
|
-
}, G =
|
|
769
|
-
id:
|
|
770
|
-
tag:
|
|
771
|
-
executionId:
|
|
801
|
+
}, G = m.Struct({
|
|
802
|
+
id: m.String,
|
|
803
|
+
tag: m.String,
|
|
804
|
+
executionId: m.String,
|
|
772
805
|
status: V,
|
|
773
|
-
payload:
|
|
774
|
-
workflowVersion:
|
|
775
|
-
workflowPatches:
|
|
776
|
-
output:
|
|
777
|
-
subject:
|
|
778
|
-
source:
|
|
779
|
-
errorTag:
|
|
780
|
-
errorMessage:
|
|
781
|
-
cancelled:
|
|
782
|
-
startedAt:
|
|
783
|
-
completedAt:
|
|
784
|
-
durationMs:
|
|
785
|
-
traceId:
|
|
786
|
-
parentExecutionId:
|
|
787
|
-
parentClosePolicy:
|
|
788
|
-
}),
|
|
789
|
-
tag:
|
|
790
|
-
status:
|
|
791
|
-
limit:
|
|
792
|
-
}),
|
|
793
|
-
id:
|
|
794
|
-
runId:
|
|
795
|
-
stepName:
|
|
796
|
-
attempt:
|
|
797
|
-
status:
|
|
798
|
-
input:
|
|
799
|
-
retryPolicy:
|
|
800
|
-
output:
|
|
801
|
-
errorTag:
|
|
802
|
-
errorMessage:
|
|
803
|
-
errorCause:
|
|
804
|
-
startedAt:
|
|
805
|
-
completedAt:
|
|
806
|
-
durationMs:
|
|
807
|
-
}),
|
|
808
|
-
id:
|
|
809
|
-
runId:
|
|
810
|
-
eventType:
|
|
811
|
-
payload:
|
|
812
|
-
occurredAt:
|
|
813
|
-
stepName:
|
|
814
|
-
attempt:
|
|
815
|
-
}),
|
|
816
|
-
id:
|
|
817
|
-
name:
|
|
818
|
-
payload:
|
|
819
|
-
source:
|
|
820
|
-
subject:
|
|
821
|
-
traceId:
|
|
822
|
-
occurredAt:
|
|
823
|
-
}),
|
|
824
|
-
id:
|
|
825
|
-
eventId:
|
|
826
|
-
eventName:
|
|
827
|
-
triggerId:
|
|
828
|
-
workflowName:
|
|
829
|
-
executionId:
|
|
830
|
-
status:
|
|
831
|
-
idempotencyKey:
|
|
832
|
-
skipped:
|
|
833
|
-
errorMessage:
|
|
834
|
-
createdAt:
|
|
835
|
-
completedAt:
|
|
836
|
-
}),
|
|
837
|
-
name:
|
|
838
|
-
limit:
|
|
839
|
-
}),
|
|
840
|
-
requestId:
|
|
841
|
-
cause:
|
|
842
|
-
reason:
|
|
843
|
-
detail:
|
|
844
|
-
key:
|
|
845
|
-
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
|
|
846
879
|
}))
|
|
847
880
|
}), { exact: !0 })
|
|
848
|
-
}), J =
|
|
849
|
-
workflowName:
|
|
850
|
-
executionId:
|
|
851
|
-
control:
|
|
852
|
-
}),
|
|
853
|
-
workflowName:
|
|
854
|
-
executionId:
|
|
855
|
-
operation:
|
|
856
|
-
requestId:
|
|
857
|
-
}), Y =
|
|
858
|
-
workflowName:
|
|
859
|
-
receiptId:
|
|
860
|
-
requestId:
|
|
861
|
-
}),
|
|
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({
|
|
862
895
|
...Y.fields,
|
|
863
896
|
cause: q.fields.cause
|
|
864
|
-
}),
|
|
897
|
+
}), Or = j({
|
|
865
898
|
name: "__voltro.workflow.queued.cancel",
|
|
866
|
-
input:
|
|
899
|
+
input: Dr,
|
|
867
900
|
output: W,
|
|
868
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"
|
|
869
|
-
}),
|
|
902
|
+
}), kr = k({
|
|
870
903
|
name: "__voltro.workflow.queued.control",
|
|
871
904
|
input: Y,
|
|
872
905
|
output: W,
|
|
873
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"
|
|
874
|
-
}),
|
|
907
|
+
}), Ar = k({
|
|
875
908
|
name: "__voltro.workflow.control",
|
|
876
|
-
input:
|
|
909
|
+
input: Er,
|
|
877
910
|
output: U,
|
|
878
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"
|
|
879
|
-
}),
|
|
880
|
-
id:
|
|
881
|
-
signalName:
|
|
882
|
-
payload:
|
|
883
|
-
}),
|
|
884
|
-
id:
|
|
885
|
-
updateName:
|
|
886
|
-
payload:
|
|
887
|
-
timeoutMs:
|
|
888
|
-
}),
|
|
889
|
-
eventId:
|
|
890
|
-
updateId:
|
|
891
|
-
completedEventId:
|
|
892
|
-
result:
|
|
893
|
-
}),
|
|
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({
|
|
894
927
|
name: "__voltro.workflow.run",
|
|
895
928
|
source: "_voltro_workflow_runs",
|
|
896
|
-
input:
|
|
897
|
-
output:
|
|
929
|
+
input: Cr,
|
|
930
|
+
output: m.Array(G),
|
|
898
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"
|
|
899
|
-
}),
|
|
932
|
+
}), Fr = k({
|
|
900
933
|
name: "__voltro.workflow.runs",
|
|
901
934
|
source: "_voltro_workflow_runs",
|
|
902
|
-
input:
|
|
903
|
-
output:
|
|
935
|
+
input: vr,
|
|
936
|
+
output: m.Array(G),
|
|
904
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"
|
|
905
|
-
}),
|
|
938
|
+
}), Ir = k({
|
|
906
939
|
name: "__voltro.workflow.run.steps",
|
|
907
940
|
source: "_voltro_workflow_run_steps",
|
|
908
941
|
input: K,
|
|
909
|
-
output:
|
|
942
|
+
output: m.Array(yr),
|
|
910
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"
|
|
911
|
-
}),
|
|
944
|
+
}), Lr = k({
|
|
912
945
|
name: "__voltro.workflow.run.events",
|
|
913
946
|
source: "_voltro_workflow_run_events",
|
|
914
947
|
input: K,
|
|
915
|
-
output:
|
|
948
|
+
output: m.Array(br),
|
|
916
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"
|
|
917
|
-
}),
|
|
950
|
+
}), Rr = k({
|
|
918
951
|
name: "__voltro.workflow.domainEvents",
|
|
919
952
|
source: "_voltro_workflow_events",
|
|
920
|
-
input:
|
|
921
|
-
output:
|
|
953
|
+
input: wr,
|
|
954
|
+
output: m.Array(xr),
|
|
922
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"
|
|
923
|
-
}),
|
|
956
|
+
}), zr = k({
|
|
924
957
|
name: "__voltro.workflow.event.deliveries",
|
|
925
958
|
source: "_voltro_workflow_event_deliveries",
|
|
926
|
-
input:
|
|
927
|
-
output:
|
|
959
|
+
input: Tr,
|
|
960
|
+
output: m.Array(Sr),
|
|
928
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"
|
|
929
|
-
}),
|
|
962
|
+
}), Br = j({
|
|
930
963
|
name: "__voltro.workflow.cancel",
|
|
931
964
|
input: J,
|
|
932
965
|
output: U,
|
|
933
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"
|
|
934
|
-
}),
|
|
967
|
+
}), Vr = j({
|
|
935
968
|
name: "__voltro.workflow.resume",
|
|
936
969
|
input: J,
|
|
937
970
|
output: U,
|
|
938
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"
|
|
939
|
-
}),
|
|
972
|
+
}), Hr = j({
|
|
940
973
|
name: "__voltro.workflow.signal",
|
|
941
|
-
input:
|
|
942
|
-
output:
|
|
974
|
+
input: jr,
|
|
975
|
+
output: m.Struct({ eventId: m.String }),
|
|
943
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"
|
|
944
|
-
}),
|
|
977
|
+
}), Ur = j({
|
|
945
978
|
name: "__voltro.workflow.update",
|
|
946
|
-
input:
|
|
947
|
-
output:
|
|
979
|
+
input: Mr,
|
|
980
|
+
output: Nr,
|
|
948
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"
|
|
949
|
-
}),
|
|
950
|
-
runId:
|
|
951
|
-
requestId:
|
|
952
|
-
}),
|
|
953
|
-
...
|
|
954
|
-
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)
|
|
955
988
|
}), X = {
|
|
956
|
-
requestId:
|
|
957
|
-
originalRunId:
|
|
958
|
-
originalExecutionId:
|
|
959
|
-
workflowName:
|
|
960
|
-
},
|
|
989
|
+
requestId: m.NonEmptyString,
|
|
990
|
+
originalRunId: m.NonEmptyString,
|
|
991
|
+
originalExecutionId: m.NonEmptyString,
|
|
992
|
+
workflowName: m.NonEmptyString
|
|
993
|
+
}, qr = m.Union(m.Struct({
|
|
961
994
|
...X,
|
|
962
|
-
kind:
|
|
963
|
-
nextAttemptAt:
|
|
964
|
-
}),
|
|
995
|
+
kind: m.Literal("queued"),
|
|
996
|
+
nextAttemptAt: m.NullOr(m.Number)
|
|
997
|
+
}), m.Struct({
|
|
965
998
|
...X,
|
|
966
|
-
kind:
|
|
967
|
-
executionId:
|
|
968
|
-
}).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({
|
|
969
1002
|
...X,
|
|
970
|
-
kind:
|
|
971
|
-
automaticRetryStopped:
|
|
972
|
-
nextAttemptAt:
|
|
973
|
-
}).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({
|
|
974
1007
|
...X,
|
|
975
|
-
kind:
|
|
1008
|
+
kind: m.Literal("not-started"),
|
|
976
1009
|
outcome: B
|
|
977
|
-
}),
|
|
1010
|
+
}), m.Struct({
|
|
978
1011
|
...X,
|
|
979
|
-
kind:
|
|
980
|
-
failureId:
|
|
981
|
-
})),
|
|
982
|
-
id:
|
|
983
|
-
tag:
|
|
984
|
-
label:
|
|
985
|
-
undone:
|
|
986
|
-
crossesAction:
|
|
987
|
-
createdAt:
|
|
988
|
-
}),
|
|
989
|
-
invocationId:
|
|
990
|
-
reason:
|
|
991
|
-
}) {},
|
|
992
|
-
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,
|
|
993
1026
|
source: "_voltro_undo_log",
|
|
994
|
-
input:
|
|
995
|
-
output:
|
|
1027
|
+
input: m.Struct({ limit: m.optional(m.Number) }),
|
|
1028
|
+
output: m.Array(Zr),
|
|
996
1029
|
openAccess: "subject-scoped by construction: lists only the calling subject's own undoable actions"
|
|
997
|
-
}),
|
|
998
|
-
name:
|
|
999
|
-
input:
|
|
1000
|
-
output:
|
|
1001
|
-
error:
|
|
1030
|
+
}), ri = A({
|
|
1031
|
+
name: Yr,
|
|
1032
|
+
input: m.Struct({ invocationId: m.String }),
|
|
1033
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1034
|
+
error: ti,
|
|
1002
1035
|
openAccess: "subject-scoped by construction: undo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
1003
|
-
}),
|
|
1004
|
-
name:
|
|
1005
|
-
input:
|
|
1006
|
-
output:
|
|
1007
|
-
error:
|
|
1036
|
+
}), ii = A({
|
|
1037
|
+
name: Xr,
|
|
1038
|
+
input: m.Struct({ invocationId: m.String }),
|
|
1039
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1040
|
+
error: ti,
|
|
1008
1041
|
openAccess: "subject-scoped by construction: redo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
1009
|
-
}),
|
|
1010
|
-
table:
|
|
1011
|
-
reason:
|
|
1012
|
-
}) {},
|
|
1013
|
-
operation:
|
|
1014
|
-
table:
|
|
1015
|
-
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
|
|
1016
1049
|
}) {
|
|
1017
1050
|
get message() {
|
|
1018
1051
|
return `${this.operation} on '${this.table}' failed: ${this.cause}`;
|
|
1019
1052
|
}
|
|
1020
|
-
},
|
|
1021
|
-
table:
|
|
1022
|
-
found:
|
|
1053
|
+
}, si = class extends m.TaggedError()("NoRowFound", {
|
|
1054
|
+
table: m.String,
|
|
1055
|
+
found: m.Number
|
|
1023
1056
|
}) {
|
|
1024
1057
|
get message() {
|
|
1025
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`;
|
|
1026
1059
|
}
|
|
1027
|
-
},
|
|
1028
|
-
table:
|
|
1029
|
-
summary:
|
|
1030
|
-
issues:
|
|
1031
|
-
path:
|
|
1032
|
-
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
|
|
1033
1066
|
}))
|
|
1034
|
-
}) {},
|
|
1035
|
-
table:
|
|
1036
|
-
id:
|
|
1037
|
-
reason:
|
|
1038
|
-
}) {},
|
|
1039
|
-
table:
|
|
1040
|
-
columns:
|
|
1041
|
-
}) {},
|
|
1042
|
-
kind:
|
|
1043
|
-
table:
|
|
1044
|
-
operation:
|
|
1045
|
-
constraint:
|
|
1046
|
-
column:
|
|
1047
|
-
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)
|
|
1048
1081
|
}) {
|
|
1049
1082
|
get message() {
|
|
1050
1083
|
if (this.detail !== void 0) return this.detail;
|
|
@@ -1057,86 +1090,86 @@ var gt = p.Union(p.String, p.Number), h = p.Record({
|
|
|
1057
1090
|
case "check": return `check constraint ${t}: the row does not satisfy it`;
|
|
1058
1091
|
}
|
|
1059
1092
|
}
|
|
1060
|
-
},
|
|
1061
|
-
name:
|
|
1093
|
+
}, fi = "__voltro.approvals.pending", pi = "__voltro.approvals.decide", mi = k({
|
|
1094
|
+
name: fi,
|
|
1062
1095
|
source: "_voltro_approvals",
|
|
1063
|
-
input:
|
|
1064
|
-
output:
|
|
1096
|
+
input: m.Struct({ limit: m.optional(m.Number) }),
|
|
1097
|
+
output: m.Array(Xt),
|
|
1065
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"
|
|
1066
|
-
}),
|
|
1067
|
-
name:
|
|
1068
|
-
input:
|
|
1069
|
-
approvalId:
|
|
1070
|
-
decision:
|
|
1071
|
-
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)
|
|
1072
1105
|
}),
|
|
1073
|
-
output:
|
|
1074
|
-
approvalId:
|
|
1075
|
-
status:
|
|
1106
|
+
output: m.Struct({
|
|
1107
|
+
approvalId: m.String,
|
|
1108
|
+
status: m.Literal("approved", "rejected")
|
|
1076
1109
|
}),
|
|
1077
|
-
error:
|
|
1110
|
+
error: Yt,
|
|
1078
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"
|
|
1079
|
-
}),
|
|
1080
|
-
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,
|
|
1081
1114
|
kind: Q,
|
|
1082
|
-
label:
|
|
1083
|
-
status:
|
|
1084
|
-
accountId:
|
|
1085
|
-
accountLabel:
|
|
1086
|
-
scopes:
|
|
1087
|
-
expiresAt:
|
|
1088
|
-
lastError:
|
|
1089
|
-
connectedAt:
|
|
1090
|
-
}),
|
|
1091
|
-
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,
|
|
1092
1125
|
expected: Q,
|
|
1093
1126
|
actual: Q
|
|
1094
|
-
}) {},
|
|
1095
|
-
connectionId:
|
|
1096
|
-
reason:
|
|
1097
|
-
transient:
|
|
1098
|
-
}) {}, $ =
|
|
1099
|
-
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,
|
|
1100
1133
|
source: "_voltro_connections",
|
|
1101
|
-
input:
|
|
1102
|
-
output:
|
|
1134
|
+
input: m.Struct({}),
|
|
1135
|
+
output: m.Array(bi),
|
|
1103
1136
|
openAccess: "self-scoped read: projects the declared connections for the calling subject only (its own connect/disconnect state)"
|
|
1104
|
-
}),
|
|
1105
|
-
name:
|
|
1106
|
-
input:
|
|
1107
|
-
connectionId:
|
|
1108
|
-
redirectTo:
|
|
1137
|
+
}), Ei = j({
|
|
1138
|
+
name: _i,
|
|
1139
|
+
input: m.Struct({
|
|
1140
|
+
connectionId: m.String,
|
|
1141
|
+
redirectTo: m.optional(m.String)
|
|
1109
1142
|
}),
|
|
1110
|
-
output:
|
|
1111
|
-
authorizeUrl:
|
|
1112
|
-
state:
|
|
1143
|
+
output: m.Struct({
|
|
1144
|
+
authorizeUrl: m.String,
|
|
1145
|
+
state: m.String
|
|
1113
1146
|
}),
|
|
1114
1147
|
error: $,
|
|
1115
1148
|
openAccess: "self-service: begins an oauth handshake that stores a credential for the calling subject only; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
1116
|
-
}),
|
|
1117
|
-
name:
|
|
1118
|
-
input:
|
|
1119
|
-
connectionId:
|
|
1120
|
-
token:
|
|
1149
|
+
}), Di = A({
|
|
1150
|
+
name: vi,
|
|
1151
|
+
input: m.Struct({
|
|
1152
|
+
connectionId: m.String,
|
|
1153
|
+
token: m.String
|
|
1121
1154
|
}),
|
|
1122
|
-
output:
|
|
1155
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1123
1156
|
error: $,
|
|
1124
1157
|
openAccess: "self-service: stores a pasted token as the calling subject's own credential; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
1125
|
-
}),
|
|
1126
|
-
name:
|
|
1127
|
-
input:
|
|
1128
|
-
output:
|
|
1158
|
+
}), Oi = A({
|
|
1159
|
+
name: Z,
|
|
1160
|
+
input: m.Struct({ connectionId: m.String }),
|
|
1161
|
+
output: m.Struct({ ok: m.Boolean }),
|
|
1129
1162
|
error: $,
|
|
1130
1163
|
openAccess: "self-service: deletes only the calling subject's own credential row for this connection"
|
|
1131
|
-
}),
|
|
1164
|
+
}), ki = (e) => {
|
|
1132
1165
|
let t = e instanceof Date ? e.getTime() : typeof e == "number" ? e : typeof e == "string" ? new Date(e).getTime() : 0;
|
|
1133
1166
|
return Number.isNaN(t) ? 0 : t;
|
|
1134
|
-
},
|
|
1167
|
+
}, Ai = 4001, ji = /* @__PURE__ */ new Set(["/rpc", "/ws"]), Mi = (e) => {
|
|
1135
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`);
|
|
1136
1169
|
if (!e.path.startsWith("/")) throw Error(`defineWebSocket: path must be absolute, got '${e.path}'`);
|
|
1137
|
-
if (
|
|
1170
|
+
if (ji.has(e.path)) throw Error(`defineWebSocket: '${e.path}' is the framework's own socket surface — mount the gateway elsewhere`);
|
|
1138
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)}'`);
|
|
1139
1172
|
return e;
|
|
1140
|
-
},
|
|
1173
|
+
}, Ni = 1;
|
|
1141
1174
|
//#endregion
|
|
1142
|
-
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 };
|