@e4779/pi-fabric 0.116.0-fork.26 → 0.117.2-fork.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -2
  2. package/dist/agents.js +3 -3
  3. package/dist/chunks/{chunk-HZGQ7XYM.js → chunk-3FJUP3GV.js} +2 -2
  4. package/dist/chunks/{chunk-U2UBUKNQ.js → chunk-3UGN25XS.js} +2 -2
  5. package/dist/chunks/{chunk-HITKWKYD.js → chunk-4EW7GVUR.js} +192 -326
  6. package/dist/chunks/chunk-4EW7GVUR.js.map +7 -0
  7. package/dist/chunks/{chunk-VR2LV4CA.js → chunk-53N2I4QA.js} +2 -2
  8. package/dist/chunks/{chunk-IQXNJNDI.js → chunk-5UBRGTVN.js} +8 -8
  9. package/dist/chunks/{chunk-4GNFBZPR.js → chunk-ASSLHWZS.js} +2 -2
  10. package/dist/chunks/{chunk-DLXPTBPL.js → chunk-AV36PBKH.js} +9 -1
  11. package/dist/chunks/chunk-AV36PBKH.js.map +7 -0
  12. package/dist/chunks/chunk-BN7F52EG.js +525 -0
  13. package/dist/chunks/chunk-BN7F52EG.js.map +7 -0
  14. package/dist/chunks/{chunk-QGP7AY2R.js → chunk-C7Z6F3SO.js} +2 -2
  15. package/dist/chunks/{chunk-56RFFBBO.js → chunk-CRRUW26I.js} +12 -12
  16. package/dist/chunks/{chunk-I2TK65VR.js → chunk-D5NYNIST.js} +5 -5
  17. package/dist/chunks/{chunk-KBYSGB7E.js → chunk-EFETPXU2.js} +69 -229
  18. package/dist/chunks/chunk-EFETPXU2.js.map +7 -0
  19. package/dist/chunks/{chunk-QQ7D6UAM.js → chunk-EHQQ4KCX.js} +2 -2
  20. package/dist/chunks/{chunk-7EYJE4TW.js → chunk-EKODKR6Y.js} +55 -6
  21. package/dist/chunks/chunk-EKODKR6Y.js.map +7 -0
  22. package/dist/chunks/{chunk-H3SGA7G7.js → chunk-FIDUHKMM.js} +5 -5
  23. package/dist/chunks/{chunk-4GGBND7V.js → chunk-FSYAGCGA.js} +2 -2
  24. package/dist/chunks/{chunk-ZPI4QTOX.js → chunk-FUY6XVRX.js} +2 -2
  25. package/dist/chunks/{chunk-A5XF3ZPJ.js → chunk-G4TLWHRS.js} +2 -2
  26. package/dist/chunks/{chunk-PTZ5DKAB.js → chunk-G54PEZ44.js} +4 -3
  27. package/dist/chunks/chunk-G54PEZ44.js.map +7 -0
  28. package/dist/chunks/{chunk-7C5IEIQK.js → chunk-GEQMQVNS.js} +2 -2
  29. package/dist/chunks/{chunk-DONS3EZH.js → chunk-GIK2WNAK.js} +2 -2
  30. package/dist/chunks/{chunk-MOJBW5X2.js → chunk-GO32KSEZ.js} +5 -3
  31. package/dist/chunks/chunk-GO32KSEZ.js.map +7 -0
  32. package/dist/chunks/{chunk-HQ5YW2OJ.js → chunk-HP5P7NBO.js} +2 -2
  33. package/dist/chunks/{chunk-R2MMPHR2.js → chunk-INRXG4J5.js} +2 -2
  34. package/dist/chunks/{chunk-BQWJ5ZR7.js → chunk-K7J2ABAZ.js} +3 -3
  35. package/dist/chunks/{chunk-OTHMEDN6.js → chunk-KVYNGDGC.js} +6 -6
  36. package/dist/chunks/{chunk-6EVAHJAR.js → chunk-LEU5CDSL.js} +3 -3
  37. package/dist/chunks/{chunk-HCNHKJDA.js → chunk-MLLYR3Y6.js} +2 -2
  38. package/dist/chunks/{chunk-D3W6CBJZ.js → chunk-MZUC6LLH.js} +4 -4
  39. package/dist/chunks/{chunk-D3IONBBJ.js → chunk-P7CBPPHY.js} +5 -5
  40. package/dist/chunks/{chunk-WQ6LC2KK.js → chunk-QT4W5YVB.js} +2 -2
  41. package/dist/chunks/{chunk-TNPZBMYC.js → chunk-ROTCDDOV.js} +4 -4
  42. package/dist/chunks/{chunk-PH4PT6R4.js → chunk-TIIIHPHF.js} +2 -2
  43. package/dist/chunks/{chunk-2YG4ZA2K.js → chunk-TIJ3YQXX.js} +2 -2
  44. package/dist/chunks/{chunk-QCCPR3U5.js → chunk-UOM37PE4.js} +4 -4
  45. package/dist/chunks/{chunk-EQYQICUY.js → chunk-UXIBKMUM.js} +3 -3
  46. package/dist/chunks/{chunk-V2IV4LYW.js → chunk-XWWV6TKV.js} +3 -3
  47. package/dist/chunks/{chunk-O7IREHJI.js → chunk-YKYWY722.js} +318 -39
  48. package/dist/chunks/chunk-YKYWY722.js.map +7 -0
  49. package/dist/chunks/{chunk-JV4JR6TT.js → chunk-ZEXCKK4K.js} +3 -3
  50. package/dist/chunks/{chunk-ODYU3IJU.js → chunk-ZPPNWB64.js} +4 -4
  51. package/dist/cli/decisions.js +1 -1
  52. package/dist/cli/mesh.js +2 -2
  53. package/dist/commands/fabric.d.ts.map +1 -1
  54. package/dist/compaction/hook.js +6 -6
  55. package/dist/compaction/owner.js +7 -7
  56. package/dist/components/configuration.js +4 -4
  57. package/dist/core/action-registry.js +6 -6
  58. package/dist/core/provider-operations.js +53 -154
  59. package/dist/core/provider-operations.js.map +2 -2
  60. package/dist/durable.js +2 -2
  61. package/dist/durable.js.map +1 -1
  62. package/dist/entropy/index.js +8 -8
  63. package/dist/extension-bootstrap.js +16 -16
  64. package/dist/fabric-runtime-state.js +42 -42
  65. package/dist/index.js +20 -20
  66. package/dist/jev/client.js +3 -3
  67. package/dist/jev/decision-types.d.ts +16 -0
  68. package/dist/jev/decision-types.d.ts.map +1 -1
  69. package/dist/jev/guest-types.d.ts +1 -1
  70. package/dist/jev/guest-types.d.ts.map +1 -1
  71. package/dist/jev/observation.js +7 -7
  72. package/dist/jev/routes.d.ts +1 -1
  73. package/dist/jev/routes.d.ts.map +1 -1
  74. package/dist/jev.js +12 -12
  75. package/dist/memory/digest.js +2 -2
  76. package/dist/memory/discovery.js +6 -6
  77. package/dist/memory/file-worker.js +9 -9
  78. package/dist/memory/normalize.js +5 -5
  79. package/dist/memory/search.js +7 -7
  80. package/dist/memory/worker-provider.js +10 -10
  81. package/dist/memory.js +10 -10
  82. package/dist/providers/jev-provider.js +12 -12
  83. package/dist/providers/memory-provider.js +9 -9
  84. package/dist/residency/host.js +12 -12
  85. package/dist/residency/pi-entry.js +12 -12
  86. package/dist/runtime/core-override-guest-types.js +2 -2
  87. package/dist/runtime/guest-types.d.ts +1 -1
  88. package/dist/runtime/guest-types.d.ts.map +1 -1
  89. package/dist/runtime/guest-types.js +1 -1
  90. package/dist/runtime/monty-runtime.js +3 -3
  91. package/dist/runtime/typescript-kernel.js +2 -2
  92. package/dist/type-error-guidance.js +1 -1
  93. package/dist/ui/controller.d.ts +2 -0
  94. package/dist/ui/controller.d.ts.map +1 -1
  95. package/dist/ui/conversation.js +1 -1
  96. package/dist/ui/dashboard-detail.d.ts.map +1 -1
  97. package/dist/ui/dashboard.js +6 -5
  98. package/dist/ui/dashboard.js.map +2 -2
  99. package/dist/ui/settings.js +3 -3
  100. package/dist/ui/transcript-parser.d.ts.map +1 -1
  101. package/dist/ui/transcript-reader.d.ts +1 -0
  102. package/dist/ui/transcript-reader.d.ts.map +1 -1
  103. package/dist/ui/transcript-sanitization.d.ts +2 -0
  104. package/dist/ui/transcript-sanitization.d.ts.map +1 -1
  105. package/dist/ui/transcript.d.ts +1 -1
  106. package/dist/ui/transcript.d.ts.map +1 -1
  107. package/dist/ui/widget-activity.d.ts +21 -0
  108. package/dist/ui/widget-activity.d.ts.map +1 -0
  109. package/dist/ui/widget.d.ts +40 -3
  110. package/dist/ui/widget.d.ts.map +1 -1
  111. package/dist/verified/generated/authority-kernel.d.ts +1 -1
  112. package/dist/verified/generated/authority-kernel.js +61 -157
  113. package/dist/verified/generated/kernel.d.ts +8 -8
  114. package/dist/verified/generated/kernel.js +205 -449
  115. package/dist/verified/generated/lifecycle-kernel.d.ts +1 -1
  116. package/dist/verified/generated/lifecycle-kernel.js +95 -133
  117. package/dist/verified/generated/manifest.json +18 -18
  118. package/dist/verified/generated/provider-kernel.d.ts +1 -1
  119. package/dist/verified/generated/provider-kernel.js +48 -149
  120. package/dist/verified/generated/storage-kernel.d.ts +2 -2
  121. package/dist/verified/generated/storage-kernel.js +59 -219
  122. package/dist/verified/nat.d.ts.map +1 -1
  123. package/dist/verified/policy.d.ts.map +1 -1
  124. package/docs/configuration.md +1 -1
  125. package/docs/durable-pi.md +2 -2
  126. package/docs/interface.md +4 -0
  127. package/docs/jev.md +2 -2
  128. package/docs/provider-capabilities.md +1 -1
  129. package/docs/verified-kernels.md +4 -3
  130. package/package.json +9 -9
  131. package/proofs/abi.json +11 -11
  132. package/proofs/authority-types.d.ts +1 -1
  133. package/proofs/lifecycle-types.d.ts +1 -1
  134. package/proofs/provider-types.d.ts +1 -1
  135. package/proofs/storage-types.d.ts +2 -2
  136. package/proofs/types.d.ts +4 -4
  137. package/scripts/test-verified-kernels.mjs +1 -1
  138. package/scripts/verified-kernels.mjs +1 -1
  139. package/dist/chunks/chunk-7EYJE4TW.js.map +0 -7
  140. package/dist/chunks/chunk-DLXPTBPL.js.map +0 -7
  141. package/dist/chunks/chunk-HITKWKYD.js.map +0 -7
  142. package/dist/chunks/chunk-KBYSGB7E.js.map +0 -7
  143. package/dist/chunks/chunk-MOJBW5X2.js.map +0 -7
  144. package/dist/chunks/chunk-O7IREHJI.js.map +0 -7
  145. package/dist/chunks/chunk-PTZ5DKAB.js.map +0 -7
  146. package/dist/chunks/chunk-WTLH5RY4.js +0 -760
  147. package/dist/chunks/chunk-WTLH5RY4.js.map +0 -7
  148. /package/dist/chunks/{chunk-HZGQ7XYM.js.map → chunk-3FJUP3GV.js.map} +0 -0
  149. /package/dist/chunks/{chunk-U2UBUKNQ.js.map → chunk-3UGN25XS.js.map} +0 -0
  150. /package/dist/chunks/{chunk-VR2LV4CA.js.map → chunk-53N2I4QA.js.map} +0 -0
  151. /package/dist/chunks/{chunk-IQXNJNDI.js.map → chunk-5UBRGTVN.js.map} +0 -0
  152. /package/dist/chunks/{chunk-4GNFBZPR.js.map → chunk-ASSLHWZS.js.map} +0 -0
  153. /package/dist/chunks/{chunk-QGP7AY2R.js.map → chunk-C7Z6F3SO.js.map} +0 -0
  154. /package/dist/chunks/{chunk-56RFFBBO.js.map → chunk-CRRUW26I.js.map} +0 -0
  155. /package/dist/chunks/{chunk-I2TK65VR.js.map → chunk-D5NYNIST.js.map} +0 -0
  156. /package/dist/chunks/{chunk-QQ7D6UAM.js.map → chunk-EHQQ4KCX.js.map} +0 -0
  157. /package/dist/chunks/{chunk-H3SGA7G7.js.map → chunk-FIDUHKMM.js.map} +0 -0
  158. /package/dist/chunks/{chunk-4GGBND7V.js.map → chunk-FSYAGCGA.js.map} +0 -0
  159. /package/dist/chunks/{chunk-ZPI4QTOX.js.map → chunk-FUY6XVRX.js.map} +0 -0
  160. /package/dist/chunks/{chunk-A5XF3ZPJ.js.map → chunk-G4TLWHRS.js.map} +0 -0
  161. /package/dist/chunks/{chunk-7C5IEIQK.js.map → chunk-GEQMQVNS.js.map} +0 -0
  162. /package/dist/chunks/{chunk-DONS3EZH.js.map → chunk-GIK2WNAK.js.map} +0 -0
  163. /package/dist/chunks/{chunk-HQ5YW2OJ.js.map → chunk-HP5P7NBO.js.map} +0 -0
  164. /package/dist/chunks/{chunk-R2MMPHR2.js.map → chunk-INRXG4J5.js.map} +0 -0
  165. /package/dist/chunks/{chunk-BQWJ5ZR7.js.map → chunk-K7J2ABAZ.js.map} +0 -0
  166. /package/dist/chunks/{chunk-OTHMEDN6.js.map → chunk-KVYNGDGC.js.map} +0 -0
  167. /package/dist/chunks/{chunk-6EVAHJAR.js.map → chunk-LEU5CDSL.js.map} +0 -0
  168. /package/dist/chunks/{chunk-HCNHKJDA.js.map → chunk-MLLYR3Y6.js.map} +0 -0
  169. /package/dist/chunks/{chunk-D3W6CBJZ.js.map → chunk-MZUC6LLH.js.map} +0 -0
  170. /package/dist/chunks/{chunk-D3IONBBJ.js.map → chunk-P7CBPPHY.js.map} +0 -0
  171. /package/dist/chunks/{chunk-WQ6LC2KK.js.map → chunk-QT4W5YVB.js.map} +0 -0
  172. /package/dist/chunks/{chunk-TNPZBMYC.js.map → chunk-ROTCDDOV.js.map} +0 -0
  173. /package/dist/chunks/{chunk-PH4PT6R4.js.map → chunk-TIIIHPHF.js.map} +0 -0
  174. /package/dist/chunks/{chunk-2YG4ZA2K.js.map → chunk-TIJ3YQXX.js.map} +0 -0
  175. /package/dist/chunks/{chunk-QCCPR3U5.js.map → chunk-UOM37PE4.js.map} +0 -0
  176. /package/dist/chunks/{chunk-EQYQICUY.js.map → chunk-UXIBKMUM.js.map} +0 -0
  177. /package/dist/chunks/{chunk-V2IV4LYW.js.map → chunk-XWWV6TKV.js.map} +0 -0
  178. /package/dist/chunks/{chunk-JV4JR6TT.js.map → chunk-ZEXCKK4K.js.map} +0 -0
  179. /package/dist/chunks/{chunk-ODYU3IJU.js.map → chunk-ZPPNWB64.js.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  strictDecisionResult,
17
17
  validateCatalogArgs,
18
18
  validationMessage
19
- } from "./chunk-A5XF3ZPJ.js";
19
+ } from "./chunk-G4TLWHRS.js";
20
20
  import {
21
21
  runAbortable,
22
22
  settleWithin,
@@ -30,249 +30,153 @@ import {
30
30
  getActiveRepairCompiler,
31
31
  isActiveQuarantine,
32
32
  normalizeActiveArguments
33
- } from "./chunk-VR2LV4CA.js";
33
+ } from "./chunk-53N2I4QA.js";
34
34
  import {
35
35
  FabricResolutionError,
36
36
  FabricTraceSafeError,
37
37
  executionOutcomeFromError
38
- } from "./chunk-HCNHKJDA.js";
38
+ } from "./chunk-MLLYR3Y6.js";
39
39
  import {
40
40
  stableJsonHash
41
41
  } from "./chunk-3YZUQESG.js";
42
42
  import {
43
+ Ae,
43
44
  BEND_NAT_MAX,
44
- Je,
45
- Ut,
46
- _t,
45
+ Xe,
46
+ _n,
47
47
  boundedEffectResources,
48
48
  encodeResourceEffects,
49
- gt
50
- } from "./chunk-WTLH5RY4.js";
49
+ nn
50
+ } from "./chunk-BN7F52EG.js";
51
51
 
52
52
  // src/verified/generated/authority-kernel.js
53
- function A(t, e) {
53
+ function d(t, e) {
54
54
  return { $: t < e ? "LT" : t === e ? "EQ" : "GT" };
55
55
  }
56
- function N(t) {
57
- return (typeof t == "bigint" || Number.isInteger(t)) && t >= 0 && t <= 2 ** 53 ? Number(t) : { [Symbol.toPrimitive]() {
58
- throw "bend: a Nat past the largest immediate 2^48-1";
59
- } };
60
- }
61
- function f(t) {
56
+ function v(t) {
62
57
  for (; t !== null && typeof t == "object" && t.$ === "$JMP"; )
63
58
  t = t.f(t.x);
64
59
  return t;
65
60
  }
66
- function c(t, e) {
67
- return (...r) => r.length < e ? c((...a2) => t(...r, ...a2), e - r.length) : t(...r);
61
+ function l(t, e) {
62
+ return (...r) => r.length < e ? l((...u2) => t(...r, ...u2), e - r.length) : v(t(...r));
68
63
  }
69
- function R(t, e, r) {
64
+ function g(t, e, r) {
70
65
  for (; ; ) {
71
- let a2 = t, i = e, n = r;
72
- if (a2.$ === "Nil")
73
- return i.$ === "Nil" ? n : false;
66
+ let u2 = t, n = e, o = r;
67
+ if (u2.$ === "Nil")
68
+ return n.$ === "Nil" ? o : false;
74
69
  {
75
- let o = a2.head, u2 = a2.tail;
76
- if (i.$ === "Nil")
70
+ let a2 = u2.head, s = u2.tail;
71
+ if (n.$ === "Nil")
77
72
  return false;
78
73
  {
79
- let $2 = i.head, k2 = i.tail;
80
- t = u2, e = k2, r = m(n, P(o, $2));
74
+ let c = n.head, _ = n.tail;
75
+ t = s, e = _, r = f(o, L(a2, c));
81
76
  continue;
82
77
  }
83
78
  }
84
79
  }
85
80
  }
86
- function _(t, e, r) {
81
+ function y(t, e, r) {
87
82
  for (; ; ) {
88
- let a2 = t, i = e, n = r;
89
- if (a2.$ === "Nil")
90
- return n;
83
+ let u2 = t, n = e, o = r;
84
+ if (u2.$ === "Nil")
85
+ return o;
91
86
  {
92
- let o = a2.head, u2 = a2.tail, $2 = R(i, o, true);
93
- t = u2, e = i, r = n || $2;
87
+ let a2 = u2.head, s = u2.tail, c = g(n, a2, true);
88
+ t = s, e = n, r = o || c;
94
89
  continue;
95
90
  }
96
91
  }
97
92
  }
98
- function E(t, e, r) {
93
+ function p(t, e, r) {
99
94
  for (; ; ) {
100
- let a2 = t, i = e, n = r;
101
- if (a2.$ === "Nil")
102
- return n;
95
+ let u2 = t, n = e, o = r;
96
+ if (u2.$ === "Nil")
97
+ return o;
103
98
  {
104
- let o = a2.head;
105
- t = a2.tail, e = i, r = m(n, _(i, o, false));
99
+ let a2 = u2.head;
100
+ t = u2.tail, e = n, r = f(o, y(n, a2, false));
106
101
  continue;
107
102
  }
108
103
  }
109
104
  }
110
- function x(t) {
105
+ function R(t) {
111
106
  return { $: "authority-state.Active", grants: t };
112
107
  }
113
- function C(t) {
108
+ function b(t) {
114
109
  return t.$ !== "authority-state.Released";
115
110
  }
116
- function L(t, e) {
111
+ function w(t, e) {
117
112
  if (t.$ === "authority-state.Released")
118
113
  return false;
119
114
  {
120
115
  let r = t.grants;
121
- return _(r, e, false);
116
+ return y(r, e, false);
122
117
  }
123
118
  }
124
- function Q(t, e) {
119
+ function A(t, e) {
125
120
  return t ? { $: "authority-state.Active", grants: e } : { $: "authority-state.Released" };
126
121
  }
127
- function I(t, e) {
122
+ function x(t, e) {
128
123
  if (t.$ === "authority-state.Released")
129
124
  return { $: "authority-state.Released" };
130
125
  {
131
126
  let r = t.grants;
132
- return Q(E(e, r, true), e);
127
+ return A(p(e, r, true), e);
133
128
  }
134
129
  }
135
- function q(t) {
130
+ function k(t) {
136
131
  return { $: "authority-state.Released" };
137
132
  }
138
- function U(t) {
139
- return x(t);
133
+ function E(t) {
134
+ return R(t);
140
135
  }
141
- function j(t) {
142
- return C(t);
136
+ function m(t) {
137
+ return b(t);
143
138
  }
144
- function D(t, e) {
145
- return L(t, e);
139
+ function N(t, e) {
140
+ return w(t, e);
146
141
  }
147
- function M(t, e) {
148
- return I(t, e);
142
+ function Q(t, e) {
143
+ return x(t, e);
149
144
  }
150
- function B(t) {
151
- return q(t);
145
+ function q(t) {
146
+ return k(t);
152
147
  }
153
- function m(t, e) {
148
+ function f(t, e) {
154
149
  return t ? e : false;
155
150
  }
156
- function P(t, e) {
157
- return T(A(t, e));
151
+ function L(t, e) {
152
+ return U(d(t, e));
158
153
  }
159
- function T(t) {
154
+ function U(t) {
160
155
  return t.$ === "EQ";
161
156
  }
162
- function b(t) {
163
- let e = [t];
164
- for (let r = e, a2 = 0; ; )
165
- switch (t.$) {
166
- case "Nil":
167
- return r[a2] = t, e[0];
168
- case "Con":
169
- r = r[a2] = { ...t, head: N(t.head) }, a2 = "tail", t = t[a2];
170
- continue;
171
- default:
172
- throw "bend: List has no tag " + t?.$ + " (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)";
173
- }
174
- }
175
- function p(t) {
176
- let e = [t];
177
- for (let r = e, a2 = 0; ; )
178
- switch (t.$) {
179
- case "Nil":
180
- return r[a2] = t, e[0];
181
- case "Con":
182
- r = r[a2] = { ...t, head: BigInt(t.head) }, a2 = "tail", t = t[a2];
183
- continue;
184
- default:
185
- throw "bend: List has no tag " + t?.$ + " (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)";
186
- }
187
- }
188
- function g(t) {
189
- let e = [t];
190
- for (let r = e, a2 = 0; ; )
191
- switch (t.$) {
192
- case "Nil":
193
- return r[a2] = t, e[0];
194
- case "Con":
195
- r = r[a2] = { ...t, head: b(t.head) }, a2 = "tail", t = t[a2];
196
- continue;
197
- default:
198
- throw "bend: List has no tag " + t?.$ + " (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)";
199
- }
200
- }
201
- function w(t) {
202
- let e = [t];
203
- for (let r = e, a2 = 0; ; )
204
- switch (t.$) {
205
- case "Nil":
206
- return r[a2] = t, e[0];
207
- case "Con":
208
- r = r[a2] = { ...t, head: p(t.head) }, a2 = "tail", t = t[a2];
209
- continue;
210
- default:
211
- throw "bend: List has no tag " + t?.$ + " (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)";
212
- }
213
- }
214
- function l(t) {
215
- let e = [t];
216
- for (let r = e, a2 = 0; ; )
217
- switch (t.$) {
218
- case "authority-state.Released":
219
- return r[a2] = t, e[0];
220
- case "authority-state.Active":
221
- return r = r[a2] = { ...t, grants: w(t.grants) }, e[0];
222
- default:
223
- throw "bend: authority-state.Authority has no tag " + t?.$ + " (its tags: authority-state.Released, authority-state.Active); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
224
- }
225
- }
226
- function d(t) {
227
- let e = [t];
228
- for (let r = e, a2 = 0; ; )
229
- switch (t.$) {
230
- case "authority-state.Released":
231
- return r[a2] = t, e[0];
232
- case "authority-state.Active":
233
- return r = r[a2] = { ...t, grants: g(t.grants) }, e[0];
234
- default:
235
- throw "bend: authority-state.Authority has no tag " + t?.$ + " (its tags: authority-state.Released, authority-state.Active); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
236
- }
237
- }
238
- var h = /* @__PURE__ */ new Map([["Unknown", "resources.Unknown"], ["Exact", "resources.Exact"], ["Quiet", "resources.Quiet"], ["Active", "authority-state.Active"], ["Released", "authority-state.Released"], ["Effect", "resources.Effect"]]);
239
- var y = /* @__PURE__ */ new Map([["resources.Unknown", "Unknown"], ["resources.Exact", "Exact"], ["resources.Quiet", "Quiet"], ["authority-state.Active", "Active"], ["authority-state.Released", "Released"], ["resources.Effect", "Effect"]]);
240
- function s(t, e) {
157
+ var $ = /* @__PURE__ */ new Map([["Unknown", "resources.Unknown"], ["Exact", "resources.Exact"], ["Quiet", "resources.Quiet"], ["Active", "authority-state.Active"], ["Released", "authority-state.Released"]]);
158
+ var h = /* @__PURE__ */ new Map([["resources.Unknown", "Unknown"], ["resources.Exact", "Exact"], ["resources.Quiet", "Quiet"], ["authority-state.Active", "Active"], ["authority-state.Released", "Released"]]);
159
+ function i(t, e) {
241
160
  let r = [t];
242
- for (let a2 = [[r, 0]]; a2.length > 0; ) {
243
- let [i, n] = a2.pop(), o = i[n];
244
- if (o === null || typeof o != "object") continue;
245
- let u2 = Array.isArray(o) ? [...o] : { ...o };
246
- typeof u2.$ == "string" && (u2.$ = e.get(u2.$) ?? u2.$), i[n] = u2;
247
- for (let $2 of Object.keys(u2)) a2.push([u2, $2]);
161
+ for (let u2 = [[r, 0]]; u2.length > 0; ) {
162
+ let [n, o] = u2.pop(), a2 = n[o];
163
+ if (a2 === null || typeof a2 != "object") continue;
164
+ let s = Array.isArray(a2) ? [...a2] : { ...a2 };
165
+ typeof s.$ == "string" && (s.$ = e.get(s.$) ?? s.$), n[o] = s;
166
+ for (let c of Object.keys(s)) u2.push([s, c]);
248
167
  }
249
168
  return r[0];
250
169
  }
251
- var G = /* @__PURE__ */ c((t) => {
252
- let e = l(f(U(g(t))));
253
- return w(t), e;
254
- }, 1);
255
- var J = (t) => s(G(s(t, h)), y);
256
- var O = /* @__PURE__ */ c((t) => {
257
- let e = f(j(d(t)));
258
- return l(t), e;
259
- }, 1);
260
- var S = (t) => s(O(s(t, h)), y);
261
- var z = /* @__PURE__ */ c((t, e) => {
262
- let r = f(D(d(t), b(e)));
263
- return l(t), p(e), r;
264
- }, 2);
265
- var F = (t, e) => s(z(s(t, h), s(e, h)), y);
266
- var H = /* @__PURE__ */ c((t, e) => {
267
- let r = l(f(M(d(t), g(e))));
268
- return l(t), w(e), r;
269
- }, 2);
270
- var K = (t, e) => s(H(s(t, h), s(e, h)), y);
271
- var V = /* @__PURE__ */ c((t) => {
272
- let e = l(f(B(d(t))));
273
- return l(t), e;
274
- }, 1);
275
- var W = (t) => s(V(s(t, h)), y);
170
+ var j = /* @__PURE__ */ l((t) => E(t), 1);
171
+ var D = (t) => i(j(i(t, $)), h);
172
+ var I = /* @__PURE__ */ l((t) => m(t), 1);
173
+ var M = (t) => i(I(i(t, $)), h);
174
+ var T = /* @__PURE__ */ l((t, e) => N(t, e), 2);
175
+ var B = (t, e) => i(T(i(t, $), i(e, $)), h);
176
+ var C = /* @__PURE__ */ l((t, e) => Q(t, e), 2);
177
+ var G = (t, e) => i(C(i(t, $), i(e, $)), h);
178
+ var J = /* @__PURE__ */ l((t) => q(t), 1);
179
+ var O = (t) => i(J(i(t, $)), h);
276
180
 
277
181
  // src/verified/authority.ts
278
182
  var encodeGrant = (grant) => {
@@ -284,15 +188,15 @@ var encodeGrant = (grant) => {
284
188
  grant.descriptorHash
285
189
  ]);
286
190
  let encoded = { $: "Nil" };
287
- for (let i = text.length - 1; i >= 0; i--) {
288
- encoded = { $: "Con", head: BigInt(text.charCodeAt(i)), tail: encoded };
191
+ for (let i3 = text.length - 1; i3 >= 0; i3--) {
192
+ encoded = { $: "Con", head: text.charCodeAt(i3), tail: encoded };
289
193
  }
290
194
  return encoded;
291
195
  };
292
196
  var encodeGrants = (grants) => {
293
197
  let encoded = { $: "Nil" };
294
- for (let i = grants.length - 1; i >= 0; i--) {
295
- encoded = { $: "Con", head: encodeGrant(grants[i]), tail: encoded };
198
+ for (let i3 = grants.length - 1; i3 >= 0; i3--) {
199
+ encoded = { $: "Con", head: encodeGrant(grants[i3]), tail: encoded };
296
200
  }
297
201
  return encoded;
298
202
  };
@@ -303,7 +207,7 @@ var CapabilityAuthority = class _CapabilityAuthority {
303
207
  const canonical = grants.map((grant) => Object.freeze({ ...grant }));
304
208
  this.#grants = new Map(canonical.map((grant) => [grant.ref, grant]));
305
209
  const encoded = encodeGrants(canonical);
306
- this.#state = parent ? K(parent.#state, encoded) : J(encoded);
210
+ this.#state = parent ? G(parent.#state, encoded) : D(encoded);
307
211
  }
308
212
  static issue(grants) {
309
213
  return new _CapabilityAuthority(grants);
@@ -312,14 +216,14 @@ var CapabilityAuthority = class _CapabilityAuthority {
312
216
  return new _CapabilityAuthority(grants, this);
313
217
  }
314
218
  get active() {
315
- return S(this.#state);
219
+ return M(this.#state);
316
220
  }
317
221
  release() {
318
- this.#state = W(this.#state);
222
+ this.#state = O(this.#state);
319
223
  }
320
224
  resolve(ref) {
321
225
  const grant = this.#grants.get(ref);
322
- return grant && F(this.#state, encodeGrant(grant)) ? { ...grant } : void 0;
226
+ return grant && B(this.#state, encodeGrant(grant)) ? { ...grant } : void 0;
323
227
  }
324
228
  bindings() {
325
229
  return this.active ? [...this.#grants.values()].map((grant) => ({ ...grant })) : [];
@@ -389,9 +293,9 @@ var summarizeEffects = (effects) => {
389
293
  };
390
294
  };
391
295
  var effectConflictsBetween = (left, right) => {
392
- if (!Ut(left.declarations, right.declarations)) return [];
296
+ if (!_n(left.declarations, right.declarations)) return [];
393
297
  const conflicts = [];
394
- if (Je(
298
+ if (Ae(
395
299
  left.hasUnknown,
396
300
  left.hasUnknownNoncommutative,
397
301
  left.hasNoncommutative,
@@ -402,7 +306,7 @@ var effectConflictsBetween = (left, right) => {
402
306
  conflicts.push({ resources: ["*"], reason: "unknown_resource" });
403
307
  }
404
308
  const overlap = [...left.resourceNoncommutative.keys()].filter(
405
- (resource) => _t(
309
+ (resource) => nn(
406
310
  right.resourceNoncommutative.has(resource),
407
311
  left.resourceNoncommutative.get(resource) ?? false,
408
312
  right.resourceNoncommutative.get(resource) ?? false
@@ -468,13 +372,13 @@ var levenshtein = (left, right) => {
468
372
  let previous = new Array(right.length + 1);
469
373
  let current = new Array(right.length + 1);
470
374
  for (let j2 = 0; j2 <= right.length; j2++) previous[j2] = j2;
471
- for (let i = 1; i <= left.length; i++) {
472
- current[0] = i;
375
+ for (let i3 = 1; i3 <= left.length; i3++) {
376
+ current[0] = i3;
473
377
  for (let j2 = 1; j2 <= right.length; j2++) {
474
378
  current[j2] = Math.min(
475
379
  previous[j2] + 1,
476
380
  current[j2 - 1] + 1,
477
- previous[j2 - 1] + (left[i - 1] === right[j2 - 1] ? 0 : 1)
381
+ previous[j2 - 1] + (left[i3 - 1] === right[j2 - 1] ? 0 : 1)
478
382
  );
479
383
  }
480
384
  const swap = previous;
@@ -569,204 +473,166 @@ var formatUnknownActionMessage = (ref, suggestions) => suggestions.length > 0 ?
569
473
  import { randomUUID } from "node:crypto";
570
474
 
571
475
  // src/verified/generated/lifecycle-kernel.js
572
- function d2(l2) {
476
+ function a(l2) {
573
477
  if (l2 > 281474976710655)
574
478
  throw "bend: a Nat past the largest immediate 2^48-1";
575
479
  return l2;
576
480
  }
577
- function y2(l2) {
578
- return (typeof l2 == "bigint" || Number.isInteger(l2)) && l2 >= 0 && l2 <= 2 ** 53 ? Number(l2) : { [Symbol.toPrimitive]() {
579
- throw "bend: a Nat past the largest immediate 2^48-1";
580
- } };
581
- }
582
- function p2(l2) {
481
+ function u(l2) {
583
482
  for (; l2 !== null && typeof l2 == "object" && l2.$ === "$JMP"; )
584
483
  l2 = l2.f(l2.x);
585
484
  return l2;
586
485
  }
587
- function f2(l2, e) {
588
- return (...c2) => c2.length < e ? f2((...o) => l2(...c2, ...o), e - c2.length) : l2(...c2);
486
+ function y2(l2, e) {
487
+ return (...o) => o.length < e ? y2((...c) => l2(...o, ...c), e - o.length) : u(l2(...o));
589
488
  }
590
- function s2(l2, e, c2) {
489
+ function i2(l2, e, o) {
591
490
  if (l2.$ === "lifecycle.Closing" || l2.$ === "lifecycle.Closed")
592
491
  return false;
593
492
  if (l2.$ === "lifecycle.Failed")
594
- return c2;
493
+ return o;
595
494
  {
596
- let o = R2(e);
597
- return c2 || o;
495
+ let c = O2(e);
496
+ return o || c;
598
497
  }
599
498
  }
600
- function $(l2) {
499
+ function $2(l2) {
601
500
  return l2.$ === "lifecycle.Staged" ? { $: "lifecycle.Retiring" } : l2.$ === "lifecycle.Active" ? { $: "lifecycle.Retiring" } : l2;
602
501
  }
603
- function k(l2, e) {
502
+ function m2(l2, e) {
604
503
  if (l2) {
605
- let c2 = e.phase, o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
606
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: d2(r + 1), revoked: t }, command: { $: "lifecycle.Granted" } };
504
+ let o = e.phase, c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
505
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: a(t + 1), revoked: n }, command: { $: "lifecycle.Granted" } };
607
506
  } else
608
507
  return { $: "lifecycle.Outcome", next: e, command: { $: "lifecycle.Denied" } };
609
508
  }
610
- function w2(l2, e) {
509
+ function p2(l2, e) {
611
510
  if (l2) {
612
- let c2 = e.phase, o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
613
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: d2(n + 1), calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
511
+ let o = e.phase, c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
512
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: a(r + 1), calls: t, revoked: n }, command: { $: "lifecycle.Granted" } };
614
513
  } else
615
514
  return { $: "lifecycle.Outcome", next: e, command: { $: "lifecycle.Denied" } };
616
515
  }
617
- function v(l2, e) {
516
+ function k2(l2, e) {
618
517
  return l2 ? { $: "lifecycle.Outcome", next: e, command: { $: "lifecycle.Granted" } } : { $: "lifecycle.Outcome", next: e, command: { $: "lifecycle.Denied" } };
619
518
  }
620
- function g2(l2, e) {
519
+ function v2(l2, e) {
621
520
  if (l2.$ === "lifecycle.Inspect") {
622
- let c2 = e.phase, o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
623
- return v(s2(c2, t, false), { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: r, revoked: t });
521
+ let o = e.phase, c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
522
+ return k2(i2(o, n, false), { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: t, revoked: n });
624
523
  } else if (l2.$ === "lifecycle.Activate") {
625
- let c2 = e.phase;
626
- if (c2.$ === "lifecycle.Staged") {
627
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
628
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Active" }, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
629
- } else if (c2.$ === "lifecycle.Active") {
630
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
631
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Active" }, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
524
+ let o = e.phase;
525
+ if (o.$ === "lifecycle.Staged") {
526
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
527
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Active" }, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Granted" } };
528
+ } else if (o.$ === "lifecycle.Active") {
529
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
530
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Active" }, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Granted" } };
632
531
  } else {
633
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
634
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
532
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
533
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Denied" } };
635
534
  }
636
535
  } else if (l2.$ === "lifecycle.Retire") {
637
- let c2 = e.phase, o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
638
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: $(c2), owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
536
+ let o = e.phase, c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
537
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: $2(o), owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Granted" } };
639
538
  } else if (l2.$ === "lifecycle.DropOwner") {
640
- let c2 = e.phase, o = e.holds, n = e.calls, r = e.revoked;
641
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: false, holds: o, calls: n, revoked: r }, command: { $: "lifecycle.Granted" } };
539
+ let o = e.phase, c = e.holds, r = e.calls, t = e.revoked;
540
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: false, holds: c, calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
642
541
  } else if (l2.$ === "lifecycle.Revoke") {
643
- let c2 = e.phase, o = e.holds, n = e.calls;
644
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: $(c2), owner: false, holds: o, calls: n, revoked: true }, command: { $: "lifecycle.Granted" } };
542
+ let o = e.phase, c = e.holds, r = e.calls;
543
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: $2(o), owner: false, holds: c, calls: r, revoked: true }, command: { $: "lifecycle.Granted" } };
645
544
  } else if (l2.$ === "lifecycle.Retain") {
646
- let c2 = l2.cleanup, o = e.phase, n = e.owner, r = e.holds, t = e.calls, i = e.revoked;
647
- return w2(s2(o, i, c2), { $: "lifecycle.Life", phase: o, owner: n, holds: r, calls: t, revoked: i });
545
+ let o = l2.cleanup, c = e.phase, r = e.owner, t = e.holds, n = e.calls, s = e.revoked;
546
+ return p2(i2(c, s, o), { $: "lifecycle.Life", phase: c, owner: r, holds: t, calls: n, revoked: s });
648
547
  } else if (l2.$ === "lifecycle.Release") {
649
- let c2 = e.phase, o = e.owner, n = e.holds;
650
- if (n === 0) {
651
- let r = e.calls, t = e.revoked;
652
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: 0, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
548
+ let o = e.phase, c = e.owner, r = e.holds;
549
+ if (r === 0) {
550
+ let t = e.calls, n = e.revoked;
551
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: 0, calls: t, revoked: n }, command: { $: "lifecycle.Denied" } };
653
552
  } else {
654
- let r = n - 1, t = e.calls, i = e.revoked;
655
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: r, calls: t, revoked: i }, command: { $: "lifecycle.Granted" } };
553
+ let t = r - 1, n = e.calls, s = e.revoked;
554
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: t, calls: n, revoked: s }, command: { $: "lifecycle.Granted" } };
656
555
  }
657
556
  } else if (l2.$ === "lifecycle.Begin") {
658
- let c2 = l2.cleanup, o = e.phase, n = e.owner, r = e.holds, t = e.calls, i = e.revoked;
659
- return k(s2(o, i, c2), { $: "lifecycle.Life", phase: o, owner: n, holds: r, calls: t, revoked: i });
557
+ let o = l2.cleanup, c = e.phase, r = e.owner, t = e.holds, n = e.calls, s = e.revoked;
558
+ return m2(i2(c, s, o), { $: "lifecycle.Life", phase: c, owner: r, holds: t, calls: n, revoked: s });
660
559
  } else if (l2.$ === "lifecycle.End") {
661
- let c2 = e.phase, o = e.owner, n = e.holds, r = e.calls;
662
- if (r === 0) {
663
- let t = e.revoked;
664
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: 0, revoked: t }, command: { $: "lifecycle.Denied" } };
560
+ let o = e.phase, c = e.owner, r = e.holds, t = e.calls;
561
+ if (t === 0) {
562
+ let n = e.revoked;
563
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: 0, revoked: n }, command: { $: "lifecycle.Denied" } };
665
564
  } else {
666
- let t = r - 1, i = e.revoked;
667
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: t, revoked: i }, command: { $: "lifecycle.Granted" } };
565
+ let n = t - 1, s = e.revoked;
566
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: n, revoked: s }, command: { $: "lifecycle.Granted" } };
668
567
  }
669
568
  } else if (l2.$ === "lifecycle.Shut") {
670
- let c2 = e.phase;
671
- if (c2.$ === "lifecycle.Retiring") {
672
- let o = e.owner;
673
- if (o) {
674
- let n = e.holds, r = e.calls, t = e.revoked;
675
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
569
+ let o = e.phase;
570
+ if (o.$ === "lifecycle.Retiring") {
571
+ let c = e.owner;
572
+ if (c) {
573
+ let r = e.holds, t = e.calls, n = e.revoked;
574
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Denied" } };
676
575
  } else {
677
- let n = e.holds;
678
- if (n === 0) {
679
- let r = e.calls;
680
- if (r === 0) {
681
- let t = e.revoked;
682
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closing" }, owner: false, holds: 0, calls: 0, revoked: t }, command: { $: "lifecycle.StartClose" } };
576
+ let r = e.holds;
577
+ if (r === 0) {
578
+ let t = e.calls;
579
+ if (t === 0) {
580
+ let n = e.revoked;
581
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closing" }, owner: false, holds: 0, calls: 0, revoked: n }, command: { $: "lifecycle.StartClose" } };
683
582
  } else {
684
- let t = r - 0, i = e.revoked;
685
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: false, holds: 0, calls: t, revoked: i }, command: { $: "lifecycle.Denied" } };
583
+ let n = t - 0, s = e.revoked;
584
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: false, holds: 0, calls: n, revoked: s }, command: { $: "lifecycle.Denied" } };
686
585
  }
687
586
  } else {
688
- let r = n - 0, t = e.calls, i = e.revoked;
689
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: false, holds: r, calls: t, revoked: i }, command: { $: "lifecycle.Denied" } };
587
+ let t = r - 0, n = e.calls, s = e.revoked;
588
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Retiring" }, owner: false, holds: t, calls: n, revoked: s }, command: { $: "lifecycle.Denied" } };
690
589
  }
691
590
  }
692
591
  } else {
693
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
694
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
592
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
593
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Denied" } };
695
594
  }
696
595
  } else if (l2.$ === "lifecycle.Complete") {
697
- let c2 = e.phase;
698
- if (c2.$ === "lifecycle.Closing") {
699
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
700
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closed" }, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Granted" } };
596
+ let o = e.phase;
597
+ if (o.$ === "lifecycle.Closing") {
598
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
599
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closed" }, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Granted" } };
701
600
  } else {
702
- let o = e.owner, n = e.holds, r = e.calls, t = e.revoked;
703
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: c2, owner: o, holds: n, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
601
+ let c = e.owner, r = e.holds, t = e.calls, n = e.revoked;
602
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: o, owner: c, holds: r, calls: t, revoked: n }, command: { $: "lifecycle.Denied" } };
704
603
  }
705
604
  } else if (e.phase.$ === "lifecycle.Closed") {
706
- let c2 = e.owner, o = e.holds, n = e.calls, r = e.revoked;
707
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closed" }, owner: c2, holds: o, calls: n, revoked: r }, command: { $: "lifecycle.Denied" } };
605
+ let o = e.owner, c = e.holds, r = e.calls, t = e.revoked;
606
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Closed" }, owner: o, holds: c, calls: r, revoked: t }, command: { $: "lifecycle.Denied" } };
708
607
  } else {
709
- let c2 = e.holds, o = e.calls;
710
- return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Failed" }, owner: false, holds: c2, calls: o, revoked: true }, command: { $: "lifecycle.Granted" } };
608
+ let o = e.holds, c = e.calls;
609
+ return { $: "lifecycle.Outcome", next: { $: "lifecycle.Life", phase: { $: "lifecycle.Failed" }, owner: false, holds: o, calls: c, revoked: true }, command: { $: "lifecycle.Granted" } };
711
610
  }
712
611
  }
713
- function O2(l2, e) {
714
- return g2(e, l2);
612
+ function w2(l2, e) {
613
+ return v2(e, l2);
715
614
  }
716
- function L2(l2, e) {
717
- return O2(l2, e);
615
+ function g2(l2, e) {
616
+ return w2(l2, e);
718
617
  }
719
- function R2(l2) {
618
+ function O2(l2) {
720
619
  return !l2;
721
620
  }
722
- function x2(l2) {
723
- let e = [l2];
724
- for (let c2 = e, o = 0; ; )
725
- switch (l2.$) {
726
- case "lifecycle.Life":
727
- return c2 = c2[o] = { ...l2, holds: y2(l2.holds), calls: y2(l2.calls) }, e[0];
728
- default:
729
- throw "bend: lifecycle.Life has no tag " + l2?.$ + " (its tags: lifecycle.Life); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
730
- }
731
- }
732
- function h2(l2) {
733
- let e = [l2];
734
- for (let c2 = e, o = 0; ; )
735
- switch (l2.$) {
736
- case "lifecycle.Life":
737
- return c2 = c2[o] = { ...l2, holds: BigInt(l2.holds), calls: BigInt(l2.calls) }, e[0];
738
- default:
739
- throw "bend: lifecycle.Life has no tag " + l2?.$ + " (its tags: lifecycle.Life); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
740
- }
741
- }
742
- function C2(l2) {
743
- let e = [l2];
744
- for (let c2 = e, o = 0; ; )
745
- switch (l2.$) {
746
- case "lifecycle.Outcome":
747
- return c2 = c2[o] = { ...l2, next: h2(l2.next) }, e[0];
748
- default:
749
- throw "bend: lifecycle.Outcome has no tag " + l2?.$ + " (its tags: lifecycle.Outcome); a tag names its constructor as the loading file sees it, which a later version will make the same everywhere (#1105)";
750
- }
751
- }
752
- var u = /* @__PURE__ */ new Map([["Closing", "lifecycle.Closing"], ["Closed", "lifecycle.Closed"], ["Failed", "lifecycle.Failed"], ["Staged", "lifecycle.Staged"], ["Retiring", "lifecycle.Retiring"], ["Active", "lifecycle.Active"], ["Outcome", "lifecycle.Outcome"], ["Denied", "lifecycle.Denied"], ["Life", "lifecycle.Life"], ["Granted", "lifecycle.Granted"], ["Inspect", "lifecycle.Inspect"], ["Activate", "lifecycle.Activate"], ["Retire", "lifecycle.Retire"], ["DropOwner", "lifecycle.DropOwner"], ["Revoke", "lifecycle.Revoke"], ["Retain", "lifecycle.Retain"], ["Release", "lifecycle.Release"], ["Begin", "lifecycle.Begin"], ["End", "lifecycle.End"], ["Shut", "lifecycle.Shut"], ["StartClose", "lifecycle.StartClose"], ["Complete", "lifecycle.Complete"]]);
753
- var D2 = /* @__PURE__ */ new Map([["lifecycle.Closing", "Closing"], ["lifecycle.Closed", "Closed"], ["lifecycle.Failed", "Failed"], ["lifecycle.Staged", "Staged"], ["lifecycle.Retiring", "Retiring"], ["lifecycle.Active", "Active"], ["lifecycle.Outcome", "Outcome"], ["lifecycle.Denied", "Denied"], ["lifecycle.Life", "Life"], ["lifecycle.Granted", "Granted"], ["lifecycle.Inspect", "Inspect"], ["lifecycle.Activate", "Activate"], ["lifecycle.Retire", "Retire"], ["lifecycle.DropOwner", "DropOwner"], ["lifecycle.Revoke", "Revoke"], ["lifecycle.Retain", "Retain"], ["lifecycle.Release", "Release"], ["lifecycle.Begin", "Begin"], ["lifecycle.End", "End"], ["lifecycle.Shut", "Shut"], ["lifecycle.StartClose", "StartClose"], ["lifecycle.Complete", "Complete"]]);
754
- function a(l2, e) {
755
- let c2 = [l2];
756
- for (let o = [[c2, 0]]; o.length > 0; ) {
757
- let [n, r] = o.pop(), t = n[r];
758
- if (t === null || typeof t != "object") continue;
759
- let i = Array.isArray(t) ? [...t] : { ...t };
760
- typeof i.$ == "string" && (i.$ = e.get(i.$) ?? i.$), n[r] = i;
761
- for (let m2 of Object.keys(i)) o.push([i, m2]);
762
- }
763
- return c2[0];
621
+ var f2 = /* @__PURE__ */ new Map([["Closing", "lifecycle.Closing"], ["Closed", "lifecycle.Closed"], ["Failed", "lifecycle.Failed"], ["Staged", "lifecycle.Staged"], ["Retiring", "lifecycle.Retiring"], ["Active", "lifecycle.Active"], ["Outcome", "lifecycle.Outcome"], ["Denied", "lifecycle.Denied"], ["Life", "lifecycle.Life"], ["Granted", "lifecycle.Granted"], ["Inspect", "lifecycle.Inspect"], ["Activate", "lifecycle.Activate"], ["Retire", "lifecycle.Retire"], ["DropOwner", "lifecycle.DropOwner"], ["Revoke", "lifecycle.Revoke"], ["Retain", "lifecycle.Retain"], ["Release", "lifecycle.Release"], ["Begin", "lifecycle.Begin"], ["End", "lifecycle.End"], ["Shut", "lifecycle.Shut"], ["StartClose", "lifecycle.StartClose"], ["Complete", "lifecycle.Complete"]]);
622
+ var R2 = /* @__PURE__ */ new Map([["lifecycle.Closing", "Closing"], ["lifecycle.Closed", "Closed"], ["lifecycle.Failed", "Failed"], ["lifecycle.Staged", "Staged"], ["lifecycle.Retiring", "Retiring"], ["lifecycle.Active", "Active"], ["lifecycle.Outcome", "Outcome"], ["lifecycle.Denied", "Denied"], ["lifecycle.Life", "Life"], ["lifecycle.Granted", "Granted"], ["lifecycle.Inspect", "Inspect"], ["lifecycle.Activate", "Activate"], ["lifecycle.Retire", "Retire"], ["lifecycle.DropOwner", "DropOwner"], ["lifecycle.Revoke", "Revoke"], ["lifecycle.Retain", "Retain"], ["lifecycle.Release", "Release"], ["lifecycle.Begin", "Begin"], ["lifecycle.End", "End"], ["lifecycle.Shut", "Shut"], ["lifecycle.StartClose", "StartClose"], ["lifecycle.Complete", "Complete"]]);
623
+ function d2(l2, e) {
624
+ let o = [l2];
625
+ for (let c = [[o, 0]]; c.length > 0; ) {
626
+ let [r, t] = c.pop(), n = r[t];
627
+ if (n === null || typeof n != "object") continue;
628
+ let s = Array.isArray(n) ? [...n] : { ...n };
629
+ typeof s.$ == "string" && (s.$ = e.get(s.$) ?? s.$), r[t] = s;
630
+ for (let h2 of Object.keys(s)) c.push([s, h2]);
631
+ }
632
+ return o[0];
764
633
  }
765
- var S2 = /* @__PURE__ */ f2((l2, e) => {
766
- let c2 = C2(p2(L2(x2(l2), e)));
767
- return h2(l2), c2;
768
- }, 2);
769
- var b2 = (l2, e) => a(S2(a(l2, u), a(e, u)), D2);
634
+ var x2 = /* @__PURE__ */ y2((l2, e) => g2(l2, e), 2);
635
+ var L2 = (l2, e) => d2(x2(d2(l2, f2), d2(e, f2)), R2);
770
636
 
771
637
  // src/core/provider-bindings.ts
772
638
  var snapshot = (binding) => ({
@@ -776,7 +642,7 @@ var snapshot = (binding) => ({
776
642
  var useOnce = () => {
777
643
  let active = true;
778
644
  return () => {
779
- const next = gt(active);
645
+ const next = Xe(active);
780
646
  active = next.snd;
781
647
  return next.fst;
782
648
  };
@@ -801,7 +667,7 @@ var FabricProviderBindings = class {
801
667
  binding(id) {
802
668
  const binding = this.#all.get(id);
803
669
  const life = this.#lifecycles.get(id);
804
- return binding && life && b2(life, { $: "Inspect" }).command.$ === "Granted" ? binding : void 0;
670
+ return binding && life && L2(life, { $: "Inspect" }).command.$ === "Granted" ? binding : void 0;
805
671
  }
806
672
  has(name) {
807
673
  return this.#current.has(name);
@@ -842,7 +708,7 @@ var FabricProviderBindings = class {
842
708
  );
843
709
  }
844
710
  this.#all.set(binding.id, binding);
845
- this.#lifecycles.set(binding.id, { $: "Life", phase: { $: options.staged ? "Staged" : "Active" }, owner: true, holds: 0n, calls: 0n, revoked: false });
711
+ this.#lifecycles.set(binding.id, { $: "Life", phase: { $: options.staged ? "Staged" : "Active" }, owner: true, holds: 0, calls: 0, revoked: false });
846
712
  this.#signals.set(binding.id, new AbortController());
847
713
  if (options.staged) {
848
714
  this.#staged.set(binding.name, binding);
@@ -1069,16 +935,16 @@ var FabricProviderBindings = class {
1069
935
  }
1070
936
  #canBegin(id, cleanup) {
1071
937
  const life = this.#lifecycles.get(id);
1072
- return !!life && life.calls < BigInt(BEND_NAT_MAX) && b2(life, { $: "Begin", cleanup }).command.$ === "Granted";
938
+ return !!life && life.calls < BEND_NAT_MAX && L2(life, { $: "Begin", cleanup }).command.$ === "Granted";
1073
939
  }
1074
940
  #step(binding, event) {
1075
941
  const life = this.#lifecycles.get(binding.id);
1076
942
  if (!life) return "Denied";
1077
- if (event.$ === "Begin" && life.calls >= BigInt(BEND_NAT_MAX) || event.$ === "Retain" && life.holds >= BigInt(BEND_NAT_MAX)) {
943
+ if (event.$ === "Begin" && life.calls >= BEND_NAT_MAX || event.$ === "Retain" && life.holds >= BEND_NAT_MAX) {
1078
944
  throw new Error("Provider lifecycle accounting overflow");
1079
945
  }
1080
- const outcome = b2(life, event);
1081
- if (outcome.next.holds > BigInt(BEND_NAT_MAX) || outcome.next.calls > BigInt(BEND_NAT_MAX)) {
946
+ const outcome = L2(life, event);
947
+ if (outcome.next.holds > BEND_NAT_MAX || outcome.next.calls > BEND_NAT_MAX) {
1082
948
  throw new Error("Provider lifecycle accounting overflow");
1083
949
  }
1084
950
  this.#lifecycles.set(binding.id, outcome.next);
@@ -2286,4 +2152,4 @@ export {
2286
2152
  scoreActionSearch,
2287
2153
  ActionRegistry
2288
2154
  };
2289
- //# sourceMappingURL=chunk-HITKWKYD.js.map
2155
+ //# sourceMappingURL=chunk-4EW7GVUR.js.map