@e4779/pi-fabric 0.92.41-fork.6 → 0.96.4-fork.10
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/LAWS.bend +502 -0
- package/PROOF.bend +452 -0
- package/README.md +5 -1
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/agents/handoff.d.ts +2 -1
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +2 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents.js +6 -5
- package/dist/agents.js.map +1 -1
- package/dist/chunks/{chunk-3TXOQ5MG.js → chunk-3CJETB4S.js} +828 -204
- package/dist/chunks/chunk-3CJETB4S.js.map +7 -0
- package/dist/chunks/{chunk-IUCVOZRX.js → chunk-3SIXBW6A.js} +2 -2
- package/dist/chunks/chunk-4E63LJDD.js +468 -0
- package/dist/chunks/chunk-4E63LJDD.js.map +7 -0
- package/dist/chunks/{chunk-AAHHYDTO.js → chunk-4NF3S3NM.js} +1 -1
- package/dist/chunks/{chunk-AAHHYDTO.js.map → chunk-4NF3S3NM.js.map} +2 -2
- package/dist/chunks/{chunk-2SWRVIYJ.js → chunk-754HA6KO.js} +2 -2
- package/dist/chunks/{chunk-K6DHXXF5.js → chunk-B2IVWASP.js} +2 -2
- package/dist/chunks/{chunk-ZDNGXLEC.js → chunk-B4HECUJI.js} +2 -2
- package/dist/chunks/{chunk-H6DDV6E2.js → chunk-CSJSHBAT.js} +5 -5
- package/dist/chunks/{chunk-MW5VI7IW.js → chunk-D4B4CCTA.js} +2 -2
- package/dist/chunks/{chunk-EDL4JDW7.js → chunk-EBWMC3OO.js} +2 -2
- package/dist/chunks/{chunk-4NUTVNS2.js → chunk-F72MAIQY.js} +31 -368
- package/dist/chunks/chunk-F72MAIQY.js.map +7 -0
- package/dist/chunks/{chunk-W3FRE4VI.js → chunk-FDIEQEXS.js} +2 -2
- package/dist/chunks/{chunk-7A6NVHB5.js → chunk-FJSHRHOR.js} +7 -4
- package/dist/chunks/chunk-FJSHRHOR.js.map +7 -0
- package/dist/chunks/{chunk-PSNXUZMY.js → chunk-G2F2RDZI.js} +5 -47
- package/dist/chunks/chunk-G2F2RDZI.js.map +7 -0
- package/dist/chunks/{chunk-3WIGAX56.js → chunk-JCV54SSP.js} +2 -2
- package/dist/chunks/chunk-KS44WKJJ.js +51 -0
- package/dist/chunks/chunk-KS44WKJJ.js.map +7 -0
- package/dist/chunks/{chunk-3H7SDWZI.js → chunk-LNLQ2LX3.js} +22 -1
- package/dist/chunks/chunk-LNLQ2LX3.js.map +7 -0
- package/dist/chunks/{chunk-G4LADAYY.js → chunk-OINADFEF.js} +8 -3
- package/dist/chunks/chunk-OINADFEF.js.map +7 -0
- package/dist/chunks/{chunk-UQ4LTUH4.js → chunk-OUAC6O5C.js} +36 -9
- package/dist/chunks/chunk-OUAC6O5C.js.map +7 -0
- package/dist/chunks/{chunk-MQG5QKGI.js → chunk-Q5BMTL6A.js} +217 -95
- package/dist/chunks/chunk-Q5BMTL6A.js.map +7 -0
- package/dist/chunks/{chunk-IK6PPFWG.js → chunk-QFKHAAZA.js} +11 -11
- package/dist/chunks/chunk-QFKHAAZA.js.map +7 -0
- package/dist/chunks/{chunk-RTXZHKMS.js → chunk-QNMQJNXE.js} +7 -3
- package/dist/chunks/chunk-QNMQJNXE.js.map +7 -0
- package/dist/chunks/{chunk-U5FYOMG5.js → chunk-UBPFGMDQ.js} +6 -2
- package/dist/chunks/chunk-UBPFGMDQ.js.map +7 -0
- package/dist/chunks/{chunk-FLKGJPCN.js → chunk-ULQFHZJE.js} +4 -1
- package/dist/chunks/chunk-ULQFHZJE.js.map +7 -0
- package/dist/chunks/{chunk-7VAZ4N43.js → chunk-V3PIO7QL.js} +2 -2
- package/dist/chunks/{chunk-MGDLRV2R.js → chunk-VQGO4P7C.js} +2 -2
- package/dist/chunks/{chunk-XT4346N7.js → chunk-WXSELMFV.js} +9 -3
- package/dist/chunks/chunk-WXSELMFV.js.map +7 -0
- package/dist/chunks/{chunk-D5WKZONW.js → chunk-X3IRR7CV.js} +2 -2
- package/dist/chunks/{chunk-IJL3QK3J.js → chunk-Y57UHPIK.js} +1 -1
- package/dist/chunks/{chunk-IJL3QK3J.js.map → chunk-Y57UHPIK.js.map} +1 -1
- package/dist/chunks/{chunk-RKRVOBVO.js → chunk-YC3QQDZ3.js} +2 -2
- package/dist/chunks/{chunk-Q4XJ4PYL.js → chunk-ZRI433JP.js} +299 -83
- package/dist/chunks/chunk-ZRI433JP.js.map +7 -0
- package/dist/chunks/{chunk-36B4AIRT.js → chunk-ZTXZ6JDO.js} +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/bounds.d.ts +4 -0
- package/dist/compaction/bounds.d.ts.map +1 -1
- package/dist/compaction/branch-summary.d.ts.map +1 -1
- package/dist/compaction/dialogue.d.ts +24 -0
- package/dist/compaction/dialogue.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +6 -2
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -5
- package/dist/compaction/instructions.d.ts +1 -0
- package/dist/compaction/instructions.d.ts.map +1 -1
- package/dist/compaction/projections.d.ts +3 -3
- package/dist/compaction/projections.d.ts.map +1 -1
- package/dist/compaction/qa.d.ts.map +1 -1
- package/dist/compaction/render.d.ts +11 -0
- package/dist/compaction/render.d.ts.map +1 -1
- package/dist/components/configuration.js +2 -3
- package/dist/components/effect-policy.d.ts +2 -0
- package/dist/components/effect-policy.d.ts.map +1 -1
- package/dist/components/effect-scope.d.ts.map +1 -1
- package/dist/components/supervisor.d.ts +1 -1
- package/dist/components/supervisor.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +14 -2
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +7 -5
- package/dist/core/provider-bindings.d.ts +8 -2
- package/dist/core/provider-bindings.d.ts.map +1 -1
- package/dist/core/provider-operations.d.ts +28 -0
- package/dist/core/provider-operations.d.ts.map +1 -0
- package/dist/core/provider-operations.js +201 -0
- package/dist/core/provider-operations.js.map +7 -0
- package/dist/core/shell-inbox.d.ts +13 -0
- package/dist/core/shell-inbox.d.ts.map +1 -0
- package/dist/core/shell-jobs.d.ts +51 -7
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-limits.d.ts +3 -0
- package/dist/core/shell-limits.d.ts.map +1 -0
- package/dist/core/shell-monitor.d.ts +51 -0
- package/dist/core/shell-monitor.d.ts.map +1 -0
- package/dist/entropy/index.js +8 -7
- package/dist/entropy/normal-form.d.ts.map +1 -1
- package/dist/execution-service.d.ts +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +1124 -325
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/index.js +155 -44
- package/dist/index.js.map +3 -3
- package/dist/jev/observation.js +5 -3
- package/dist/jev.d.ts +0 -1
- package/dist/jev.d.ts.map +1 -1
- package/dist/jev.js +9 -13
- package/dist/memory/digest.d.ts.map +1 -1
- package/dist/memory/digest.js +2 -1
- package/dist/memory/discovery.js +6 -5
- package/dist/memory/expand-service.d.ts.map +1 -1
- package/dist/memory/file-worker.js +9 -8
- package/dist/memory/file-worker.js.map +1 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/normalize.d.ts.map +1 -1
- package/dist/memory/normalize.js +5 -4
- package/dist/memory/search.js +7 -6
- package/dist/memory/worker-provider.js +10 -9
- package/dist/memory.js +9 -8
- package/dist/memory.js.map +1 -1
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/prewalk/handoff.d.ts +1 -1
- package/dist/prewalk/handoff.d.ts.map +1 -1
- package/dist/protocol.d.ts +2 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/jev-provider.d.ts +1 -1
- package/dist/providers/jev-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +9 -7
- package/dist/providers/memory-provider.js +9 -8
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/tasks-provider.d.ts +12 -0
- package/dist/providers/tasks-provider.d.ts.map +1 -0
- package/dist/residency/host.js +10 -9
- package/dist/residency/pi-entry.js +10 -9
- package/dist/residency/pi-entry.js.map +1 -1
- 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 +1 -2
- package/dist/runtime/monty-runtime.js.map +1 -1
- package/dist/runtime/typescript-kernel.js +2 -2
- package/dist/runtime-state-builtins.d.ts +1 -1
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/controller.d.ts.map +1 -1
- package/dist/state/store.d.ts.map +1 -1
- package/dist/ui/controller.d.ts +1 -0
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-targets.js +2 -2
- package/dist/ui/conversation.js +7 -7
- package/dist/ui/dashboard.js +9 -9
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/languages/bend.d.ts +4 -0
- package/dist/ui/languages/bend.d.ts.map +1 -0
- package/dist/ui/languages/bend.js +73 -0
- package/dist/ui/languages/bend.js.map +7 -0
- package/dist/ui/settings.js +1 -2
- package/dist/ui/settings.js.map +1 -1
- package/dist/ui/shell-hang-keys.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts +22 -0
- package/dist/ui/shell-tasks.d.ts.map +1 -0
- package/dist/ui/shell-tasks.js +161 -0
- package/dist/ui/shell-tasks.js.map +7 -0
- package/dist/ui/shiki-catalog.d.ts +2 -1
- package/dist/ui/shiki-catalog.d.ts.map +1 -1
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/types.d.ts +1 -0
- package/dist/ui/types.d.ts.map +1 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/authority.d.ts +17 -0
- package/dist/verified/authority.d.ts.map +1 -0
- package/dist/verified/generated/authority-kernel.d.ts +10 -0
- package/dist/verified/generated/authority-kernel.js +116 -0
- package/dist/verified/generated/kernel.d.ts +31 -0
- package/dist/verified/generated/kernel.js +351 -0
- package/dist/verified/generated/lifecycle-kernel.d.ts +7 -0
- package/dist/verified/generated/lifecycle-kernel.js +155 -0
- package/dist/verified/generated/manifest.json +54 -0
- package/dist/verified/generated/provider-kernel.d.ts +9 -0
- package/dist/verified/generated/provider-kernel.js +80 -0
- package/dist/verified/generated/storage-kernel.d.ts +11 -0
- package/dist/verified/generated/storage-kernel.js +98 -0
- package/dist/verified/memory.d.ts +11 -0
- package/dist/verified/memory.d.ts.map +1 -0
- package/dist/verified/nat.d.ts +2 -0
- package/dist/verified/nat.d.ts.map +1 -0
- package/dist/verified/policy.d.ts +37 -0
- package/dist/verified/policy.d.ts.map +1 -0
- package/dist/verified/resources.d.ts +14 -0
- package/dist/verified/resources.d.ts.map +1 -0
- package/dist/verified/storage.d.ts +32 -0
- package/dist/verified/storage.d.ts.map +1 -0
- package/dist/worker/event-projection.d.ts +6 -0
- package/dist/worker/event-projection.d.ts.map +1 -0
- package/dist/worker/event-projection.js +99 -0
- package/dist/worker/event-projection.js.map +7 -0
- package/dist/worker/recovery-watchdog.d.ts +12 -0
- package/dist/worker/recovery-watchdog.d.ts.map +1 -0
- package/dist/worker/recovery-watchdog.js +41 -0
- package/dist/worker/recovery-watchdog.js.map +7 -0
- package/dist/worker.js +80 -22
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +26 -14
- package/docs/architecture.md +1 -1
- package/docs/background-tasks.md +140 -0
- package/docs/compaction.md +91 -28
- package/docs/components.md +5 -1
- package/docs/configuration.md +6 -6
- package/docs/foreman.md +4 -4
- package/docs/harnesses.md +95 -0
- package/docs/interface.md +7 -0
- package/docs/jev.md +59 -52
- package/docs/kernels.md +2 -2
- package/docs/licenses/bend-apache-2.0.txt +202 -0
- package/docs/memory-recall.md +1 -1
- package/docs/programmatic-compaction.md +13 -2
- package/docs/provider-capabilities.md +197 -0
- package/docs/shell-middleware.md +3 -3
- package/docs/skills.md +1 -1
- package/docs/verified-kernels.md +278 -0
- package/package.json +14 -4
- package/proofs/abi.json +308 -0
- package/proofs/authority-abi.json +7 -0
- package/proofs/authority-kernel.bend +23 -0
- package/proofs/authority-proof.bend +74 -0
- package/proofs/authority-spec.bend +30 -0
- package/proofs/authority-state.bend +43 -0
- package/proofs/authority-types.d.ts +3 -0
- package/proofs/kernel.bend +139 -0
- package/proofs/lifecycle-abi.json +3 -0
- package/proofs/lifecycle-kernel.bend +11 -0
- package/proofs/lifecycle-proof.bend +249 -0
- package/proofs/lifecycle-spec.bend +261 -0
- package/proofs/lifecycle-types.d.ts +4 -0
- package/proofs/lifecycle.bend +119 -0
- package/proofs/provider-abi.json +4 -0
- package/proofs/provider-kernel.bend +14 -0
- package/proofs/provider-plans.bend +28 -0
- package/proofs/provider-spec.bend +14 -0
- package/proofs/provider-types.d.ts +5 -0
- package/proofs/resource-proof.bend +633 -0
- package/proofs/resource-spec.bend +133 -0
- package/proofs/resources.bend +160 -0
- package/proofs/state-kernel.bend +17 -0
- package/proofs/state-plans.bend +40 -0
- package/proofs/state-proof.bend +42 -0
- package/proofs/state-spec.bend +26 -0
- package/proofs/storage-abi.json +3 -0
- package/proofs/storage-kernel.bend +11 -0
- package/proofs/storage-plans.bend +100 -0
- package/proofs/storage-proof.bend +176 -0
- package/proofs/storage-spec.bend +70 -0
- package/proofs/storage-types.d.ts +8 -0
- package/proofs/types.d.ts +7 -0
- package/scripts/test-verified-kernels.mjs +107 -0
- package/scripts/verified-kernels.mjs +136 -0
- package/skillsets/python/fabric-jev/SKILL.md +13 -9
- package/skillsets/typescript/fabric-exec/SKILL.md +4 -2
- package/skillsets/typescript/fabric-jev/SKILL.md +13 -9
- package/dist/chunks/chunk-3H7SDWZI.js.map +0 -7
- package/dist/chunks/chunk-3TXOQ5MG.js.map +0 -7
- package/dist/chunks/chunk-4NUTVNS2.js.map +0 -7
- package/dist/chunks/chunk-77PDIBK2.js +0 -129
- package/dist/chunks/chunk-77PDIBK2.js.map +0 -7
- package/dist/chunks/chunk-7A6NVHB5.js.map +0 -7
- package/dist/chunks/chunk-FLKGJPCN.js.map +0 -7
- package/dist/chunks/chunk-G4LADAYY.js.map +0 -7
- package/dist/chunks/chunk-IK6PPFWG.js.map +0 -7
- package/dist/chunks/chunk-MQG5QKGI.js.map +0 -7
- package/dist/chunks/chunk-PSNXUZMY.js.map +0 -7
- package/dist/chunks/chunk-Q4XJ4PYL.js.map +0 -7
- package/dist/chunks/chunk-RTXZHKMS.js.map +0 -7
- package/dist/chunks/chunk-U5FYOMG5.js.map +0 -7
- package/dist/chunks/chunk-UQ4LTUH4.js.map +0 -7
- package/dist/chunks/chunk-XT4346N7.js.map +0 -7
- package/dist/jev/browser.d.ts +0 -37
- package/dist/jev/browser.d.ts.map +0 -1
- package/dist/jev/browser.js +0 -13
- package/dist/jev/browser.js.map +0 -7
- /package/dist/chunks/{chunk-IUCVOZRX.js.map → chunk-3SIXBW6A.js.map} +0 -0
- /package/dist/chunks/{chunk-2SWRVIYJ.js.map → chunk-754HA6KO.js.map} +0 -0
- /package/dist/chunks/{chunk-K6DHXXF5.js.map → chunk-B2IVWASP.js.map} +0 -0
- /package/dist/chunks/{chunk-ZDNGXLEC.js.map → chunk-B4HECUJI.js.map} +0 -0
- /package/dist/chunks/{chunk-H6DDV6E2.js.map → chunk-CSJSHBAT.js.map} +0 -0
- /package/dist/chunks/{chunk-MW5VI7IW.js.map → chunk-D4B4CCTA.js.map} +0 -0
- /package/dist/chunks/{chunk-EDL4JDW7.js.map → chunk-EBWMC3OO.js.map} +0 -0
- /package/dist/chunks/{chunk-W3FRE4VI.js.map → chunk-FDIEQEXS.js.map} +0 -0
- /package/dist/chunks/{chunk-3WIGAX56.js.map → chunk-JCV54SSP.js.map} +0 -0
- /package/dist/chunks/{chunk-7VAZ4N43.js.map → chunk-V3PIO7QL.js.map} +0 -0
- /package/dist/chunks/{chunk-MGDLRV2R.js.map → chunk-VQGO4P7C.js.map} +0 -0
- /package/dist/chunks/{chunk-D5WKZONW.js.map → chunk-X3IRR7CV.js.map} +0 -0
- /package/dist/chunks/{chunk-RKRVOBVO.js.map → chunk-YC3QQDZ3.js.map} +0 -0
- /package/dist/chunks/{chunk-36B4AIRT.js.map → chunk-ZTXZ6JDO.js.map} +0 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
// src/verified/generated/kernel.js
|
|
2
|
+
function w(e, t) {
|
|
3
|
+
return { $: e < t ? "LT" : e === t ? "EQ" : "GT" };
|
|
4
|
+
}
|
|
5
|
+
function B(e) {
|
|
6
|
+
if (e > 281474976710655n)
|
|
7
|
+
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
8
|
+
return e;
|
|
9
|
+
}
|
|
10
|
+
function $(e, t) {
|
|
11
|
+
return { $: "$JMP", f: e, x: t };
|
|
12
|
+
}
|
|
13
|
+
function r(e) {
|
|
14
|
+
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
15
|
+
e = e.f(...e.x);
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
function u(e, t) {
|
|
19
|
+
return (...n) => n.length < t ? u((...i) => e(...n, ...i), t - n.length) : r(e(...n));
|
|
20
|
+
}
|
|
21
|
+
function G(e) {
|
|
22
|
+
return $(re, [e]);
|
|
23
|
+
}
|
|
24
|
+
function L(e, t) {
|
|
25
|
+
return $(ie, [e, t]);
|
|
26
|
+
}
|
|
27
|
+
function F(e, t) {
|
|
28
|
+
return $(v, [e, t, false]);
|
|
29
|
+
}
|
|
30
|
+
function J(e, t, n) {
|
|
31
|
+
return $(a, [e, t || n]);
|
|
32
|
+
}
|
|
33
|
+
function M(e, t, n, i) {
|
|
34
|
+
return $(c, [{ $: "Con", head: r(s(e, t)), tail: { $: "Con", head: r(s(n, i)), tail: { $: "Nil" } } }]);
|
|
35
|
+
}
|
|
36
|
+
function R(e, t, n, i) {
|
|
37
|
+
let o = t;
|
|
38
|
+
return $(c, [{ $: "Con", head: r(C(e, B(o + n))), tail: { $: "Con", head: r(s(o, i)), tail: { $: "Nil" } } }]);
|
|
39
|
+
}
|
|
40
|
+
function D(e, t, n, i, o, l) {
|
|
41
|
+
let d = r(a(e, t || l)), h = r(a(i, o || n));
|
|
42
|
+
return d || h;
|
|
43
|
+
}
|
|
44
|
+
function H(e, t, n, i) {
|
|
45
|
+
return $(c, [r(oe(e, t, n, i))]);
|
|
46
|
+
}
|
|
47
|
+
function K(e, t) {
|
|
48
|
+
return e ? 2 : t ? 1 : 0;
|
|
49
|
+
}
|
|
50
|
+
function S(e, t) {
|
|
51
|
+
return $(c, [r(T(e, t))]);
|
|
52
|
+
}
|
|
53
|
+
function O(e) {
|
|
54
|
+
return $(c, [r(le(e))]);
|
|
55
|
+
}
|
|
56
|
+
function X(e, t) {
|
|
57
|
+
return e || t;
|
|
58
|
+
}
|
|
59
|
+
function Y(e, t) {
|
|
60
|
+
return $(c, [{ $: "Con", head: e, tail: { $: "Con", head: t, tail: { $: "Nil" } } }]);
|
|
61
|
+
}
|
|
62
|
+
function Z(e) {
|
|
63
|
+
return $(c, [r(ae(e))]);
|
|
64
|
+
}
|
|
65
|
+
function y(e, t) {
|
|
66
|
+
return $(c, [{ $: "Con", head: e, tail: { $: "Con", head: r(f(t)), tail: { $: "Nil" } } }]);
|
|
67
|
+
}
|
|
68
|
+
function _(e, t, n, i) {
|
|
69
|
+
return $(c, [r(ce(e, t, n, i))]);
|
|
70
|
+
}
|
|
71
|
+
function ee(e, t, n, i, o) {
|
|
72
|
+
let l = r(a(i, o));
|
|
73
|
+
return $(c, [{ $: "Con", head: e, tail: { $: "Con", head: t, tail: { $: "Con", head: n || l, tail: { $: "Nil" } } } }]);
|
|
74
|
+
}
|
|
75
|
+
function te(e) {
|
|
76
|
+
return $(c, [e]);
|
|
77
|
+
}
|
|
78
|
+
function ne(e) {
|
|
79
|
+
return { $: "Tuple", fst: e, snd: false };
|
|
80
|
+
}
|
|
81
|
+
function re(e) {
|
|
82
|
+
return $(z, [r(a(r(A(e)), r(Q(e, true)))), e]);
|
|
83
|
+
}
|
|
84
|
+
function ie(e, t) {
|
|
85
|
+
if (e.$ === "Unknown")
|
|
86
|
+
return { $: "Unknown" };
|
|
87
|
+
{
|
|
88
|
+
let n = e.names;
|
|
89
|
+
return $(z, [r(fe(n, t)), t]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function k(e, t, n, i) {
|
|
93
|
+
return $(a, [n || i, r(de(e, t))]);
|
|
94
|
+
}
|
|
95
|
+
function v(e, t, n) {
|
|
96
|
+
if (e.$ === "Nil")
|
|
97
|
+
return n;
|
|
98
|
+
{
|
|
99
|
+
let i = e.head, o = e.tail, l = r(g(t, i, false));
|
|
100
|
+
return $(v, [o, t, n || l]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function a(e, t) {
|
|
104
|
+
return e ? t : false;
|
|
105
|
+
}
|
|
106
|
+
function c(e) {
|
|
107
|
+
if (e.$ === "Nil")
|
|
108
|
+
return true;
|
|
109
|
+
if (e.head) {
|
|
110
|
+
let t = e.tail;
|
|
111
|
+
return $(c, [t]);
|
|
112
|
+
} else {
|
|
113
|
+
let t = e.tail;
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function s(e, t) {
|
|
118
|
+
return $(se, [w(e, t)]);
|
|
119
|
+
}
|
|
120
|
+
function C(e, t) {
|
|
121
|
+
return $(he, [w(e, t)]);
|
|
122
|
+
}
|
|
123
|
+
function oe(e, t, n, i) {
|
|
124
|
+
return { $: "Con", head: r(f(e)), tail: { $: "Con", head: t, tail: { $: "Con", head: n, tail: { $: "Con", head: r(f(i)), tail: { $: "Nil" } } } } };
|
|
125
|
+
}
|
|
126
|
+
function T(e, t) {
|
|
127
|
+
if (e.$ === "Nil")
|
|
128
|
+
return { $: "Nil" };
|
|
129
|
+
{
|
|
130
|
+
let n = e.head, i = e.tail;
|
|
131
|
+
return { $: "Con", head: r(Ce(t, n)), tail: r(T(i, t)) };
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function le(e) {
|
|
135
|
+
let t = e.eligible, n = e.afterPrevious, i = e.retained, o = e.budget, l = e.boundary, d = e.spans;
|
|
136
|
+
return { $: "Con", head: t, tail: { $: "Con", head: n, tail: { $: "Con", head: r(s(i, o)), tail: { $: "Con", head: r(S(d, l)), tail: { $: "Nil" } } } } };
|
|
137
|
+
}
|
|
138
|
+
function ae(e) {
|
|
139
|
+
let t = e.start, n = e.end, i = e.total, o = e.expectedStart, l = e.expectedTotal, d = e.length, h = e.complete, N = r(C(n, i)), q = t < n;
|
|
140
|
+
return { $: "Con", head: r(C(t, o)), tail: { $: "Con", head: r(C(i, l)), tail: { $: "Con", head: r(s(t, n)), tail: { $: "Con", head: r(s(n, i)), tail: { $: "Con", head: r(C(d, n < t ? 0n : n - t)), tail: { $: "Con", head: r(f(h !== N)), tail: { $: "Con", head: h || q, tail: { $: "Nil" } } } } } } } };
|
|
141
|
+
}
|
|
142
|
+
function f(e) {
|
|
143
|
+
return !e;
|
|
144
|
+
}
|
|
145
|
+
function ce(e, t, n, i) {
|
|
146
|
+
return { $: "Con", head: r(f(e)), tail: { $: "Con", head: t, tail: { $: "Con", head: n, tail: { $: "Con", head: i, tail: { $: "Nil" } } } } };
|
|
147
|
+
}
|
|
148
|
+
function z(e, t) {
|
|
149
|
+
return e ? { $: "Exact", names: t } : { $: "Unknown" };
|
|
150
|
+
}
|
|
151
|
+
function A(e) {
|
|
152
|
+
if (e.$ === "Nil")
|
|
153
|
+
return false;
|
|
154
|
+
{
|
|
155
|
+
let t = e.head, n = e.tail;
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function Q(e, t) {
|
|
160
|
+
if (e.$ === "Nil")
|
|
161
|
+
return t;
|
|
162
|
+
{
|
|
163
|
+
let n = e.head, i = e.tail;
|
|
164
|
+
return $(Q, [i, r(a(t, r(pe(n))))]);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function fe(e, t) {
|
|
168
|
+
return $(Ne, [r(me(t)), e, t]);
|
|
169
|
+
}
|
|
170
|
+
function de(e, t) {
|
|
171
|
+
if (e.$ === "Unknown")
|
|
172
|
+
return true;
|
|
173
|
+
{
|
|
174
|
+
let n = e.names;
|
|
175
|
+
if (t.$ === "Unknown")
|
|
176
|
+
return true;
|
|
177
|
+
{
|
|
178
|
+
let i = t.names;
|
|
179
|
+
return $(E, [n, i, false]);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function g(e, t, n) {
|
|
184
|
+
if (e.$ === "Nil")
|
|
185
|
+
return n;
|
|
186
|
+
{
|
|
187
|
+
let i = e.head, o = e.tail, l = r(be(t, i));
|
|
188
|
+
return $(g, [o, t, n || l]);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function se(e) {
|
|
192
|
+
return e.$ === "LT" ? true : e.$ === "EQ";
|
|
193
|
+
}
|
|
194
|
+
function he(e) {
|
|
195
|
+
return e.$ === "LT" ? false : e.$ === "EQ";
|
|
196
|
+
}
|
|
197
|
+
function Ce(e, t) {
|
|
198
|
+
let n = t.first, i = t.last, o = t.paired, l = r(f(o)), d = r(s(e, n)), h = l || d, N = i < e;
|
|
199
|
+
return h || N;
|
|
200
|
+
}
|
|
201
|
+
function pe(e) {
|
|
202
|
+
return $(a, [r(U(e)), r(f(r(p(e, { $: "Con", head: 42n, tail: { $: "Nil" } }, true))))]);
|
|
203
|
+
}
|
|
204
|
+
function Ne(e, t, n) {
|
|
205
|
+
return e ? $(a, [r(m(t, n, true)), r(m(n, t, true))]) : false;
|
|
206
|
+
}
|
|
207
|
+
function me(e) {
|
|
208
|
+
return $(a, [r(A(e)), r(a(r(P(e, 64n)), r(V(e, true))))]);
|
|
209
|
+
}
|
|
210
|
+
function E(e, t, n) {
|
|
211
|
+
if (e.$ === "Nil")
|
|
212
|
+
return n;
|
|
213
|
+
{
|
|
214
|
+
let i = e.head, o = e.tail, l = r(b(t, i, false));
|
|
215
|
+
return $(E, [o, t, n || l]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function be(e, t) {
|
|
219
|
+
if (e.$ === "Quiet")
|
|
220
|
+
return false;
|
|
221
|
+
{
|
|
222
|
+
let n = e.ordered, i = e.scope;
|
|
223
|
+
if (t.$ === "Quiet")
|
|
224
|
+
return false;
|
|
225
|
+
{
|
|
226
|
+
let o = t.ordered, l = t.scope;
|
|
227
|
+
return $(k, [i, l, n, o]);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function U(e) {
|
|
232
|
+
if (e.$ === "Nil")
|
|
233
|
+
return false;
|
|
234
|
+
{
|
|
235
|
+
let t = e.head, n = e.tail;
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function p(e, t, n) {
|
|
240
|
+
if (e.$ === "Nil") {
|
|
241
|
+
if (t.$ === "Nil")
|
|
242
|
+
return n;
|
|
243
|
+
{
|
|
244
|
+
let i = t.head, o = t.tail;
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
let i = e.head, o = e.tail;
|
|
249
|
+
if (t.$ === "Nil")
|
|
250
|
+
return false;
|
|
251
|
+
{
|
|
252
|
+
let l = t.head, d = t.tail;
|
|
253
|
+
return $(p, [o, d, r(a(n, r(C(i, l))))]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function m(e, t, n) {
|
|
258
|
+
if (e.$ === "Nil")
|
|
259
|
+
return n;
|
|
260
|
+
{
|
|
261
|
+
let i = e.head, o = e.tail;
|
|
262
|
+
return $(m, [o, t, r(a(n, r(b(t, i, false))))]);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function P(e, t) {
|
|
266
|
+
if (e.$ === "Nil")
|
|
267
|
+
return true;
|
|
268
|
+
{
|
|
269
|
+
let n = e.head, i = e.tail;
|
|
270
|
+
if (t === 0n)
|
|
271
|
+
return false;
|
|
272
|
+
{
|
|
273
|
+
let o = t - 1n;
|
|
274
|
+
return $(P, [i, o]);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function V(e, t) {
|
|
279
|
+
if (e.$ === "Nil")
|
|
280
|
+
return t;
|
|
281
|
+
{
|
|
282
|
+
let n = e.head, i = e.tail;
|
|
283
|
+
return $(V, [i, r(a(t, r(we(n))))]);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function b(e, t, n) {
|
|
287
|
+
if (e.$ === "Nil")
|
|
288
|
+
return n;
|
|
289
|
+
{
|
|
290
|
+
let i = e.head, o = e.tail, l = r(p(t, i, true));
|
|
291
|
+
return $(b, [o, t, n || l]);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function we(e) {
|
|
295
|
+
return $(a, [r(U(e)), r(a(r(W(e, 256n)), r(f(r(p(e, { $: "Con", head: 42n, tail: { $: "Nil" } }, true))))))]);
|
|
296
|
+
}
|
|
297
|
+
function W(e, t) {
|
|
298
|
+
if (e.$ === "Nil")
|
|
299
|
+
return true;
|
|
300
|
+
{
|
|
301
|
+
let n = e.head, i = e.tail;
|
|
302
|
+
if (t === 0n)
|
|
303
|
+
return false;
|
|
304
|
+
{
|
|
305
|
+
let o = t - 1n;
|
|
306
|
+
return $(W, [i, o]);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
var ke = /* @__PURE__ */ u(D, 6);
|
|
311
|
+
var ve = /* @__PURE__ */ u(H, 4);
|
|
312
|
+
var ze = /* @__PURE__ */ u(K, 2);
|
|
313
|
+
var Qe = /* @__PURE__ */ u(O, 1);
|
|
314
|
+
var ge = /* @__PURE__ */ u(Y, 2);
|
|
315
|
+
var Ee = /* @__PURE__ */ u(Z, 1);
|
|
316
|
+
var Ue = /* @__PURE__ */ u(y, 2);
|
|
317
|
+
var Pe = /* @__PURE__ */ u(_, 4);
|
|
318
|
+
var Ve = /* @__PURE__ */ u(ee, 5);
|
|
319
|
+
var We = /* @__PURE__ */ u(te, 1);
|
|
320
|
+
var qe = /* @__PURE__ */ u(ne, 1);
|
|
321
|
+
var Be = /* @__PURE__ */ u(X, 2);
|
|
322
|
+
var Ge = /* @__PURE__ */ u(J, 3);
|
|
323
|
+
var Le = /* @__PURE__ */ u(M, 4);
|
|
324
|
+
var je = /* @__PURE__ */ u(R, 4);
|
|
325
|
+
var Fe = /* @__PURE__ */ u(G, 1);
|
|
326
|
+
var Je = /* @__PURE__ */ u(L, 2);
|
|
327
|
+
var Re = /* @__PURE__ */ u(F, 2);
|
|
328
|
+
|
|
329
|
+
// src/verified/nat.ts
|
|
330
|
+
var BEND_NAT_MAX = 2 ** 48 - 1;
|
|
331
|
+
|
|
332
|
+
// src/verified/resources.ts
|
|
333
|
+
var encodeResourceNames = (values) => {
|
|
334
|
+
let names = { $: "Nil" };
|
|
335
|
+
const cache = /* @__PURE__ */ new Map();
|
|
336
|
+
const input = Array.isArray(values) ? values : [];
|
|
337
|
+
for (let i = input.length - 1; i >= 0; i--) {
|
|
338
|
+
const value = input[i];
|
|
339
|
+
let name = { $: "Nil" };
|
|
340
|
+
if (typeof value === "string") {
|
|
341
|
+
const cached = cache.get(value);
|
|
342
|
+
if (cached) name = cached;
|
|
343
|
+
else {
|
|
344
|
+
for (let j = value.length - 1; j >= 0; j--) {
|
|
345
|
+
name = { $: "Con", head: BigInt(value.charCodeAt(j)), tail: name };
|
|
346
|
+
}
|
|
347
|
+
cache.set(value, name);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
names = { $: "Con", head: name, tail: names };
|
|
351
|
+
}
|
|
352
|
+
return names;
|
|
353
|
+
};
|
|
354
|
+
var decodeResourceScope = (scope) => {
|
|
355
|
+
if (scope.$ === "Unknown") return ["*"];
|
|
356
|
+
const result = [];
|
|
357
|
+
for (let names = scope.names; names.$ === "Con"; names = names.tail) {
|
|
358
|
+
const chars = [];
|
|
359
|
+
for (let name = names.head; name.$ === "Con"; name = name.tail) {
|
|
360
|
+
if (name.head < 0n || name.head > 65535n) throw new Error("Invalid verified resource code unit");
|
|
361
|
+
chars.push(String.fromCharCode(Number(name.head)));
|
|
362
|
+
}
|
|
363
|
+
result.push(chars.join(""));
|
|
364
|
+
}
|
|
365
|
+
return result;
|
|
366
|
+
};
|
|
367
|
+
var boundedEffectResources = (resources) => {
|
|
368
|
+
const declared = Array.isArray(resources) ? Array.from(resources) : [];
|
|
369
|
+
const original = Fe(encodeResourceNames(declared));
|
|
370
|
+
const proposal = /* @__PURE__ */ new Set();
|
|
371
|
+
for (const resource of declared) {
|
|
372
|
+
proposal.add(resource);
|
|
373
|
+
if (proposal.size > 64) break;
|
|
374
|
+
}
|
|
375
|
+
return decodeResourceScope(Je(original, encodeResourceNames([...proposal])));
|
|
376
|
+
};
|
|
377
|
+
var encodeResourceEffects = (effects) => {
|
|
378
|
+
let result = { $: "Nil" };
|
|
379
|
+
for (let i = effects.length - 1; i >= 0; i--) {
|
|
380
|
+
const effect = effects[i];
|
|
381
|
+
const value = effect.kind === "none" ? { $: "Quiet" } : {
|
|
382
|
+
$: "Effect",
|
|
383
|
+
ordered: effect.ordering !== "commutative",
|
|
384
|
+
scope: Fe(encodeResourceNames(effect.resources))
|
|
385
|
+
};
|
|
386
|
+
result = { $: "Con", head: value, tail: result };
|
|
387
|
+
}
|
|
388
|
+
return result;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// src/verified/policy.ts
|
|
392
|
+
var isNatural = (value) => Number.isSafeInteger(value) && value >= 0;
|
|
393
|
+
var isArithmeticNatural = (value) => isNatural(value) && value <= BEND_NAT_MAX;
|
|
394
|
+
var bendList = (values) => {
|
|
395
|
+
let list = { $: "Nil" };
|
|
396
|
+
for (let index = values.length - 1; index >= 0; index--) {
|
|
397
|
+
list = { $: "Con", head: values[index], tail: list };
|
|
398
|
+
}
|
|
399
|
+
return list;
|
|
400
|
+
};
|
|
401
|
+
var acceptSummaryBounds = (bytes, byteLimit, projected, target) => [bytes, byteLimit, projected, target].every(isNatural) && Le(BigInt(bytes), BigInt(byteLimit), BigInt(projected), BigInt(target));
|
|
402
|
+
var acceptSampleAccounting = (total, retained, omitted, limit) => [total, retained, omitted, limit].every(isArithmeticNatural) && retained + omitted <= BEND_NAT_MAX && je(BigInt(total), BigInt(retained), BigInt(omitted), BigInt(limit));
|
|
403
|
+
var acceptCompactionCut = (candidate, spans) => {
|
|
404
|
+
if (![candidate.retained, candidate.budget, candidate.boundary].every(isNatural) || typeof candidate.eligible !== "boolean" || typeof candidate.afterPrevious !== "boolean") return false;
|
|
405
|
+
const base = {
|
|
406
|
+
$: "Cut",
|
|
407
|
+
eligible: candidate.eligible,
|
|
408
|
+
afterPrevious: candidate.afterPrevious,
|
|
409
|
+
retained: BigInt(candidate.retained),
|
|
410
|
+
budget: BigInt(candidate.budget),
|
|
411
|
+
boundary: BigInt(candidate.boundary)
|
|
412
|
+
};
|
|
413
|
+
if (!Qe({ ...base, spans: { $: "Nil" } })) return false;
|
|
414
|
+
let batch = [];
|
|
415
|
+
for (const span of spans) {
|
|
416
|
+
if (!isNatural(span.first) || !isNatural(span.last) || span.first > span.last || typeof span.hasCall !== "boolean" || typeof span.hasResult !== "boolean") return false;
|
|
417
|
+
batch.push({ $: "Span", first: BigInt(span.first), last: BigInt(span.last), paired: span.hasCall && span.hasResult });
|
|
418
|
+
if (batch.length === 128) {
|
|
419
|
+
if (!Qe({ ...base, spans: bendList(batch) })) return false;
|
|
420
|
+
batch = [];
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return Qe({ ...base, spans: bendList(batch) });
|
|
424
|
+
};
|
|
425
|
+
var acceptMemoryChunk = (range, length, expectedStart, expectedTotal) => {
|
|
426
|
+
if (![range.start, range.end, range.total, length, expectedStart, expectedTotal].every(isArithmeticNatural) || range.start + length > BEND_NAT_MAX || typeof range.complete !== "boolean") return false;
|
|
427
|
+
return Ee({
|
|
428
|
+
$: "Chunk",
|
|
429
|
+
start: BigInt(range.start),
|
|
430
|
+
end: BigInt(range.end),
|
|
431
|
+
total: BigInt(range.total),
|
|
432
|
+
length: BigInt(length),
|
|
433
|
+
expectedStart: BigInt(expectedStart),
|
|
434
|
+
expectedTotal: BigInt(expectedTotal),
|
|
435
|
+
complete: range.complete
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
var assertCertificateFacts = (facts) => {
|
|
439
|
+
if (facts.length !== 8 || facts.some((fact) => typeof fact.valid !== "boolean")) {
|
|
440
|
+
throw new Error("Invalid Schema certificate evidence");
|
|
441
|
+
}
|
|
442
|
+
if (!We(bendList(facts.map((fact) => fact.valid)))) {
|
|
443
|
+
throw new Error(facts.find((fact) => !fact.valid)?.error ?? "Schema certificate rejected");
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export {
|
|
448
|
+
BEND_NAT_MAX,
|
|
449
|
+
ke,
|
|
450
|
+
ve,
|
|
451
|
+
ze,
|
|
452
|
+
ge,
|
|
453
|
+
Ue,
|
|
454
|
+
Pe,
|
|
455
|
+
Ve,
|
|
456
|
+
qe,
|
|
457
|
+
Be,
|
|
458
|
+
Ge,
|
|
459
|
+
Re,
|
|
460
|
+
boundedEffectResources,
|
|
461
|
+
encodeResourceEffects,
|
|
462
|
+
acceptSummaryBounds,
|
|
463
|
+
acceptSampleAccounting,
|
|
464
|
+
acceptCompactionCut,
|
|
465
|
+
acceptMemoryChunk,
|
|
466
|
+
assertCertificateFacts
|
|
467
|
+
};
|
|
468
|
+
//# sourceMappingURL=chunk-4E63LJDD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/verified/generated/kernel.js", "../../src/verified/nat.ts", "../../src/verified/resources.ts", "../../src/verified/policy.ts"],
|
|
4
|
+
"sourcesContent": ["// Generated by Bend 2.0.26; do not edit. See LAWS.bend and PROOF.bend.\n// Includes adapted Bend runtime/Base code, Copyright 2026 HigherOrderCO, Apache-2.0.\n// CLI removed and exports added by Pi Fabric; see THIRD_PARTY_NOTICES.md.\nfunction w(e, t) {\n return { $: e < t ? \"LT\" : e === t ? \"EQ\" : \"GT\" };\n}\nfunction B(e) {\n if (e > 281474976710655n)\n throw \"bend: a Nat past the largest immediate 2^48-1\";\n return e;\n}\nfunction $(e, t) {\n return { $: \"$JMP\", f: e, x: t };\n}\nfunction r(e) {\n for (; e !== null && typeof e == \"object\" && e.$ === \"$JMP\"; )\n e = e.f(...e.x);\n return e;\n}\nfunction u(e, t) {\n return (...n) => n.length < t ? u((...i) => e(...n, ...i), t - n.length) : r(e(...n));\n}\nfunction G(e) {\n return $(re, [e]);\n}\nfunction L(e, t) {\n return $(ie, [e, t]);\n}\nfunction j(e, t, n, i) {\n return $(k, [e, t, n, i]);\n}\nfunction F(e, t) {\n return $(v, [e, t, !1]);\n}\nfunction J(e, t, n) {\n return $(a, [e, t || n]);\n}\nfunction M(e, t, n, i) {\n return $(c, [{ $: \"Con\", head: r(s(e, t)), tail: { $: \"Con\", head: r(s(n, i)), tail: { $: \"Nil\" } } }]);\n}\nfunction R(e, t, n, i) {\n let o = t;\n return $(c, [{ $: \"Con\", head: r(C(e, B(o + n))), tail: { $: \"Con\", head: r(s(o, i)), tail: { $: \"Nil\" } } }]);\n}\nfunction x(e, t, n) {\n return $(c, [r($e(e, t, n))]);\n}\nfunction D(e, t, n, i, o, l) {\n let d = r(a(e, t || l)), h = r(a(i, o || n));\n return d || h;\n}\nfunction H(e, t, n, i) {\n return $(c, [r(oe(e, t, n, i))]);\n}\nfunction I(e, t, n, i) {\n return $(c, [r(ue(e, t, n, i))]);\n}\nfunction K(e, t) {\n return e ? 2 : t ? 1 : 0;\n}\nfunction S(e, t) {\n return $(c, [r(T(e, t))]);\n}\nfunction O(e) {\n return $(c, [r(le(e))]);\n}\nfunction X(e, t) {\n return e || t;\n}\nfunction Y(e, t) {\n return $(c, [{ $: \"Con\", head: e, tail: { $: \"Con\", head: t, tail: { $: \"Nil\" } } }]);\n}\nfunction Z(e) {\n return $(c, [r(ae(e))]);\n}\nfunction y(e, t) {\n return $(c, [{ $: \"Con\", head: e, tail: { $: \"Con\", head: r(f(t)), tail: { $: \"Nil\" } } }]);\n}\nfunction _(e, t, n, i) {\n return $(c, [r(ce(e, t, n, i))]);\n}\nfunction ee(e, t, n, i, o) {\n let l = r(a(i, o));\n return $(c, [{ $: \"Con\", head: e, tail: { $: \"Con\", head: t, tail: { $: \"Con\", head: n || l, tail: { $: \"Nil\" } } } }]);\n}\nfunction te(e) {\n return $(c, [e]);\n}\nfunction ne(e) {\n return { $: \"Tuple\", fst: e, snd: !1 };\n}\nfunction re(e) {\n return $(z, [r(a(r(A(e)), r(Q(e, !0)))), e]);\n}\nfunction ie(e, t) {\n if (e.$ === \"Unknown\")\n return { $: \"Unknown\" };\n {\n let n = e.names;\n return $(z, [r(fe(n, t)), t]);\n }\n}\nfunction k(e, t, n, i) {\n return $(a, [n || i, r(de(e, t))]);\n}\nfunction v(e, t, n) {\n if (e.$ === \"Nil\")\n return n;\n {\n let i = e.head, o = e.tail, l = r(g(t, i, !1));\n return $(v, [o, t, n || l]);\n }\n}\nfunction a(e, t) {\n return e ? t : !1;\n}\nfunction c(e) {\n if (e.$ === \"Nil\")\n return !0;\n if (e.head) {\n let t = e.tail;\n return $(c, [t]);\n } else {\n let t = e.tail;\n return !1;\n }\n}\nfunction s(e, t) {\n return $(se, [w(e, t)]);\n}\nfunction C(e, t) {\n return $(he, [w(e, t)]);\n}\nfunction $e(e, t, n) {\n return { $: \"Con\", head: n, tail: { $: \"Con\", head: r(s(e, t)), tail: { $: \"Nil\" } } };\n}\nfunction oe(e, t, n, i) {\n return { $: \"Con\", head: r(f(e)), tail: { $: \"Con\", head: t, tail: { $: \"Con\", head: n, tail: { $: \"Con\", head: r(f(i)), tail: { $: \"Nil\" } } } } };\n}\nfunction ue(e, t, n, i) {\n return { $: \"Con\", head: e, tail: { $: \"Con\", head: r(f(t)), tail: { $: \"Con\", head: r(f(n)), tail: { $: \"Con\", head: r(f(i)), tail: { $: \"Nil\" } } } } };\n}\nfunction T(e, t) {\n if (e.$ === \"Nil\")\n return { $: \"Nil\" };\n {\n let n = e.head, i = e.tail;\n return { $: \"Con\", head: r(Ce(t, n)), tail: r(T(i, t)) };\n }\n}\nfunction le(e) {\n let t = e.eligible, n = e.afterPrevious, i = e.retained, o = e.budget, l = e.boundary, d = e.spans;\n return { $: \"Con\", head: t, tail: { $: \"Con\", head: n, tail: { $: \"Con\", head: r(s(i, o)), tail: { $: \"Con\", head: r(S(d, l)), tail: { $: \"Nil\" } } } } };\n}\nfunction ae(e) {\n let t = e.start, n = e.end, i = e.total, o = e.expectedStart, l = e.expectedTotal, d = e.length, h = e.complete, N = r(C(n, i)), q = t < n;\n return { $: \"Con\", head: r(C(t, o)), tail: { $: \"Con\", head: r(C(i, l)), tail: { $: \"Con\", head: r(s(t, n)), tail: { $: \"Con\", head: r(s(n, i)), tail: { $: \"Con\", head: r(C(d, n < t ? 0n : n - t)), tail: { $: \"Con\", head: r(f(h !== N)), tail: { $: \"Con\", head: h || q, tail: { $: \"Nil\" } } } } } } } };\n}\nfunction f(e) {\n return !e;\n}\nfunction ce(e, t, n, i) {\n return { $: \"Con\", head: r(f(e)), tail: { $: \"Con\", head: t, tail: { $: \"Con\", head: n, tail: { $: \"Con\", head: i, tail: { $: \"Nil\" } } } } };\n}\nfunction z(e, t) {\n return e ? { $: \"Exact\", names: t } : { $: \"Unknown\" };\n}\nfunction A(e) {\n if (e.$ === \"Nil\")\n return !1;\n {\n let t = e.head, n = e.tail;\n return !0;\n }\n}\nfunction Q(e, t) {\n if (e.$ === \"Nil\")\n return t;\n {\n let n = e.head, i = e.tail;\n return $(Q, [i, r(a(t, r(pe(n))))]);\n }\n}\nfunction fe(e, t) {\n return $(Ne, [r(me(t)), e, t]);\n}\nfunction de(e, t) {\n if (e.$ === \"Unknown\")\n return !0;\n {\n let n = e.names;\n if (t.$ === \"Unknown\")\n return !0;\n {\n let i = t.names;\n return $(E, [n, i, !1]);\n }\n }\n}\nfunction g(e, t, n) {\n if (e.$ === \"Nil\")\n return n;\n {\n let i = e.head, o = e.tail, l = r(be(t, i));\n return $(g, [o, t, n || l]);\n }\n}\nfunction se(e) {\n return e.$ === \"LT\" ? !0 : e.$ === \"EQ\";\n}\nfunction he(e) {\n return e.$ === \"LT\" ? !1 : e.$ === \"EQ\";\n}\nfunction Ce(e, t) {\n let n = t.first, i = t.last, o = t.paired, l = r(f(o)), d = r(s(e, n)), h = l || d, N = i < e;\n return h || N;\n}\nfunction pe(e) {\n return $(a, [r(U(e)), r(f(r(p(e, { $: \"Con\", head: 42n, tail: { $: \"Nil\" } }, !0))))]);\n}\nfunction Ne(e, t, n) {\n return e ? $(a, [r(m(t, n, !0)), r(m(n, t, !0))]) : !1;\n}\nfunction me(e) {\n return $(a, [r(A(e)), r(a(r(P(e, 64n)), r(V(e, !0))))]);\n}\nfunction E(e, t, n) {\n if (e.$ === \"Nil\")\n return n;\n {\n let i = e.head, o = e.tail, l = r(b(t, i, !1));\n return $(E, [o, t, n || l]);\n }\n}\nfunction be(e, t) {\n if (e.$ === \"Quiet\")\n return !1;\n {\n let n = e.ordered, i = e.scope;\n if (t.$ === \"Quiet\")\n return !1;\n {\n let o = t.ordered, l = t.scope;\n return $(k, [i, l, n, o]);\n }\n }\n}\nfunction U(e) {\n if (e.$ === \"Nil\")\n return !1;\n {\n let t = e.head, n = e.tail;\n return !0;\n }\n}\nfunction p(e, t, n) {\n if (e.$ === \"Nil\") {\n if (t.$ === \"Nil\")\n return n;\n {\n let i = t.head, o = t.tail;\n return !1;\n }\n } else {\n let i = e.head, o = e.tail;\n if (t.$ === \"Nil\")\n return !1;\n {\n let l = t.head, d = t.tail;\n return $(p, [o, d, r(a(n, r(C(i, l))))]);\n }\n }\n}\nfunction m(e, t, n) {\n if (e.$ === \"Nil\")\n return n;\n {\n let i = e.head, o = e.tail;\n return $(m, [o, t, r(a(n, r(b(t, i, !1))))]);\n }\n}\nfunction P(e, t) {\n if (e.$ === \"Nil\")\n return !0;\n {\n let n = e.head, i = e.tail;\n if (t === 0n)\n return !1;\n {\n let o = t - 1n;\n return $(P, [i, o]);\n }\n }\n}\nfunction V(e, t) {\n if (e.$ === \"Nil\")\n return t;\n {\n let n = e.head, i = e.tail;\n return $(V, [i, r(a(t, r(we(n))))]);\n }\n}\nfunction b(e, t, n) {\n if (e.$ === \"Nil\")\n return n;\n {\n let i = e.head, o = e.tail, l = r(p(t, i, !0));\n return $(b, [o, t, n || l]);\n }\n}\nfunction we(e) {\n return $(a, [r(U(e)), r(a(r(W(e, 256n)), r(f(r(p(e, { $: \"Con\", head: 42n, tail: { $: \"Nil\" } }, !0))))))]);\n}\nfunction W(e, t) {\n if (e.$ === \"Nil\")\n return !0;\n {\n let n = e.head, i = e.tail;\n if (t === 0n)\n return !1;\n {\n let o = t - 1n;\n return $(W, [i, o]);\n }\n }\n}\nvar Se = /* @__PURE__ */ u(x, 3), ke = /* @__PURE__ */ u(D, 6), ve = /* @__PURE__ */ u(H, 4), Te = /* @__PURE__ */ u(I, 4), ze = /* @__PURE__ */ u(K, 2), Ae = /* @__PURE__ */ u(S, 2), Qe = /* @__PURE__ */ u(O, 1), ge = /* @__PURE__ */ u(Y, 2), Ee = /* @__PURE__ */ u(Z, 1), Ue = /* @__PURE__ */ u(y, 2), Pe = /* @__PURE__ */ u(_, 4), Ve = /* @__PURE__ */ u(ee, 5), We = /* @__PURE__ */ u(te, 1), qe = /* @__PURE__ */ u(ne, 1), Be = /* @__PURE__ */ u(X, 2), Ge = /* @__PURE__ */ u(J, 3), Le = /* @__PURE__ */ u(M, 4), je = /* @__PURE__ */ u(R, 4), Fe = /* @__PURE__ */ u(G, 1), Je = /* @__PURE__ */ u(L, 2), Me = /* @__PURE__ */ u(j, 4), Re = /* @__PURE__ */ u(F, 2);\nexport {\n Te as canClose,\n We as certificateAccepted,\n Ee as chunkAccepted,\n ze as cleanupState,\n qe as consume,\n Ue as coverageComplete,\n Qe as cutAccepted,\n Se as footprintFits,\n Ve as headReadable,\n Ge as knownConflict,\n Be as lineageSelected,\n ge as pointerCurrent,\n Me as resourceConflict,\n Re as resourceGroups,\n Je as resourceNormalize,\n Fe as resourceSource,\n je as sampleWithin,\n Ae as spansSafe,\n Le as summaryWithin,\n ve as transitionCurrent,\n ke as unknownConflict,\n Pe as useNormalized\n};\n", "// Bend 2.0.26's JavaScript backend rejects arithmetic naturals above this bound.\n// Comparison-only primitives can compare larger JS-safe integers. Storage uses\n// radix limbs to keep its full safe-integer revision arithmetic in this domain.\nexport const BEND_NAT_MAX = 2 ** 48 - 1;\n", "import {\n resourceSource, resourceNormalize, resourceGroups,\n type BendList, type ResourceName, type ResourceScope, type ResourceEffect,\n} from \"./generated/kernel.js\";\n\nexport { resourceGroups };\n\n/** Lossless wire encoding, including NULs and lone surrogates. Never truncate,\n * hash, normalize Unicode, or assign independently interned numeric IDs here. */\nexport const encodeResourceNames = (values: readonly unknown[] | undefined): BendList<ResourceName> => {\n let names: BendList<ResourceName> = { $: \"Nil\" };\n const cache = new Map<string, ResourceName>();\n const input = Array.isArray(values) ? values : [];\n for (let i = input.length - 1; i >= 0; i--) {\n const value: unknown = input[i];\n let name: ResourceName = { $: \"Nil\" };\n if (typeof value === \"string\") {\n const cached = cache.get(value);\n if (cached) name = cached;\n else {\n for (let j = value.length - 1; j >= 0; j--) {\n name = { $: \"Con\", head: BigInt(value.charCodeAt(j)), tail: name };\n }\n cache.set(value, name);\n }\n }\n names = { $: \"Con\", head: name, tail: names };\n }\n return names;\n};\n\n/** ABI decoding only. Normalization policy lives in the compiled checker. */\nexport const decodeResourceScope = (scope: ResourceScope): string[] => {\n if (scope.$ === \"Unknown\") return [\"*\"];\n const result: string[] = [];\n for (let names = scope.names; names.$ === \"Con\"; names = names.tail) {\n const chars: string[] = [];\n for (let name = names.head; name.$ === \"Con\"; name = name.tail) {\n if (name.head < 0n || name.head > 65535n) throw new Error(\"Invalid verified resource code unit\");\n chars.push(String.fromCharCode(Number(name.head)));\n }\n result.push(chars.join(\"\"));\n }\n return result;\n};\n\nexport const boundedEffectResources = (resources: readonly string[] | undefined): string[] => {\n // Capture the entire declaration before running the untrusted proposer.\n const declared: unknown[] = Array.isArray(resources) ? Array.from(resources) : [];\n const original = resourceSource(encodeResourceNames(declared));\n const proposal = new Set<unknown>();\n for (const resource of declared) {\n proposal.add(resource);\n if (proposal.size > 64) break;\n }\n return decodeResourceScope(resourceNormalize(original, encodeResourceNames([...proposal])));\n};\n\nexport const encodeResourceEffects = (\n effects: readonly { kind: string; ordering: string; resources: readonly string[] }[],\n): BendList<ResourceEffect> => {\n let result: BendList<ResourceEffect> = { $: \"Nil\" };\n for (let i = effects.length - 1; i >= 0; i--) {\n const effect = effects[i]!;\n const value: ResourceEffect = effect.kind === \"none\" ? { $: \"Quiet\" } : {\n $: \"Effect\", ordered: effect.ordering !== \"commutative\",\n scope: resourceSource(encodeResourceNames(effect.resources)),\n };\n result = { $: \"Con\", head: value, tail: result };\n }\n return result;\n};\n", "import { BEND_NAT_MAX } from \"./nat.js\";\nimport {\n cutAccepted, chunkAccepted, certificateAccepted, summaryWithin, sampleWithin,\n type BendList, type Span,\n} from \"./generated/kernel.js\";\n\nexport {\n unknownConflict, knownConflict, transitionCurrent, canClose, cleanupState, pointerCurrent,\n coverageComplete, useNormalized, headReadable, consume, lineageSelected,\n} from \"./generated/kernel.js\";\n\nconst isNatural = (value: number): boolean => Number.isSafeInteger(value) && value >= 0;\nconst isArithmeticNatural = (value: number): boolean => isNatural(value) && value <= BEND_NAT_MAX;\n\nexport const bendList = <T>(values: readonly T[]): BendList<T> => {\n let list: BendList<T> = { $: \"Nil\" };\n for (let index = values.length - 1; index >= 0; index--) {\n list = { $: \"Con\", head: values[index]!, tail: list };\n }\n return list;\n};\n\nexport { boundedEffectResources } from \"./resources.js\";\n\nexport const acceptSummaryBounds = (bytes: number, byteLimit: number, projected: number, target: number): boolean =>\n [bytes, byteLimit, projected, target].every(isNatural) &&\n summaryWithin(BigInt(bytes), BigInt(byteLimit), BigInt(projected), BigInt(target));\n\nexport const acceptSampleAccounting = (total: number, retained: number, omitted: number, limit: number): boolean =>\n [total, retained, omitted, limit].every(isArithmeticNatural) && retained + omitted <= BEND_NAT_MAX &&\n sampleWithin(BigInt(total), BigInt(retained), BigInt(omitted), BigInt(limit));\n\nexport interface CutSpan {\n first: number;\n last: number;\n hasCall: boolean;\n hasResult: boolean;\n}\n\nexport interface CutCandidate {\n eligible: boolean;\n afterPrevious: boolean;\n retained: number;\n budget: number;\n boundary: number;\n}\n\n/** The producer may reject cheaply, but cannot publish a cut without this check.\n * Batches bound backend non-tail list construction; every source span is checked. */\nexport const acceptCompactionCut = (candidate: CutCandidate, spans: Iterable<CutSpan>): boolean => {\n if (![candidate.retained, candidate.budget, candidate.boundary].every(isNatural) ||\n typeof candidate.eligible !== \"boolean\" || typeof candidate.afterPrevious !== \"boolean\") return false;\n const base = {\n $: \"Cut\" as const, eligible: candidate.eligible, afterPrevious: candidate.afterPrevious,\n retained: BigInt(candidate.retained), budget: BigInt(candidate.budget), boundary: BigInt(candidate.boundary),\n };\n if (!cutAccepted({ ...base, spans: { $: \"Nil\" } })) return false;\n let batch: Span[] = [];\n for (const span of spans) {\n if (!isNatural(span.first) || !isNatural(span.last) || span.first > span.last ||\n typeof span.hasCall !== \"boolean\" || typeof span.hasResult !== \"boolean\") return false;\n batch.push({ $: \"Span\", first: BigInt(span.first), last: BigInt(span.last), paired: span.hasCall && span.hasResult });\n if (batch.length === 128) {\n if (!cutAccepted({ ...base, spans: bendList(batch) })) return false;\n batch = [];\n }\n }\n return cutAccepted({ ...base, spans: bendList(batch) });\n};\n\nexport interface TextRange { start: number; end: number; total: number; complete: boolean }\nexport const acceptMemoryChunk = (\n range: TextRange, length: number, expectedStart: number, expectedTotal: number,\n): boolean => {\n if (![range.start, range.end, range.total, length, expectedStart, expectedTotal].every(isArithmeticNatural) || range.start + length > BEND_NAT_MAX ||\n typeof range.complete !== \"boolean\") return false;\n return chunkAccepted({\n $: \"Chunk\", start: BigInt(range.start), end: BigInt(range.end), total: BigInt(range.total),\n length: BigInt(length), expectedStart: BigInt(expectedStart), expectedTotal: BigInt(expectedTotal),\n complete: range.complete,\n });\n};\n\n/** A fixed ordered tuple prevents a missing check from becoming an empty,\n * vacuously accepted certificate. Messages are diagnostics, never authority. */\nexport const assertCertificateFacts = (\n facts: readonly [CertificateFact, CertificateFact, CertificateFact, CertificateFact, CertificateFact, CertificateFact, CertificateFact, CertificateFact],\n): void => {\n if (facts.length !== 8 || facts.some((fact) => typeof fact.valid !== \"boolean\")) {\n throw new Error(\"Invalid Schema certificate evidence\");\n }\n if (!certificateAccepted(bendList(facts.map((fact) => fact.valid)))) {\n throw new Error(facts.find((fact) => !fact.valid)?.error ?? \"Schema certificate rejected\");\n }\n};\ninterface CertificateFact { valid: boolean; error: string }\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,EAAE,GAAG,GAAG;AACf,SAAO,EAAE,GAAG,IAAI,IAAI,OAAO,MAAM,IAAI,OAAO,KAAK;AACnD;AACA,SAAS,EAAE,GAAG;AACZ,MAAI,IAAI;AACN,UAAM;AACR,SAAO;AACT;AACA,SAAS,EAAE,GAAG,GAAG;AACf,SAAO,EAAE,GAAG,QAAQ,GAAG,GAAG,GAAG,EAAE;AACjC;AACA,SAAS,EAAE,GAAG;AACZ,SAAO,MAAM,QAAQ,OAAO,KAAK,YAAY,EAAE,MAAM;AACnD,QAAI,EAAE,EAAE,GAAG,EAAE,CAAC;AAChB,SAAO;AACT;AACA,SAAS,EAAE,GAAG,GAAG;AACf,SAAO,IAAI,MAAM,EAAE,SAAS,IAAI,EAAE,IAAI,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,IAAI,EAAE,EAAE,G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G,MAAM,OAAO,SAAS,KAAK,EAAE,CAAC,EAAG,QAAO;AAC9D,cAAQ,CAAC;AAAA,IACX;AAAA,EACF;AACA,SAAO,GAAY,EAAE,GAAG,MAAM,OAAO,SAAS,KAAK,EAAE,CAAC;AACxD;AAGO,IAAM,oBAAoB,CAC/B,OAAkB,QAAgB,eAAuB,kBAC7C;AACZ,MAAI,CAAC,CAAC,MAAM,OAAO,MAAM,KAAK,MAAM,OAAO,QAAQ,eAAe,aAAa,EAAE,MAAM,mBAAmB,KAAK,MAAM,QAAQ,SAAS,gBAClI,OAAO,MAAM,aAAa,UAAW,QAAO;AAChD,SAAO,GAAc;AAAA,IACnB,GAAG;AAAA,IAAS,OAAO,OAAO,MAAM,KAAK;AAAA,IAAG,KAAK,OAAO,MAAM,GAAG;AAAA,IAAG,OAAO,OAAO,MAAM,KAAK;AAAA,IACzF,QAAQ,OAAO,MAAM;AAAA,IAAG,eAAe,OAAO,aAAa;AAAA,IAAG,eAAe,OAAO,aAAa;AAAA,IACjG,UAAU,MAAM;AAAA,EAClB,CAAC;AACH;AAIO,IAAM,yBAAyB,CACpC,UACS;AACT,MAAI,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC,SAAS,OAAO,KAAK,UAAU,SAAS,GAAG;AAC/E,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACvD;AACA,MAAI,CAAC,GAAoB,SAAS,MAAM,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,GAAG;AACnE,UAAM,IAAI,MAAM,MAAM,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK,GAAG,SAAS,6BAA6B;AAAA,EAC3F;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ui/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { FabricActorInfo, FabricActorMessage, GlobalActorDefinition } from \"../actors/types.js\";\nimport type { FabricActivityRun } from \"../activity/types.js\";\nimport type { FabricComponentGraph } from \"../components/types.js\";\nimport type { MeshEvent } from \"../mesh/store.js\";\nimport type { FabricMainAgentInfo } from \"../main-agent.js\";\nimport type {\n FabricParticipantCapability,\n FabricParticipantInfo,\n FabricParticipantKind,\n FabricParticipantResidency,\n FabricPeerInfo,\n} from \"../topology/types.js\";\nimport type { AgentUsage } from \"../agents/types.js\";\n\nexport type FabricUiMain = FabricMainAgentInfo;\nexport type FabricUiPeer = FabricPeerInfo;\n\nexport interface FabricUiAgent {\n id: string;\n name: string;\n status: string;\n runner?: \"pi\" | \"claude\" | \"veda\";\n residency?: FabricParticipantResidency;\n transport: string;\n cwd: string;\n task?: string;\n model?: string;\n thinking?: string;\n currentTool?: string;\n startedAt?: number;\n updatedAt?: number;\n finishedAt?: number;\n turns?: number;\n toolCalls?: number;\n usage?: AgentUsage;\n text?: string;\n value?: unknown;\n error?: string;\n logFile?: string;\n attachCommand?: string;\n branch?: string;\n worktree?: string;\n actorId?: string;\n actorName?: string;\n runId?: string;\n phaseId?: string;\n parentId?: string;\n nestingDepth?: number;\n rootId?: string;\n ownerHostId?: string;\n local?: boolean;\n stale?: boolean;\n participantKind?: FabricParticipantKind;\n capabilities?: FabricParticipantCapability[];\n}\n\nexport interface FabricUiActor extends FabricActorInfo {\n /** The actor's default instruction (persona text); shown and edited in the dashboard. */\n instructions: string;\n recentMessages: FabricActorMessage[];\n ownerHostId?: string;\n local?: boolean;\n worker?: FabricUiAgent;\n}\n\nexport interface FabricUiStateEntry {\n key: string;\n label: string;\n status: string;\n owner?: string;\n detail?: string;\n value: unknown;\n version: number;\n updatedAt: number;\n}\n\nexport interface FabricDashboardSnapshot {\n now: number;\n widgetDismissedAt?: number;\n runs: FabricActivityRun[];\n main: FabricUiMain;\n peers: FabricUiPeer[];\n participants?: FabricParticipantInfo[];\n agents: FabricUiAgent[];\n actors: FabricUiActor[];\n componentGraph: FabricComponentGraph;\n /** Project-independent actor templates from the global registry. */\n globalActors: GlobalActorDefinition[];\n state: FabricUiStateEntry[];\n events: MeshEvent[];\n}\n\nexport const activeStatuses = new Set([\n \"queued\",\n \"pending\",\n \"ready\",\n \"claimed\",\n \"running\",\n \"in_progress\",\n \"blocked\",\n \"loading\",\n \"active\",\n \"unloading\",\n]);\n\nexport const isActiveStatus = (status: string): boolean => activeStatuses.has(status);\n\nexport const orderAgentsByCreation = (agents: FabricUiAgent[]): FabricUiAgent[] =>\n agents\n .map((agent, index) => ({ agent, index }))\n .sort(\n (left, right) =>\n (left.agent.startedAt ?? Number.MAX_SAFE_INTEGER) -\n (right.agent.startedAt ?? Number.MAX_SAFE_INTEGER) ||\n left.index - right.index,\n )\n .map(({ agent }) => agent);\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import type { FabricActorInfo, FabricActorMessage, GlobalActorDefinition } from \"../actors/types.js\";\nimport type { FabricActivityRun } from \"../activity/types.js\";\nimport type { FabricComponentGraph } from \"../components/types.js\";\nimport type { MeshEvent } from \"../mesh/store.js\";\nimport type { FabricMainAgentInfo } from \"../main-agent.js\";\nimport type {\n FabricParticipantCapability,\n FabricParticipantInfo,\n FabricParticipantKind,\n FabricParticipantResidency,\n FabricPeerInfo,\n} from \"../topology/types.js\";\nimport type { AgentUsage } from \"../agents/types.js\";\n\nexport type FabricUiMain = FabricMainAgentInfo;\nexport type FabricUiPeer = FabricPeerInfo;\n\nexport interface FabricUiAgent {\n id: string;\n name: string;\n status: string;\n runner?: \"pi\" | \"claude\" | \"veda\";\n residency?: FabricParticipantResidency;\n transport: string;\n cwd: string;\n task?: string;\n model?: string;\n thinking?: string;\n currentTool?: string;\n startedAt?: number;\n updatedAt?: number;\n finishedAt?: number;\n turns?: number;\n toolCalls?: number;\n usage?: AgentUsage;\n text?: string;\n value?: unknown;\n error?: string;\n logFile?: string;\n attachCommand?: string;\n branch?: string;\n worktree?: string;\n actorId?: string;\n actorName?: string;\n runId?: string;\n phaseId?: string;\n parentId?: string;\n nestingDepth?: number;\n rootId?: string;\n ownerHostId?: string;\n local?: boolean;\n stale?: boolean;\n participantKind?: FabricParticipantKind;\n capabilities?: FabricParticipantCapability[];\n}\n\nexport interface FabricUiActor extends FabricActorInfo {\n /** The actor's default instruction (persona text); shown and edited in the dashboard. */\n instructions: string;\n recentMessages: FabricActorMessage[];\n ownerHostId?: string;\n local?: boolean;\n worker?: FabricUiAgent;\n}\n\nexport interface FabricUiStateEntry {\n key: string;\n label: string;\n status: string;\n owner?: string;\n detail?: string;\n value: unknown;\n version: number;\n updatedAt: number;\n}\n\nexport interface FabricDashboardSnapshot {\n shells?: import(\"../core/shell-jobs.js\").FabricShellJobInfo[];\n now: number;\n widgetDismissedAt?: number;\n runs: FabricActivityRun[];\n main: FabricUiMain;\n peers: FabricUiPeer[];\n participants?: FabricParticipantInfo[];\n agents: FabricUiAgent[];\n actors: FabricUiActor[];\n componentGraph: FabricComponentGraph;\n /** Project-independent actor templates from the global registry. */\n globalActors: GlobalActorDefinition[];\n state: FabricUiStateEntry[];\n events: MeshEvent[];\n}\n\nexport const activeStatuses = new Set([\n \"queued\",\n \"pending\",\n \"ready\",\n \"claimed\",\n \"running\",\n \"in_progress\",\n \"blocked\",\n \"loading\",\n \"active\",\n \"unloading\",\n]);\n\nexport const isActiveStatus = (status: string): boolean => activeStatuses.has(status);\n\nexport const orderAgentsByCreation = (agents: FabricUiAgent[]): FabricUiAgent[] =>\n agents\n .map((agent, index) => ({ agent, index }))\n .sort(\n (left, right) =>\n (left.agent.startedAt ?? Number.MAX_SAFE_INTEGER) -\n (right.agent.startedAt ?? Number.MAX_SAFE_INTEGER) ||\n left.index - right.index,\n )\n .map(({ agent }) => agent);\n"],
|
|
5
|
+
"mappings": ";AA6FO,IAAM,iBAAiB,oBAAI,IAAI;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,iBAAiB,CAAC,WAA4B,eAAe,IAAI,MAAM;AAE7E,IAAM,wBAAwB,CAAC,WACpC,OACG,IAAI,CAAC,OAAO,WAAW,EAAE,OAAO,MAAM,EAAE,EACxC;AAAA,EACC,CAAC,MAAM,WACJ,KAAK,MAAM,aAAa,OAAO,qBAC7B,MAAM,MAAM,aAAa,OAAO,qBACnC,KAAK,QAAQ,MAAM;AACvB,EACC,IAAI,CAAC,EAAE,MAAM,MAAM,KAAK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
MAX_COMPACTION_INSTRUCTIONS_CHARS,
|
|
15
15
|
MAX_PRESERVE_ITEMS,
|
|
16
16
|
MAX_PRESERVE_ITEM_CHARS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LNLQ2LX3.js";
|
|
18
18
|
|
|
19
19
|
// src/providers/agents-actions.ts
|
|
20
20
|
var runProperties = {
|
|
@@ -747,4 +747,4 @@ export {
|
|
|
747
747
|
AGENTS_ACTION_DESCRIPTORS,
|
|
748
748
|
normalizeAgentRunRequest
|
|
749
749
|
};
|
|
750
|
-
//# sourceMappingURL=chunk-
|
|
750
|
+
//# sourceMappingURL=chunk-754HA6KO.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
agentParticipantRecords,
|
|
10
10
|
loadModelUsage,
|
|
11
11
|
useBudgetLedger
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZRI433JP.js";
|
|
13
13
|
import {
|
|
14
14
|
RESIDENT_HOST_FORMAT,
|
|
15
15
|
residentDeliveryPrefix,
|
|
@@ -691,4 +691,4 @@ if (isMain) {
|
|
|
691
691
|
export {
|
|
692
692
|
runResidentHostFromConfigPath
|
|
693
693
|
};
|
|
694
|
-
//# sourceMappingURL=chunk-
|
|
694
|
+
//# sourceMappingURL=chunk-B2IVWASP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFabricExecutionTraceV1
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X3IRR7CV.js";
|
|
4
4
|
|
|
5
5
|
// src/compaction/branch-details.ts
|
|
6
6
|
var FABRIC_BRANCH_SUMMARY_KIND = "pi-fabric.branch-summary";
|
|
@@ -218,4 +218,4 @@ export {
|
|
|
218
218
|
readFabricBranchSummaryDetails,
|
|
219
219
|
readFabricProjectionTrace
|
|
220
220
|
};
|
|
221
|
-
//# sourceMappingURL=chunk-
|
|
221
|
+
//# sourceMappingURL=chunk-B4HECUJI.js.map
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
emptyCompiledSurface,
|
|
8
8
|
withExclusiveFileLock,
|
|
9
9
|
withExclusiveFileLockAsync
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JCV54SSP.js";
|
|
11
11
|
import {
|
|
12
12
|
sessionDirForCwd,
|
|
13
13
|
sessionsDirRoot
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VQGO4P7C.js";
|
|
15
15
|
import {
|
|
16
16
|
writeJsonAtomic,
|
|
17
17
|
writeJsonAtomicAsync
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
FABRIC_EXECUTION_TRACE_KIND,
|
|
21
21
|
readFabricExecutionTraceV1
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-X3IRR7CV.js";
|
|
23
23
|
import {
|
|
24
24
|
MAX_NORMAL_FORM_PLANS,
|
|
25
25
|
applyNormalFormPlan,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
signatureDistance,
|
|
33
33
|
staticFreedomFromSchema,
|
|
34
34
|
trendFromScores
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OINADFEF.js";
|
|
36
36
|
import {
|
|
37
37
|
stableJsonHash
|
|
38
38
|
} from "./chunk-3YZUQESG.js";
|
|
@@ -1873,4 +1873,4 @@ export {
|
|
|
1873
1873
|
formatEntropyCompileNotice,
|
|
1874
1874
|
runEntropyTrial
|
|
1875
1875
|
};
|
|
1876
|
-
//# sourceMappingURL=chunk-
|
|
1876
|
+
//# sourceMappingURL=chunk-CSJSHBAT.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-B54Z662X.js";
|
|
12
12
|
import {
|
|
13
13
|
FabricTraceSafeError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-X3IRR7CV.js";
|
|
15
15
|
|
|
16
16
|
// src/core/approval-controller.ts
|
|
17
17
|
import {
|
|
@@ -577,4 +577,4 @@ export {
|
|
|
577
577
|
FabricSessionApprovals,
|
|
578
578
|
ApprovalController
|
|
579
579
|
};
|
|
580
|
-
//# sourceMappingURL=chunk-
|
|
580
|
+
//# sourceMappingURL=chunk-D4B4CCTA.js.map
|