@e4779/pi-fabric 0.97.0-fork.13 → 0.100.0-fork.15
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 +5 -4
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/types.d.ts +4 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents.js +3 -3
- package/dist/chunks/{chunk-JCV54SSP.js → chunk-27ORW5EK.js} +41 -22
- package/dist/chunks/chunk-27ORW5EK.js.map +7 -0
- package/dist/chunks/{chunk-EQIGYLVB.js → chunk-3RFEMOJA.js} +9 -3
- package/dist/chunks/chunk-3RFEMOJA.js.map +7 -0
- package/dist/chunks/{chunk-D5GNTBV6.js → chunk-7HQKBGTL.js} +2 -2
- package/dist/chunks/{chunk-LNLQ2LX3.js → chunk-ASU53MOT.js} +2 -2
- package/dist/chunks/{chunk-V3PIO7QL.js → chunk-BUQZBG6O.js} +3 -43
- package/dist/chunks/chunk-BUQZBG6O.js.map +7 -0
- package/dist/chunks/{chunk-6K5SRGW6.js → chunk-C2DIKAOE.js} +4 -4
- package/dist/chunks/{chunk-FJSHRHOR.js → chunk-CPSPZGK4.js} +6 -6
- package/dist/chunks/{chunk-UBPFGMDQ.js → chunk-CXQF35XB.js} +4 -4
- package/dist/chunks/{chunk-3SIXBW6A.js → chunk-H4YYLQTX.js} +2 -2
- package/dist/chunks/{chunk-CSJSHBAT.js → chunk-I5VN6D5T.js} +48 -21
- package/dist/chunks/chunk-I5VN6D5T.js.map +7 -0
- package/dist/chunks/{chunk-VRYEGVHR.js → chunk-J7ZQERKA.js} +11 -8
- package/dist/chunks/chunk-J7ZQERKA.js.map +7 -0
- package/dist/chunks/{chunk-D4B4CCTA.js → chunk-JHQDS6YP.js} +2 -2
- package/dist/chunks/{chunk-OINADFEF.js → chunk-JWWGWUP7.js} +5 -5
- package/dist/chunks/{chunk-WXSELMFV.js → chunk-KFPUVFDS.js} +5 -5
- package/dist/chunks/{chunk-EPAFGT2M.js → chunk-LH2PGXSZ.js} +5 -1
- package/dist/chunks/{chunk-EPAFGT2M.js.map → chunk-LH2PGXSZ.js.map} +2 -2
- package/dist/chunks/{chunk-X3IRR7CV.js → chunk-M25A5R3F.js} +2 -2
- package/dist/chunks/chunk-MNTJX4U7.js +760 -0
- package/dist/chunks/chunk-MNTJX4U7.js.map +7 -0
- package/dist/chunks/{chunk-754HA6KO.js → chunk-NRLDV5R3.js} +7 -2
- package/dist/chunks/chunk-NRLDV5R3.js.map +7 -0
- package/dist/chunks/chunk-O4A5UOXU.js +44 -0
- package/dist/chunks/chunk-O4A5UOXU.js.map +7 -0
- package/dist/chunks/{chunk-4F27LJTS.js → chunk-OEJ6RFDO.js} +255 -72
- package/dist/chunks/chunk-OEJ6RFDO.js.map +7 -0
- package/dist/chunks/{chunk-VQGO4P7C.js → chunk-QIW7QMFI.js} +2 -2
- package/dist/chunks/{chunk-B4HECUJI.js → chunk-RUEKYUNR.js} +2 -2
- package/dist/chunks/{chunk-A4XPJESK.js → chunk-RZHXYLOY.js} +2 -2
- package/dist/chunks/{chunk-QNMMQAZ7.js → chunk-SDDBEBM4.js} +3 -3
- package/dist/chunks/{chunk-2LBC6TTP.js → chunk-UGMLWBVF.js} +390 -228
- package/dist/chunks/chunk-UGMLWBVF.js.map +7 -0
- package/dist/chunks/{chunk-5WUW727L.js → chunk-VGQ2IE7P.js} +19 -3
- package/dist/chunks/chunk-VGQ2IE7P.js.map +7 -0
- package/dist/chunks/{chunk-KBHITFTO.js → chunk-VRAGOMN4.js} +3 -1
- package/dist/chunks/chunk-VRAGOMN4.js.map +7 -0
- package/dist/chunks/{chunk-F676L43O.js → chunk-WK25T5ST.js} +11 -11
- package/dist/chunks/{chunk-IPHEM6RY.js → chunk-WQB6CVES.js} +2 -2
- package/dist/chunks/{chunk-CZSX6UG6.js → chunk-XYFOKDFM.js} +2 -2
- package/dist/chunks/{chunk-G2F2RDZI.js → chunk-YAPDV6LO.js} +2 -2
- package/dist/chunks/{chunk-Q5BMTL6A.js → chunk-YIEK7FH2.js} +4 -4
- package/dist/chunks/{chunk-KS44WKJJ.js → chunk-Z45SUO4B.js} +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/components/builtin-guidance.d.ts +4 -0
- package/dist/components/builtin-guidance.d.ts.map +1 -0
- package/dist/components/configuration.js +2 -2
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.js +7 -7
- package/dist/core/file-lock.d.ts +4 -0
- package/dist/core/file-lock.d.ts.map +1 -1
- package/dist/core/provider-operations.js +162 -51
- package/dist/core/provider-operations.js.map +2 -2
- package/dist/core/shell-timing.d.ts +11 -0
- package/dist/core/shell-timing.d.ts.map +1 -0
- package/dist/entropy/index.js +12 -10
- package/dist/entropy/pool-store.d.ts +3 -1
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +138 -55
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +125 -58
- package/dist/index.js.map +3 -3
- package/dist/jev/observation.js +5 -5
- package/dist/jev.js +8 -8
- package/dist/lifecycle/broker.d.ts.map +1 -1
- 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/prewalk/messages.d.ts +1 -1
- package/dist/prewalk/messages.d.ts.map +1 -1
- package/dist/protocol.d.ts +12 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +3 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-message-router.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +8 -8
- package/dist/providers/memory-provider.js +9 -9
- package/dist/providers/prewalk-provider.d.ts +3 -3
- package/dist/providers/prewalk-provider.d.ts.map +1 -1
- package/dist/residency/host.js +9 -9
- package/dist/residency/pi-entry.js +9 -9
- 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 -1
- package/dist/runtime/typescript-kernel.js +2 -2
- package/dist/ui/conversation.d.ts +2 -1
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +41 -37
- package/dist/ui/conversation.js.map +2 -2
- package/dist/ui/dashboard.js +10 -8
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/fabric-model-selector.d.ts +3 -0
- package/dist/ui/fabric-model-selector.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +15 -2
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-tasks.d.ts +2 -1
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +169 -81
- package/dist/ui/shell-tasks.js.map +3 -3
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/authority-kernel.js +188 -81
- package/dist/verified/generated/kernel.js +547 -265
- package/dist/verified/generated/lifecycle-kernel.d.ts +1 -1
- package/dist/verified/generated/lifecycle-kernel.js +172 -125
- package/dist/verified/generated/manifest.json +11 -11
- package/dist/verified/generated/provider-kernel.js +160 -52
- package/dist/verified/generated/storage-kernel.js +238 -69
- package/dist/worker/model-control.d.ts +1 -1
- package/dist/worker/model-control.d.ts.map +1 -1
- package/dist/worker/model-control.js +6 -3
- package/dist/worker/model-control.js.map +2 -2
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +15 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker.js +3 -2
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +1 -1
- package/docs/background-tasks.md +33 -0
- package/docs/configuration.md +4 -2
- package/docs/entropy.md +13 -0
- package/docs/harnesses.md +1 -1
- package/docs/interface.md +2 -0
- package/docs/jev.md +1 -1
- package/docs/prompt-cache.md +3 -3
- package/docs/provider-capabilities.md +1 -1
- package/docs/verified-kernels.md +10 -6
- package/package.json +1 -1
- package/proofs/lifecycle-spec.bend +4 -4
- package/proofs/lifecycle-types.d.ts +1 -1
- package/proofs/lifecycle.bend +6 -6
- package/scripts/test-verified-kernels.mjs +3 -3
- package/scripts/verified-kernels.mjs +53 -13
- package/skillsets/typescript/fabric-exec/references/agents.md +2 -0
- package/dist/chunks/chunk-2LBC6TTP.js.map +0 -7
- package/dist/chunks/chunk-4E63LJDD.js +0 -468
- package/dist/chunks/chunk-4E63LJDD.js.map +0 -7
- package/dist/chunks/chunk-4F27LJTS.js.map +0 -7
- package/dist/chunks/chunk-5WUW727L.js.map +0 -7
- package/dist/chunks/chunk-754HA6KO.js.map +0 -7
- package/dist/chunks/chunk-CSJSHBAT.js.map +0 -7
- package/dist/chunks/chunk-EQIGYLVB.js.map +0 -7
- package/dist/chunks/chunk-JCV54SSP.js.map +0 -7
- package/dist/chunks/chunk-KBHITFTO.js.map +0 -7
- package/dist/chunks/chunk-V3PIO7QL.js.map +0 -7
- package/dist/chunks/chunk-VRYEGVHR.js.map +0 -7
- /package/dist/chunks/{chunk-D5GNTBV6.js.map → chunk-7HQKBGTL.js.map} +0 -0
- /package/dist/chunks/{chunk-LNLQ2LX3.js.map → chunk-ASU53MOT.js.map} +0 -0
- /package/dist/chunks/{chunk-6K5SRGW6.js.map → chunk-C2DIKAOE.js.map} +0 -0
- /package/dist/chunks/{chunk-FJSHRHOR.js.map → chunk-CPSPZGK4.js.map} +0 -0
- /package/dist/chunks/{chunk-UBPFGMDQ.js.map → chunk-CXQF35XB.js.map} +0 -0
- /package/dist/chunks/{chunk-3SIXBW6A.js.map → chunk-H4YYLQTX.js.map} +0 -0
- /package/dist/chunks/{chunk-D4B4CCTA.js.map → chunk-JHQDS6YP.js.map} +0 -0
- /package/dist/chunks/{chunk-OINADFEF.js.map → chunk-JWWGWUP7.js.map} +0 -0
- /package/dist/chunks/{chunk-WXSELMFV.js.map → chunk-KFPUVFDS.js.map} +0 -0
- /package/dist/chunks/{chunk-X3IRR7CV.js.map → chunk-M25A5R3F.js.map} +0 -0
- /package/dist/chunks/{chunk-VQGO4P7C.js.map → chunk-QIW7QMFI.js.map} +0 -0
- /package/dist/chunks/{chunk-B4HECUJI.js.map → chunk-RUEKYUNR.js.map} +0 -0
- /package/dist/chunks/{chunk-A4XPJESK.js.map → chunk-RZHXYLOY.js.map} +0 -0
- /package/dist/chunks/{chunk-QNMMQAZ7.js.map → chunk-SDDBEBM4.js.map} +0 -0
- /package/dist/chunks/{chunk-F676L43O.js.map → chunk-WK25T5ST.js.map} +0 -0
- /package/dist/chunks/{chunk-IPHEM6RY.js.map → chunk-WQB6CVES.js.map} +0 -0
- /package/dist/chunks/{chunk-CZSX6UG6.js.map → chunk-XYFOKDFM.js.map} +0 -0
- /package/dist/chunks/{chunk-G2F2RDZI.js.map → chunk-YAPDV6LO.js.map} +0 -0
- /package/dist/chunks/{chunk-Q5BMTL6A.js.map → chunk-YIEK7FH2.js.map} +0 -0
- /package/dist/chunks/{chunk-KS44WKJJ.js.map → chunk-Z45SUO4B.js.map} +0 -0
|
@@ -1,80 +1,188 @@
|
|
|
1
|
-
// Generated by Bend 2.0.
|
|
1
|
+
// Generated by Bend 2.0.32; do not edit. See LAWS.bend and PROOF.bend.
|
|
2
2
|
// Includes adapted Bend runtime/Base code, Copyright 2026 HigherOrderCO, Apache-2.0.
|
|
3
|
-
//
|
|
4
|
-
function
|
|
3
|
+
// ABI exports selected and tags adapted by Pi Fabric; see THIRD_PARTY_NOTICES.md.
|
|
4
|
+
function b(e, t) {
|
|
5
5
|
return { $: e < t ? "LT" : e === t ? "EQ" : "GT" };
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function _(e) {
|
|
8
|
+
return (typeof e == "bigint" || Number.isInteger(e)) && e >= 0 && e <= 2 ** 53 ? Number(e) : { [Symbol.toPrimitive]() {
|
|
9
|
+
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
10
|
+
} };
|
|
9
11
|
}
|
|
10
|
-
function
|
|
12
|
+
function g(e) {
|
|
11
13
|
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
12
14
|
e = e.f(...e.x);
|
|
13
15
|
return e;
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
return (...
|
|
17
|
+
function f(e, t) {
|
|
18
|
+
return (...a) => a.length < t ? f((...n) => e(...a, ...n), t - a.length) : e(...a);
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
+
function k(e, t, a) {
|
|
21
|
+
for (; ; ) {
|
|
22
|
+
let n = e, r = t, s = a;
|
|
23
|
+
if (n.$ === "Nil")
|
|
24
|
+
return r.$ === "Nil" ? s : !1;
|
|
25
|
+
{
|
|
26
|
+
let i = n.head, o = n.tail;
|
|
27
|
+
if (r.$ === "Nil")
|
|
28
|
+
return !1;
|
|
29
|
+
{
|
|
30
|
+
let h = r.head, x = r.tail;
|
|
31
|
+
e = o, t = x, a = d(s, D(i, h));
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
20
36
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
37
|
+
function T(e, t, a) {
|
|
38
|
+
let n = e.active, r = e.key;
|
|
39
|
+
return d(n, d(v(a), k(r, t, !0)));
|
|
23
40
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
return { $: "Outcome", next: { $: "Ticket", grant: $(d(o)), expected: a, payload: i }, plan: $(h(o, t, a, n, i, r)) };
|
|
41
|
+
function G(e, t, a, n) {
|
|
42
|
+
return e ? { $: "state-plans.Write", key: t, expected: a, value: n } : { $: "state-plans.Denied" };
|
|
27
43
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
return { $: "Ticket", grant: $(d(t)), expected: n, payload: r };
|
|
44
|
+
function E(e, t, a, n, r, s) {
|
|
45
|
+
return G(d(T(e, t, s), k(a, n, !0)), t, a, r);
|
|
31
46
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
return { $: "Grant", active: !1, key: e.key };
|
|
47
|
+
function w(e) {
|
|
48
|
+
return { $: "state-plans.Grant", active: !1, key: e.key };
|
|
35
49
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
50
|
+
function N(e, t, a, n) {
|
|
51
|
+
let r = e.grant, s = e.expected, i = e.payload;
|
|
52
|
+
return { $: "provider-plans.Outcome", next: { $: "provider-plans.Ticket", grant: w(r), expected: s, payload: i }, plan: E(r, t, s, a, i, n) };
|
|
38
53
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
54
|
+
function O(e) {
|
|
55
|
+
let t = e.grant, a = e.expected, n = e.payload;
|
|
56
|
+
return { $: "provider-plans.Ticket", grant: w(t), expected: a, payload: n };
|
|
41
57
|
}
|
|
42
|
-
function
|
|
58
|
+
function R(e, t, a, n) {
|
|
59
|
+
return N(e, t, a, n);
|
|
60
|
+
}
|
|
61
|
+
function W(e) {
|
|
62
|
+
return O(e);
|
|
63
|
+
}
|
|
64
|
+
function d(e, t) {
|
|
43
65
|
return e ? t : !1;
|
|
44
66
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
return u(l, [r, $(l($(m(n)), $(c(o, t, !0))))]);
|
|
67
|
+
function D(e, t) {
|
|
68
|
+
return Q(b(e, t));
|
|
48
69
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
function v(e) {
|
|
71
|
+
return !e;
|
|
72
|
+
}
|
|
73
|
+
function Q(e) {
|
|
74
|
+
return e.$ === "LT" ? !1 : e.$ === "EQ";
|
|
75
|
+
}
|
|
76
|
+
function p(e) {
|
|
77
|
+
let t = [e];
|
|
78
|
+
for (let a = t, n = 0; ; )
|
|
79
|
+
switch (e.$) {
|
|
80
|
+
case "Nil":
|
|
81
|
+
return a[n] = e, t[0];
|
|
82
|
+
case "Con":
|
|
83
|
+
a = a[n] = { ...e, head: _(e.head) }, n = "tail", e = e[n];
|
|
84
|
+
continue;
|
|
85
|
+
default:
|
|
86
|
+
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)";
|
|
56
87
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
88
|
+
}
|
|
89
|
+
function l(e) {
|
|
90
|
+
let t = [e];
|
|
91
|
+
for (let a = t, n = 0; ; )
|
|
92
|
+
switch (e.$) {
|
|
93
|
+
case "Nil":
|
|
94
|
+
return a[n] = e, t[0];
|
|
95
|
+
case "Con":
|
|
96
|
+
a = a[n] = { ...e, head: BigInt(e.head) }, n = "tail", e = e[n];
|
|
97
|
+
continue;
|
|
98
|
+
default:
|
|
99
|
+
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)";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function C(e) {
|
|
103
|
+
let t = [e];
|
|
104
|
+
for (let a = t, n = 0; ; )
|
|
105
|
+
switch (e.$) {
|
|
106
|
+
case "state-plans.Grant":
|
|
107
|
+
return a = a[n] = { ...e, key: p(e.key) }, t[0];
|
|
108
|
+
default:
|
|
109
|
+
throw "bend: state-plans.Grant has no tag " + e?.$ + " (its tags: state-plans.Grant); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function q(e) {
|
|
113
|
+
let t = [e];
|
|
114
|
+
for (let a = t, n = 0; ; )
|
|
115
|
+
switch (e.$) {
|
|
116
|
+
case "state-plans.Grant":
|
|
117
|
+
return a = a[n] = { ...e, key: l(e.key) }, t[0];
|
|
118
|
+
default:
|
|
119
|
+
throw "bend: state-plans.Grant has no tag " + e?.$ + " (its tags: state-plans.Grant); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function L(e) {
|
|
123
|
+
let t = [e];
|
|
124
|
+
for (let a = t, n = 0; ; )
|
|
125
|
+
switch (e.$) {
|
|
126
|
+
case "state-plans.Denied":
|
|
127
|
+
return a[n] = e, t[0];
|
|
128
|
+
case "state-plans.Read":
|
|
129
|
+
return a = a[n] = { ...e, key: l(e.key) }, t[0];
|
|
130
|
+
case "state-plans.Write":
|
|
131
|
+
return a = a[n] = { ...e, key: l(e.key), expected: l(e.expected), value: l(e.value) }, t[0];
|
|
132
|
+
default:
|
|
133
|
+
throw "bend: state-plans.Plan has no tag " + e?.$ + " (its tags: state-plans.Denied, state-plans.Read, state-plans.Write); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
64
134
|
}
|
|
65
|
-
}
|
|
66
135
|
}
|
|
67
136
|
function m(e) {
|
|
68
|
-
|
|
137
|
+
let t = [e];
|
|
138
|
+
for (let a = t, n = 0; ; )
|
|
139
|
+
switch (e.$) {
|
|
140
|
+
case "provider-plans.Ticket":
|
|
141
|
+
return a = a[n] = { ...e, grant: C(e.grant), expected: p(e.expected), payload: p(e.payload) }, t[0];
|
|
142
|
+
default:
|
|
143
|
+
throw "bend: provider-plans.Ticket has no tag " + e?.$ + " (its tags: provider-plans.Ticket); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
144
|
+
}
|
|
69
145
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
146
|
+
function $(e) {
|
|
147
|
+
let t = [e];
|
|
148
|
+
for (let a = t, n = 0; ; )
|
|
149
|
+
switch (e.$) {
|
|
150
|
+
case "provider-plans.Ticket":
|
|
151
|
+
return a = a[n] = { ...e, grant: q(e.grant), expected: l(e.expected), payload: l(e.payload) }, t[0];
|
|
152
|
+
default:
|
|
153
|
+
throw "bend: provider-plans.Ticket has no tag " + e?.$ + " (its tags: provider-plans.Ticket); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
154
|
+
}
|
|
72
155
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
156
|
+
function P(e) {
|
|
157
|
+
let t = [e];
|
|
158
|
+
for (let a = t, n = 0; ; )
|
|
159
|
+
switch (e.$) {
|
|
160
|
+
case "provider-plans.Outcome":
|
|
161
|
+
return a = a[n] = { ...e, next: $(e.next), plan: L(e.plan) }, t[0];
|
|
162
|
+
default:
|
|
163
|
+
throw "bend: provider-plans.Outcome has no tag " + e?.$ + " (its tags: provider-plans.Outcome); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
|
|
164
|
+
}
|
|
75
165
|
}
|
|
76
|
-
var
|
|
166
|
+
var u = /* @__PURE__ */ new Map([["Unknown", "resources.Unknown"], ["Exact", "resources.Exact"], ["Quiet", "resources.Quiet"], ["Denied", "state-plans.Denied"], ["Read", "state-plans.Read"], ["Write", "state-plans.Write"], ["Grant", "state-plans.Grant"], ["Outcome", "provider-plans.Outcome"], ["Ticket", "provider-plans.Ticket"], ["Effect", "resources.Effect"]]), y = /* @__PURE__ */ new Map([["resources.Unknown", "Unknown"], ["resources.Exact", "Exact"], ["resources.Quiet", "Quiet"], ["state-plans.Denied", "Denied"], ["state-plans.Read", "Read"], ["state-plans.Write", "Write"], ["state-plans.Grant", "Grant"], ["provider-plans.Outcome", "Outcome"], ["provider-plans.Ticket", "Ticket"], ["resources.Effect", "Effect"]]);
|
|
167
|
+
function c(e, t) {
|
|
168
|
+
let a = [e];
|
|
169
|
+
for (let n = [[a, 0]]; n.length > 0; ) {
|
|
170
|
+
let [r, s] = n.pop(), i = r[s];
|
|
171
|
+
if (i === null || typeof i != "object") continue;
|
|
172
|
+
let o = Array.isArray(i) ? [...i] : { ...i };
|
|
173
|
+
typeof o.$ == "string" && (o.$ = t.get(o.$) ?? o.$), r[s] = o;
|
|
174
|
+
for (let h of Object.keys(o)) n.push([o, h]);
|
|
175
|
+
}
|
|
176
|
+
return a[0];
|
|
177
|
+
}
|
|
178
|
+
var U = /* @__PURE__ */ f((e, t, a, n) => {
|
|
179
|
+
let r = P(g(R(m(e), p(t), p(a), n)));
|
|
180
|
+
return $(e), l(t), l(a), r;
|
|
181
|
+
}, 4), j = (e, t, a, n) => c(U(c(e, u), c(t, u), c(a, u), c(n, u)), y), B = /* @__PURE__ */ f((e) => {
|
|
182
|
+
let t = $(g(W(m(e))));
|
|
183
|
+
return $(e), t;
|
|
184
|
+
}, 1), M = (e) => c(B(c(e, u)), y);
|
|
77
185
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
186
|
+
M as providerRevoke,
|
|
187
|
+
j as providerTake
|
|
80
188
|
};
|
|
@@ -1,98 +1,267 @@
|
|
|
1
|
-
// Generated by Bend 2.0.
|
|
1
|
+
// Generated by Bend 2.0.32; do not edit. See LAWS.bend and PROOF.bend.
|
|
2
2
|
// Includes adapted Bend runtime/Base code, Copyright 2026 HigherOrderCO, Apache-2.0.
|
|
3
|
-
//
|
|
4
|
-
function
|
|
5
|
-
return { $:
|
|
3
|
+
// ABI exports selected and tags adapted by Pi Fabric; see THIRD_PARTY_NOTICES.md.
|
|
4
|
+
function d(e, t) {
|
|
5
|
+
return { $: e < t ? "LT" : e === t ? "EQ" : "GT" };
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
7
|
+
function y(e) {
|
|
8
|
+
if (e > 281474976710655)
|
|
9
9
|
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
10
|
-
return
|
|
10
|
+
return e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (; n !== null && typeof n == "object" && n.$ === "$JMP"; )
|
|
17
|
-
n = n.f(...n.x);
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
function p(n, t) {
|
|
21
|
-
return (...e) => e.length < t ? p((...r) => n(...e, ...r), t - e.length) : $(n(...e));
|
|
12
|
+
function c(e) {
|
|
13
|
+
return (typeof e == "bigint" || Number.isInteger(e)) && e >= 0 && e <= 2 ** 53 ? Number(e) : { [Symbol.toPrimitive]() {
|
|
14
|
+
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
15
|
+
} };
|
|
22
16
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
17
|
+
function D(e) {
|
|
18
|
+
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
19
|
+
e = e.f(...e.x);
|
|
20
|
+
return e;
|
|
25
21
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
return u(T, [$(b(r, l)), e, i, o, l, m]);
|
|
22
|
+
function m(e, t) {
|
|
23
|
+
return (...a) => a.length < t ? m((...s) => e(...a, ...s), t - a.length) : e(...a);
|
|
29
24
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
25
|
+
function C(e, t) {
|
|
26
|
+
let a = e.high, s = e.low, n = t.high, r = t.low;
|
|
27
|
+
return u(p(a, n), p(s, r));
|
|
32
28
|
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
29
|
+
function E(e, t) {
|
|
30
|
+
if (e.$ === "storage-plans.Any")
|
|
35
31
|
return !0;
|
|
36
32
|
{
|
|
37
|
-
let
|
|
38
|
-
return
|
|
33
|
+
let a = e.version;
|
|
34
|
+
return C(a, t);
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
37
|
+
function k(e) {
|
|
38
|
+
let t = e.high, a = e.low, s = t < 2097151, n = a < 4294967295;
|
|
39
|
+
return u(u(R(t, 2097151), R(a, 4294967295)), s || n);
|
|
40
|
+
}
|
|
41
|
+
function q(e, t, a) {
|
|
42
|
+
return e ? { $: "storage-plans.Revision", high: y(t + 1), low: 0 } : { $: "storage-plans.Revision", high: t, low: y(a + 1) };
|
|
48
43
|
}
|
|
49
|
-
function
|
|
50
|
-
let
|
|
51
|
-
return
|
|
44
|
+
function h(e) {
|
|
45
|
+
let t = e.high, a = e.low;
|
|
46
|
+
return q(p(a, 4294967295), t, a);
|
|
52
47
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
function x(e, t, a) {
|
|
49
|
+
return e ? t : a;
|
|
50
|
+
}
|
|
51
|
+
function b(e, t) {
|
|
52
|
+
return u(k(e), k(t));
|
|
53
|
+
}
|
|
54
|
+
function N(e, t, a, s, n) {
|
|
55
|
+
if (e)
|
|
56
|
+
if (a.$ === "storage-plans.Put") {
|
|
57
|
+
let r = a.value, o = a.identity;
|
|
58
|
+
return { $: "storage-plans.PutNext", key: t, value: r, identity: o, version: h(s), highWater: h(n) };
|
|
58
59
|
} else
|
|
59
|
-
return { $: "DeleteNext", key: t, version:
|
|
60
|
+
return { $: "storage-plans.DeleteNext", key: t, version: h(s), highWater: h(n) };
|
|
60
61
|
else
|
|
61
|
-
return { $: "Exhausted" };
|
|
62
|
+
return { $: "storage-plans.Exhausted" };
|
|
63
|
+
}
|
|
64
|
+
function S(e, t, a, s, n) {
|
|
65
|
+
if (t.$ === "storage-plans.Delete")
|
|
66
|
+
return a ? N(b(s, n), e, { $: "storage-plans.Delete" }, s, n) : { $: "storage-plans.Unchanged" };
|
|
67
|
+
{
|
|
68
|
+
let r = t.value, o = t.identity;
|
|
69
|
+
return N(b(x(a, s, n), n), e, { $: "storage-plans.Put", value: r, identity: o }, x(a, s, n), n);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function T(e, t, a, s, n, r) {
|
|
73
|
+
return e ? S(t, a, s, n, r) : { $: "storage-plans.Conflict" };
|
|
62
74
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
75
|
+
function U(e, t) {
|
|
76
|
+
let a = e.key, s = e.expected, n = e.change, r = t.present, o = t.version, l = t.highWater;
|
|
77
|
+
return T(E(s, o), a, n, r, o, l);
|
|
65
78
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
79
|
+
function W(e, t) {
|
|
80
|
+
return U(e, t);
|
|
68
81
|
}
|
|
69
|
-
function
|
|
70
|
-
return
|
|
82
|
+
function u(e, t) {
|
|
83
|
+
return e ? t : !1;
|
|
71
84
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
85
|
+
function p(e, t) {
|
|
86
|
+
return L(d(e, t));
|
|
74
87
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
-
return u(E, [$(f(e, BigInt(4294967295))), t, e]);
|
|
88
|
+
function R(e, t) {
|
|
89
|
+
return B(d(e, t));
|
|
78
90
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
return u(a, [$(a($(x(t, BigInt(2097151))), $(x(e, BigInt(4294967295))))), o || l]);
|
|
91
|
+
function L(e) {
|
|
92
|
+
return e.$ === "LT" ? !1 : e.$ === "EQ";
|
|
82
93
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
94
|
+
function B(e) {
|
|
95
|
+
return e.$ === "LT" ? !0 : e.$ === "EQ";
|
|
85
96
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
97
|
+
function $(e) {
|
|
98
|
+
let t = [e];
|
|
99
|
+
for (let a = t, s = 0; ; )
|
|
100
|
+
switch (e.$) {
|
|
101
|
+
case "storage-plans.Revision":
|
|
102
|
+
return a = a[s] = { ...e, high: c(e.high), low: c(e.low) }, t[0];
|
|
103
|
+
default:
|
|
104
|
+
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)";
|
|
105
|
+
}
|
|
88
106
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
107
|
+
function i(e) {
|
|
108
|
+
let t = [e];
|
|
109
|
+
for (let a = t, s = 0; ; )
|
|
110
|
+
switch (e.$) {
|
|
111
|
+
case "storage-plans.Revision":
|
|
112
|
+
return a = a[s] = { ...e, high: BigInt(e.high), low: BigInt(e.low) }, t[0];
|
|
113
|
+
default:
|
|
114
|
+
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)";
|
|
115
|
+
}
|
|
91
116
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
117
|
+
function I(e) {
|
|
118
|
+
let t = [e];
|
|
119
|
+
for (let a = t, s = 0; ; )
|
|
120
|
+
switch (e.$) {
|
|
121
|
+
case "storage-plans.Any":
|
|
122
|
+
return a[s] = e, t[0];
|
|
123
|
+
case "storage-plans.At":
|
|
124
|
+
return a = a[s] = { ...e, version: $(e.version) }, t[0];
|
|
125
|
+
default:
|
|
126
|
+
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)";
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function j(e) {
|
|
130
|
+
let t = [e];
|
|
131
|
+
for (let a = t, s = 0; ; )
|
|
132
|
+
switch (e.$) {
|
|
133
|
+
case "storage-plans.Any":
|
|
134
|
+
return a[s] = e, t[0];
|
|
135
|
+
case "storage-plans.At":
|
|
136
|
+
return a = a[s] = { ...e, version: i(e.version) }, t[0];
|
|
137
|
+
default:
|
|
138
|
+
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)";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function f(e) {
|
|
142
|
+
let t = [e];
|
|
143
|
+
for (let a = t, s = 0; ; )
|
|
144
|
+
switch (e.$) {
|
|
145
|
+
case "Nil":
|
|
146
|
+
return a[s] = e, t[0];
|
|
147
|
+
case "Con":
|
|
148
|
+
a = a[s] = { ...e, head: c(e.head) }, s = "tail", e = e[s];
|
|
149
|
+
continue;
|
|
150
|
+
default:
|
|
151
|
+
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)";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function M(e) {
|
|
155
|
+
let t = [e];
|
|
156
|
+
for (let a = t, s = 0; ; )
|
|
157
|
+
switch (e.$) {
|
|
158
|
+
case "storage-plans.Put":
|
|
159
|
+
return a = a[s] = { ...e, value: f(e.value), identity: f(e.identity) }, t[0];
|
|
160
|
+
case "storage-plans.Delete":
|
|
161
|
+
return a[s] = e, t[0];
|
|
162
|
+
default:
|
|
163
|
+
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)";
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function g(e) {
|
|
167
|
+
let t = [e];
|
|
168
|
+
for (let a = t, s = 0; ; )
|
|
169
|
+
switch (e.$) {
|
|
170
|
+
case "Nil":
|
|
171
|
+
return a[s] = e, t[0];
|
|
172
|
+
case "Con":
|
|
173
|
+
a = a[s] = { ...e, head: BigInt(e.head) }, s = "tail", e = e[s];
|
|
174
|
+
continue;
|
|
175
|
+
default:
|
|
176
|
+
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)";
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function Q(e) {
|
|
180
|
+
let t = [e];
|
|
181
|
+
for (let a = t, s = 0; ; )
|
|
182
|
+
switch (e.$) {
|
|
183
|
+
case "storage-plans.Put":
|
|
184
|
+
return a = a[s] = { ...e, value: g(e.value), identity: g(e.identity) }, t[0];
|
|
185
|
+
case "storage-plans.Delete":
|
|
186
|
+
return a[s] = e, t[0];
|
|
187
|
+
default:
|
|
188
|
+
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)";
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function G(e) {
|
|
192
|
+
let t = [e];
|
|
193
|
+
for (let a = t, s = 0; ; )
|
|
194
|
+
switch (e.$) {
|
|
195
|
+
case "storage-plans.Conflict":
|
|
196
|
+
return a[s] = e, t[0];
|
|
197
|
+
case "storage-plans.Exhausted":
|
|
198
|
+
return a[s] = e, t[0];
|
|
199
|
+
case "storage-plans.Unchanged":
|
|
200
|
+
return a[s] = e, t[0];
|
|
201
|
+
case "storage-plans.PutNext":
|
|
202
|
+
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];
|
|
203
|
+
case "storage-plans.DeleteNext":
|
|
204
|
+
return a = a[s] = { ...e, key: g(e.key), version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
205
|
+
default:
|
|
206
|
+
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)";
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function J(e) {
|
|
210
|
+
let t = [e];
|
|
211
|
+
for (let a = t, s = 0; ; )
|
|
212
|
+
switch (e.$) {
|
|
213
|
+
case "storage-plans.Request":
|
|
214
|
+
return a = a[s] = { ...e, key: f(e.key), expected: I(e.expected), change: M(e.change) }, t[0];
|
|
215
|
+
default:
|
|
216
|
+
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)";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function O(e) {
|
|
220
|
+
let t = [e];
|
|
221
|
+
for (let a = t, s = 0; ; )
|
|
222
|
+
switch (e.$) {
|
|
223
|
+
case "storage-plans.Slot":
|
|
224
|
+
return a = a[s] = { ...e, version: $(e.version), highWater: $(e.highWater) }, t[0];
|
|
225
|
+
default:
|
|
226
|
+
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)";
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function z(e) {
|
|
230
|
+
let t = [e];
|
|
231
|
+
for (let a = t, s = 0; ; )
|
|
232
|
+
switch (e.$) {
|
|
233
|
+
case "storage-plans.Request":
|
|
234
|
+
return a = a[s] = { ...e, key: g(e.key), expected: j(e.expected), change: Q(e.change) }, t[0];
|
|
235
|
+
default:
|
|
236
|
+
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)";
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function F(e) {
|
|
240
|
+
let t = [e];
|
|
241
|
+
for (let a = t, s = 0; ; )
|
|
242
|
+
switch (e.$) {
|
|
243
|
+
case "storage-plans.Slot":
|
|
244
|
+
return a = a[s] = { ...e, version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
245
|
+
default:
|
|
246
|
+
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)";
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
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"]]), 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"]]);
|
|
250
|
+
function w(e, t) {
|
|
251
|
+
let a = [e];
|
|
252
|
+
for (let s = [[a, 0]]; s.length > 0; ) {
|
|
253
|
+
let [n, r] = s.pop(), o = n[r];
|
|
254
|
+
if (o === null || typeof o != "object") continue;
|
|
255
|
+
let l = Array.isArray(o) ? [...o] : { ...o };
|
|
256
|
+
typeof l.$ == "string" && (l.$ = t.get(l.$) ?? l.$), n[r] = l;
|
|
257
|
+
for (let A of Object.keys(l)) s.push([l, A]);
|
|
258
|
+
}
|
|
259
|
+
return a[0];
|
|
94
260
|
}
|
|
95
|
-
var
|
|
261
|
+
var K = /* @__PURE__ */ m((e, t) => {
|
|
262
|
+
let a = G(D(W(J(e), O(t))));
|
|
263
|
+
return z(e), F(t), a;
|
|
264
|
+
}, 2), V = (e, t) => w(K(w(e, P), w(t, P)), H);
|
|
96
265
|
export {
|
|
97
|
-
|
|
266
|
+
V as storageTransition
|
|
98
267
|
};
|
|
@@ -5,7 +5,7 @@ export declare class PiModelControl {
|
|
|
5
5
|
private readonly requested;
|
|
6
6
|
private readonly thinking;
|
|
7
7
|
private readonly io;
|
|
8
|
-
constructor(runId: string, requested: string | undefined, thinking: string | undefined, io: PiModelControl["io"]);
|
|
8
|
+
constructor(runId: string, requested: string | undefined, thinking: string | undefined, io: PiModelControl["io"], admission?: "strict" | "permissive");
|
|
9
9
|
start(): void;
|
|
10
10
|
fail(reason: string): void;
|
|
11
11
|
observe(event: Record<string, unknown>): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-control.d.ts","sourceRoot":"","sources":["../../src/worker/model-control.ts"],"names":[],"mappings":"AAoBA,qBAAa,cAAc;;
|
|
1
|
+
{"version":3,"file":"model-control.d.ts","sourceRoot":"","sources":["../../src/worker/model-control.ts"],"names":[],"mappings":"AAoBA,qBAAa,cAAc;;IAOzB,KAAK,UAAS;IAEd,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,EAAE,CAKjB;gBAGA,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,EACxB,SAAS,GAAE,QAAQ,GAAG,YAAuB;IAW/C,KAAK,IAAI,IAAI;IAsCb,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAO1B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAiDhD,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAezD"}
|
|
@@ -11,16 +11,18 @@ var PiModelControl = class {
|
|
|
11
11
|
#pending;
|
|
12
12
|
#sequence = 0;
|
|
13
13
|
#failed = false;
|
|
14
|
+
#admission;
|
|
14
15
|
ready = false;
|
|
15
16
|
runId;
|
|
16
17
|
requested;
|
|
17
18
|
thinking;
|
|
18
19
|
io;
|
|
19
|
-
constructor(runId, requested, thinking, io) {
|
|
20
|
+
constructor(runId, requested, thinking, io, admission = "strict") {
|
|
20
21
|
this.runId = runId;
|
|
21
22
|
this.requested = requested;
|
|
22
23
|
this.thinking = thinking;
|
|
23
24
|
this.io = io;
|
|
25
|
+
this.#admission = admission;
|
|
24
26
|
}
|
|
25
27
|
start() {
|
|
26
28
|
if (!this.requested) {
|
|
@@ -86,7 +88,8 @@ var PiModelControl = class {
|
|
|
86
88
|
const state = object(event.data);
|
|
87
89
|
const actual = identity(state?.model);
|
|
88
90
|
if (actual) this.io.observed(key(actual));
|
|
89
|
-
|
|
91
|
+
const mismatch = !actual || key(actual) !== key(this.#expected);
|
|
92
|
+
if (mismatch && !(this.#admission === "permissive" && actual)) {
|
|
90
93
|
this.fail(`requested ${key(this.#expected)}, but child reports ${actual ? key(actual) : "no model"} after set_model; task was not sent`);
|
|
91
94
|
} else if (state?.isStreaming === true || state?.isCompacting === true) {
|
|
92
95
|
this.fail("child started work before model admission; task was not sent");
|
|
@@ -106,7 +109,7 @@ var PiModelControl = class {
|
|
|
106
109
|
if (this.#failed) return;
|
|
107
110
|
if (this.requested && !this.ready) {
|
|
108
111
|
this.fail("child emitted an assistant message before model admission");
|
|
109
|
-
} else if (this.#expected && (!actual || key(actual) !== key(this.#expected))) {
|
|
112
|
+
} else if (this.#admission === "strict" && this.#expected && (!actual || key(actual) !== key(this.#expected))) {
|
|
110
113
|
this.fail(`requested ${key(this.#expected)}, but assistant reports ${actual ? key(actual) : "missing model attribution"}; terminating child`);
|
|
111
114
|
}
|
|
112
115
|
}
|