@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
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
DEFAULT_FABRIC_CONFIG,
|
|
33
33
|
MAX_AGENT_TIMEOUT_MS,
|
|
34
34
|
MIN_AGENT_TIMEOUT_MS
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-3RFEMOJA.js";
|
|
36
36
|
import {
|
|
37
37
|
compileFabricSummary,
|
|
38
38
|
rawContextTokens
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-YIEK7FH2.js";
|
|
40
40
|
import {
|
|
41
41
|
writeFileAtomic,
|
|
42
42
|
writeJsonAtomic
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
compactionRequestBoundsError,
|
|
67
67
|
encodeCompactionRequest
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-ASU53MOT.js";
|
|
69
69
|
|
|
70
70
|
// src/core/model-usage.ts
|
|
71
71
|
import { readFileSync } from "node:fs";
|
|
@@ -94,98 +94,269 @@ import fs from "node:fs";
|
|
|
94
94
|
import path2 from "node:path";
|
|
95
95
|
|
|
96
96
|
// src/verified/generated/storage-kernel.js
|
|
97
|
-
function
|
|
98
|
-
return { $:
|
|
97
|
+
function d(e, t) {
|
|
98
|
+
return { $: e < t ? "LT" : e === t ? "EQ" : "GT" };
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
if (
|
|
100
|
+
function y(e) {
|
|
101
|
+
if (e > 281474976710655)
|
|
102
102
|
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
103
|
-
return
|
|
103
|
+
return e;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
for (; n !== null && typeof n == "object" && n.$ === "$JMP"; )
|
|
110
|
-
n = n.f(...n.x);
|
|
111
|
-
return n;
|
|
112
|
-
}
|
|
113
|
-
function p(n, t) {
|
|
114
|
-
return (...e) => e.length < t ? p((...r) => n(...e, ...r), t - e.length) : $(n(...e));
|
|
105
|
+
function c(e) {
|
|
106
|
+
return (typeof e == "bigint" || Number.isInteger(e)) && e >= 0 && e <= 2 ** 53 ? Number(e) : { [Symbol.toPrimitive]() {
|
|
107
|
+
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
108
|
+
} };
|
|
115
109
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
110
|
+
function D(e) {
|
|
111
|
+
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
112
|
+
e = e.f(...e.x);
|
|
113
|
+
return e;
|
|
118
114
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
return u(T, [$(b(r, l)), e, i, o, l, m]);
|
|
115
|
+
function m(e, t) {
|
|
116
|
+
return (...a) => a.length < t ? m((...s) => e(...a, ...s), t - a.length) : e(...a);
|
|
122
117
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
118
|
+
function C(e, t) {
|
|
119
|
+
let a = e.high, s = e.low, n = t.high, r = t.low;
|
|
120
|
+
return u(p(a, n), p(s, r));
|
|
125
121
|
}
|
|
126
|
-
function
|
|
127
|
-
if (
|
|
122
|
+
function E(e, t) {
|
|
123
|
+
if (e.$ === "storage-plans.Any")
|
|
128
124
|
return true;
|
|
129
125
|
{
|
|
130
|
-
let
|
|
131
|
-
return
|
|
126
|
+
let a = e.version;
|
|
127
|
+
return C(a, t);
|
|
132
128
|
}
|
|
133
129
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{
|
|
138
|
-
let o = t.value, l = t.identity;
|
|
139
|
-
return u(h, [$(d($(w(e, r, i)), i)), n, { $: "Put", value: o, identity: l }, $(w(e, r, i)), i]);
|
|
140
|
-
}
|
|
130
|
+
function k(e) {
|
|
131
|
+
let t = e.high, a = e.low, s = t < 2097151, n = a < 4294967295;
|
|
132
|
+
return u(u(R(t, 2097151), R(a, 4294967295)), s || n);
|
|
141
133
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
return u(a, [$(f(e, i)), $(f(r, o))]);
|
|
134
|
+
function q(e, t, a) {
|
|
135
|
+
return e ? { $: "storage-plans.Revision", high: y(t + 1), low: 0 } : { $: "storage-plans.Revision", high: t, low: y(a + 1) };
|
|
145
136
|
}
|
|
146
|
-
function h(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
function h(e) {
|
|
138
|
+
let t = e.high, a = e.low;
|
|
139
|
+
return q(p(a, 4294967295), t, a);
|
|
140
|
+
}
|
|
141
|
+
function x(e, t, a) {
|
|
142
|
+
return e ? t : a;
|
|
143
|
+
}
|
|
144
|
+
function b(e, t) {
|
|
145
|
+
return u(k(e), k(t));
|
|
146
|
+
}
|
|
147
|
+
function N(e, t, a, s, n) {
|
|
148
|
+
if (e)
|
|
149
|
+
if (a.$ === "storage-plans.Put") {
|
|
150
|
+
let r = a.value, o = a.identity;
|
|
151
|
+
return { $: "storage-plans.PutNext", key: t, value: r, identity: o, version: h(s), highWater: h(n) };
|
|
151
152
|
} else
|
|
152
|
-
return { $: "DeleteNext", key: t, version:
|
|
153
|
+
return { $: "storage-plans.DeleteNext", key: t, version: h(s), highWater: h(n) };
|
|
153
154
|
else
|
|
154
|
-
return { $: "Exhausted" };
|
|
155
|
+
return { $: "storage-plans.Exhausted" };
|
|
156
|
+
}
|
|
157
|
+
function S(e, t, a, s, n) {
|
|
158
|
+
if (t.$ === "storage-plans.Delete")
|
|
159
|
+
return a ? N(b(s, n), e, { $: "storage-plans.Delete" }, s, n) : { $: "storage-plans.Unchanged" };
|
|
160
|
+
{
|
|
161
|
+
let r = t.value, o = t.identity;
|
|
162
|
+
return N(b(x(a, s, n), n), e, { $: "storage-plans.Put", value: r, identity: o }, x(a, s, n), n);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function T(e, t, a, s, n, r) {
|
|
166
|
+
return e ? S(t, a, s, n, r) : { $: "storage-plans.Conflict" };
|
|
167
|
+
}
|
|
168
|
+
function U(e, t) {
|
|
169
|
+
let a = e.key, s = e.expected, n = e.change, r = t.present, o = t.version, l = t.highWater;
|
|
170
|
+
return T(E(s, o), a, n, r, o, l);
|
|
171
|
+
}
|
|
172
|
+
function W(e, t) {
|
|
173
|
+
return U(e, t);
|
|
174
|
+
}
|
|
175
|
+
function u(e, t) {
|
|
176
|
+
return e ? t : false;
|
|
177
|
+
}
|
|
178
|
+
function p(e, t) {
|
|
179
|
+
return L(d(e, t));
|
|
180
|
+
}
|
|
181
|
+
function R(e, t) {
|
|
182
|
+
return B(d(e, t));
|
|
183
|
+
}
|
|
184
|
+
function L(e) {
|
|
185
|
+
return e.$ === "LT" ? false : e.$ === "EQ";
|
|
186
|
+
}
|
|
187
|
+
function B(e) {
|
|
188
|
+
return e.$ === "LT" ? true : e.$ === "EQ";
|
|
189
|
+
}
|
|
190
|
+
function $(e) {
|
|
191
|
+
let t = [e];
|
|
192
|
+
for (let a = t, s = 0; ; )
|
|
193
|
+
switch (e.$) {
|
|
194
|
+
case "storage-plans.Revision":
|
|
195
|
+
return a = a[s] = { ...e, high: c(e.high), low: c(e.low) }, t[0];
|
|
196
|
+
default:
|
|
197
|
+
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)";
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function i(e) {
|
|
201
|
+
let t = [e];
|
|
202
|
+
for (let a = t, s = 0; ; )
|
|
203
|
+
switch (e.$) {
|
|
204
|
+
case "storage-plans.Revision":
|
|
205
|
+
return a = a[s] = { ...e, high: BigInt(e.high), low: BigInt(e.low) }, t[0];
|
|
206
|
+
default:
|
|
207
|
+
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)";
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function I(e) {
|
|
211
|
+
let t = [e];
|
|
212
|
+
for (let a = t, s = 0; ; )
|
|
213
|
+
switch (e.$) {
|
|
214
|
+
case "storage-plans.Any":
|
|
215
|
+
return a[s] = e, t[0];
|
|
216
|
+
case "storage-plans.At":
|
|
217
|
+
return a = a[s] = { ...e, version: $(e.version) }, t[0];
|
|
218
|
+
default:
|
|
219
|
+
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)";
|
|
220
|
+
}
|
|
155
221
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
222
|
+
function j(e) {
|
|
223
|
+
let t = [e];
|
|
224
|
+
for (let a = t, s = 0; ; )
|
|
225
|
+
switch (e.$) {
|
|
226
|
+
case "storage-plans.Any":
|
|
227
|
+
return a[s] = e, t[0];
|
|
228
|
+
case "storage-plans.At":
|
|
229
|
+
return a = a[s] = { ...e, version: i(e.version) }, t[0];
|
|
230
|
+
default:
|
|
231
|
+
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)";
|
|
232
|
+
}
|
|
158
233
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
234
|
+
function f(e) {
|
|
235
|
+
let t = [e];
|
|
236
|
+
for (let a = t, s = 0; ; )
|
|
237
|
+
switch (e.$) {
|
|
238
|
+
case "Nil":
|
|
239
|
+
return a[s] = e, t[0];
|
|
240
|
+
case "Con":
|
|
241
|
+
a = a[s] = { ...e, head: c(e.head) }, s = "tail", e = e[s];
|
|
242
|
+
continue;
|
|
243
|
+
default:
|
|
244
|
+
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)";
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function M(e) {
|
|
248
|
+
let t = [e];
|
|
249
|
+
for (let a = t, s = 0; ; )
|
|
250
|
+
switch (e.$) {
|
|
251
|
+
case "storage-plans.Put":
|
|
252
|
+
return a = a[s] = { ...e, value: f(e.value), identity: f(e.identity) }, t[0];
|
|
253
|
+
case "storage-plans.Delete":
|
|
254
|
+
return a[s] = e, t[0];
|
|
255
|
+
default:
|
|
256
|
+
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)";
|
|
257
|
+
}
|
|
161
258
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
259
|
+
function g(e) {
|
|
260
|
+
let t = [e];
|
|
261
|
+
for (let a = t, s = 0; ; )
|
|
262
|
+
switch (e.$) {
|
|
263
|
+
case "Nil":
|
|
264
|
+
return a[s] = e, t[0];
|
|
265
|
+
case "Con":
|
|
266
|
+
a = a[s] = { ...e, head: BigInt(e.head) }, s = "tail", e = e[s];
|
|
267
|
+
continue;
|
|
268
|
+
default:
|
|
269
|
+
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)";
|
|
270
|
+
}
|
|
164
271
|
}
|
|
165
|
-
function
|
|
166
|
-
|
|
272
|
+
function Q(e) {
|
|
273
|
+
let t = [e];
|
|
274
|
+
for (let a = t, s = 0; ; )
|
|
275
|
+
switch (e.$) {
|
|
276
|
+
case "storage-plans.Put":
|
|
277
|
+
return a = a[s] = { ...e, value: g(e.value), identity: g(e.identity) }, t[0];
|
|
278
|
+
case "storage-plans.Delete":
|
|
279
|
+
return a[s] = e, t[0];
|
|
280
|
+
default:
|
|
281
|
+
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)";
|
|
282
|
+
}
|
|
167
283
|
}
|
|
168
|
-
function
|
|
169
|
-
let t =
|
|
170
|
-
|
|
284
|
+
function G(e) {
|
|
285
|
+
let t = [e];
|
|
286
|
+
for (let a = t, s = 0; ; )
|
|
287
|
+
switch (e.$) {
|
|
288
|
+
case "storage-plans.Conflict":
|
|
289
|
+
return a[s] = e, t[0];
|
|
290
|
+
case "storage-plans.Exhausted":
|
|
291
|
+
return a[s] = e, t[0];
|
|
292
|
+
case "storage-plans.Unchanged":
|
|
293
|
+
return a[s] = e, t[0];
|
|
294
|
+
case "storage-plans.PutNext":
|
|
295
|
+
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];
|
|
296
|
+
case "storage-plans.DeleteNext":
|
|
297
|
+
return a = a[s] = { ...e, key: g(e.key), version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
298
|
+
default:
|
|
299
|
+
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)";
|
|
300
|
+
}
|
|
171
301
|
}
|
|
172
|
-
function
|
|
173
|
-
let t =
|
|
174
|
-
|
|
302
|
+
function J(e) {
|
|
303
|
+
let t = [e];
|
|
304
|
+
for (let a = t, s = 0; ; )
|
|
305
|
+
switch (e.$) {
|
|
306
|
+
case "storage-plans.Request":
|
|
307
|
+
return a = a[s] = { ...e, key: f(e.key), expected: I(e.expected), change: M(e.change) }, t[0];
|
|
308
|
+
default:
|
|
309
|
+
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)";
|
|
310
|
+
}
|
|
175
311
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
312
|
+
function O(e) {
|
|
313
|
+
let t = [e];
|
|
314
|
+
for (let a = t, s = 0; ; )
|
|
315
|
+
switch (e.$) {
|
|
316
|
+
case "storage-plans.Slot":
|
|
317
|
+
return a = a[s] = { ...e, version: $(e.version), highWater: $(e.highWater) }, t[0];
|
|
318
|
+
default:
|
|
319
|
+
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)";
|
|
320
|
+
}
|
|
178
321
|
}
|
|
179
|
-
function
|
|
180
|
-
|
|
322
|
+
function z(e) {
|
|
323
|
+
let t = [e];
|
|
324
|
+
for (let a = t, s = 0; ; )
|
|
325
|
+
switch (e.$) {
|
|
326
|
+
case "storage-plans.Request":
|
|
327
|
+
return a = a[s] = { ...e, key: g(e.key), expected: j(e.expected), change: Q(e.change) }, t[0];
|
|
328
|
+
default:
|
|
329
|
+
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)";
|
|
330
|
+
}
|
|
181
331
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
332
|
+
function F(e) {
|
|
333
|
+
let t = [e];
|
|
334
|
+
for (let a = t, s = 0; ; )
|
|
335
|
+
switch (e.$) {
|
|
336
|
+
case "storage-plans.Slot":
|
|
337
|
+
return a = a[s] = { ...e, version: i(e.version), highWater: i(e.highWater) }, t[0];
|
|
338
|
+
default:
|
|
339
|
+
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)";
|
|
340
|
+
}
|
|
184
341
|
}
|
|
185
|
-
|
|
186
|
-
|
|
342
|
+
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"]]);
|
|
343
|
+
var H = /* @__PURE__ */ new Map([["storage-plans.Any", "Any"], ["storage-plans.Revision", "Revision"], ["storage-plans.Exhausted", "Exhausted"], ["storage-plans.Put", "Put"], ["storage-plans.PutNext", "PutNext"], ["storage-plans.DeleteNext", "DeleteNext"], ["storage-plans.Delete", "Delete"], ["storage-plans.Unchanged", "Unchanged"], ["storage-plans.Conflict", "Conflict"], ["storage-plans.At", "At"], ["storage-plans.Request", "Request"], ["storage-plans.Slot", "Slot"]]);
|
|
344
|
+
function w(e, t) {
|
|
345
|
+
let a = [e];
|
|
346
|
+
for (let s = [[a, 0]]; s.length > 0; ) {
|
|
347
|
+
let [n, r] = s.pop(), o = n[r];
|
|
348
|
+
if (o === null || typeof o != "object") continue;
|
|
349
|
+
let l = Array.isArray(o) ? [...o] : { ...o };
|
|
350
|
+
typeof l.$ == "string" && (l.$ = t.get(l.$) ?? l.$), n[r] = l;
|
|
351
|
+
for (let A of Object.keys(l)) s.push([l, A]);
|
|
352
|
+
}
|
|
353
|
+
return a[0];
|
|
187
354
|
}
|
|
188
|
-
var
|
|
355
|
+
var K = /* @__PURE__ */ m((e, t) => {
|
|
356
|
+
let a = G(D(W(J(e), O(t))));
|
|
357
|
+
return z(e), F(t), a;
|
|
358
|
+
}, 2);
|
|
359
|
+
var V = (e, t) => w(K(w(e, P), w(t, P)), H);
|
|
189
360
|
|
|
190
361
|
// src/verified/storage.ts
|
|
191
362
|
var RADIX = 4294967296n;
|
|
@@ -243,7 +414,7 @@ var capture = (key, ifVersion, payload) => {
|
|
|
243
414
|
const actual = storageRevision(actualVersion);
|
|
244
415
|
const clock = storageRevision(highWater);
|
|
245
416
|
if (clock < actual) throw new Error("Inconsistent Fabric mesh high-water revision");
|
|
246
|
-
const plan =
|
|
417
|
+
const plan = V(
|
|
247
418
|
request,
|
|
248
419
|
{ $: "Slot", present, version: encodeRevision(actual), highWater: encodeRevision(clock) }
|
|
249
420
|
);
|
|
@@ -2617,6 +2788,9 @@ var AgentManager = class {
|
|
|
2617
2788
|
if (request.persona && runner !== "veda") {
|
|
2618
2789
|
throw new Error(`The persona option is only supported by the Veda runner, not ${runner}`);
|
|
2619
2790
|
}
|
|
2791
|
+
if (request.persistSession === true && runner !== "claude") {
|
|
2792
|
+
throw new Error("persistSession is only supported by the Claude runner");
|
|
2793
|
+
}
|
|
2620
2794
|
if (runner === "claude" && request.recursive) {
|
|
2621
2795
|
throw new Error(
|
|
2622
2796
|
"Claude runner does not support recursive Fabric. Use a Pi runner for recursive: true, or omit recursive for Claude Code tools."
|
|
@@ -2775,6 +2949,10 @@ var AgentManager = class {
|
|
|
2775
2949
|
...model ? ["--model", model] : [],
|
|
2776
2950
|
...thinking ? ["--thinking", thinking] : [],
|
|
2777
2951
|
...systemPrompt ? ["--system-prompt", systemPrompt] : [],
|
|
2952
|
+
"--persist-session",
|
|
2953
|
+
String(request.persistSession === true),
|
|
2954
|
+
"--model-admission",
|
|
2955
|
+
this.config.modelAdmission ?? "strict",
|
|
2778
2956
|
...sessionFile ? ["--session-file", sessionFile] : [],
|
|
2779
2957
|
...sessionExportFile ? ["--session-export-file", sessionExportFile] : [],
|
|
2780
2958
|
...inheritedSessionPins && inheritedSessionPins.length > 0 ? ["--inherited-session-pins", serializeInheritedSessionPins(inheritedSessionPins)] : [],
|
|
@@ -6381,10 +6559,15 @@ var LifecycleBroker = class {
|
|
|
6381
6559
|
}
|
|
6382
6560
|
async #drain() {
|
|
6383
6561
|
const entries = this.mesh.listAll(FABRIC_LIFECYCLE_SUBSCRIPTION_PREFIX);
|
|
6562
|
+
if (entries.length === 0) return;
|
|
6563
|
+
let directory;
|
|
6384
6564
|
for (const entry of entries) {
|
|
6385
6565
|
const subscription = lifecycleSubscriptionFromValue(entry.value);
|
|
6386
6566
|
if (!subscription || entry.key !== subscriptionKey(subscription.id)) continue;
|
|
6387
|
-
|
|
6567
|
+
directory ??= new Map(
|
|
6568
|
+
this.participants.list({ scope: "project" }).map((record) => [record.id, record])
|
|
6569
|
+
);
|
|
6570
|
+
const target = directory.get(subscription.to) ?? this.participants.get(subscription.to);
|
|
6388
6571
|
if (!target || target.stale || !target.local) continue;
|
|
6389
6572
|
await this.#drainSubscription(entry, subscription);
|
|
6390
6573
|
}
|
|
@@ -7539,4 +7722,4 @@ export {
|
|
|
7539
7722
|
agentParticipantRecords,
|
|
7540
7723
|
actorParticipantRecord
|
|
7541
7724
|
};
|
|
7542
|
-
//# sourceMappingURL=chunk-
|
|
7725
|
+
//# sourceMappingURL=chunk-OEJ6RFDO.js.map
|