@voltro/runtime 0.86.0 → 0.88.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 +5484 -0
- package/README.md +43 -0
- package/THIRD-PARTY-NOTICES.md +1511 -276
- package/dist/aggregate.js +1 -2
- package/dist/aggregateExtrema.js +1 -2
- package/dist/aggregateIvm.js +1 -2
- package/dist/analyticsMirror.js +1 -2
- package/dist/analyticsSink.js +9 -16
- package/dist/apiKeyUsage.js +1 -2
- package/dist/apiKeys.js +83 -80
- package/dist/apiKeysWiring.js +1 -2
- package/dist/apiRoleBucketSampler.js +63 -0
- package/dist/apiRoleWorkloadHistory.js +55 -0
- package/dist/apiRoleWorkloadMetrics.js +77 -0
- package/dist/apiRoleWorkloadStorage.js +94 -0
- package/dist/approvalBuiltins.js +1 -2
- package/dist/approvals.js +68 -76
- package/dist/authMiddlewareLayer.js +8 -8
- package/dist/bindEvent.js +49 -30
- package/dist/boot-refusal.d.ts +10 -0
- package/dist/{bootRefusal.js → boot-refusal.js} +1 -2
- package/dist/bootListener.js +203 -47
- package/dist/bootStoreCodec.js +39 -39
- package/dist/businessRules.js +1 -2
- package/dist/changeClaimsTable.js +1 -2
- package/dist/circuitBreaker.js +1 -72
- package/dist/columnOnUpdate.js +1 -2
- package/dist/composeAnalytics.js +32 -12
- package/dist/computedQuery.js +1 -2
- package/dist/computedQueryCache.js +289 -0
- package/dist/connectionBuiltins.js +1 -2
- package/dist/connectionCredentials.js +1 -2
- package/dist/connectionState.js +1 -2
- package/dist/connectionVault.js +1 -2
- package/dist/connectionsFacade.js +33 -32
- package/dist/coordinatedSchedule.js +85 -80
- package/dist/crdtHistory.js +1 -2
- package/dist/crdtMerge.js +1 -2
- package/dist/crdtVersionsTable.js +1 -2
- package/dist/credentialBound.js +1 -2
- package/dist/crud.js +1 -2
- package/dist/dataStore.js +155 -123
- package/dist/dataloader.js +1 -2
- package/dist/declaredTablesGuard.js +3 -3
- package/dist/defineExecutor.js +1 -2
- package/dist/dependencyGraph.js +1 -2
- package/dist/devices.js +1 -2
- package/dist/devicesWiring.js +1 -2
- package/dist/dialectReplicationAdapter.js +1 -2
- package/dist/dispatcher.js +404 -330
- package/dist/effectStore.js +3 -4
- package/dist/engineClients.js +23 -0
- package/dist/eventBus.js +1 -2
- package/dist/eventPublish.js +1 -2
- package/dist/events.js +1 -2
- package/dist/expectation.js +1 -2
- package/dist/expectationEvaluator.js +2 -3
- package/dist/experiment.js +1 -2
- package/dist/experimentEvaluator.js +1 -2
- package/dist/externalizedTasks.js +20 -8
- package/dist/fieldCipher.js +110 -42
- package/dist/fieldKeyRegistry.js +294 -0
- package/dist/fieldKeyRekey.js +285 -0
- package/dist/fieldKeyScan.js +135 -0
- package/dist/fieldKeyring.js +76 -0
- package/dist/fingerprint.js +1 -2
- package/dist/finops.js +1 -2
- package/dist/finopsAccountant.js +1 -2
- package/dist/handlerBody.js +1 -2
- package/dist/healthProbes.js +1 -2
- package/dist/hot.d.ts +56 -0
- package/dist/hot.js +3 -0
- package/dist/hotDataStore.js +147 -0
- package/dist/hotDataStoreSnapshot.js +97 -0
- package/dist/hotDataStoreTables.js +17 -0
- package/dist/http-range.d.ts +53 -0
- package/dist/http-range.js +51 -0
- package/dist/httpClientSsrf.js +13 -39
- package/dist/httpClientTracing.js +13 -11
- package/dist/httpCompression.js +18 -19
- package/dist/httpInputStream.js +81 -0
- package/dist/httpKeepAlive.js +1 -2
- package/dist/httpRouteMounts.js +2 -2
- package/dist/idempotencyStore.js +93 -54
- package/dist/idleDetector.js +1 -2
- package/dist/index.d.ts +1185 -452
- package/dist/index.js +144 -134
- package/dist/insertRequiredColumns.js +1 -2
- package/dist/instanceMembership.js +1 -2
- package/dist/ivm.js +1 -2
- package/dist/kvDataStore.js +1 -2
- package/dist/kvFacade.js +24 -19
- package/dist/matcher.js +1 -2
- package/dist/memoryColumnDefaults.js +1 -2
- package/dist/memoryQueryJoins.js +17 -18
- package/dist/memorySetOperations.js +42 -0
- package/dist/metrics.js +39 -26
- package/dist/observability.js +2 -3
- package/dist/observedGraph.js +1 -2
- package/dist/originGuard.js +1 -2
- package/dist/outbox.js +2 -3
- package/dist/pluginRefRules.js +1 -2
- package/dist/policyGuardResolver.js +1 -2
- package/dist/preview.js +1 -2
- package/dist/projectedRows.js +1 -2
- package/dist/provenance.js +1 -2
- package/dist/rangeIndex.js +1 -2
- package/dist/rawReadScope.js +2 -3
- package/dist/reaction.js +1 -2
- package/dist/reactiveConfig.js +1 -2
- package/dist/readClassification.js +1 -2
- package/dist/readRecorder.js +36 -36
- package/dist/readScopePredicate.js +11 -0
- package/dist/rebac.js +1 -2
- package/dist/rebacInterceptor.js +1 -2
- package/dist/registry.js +1 -2
- package/dist/relevantFields.js +1 -2
- package/dist/replicaHealth.js +1 -2
- package/dist/replicaLocality.js +1 -2
- package/dist/replicaObservations.js +1 -2
- package/dist/replicaSelection.js +1 -2
- package/dist/replicatedDataStore.js +23 -6
- package/dist/requestLoader.js +1 -2
- package/dist/resumeCensus.js +1 -2
- package/dist/revalidation.js +1 -2
- package/dist/rowFilter.js +57 -41
- package/dist/rowStateBytes.js +1 -2
- package/dist/rpcBodyCap.js +1 -2
- package/dist/rpcConnections.js +9 -10
- package/dist/rpcDefectDiagnostics.js +1 -2
- package/dist/rpcServer.js +523 -451
- package/dist/rpcWorkloadAdmission.js +49 -0
- package/dist/runAsSystem.js +1 -2
- package/dist/rywPositionStore.js +83 -49
- package/dist/schedule.js +1 -2
- package/dist/scheduleBackfillRequests.js +1 -2
- package/dist/scheduleClaimsTable.js +1 -2
- package/dist/scheduleRunsTable.js +1 -2
- package/dist/scheduler.js +7 -3
- package/dist/schemaRegistry.js +1 -2
- package/dist/secretsResolver.js +1 -2
- package/dist/securityHeaders.js +1 -2
- package/dist/servePipeline.js +238 -154
- package/dist/serverOnlyAudit.js +1 -2
- package/dist/serverTracer.js +1 -2
- package/dist/serviceCredentials.js +1 -2
- package/dist/setReadScopes.js +27 -0
- package/dist/singleNodeOrchestrator.js +1 -2
- package/dist/snapshotValueCodec.js +45 -0
- package/dist/sourceResolution.js +35 -26
- package/dist/storeMiddleware.js +213 -212
- package/dist/storeQuery.js +1 -2
- package/dist/storeRead.js +1 -2
- package/dist/subscriber.js +2 -2
- package/dist/subscriptionOutbox.js +1 -2
- package/dist/subscriptionRegistry.js +1 -2
- package/dist/subscriptionResume.js +1 -2
- package/dist/subscriptionSocketMetrics.js +1 -2
- package/dist/systemSubject.js +1 -2
- package/dist/tenantScope.js +9 -22
- package/dist/tenantSelection.js +1 -2
- package/dist/timeline.js +1 -2
- package/dist/traceContext.js +1 -2
- package/dist/traceSink.js +1 -2
- package/dist/traceSpansTable.js +1 -2
- package/dist/traceparent.js +9 -21
- package/dist/transactionSubject.js +1 -2
- package/dist/trustedProxy.js +2 -3
- package/dist/undo.js +1 -2
- package/dist/undoBuiltins.js +1 -2
- package/dist/undoCapture.js +1 -2
- package/dist/undoLogTable.js +1 -2
- package/dist/upsertBinding.js +1 -2
- package/dist/wakeOrchestrator.js +1 -2
- package/dist/wakeRegistry.js +1 -2
- package/dist/wakeRouter.js +1 -2
- package/dist/wakeSupervisor.js +1 -2
- package/dist/wakeupsTable.js +1 -2
- package/dist/webSocketGatewayRuntime.js +112 -73
- package/dist/webhookVerification.js +1 -2
- package/dist/wireColumnStrip.js +1 -2
- package/dist/workflowReadBuiltins.js +1 -2
- package/dist/workflowRuntime.js +10 -11
- package/package.json +36 -17
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/snapshotValueCodec.ts
|
|
2
|
+
var e = "\0", t = `${e}d`, n = `${e}n`, r = `${e}b`, i = `${e}o`, a = 1, o = (e) => {
|
|
3
|
+
if (typeof e != "object" || !e) return !1;
|
|
4
|
+
let t = Object.getPrototypeOf(e);
|
|
5
|
+
return t === Object.prototype || t === null;
|
|
6
|
+
}, s = (a) => {
|
|
7
|
+
if (typeof a != "object" || !a) return typeof a == "bigint" ? { [n]: a.toString() } : a;
|
|
8
|
+
if (a instanceof Date) return { [t]: Number.isNaN(a.getTime()) ? null : a.toISOString() };
|
|
9
|
+
if (a instanceof Uint8Array) return { [r]: Buffer.from(a.buffer, a.byteOffset, a.byteLength).toString("base64") };
|
|
10
|
+
if (Array.isArray(a)) return a.map(s);
|
|
11
|
+
if (o(a)) {
|
|
12
|
+
let t = {}, n = !1;
|
|
13
|
+
for (let [r, i] of Object.entries(a)) r.startsWith(e) && (n = !0), t[r] = s(i);
|
|
14
|
+
return n ? { [i]: t } : t;
|
|
15
|
+
}
|
|
16
|
+
throw TypeError("A snapshot value carries a non-plain object; it cannot be cached faithfully.");
|
|
17
|
+
}, c = (e) => {
|
|
18
|
+
if (typeof e != "object" || !e) return e;
|
|
19
|
+
if (Array.isArray(e)) return e.map(c);
|
|
20
|
+
let a = e, o = Object.keys(a);
|
|
21
|
+
if (o.length === 1) {
|
|
22
|
+
let e = o[0], s = a[e];
|
|
23
|
+
if (e === t) return s === null ? /* @__PURE__ */ new Date(NaN) : new Date(s);
|
|
24
|
+
if (e === n) return BigInt(s);
|
|
25
|
+
if (e === r) return new Uint8Array(Buffer.from(s, "base64"));
|
|
26
|
+
if (e === i) {
|
|
27
|
+
let e = {};
|
|
28
|
+
for (let [t, n] of Object.entries(s)) e[t] = c(n);
|
|
29
|
+
return e;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
let s = {};
|
|
33
|
+
for (let [e, t] of Object.entries(a)) s[e] = c(t);
|
|
34
|
+
return s;
|
|
35
|
+
}, l = (e) => ({
|
|
36
|
+
v: a,
|
|
37
|
+
value: s(e)
|
|
38
|
+
}), u = (e) => {
|
|
39
|
+
if (o(e) && e.v === a && "value" in e) try {
|
|
40
|
+
return { value: c(e.value) };
|
|
41
|
+
} catch {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export { u as decodeSnapshotValue, l as encodeSnapshotValue };
|
package/dist/sourceResolution.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var
|
|
1
|
+
import { captureOptionalQuerySources as e, declaredReactivityChannelKeys as t, isReactivityChannelKey as n, sourceKeys as r } from "@voltro/protocol";
|
|
2
|
+
// src/sourceResolution.ts
|
|
3
|
+
var i = (e, t) => {
|
|
4
4
|
let n, r = 0;
|
|
5
5
|
for (let i of t) {
|
|
6
6
|
let t = 0;
|
|
@@ -11,32 +11,41 @@ var r = (e, t) => {
|
|
|
11
11
|
o > r && o >= .6 && (r = o, n = i);
|
|
12
12
|
}
|
|
13
13
|
return n;
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
for (let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
}, a = (a, o) => {
|
|
15
|
+
let s = t(), c = [], l = /* @__PURE__ */ new Map();
|
|
16
|
+
for (let t of a) {
|
|
17
|
+
let a = new Set(e(t.name, t.source, t.optionalSource));
|
|
18
|
+
for (let e of r(t.source)) if (n(e)) {
|
|
19
|
+
if (s.has(e)) continue;
|
|
20
|
+
c.push({
|
|
21
|
+
procedure: t.name,
|
|
22
|
+
source: e,
|
|
23
|
+
didYouMean: void 0,
|
|
24
|
+
channel: !0,
|
|
25
|
+
...a.has(e) ? { optional: !0 } : {}
|
|
26
|
+
});
|
|
27
|
+
} else o.size === 0 || o.has(e) || (l.has(e) || l.set(e, i(e, o)), c.push({
|
|
28
|
+
procedure: t.name,
|
|
29
|
+
source: e,
|
|
30
|
+
didYouMean: a.has(e) ? void 0 : l.get(e),
|
|
31
|
+
channel: !1,
|
|
32
|
+
...a.has(e) ? { optional: !0 } : {}
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
return c;
|
|
36
|
+
}, o = (e) => {
|
|
32
37
|
if (e.length === 0) return;
|
|
33
|
-
let t = e.
|
|
34
|
-
|
|
38
|
+
let t = e.filter((e) => e.optional === !0);
|
|
39
|
+
if (t.length > 0) {
|
|
40
|
+
let n = o(e.filter((e) => e.optional !== !0)), r = t.map((e) => ` ${e.procedure}: optional integration source '${e.source}' is unavailable`);
|
|
41
|
+
return [n, `${t.length} optional integration source(s) are unavailable:\n${r.join("\n")}\nTheir observers remain declared. Installed sources still trigger recomputation; executor authorization still applies.`].filter((e) => e !== void 0).join("\n\n");
|
|
42
|
+
}
|
|
43
|
+
let n = e.map((e) => e.channel ? ` ${e.procedure}: source '${e.source}' names a reactivity channel nobody declared` : ` ${e.procedure}: source '${e.source}' matches no declared table` + (e.didYouMean === void 0 ? "" : ` — did you mean '${e.didYouMean}'?`)), r = e.some((e) => e.channel) ? "\nFor the `channel:` entries: declare it with `reactivityChannel(<name>)` and pass the\nCHANNEL as `source:`, not its key as a string. Authoring against the object is what\nmakes a channel source impossible to leave stale — you cannot import a declaration\nthat does not exist." : "";
|
|
44
|
+
return `${e.length} reactive source(s) name a table that does not exist:\n${n.join("\n")}\n
|
|
35
45
|
These queries are NOT broken. They serve their first snapshot and then never
|
|
36
46
|
update again, which is indistinguishable from "nothing has changed" — so the
|
|
37
47
|
symptom is silence, and silence is what this surface exists to eliminate.
|
|
38
48
|
A \`source:\` is a STRING, so \`tsc\` cannot see a stale one and a rename leaves it
|
|
39
|
-
behind quietly.` +
|
|
49
|
+
behind quietly.` + r;
|
|
40
50
|
};
|
|
41
|
-
|
|
42
|
-
export { a as formatUnresolvedSources, i as unresolvedSources };
|
|
51
|
+
export { o as formatUnresolvedSources, a as unresolvedSources };
|