@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.
Files changed (189) hide show
  1. package/THIRD_PARTY_NOTICES.md +5 -4
  2. package/dist/agents/manager.d.ts.map +1 -1
  3. package/dist/agents/request.d.ts.map +1 -1
  4. package/dist/agents/types.d.ts +4 -0
  5. package/dist/agents/types.d.ts.map +1 -1
  6. package/dist/agents.js +3 -3
  7. package/dist/chunks/{chunk-JCV54SSP.js → chunk-27ORW5EK.js} +41 -22
  8. package/dist/chunks/chunk-27ORW5EK.js.map +7 -0
  9. package/dist/chunks/{chunk-EQIGYLVB.js → chunk-3RFEMOJA.js} +9 -3
  10. package/dist/chunks/chunk-3RFEMOJA.js.map +7 -0
  11. package/dist/chunks/{chunk-D5GNTBV6.js → chunk-7HQKBGTL.js} +2 -2
  12. package/dist/chunks/{chunk-LNLQ2LX3.js → chunk-ASU53MOT.js} +2 -2
  13. package/dist/chunks/{chunk-V3PIO7QL.js → chunk-BUQZBG6O.js} +3 -43
  14. package/dist/chunks/chunk-BUQZBG6O.js.map +7 -0
  15. package/dist/chunks/{chunk-6K5SRGW6.js → chunk-C2DIKAOE.js} +4 -4
  16. package/dist/chunks/{chunk-FJSHRHOR.js → chunk-CPSPZGK4.js} +6 -6
  17. package/dist/chunks/{chunk-UBPFGMDQ.js → chunk-CXQF35XB.js} +4 -4
  18. package/dist/chunks/{chunk-3SIXBW6A.js → chunk-H4YYLQTX.js} +2 -2
  19. package/dist/chunks/{chunk-CSJSHBAT.js → chunk-I5VN6D5T.js} +48 -21
  20. package/dist/chunks/chunk-I5VN6D5T.js.map +7 -0
  21. package/dist/chunks/{chunk-VRYEGVHR.js → chunk-J7ZQERKA.js} +11 -8
  22. package/dist/chunks/chunk-J7ZQERKA.js.map +7 -0
  23. package/dist/chunks/{chunk-D4B4CCTA.js → chunk-JHQDS6YP.js} +2 -2
  24. package/dist/chunks/{chunk-OINADFEF.js → chunk-JWWGWUP7.js} +5 -5
  25. package/dist/chunks/{chunk-WXSELMFV.js → chunk-KFPUVFDS.js} +5 -5
  26. package/dist/chunks/{chunk-EPAFGT2M.js → chunk-LH2PGXSZ.js} +5 -1
  27. package/dist/chunks/{chunk-EPAFGT2M.js.map → chunk-LH2PGXSZ.js.map} +2 -2
  28. package/dist/chunks/{chunk-X3IRR7CV.js → chunk-M25A5R3F.js} +2 -2
  29. package/dist/chunks/chunk-MNTJX4U7.js +760 -0
  30. package/dist/chunks/chunk-MNTJX4U7.js.map +7 -0
  31. package/dist/chunks/{chunk-754HA6KO.js → chunk-NRLDV5R3.js} +7 -2
  32. package/dist/chunks/chunk-NRLDV5R3.js.map +7 -0
  33. package/dist/chunks/chunk-O4A5UOXU.js +44 -0
  34. package/dist/chunks/chunk-O4A5UOXU.js.map +7 -0
  35. package/dist/chunks/{chunk-4F27LJTS.js → chunk-OEJ6RFDO.js} +255 -72
  36. package/dist/chunks/chunk-OEJ6RFDO.js.map +7 -0
  37. package/dist/chunks/{chunk-VQGO4P7C.js → chunk-QIW7QMFI.js} +2 -2
  38. package/dist/chunks/{chunk-B4HECUJI.js → chunk-RUEKYUNR.js} +2 -2
  39. package/dist/chunks/{chunk-A4XPJESK.js → chunk-RZHXYLOY.js} +2 -2
  40. package/dist/chunks/{chunk-QNMMQAZ7.js → chunk-SDDBEBM4.js} +3 -3
  41. package/dist/chunks/{chunk-2LBC6TTP.js → chunk-UGMLWBVF.js} +390 -228
  42. package/dist/chunks/chunk-UGMLWBVF.js.map +7 -0
  43. package/dist/chunks/{chunk-5WUW727L.js → chunk-VGQ2IE7P.js} +19 -3
  44. package/dist/chunks/chunk-VGQ2IE7P.js.map +7 -0
  45. package/dist/chunks/{chunk-KBHITFTO.js → chunk-VRAGOMN4.js} +3 -1
  46. package/dist/chunks/chunk-VRAGOMN4.js.map +7 -0
  47. package/dist/chunks/{chunk-F676L43O.js → chunk-WK25T5ST.js} +11 -11
  48. package/dist/chunks/{chunk-IPHEM6RY.js → chunk-WQB6CVES.js} +2 -2
  49. package/dist/chunks/{chunk-CZSX6UG6.js → chunk-XYFOKDFM.js} +2 -2
  50. package/dist/chunks/{chunk-G2F2RDZI.js → chunk-YAPDV6LO.js} +2 -2
  51. package/dist/chunks/{chunk-Q5BMTL6A.js → chunk-YIEK7FH2.js} +4 -4
  52. package/dist/chunks/{chunk-KS44WKJJ.js → chunk-Z45SUO4B.js} +2 -2
  53. package/dist/commands/fabric.d.ts.map +1 -1
  54. package/dist/compaction/hook.js +6 -6
  55. package/dist/components/builtin-guidance.d.ts +4 -0
  56. package/dist/components/builtin-guidance.d.ts.map +1 -0
  57. package/dist/components/configuration.js +2 -2
  58. package/dist/config.d.ts +7 -0
  59. package/dist/config.d.ts.map +1 -1
  60. package/dist/core/action-registry.js +7 -7
  61. package/dist/core/file-lock.d.ts +4 -0
  62. package/dist/core/file-lock.d.ts.map +1 -1
  63. package/dist/core/provider-operations.js +162 -51
  64. package/dist/core/provider-operations.js.map +2 -2
  65. package/dist/core/shell-timing.d.ts +11 -0
  66. package/dist/core/shell-timing.d.ts.map +1 -0
  67. package/dist/entropy/index.js +12 -10
  68. package/dist/entropy/pool-store.d.ts +3 -1
  69. package/dist/entropy/pool-store.d.ts.map +1 -1
  70. package/dist/fabric-runtime-state.d.ts.map +1 -1
  71. package/dist/fabric-runtime-state.js +138 -55
  72. package/dist/fabric-runtime-state.js.map +4 -4
  73. package/dist/fabric-state.d.ts.map +1 -1
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +125 -58
  76. package/dist/index.js.map +3 -3
  77. package/dist/jev/observation.js +5 -5
  78. package/dist/jev.js +8 -8
  79. package/dist/lifecycle/broker.d.ts.map +1 -1
  80. package/dist/memory/digest.js +2 -2
  81. package/dist/memory/discovery.js +6 -6
  82. package/dist/memory/file-worker.js +9 -9
  83. package/dist/memory/normalize.js +5 -5
  84. package/dist/memory/search.js +7 -7
  85. package/dist/memory/worker-provider.js +10 -10
  86. package/dist/memory.js +10 -10
  87. package/dist/prewalk/messages.d.ts +1 -1
  88. package/dist/prewalk/messages.d.ts.map +1 -1
  89. package/dist/protocol.d.ts +12 -0
  90. package/dist/protocol.d.ts.map +1 -1
  91. package/dist/protocol.js +3 -1
  92. package/dist/providers/agents-actions.d.ts.map +1 -1
  93. package/dist/providers/agents-message-router.d.ts.map +1 -1
  94. package/dist/providers/agents-provider.d.ts.map +1 -1
  95. package/dist/providers/jev-provider.js +8 -8
  96. package/dist/providers/memory-provider.js +9 -9
  97. package/dist/providers/prewalk-provider.d.ts +3 -3
  98. package/dist/providers/prewalk-provider.d.ts.map +1 -1
  99. package/dist/residency/host.js +9 -9
  100. package/dist/residency/pi-entry.js +9 -9
  101. package/dist/runtime/core-override-guest-types.js +2 -2
  102. package/dist/runtime/guest-types.d.ts +1 -1
  103. package/dist/runtime/guest-types.d.ts.map +1 -1
  104. package/dist/runtime/guest-types.js +1 -1
  105. package/dist/runtime/monty-runtime.js +1 -1
  106. package/dist/runtime/typescript-kernel.js +2 -2
  107. package/dist/ui/conversation.d.ts +2 -1
  108. package/dist/ui/conversation.d.ts.map +1 -1
  109. package/dist/ui/conversation.js +41 -37
  110. package/dist/ui/conversation.js.map +2 -2
  111. package/dist/ui/dashboard.js +10 -8
  112. package/dist/ui/dashboard.js.map +1 -1
  113. package/dist/ui/fabric-model-selector.d.ts +3 -0
  114. package/dist/ui/fabric-model-selector.d.ts.map +1 -1
  115. package/dist/ui/settings.d.ts.map +1 -1
  116. package/dist/ui/settings.js +15 -2
  117. package/dist/ui/settings.js.map +2 -2
  118. package/dist/ui/shell-tasks.d.ts +2 -1
  119. package/dist/ui/shell-tasks.d.ts.map +1 -1
  120. package/dist/ui/shell-tasks.js +169 -81
  121. package/dist/ui/shell-tasks.js.map +3 -3
  122. package/dist/ui/snapshot.d.ts.map +1 -1
  123. package/dist/ui/structured.d.ts.map +1 -1
  124. package/dist/ui/widget.d.ts.map +1 -1
  125. package/dist/verified/generated/authority-kernel.js +188 -81
  126. package/dist/verified/generated/kernel.js +547 -265
  127. package/dist/verified/generated/lifecycle-kernel.d.ts +1 -1
  128. package/dist/verified/generated/lifecycle-kernel.js +172 -125
  129. package/dist/verified/generated/manifest.json +11 -11
  130. package/dist/verified/generated/provider-kernel.js +160 -52
  131. package/dist/verified/generated/storage-kernel.js +238 -69
  132. package/dist/worker/model-control.d.ts +1 -1
  133. package/dist/worker/model-control.d.ts.map +1 -1
  134. package/dist/worker/model-control.js +6 -3
  135. package/dist/worker/model-control.js.map +2 -2
  136. package/dist/worker/options.d.ts.map +1 -1
  137. package/dist/worker/options.js +15 -0
  138. package/dist/worker/options.js.map +2 -2
  139. package/dist/worker.js +3 -2
  140. package/dist/worker.js.map +2 -2
  141. package/docs/agents.md +1 -1
  142. package/docs/background-tasks.md +33 -0
  143. package/docs/configuration.md +4 -2
  144. package/docs/entropy.md +13 -0
  145. package/docs/harnesses.md +1 -1
  146. package/docs/interface.md +2 -0
  147. package/docs/jev.md +1 -1
  148. package/docs/prompt-cache.md +3 -3
  149. package/docs/provider-capabilities.md +1 -1
  150. package/docs/verified-kernels.md +10 -6
  151. package/package.json +1 -1
  152. package/proofs/lifecycle-spec.bend +4 -4
  153. package/proofs/lifecycle-types.d.ts +1 -1
  154. package/proofs/lifecycle.bend +6 -6
  155. package/scripts/test-verified-kernels.mjs +3 -3
  156. package/scripts/verified-kernels.mjs +53 -13
  157. package/skillsets/typescript/fabric-exec/references/agents.md +2 -0
  158. package/dist/chunks/chunk-2LBC6TTP.js.map +0 -7
  159. package/dist/chunks/chunk-4E63LJDD.js +0 -468
  160. package/dist/chunks/chunk-4E63LJDD.js.map +0 -7
  161. package/dist/chunks/chunk-4F27LJTS.js.map +0 -7
  162. package/dist/chunks/chunk-5WUW727L.js.map +0 -7
  163. package/dist/chunks/chunk-754HA6KO.js.map +0 -7
  164. package/dist/chunks/chunk-CSJSHBAT.js.map +0 -7
  165. package/dist/chunks/chunk-EQIGYLVB.js.map +0 -7
  166. package/dist/chunks/chunk-JCV54SSP.js.map +0 -7
  167. package/dist/chunks/chunk-KBHITFTO.js.map +0 -7
  168. package/dist/chunks/chunk-V3PIO7QL.js.map +0 -7
  169. package/dist/chunks/chunk-VRYEGVHR.js.map +0 -7
  170. /package/dist/chunks/{chunk-D5GNTBV6.js.map → chunk-7HQKBGTL.js.map} +0 -0
  171. /package/dist/chunks/{chunk-LNLQ2LX3.js.map → chunk-ASU53MOT.js.map} +0 -0
  172. /package/dist/chunks/{chunk-6K5SRGW6.js.map → chunk-C2DIKAOE.js.map} +0 -0
  173. /package/dist/chunks/{chunk-FJSHRHOR.js.map → chunk-CPSPZGK4.js.map} +0 -0
  174. /package/dist/chunks/{chunk-UBPFGMDQ.js.map → chunk-CXQF35XB.js.map} +0 -0
  175. /package/dist/chunks/{chunk-3SIXBW6A.js.map → chunk-H4YYLQTX.js.map} +0 -0
  176. /package/dist/chunks/{chunk-D4B4CCTA.js.map → chunk-JHQDS6YP.js.map} +0 -0
  177. /package/dist/chunks/{chunk-OINADFEF.js.map → chunk-JWWGWUP7.js.map} +0 -0
  178. /package/dist/chunks/{chunk-WXSELMFV.js.map → chunk-KFPUVFDS.js.map} +0 -0
  179. /package/dist/chunks/{chunk-X3IRR7CV.js.map → chunk-M25A5R3F.js.map} +0 -0
  180. /package/dist/chunks/{chunk-VQGO4P7C.js.map → chunk-QIW7QMFI.js.map} +0 -0
  181. /package/dist/chunks/{chunk-B4HECUJI.js.map → chunk-RUEKYUNR.js.map} +0 -0
  182. /package/dist/chunks/{chunk-A4XPJESK.js.map → chunk-RZHXYLOY.js.map} +0 -0
  183. /package/dist/chunks/{chunk-QNMMQAZ7.js.map → chunk-SDDBEBM4.js.map} +0 -0
  184. /package/dist/chunks/{chunk-F676L43O.js.map → chunk-WK25T5ST.js.map} +0 -0
  185. /package/dist/chunks/{chunk-IPHEM6RY.js.map → chunk-WQB6CVES.js.map} +0 -0
  186. /package/dist/chunks/{chunk-CZSX6UG6.js.map → chunk-XYFOKDFM.js.map} +0 -0
  187. /package/dist/chunks/{chunk-G2F2RDZI.js.map → chunk-YAPDV6LO.js.map} +0 -0
  188. /package/dist/chunks/{chunk-Q5BMTL6A.js.map → chunk-YIEK7FH2.js.map} +0 -0
  189. /package/dist/chunks/{chunk-KS44WKJJ.js.map → chunk-Z45SUO4B.js.map} +0 -0
@@ -1,80 +1,188 @@
1
- // Generated by Bend 2.0.26; do not edit. See LAWS.bend and PROOF.bend.
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
- // CLI removed and exports added by Pi Fabric; see THIRD_PARTY_NOTICES.md.
4
- function f(e, t) {
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 u(e, t) {
8
- return { $: "$JMP", f: e, x: t };
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 $(e) {
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 p(e, t) {
16
- return (...n) => n.length < t ? p((...r) => e(...n, ...r), t - n.length) : $(e(...n));
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 v(e, t, n, r) {
19
- return u(k, [e, t, n, r]);
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 s(e) {
22
- return u(g, [e]);
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 k(e, t, n, r) {
25
- let o = e.grant, a = e.expected, i = e.payload;
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 g(e) {
29
- let t = e.grant, n = e.expected, r = e.payload;
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 d(e) {
33
- let t = e.active;
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 h(e, t, n, r, o, a) {
37
- return u(x, [$(l($(T(e, t, a)), $(c(n, r, !0)))), t, n, o]);
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 x(e, t, n, r) {
40
- return e ? { $: "Write", key: t, expected: n, value: r } : { $: "Denied" };
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 l(e, t) {
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 T(e, t, n) {
46
- let r = e.active, o = e.key;
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 c(e, t, n) {
50
- if (e.$ === "Nil") {
51
- if (t.$ === "Nil")
52
- return n;
53
- {
54
- let r = t.head, o = t.tail;
55
- return !1;
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
- } else {
58
- let r = e.head, o = e.tail;
59
- if (t.$ === "Nil")
60
- return !1;
61
- {
62
- let a = t.head, i = t.tail;
63
- return u(c, [o, i, $(l(n, $(y(r, a))))]);
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
- return !e;
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 y(e, t) {
71
- return u(N, [f(e, t)]);
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 N(e) {
74
- return e.$ === "LT" ? !1 : e.$ === "EQ";
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 b = /* @__PURE__ */ p(v, 4), w = /* @__PURE__ */ p(s, 1);
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
- w as providerRevoke,
79
- b as providerTake
186
+ M as providerRevoke,
187
+ j as providerTake
80
188
  };
@@ -1,98 +1,267 @@
1
- // Generated by Bend 2.0.26; do not edit. See LAWS.bend and PROOF.bend.
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
- // CLI removed and exports added by Pi Fabric; see THIRD_PARTY_NOTICES.md.
4
- function c(n, t) {
5
- return { $: n < t ? "LT" : n === t ? "EQ" : "GT" };
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 g(n) {
8
- if (n > 281474976710655n)
7
+ function y(e) {
8
+ if (e > 281474976710655)
9
9
  throw "bend: a Nat past the largest immediate 2^48-1";
10
- return n;
10
+ return e;
11
11
  }
12
- function u(n, t) {
13
- return { $: "$JMP", f: n, x: t };
14
- }
15
- function $(n) {
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 v(n, t) {
24
- return u(B, [n, t]);
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 B(n, t) {
27
- let e = n.key, r = n.expected, i = n.change, o = t.present, l = t.version, m = t.highWater;
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 T(n, t, e, r, i, o) {
31
- return n ? u(I, [t, e, r, i, o]) : { $: "Conflict" };
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 b(n, t) {
34
- if (n.$ === "Any")
29
+ function E(e, t) {
30
+ if (e.$ === "storage-plans.Any")
35
31
  return !0;
36
32
  {
37
- let e = n.version;
38
- return u(N, [e, t]);
33
+ let a = e.version;
34
+ return C(a, t);
39
35
  }
40
36
  }
41
- function I(n, t, e, r, i) {
42
- if (t.$ === "Delete")
43
- return e ? u(h, [$(d(r, i)), n, { $: "Delete" }, r, i]) : { $: "Unchanged" };
44
- {
45
- let o = t.value, l = t.identity;
46
- return u(h, [$(d($(w(e, r, i)), i)), n, { $: "Put", value: o, identity: l }, $(w(e, r, i)), i]);
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 N(n, t) {
50
- let e = n.high, r = n.low, i = t.high, o = t.low;
51
- return u(a, [$(f(e, i)), $(f(r, o))]);
44
+ function h(e) {
45
+ let t = e.high, a = e.low;
46
+ return q(p(a, 4294967295), t, a);
52
47
  }
53
- function h(n, t, e, r, i) {
54
- if (n)
55
- if (e.$ === "Put") {
56
- let o = e.value, l = e.identity;
57
- return { $: "PutNext", key: t, value: o, identity: l, version: $(s(r)), highWater: $(s(i)) };
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: $(s(r)), highWater: $(s(i)) };
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 d(n, t) {
64
- return u(a, [$(y(n)), $(y(t))]);
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 w(n, t, e) {
67
- return n ? t : e;
79
+ function W(e, t) {
80
+ return U(e, t);
68
81
  }
69
- function a(n, t) {
70
- return n ? t : !1;
82
+ function u(e, t) {
83
+ return e ? t : !1;
71
84
  }
72
- function f(n, t) {
73
- return u(P, [c(n, t)]);
85
+ function p(e, t) {
86
+ return L(d(e, t));
74
87
  }
75
- function s(n) {
76
- let t = n.high, e = n.low;
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 y(n) {
80
- let t = n.high, e = n.low, r = BigInt(2097151), i = BigInt(4294967295), o = t < r, l = e < i;
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 P(n) {
84
- return n.$ === "LT" ? !1 : n.$ === "EQ";
94
+ function B(e) {
95
+ return e.$ === "LT" ? !0 : e.$ === "EQ";
85
96
  }
86
- function E(n, t, e) {
87
- return n ? { $: "Revision", high: g(t + 1n), low: 0n } : { $: "Revision", high: t, low: g(e + 1n) };
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 x(n, t) {
90
- return u(k, [c(n, t)]);
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 k(n) {
93
- return n.$ === "LT" ? !0 : n.$ === "EQ";
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 C = /* @__PURE__ */ p(v, 2);
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
- C as storageTransition
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;;IAMzB,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;IAU1B,KAAK,IAAI,IAAI;IAsCb,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAO1B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IA6ChD,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAWzD"}
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
- if (!actual || key(actual) !== key(this.#expected)) {
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
  }