@e4779/pi-fabric 0.116.0-fork.25 → 0.117.2-fork.28
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/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/agents.js +3 -3
- package/dist/chunks/{chunk-HZGQ7XYM.js → chunk-3FJUP3GV.js} +2 -2
- package/dist/chunks/{chunk-U2UBUKNQ.js → chunk-3UGN25XS.js} +2 -2
- package/dist/chunks/{chunk-HITKWKYD.js → chunk-4EW7GVUR.js} +192 -326
- package/dist/chunks/chunk-4EW7GVUR.js.map +7 -0
- package/dist/chunks/{chunk-VR2LV4CA.js → chunk-53N2I4QA.js} +2 -2
- package/dist/chunks/{chunk-IQXNJNDI.js → chunk-5UBRGTVN.js} +8 -8
- package/dist/chunks/{chunk-4GNFBZPR.js → chunk-ASSLHWZS.js} +2 -2
- package/dist/chunks/{chunk-DLXPTBPL.js → chunk-AV36PBKH.js} +9 -1
- package/dist/chunks/chunk-AV36PBKH.js.map +7 -0
- package/dist/chunks/chunk-BN7F52EG.js +525 -0
- package/dist/chunks/chunk-BN7F52EG.js.map +7 -0
- package/dist/chunks/{chunk-QGP7AY2R.js → chunk-C7Z6F3SO.js} +2 -2
- package/dist/chunks/{chunk-56RFFBBO.js → chunk-CRRUW26I.js} +12 -12
- package/dist/chunks/{chunk-I2TK65VR.js → chunk-D5NYNIST.js} +5 -5
- package/dist/chunks/{chunk-KBYSGB7E.js → chunk-EFETPXU2.js} +69 -229
- package/dist/chunks/chunk-EFETPXU2.js.map +7 -0
- package/dist/chunks/{chunk-QQ7D6UAM.js → chunk-EHQQ4KCX.js} +2 -2
- package/dist/chunks/{chunk-7EYJE4TW.js → chunk-EKODKR6Y.js} +55 -6
- package/dist/chunks/chunk-EKODKR6Y.js.map +7 -0
- package/dist/chunks/{chunk-H3SGA7G7.js → chunk-FIDUHKMM.js} +5 -5
- package/dist/chunks/{chunk-4GGBND7V.js → chunk-FSYAGCGA.js} +2 -2
- package/dist/chunks/{chunk-ZPI4QTOX.js → chunk-FUY6XVRX.js} +2 -2
- package/dist/chunks/{chunk-A5XF3ZPJ.js → chunk-G4TLWHRS.js} +2 -2
- package/dist/chunks/{chunk-PTZ5DKAB.js → chunk-G54PEZ44.js} +4 -3
- package/dist/chunks/chunk-G54PEZ44.js.map +7 -0
- package/dist/chunks/{chunk-7C5IEIQK.js → chunk-GEQMQVNS.js} +2 -2
- package/dist/chunks/{chunk-DONS3EZH.js → chunk-GIK2WNAK.js} +2 -2
- package/dist/chunks/{chunk-MOJBW5X2.js → chunk-GO32KSEZ.js} +5 -3
- package/dist/chunks/chunk-GO32KSEZ.js.map +7 -0
- package/dist/chunks/{chunk-HQ5YW2OJ.js → chunk-HP5P7NBO.js} +2 -2
- package/dist/chunks/{chunk-R2MMPHR2.js → chunk-INRXG4J5.js} +2 -2
- package/dist/chunks/{chunk-BQWJ5ZR7.js → chunk-K7J2ABAZ.js} +3 -3
- package/dist/chunks/{chunk-OTHMEDN6.js → chunk-KVYNGDGC.js} +6 -6
- package/dist/chunks/{chunk-6EVAHJAR.js → chunk-LEU5CDSL.js} +3 -3
- package/dist/chunks/{chunk-HCNHKJDA.js → chunk-MLLYR3Y6.js} +2 -2
- package/dist/chunks/{chunk-D3W6CBJZ.js → chunk-MZUC6LLH.js} +4 -4
- package/dist/chunks/{chunk-D3IONBBJ.js → chunk-P7CBPPHY.js} +5 -5
- package/dist/chunks/{chunk-WQ6LC2KK.js → chunk-QT4W5YVB.js} +2 -2
- package/dist/chunks/{chunk-TNPZBMYC.js → chunk-ROTCDDOV.js} +4 -4
- package/dist/chunks/{chunk-PH4PT6R4.js → chunk-TIIIHPHF.js} +2 -2
- package/dist/chunks/{chunk-2YG4ZA2K.js → chunk-TIJ3YQXX.js} +2 -2
- package/dist/chunks/{chunk-QCCPR3U5.js → chunk-UOM37PE4.js} +4 -4
- package/dist/chunks/{chunk-EQYQICUY.js → chunk-UXIBKMUM.js} +3 -3
- package/dist/chunks/{chunk-V2IV4LYW.js → chunk-XWWV6TKV.js} +3 -3
- package/dist/chunks/{chunk-O7IREHJI.js → chunk-YKYWY722.js} +318 -39
- package/dist/chunks/chunk-YKYWY722.js.map +7 -0
- package/dist/chunks/{chunk-JV4JR6TT.js → chunk-ZEXCKK4K.js} +3 -3
- package/dist/chunks/{chunk-ODYU3IJU.js → chunk-ZPPNWB64.js} +4 -4
- package/dist/cli/decisions.js +1 -1
- package/dist/cli/mesh.js +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/compaction/owner.js +7 -7
- package/dist/components/configuration.js +4 -4
- package/dist/core/action-registry.js +6 -6
- package/dist/core/provider-operations.js +53 -154
- package/dist/core/provider-operations.js.map +2 -2
- package/dist/durable.js +2 -2
- package/dist/durable.js.map +1 -1
- package/dist/entropy/index.js +8 -8
- package/dist/extension-bootstrap.js +16 -16
- package/dist/fabric-runtime-state.js +42 -42
- package/dist/index.js +20 -20
- package/dist/jev/client.js +3 -3
- package/dist/jev/decision-types.d.ts +16 -0
- package/dist/jev/decision-types.d.ts.map +1 -1
- package/dist/jev/guest-types.d.ts +1 -1
- package/dist/jev/guest-types.d.ts.map +1 -1
- package/dist/jev/observation.js +7 -7
- package/dist/jev/routes.d.ts +1 -1
- package/dist/jev/routes.d.ts.map +1 -1
- package/dist/jev.js +12 -12
- package/dist/memory/digest.js +2 -2
- package/dist/memory/discovery.js +6 -6
- package/dist/memory/file-worker.js +9 -9
- package/dist/memory/normalize.js +5 -5
- package/dist/memory/search.js +7 -7
- package/dist/memory/worker-provider.js +10 -10
- package/dist/memory.js +10 -10
- package/dist/providers/jev-provider.js +12 -12
- package/dist/providers/memory-provider.js +9 -9
- package/dist/residency/host.js +12 -12
- package/dist/residency/pi-entry.js +12 -12
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/monty-runtime.js +3 -3
- package/dist/runtime/typescript-kernel.js +2 -2
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/controller.d.ts +2 -0
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation.js +1 -1
- package/dist/ui/dashboard-detail.d.ts.map +1 -1
- package/dist/ui/dashboard.js +6 -5
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/settings.js +3 -3
- package/dist/ui/transcript-parser.d.ts.map +1 -1
- package/dist/ui/transcript-reader.d.ts +1 -0
- package/dist/ui/transcript-reader.d.ts.map +1 -1
- package/dist/ui/transcript-sanitization.d.ts +2 -0
- package/dist/ui/transcript-sanitization.d.ts.map +1 -1
- package/dist/ui/transcript.d.ts +1 -1
- package/dist/ui/transcript.d.ts.map +1 -1
- package/dist/ui/widget-activity.d.ts +21 -0
- package/dist/ui/widget-activity.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +40 -3
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/authority-kernel.d.ts +1 -1
- package/dist/verified/generated/authority-kernel.js +61 -157
- package/dist/verified/generated/kernel.d.ts +8 -8
- package/dist/verified/generated/kernel.js +205 -449
- package/dist/verified/generated/lifecycle-kernel.d.ts +1 -1
- package/dist/verified/generated/lifecycle-kernel.js +95 -133
- package/dist/verified/generated/manifest.json +18 -18
- package/dist/verified/generated/provider-kernel.d.ts +1 -1
- package/dist/verified/generated/provider-kernel.js +48 -149
- package/dist/verified/generated/storage-kernel.d.ts +2 -2
- package/dist/verified/generated/storage-kernel.js +59 -219
- package/dist/verified/nat.d.ts.map +1 -1
- package/dist/verified/policy.d.ts.map +1 -1
- package/docs/configuration.md +1 -1
- package/docs/durable-pi.md +2 -2
- package/docs/interface.md +4 -0
- package/docs/jev.md +2 -2
- package/docs/provider-capabilities.md +1 -1
- package/docs/verified-kernels.md +4 -3
- package/package.json +9 -9
- package/proofs/abi.json +11 -11
- package/proofs/authority-types.d.ts +1 -1
- package/proofs/lifecycle-types.d.ts +1 -1
- package/proofs/provider-types.d.ts +1 -1
- package/proofs/storage-types.d.ts +2 -2
- package/proofs/types.d.ts +4 -4
- package/scripts/test-verified-kernels.mjs +1 -1
- package/scripts/verified-kernels.mjs +1 -1
- package/dist/chunks/chunk-7EYJE4TW.js.map +0 -7
- package/dist/chunks/chunk-DLXPTBPL.js.map +0 -7
- package/dist/chunks/chunk-HITKWKYD.js.map +0 -7
- package/dist/chunks/chunk-KBYSGB7E.js.map +0 -7
- package/dist/chunks/chunk-MOJBW5X2.js.map +0 -7
- package/dist/chunks/chunk-O7IREHJI.js.map +0 -7
- package/dist/chunks/chunk-PTZ5DKAB.js.map +0 -7
- package/dist/chunks/chunk-WTLH5RY4.js +0 -760
- package/dist/chunks/chunk-WTLH5RY4.js.map +0 -7
- /package/dist/chunks/{chunk-HZGQ7XYM.js.map → chunk-3FJUP3GV.js.map} +0 -0
- /package/dist/chunks/{chunk-U2UBUKNQ.js.map → chunk-3UGN25XS.js.map} +0 -0
- /package/dist/chunks/{chunk-VR2LV4CA.js.map → chunk-53N2I4QA.js.map} +0 -0
- /package/dist/chunks/{chunk-IQXNJNDI.js.map → chunk-5UBRGTVN.js.map} +0 -0
- /package/dist/chunks/{chunk-4GNFBZPR.js.map → chunk-ASSLHWZS.js.map} +0 -0
- /package/dist/chunks/{chunk-QGP7AY2R.js.map → chunk-C7Z6F3SO.js.map} +0 -0
- /package/dist/chunks/{chunk-56RFFBBO.js.map → chunk-CRRUW26I.js.map} +0 -0
- /package/dist/chunks/{chunk-I2TK65VR.js.map → chunk-D5NYNIST.js.map} +0 -0
- /package/dist/chunks/{chunk-QQ7D6UAM.js.map → chunk-EHQQ4KCX.js.map} +0 -0
- /package/dist/chunks/{chunk-H3SGA7G7.js.map → chunk-FIDUHKMM.js.map} +0 -0
- /package/dist/chunks/{chunk-4GGBND7V.js.map → chunk-FSYAGCGA.js.map} +0 -0
- /package/dist/chunks/{chunk-ZPI4QTOX.js.map → chunk-FUY6XVRX.js.map} +0 -0
- /package/dist/chunks/{chunk-A5XF3ZPJ.js.map → chunk-G4TLWHRS.js.map} +0 -0
- /package/dist/chunks/{chunk-7C5IEIQK.js.map → chunk-GEQMQVNS.js.map} +0 -0
- /package/dist/chunks/{chunk-DONS3EZH.js.map → chunk-GIK2WNAK.js.map} +0 -0
- /package/dist/chunks/{chunk-HQ5YW2OJ.js.map → chunk-HP5P7NBO.js.map} +0 -0
- /package/dist/chunks/{chunk-R2MMPHR2.js.map → chunk-INRXG4J5.js.map} +0 -0
- /package/dist/chunks/{chunk-BQWJ5ZR7.js.map → chunk-K7J2ABAZ.js.map} +0 -0
- /package/dist/chunks/{chunk-OTHMEDN6.js.map → chunk-KVYNGDGC.js.map} +0 -0
- /package/dist/chunks/{chunk-6EVAHJAR.js.map → chunk-LEU5CDSL.js.map} +0 -0
- /package/dist/chunks/{chunk-HCNHKJDA.js.map → chunk-MLLYR3Y6.js.map} +0 -0
- /package/dist/chunks/{chunk-D3W6CBJZ.js.map → chunk-MZUC6LLH.js.map} +0 -0
- /package/dist/chunks/{chunk-D3IONBBJ.js.map → chunk-P7CBPPHY.js.map} +0 -0
- /package/dist/chunks/{chunk-WQ6LC2KK.js.map → chunk-QT4W5YVB.js.map} +0 -0
- /package/dist/chunks/{chunk-TNPZBMYC.js.map → chunk-ROTCDDOV.js.map} +0 -0
- /package/dist/chunks/{chunk-PH4PT6R4.js.map → chunk-TIIIHPHF.js.map} +0 -0
- /package/dist/chunks/{chunk-2YG4ZA2K.js.map → chunk-TIJ3YQXX.js.map} +0 -0
- /package/dist/chunks/{chunk-QCCPR3U5.js.map → chunk-UOM37PE4.js.map} +0 -0
- /package/dist/chunks/{chunk-EQYQICUY.js.map → chunk-UXIBKMUM.js.map} +0 -0
- /package/dist/chunks/{chunk-V2IV4LYW.js.map → chunk-XWWV6TKV.js.map} +0 -0
- /package/dist/chunks/{chunk-JV4JR6TT.js.map → chunk-ZEXCKK4K.js.map} +0 -0
- /package/dist/chunks/{chunk-ODYU3IJU.js.map → chunk-ZPPNWB64.js.map} +0 -0
|
@@ -14,31 +14,31 @@ import {
|
|
|
14
14
|
reconstructSessionLineage,
|
|
15
15
|
searchMemoryIndex,
|
|
16
16
|
shardPolicy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KVYNGDGC.js";
|
|
18
18
|
import {
|
|
19
19
|
compareLexical,
|
|
20
20
|
foldSessionDigest,
|
|
21
21
|
normalizeMemoryPhrase,
|
|
22
22
|
tokenizeLexical
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MZUC6LLH.js";
|
|
24
24
|
import {
|
|
25
25
|
AmbiguousSessionError,
|
|
26
26
|
enumerateAllSessions,
|
|
27
27
|
resolveScope,
|
|
28
28
|
resolveSessionTarget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TIIIHPHF.js";
|
|
30
30
|
import {
|
|
31
31
|
expandSessionEntriesChecked,
|
|
32
32
|
normalizeRecords,
|
|
33
33
|
normalizeSession
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-D5NYNIST.js";
|
|
35
35
|
import {
|
|
36
36
|
actionArgNormalizer
|
|
37
37
|
} from "./chunk-NQOEHX62.js";
|
|
38
38
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
39
|
+
Be,
|
|
40
|
+
acceptMemoryChunk
|
|
41
|
+
} from "./chunk-BN7F52EG.js";
|
|
42
42
|
|
|
43
43
|
// src/memory/context.ts
|
|
44
44
|
var RECALL_DEFAULT_PAGE_SIZE = 10;
|
|
@@ -1220,7 +1220,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1220
1220
|
if (snapshot) {
|
|
1221
1221
|
const sourceChanged = expectedSourceHash !== void 0 && snapshot.sourceHash !== expectedSourceHash;
|
|
1222
1222
|
const lineageChanged = expectedLineageFingerprint !== void 0 && snapshot.lineageFingerprint !== expectedLineageFingerprint;
|
|
1223
|
-
if (!
|
|
1223
|
+
if (!Be(!sourceChanged, !lineageChanged)) {
|
|
1224
1224
|
return {
|
|
1225
1225
|
session: ref.file,
|
|
1226
1226
|
branches,
|
|
@@ -1247,7 +1247,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1247
1247
|
const initialLineage = access.lineage(branches);
|
|
1248
1248
|
const sourceChanged = expectedSourceHash !== void 0 && initialState.sourceHash !== expectedSourceHash;
|
|
1249
1249
|
const lineageChanged = expectedLineageFingerprint !== void 0 && initialLineage.fingerprint !== expectedLineageFingerprint;
|
|
1250
|
-
if (!
|
|
1250
|
+
if (!Be(!sourceChanged, !lineageChanged)) {
|
|
1251
1251
|
return {
|
|
1252
1252
|
session: ref.file,
|
|
1253
1253
|
branches,
|
|
@@ -1283,7 +1283,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1283
1283
|
const finalState2 = access.state();
|
|
1284
1284
|
const finalLineage2 = access.lineage(branches);
|
|
1285
1285
|
const finalObservation = access.observe(branches);
|
|
1286
|
-
if (!finalState2 || !finalObservation || !
|
|
1286
|
+
if (!finalState2 || !finalObservation || !Be(finalState2.sourceHash === initialState.sourceHash, finalLineage2.fingerprint === initialLineage.fingerprint)) {
|
|
1287
1287
|
return {
|
|
1288
1288
|
session: ref.file,
|
|
1289
1289
|
error: stalePointerError(
|
|
@@ -1579,7 +1579,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1579
1579
|
cache.forgetExpansionSnapshot(snapshot);
|
|
1580
1580
|
const actualState = access.state();
|
|
1581
1581
|
const actualLineage = access.lineage(branches);
|
|
1582
|
-
if (!actualState || !endingObservation || !
|
|
1582
|
+
if (!actualState || !endingObservation || !Be(actualState.sourceHash === snapshot.sourceHash, actualLineage.fingerprint === snapshot.lineageFingerprint)) {
|
|
1583
1583
|
return {
|
|
1584
1584
|
session: ref.file,
|
|
1585
1585
|
error: stalePointerError(
|
|
@@ -2208,4 +2208,4 @@ export {
|
|
|
2208
2208
|
memoryActionSchemas,
|
|
2209
2209
|
MemoryProvider
|
|
2210
2210
|
};
|
|
2211
|
-
//# sourceMappingURL=chunk-
|
|
2211
|
+
//# sourceMappingURL=chunk-CRRUW26I.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFabricBranchSummaryDetails,
|
|
3
3
|
readFabricProjectionTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TIJ3YQXX.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
Ze
|
|
7
|
+
} from "./chunk-BN7F52EG.js";
|
|
8
8
|
|
|
9
9
|
// src/memory/normalize.ts
|
|
10
10
|
import fs from "node:fs";
|
|
@@ -419,7 +419,7 @@ var normalizeRecords = (records, identity, maxEntryChars, options = {}) => {
|
|
|
419
419
|
const type = asString(raw.type);
|
|
420
420
|
const ordinal = rawOrdinal;
|
|
421
421
|
rawOrdinal += 1;
|
|
422
|
-
if (!
|
|
422
|
+
if (!Ze(
|
|
423
423
|
!options.lineage || options.lineage.entryOrdinals === null,
|
|
424
424
|
options.lineage?.entryOrdinals?.has(ordinal) ?? false
|
|
425
425
|
)) {
|
|
@@ -654,4 +654,4 @@ export {
|
|
|
654
654
|
expandSessionEntries,
|
|
655
655
|
expandSessionEntriesChecked
|
|
656
656
|
};
|
|
657
|
-
//# sourceMappingURL=chunk-
|
|
657
|
+
//# sourceMappingURL=chunk-D5NYNIST.js.map
|
|
@@ -17,284 +17,124 @@ import fs from "node:fs";
|
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
|
|
19
19
|
// src/verified/generated/storage-kernel.js
|
|
20
|
-
function
|
|
20
|
+
function p(e, t) {
|
|
21
21
|
return { $: e < t ? "LT" : e === t ? "EQ" : "GT" };
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function c(e) {
|
|
24
24
|
if (e > 281474976710655)
|
|
25
25
|
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
26
26
|
return e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return (typeof e == "bigint" || Number.isInteger(e)) && e >= 0 && e <= 2 ** 53 ? Number(e) : { [Symbol.toPrimitive]() {
|
|
30
|
-
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
31
|
-
} };
|
|
32
|
-
}
|
|
33
|
-
function D(e) {
|
|
28
|
+
function P(e) {
|
|
34
29
|
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
35
30
|
e = e.f(e.x);
|
|
36
31
|
return e;
|
|
37
32
|
}
|
|
38
|
-
function
|
|
39
|
-
return (...
|
|
33
|
+
function f(e, t) {
|
|
34
|
+
return (...n) => n.length < t ? f((...a) => e(...n, ...a), t - n.length) : P(e(...n));
|
|
40
35
|
}
|
|
41
|
-
function
|
|
42
|
-
let
|
|
43
|
-
return u(
|
|
36
|
+
function D(e, t) {
|
|
37
|
+
let n = e.high, a = e.low, r = t.high, o = t.low;
|
|
38
|
+
return i(u(n, r), u(a, o));
|
|
44
39
|
}
|
|
45
|
-
function
|
|
40
|
+
function b(e, t) {
|
|
46
41
|
if (e.$ === "storage-plans.Any")
|
|
47
42
|
return true;
|
|
48
43
|
{
|
|
49
|
-
let
|
|
50
|
-
return
|
|
44
|
+
let n = e.version;
|
|
45
|
+
return D(n, t);
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
|
-
function
|
|
54
|
-
let t = e.high,
|
|
55
|
-
return
|
|
48
|
+
function h(e) {
|
|
49
|
+
let t = e.high, n = e.low, a = t < 2097151, r = n < 4294967295;
|
|
50
|
+
return i(i(v(t, 2097151), v(n, 4294967295)), a || r);
|
|
56
51
|
}
|
|
57
|
-
function
|
|
58
|
-
return e ? { $: "storage-plans.Revision", high:
|
|
52
|
+
function m(e, t, n) {
|
|
53
|
+
return e ? { $: "storage-plans.Revision", high: c(t + 1), low: 0 } : { $: "storage-plans.Revision", high: t, low: c(n + 1) };
|
|
59
54
|
}
|
|
60
|
-
function
|
|
61
|
-
let t = e.high,
|
|
62
|
-
return
|
|
55
|
+
function $(e) {
|
|
56
|
+
let t = e.high, n = e.low;
|
|
57
|
+
return m(u(n, 4294967295), t, n);
|
|
63
58
|
}
|
|
64
|
-
function
|
|
65
|
-
return e ? t :
|
|
59
|
+
function d(e, t, n) {
|
|
60
|
+
return e ? t : n;
|
|
66
61
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
62
|
+
function y(e, t) {
|
|
63
|
+
return i(h(e), h(t));
|
|
69
64
|
}
|
|
70
|
-
function
|
|
65
|
+
function x(e, t, n, a, r) {
|
|
71
66
|
if (e)
|
|
72
|
-
if (
|
|
73
|
-
let
|
|
74
|
-
return { $: "storage-plans.PutNext", key: t, value:
|
|
67
|
+
if (n.$ === "storage-plans.Put") {
|
|
68
|
+
let o = n.value, s = n.identity;
|
|
69
|
+
return { $: "storage-plans.PutNext", key: t, value: o, identity: s, version: $(a), highWater: $(r) };
|
|
75
70
|
} else
|
|
76
|
-
return { $: "storage-plans.DeleteNext", key: t, version:
|
|
71
|
+
return { $: "storage-plans.DeleteNext", key: t, version: $(a), highWater: $(r) };
|
|
77
72
|
else
|
|
78
73
|
return { $: "storage-plans.Exhausted" };
|
|
79
74
|
}
|
|
80
|
-
function
|
|
75
|
+
function A(e, t, n, a, r) {
|
|
81
76
|
if (t.$ === "storage-plans.Delete")
|
|
82
|
-
return
|
|
77
|
+
return n ? x(y(a, r), e, { $: "storage-plans.Delete" }, a, r) : { $: "storage-plans.Unchanged" };
|
|
83
78
|
{
|
|
84
|
-
let
|
|
85
|
-
return
|
|
79
|
+
let o = t.value, s = t.identity;
|
|
80
|
+
return x(y(d(n, a, r), r), e, { $: "storage-plans.Put", value: o, identity: s }, d(n, a, r), r);
|
|
86
81
|
}
|
|
87
82
|
}
|
|
88
|
-
function
|
|
89
|
-
return e ?
|
|
83
|
+
function C(e, t, n, a, r, o) {
|
|
84
|
+
return e ? A(t, n, a, r, o) : { $: "storage-plans.Conflict" };
|
|
90
85
|
}
|
|
91
|
-
function
|
|
92
|
-
let
|
|
93
|
-
return
|
|
86
|
+
function E(e, t) {
|
|
87
|
+
let n = e.key, a = e.expected, r = e.change, o = t.present, s = t.version, l = t.highWater;
|
|
88
|
+
return C(b(a, s), n, r, o, s, l);
|
|
94
89
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
90
|
+
function k(e, t) {
|
|
91
|
+
return E(e, t);
|
|
97
92
|
}
|
|
98
|
-
function
|
|
93
|
+
function i(e, t) {
|
|
99
94
|
return e ? t : false;
|
|
100
95
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
96
|
+
function u(e, t) {
|
|
97
|
+
return R(p(e, t));
|
|
103
98
|
}
|
|
104
|
-
function
|
|
105
|
-
return
|
|
99
|
+
function v(e, t) {
|
|
100
|
+
return T(p(e, t));
|
|
106
101
|
}
|
|
107
|
-
function
|
|
102
|
+
function R(e) {
|
|
108
103
|
return e.$ === "EQ";
|
|
109
104
|
}
|
|
110
|
-
function
|
|
105
|
+
function T(e) {
|
|
111
106
|
return e.$ !== "GT";
|
|
112
107
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
function i(e) {
|
|
124
|
-
let t = [e];
|
|
125
|
-
for (let a = t, s = 0; ; )
|
|
126
|
-
switch (e.$) {
|
|
127
|
-
case "storage-plans.Revision":
|
|
128
|
-
return a = a[s] = { ...e, high: BigInt(e.high), low: BigInt(e.low) }, t[0];
|
|
129
|
-
default:
|
|
130
|
-
throw "bend: storage-plans.Revision has no tag " + e?.$ + " (its tags: storage-plans.Revision); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function j(e) {
|
|
134
|
-
let t = [e];
|
|
135
|
-
for (let a = t, s = 0; ; )
|
|
136
|
-
switch (e.$) {
|
|
137
|
-
case "storage-plans.Any":
|
|
138
|
-
return a[s] = e, t[0];
|
|
139
|
-
case "storage-plans.At":
|
|
140
|
-
return a = a[s] = { ...e, version: $(e.version) }, t[0];
|
|
141
|
-
default:
|
|
142
|
-
throw "bend: storage-plans.Expectation has no tag " + e?.$ + " (its tags: storage-plans.Any, storage-plans.At); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function G(e) {
|
|
146
|
-
let t = [e];
|
|
147
|
-
for (let a = t, s = 0; ; )
|
|
148
|
-
switch (e.$) {
|
|
149
|
-
case "storage-plans.Any":
|
|
150
|
-
return a[s] = e, t[0];
|
|
151
|
-
case "storage-plans.At":
|
|
152
|
-
return a = a[s] = { ...e, version: i(e.version) }, t[0];
|
|
153
|
-
default:
|
|
154
|
-
throw "bend: storage-plans.Expectation has no tag " + e?.$ + " (its tags: storage-plans.Any, storage-plans.At); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function f(e) {
|
|
158
|
-
let t = [e];
|
|
159
|
-
for (let a = t, s = 0; ; )
|
|
160
|
-
switch (e.$) {
|
|
161
|
-
case "Nil":
|
|
162
|
-
return a[s] = e, t[0];
|
|
163
|
-
case "Con":
|
|
164
|
-
a = a[s] = { ...e, head: c(e.head) }, s = "tail", e = e[s];
|
|
165
|
-
continue;
|
|
166
|
-
default:
|
|
167
|
-
throw "bend: List has no tag " + e?.$ + " (its tags: Nil, Con); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function L(e) {
|
|
171
|
-
let t = [e];
|
|
172
|
-
for (let a = t, s = 0; ; )
|
|
173
|
-
switch (e.$) {
|
|
174
|
-
case "storage-plans.Put":
|
|
175
|
-
return a = a[s] = { ...e, value: f(e.value), identity: f(e.identity) }, t[0];
|
|
176
|
-
case "storage-plans.Delete":
|
|
177
|
-
return a[s] = e, t[0];
|
|
178
|
-
default:
|
|
179
|
-
throw "bend: storage-plans.Change has no tag " + e?.$ + " (its tags: storage-plans.Put, storage-plans.Delete); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function g(e) {
|
|
183
|
-
let t = [e];
|
|
184
|
-
for (let a = t, s = 0; ; )
|
|
185
|
-
switch (e.$) {
|
|
186
|
-
case "Nil":
|
|
187
|
-
return a[s] = e, t[0];
|
|
188
|
-
case "Con":
|
|
189
|
-
a = a[s] = { ...e, head: BigInt(e.head) }, s = "tail", e = e[s];
|
|
190
|
-
continue;
|
|
191
|
-
default:
|
|
192
|
-
throw "bend: List has no tag " + e?.$ + " (its tags: Nil, Con); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function M(e) {
|
|
196
|
-
let t = [e];
|
|
197
|
-
for (let a = t, s = 0; ; )
|
|
198
|
-
switch (e.$) {
|
|
199
|
-
case "storage-plans.Put":
|
|
200
|
-
return a = a[s] = { ...e, value: g(e.value), identity: g(e.identity) }, t[0];
|
|
201
|
-
case "storage-plans.Delete":
|
|
202
|
-
return a[s] = e, t[0];
|
|
203
|
-
default:
|
|
204
|
-
throw "bend: storage-plans.Change has no tag " + e?.$ + " (its tags: storage-plans.Put, storage-plans.Delete); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function Q(e) {
|
|
208
|
-
let t = [e];
|
|
209
|
-
for (let a = t, s = 0; ; )
|
|
210
|
-
switch (e.$) {
|
|
211
|
-
case "storage-plans.Conflict":
|
|
212
|
-
return a[s] = e, t[0];
|
|
213
|
-
case "storage-plans.Exhausted":
|
|
214
|
-
return a[s] = e, t[0];
|
|
215
|
-
case "storage-plans.Unchanged":
|
|
216
|
-
return a[s] = e, t[0];
|
|
217
|
-
case "storage-plans.PutNext":
|
|
218
|
-
return a = a[s] = { ...e, key: g(e.key), value: g(e.value), identity: g(e.identity), version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
219
|
-
case "storage-plans.DeleteNext":
|
|
220
|
-
return a = a[s] = { ...e, key: g(e.key), version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
221
|
-
default:
|
|
222
|
-
throw "bend: storage-plans.Plan has no tag " + e?.$ + " (its tags: storage-plans.Conflict, storage-plans.Exhausted, storage-plans.Unchanged, storage-plans.PutNext, storage-plans.DeleteNext); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function J(e) {
|
|
226
|
-
let t = [e];
|
|
227
|
-
for (let a = t, s = 0; ; )
|
|
228
|
-
switch (e.$) {
|
|
229
|
-
case "storage-plans.Request":
|
|
230
|
-
return a = a[s] = { ...e, key: f(e.key), expected: j(e.expected), change: L(e.change) }, t[0];
|
|
231
|
-
default:
|
|
232
|
-
throw "bend: storage-plans.Request has no tag " + e?.$ + " (its tags: storage-plans.Request); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
function O(e) {
|
|
236
|
-
let t = [e];
|
|
237
|
-
for (let a = t, s = 0; ; )
|
|
238
|
-
switch (e.$) {
|
|
239
|
-
case "storage-plans.Slot":
|
|
240
|
-
return a = a[s] = { ...e, version: $(e.version), highWater: $(e.highWater) }, t[0];
|
|
241
|
-
default:
|
|
242
|
-
throw "bend: storage-plans.Slot has no tag " + e?.$ + " (its tags: storage-plans.Slot); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
function z(e) {
|
|
246
|
-
let t = [e];
|
|
247
|
-
for (let a = t, s = 0; ; )
|
|
248
|
-
switch (e.$) {
|
|
249
|
-
case "storage-plans.Request":
|
|
250
|
-
return a = a[s] = { ...e, key: g(e.key), expected: G(e.expected), change: M(e.change) }, t[0];
|
|
251
|
-
default:
|
|
252
|
-
throw "bend: storage-plans.Request has no tag " + e?.$ + " (its tags: storage-plans.Request); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
function F(e) {
|
|
256
|
-
let t = [e];
|
|
257
|
-
for (let a = t, s = 0; ; )
|
|
258
|
-
switch (e.$) {
|
|
259
|
-
case "storage-plans.Slot":
|
|
260
|
-
return a = a[s] = { ...e, version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
261
|
-
default:
|
|
262
|
-
throw "bend: storage-plans.Slot has no tag " + e?.$ + " (its tags: storage-plans.Slot); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
var P = /* @__PURE__ */ new Map([["Any", "storage-plans.Any"], ["Revision", "storage-plans.Revision"], ["Exhausted", "storage-plans.Exhausted"], ["Put", "storage-plans.Put"], ["PutNext", "storage-plans.PutNext"], ["DeleteNext", "storage-plans.DeleteNext"], ["Delete", "storage-plans.Delete"], ["Unchanged", "storage-plans.Unchanged"], ["Conflict", "storage-plans.Conflict"], ["At", "storage-plans.At"], ["Request", "storage-plans.Request"], ["Slot", "storage-plans.Slot"]]);
|
|
266
|
-
var H = /* @__PURE__ */ new Map([["storage-plans.Any", "Any"], ["storage-plans.Revision", "Revision"], ["storage-plans.Exhausted", "Exhausted"], ["storage-plans.Put", "Put"], ["storage-plans.PutNext", "PutNext"], ["storage-plans.DeleteNext", "DeleteNext"], ["storage-plans.Delete", "Delete"], ["storage-plans.Unchanged", "Unchanged"], ["storage-plans.Conflict", "Conflict"], ["storage-plans.At", "At"], ["storage-plans.Request", "Request"], ["storage-plans.Slot", "Slot"]]);
|
|
267
|
-
function w(e, t) {
|
|
268
|
-
let a = [e];
|
|
269
|
-
for (let s = [[a, 0]]; s.length > 0; ) {
|
|
270
|
-
let [n, r] = s.pop(), o = n[r];
|
|
271
|
-
if (o === null || typeof o != "object") continue;
|
|
272
|
-
let l = Array.isArray(o) ? [...o] : { ...o };
|
|
273
|
-
typeof l.$ == "string" && (l.$ = t.get(l.$) ?? l.$), n[r] = l;
|
|
274
|
-
for (let A of Object.keys(l)) s.push([l, A]);
|
|
108
|
+
var w = /* @__PURE__ */ new Map([["Any", "storage-plans.Any"], ["Revision", "storage-plans.Revision"], ["Exhausted", "storage-plans.Exhausted"], ["Put", "storage-plans.Put"], ["PutNext", "storage-plans.PutNext"], ["DeleteNext", "storage-plans.DeleteNext"], ["Delete", "storage-plans.Delete"], ["Unchanged", "storage-plans.Unchanged"], ["Conflict", "storage-plans.Conflict"]]);
|
|
109
|
+
var U = /* @__PURE__ */ new Map([["storage-plans.Any", "Any"], ["storage-plans.Revision", "Revision"], ["storage-plans.Exhausted", "Exhausted"], ["storage-plans.Put", "Put"], ["storage-plans.PutNext", "PutNext"], ["storage-plans.DeleteNext", "DeleteNext"], ["storage-plans.Delete", "Delete"], ["storage-plans.Unchanged", "Unchanged"], ["storage-plans.Conflict", "Conflict"]]);
|
|
110
|
+
function g(e, t) {
|
|
111
|
+
let n = [e];
|
|
112
|
+
for (let a = [[n, 0]]; a.length > 0; ) {
|
|
113
|
+
let [r, o] = a.pop(), s = r[o];
|
|
114
|
+
if (s === null || typeof s != "object") continue;
|
|
115
|
+
let l = Array.isArray(s) ? [...s] : { ...s };
|
|
116
|
+
typeof l.$ == "string" && (l.$ = t.get(l.$) ?? l.$), r[o] = l;
|
|
117
|
+
for (let N of Object.keys(l)) a.push([l, N]);
|
|
275
118
|
}
|
|
276
|
-
return
|
|
119
|
+
return n[0];
|
|
277
120
|
}
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
return z(e), F(t), a;
|
|
281
|
-
}, 2);
|
|
282
|
-
var V = (e, t) => w(K(w(e, P), w(t, P)), H);
|
|
121
|
+
var j = /* @__PURE__ */ f((e, t) => k(e, t), 2);
|
|
122
|
+
var G = (e, t) => g(j(g(e, w), g(t, w)), U);
|
|
283
123
|
|
|
284
124
|
// src/verified/storage.ts
|
|
285
|
-
var RADIX =
|
|
125
|
+
var RADIX = 4294967296;
|
|
286
126
|
var encode = (text) => {
|
|
287
127
|
let result = { $: "Nil" };
|
|
288
128
|
for (let index = text.length - 1; index >= 0; index--) {
|
|
289
|
-
result = { $: "Con", head:
|
|
129
|
+
result = { $: "Con", head: text.charCodeAt(index), tail: result };
|
|
290
130
|
}
|
|
291
131
|
return result;
|
|
292
132
|
};
|
|
293
133
|
var decode = (text) => {
|
|
294
134
|
const units = [];
|
|
295
135
|
for (let node = text; node.$ === "Con"; node = node.tail) {
|
|
296
|
-
if (node.head <
|
|
297
|
-
units.push(String.fromCharCode(
|
|
136
|
+
if (node.head < 0 || node.head > 65535) throw new Error("Invalid storage code unit");
|
|
137
|
+
units.push(String.fromCharCode(node.head));
|
|
298
138
|
}
|
|
299
139
|
return units.join("");
|
|
300
140
|
};
|
|
@@ -305,14 +145,14 @@ var storageRevision = (value) => {
|
|
|
305
145
|
return value;
|
|
306
146
|
};
|
|
307
147
|
var encodeRevision = (value) => {
|
|
308
|
-
const exact =
|
|
309
|
-
return { $: "Revision", high: exact / RADIX, low: exact % RADIX };
|
|
148
|
+
const exact = storageRevision(value);
|
|
149
|
+
return { $: "Revision", high: Math.floor(exact / RADIX), low: exact % RADIX };
|
|
310
150
|
};
|
|
311
151
|
var decodeRevision = (value) => {
|
|
312
|
-
if (value.high <
|
|
152
|
+
if (!Number.isInteger(value.high) || !Number.isInteger(value.low) || value.high < 0 || value.high > 2097151 || value.low < 0 || value.low >= RADIX) {
|
|
313
153
|
throw new Error("Invalid verified storage revision limbs");
|
|
314
154
|
}
|
|
315
|
-
return storageRevision(
|
|
155
|
+
return storageRevision(value.high * RADIX + value.low);
|
|
316
156
|
};
|
|
317
157
|
var serialize = (value) => {
|
|
318
158
|
const json = JSON.stringify(value);
|
|
@@ -337,7 +177,7 @@ var capture = (key, ifVersion, payload) => {
|
|
|
337
177
|
const actual = storageRevision(actualVersion);
|
|
338
178
|
const clock = storageRevision(highWater);
|
|
339
179
|
if (clock < actual) throw new Error("Inconsistent Fabric mesh high-water revision");
|
|
340
|
-
const plan =
|
|
180
|
+
const plan = G(
|
|
341
181
|
request,
|
|
342
182
|
{ $: "Slot", present, version: encodeRevision(actual), highWater: encodeRevision(clock) }
|
|
343
183
|
);
|
|
@@ -1326,4 +1166,4 @@ export {
|
|
|
1326
1166
|
MESH_MAX_SCHEDULE_AHEAD_MS,
|
|
1327
1167
|
MeshStore
|
|
1328
1168
|
};
|
|
1329
|
-
//# sourceMappingURL=chunk-
|
|
1169
|
+
//# sourceMappingURL=chunk-EFETPXU2.js.map
|