@e4779/pi-fabric 0.117.2-fork.31 → 0.131.0-fork.32

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 (796) hide show
  1. package/README.md +12 -5
  2. package/THIRD_PARTY_NOTICES.md +6 -14
  3. package/dist/activity/store.d.ts +2 -1
  4. package/dist/activity/store.d.ts.map +1 -1
  5. package/dist/actors/binding-store.d.ts +13 -0
  6. package/dist/actors/binding-store.d.ts.map +1 -1
  7. package/dist/actors/directory.d.ts.map +1 -1
  8. package/dist/actors/global-registry.d.ts +8 -0
  9. package/dist/actors/global-registry.d.ts.map +1 -1
  10. package/dist/actors/host-event-payload.d.ts +14 -0
  11. package/dist/actors/host-event-payload.d.ts.map +1 -1
  12. package/dist/actors/manager.d.ts +4 -3
  13. package/dist/actors/manager.d.ts.map +1 -1
  14. package/dist/actors/mesh-monitor.d.ts +2 -0
  15. package/dist/actors/mesh-monitor.d.ts.map +1 -1
  16. package/dist/actors/name-policy.d.ts +3 -0
  17. package/dist/actors/name-policy.d.ts.map +1 -0
  18. package/dist/actors/registry-store.d.ts +14 -5
  19. package/dist/actors/registry-store.d.ts.map +1 -1
  20. package/dist/actors/store-read.d.ts +16 -0
  21. package/dist/actors/store-read.d.ts.map +1 -0
  22. package/dist/agents/agent-files.d.ts +80 -0
  23. package/dist/agents/agent-files.d.ts.map +1 -0
  24. package/dist/agents/agent-files.js +327 -0
  25. package/dist/agents/agent-files.js.map +7 -0
  26. package/dist/agents/child-skills.d.ts +60 -0
  27. package/dist/agents/child-skills.d.ts.map +1 -0
  28. package/dist/agents/child-skills.js +94 -0
  29. package/dist/agents/child-skills.js.map +7 -0
  30. package/dist/agents/clone-first-worktree.d.ts +6 -0
  31. package/dist/agents/clone-first-worktree.d.ts.map +1 -1
  32. package/dist/agents/cow-clone.d.ts.map +1 -1
  33. package/dist/agents/handoff.d.ts +12 -2
  34. package/dist/agents/handoff.d.ts.map +1 -1
  35. package/dist/agents/herdr-status.d.ts +26 -0
  36. package/dist/agents/herdr-status.d.ts.map +1 -0
  37. package/dist/agents/herdr-status.js +161 -0
  38. package/dist/agents/herdr-status.js.map +7 -0
  39. package/dist/agents/hosted-run.d.ts +20 -4
  40. package/dist/agents/hosted-run.d.ts.map +1 -1
  41. package/dist/agents/manager.d.ts +18 -2
  42. package/dist/agents/manager.d.ts.map +1 -1
  43. package/dist/agents/model-pin-guard.d.ts +27 -0
  44. package/dist/agents/model-pin-guard.d.ts.map +1 -0
  45. package/dist/agents/model-pin-guard.js +86 -0
  46. package/dist/agents/model-pin-guard.js.map +7 -0
  47. package/dist/agents/model-pin.d.ts +25 -0
  48. package/dist/agents/model-pin.d.ts.map +1 -0
  49. package/dist/agents/provider-bridge.d.ts +7 -6
  50. package/dist/agents/provider-bridge.d.ts.map +1 -1
  51. package/dist/agents/provider-bridge.js +33 -5
  52. package/dist/agents/provider-bridge.js.map +3 -3
  53. package/dist/agents/request.d.ts.map +1 -1
  54. package/dist/agents/result.d.ts.map +1 -1
  55. package/dist/agents/result.js +1 -1
  56. package/dist/agents/runner-notice.d.ts.map +1 -1
  57. package/dist/agents/runner-protocol.d.ts +8 -0
  58. package/dist/agents/runner-protocol.d.ts.map +1 -1
  59. package/dist/agents/service-schema.d.ts.map +1 -1
  60. package/dist/agents/transports/herdr-socket.d.ts +12 -0
  61. package/dist/agents/transports/herdr-socket.d.ts.map +1 -0
  62. package/dist/agents/transports/herdr-transport.d.ts.map +1 -1
  63. package/dist/agents/types.d.ts +51 -0
  64. package/dist/agents/types.d.ts.map +1 -1
  65. package/dist/agents/worker-recovery.d.ts +75 -0
  66. package/dist/agents/worker-recovery.d.ts.map +1 -0
  67. package/dist/agents/worktree-manager.d.ts.map +1 -1
  68. package/dist/agents.js +12 -11
  69. package/dist/agents.js.map +2 -2
  70. package/dist/audit/details.d.ts +36 -1
  71. package/dist/audit/details.d.ts.map +1 -1
  72. package/dist/audit/projection.d.ts.map +1 -1
  73. package/dist/audit/trace-schema.d.ts +50 -0
  74. package/dist/audit/trace-schema.d.ts.map +1 -0
  75. package/dist/audit/trace.d.ts +2 -48
  76. package/dist/audit/trace.d.ts.map +1 -1
  77. package/dist/chunks/chunk-2RWNVCFD.js +483 -0
  78. package/dist/chunks/chunk-2RWNVCFD.js.map +7 -0
  79. package/dist/chunks/chunk-2SCMGO2Z.js +16 -0
  80. package/dist/chunks/chunk-2SCMGO2Z.js.map +7 -0
  81. package/dist/chunks/chunk-35EEGOH3.js +324 -0
  82. package/dist/chunks/chunk-35EEGOH3.js.map +7 -0
  83. package/dist/chunks/{chunk-3FJUP3GV.js → chunk-36XQFTEN.js} +2 -2
  84. package/dist/chunks/{chunk-UTOBAZ5T.js → chunk-37NIOSVU.js} +1 -1
  85. package/dist/chunks/chunk-37NIOSVU.js.map +7 -0
  86. package/dist/chunks/chunk-3IJEQBFS.js +25 -0
  87. package/dist/chunks/chunk-3IJEQBFS.js.map +7 -0
  88. package/dist/chunks/{chunk-EHQQ4KCX.js → chunk-3MOY6WIB.js} +84 -19
  89. package/dist/chunks/chunk-3MOY6WIB.js.map +7 -0
  90. package/dist/chunks/chunk-3PKZSIRA.js +1312 -0
  91. package/dist/chunks/chunk-3PKZSIRA.js.map +7 -0
  92. package/dist/chunks/chunk-3VK6UGAN.js +64 -0
  93. package/dist/chunks/chunk-3VK6UGAN.js.map +7 -0
  94. package/dist/chunks/{chunk-ROTCDDOV.js → chunk-3XT5WHSG.js} +59 -119
  95. package/dist/chunks/chunk-3XT5WHSG.js.map +7 -0
  96. package/dist/chunks/{chunk-FIDUHKMM.js → chunk-4BYS4ZLY.js} +16 -16
  97. package/dist/chunks/chunk-4BYS4ZLY.js.map +7 -0
  98. package/dist/chunks/{chunk-K7J2ABAZ.js → chunk-4KX6BIPL.js} +91 -31
  99. package/dist/chunks/chunk-4KX6BIPL.js.map +7 -0
  100. package/dist/chunks/{chunk-UOM37PE4.js → chunk-4PBW54I2.js} +162 -92
  101. package/dist/chunks/chunk-4PBW54I2.js.map +7 -0
  102. package/dist/chunks/{chunk-ZEXCKK4K.js → chunk-4WKD3YM3.js} +3 -3
  103. package/dist/chunks/{chunk-PK4NIJEV.js → chunk-4XMXFHAR.js} +62 -3
  104. package/dist/chunks/chunk-4XMXFHAR.js.map +7 -0
  105. package/dist/chunks/{chunk-4EW7GVUR.js → chunk-56NMRVTV.js} +589 -377
  106. package/dist/chunks/chunk-56NMRVTV.js.map +7 -0
  107. package/dist/chunks/{chunk-GIK2WNAK.js → chunk-5BOTHX47.js} +109 -20
  108. package/dist/chunks/chunk-5BOTHX47.js.map +7 -0
  109. package/dist/chunks/chunk-5QJFDKPN.js +179 -0
  110. package/dist/chunks/chunk-5QJFDKPN.js.map +7 -0
  111. package/dist/chunks/{chunk-P7CBPPHY.js → chunk-6GWDGTHC.js} +5 -5
  112. package/dist/chunks/{chunk-P7CBPPHY.js.map → chunk-6GWDGTHC.js.map} +1 -1
  113. package/dist/chunks/chunk-6HO2IUQ5.js +104 -0
  114. package/dist/chunks/chunk-6HO2IUQ5.js.map +7 -0
  115. package/dist/chunks/chunk-6OGYPHNQ.js +62 -0
  116. package/dist/chunks/chunk-6OGYPHNQ.js.map +7 -0
  117. package/dist/chunks/{chunk-GO32KSEZ.js → chunk-7CIES6X2.js} +84 -9
  118. package/dist/chunks/chunk-7CIES6X2.js.map +7 -0
  119. package/dist/chunks/{chunk-G4TLWHRS.js → chunk-7N7IC3Z2.js} +4 -3
  120. package/dist/chunks/{chunk-G4TLWHRS.js.map → chunk-7N7IC3Z2.js.map} +2 -2
  121. package/dist/chunks/{chunk-5XBYFSI5.js → chunk-7YNE4NB2.js} +2 -2
  122. package/dist/chunks/{chunk-NTC2MCB6.js → chunk-B5L3X3ID.js} +1 -1
  123. package/dist/chunks/{chunk-NTC2MCB6.js.map → chunk-B5L3X3ID.js.map} +1 -1
  124. package/dist/chunks/chunk-BIBRWZWQ.js +325 -0
  125. package/dist/chunks/chunk-BIBRWZWQ.js.map +7 -0
  126. package/dist/chunks/{chunk-K6QXUGS5.js → chunk-BMAEZNZ5.js} +2 -1
  127. package/dist/chunks/{chunk-FSB2VIRZ.js → chunk-CBIV747V.js} +14 -3
  128. package/dist/chunks/chunk-CBIV747V.js.map +7 -0
  129. package/dist/chunks/{chunk-CCHZXF6K.js → chunk-CXYJJ3HZ.js} +3 -3
  130. package/dist/chunks/{chunk-R2XQ6AHT.js → chunk-DGERP4VL.js} +22 -10
  131. package/dist/chunks/chunk-DGERP4VL.js.map +7 -0
  132. package/dist/chunks/chunk-F2LGSRIN.js +38 -0
  133. package/dist/chunks/chunk-F2LGSRIN.js.map +7 -0
  134. package/dist/chunks/chunk-F6A6MQ6G.js +609 -0
  135. package/dist/chunks/chunk-F6A6MQ6G.js.map +7 -0
  136. package/dist/chunks/{chunk-IR3PIHJM.js → chunk-FK73YJKV.js} +67 -2
  137. package/dist/chunks/chunk-FK73YJKV.js.map +7 -0
  138. package/dist/chunks/{chunk-VYQV5JRT.js → chunk-GJVKEHDL.js} +2 -2
  139. package/dist/chunks/chunk-GJVKEHDL.js.map +7 -0
  140. package/dist/chunks/{chunk-TIIIHPHF.js → chunk-GS67KDMV.js} +2 -2
  141. package/dist/chunks/{chunk-D5NYNIST.js → chunk-H57KPL3V.js} +5 -5
  142. package/dist/chunks/{chunk-KVYNGDGC.js → chunk-HFDJWLMS.js} +6 -6
  143. package/dist/chunks/{chunk-KVYNGDGC.js.map → chunk-HFDJWLMS.js.map} +1 -1
  144. package/dist/chunks/{chunk-INRXG4J5.js → chunk-HGD75NZY.js} +2 -2
  145. package/dist/chunks/{chunk-CRRUW26I.js → chunk-HRDMBGMY.js} +12 -12
  146. package/dist/chunks/{chunk-CRRUW26I.js.map → chunk-HRDMBGMY.js.map} +2 -2
  147. package/dist/chunks/{chunk-MLLYR3Y6.js → chunk-HSEZPCL5.js} +19 -78
  148. package/dist/chunks/chunk-HSEZPCL5.js.map +7 -0
  149. package/dist/chunks/{chunk-LNASO4VT.js → chunk-IOGDTIGN.js} +44 -19
  150. package/dist/chunks/chunk-IOGDTIGN.js.map +7 -0
  151. package/dist/chunks/chunk-JMUUNW2H.js +65 -0
  152. package/dist/chunks/chunk-JMUUNW2H.js.map +7 -0
  153. package/dist/chunks/{chunk-UXIBKMUM.js → chunk-KIFOEBYJ.js} +4 -4
  154. package/dist/chunks/{chunk-SPCJXN4K.js → chunk-LKYLD5SN.js} +298 -65
  155. package/dist/chunks/chunk-LKYLD5SN.js.map +7 -0
  156. package/dist/chunks/{chunk-FUY6XVRX.js → chunk-MPMEK3IQ.js} +2 -2
  157. package/dist/chunks/{chunk-HP5P7NBO.js → chunk-MSDL7U6Q.js} +4 -4
  158. package/dist/chunks/chunk-N7ZAK2PB.js +132 -0
  159. package/dist/chunks/chunk-N7ZAK2PB.js.map +7 -0
  160. package/dist/chunks/{chunk-VSDUSNIA.js → chunk-NBIYYMKS.js} +8 -2
  161. package/dist/chunks/chunk-NBIYYMKS.js.map +7 -0
  162. package/dist/chunks/chunk-NENQZCGW.js +45 -0
  163. package/dist/chunks/chunk-NENQZCGW.js.map +7 -0
  164. package/dist/chunks/chunk-NJHJKINP.js +47 -0
  165. package/dist/chunks/chunk-NJHJKINP.js.map +7 -0
  166. package/dist/chunks/{chunk-U366I5K2.js → chunk-NQ7IWEIF.js} +18 -6
  167. package/dist/chunks/chunk-NQ7IWEIF.js.map +7 -0
  168. package/dist/chunks/{chunk-ZQMBS5SH.js → chunk-OJ4HAALD.js} +15 -12
  169. package/dist/chunks/chunk-OJ4HAALD.js.map +7 -0
  170. package/dist/chunks/chunk-OZCJU3PZ.js +33 -0
  171. package/dist/chunks/chunk-OZCJU3PZ.js.map +7 -0
  172. package/dist/chunks/chunk-P3DCXKL3.js +40 -0
  173. package/dist/chunks/chunk-P3DCXKL3.js.map +7 -0
  174. package/dist/chunks/chunk-P7YSPKTM.js +294 -0
  175. package/dist/chunks/chunk-P7YSPKTM.js.map +7 -0
  176. package/dist/chunks/chunk-PQVUMJ5J.js +223 -0
  177. package/dist/chunks/chunk-PQVUMJ5J.js.map +7 -0
  178. package/dist/chunks/chunk-PUBHBEYO.js +84 -0
  179. package/dist/chunks/chunk-PUBHBEYO.js.map +7 -0
  180. package/dist/chunks/{chunk-P4KH4S4S.js → chunk-QGTD3LAZ.js} +5 -20
  181. package/dist/chunks/chunk-QGTD3LAZ.js.map +7 -0
  182. package/dist/chunks/{chunk-TIJ3YQXX.js → chunk-QOEOKW2X.js} +2 -2
  183. package/dist/chunks/{chunk-TIJ3YQXX.js.map → chunk-QOEOKW2X.js.map} +1 -1
  184. package/dist/chunks/{chunk-QT4W5YVB.js → chunk-RAA3FAYZ.js} +2 -2
  185. package/dist/chunks/{chunk-WJJXODAB.js → chunk-RLKRZXSX.js} +8 -1
  186. package/dist/chunks/{chunk-WJJXODAB.js.map → chunk-RLKRZXSX.js.map} +2 -2
  187. package/dist/chunks/chunk-RWKQ5SRW.js +129 -0
  188. package/dist/chunks/chunk-RWKQ5SRW.js.map +7 -0
  189. package/dist/chunks/chunk-SW25R47N.js +71 -0
  190. package/dist/chunks/chunk-SW25R47N.js.map +7 -0
  191. package/dist/chunks/{chunk-EFETPXU2.js → chunk-TJZYM2SP.js} +118 -237
  192. package/dist/chunks/chunk-TJZYM2SP.js.map +7 -0
  193. package/dist/chunks/{chunk-53N2I4QA.js → chunk-TXCNZCZP.js} +2 -2
  194. package/dist/chunks/chunk-UD7LFV43.js +28 -0
  195. package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
  196. package/dist/chunks/{chunk-ASSLHWZS.js → chunk-UFMYN5TA.js} +2 -2
  197. package/dist/chunks/{chunk-7QKKLBHJ.js → chunk-UPMWLOKL.js} +10 -1
  198. package/dist/chunks/{chunk-7QKKLBHJ.js.map → chunk-UPMWLOKL.js.map} +2 -2
  199. package/dist/chunks/chunk-V4OW2ULC.js +422 -0
  200. package/dist/chunks/chunk-V4OW2ULC.js.map +7 -0
  201. package/dist/chunks/{chunk-FE6NOAO7.js → chunk-VNWQIGQL.js} +1820 -649
  202. package/dist/chunks/chunk-VNWQIGQL.js.map +7 -0
  203. package/dist/chunks/{chunk-PYFJW3HC.js → chunk-W5FEHVZA.js} +2 -16
  204. package/dist/chunks/{chunk-PYFJW3HC.js.map → chunk-W5FEHVZA.js.map} +3 -3
  205. package/dist/chunks/{chunk-XCEEQ5AB.js → chunk-WGMCNCP6.js} +1567 -1564
  206. package/dist/chunks/chunk-WGMCNCP6.js.map +7 -0
  207. package/dist/chunks/chunk-WKFRGICG.js +101 -0
  208. package/dist/chunks/chunk-WKFRGICG.js.map +7 -0
  209. package/dist/chunks/{chunk-3UGN25XS.js → chunk-WWTGWGH7.js} +80 -1662
  210. package/dist/chunks/chunk-WWTGWGH7.js.map +7 -0
  211. package/dist/chunks/{chunk-5UBRGTVN.js → chunk-X7QETPBC.js} +31 -15
  212. package/dist/chunks/chunk-X7QETPBC.js.map +7 -0
  213. package/dist/chunks/{chunk-LEU5CDSL.js → chunk-XFOSUGLU.js} +5 -5
  214. package/dist/chunks/{chunk-MZUC6LLH.js → chunk-XMYG2TKR.js} +4 -4
  215. package/dist/chunks/{chunk-MZUC6LLH.js.map → chunk-XMYG2TKR.js.map} +1 -1
  216. package/dist/chunks/chunk-YC65P7ZO.js +57 -0
  217. package/dist/chunks/chunk-YC65P7ZO.js.map +7 -0
  218. package/dist/chunks/{chunk-EKODKR6Y.js → chunk-YHFWMAQ5.js} +1 -24
  219. package/dist/chunks/chunk-YHFWMAQ5.js.map +7 -0
  220. package/dist/chunks/{chunk-C7Z6F3SO.js → chunk-ZFWICFNJ.js} +27 -20
  221. package/dist/chunks/{chunk-C7Z6F3SO.js.map → chunk-ZFWICFNJ.js.map} +2 -2
  222. package/dist/cli/decisions.d.ts.map +1 -1
  223. package/dist/cli/decisions.js +15 -3
  224. package/dist/cli/decisions.js.map +2 -2
  225. package/dist/cli/mesh.js +4 -3
  226. package/dist/cli/mesh.js.map +1 -1
  227. package/dist/commands/fabric-handler.d.ts +7 -0
  228. package/dist/commands/fabric-handler.d.ts.map +1 -0
  229. package/dist/commands/fabric-handler.js +916 -0
  230. package/dist/commands/fabric-handler.js.map +7 -0
  231. package/dist/commands/fabric.d.ts +11 -1
  232. package/dist/commands/fabric.d.ts.map +1 -1
  233. package/dist/compaction/claim-events.d.ts +61 -0
  234. package/dist/compaction/claim-events.d.ts.map +1 -0
  235. package/dist/compaction/claim-events.js +210 -0
  236. package/dist/compaction/claim-events.js.map +7 -0
  237. package/dist/compaction/claim.d.ts +51 -0
  238. package/dist/compaction/claim.d.ts.map +1 -0
  239. package/dist/compaction/hook.d.ts +28 -2
  240. package/dist/compaction/hook.d.ts.map +1 -1
  241. package/dist/compaction/hook.js +12 -7
  242. package/dist/compaction/owner.js +9 -8
  243. package/dist/compaction/trace-events.d.ts +1 -1
  244. package/dist/compaction/trace-events.d.ts.map +1 -1
  245. package/dist/components/configuration.js +6 -6
  246. package/dist/components/effect-scope.d.ts.map +1 -1
  247. package/dist/config.d.ts +39 -2
  248. package/dist/config.d.ts.map +1 -1
  249. package/dist/core/action-arguments.d.ts.map +1 -1
  250. package/dist/core/action-policy-hooks.d.ts +69 -0
  251. package/dist/core/action-policy-hooks.d.ts.map +1 -0
  252. package/dist/core/action-registry.d.ts +31 -10
  253. package/dist/core/action-registry.d.ts.map +1 -1
  254. package/dist/core/action-registry.js +12 -9
  255. package/dist/core/approval-controller.d.ts +23 -3
  256. package/dist/core/approval-controller.d.ts.map +1 -1
  257. package/dist/core/atomic-write.d.ts +164 -0
  258. package/dist/core/atomic-write.d.ts.map +1 -1
  259. package/dist/core/child-tool-allowlist.d.ts +17 -1
  260. package/dist/core/child-tool-allowlist.d.ts.map +1 -1
  261. package/dist/core/compact-controller.d.ts +34 -0
  262. package/dist/core/compact-controller.d.ts.map +1 -1
  263. package/dist/core/core-override-guidance.d.ts +3 -1
  264. package/dist/core/core-override-guidance.d.ts.map +1 -1
  265. package/dist/core/file-lock.d.ts.map +1 -1
  266. package/dist/core/foreground-tools.d.ts +4 -1
  267. package/dist/core/foreground-tools.d.ts.map +1 -1
  268. package/dist/core/host-policy.d.ts +43 -0
  269. package/dist/core/host-policy.d.ts.map +1 -0
  270. package/dist/core/host-sdk-runtime.d.ts.map +1 -1
  271. package/dist/core/host-sdk.d.ts.map +1 -1
  272. package/dist/core/host-sdk.js +1 -1
  273. package/dist/core/managed-host-guidance.d.ts +5 -0
  274. package/dist/core/managed-host-guidance.d.ts.map +1 -0
  275. package/dist/core/model-aliases.d.ts +22 -0
  276. package/dist/core/model-aliases.d.ts.map +1 -0
  277. package/dist/core/model-resolution.d.ts +41 -20
  278. package/dist/core/model-resolution.d.ts.map +1 -1
  279. package/dist/core/native-tool-result.d.ts +1 -0
  280. package/dist/core/native-tool-result.d.ts.map +1 -1
  281. package/dist/core/program-tasks.d.ts +52 -0
  282. package/dist/core/program-tasks.d.ts.map +1 -0
  283. package/dist/core/prompt-guidance.d.ts +5 -0
  284. package/dist/core/prompt-guidance.d.ts.map +1 -0
  285. package/dist/core/prompt-guidance.js +159 -0
  286. package/dist/core/prompt-guidance.js.map +7 -0
  287. package/dist/core/provider-operations.d.ts.map +1 -1
  288. package/dist/core/provider-operations.js +60 -108
  289. package/dist/core/provider-operations.js.map +3 -3
  290. package/dist/core/shell-inbox.d.ts.map +1 -1
  291. package/dist/core/shell-jobs.d.ts +7 -5
  292. package/dist/core/shell-jobs.d.ts.map +1 -1
  293. package/dist/core/shell-timing.d.ts.map +1 -1
  294. package/dist/core/skill-prompt.d.ts +1 -1
  295. package/dist/core/skill-prompt.d.ts.map +1 -1
  296. package/dist/core/skill-references.d.ts +1 -1
  297. package/dist/core/skill-references.d.ts.map +1 -1
  298. package/dist/core/system-guidance.d.ts.map +1 -1
  299. package/dist/core/tool-result-proxy.d.ts.map +1 -1
  300. package/dist/decisions/command.d.ts +2 -1
  301. package/dist/decisions/command.d.ts.map +1 -1
  302. package/dist/decisions/command.js +40 -12
  303. package/dist/decisions/command.js.map +2 -2
  304. package/dist/decisions/events.d.ts +12 -0
  305. package/dist/decisions/events.d.ts.map +1 -0
  306. package/dist/decisions/events.js +130 -0
  307. package/dist/decisions/events.js.map +7 -0
  308. package/dist/decisions/host.d.ts +31 -3
  309. package/dist/decisions/host.d.ts.map +1 -1
  310. package/dist/decisions/render.d.ts +44 -0
  311. package/dist/decisions/render.d.ts.map +1 -0
  312. package/dist/decisions/store.d.ts +8 -0
  313. package/dist/decisions/store.d.ts.map +1 -1
  314. package/dist/durable/agent.d.ts +8 -0
  315. package/dist/durable/agent.d.ts.map +1 -1
  316. package/dist/durable/extension-load-error.d.ts +8 -0
  317. package/dist/durable/extension-load-error.d.ts.map +1 -0
  318. package/dist/durable/session.d.ts +1 -0
  319. package/dist/durable/session.d.ts.map +1 -1
  320. package/dist/durable/worker-host.d.ts +10 -1
  321. package/dist/durable/worker-host.d.ts.map +1 -1
  322. package/dist/durable/worker-host.js +10 -1181
  323. package/dist/durable/worker-host.js.map +4 -4
  324. package/dist/durable/worker-options.d.ts +3 -0
  325. package/dist/durable/worker-options.d.ts.map +1 -1
  326. package/dist/durable/worker-role-seed.d.ts +82 -0
  327. package/dist/durable/worker-role-seed.d.ts.map +1 -0
  328. package/dist/durable/worker.js +43 -4
  329. package/dist/durable/worker.js.map +2 -2
  330. package/dist/durable-controls.d.ts.map +1 -1
  331. package/dist/durable-extension-wasm.d.ts +8 -0
  332. package/dist/durable-extension-wasm.d.ts.map +1 -0
  333. package/dist/durable-extension-wasm.js +32 -0
  334. package/dist/durable-extension-wasm.js.map +7 -0
  335. package/dist/durable-extension.d.ts +94 -0
  336. package/dist/durable-extension.d.ts.map +1 -0
  337. package/dist/durable-extension.js +649 -0
  338. package/dist/durable-extension.js.map +7 -0
  339. package/dist/durable-host.d.ts +8 -0
  340. package/dist/durable-host.d.ts.map +1 -0
  341. package/dist/durable-host.js +20 -0
  342. package/dist/durable-host.js.map +7 -0
  343. package/dist/durable-journal.d.ts +94 -0
  344. package/dist/durable-journal.d.ts.map +1 -0
  345. package/dist/durable.d.ts.map +1 -1
  346. package/dist/durable.js +10 -8
  347. package/dist/durable.js.map +2 -2
  348. package/dist/entropy/index.js +12 -10
  349. package/dist/entropy/pool-store.d.ts.map +1 -1
  350. package/dist/execution-service.d.ts +14 -0
  351. package/dist/execution-service.d.ts.map +1 -1
  352. package/dist/extension-bootstrap.d.ts.map +1 -1
  353. package/dist/extension-bootstrap.js +28 -27
  354. package/dist/extension-bootstrap.js.map +2 -2
  355. package/dist/extension-copy.d.ts +21 -0
  356. package/dist/extension-copy.d.ts.map +1 -0
  357. package/dist/extension-copy.js +90 -0
  358. package/dist/extension-copy.js.map +7 -0
  359. package/dist/extension.d.ts +1 -1
  360. package/dist/extension.d.ts.map +1 -1
  361. package/dist/fabric-exec-arguments.d.ts.map +1 -1
  362. package/dist/fabric-exec-tool.d.ts +2 -1
  363. package/dist/fabric-exec-tool.d.ts.map +1 -1
  364. package/dist/fabric-runtime-state.d.ts +19 -0
  365. package/dist/fabric-runtime-state.d.ts.map +1 -1
  366. package/dist/fabric-runtime-state.js +2125 -786
  367. package/dist/fabric-runtime-state.js.map +4 -4
  368. package/dist/fabric-state.d.ts +44 -1
  369. package/dist/fabric-state.d.ts.map +1 -1
  370. package/dist/index.d.ts +5 -3
  371. package/dist/index.d.ts.map +1 -1
  372. package/dist/index.js +88 -53
  373. package/dist/index.js.map +2 -2
  374. package/dist/jev/client.js +2 -2
  375. package/dist/jev/manager.d.ts +3 -0
  376. package/dist/jev/manager.d.ts.map +1 -1
  377. package/dist/jev/observation.d.ts +1 -1
  378. package/dist/jev/observation.js +6 -6
  379. package/dist/jev-fabric/bridge.d.ts.map +1 -1
  380. package/dist/jev.js +11 -12
  381. package/dist/managed-host.d.ts +13 -0
  382. package/dist/managed-host.d.ts.map +1 -1
  383. package/dist/memory/digest.js +2 -2
  384. package/dist/memory/discovery.js +6 -7
  385. package/dist/memory/file-worker.js +10 -11
  386. package/dist/memory/file-worker.js.map +1 -1
  387. package/dist/memory/normalize.js +5 -6
  388. package/dist/memory/search.js +7 -8
  389. package/dist/memory/worker-provider.js +11 -12
  390. package/dist/memory.js +11 -12
  391. package/dist/memory.js.map +1 -1
  392. package/dist/mesh/grants.d.ts +3 -3
  393. package/dist/mesh/grants.d.ts.map +1 -1
  394. package/dist/mesh/store.d.ts +8 -0
  395. package/dist/mesh/store.d.ts.map +1 -1
  396. package/dist/native-codemode.d.ts.map +1 -1
  397. package/dist/native-tool-catalog.d.ts.map +1 -1
  398. package/dist/native-tool-catalog.js +12 -3
  399. package/dist/native-tool-catalog.js.map +2 -2
  400. package/dist/programs/host.d.ts +18 -6
  401. package/dist/programs/host.d.ts.map +1 -1
  402. package/dist/programs/host.js +71 -47
  403. package/dist/programs/host.js.map +2 -2
  404. package/dist/programs/source.d.ts +11 -0
  405. package/dist/programs/source.d.ts.map +1 -1
  406. package/dist/programs/store.d.ts.map +1 -1
  407. package/dist/protocol.d.ts +504 -8
  408. package/dist/protocol.d.ts.map +1 -1
  409. package/dist/protocol.js +41 -11
  410. package/dist/provider-globals.d.ts +13 -0
  411. package/dist/provider-globals.d.ts.map +1 -0
  412. package/dist/providers/agents-actions.d.ts.map +1 -1
  413. package/dist/providers/agents-provider.d.ts +3 -0
  414. package/dist/providers/agents-provider.d.ts.map +1 -1
  415. package/dist/providers/captured-tools-provider.d.ts +5 -0
  416. package/dist/providers/captured-tools-provider.d.ts.map +1 -1
  417. package/dist/providers/compact-provider.d.ts +4 -1
  418. package/dist/providers/compact-provider.d.ts.map +1 -1
  419. package/dist/providers/components-provider.d.ts.map +1 -1
  420. package/dist/providers/decisions-provider.d.ts +9 -1
  421. package/dist/providers/decisions-provider.d.ts.map +1 -1
  422. package/dist/providers/jev-provider.d.ts +1 -1
  423. package/dist/providers/jev-provider.js +11 -12
  424. package/dist/providers/memory-provider.js +10 -11
  425. package/dist/providers/pi-tools-provider.d.ts +14 -0
  426. package/dist/providers/pi-tools-provider.d.ts.map +1 -1
  427. package/dist/providers/programs-provider.d.ts.map +1 -1
  428. package/dist/providers/sessions-provider.d.ts +7 -0
  429. package/dist/providers/sessions-provider.d.ts.map +1 -1
  430. package/dist/repeat-guard.d.ts +7 -6
  431. package/dist/repeat-guard.d.ts.map +1 -1
  432. package/dist/residency/actor-client.js +3 -3
  433. package/dist/residency/client.d.ts +15 -0
  434. package/dist/residency/client.d.ts.map +1 -1
  435. package/dist/residency/host.d.ts.map +1 -1
  436. package/dist/residency/host.js +34 -23
  437. package/dist/residency/launcher.js +1 -1
  438. package/dist/residency/pi-entry.js +34 -23
  439. package/dist/residency/pi-entry.js.map +1 -1
  440. package/dist/residency/protocol.d.ts +2 -0
  441. package/dist/residency/protocol.d.ts.map +1 -1
  442. package/dist/runners.js +11 -1
  443. package/dist/runners.js.map +2 -2
  444. package/dist/runtime/core-override-guest-types.js +2 -2
  445. package/dist/runtime/cpython-child-source.d.ts.map +1 -1
  446. package/dist/runtime/cpython-runtime.d.ts.map +1 -1
  447. package/dist/runtime/cpython-runtime.js +51 -21
  448. package/dist/runtime/cpython-runtime.js.map +2 -2
  449. package/dist/runtime/deadline-pause.d.ts +2 -0
  450. package/dist/runtime/deadline-pause.d.ts.map +1 -1
  451. package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
  452. package/dist/runtime/dynamic-guest-types.js +2 -1
  453. package/dist/runtime/exec-journal.d.ts +73 -0
  454. package/dist/runtime/exec-journal.d.ts.map +1 -0
  455. package/dist/runtime/exec-journal.js +335 -0
  456. package/dist/runtime/exec-journal.js.map +7 -0
  457. package/dist/runtime/guest-types.d.ts +3 -2
  458. package/dist/runtime/guest-types.d.ts.map +1 -1
  459. package/dist/runtime/guest-types.js +1 -1
  460. package/dist/runtime/journal-shim.d.ts +3 -0
  461. package/dist/runtime/journal-shim.d.ts.map +1 -0
  462. package/dist/runtime/kernel.d.ts +95 -1
  463. package/dist/runtime/kernel.d.ts.map +1 -1
  464. package/dist/runtime/monty-bridge.d.ts +6 -2
  465. package/dist/runtime/monty-bridge.d.ts.map +1 -1
  466. package/dist/runtime/monty-runtime.d.ts.map +1 -1
  467. package/dist/runtime/monty-runtime.js +27 -15
  468. package/dist/runtime/monty-runtime.js.map +2 -2
  469. package/dist/runtime/native-codemode-guest.d.ts.map +1 -1
  470. package/dist/runtime/node-process-runtime.d.ts.map +1 -1
  471. package/dist/runtime/node-process-runtime.js +7 -5
  472. package/dist/runtime/quickjs-runtime.d.ts +7 -1
  473. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  474. package/dist/runtime/quickjs-runtime.js +5 -4
  475. package/dist/runtime/sha256.d.ts +4 -0
  476. package/dist/runtime/sha256.d.ts.map +1 -0
  477. package/dist/runtime/transpile.d.ts +8 -0
  478. package/dist/runtime/transpile.d.ts.map +1 -0
  479. package/dist/runtime/type-checker.d.ts +1 -7
  480. package/dist/runtime/type-checker.d.ts.map +1 -1
  481. package/dist/runtime/type-checker.js +4 -2
  482. package/dist/runtime/typescript-kernel.js +13 -10
  483. package/dist/runtime/typescript-kernel.js.map +1 -1
  484. package/dist/runtime-state-builtins.d.ts.map +1 -1
  485. package/dist/speculation/scanner.js +1 -1
  486. package/dist/speculation/store.d.ts +7 -16
  487. package/dist/speculation/store.d.ts.map +1 -1
  488. package/dist/speculation/types.d.ts +1 -0
  489. package/dist/speculation/types.d.ts.map +1 -1
  490. package/dist/storage/retention.d.ts.map +1 -1
  491. package/dist/topology/participant-directory.d.ts +26 -1
  492. package/dist/topology/participant-directory.d.ts.map +1 -1
  493. package/dist/topology/peer-presence.d.ts.map +1 -1
  494. package/dist/topology/peer-settle.js +11 -0
  495. package/dist/topology/peer-settle.js.map +7 -0
  496. package/dist/topology/session-label-settings.d.ts +13 -0
  497. package/dist/topology/session-label-settings.d.ts.map +1 -0
  498. package/dist/topology/session-label.d.ts +60 -0
  499. package/dist/topology/session-label.d.ts.map +1 -0
  500. package/dist/topology/types.d.ts +27 -0
  501. package/dist/topology/types.d.ts.map +1 -1
  502. package/dist/type-error-guidance.js +1 -1
  503. package/dist/ui/controller.d.ts +1 -0
  504. package/dist/ui/controller.d.ts.map +1 -1
  505. package/dist/ui/conversation-chrome.d.ts.map +1 -1
  506. package/dist/ui/conversation-chrome.js +3 -2
  507. package/dist/ui/conversation-commands.d.ts +1 -1
  508. package/dist/ui/conversation-commands.d.ts.map +1 -1
  509. package/dist/ui/conversation-native-reader.js +2 -2
  510. package/dist/ui/conversation-selection.d.ts +4 -1
  511. package/dist/ui/conversation-selection.d.ts.map +1 -1
  512. package/dist/ui/conversation-targets.d.ts.map +1 -1
  513. package/dist/ui/conversation-targets.js +2 -2
  514. package/dist/ui/conversation.d.ts +25 -24
  515. package/dist/ui/conversation.d.ts.map +1 -1
  516. package/dist/ui/conversation.js +170 -339
  517. package/dist/ui/conversation.js.map +2 -2
  518. package/dist/ui/core-tool-render.d.ts +1 -0
  519. package/dist/ui/core-tool-render.d.ts.map +1 -1
  520. package/dist/ui/dashboard.d.ts.map +1 -1
  521. package/dist/ui/dashboard.js +17 -13
  522. package/dist/ui/dashboard.js.map +2 -2
  523. package/dist/ui/fabric-render.d.ts +6 -0
  524. package/dist/ui/fabric-render.d.ts.map +1 -1
  525. package/dist/ui/footer-dock.d.ts +48 -0
  526. package/dist/ui/footer-dock.d.ts.map +1 -0
  527. package/dist/ui/format.d.ts +7 -0
  528. package/dist/ui/format.d.ts.map +1 -1
  529. package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
  530. package/dist/ui/settings-sections-presentation.d.ts.map +1 -1
  531. package/dist/ui/settings-values.d.ts +1 -0
  532. package/dist/ui/settings-values.d.ts.map +1 -1
  533. package/dist/ui/settings.js +59 -18
  534. package/dist/ui/settings.js.map +2 -2
  535. package/dist/ui/shell-hang-keys.d.ts +8 -1
  536. package/dist/ui/shell-hang-keys.d.ts.map +1 -1
  537. package/dist/ui/shell-tasks.d.ts +2 -2
  538. package/dist/ui/shell-tasks.d.ts.map +1 -1
  539. package/dist/ui/shell-tasks.js +27 -94
  540. package/dist/ui/shell-tasks.js.map +2 -2
  541. package/dist/ui/snapshot.d.ts.map +1 -1
  542. package/dist/ui/terminal-title.d.ts +41 -0
  543. package/dist/ui/terminal-title.d.ts.map +1 -0
  544. package/dist/ui/types.d.ts +4 -0
  545. package/dist/ui/types.d.ts.map +1 -1
  546. package/dist/ui/widget-keys.d.ts +5 -0
  547. package/dist/ui/widget-keys.d.ts.map +1 -0
  548. package/dist/ui/widget.d.ts +34 -16
  549. package/dist/ui/widget.d.ts.map +1 -1
  550. package/dist/ui/word-diff/line-emphasis.js +1603 -0
  551. package/dist/ui/word-diff/line-emphasis.js.map +7 -0
  552. package/dist/util.d.ts +2 -0
  553. package/dist/util.d.ts.map +1 -1
  554. package/dist/verified/authority.d.ts +2 -2
  555. package/dist/verified/authority.d.ts.map +1 -1
  556. package/dist/verified/budget.d.ts +4 -0
  557. package/dist/verified/budget.d.ts.map +1 -0
  558. package/dist/verified/generated/actor-name.d.ts +4 -0
  559. package/dist/verified/generated/actor-name.js +17 -0
  560. package/dist/verified/generated/authority.d.ts +4 -0
  561. package/dist/verified/generated/authority.js +28 -0
  562. package/dist/verified/generated/budget.d.ts +4 -0
  563. package/dist/verified/generated/budget.js +17 -0
  564. package/dist/verified/generated/compaction.d.ts +4 -0
  565. package/dist/verified/generated/compaction.js +19 -0
  566. package/dist/verified/generated/grants.d.ts +4 -0
  567. package/dist/verified/generated/grants.js +17 -0
  568. package/dist/verified/generated/lifecycle.d.ts +4 -0
  569. package/dist/verified/generated/lifecycle.js +50 -0
  570. package/dist/verified/generated/manifest.json +137 -48
  571. package/dist/verified/generated/policy.d.ts +17 -0
  572. package/dist/verified/generated/policy.js +211 -0
  573. package/dist/verified/generated/provider.d.ts +4 -0
  574. package/dist/verified/generated/provider.js +18 -0
  575. package/dist/verified/generated/resources.d.ts +6 -0
  576. package/dist/verified/generated/resources.js +73 -0
  577. package/dist/verified/generated/speculation.d.ts +6 -0
  578. package/dist/verified/generated/speculation.js +48 -0
  579. package/dist/verified/generated/storage.d.ts +4 -0
  580. package/dist/verified/generated/storage.js +18 -0
  581. package/dist/verified/grants.d.ts +22 -0
  582. package/dist/verified/grants.d.ts.map +1 -0
  583. package/dist/verified/lifecycle.d.ts +31 -0
  584. package/dist/verified/lifecycle.d.ts.map +1 -0
  585. package/dist/verified/machine.d.ts +18 -0
  586. package/dist/verified/machine.d.ts.map +1 -0
  587. package/dist/verified/memory.d.ts +1 -1
  588. package/dist/verified/memory.d.ts.map +1 -1
  589. package/dist/verified/nat.d.ts +1 -1
  590. package/dist/verified/nat.d.ts.map +1 -1
  591. package/dist/verified/policy.d.ts +17 -5
  592. package/dist/verified/policy.d.ts.map +1 -1
  593. package/dist/verified/provider.d.ts +22 -0
  594. package/dist/verified/provider.d.ts.map +1 -0
  595. package/dist/verified/resources.d.ts +21 -7
  596. package/dist/verified/resources.d.ts.map +1 -1
  597. package/dist/verified/speculation.d.ts +36 -0
  598. package/dist/verified/speculation.d.ts.map +1 -0
  599. package/dist/verified/storage.d.ts.map +1 -1
  600. package/dist/worker/missing-install.d.ts +8 -0
  601. package/dist/worker/missing-install.d.ts.map +1 -0
  602. package/dist/worker/options.d.ts.map +1 -1
  603. package/dist/worker/options.js +25 -0
  604. package/dist/worker/options.js.map +2 -2
  605. package/dist/worker/prompt-lifecycle.d.ts +16 -0
  606. package/dist/worker/prompt-lifecycle.d.ts.map +1 -0
  607. package/dist/worker/prompt-lifecycle.js +90 -0
  608. package/dist/worker/prompt-lifecycle.js.map +7 -0
  609. package/dist/worker/questions.d.ts +15 -3
  610. package/dist/worker/questions.d.ts.map +1 -1
  611. package/dist/worker/questions.js +53 -8
  612. package/dist/worker/questions.js.map +2 -2
  613. package/dist/worker/recovery-watchdog.d.ts +22 -0
  614. package/dist/worker/recovery-watchdog.d.ts.map +1 -1
  615. package/dist/worker/recovery-watchdog.js +116 -1
  616. package/dist/worker/recovery-watchdog.js.map +2 -2
  617. package/dist/worker/result.js +1 -1
  618. package/dist/worker/result.js.map +2 -2
  619. package/dist/worker.js +131 -21
  620. package/dist/worker.js.map +2 -2
  621. package/docs/actor-name-policy-handoff.md +5 -0
  622. package/docs/agents.md +164 -17
  623. package/docs/architecture.md +5 -1
  624. package/docs/audit-trace.md +2 -1
  625. package/docs/background-tasks.md +102 -16
  626. package/docs/codemode-parity.md +2 -2
  627. package/docs/compaction.md +21 -5
  628. package/docs/components.md +1 -1
  629. package/docs/configuration.md +111 -66
  630. package/docs/decisions.md +92 -10
  631. package/docs/durable-extension.md +121 -0
  632. package/docs/durable-pi.md +306 -6
  633. package/docs/extractive-history.md +3 -1
  634. package/docs/interface.md +20 -17
  635. package/docs/jev.md +1 -1
  636. package/docs/kernels.md +1 -1
  637. package/{node_modules/pi-coralbricks-provider/LICENSE → docs/licenses/gdp-wired-mit.txt} +1 -1
  638. package/docs/managed-host-migration.md +50 -0
  639. package/docs/programmatic-compaction.md +216 -6
  640. package/docs/programs.md +23 -1
  641. package/docs/prompt-cache.md +4 -2
  642. package/docs/provider-capabilities.md +15 -14
  643. package/docs/providers.md +99 -3
  644. package/docs/shell-composition.md +15 -0
  645. package/docs/short-lock-protocol.md +90 -0
  646. package/docs/skills.md +5 -1
  647. package/docs/speculation.md +6 -0
  648. package/docs/verified-kernels.md +309 -220
  649. package/package.json +45 -24
  650. package/proofs/actor-name.ts +27 -0
  651. package/proofs/authority.ts +62 -0
  652. package/proofs/budget.ts +24 -0
  653. package/proofs/compaction.ts +51 -0
  654. package/proofs/grants.ts +39 -0
  655. package/proofs/index.ts +40 -0
  656. package/proofs/kernel.ts +44 -0
  657. package/proofs/lifecycle.ts +128 -0
  658. package/proofs/policy.ts +195 -0
  659. package/proofs/provider.ts +52 -0
  660. package/proofs/resources.ts +160 -0
  661. package/proofs/speculation.ts +69 -0
  662. package/proofs/storage.ts +66 -0
  663. package/scripts/verified-kernels.ts +141 -0
  664. package/skillsets/python/fabric-council/SKILL.md +92 -20
  665. package/skillsets/python/fabric-exec/SKILL.md +2 -2
  666. package/skillsets/python/fabric-exec/references/agents.md +10 -4
  667. package/skillsets/python/fabric-fusion/SKILL.md +1 -1
  668. package/skillsets/python/fabric-guide/SKILL.md +1 -1
  669. package/skillsets/typescript/fabric-council/SKILL.md +109 -22
  670. package/skillsets/typescript/fabric-exec/SKILL.md +7 -7
  671. package/skillsets/typescript/fabric-exec/references/agents.md +12 -3
  672. package/skillsets/typescript/fabric-fusion/SKILL.md +1 -1
  673. package/skillsets/typescript/fabric-guide/SKILL.md +1 -1
  674. package/LAWS.bend +0 -502
  675. package/PROOF.bend +0 -452
  676. package/dist/chunks/chunk-3UGN25XS.js.map +0 -7
  677. package/dist/chunks/chunk-4EW7GVUR.js.map +0 -7
  678. package/dist/chunks/chunk-5UBRGTVN.js.map +0 -7
  679. package/dist/chunks/chunk-BN7F52EG.js +0 -525
  680. package/dist/chunks/chunk-BN7F52EG.js.map +0 -7
  681. package/dist/chunks/chunk-DK35W6U7.js +0 -259
  682. package/dist/chunks/chunk-DK35W6U7.js.map +0 -7
  683. package/dist/chunks/chunk-EFETPXU2.js.map +0 -7
  684. package/dist/chunks/chunk-EHQQ4KCX.js.map +0 -7
  685. package/dist/chunks/chunk-EKODKR6Y.js.map +0 -7
  686. package/dist/chunks/chunk-FE6NOAO7.js.map +0 -7
  687. package/dist/chunks/chunk-FIDUHKMM.js.map +0 -7
  688. package/dist/chunks/chunk-FSB2VIRZ.js.map +0 -7
  689. package/dist/chunks/chunk-GIK2WNAK.js.map +0 -7
  690. package/dist/chunks/chunk-GO32KSEZ.js.map +0 -7
  691. package/dist/chunks/chunk-IR3PIHJM.js.map +0 -7
  692. package/dist/chunks/chunk-ITVLKXCI.js +0 -266
  693. package/dist/chunks/chunk-ITVLKXCI.js.map +0 -7
  694. package/dist/chunks/chunk-K7J2ABAZ.js.map +0 -7
  695. package/dist/chunks/chunk-KJZAOENY.js +0 -212
  696. package/dist/chunks/chunk-KJZAOENY.js.map +0 -7
  697. package/dist/chunks/chunk-LNASO4VT.js.map +0 -7
  698. package/dist/chunks/chunk-MLLYR3Y6.js.map +0 -7
  699. package/dist/chunks/chunk-P4KH4S4S.js.map +0 -7
  700. package/dist/chunks/chunk-PK4NIJEV.js.map +0 -7
  701. package/dist/chunks/chunk-Q2JQ3RYZ.js +0 -99
  702. package/dist/chunks/chunk-Q2JQ3RYZ.js.map +0 -7
  703. package/dist/chunks/chunk-R2XQ6AHT.js.map +0 -7
  704. package/dist/chunks/chunk-ROTCDDOV.js.map +0 -7
  705. package/dist/chunks/chunk-SPCJXN4K.js.map +0 -7
  706. package/dist/chunks/chunk-U366I5K2.js.map +0 -7
  707. package/dist/chunks/chunk-UKMQK5VP.js +0 -231
  708. package/dist/chunks/chunk-UKMQK5VP.js.map +0 -7
  709. package/dist/chunks/chunk-UOM37PE4.js.map +0 -7
  710. package/dist/chunks/chunk-UTOBAZ5T.js.map +0 -7
  711. package/dist/chunks/chunk-VSDUSNIA.js.map +0 -7
  712. package/dist/chunks/chunk-VTK2FEH7.js +0 -229
  713. package/dist/chunks/chunk-VTK2FEH7.js.map +0 -7
  714. package/dist/chunks/chunk-VYQV5JRT.js.map +0 -7
  715. package/dist/chunks/chunk-XCEEQ5AB.js.map +0 -7
  716. package/dist/chunks/chunk-ZLNJDTCN.js +0 -226
  717. package/dist/chunks/chunk-ZLNJDTCN.js.map +0 -7
  718. package/dist/chunks/chunk-ZQMBS5SH.js.map +0 -7
  719. package/dist/ui/conversation-shortcut.d.ts +0 -3
  720. package/dist/ui/conversation-shortcut.d.ts.map +0 -1
  721. package/dist/ui/widget-activity.d.ts +0 -21
  722. package/dist/ui/widget-activity.d.ts.map +0 -1
  723. package/dist/verified/generated/authority-kernel.d.ts +0 -10
  724. package/dist/verified/generated/authority-kernel.js +0 -127
  725. package/dist/verified/generated/kernel.d.ts +0 -31
  726. package/dist/verified/generated/kernel.js +0 -389
  727. package/dist/verified/generated/lifecycle-kernel.d.ts +0 -7
  728. package/dist/verified/generated/lifecycle-kernel.js +0 -164
  729. package/dist/verified/generated/provider-kernel.d.ts +0 -9
  730. package/dist/verified/generated/provider-kernel.js +0 -87
  731. package/dist/verified/generated/storage-kernel.d.ts +0 -11
  732. package/dist/verified/generated/storage-kernel.js +0 -107
  733. package/docs/licenses/bend-apache-2.0.txt +0 -202
  734. package/node_modules/pi-coralbricks-provider/README.md +0 -306
  735. package/node_modules/pi-coralbricks-provider/auth.ts +0 -30
  736. package/node_modules/pi-coralbricks-provider/custom-models.json +0 -1
  737. package/node_modules/pi-coralbricks-provider/deprecated-models.json +0 -1
  738. package/node_modules/pi-coralbricks-provider/guard.ts +0 -155
  739. package/node_modules/pi-coralbricks-provider/index.ts +0 -662
  740. package/node_modules/pi-coralbricks-provider/models.json +0 -88
  741. package/node_modules/pi-coralbricks-provider/package.json +0 -74
  742. package/node_modules/pi-coralbricks-provider/park.ts +0 -122
  743. package/node_modules/pi-coralbricks-provider/patch.json +0 -34
  744. package/node_modules/pi-coralbricks-provider/scripts/update-models.js +0 -658
  745. package/node_modules/pi-coralbricks-provider/settings.ts +0 -143
  746. package/node_modules/pi-coralbricks-provider/sync-policy.ts +0 -309
  747. package/proofs/abi.json +0 -308
  748. package/proofs/authority-abi.json +0 -7
  749. package/proofs/authority-kernel.bend +0 -23
  750. package/proofs/authority-proof.bend +0 -74
  751. package/proofs/authority-spec.bend +0 -30
  752. package/proofs/authority-state.bend +0 -43
  753. package/proofs/authority-types.d.ts +0 -3
  754. package/proofs/kernel.bend +0 -139
  755. package/proofs/lifecycle-abi.json +0 -3
  756. package/proofs/lifecycle-kernel.bend +0 -11
  757. package/proofs/lifecycle-proof.bend +0 -249
  758. package/proofs/lifecycle-spec.bend +0 -261
  759. package/proofs/lifecycle-types.d.ts +0 -4
  760. package/proofs/lifecycle.bend +0 -119
  761. package/proofs/provider-abi.json +0 -4
  762. package/proofs/provider-kernel.bend +0 -14
  763. package/proofs/provider-plans.bend +0 -28
  764. package/proofs/provider-spec.bend +0 -14
  765. package/proofs/provider-types.d.ts +0 -5
  766. package/proofs/resource-proof.bend +0 -633
  767. package/proofs/resource-spec.bend +0 -133
  768. package/proofs/resources.bend +0 -160
  769. package/proofs/state-kernel.bend +0 -17
  770. package/proofs/state-plans.bend +0 -40
  771. package/proofs/state-proof.bend +0 -42
  772. package/proofs/state-spec.bend +0 -26
  773. package/proofs/storage-abi.json +0 -3
  774. package/proofs/storage-kernel.bend +0 -11
  775. package/proofs/storage-plans.bend +0 -100
  776. package/proofs/storage-proof.bend +0 -176
  777. package/proofs/storage-spec.bend +0 -70
  778. package/proofs/storage-types.d.ts +0 -8
  779. package/proofs/types.d.ts +0 -7
  780. package/scripts/test-verified-kernels.mjs +0 -107
  781. package/scripts/verified-kernels.mjs +0 -176
  782. /package/dist/chunks/{chunk-3FJUP3GV.js.map → chunk-36XQFTEN.js.map} +0 -0
  783. /package/dist/chunks/{chunk-ZEXCKK4K.js.map → chunk-4WKD3YM3.js.map} +0 -0
  784. /package/dist/chunks/{chunk-5XBYFSI5.js.map → chunk-7YNE4NB2.js.map} +0 -0
  785. /package/dist/chunks/{chunk-K6QXUGS5.js.map → chunk-BMAEZNZ5.js.map} +0 -0
  786. /package/dist/chunks/{chunk-CCHZXF6K.js.map → chunk-CXYJJ3HZ.js.map} +0 -0
  787. /package/dist/chunks/{chunk-TIIIHPHF.js.map → chunk-GS67KDMV.js.map} +0 -0
  788. /package/dist/chunks/{chunk-D5NYNIST.js.map → chunk-H57KPL3V.js.map} +0 -0
  789. /package/dist/chunks/{chunk-INRXG4J5.js.map → chunk-HGD75NZY.js.map} +0 -0
  790. /package/dist/chunks/{chunk-UXIBKMUM.js.map → chunk-KIFOEBYJ.js.map} +0 -0
  791. /package/dist/chunks/{chunk-FUY6XVRX.js.map → chunk-MPMEK3IQ.js.map} +0 -0
  792. /package/dist/chunks/{chunk-HP5P7NBO.js.map → chunk-MSDL7U6Q.js.map} +0 -0
  793. /package/dist/chunks/{chunk-QT4W5YVB.js.map → chunk-RAA3FAYZ.js.map} +0 -0
  794. /package/dist/chunks/{chunk-53N2I4QA.js.map → chunk-TXCNZCZP.js.map} +0 -0
  795. /package/dist/chunks/{chunk-ASSLHWZS.js.map → chunk-UFMYN5TA.js.map} +0 -0
  796. /package/dist/chunks/{chunk-LEU5CDSL.js.map → chunk-XFOSUGLU.js.map} +0 -0
@@ -43,7 +43,74 @@ exclusive transaction prevents concurrent writers, including directory aliases;
43
43
  process death releases it without timeout-based stealing or lock-file deletion.
44
44
  Reopening the same run uses its initial run ID for idempotent submission and
45
45
  resumes checkpoints. Completed work is not repeated. An interrupted unsafe tool
46
- fails closed, including `fabric_exec`, writes, and shell commands.
46
+ fails closed, including writes and shell commands.
47
+
48
+ In the durable worker, an interrupted `fabric_exec` call can continue after a
49
+ crash. The leaf adapter below does not do this. The worker offers the call a
50
+ fence. Fabric accepts it only when every effect must cross the host bridge,
51
+ which holds for the QuickJS and Monty runtimes but not for CPython or the Node
52
+ and Bun processes. An effect is any call outside the read-only set: the tier
53
+ that speculation may run early (`pi.read`, `pi.grep`, `pi.find`, `pi.ls`, and
54
+ status and lookup actions such as `memory.recall` and `programs.get`), the
55
+ native store load, discovery, and progress reporting. A read approval that
56
+ would prompt or call the auto classifier is an effect, and so is semantic
57
+ search.
58
+
59
+ A QuickJS program writes a crash journal. Each tool result is recorded before
60
+ the program sees it, and results reach the program one at a time. Before an
61
+ effect runs, Fabric records an intent and syncs it to disk. On recovery the same
62
+ program runs again with the same clock and random seed. Recorded results are
63
+ served from the journal, so no provider, approval, or prompt runs again. Calls
64
+ after the last recorded result then run live.
65
+
66
+ A few served calls changed state that lived only in the worker process, so
67
+ Fabric redoes them from their recorded arguments, once each and in their
68
+ recorded order, before the program sees their result. `compact.request` and
69
+ `compact.cancel` are always redone. `prewalk.plan` is redone when the
70
+ restarted session's prewalk arm owes a plan, and skipped otherwise.
71
+ `compact.carry`, `thinking.set`, and `thinking.reset` are redone only when
72
+ the session entry they wrote did not survive, as with an explicit Pi runner
73
+ started with `--no-session`, so a surviving session never gets a second entry. A redo runs the
74
+ provider again under the current policy, without asking for approval again. If
75
+ a redo fails, the program stops, reports that call and its error, and runs
76
+ nothing after it. State, mesh, saved programs, and cache releases are already on
77
+ disk or safe to skip and are not redone. Schema hypotheses and certificates are
78
+ stored in the mesh and bound to the tool call, so a resumed `schema.commit`
79
+ still checks the recorded certificate: it is refused once the certificate has
80
+ expired or the workspace or state changed since verification. If a call has an intent but no
81
+ result, it may have taken effect. Fabric asks whether to run that call again
82
+ as a `select` dialog, and pauses the program deadline while it waits (a
83
+ `timeout_ms` hard deadline keeps running). Only "Run it again" repeats the
84
+ call. "Stop here", a dismissed question, a question left unanswered for 5
85
+ minutes, or more than one such call stops the program, which reports the call.
86
+ The dialog goes to the worker's RPC client. A parent agent cancels it by
87
+ default, so the program stops. With `agents.childQuestions: "route"`, a parent
88
+ session asks its person or raises a root-held decision. Fabric also
89
+ refuses to resume, and runs nothing, when the program or its settings changed, the runtime or a pinned engine version
90
+ changed, the program stops repeating its recorded calls, the journal is missing
91
+ or damaged, or a recorded result named work such as a child agent or background
92
+ task that does not survive a restart. A call resumes at most three times.
93
+
94
+ The journal holds the program's identity digest, its random seed and start
95
+ time, and for every host call its reference, an argument digest, and the full
96
+ result or error the program received. Each line carries a checksum and a hash
97
+ of the line before it, so a lost, reordered, or foreign line refuses the
98
+ resume. Lines lost from the very end cannot be detected this way; Fabric relies
99
+ on `fdatasync` to keep a synced intent. Tool output can include secrets, so the
100
+ journal is private to its owner (mode `0600`). The worker deletes it as soon as
101
+ the call's final result is committed to the durable store, whether the call
102
+ succeeded, failed, was stopped as interrupted, or was aborted. It is never
103
+ deleted before that commit. If the worker crashes between the commit and the
104
+ delete, a sweep at worker start deletes any journal a day after its last write.
105
+
106
+ Monty programs keep the earlier fence. Before the first effect, Fabric arms the
107
+ fence and the worker commits that mark. On recovery, an accepted fence that was
108
+ never armed reruns the program from the start. An armed fence, an unaccepted
109
+ one, or a second crash fails closed as before. A rerun can read different file
110
+ contents than the first attempt did. It also emits its progress and
111
+ `workflow.item` transitions again, with the same `invocationId` and item IDs,
112
+ so a listener that acts on them should deduplicate. A journal resume does the
113
+ same for the progress calls it serves.
47
114
 
48
115
  A worker's store lives in its run directory under `durable/`. Recovery never
49
116
  replays streaming updates, so each provider delta and tool progress update commits
@@ -52,6 +119,111 @@ observers from memory after that commit. The journal grows with the transcript,
52
119
  not with the square of each streamed message. Run retention removes `durable/`
53
120
  with its run, and unknown or linked files inside it still preserve the run.
54
121
 
122
+ ### Opt-in: a session file for pi-durable workers
123
+
124
+ By default a `pi-durable` child without a seeded session runs with
125
+ `--no-session`. Set `agents.durableWorkerSession: true` to have it keep a
126
+ private Pi session file at `durable-session/session.jsonl` in its run directory
127
+ (mode `0600`, folder `0700`). The journal restores messages only; the session
128
+ file restores what extensions saved in the session, such as custom entries,
129
+ context edits, and compaction, when a relaunched attempt reopens it. This
130
+ includes the relaunch described in [Opt-in: reattach after a resident host
131
+ restart](#opt-in-reattach-after-a-resident-host-restart): it reuses the run
132
+ directory, so the relaunched worker reopens the same session file. Without the
133
+ file, the redo rules above rebuild extension state from the journal, and only
134
+ some calls can be redone. With the option on, the manager also creates run
135
+ directories with mode `0700`. Explicit `pi` children keep `--no-session`
136
+ either way. Run retention removes `durable-session/` with its run; see
137
+ "Retention" below for what it accepts.
138
+
139
+ With the option off, nothing below applies: there is no session file, no
140
+ worker-role entry, and fork and handoff seeds are written as before.
141
+
142
+ ### Worker role
143
+
144
+ With `agents.durableWorkerSession`, a `pi-durable` child's session carries a worker-role entry, so a context-aware
145
+ extension in the child knows it is a worker. The entry is one custom entry in the Pi
146
+ session file:
147
+
148
+ ```json
149
+ { "type": "custom", "customType": "context-aware.policy.v1",
150
+ "data": { "schemaVersion": 1, "layer": "host", "declaredBy": "pi-fabric/durable-worker",
151
+ "values": { "sessionRole": "worker" } } }
152
+ ```
153
+
154
+ Delegation extensions write the same entry for their workers. Without it, such an
155
+ extension acts as a session with a user at a terminal: it can send a compaction seed as a new
156
+ user message, rewrite it with a model, add the cache listing, and compact in the
157
+ middle of a reply. Fabric does not import any such extension; without one
158
+ the entry is one unread line.
159
+
160
+ **Create complete, never edit.** Fabric writes the entry only into a session file
161
+ it creates, in the same write that creates the file. The worker never appends to,
162
+ rewrites, or parses an existing session file, so a file that exists already (a
163
+ relaunch, or a `sessionFile` the caller supplies) is used exactly as it is.
164
+
165
+ The entry is the **root** of the tree: the first entry after the header, with
166
+ `parentId: null`. Every entry Pi appends, and every branch a later navigation or
167
+ Pi fork reaches, then descends from it. That is why the entry does not depend on
168
+ which entry Pi treats as the leaf.
169
+
170
+ - **New `durable-session/session.jsonl`.** Line 1 is a Pi session header (version
171
+ 3), line 2 is the entry with `parentId: null`. The worker writes both to
172
+ `tmp-<uuid>.jsonl` in the same folder (exclusive create, no link following,
173
+ `0600`), syncs it, hard-links it to `session.jsonl` and unlinks the temp name.
174
+ Exactly one of two concurrent attempts wins the link; the other keeps the
175
+ winner's file. On relaunch an existing `session.jsonl` is reused untouched, and
176
+ a leftover `tmp-<uuid>.jsonl` that is a second name of it is removed.
177
+ - **Fork and handoff seeds.** For a `pi-durable` child with the option on, the manager passes the seed
178
+ writers (`writeForkSession`, `writeHandoffSession`) `{ workerRole: true }`.
179
+ The file they return has the header, then the entry as the root, then the seed's
180
+ entries unchanged except that the seed's former root has `parentId` set to the
181
+ entry's id. The inherited messages are identical. A seed Pi's own
182
+ `createBranchedSession` writes is rewritten once by the writer, before it
183
+ returns the path and before any worker can open the file.
184
+ - **Plain `pi`, other runners, and the option off.** No option is passed. Seeds are byte for byte
185
+ what the writers always produced, there is no entry, and a child with no seed
186
+ keeps `--no-session`.
187
+ - **Caller-supplied `sessionFile`.** Never written. Such a child keeps whatever role
188
+ that file already declares.
189
+ - **A later explicit declaration wins.** A context-aware extension replays policy entries in
190
+ order and a later entry wins per path, so a later host policy that declares another
191
+ `sessionRole` overrides the seeded one; Fabric does not fight it.
192
+
193
+ #### Threat model
194
+
195
+ A process running as the same user is trusted, because it can already write every
196
+ session file. Same-user races (swapping a folder for a symlink, adding a hard link
197
+ between a check and a write) are therefore out of scope. The worker guards against
198
+ other users and against accidental links:
199
+
200
+ - Before it creates anything, the worker `lstat`s the run directory. It must be a
201
+ real directory (not a link) owned by the worker's user; otherwise the launch fails
202
+ with a clear error before any write. If group or others can write it
203
+ (`mode & 0o022`), the worker removes that write itself through a descriptor opened
204
+ without following links and checked to be the same directory, then confirms the bit
205
+ is gone. A run directory from an earlier Fabric or a test harness may have mode
206
+ `0775`; with the option on, the manager creates run directories with mode `0700`. After the
207
+ tightening no other user can add or swap entries in the run directory, and
208
+ anything already there is refused by the owner and link checks on
209
+ `durable-session/` and by `O_EXCL | O_NOFOLLOW` on the temp file.
210
+ - `durable-session/` is created without `recursive` (so the run directory must
211
+ already exist), with mode `0700`; an existing one must be a real directory owned by
212
+ the worker's user.
213
+ - The temp file is created with `O_CREAT | O_EXCL | O_NOFOLLOW`.
214
+
215
+ #### Retention
216
+
217
+ Run retention accepts only `session.jsonl` and `tmp-<lowercase uuid v4>.jsonl` in
218
+ `durable-session/`, each a regular file owned by this user. A file with two names is
219
+ accepted only as the crash leftover between the worker's link and unlink: the folder
220
+ holds exactly `session.jsonl` and one `tmp-<uuid>.jsonl` that share a device and
221
+ inode. A link that leaves the run, an unknown name (including an uppercase or
222
+ all-zero uuid), a symlink, or another owner keeps the run.
223
+
224
+ Fabric does not read the `context-aware.worker-compaction.v1` advisories a worker
225
+ writes.
226
+
55
227
  Durability **does not restore arbitrary JavaScript continuations**, promise
56
228
  general exactly-once external effects, or restart failed workers indefinitely.
57
229
  The standard process/actor lifecycle controls stop/retry/retention. A new run is
@@ -64,14 +236,87 @@ switches receive fresh request identities and do not replay old answers.
64
236
  Old leaf-adapter locators/journals are not silently migrated into worker stores.
65
237
 
66
238
  Worker retries retain the original prompt identity, so a completed journal can
67
- restore its answer even if the parent died before saving completion. Automatic
68
- reattachment after the owning Fabric/resident process restarts currently covers
69
- hosted adapters, not this built-in worker. Recovery of completed conversations
239
+ restore its answer even if the parent died before saving completion. By
240
+ default, automatic reattachment after the owning Fabric/resident process
241
+ restarts covers hosted adapters, not this built-in worker; `agents.wait` on such
242
+ a run fails at once when its resident host is gone and settles the run failed
243
+ with outcome `indeterminate`. Recovery of completed conversations
70
244
  with additional steering/follow-up user messages also remains incomplete: strict
71
245
  transcript correlation fails closed to avoid attributing a stale answer.
72
246
  Control acknowledgements do not provide an end-to-end exactly-once delivery
73
247
  contract; do not blindly resubmit a command whose acknowledgement was lost.
74
248
 
249
+ ## Opt-in: reattach after a resident host restart
250
+
251
+ Set `agents.durableWorkerRecovery: true` to let a resident host recover its
252
+ own unfinished `pi-durable` worker runs. It applies only to runs launched with
253
+ `residency: "durable"`, runner `pi-durable`, and the `process` transport, on
254
+ POSIX. Each such launch writes `worker-recovery.json` beside the run: the run
255
+ id, the absolute deadline, the current worker PID, and the worker launch. The
256
+ marker is **untrusted input**, not launch authority. The host also writes a
257
+ receipt under `<runRoot>.worker-launch-authority/<id>.json`, a sibling of
258
+ the host run root, outside all child run directories and nested run roots. The receipt pins every launch argument, PID and deadline, plus
259
+ the current host's agent configuration, binaries, inherited tools and policy.
260
+ Recovery requires an exact match; this covers optional/future arguments too,
261
+ including runner, child binaries, extensions, kernels and capability settings.
262
+ The run root and receipt directory, like the host configuration, must remain
263
+ host-controlled: this is not isolation against a process with arbitrary
264
+ same-user filesystem access. Both files are removed on settlement. An
265
+ explicit stop deletes the file as soon as it is requested, before Fabric
266
+ signals the worker, so a host that dies partway through a stop leaves nothing
267
+ to recover. Every other settlement this host makes deletes the file before it
268
+ writes the terminal record. A later host therefore never recovers a run Fabric
269
+ already finished or stopped.
270
+
271
+ When the host closes, it leaves these workers running. The next resident host,
272
+ whether started by a new session or by `agents.wait` after the old host died,
273
+ reads each file and decides:
274
+
275
+ - **Worker still running.** Fabric checks the PID and that its command line
276
+ still carries `--id <run id>`. It then adopts the worker and waits for its
277
+ result. Nothing is relaunched.
278
+ - **Worker gone.** Fabric relaunches the same launch in the same run directory,
279
+ with the same prompt and the progress so far carried over, and with
280
+ `--timeout-ms` set to what remains of the original deadline. `pi-durable`
281
+ reopens its journal, so completed work is not repeated.
282
+ - **Worker recorded a stop but is still running.** Fabric waits up to seven
283
+ seconds for it to exit and then relaunches it. If it is still running, the run
284
+ settles `indeterminate` and no new launch is attempted.
285
+ - **Recovery file does not match this host.** A missing or mismatched host
286
+ receipt, including a legacy marker-only run or a changed host policy, settles
287
+ the run `indeterminate` without adopting or starting a process. The launch
288
+ also has to use this host's worker and the run's own id, cwd and file paths.
289
+ Files over 8 MiB, malformed files and files whose id does not name their run
290
+ directory cannot authorize a launch.
291
+ - **No first status.** A valid marker can precede the worker's first status
292
+ write. Recovery explicitly publishes a failed, `indeterminate` status and
293
+ removes the marker. The run is not silently left without an owner.
294
+ It does not guess at, signal or relaunch a possibly still-running worker.
295
+ - **Deadline passed, or liveness cannot be verified.** This covers a PID owned
296
+ by another user and an unreadable command line. The run settles `failed` with
297
+ `outcome: "indeterminate"` and a reason. `agents.wait` returns that result
298
+ and does not throw.
299
+
300
+ The option is off by default; with it off, no file is written and behaviour is
301
+ unchanged. A run launched while the option was on keeps its marker; changing
302
+ the host policy (including turning the option off) settles it indeterminate.
303
+ The former authority is not revived. Windows, other transports, and
304
+ waits from another session of the project (`waitProjectAgent`) are not covered.
305
+
306
+ A hard-killed outer worker can leave its detached durable child alive briefly.
307
+ Outer-PID disappearance does **not** prove the child released its SQLite lease;
308
+ a relaunch during that window can fail with a storage-lock error. Recovery does
309
+ not steal/delete leases or kill guessed child PIDs. The lease still excludes
310
+ concurrent journal writers, but automatic recovery across that cleanup window
311
+ is not guaranteed. Graceful external-stop recovery waits for child shutdown;
312
+ unknown worker liveness always settles indeterminate without a relaunch.
313
+
314
+ Lifecycle events that the worker wrote but the old host had not read when it
315
+ died are not replayed. The new host starts reading `lifecycle.jsonl` from its
316
+ size at recovery. The run's status, turns, tool calls and usage are unaffected,
317
+ because they come from `status.json`; only those intermediate `pi.*` events
318
+ and their token-usage ledger entries are lost.
319
+
75
320
  ## Advanced: manually registered leaf adapter
76
321
 
77
322
  The rest of this guide concerns the restricted `pi-fabric/durable` factory, **not**
@@ -83,8 +328,8 @@ the separate ID explicitly.
83
328
  Exports include `PiDurableRunner`, `PiDurableRunnerOptions`,
84
329
  `PiDurableStorageOptions`, `PiDurableStorageLease`, `PiDurableLocator`, and
85
330
  `PiDurableMessageOptions`. Import/construction stays lazy and does not register a
86
- runner. First use checks pinned `@earendil-works/pi-durable@1.3.0` and
87
- `@earendil-works/chord@1.3.0`. Credentials remain in Models/environment, never in
331
+ runner. First use checks pinned `@earendil-works/pi-durable@1.4.0` and
332
+ `@earendil-works/chord@1.4.0`. Credentials remain in Models/environment, never in
88
333
  a locator.
89
334
 
90
335
  ### Leaf host setup
@@ -307,6 +552,61 @@ Full-host coverage is in `tests/durable-agent.test.ts`,
307
552
  `tests/durable-worker-e2e.test.ts`, `tests/durable-fabric-exec.test.ts`,
308
553
  `tests/handoff-continuation-worker.test.ts`, and `tests/durable-actors.test.ts`.
309
554
 
555
+ ## Embedding a durable session: `pi-fabric/durable-host`
556
+
557
+ A host process that runs one long-lived durable `AgentSession` of its own (a
558
+ daemon, not a Fabric-managed worker) imports `pi-fabric/durable-host`. The host
559
+ supplies the Pi SDK (`@earendil-works/pi-coding-agent`, `pi-ai`, `pi-agent-core`)
560
+ as peers, as for the extension. Fabric's registration graph never loads this
561
+ entry, and it does not read `agents.durableWorkerSession` or any other Fabric
562
+ setting: the embedder chooses its own session file.
563
+
564
+ Exports: `createDurableAgentSession` (the session), `DurableAgent`,
565
+ `openDurableWorkerStorage` (exclusive, fsync'd JSONL storage with a lease),
566
+ `createDurableWorkerRuntime` and `DurableWorkerOptions` (the full native runtime
567
+ with `/new`, `/fork` and `/resume`), `declareWorkerSessionRole` and
568
+ `DURABLE_WORKER_POLICY_ENTRY_TYPE`.
569
+
570
+ ```ts
571
+ import {
572
+ createDurableAgentSession, declareWorkerSessionRole, openDurableWorkerStorage,
573
+ } from "pi-fabric/durable-host";
574
+ import { SessionManager } from "@earendil-works/pi-coding-agent";
575
+ import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
576
+
577
+ const lease = await openDurableWorkerStorage("/absolute/private/run-dir"); // throws if another process owns it
578
+ const sessionManager = SessionManager.open(sessionFile, undefined, cwd); // or create(...)
579
+ declareWorkerSessionRole(sessionManager); // before the first prompt; "already-seeded" on resume
580
+ const host = await createDurableAgentSession({
581
+ cwd, sessionManager, storage: lease.storage, runId: "my-daemon:main", // stable across restarts
582
+ // modelRuntime, model, tools, customTools, resourceLoader: as for createAgentSession
583
+ });
584
+ await host.session.bindExtensions({}); // not done for you; bind your own mode/UI/error hooks
585
+ await host.session.prompt("...");
586
+ // Shutdown: await host.close(); await lease.storage.close(BACKGROUND_CONTEXT); await lease.release();
587
+ ```
588
+
589
+ **Worker role.** `declareWorkerSessionRole(sessionManager)` appends the same
590
+ worker-role entry described under "Worker role" above to a session you already
591
+ opened. It returns `"seeded"` when it wrote the entry and `"already-seeded"`
592
+ when the latest host role declaration on the active branch is worker, so a restart
593
+ loop does not grow the file. A sibling branch does not count, and a later host
594
+ role override causes the helper to append a fresh worker declaration. Call it before the first prompt and before `bindExtensions`.
595
+ Unlike a Fabric child, whose entry is the tree root, this one is appended after
596
+ whatever the session already holds. Without it the session counts as a
597
+ foreground session with a user at a terminal.
598
+
599
+ **Supervision is the host's job.** An embedder gets journal resume through
600
+ `createDurableWorkerRuntime` and `createDurableAgentSession`, but not Fabric's
601
+ opt-in worker recovery (`agents.durableWorkerRecovery` and
602
+ `worker-recovery.json`), which only Fabric's agent manager performs. Nothing in
603
+ this entry restarts a process. After a crash, the host starts a new process,
604
+ reopens the same storage directory and session file, and calls
605
+ `createDurableAgentSession` again with the **same `runId`**, then
606
+ `host.agent.continue()` to finish interrupted work. Do not replay the original
607
+ prompt. The host also owns backoff, a restart budget, and releasing the storage
608
+ lease before another process takes over.
609
+
310
610
  ## Evidence
311
611
 
312
612
  `tests/durable-runner.test.ts` exercises the real published packages with offline
@@ -101,7 +101,9 @@ classifies facts, preferences, goals or commands.
101
101
  ## Lifecycle, caching and failures
102
102
 
103
103
  The implementation imports lazily at an enabled `before_agent_start` boundary.
104
- It issues at most one batch for the current source user-entry turn. A `context`
104
+ It issues at most one batch for the current source user-entry turn. A run that
105
+ a custom message starts (Pi's `before_agent_start` with `messageType: "custom"`)
106
+ has no query, so it drops any prepared view and prepares none. A `context`
105
107
  hook inserts one replay-safe ephemeral custom data message immediately before
106
108
  the last user message in the first request (normally the initiating prompt),
107
109
  after the existing history. That boundary and the view are frozen for the run:
package/docs/interface.md CHANGED
@@ -10,37 +10,44 @@ Nested `pi.read`, `pi.bash`, `pi.powershell`, `pi.grep`, `pi.find`, `pi.ls`, `pi
10
10
 
11
11
  Fabric keeps its orchestration-specific behavior around those previews. Multi-call rows stay compact, and live write composition with phase/call progress stays visible during the run. Agent and actor audits can expose their current child tools directly in the parent card, with owner, runner, and run metadata. One execution-wide throttle coalesces parallel nested-call updates before they reach Pi, and continuous streams are not starved. Long ANSI rows are bounded without clearing the enclosing tool background. The widget lease plus result-to-source row transfer keep completion height stable. The highlighter initializes lazily and falls back to plain text until it is ready. When Pi switches between its light and dark variants, the highlighter swaps themes live. Collapsed previews use the configured expand keybinding, for example `Ctrl-O`.
12
12
 
13
+ ## Terminal title
14
+
15
+ In an interactive session, the terminal window/tab title carries the declared `fabric_exec` display name: `record release evidence`, `Apply migration`, and so on. Nested call detail such as `read src/config.ts · typescript` never reaches the window; it stays in the transcript and the activity surface, where there is room for it.
16
+
17
+ The title is sticky. It holds after the program stops, parallel calls leave the newest declared name in place, and a resumed session adopts it again, because Fabric records the name as a session entry. Fabric re-adopts it whenever Pi applies its own title: on session start, on a branch switch, after a session rename, and after a settled turn. Pi's `app - session - cwd` shape is only seen before the first declared name in a session, or after `ui.terminalTitle` is turned off under `/fabric settings` → **UI**. Titles are plain text: styling and control characters are stripped, and the text is clipped to 120 characters, so a long name cannot wrap or repaint the terminal chrome. Headless and RPC hosts never receive one.
18
+
13
19
  ## Background shell tasks
14
20
 
15
- `/fabric tasks` or **Ctrl+Alt+T** opens a live task inspector without interrupting Main. The widget keeps detached commands visible with their ID, purpose/command, elapsed time and access hint. A single task opens directly; Enter inspects a selected task, arrows scroll its bounded output tail, **x twice** stops it, and Esc returns to the list or closes. The detail shows cwd, PID, exit status, output path, elapsed time separately from time since last output, and monitor delivery/deadline. Completion hints last 30 seconds; retained jobs remain inspectable.
21
+ The footer list keeps detached commands visible with their ID, purpose/command and elapsed time. Focus it with **↓** from an empty editor or `/fabric tasks`, then press **Enter** on a task to open its detail without interrupting Main. `/fabric tasks <id-or-unique-prefix>` opens the same detail directly. Arrows scroll its bounded output tail, **x twice** stops it, and **Esc** closes the detail and returns to the footer list. The detail shows cwd, PID, exit status, output path, elapsed time separately from time since last output, and monitor delivery/deadline. Completion hints last 30 seconds; retained jobs remain inspectable.
16
22
 
17
23
  See [Background tasks and monitors](background-tasks.md) for completion delivery, task controls, opt-in UI-only versus agent-waking monitors, limits, and cancellation.
18
24
 
19
- ## Widget activity
25
+ ## Agent list
20
26
 
21
- The bottom widget lists running agents and actors. Press **ctrl+shift+e**, run **`/fabric focus`**, or click a row to focus it. Then **↑↓** or **j/k** selects a row and **Enter** or **Space** expands it: the participant's live activity opens inside the widget, below the list, not in a floating window. It shows streamed thinking, each tool call with its arguments and status, replies, and errors, newest at the bottom. While a pane is open, **↑↓** switches participants, **PgUp/PgDn** or the mouse wheel scrolls, and **G** returns to the newest line. **Enter** or a second click collapses the pane. **Esc** collapses first, then returns focus to the editor; while the widget has focus, Esc does not halt background workers. Any other key returns focus to the editor and reaches it, so typing, Ctrl+C, and shortcuts keep working; only a click on a participant row takes focus. An expanded widget stays within half of the terminal height. With Pi's `hideThinkingBlock` setting, the pane shows the thinking marker without the reasoning text. The dashboard transcript does not show reasoning.
27
+ The Fabric widget sits at the bottom of the screen, below Pi's footer and a blank row, as in Claude Code. Its header is the main session's row: `● FAB-3` shows the session's [peer label](agents.md#peer-labels-and-queue-gates), followed by the current run's declared name and totals. A new session takes its label at its first Fabric use, so a session that has done nothing yet shows none. Without a label it reads `● Fabric`. A session with a label also shows it on the right of the editor's top border, in a badge like the one a conversation window shows for its target, whether or not the list is showing. While the list has no row to select, with no agent, actor worker, or shell task (idle actors have none), it takes no rows. The badge yields to Pi's own border text, such as a scroll indicator, and needs the list to be placed after the footer; otherwise the header row stays. Below it, running agents and actors are listed as a tree, above any background shell tasks, each child under its parent and indented by depth. Each row shows a circle, the participant's name, what it is doing, its model, tool calls, tokens, and elapsed time. What it is doing is the latest display name the agent declared for a `fabric_exec` call, which holds until it declares another; before that, the row shows the current tool or `thinking`. A finished row shows its result or error. The circle's colour is the status: accent while running, green when done, red on failure. Shell tasks list one per row after agents and actors, within the same row budget. Shell rows are selectable like agents: **Enter** or a click on a shell opens that task's detail with its output, status, and stop action. There is no secondary task-list overlay. **Esc** closes a task opened this way in one step, and focus returns to the list. Lines disclose progressively: when a line is too wide, its statistics drop first, then its title or activity is shortened, and its key hints go last. Pi gives extensions no slot below its footer, so Fabric registers an empty below-editor widget and places the list after the footer itself, in both the fullscreen and the regular renderer. Pi's footer and footers from other extensions stay as they are. In fullscreen mode, the list uses only the rows left after Pi's editor, other widgets (including Better OpenAI's status line), and footer, keeping at least one transcript row. It shrinks or temporarily disappears when those need the space, and returns when space is available. If Pi's layout is not the one Fabric expects, the list falls back to below the editor and stays last among the widgets other extensions place there. Press **↓** in an empty editor to move into the list; **ctrl+shift+e**, **`/fabric focus`**, or a click on a row also focuses it. The filled circle `●` marks the selected row, and **↑↓** or **j/k** moves it. **↑** on the top row returns to the editor. **Enter** or a click opens the participant's full conversation, where you can read its whole transcript, see its model and thinking level, and steer it or send a follow-up. Closing that view returns focus to the list. As in Claude Code, there is no inline preview: the conversation is where a participant's activity is shown. In Pi's fullscreen renderer, hovering the pointer over a row fills its circle too. Pi turns on hover tracking only outside tmux, zellij, and screen, and there is no event for leaving the widget, so the hover clears when the pointer crosses the header or the next key is pressed. **Esc** returns focus to the editor; while the list has focus, Esc does not halt background workers. Any other key returns focus to the editor and reaches it, so typing, Ctrl+C, and shortcuts keep working; only a click on a participant row takes focus. While it has focus, the list may grow past `ui.maxRows` to half of the terminal height, still bounded by the space left for it in the fullscreen dock. Arrow keys scroll within that bounded viewport, keeping every participant and task reachable. Unfocused overflow folds into a `+N` marker.
22
28
 
23
29
  ## Focused conversations
24
30
 
25
- Press **ctrl+shift+a** or run **`/fabric chat`** to open a full-screen conversation without going through the dashboard. `/fabric chat <id-or-name>` opens a specific agent or actor; Tab completes exact participant IDs, including nested agents. Ambiguous names or ID prefixes are rejected; use an exact participant ID to select the intended target. In the dashboard, **Shift+C** opens the selected participant.
31
+ Press **Enter** on a row of the agent list, or run **`/fabric chat`**, to open a full-screen conversation without going through the dashboard. `/fabric chat <id-or-name>` opens a specific agent or actor; Tab completes exact participant IDs, including nested agents. Ambiguous names or ID prefixes are rejected; use an exact participant ID to select the intended target. In the dashboard, **Shift+C** opens the selected participant.
26
32
 
27
- The first implicit open prefers a currently active child over stale history; later opens remember a valid selection. The view keeps a lossless native Pi transcript and a multiline Pi editor together, independently of the dashboard’s bounded transcript projection. It uses Pi’s real user, assistant, thinking, tool, skill, custom-message, and summary components, including registered tool renderers such as `fabric_exec`, with complete tool details and native expansion behavior. User backgrounds and editor rules span the terminal width, with Pi's configured output padding, editor padding, and code-block indentation inside them. Markdown and tool previews use the configured Shiki theme. A one-row gap belongs to the transcript's end, not the fixed input dock, so it scrolls away and leaves history unobstructed. While the selected participant is active, the native-style `Working` indicator stays in the editor border; the transcript uses a fallback only when that border is out of view. The directory/name footer row includes a compact `read-only` badge when needed; status, model, and thinking metadata are not repeated in a separate header. The footer below the editor shows the selected participant's directory, known branch, model, thinking level, and run-scoped token/cache/cost statistics. Unknown usage and context occupancy are marked explicitly; Main's statistics are never substituted. A themed, background-filled target badge sits on the upper-right editor border, replacing the standalone transcript breadcrumb. It preserves `Main > child > grandchild` lineage when space permits, prioritizes the active target on narrow terminals, and marks read-only targets. Native working and draft-scroll labels share the border without adding a row. Main and other participants keep running: opening, navigating, and closing the view never calls Pi's session-replacement API or starts another worker. Selecting Main restores the original Pi conversation, including its editor. Child drafts and scroll positions survive switching targets and reopening the view for the lifetime of this Pi session.
33
+ The first implicit open prefers a currently active child over stale history; later opens remember a valid selection. The view keeps a lossless native Pi transcript and a multiline Pi editor together, independently of the dashboard’s bounded transcript projection. It uses Pi’s real user, assistant, thinking, tool, skill, custom-message, and summary components, including registered tool renderers such as `fabric_exec`, with complete tool details and native expansion behavior. User backgrounds and editor rules span the terminal width, with Pi's configured output padding, editor padding, and code-block indentation inside them. Markdown and tool previews use the configured Shiki theme. A one-row gap belongs to the transcript's end, not the fixed input dock, so it scrolls away and leaves history unobstructed. While the selected participant is active, the native-style `Working` indicator stays in the editor border; the transcript uses a fallback only when that border is out of view. The directory/name footer row includes a compact `read-only` badge when needed; status, model, and thinking metadata are not repeated in a separate header. The footer below the editor shows the selected participant's directory, known branch, model, thinking level, and its current or last run's token, cache, and cost totals, tool calls, and elapsed time, for example `↑43k ↓2.2k R147k $0.122 · 12 calls · 3m04s · ?/272k ctx`. A running participant shows `Working` on the border, so the line names the status only once the run settles, such as `completed · …` or `failed · …`. Unknown usage and context occupancy are marked explicitly; Main's statistics are never substituted. A target badge sits on the upper-right editor border, replacing the standalone transcript breadcrumb. Like the main editor's label badge, it is filled with the border's own colour, which Pi sets from the thinking level, so it changes when the reasoning level does; its text is black or white, whichever has the higher contrast against that colour, and a border drawn without colour gets a plain label. It shows the target's own name, shortened on narrow terminals, and marks read-only targets; lineage lives in the agent list below the window. Native working and draft-scroll labels share the border without adding a row. Main and other participants keep running: opening, navigating, and closing the view never calls Pi's session-replacement API or starts another worker. Selecting Main restores the original Pi conversation, including its editor. Child drafts and scroll positions survive switching targets and reopening the view for the lifetime of this Pi session.
34
+
35
+ The same agent list sits at the bottom of the conversation window, below its footer, with the same key hints, so `↓ to manage` and `⏎ open · ↑↓ select · esc back` tell whether the keys go to the editor or to the list. The participant on screen keeps the filled circle, and the header row is Main. **↓** in an empty editor moves into the list, **Enter** or a click switches to the selected participant, selecting Main returns to the native session, and a shell row opens the tasks view over the window. **Esc** or **↑** on the top row returns to the editor. This list replaces the former target picker and its cycling and parent/child keys.
28
36
 
29
37
  The transcript also follows Pi 1.0's fullscreen scrollbar setting (`auto`, `always`, or `hidden`), theme colors, hover/drag behavior, and auto-hide timing. Only an always-visible scrollbar reserves a transcript column; the editor and footer keep their full width. The thumb describes the loaded history window; existing wheel, page, and top commands continue to fetch older history. While scrolled away from the tail, or when newer history is not loaded, the native-style **↓ Jump to latest message · End** indicator appears at the transcript bottom. Its shortcut label follows Pi's configured binding. Click it or use the shortcut to load the latest history and resume following, without losing the draft or editor focus. Selection drags do not activate it.
30
38
 
31
39
  The composer also uses Pi's native **up/down prompt history**, including configured `tui.editor.historyPrevious` / `tui.editor.historyNext` bindings. Up browses previous prompts from an empty editor or the start of its first visual line; multiline/wrapped arrows still move the cursor normally. Down returns toward newer prompts and restores the draft and cursor you had before browsing. Each target keeps its own newest 100 trimmed prompts, with consecutive duplicates suppressed, across switches and reopening. History is lazily seeded once from that target's currently loaded user text (direct actor envelopes are unwrapped), then remembers ordinary steering/follow-up submissions, parked follow-ups, and submitted slash commands (including failed attempts) in chronological order. Slash entries are ephemeral: they remain only in this target's bounded editor memory for the current Pi session, never in the agent transcript or sent to the model. History does not fetch additional pages or include shell commands, rejected read-only prose, assistant/tool output, or Main's history. Send attempts are remembered as in Pi; failures still preserve the draft. Pasted prompts are sent and recalled as full text, not paste markers. Completion lists retain arrow priority, and queue-row editing uses a separate history-free editor. Resetting the parent session clears local history.
32
40
 
33
- Drag across transcript text to select it in either screen mode. Selection uses display-cell coordinates and keeps a stable history snapshot while output streams; it never selects hidden Main content. Releasing the mouse copies automatically when Pi's `fullscreenCopyOnSelect` setting is enabled (the default). Otherwise use the configured copy shortcut (`ctrl+shift+c` by default), `ctrl+c` with an active selection, or `/copy selection`. Escape clears selection first; a second Escape closes. Scrolling after release, resizing, switching targets, changing tool/thinking expansion, and `/latest` clear the selection. Dragging with the wheel can select across already loaded history; load older pages before starting a selection.
41
+ Drag across transcript or footer text to select it in either screen mode. Double-click selects a word (including hyphenated model IDs and paths); triple-click selects a line. Participant model labels use the same `(provider) model • thinking` format as Main. Selection uses display-cell coordinates and keeps the selected text stable while output streams; it never selects hidden Main content. Releasing the mouse copies automatically when Pi's `fullscreenCopyOnSelect` setting is enabled (the default). Otherwise use the configured copy shortcut (`ctrl+shift+c` by default), `ctrl+c` with an active selection, or `/copy selection`. Escape clears selection first; a second Escape closes. Scrolling after release, resizing, switching targets, changing tool/thinking expansion, and `/latest` clear the selection. Dragging with the wheel can select across already loaded history; load older pages before starting a selection.
34
42
 
35
43
  The preview has a small, local command allowlist with slash/Tab completion:
36
44
 
37
45
  | Command | Preview action |
38
46
  | --- | --- |
39
47
  | `/copy` | Copy the selected participant's last assistant response as plain source text/Markdown, including for completed read-only runs. Thinking and tool results are excluded. If newer history is unloaded, use `/latest` first. |
40
- | `/copy selection` | Copy selected transcript text, without terminal styling/control sequences. |
48
+ | `/copy selection` | Copy selected transcript or footer text, without terminal styling/control sequences. |
41
49
  | `/latest` | Clear selection and follow the latest output. |
42
50
  | `/help` | List preview commands. |
43
- | `/agents` | Open the target picker. |
44
51
  | `/back` | Return to Main. |
45
52
  | `/stop` | Confirm stopping the selected live participant. |
46
53
 
@@ -53,18 +60,14 @@ Slash-command results use Pi's native-style conversation notifications: dim stat
53
60
  | Enter | Send a steering message to the selected live participant |
54
61
  | Follow-up key (Alt+Enter by default; Ctrl+Q on Windows) | Queue a follow-up for the selected participant |
55
62
  | Shift+Enter | Insert a newline |
56
- | Ctrl+N or `/agents` | Open the searchable participant picker |
57
- | Alt+Left / Alt+Right at an empty editor | Navigate to parent / first child |
58
- | Ctrl+Tab / Ctrl+Shift+Tab | Cycle conversations |
63
+ | ↓ at an empty editor, then Enter | Switch to a participant from the agent list |
59
64
  | Mouse wheel / configured Pi scroll keys | Scroll locally and fetch older history; prompt, line, and page jumps work in both TUI modes |
60
65
  | End | Follow the latest output |
61
66
  | Pi's tool-expand key (Ctrl+O by default) | Toggle tool details |
62
67
  | `/stop` | Explicitly stop the selected participant after confirmation |
63
68
  | Esc or `/back` | Return to Main without interrupting any agent |
64
69
 
65
- The participant picker groups **Active** targets (including Main, even when idle) above **Inactive** targets, newest activity first within each group. Stale owners are inactive. Grouping, ordering, and new arrivals are held until you leave and reopen the picker, so live activity cannot reshuffle rows while you browse or search; statuses and unread markers still update. Removed targets disappear immediately. Parent/child navigation remains available outside the picker.
66
-
67
- Direct actor messages appear as normal user text, with paired RPC start/end events shown once. Session branches and compaction remain authoritative over overlapping RPC history. Native message errors remain visible. Use `/fabric log <id>` to inspect worker startup diagnostics. The widget advertises `ctrl+shift+a chat` only while an agent or actor is active, and removes the hint when work settles. The command and shortcut remain available for idle and historical conversations.
70
+ Direct actor messages appear as normal user text, with paired RPC start/end events shown once. Session branches and compaction remain authoritative over overlapping RPC history. Native message errors remain visible. Use `/fabric log <id>` to inspect worker startup diagnostics. `/fabric chat` remains available for idle and historical conversations.
68
71
 
69
72
  Pending messages use Pi’s native labels and spacing. When a compatible loaded `pi-queue-steer` provides `queue-steer:conversation-queue:request:v1`, the view uses its actual per-target queue, execution-outline widget, and inline editor. A stopped actor’s Alt+Enter input is parked for editing or explicit Enter release. Accepted sends remain visible until native delivery is observed; they cannot be retracted or edited locally. Queues stay isolated from Main and other targets, survive preview close/reopen within the session, and are cleared on session reset. Older queue-extension releases without the bridge use the native display.
70
73
 
@@ -152,7 +155,7 @@ Fabric ships a general-purpose, theme-aware activity surface that works with any
152
155
  - The graph renders status-coloured node shapes, orthogonal connectors, animated traffic, an optional fixed-width selected-node inspector, and directional off-canvas summaries. Traffic follows the same structural branches through the source/target lowest common ancestor. It never draws direct lines through unrelated subtrees. A large or deeply recursive graph opens around the attention-priority node. When you move between nodes, a damped spring camera retargets smoothly and the viewport does not snap. Live and replay animation drives renders only while the dashboard is open. Narrow terminals keep the centred graph and drop the inspector.
153
156
  - Retained-run selection works as a lens over the same topology. Pressing `[` or `]` changes the highlighted run and its phase context, and live actors and remote project participants stay visible. Route records remain selectable, and they aggregate repeated traffic by source, target, topic, and kind. The recent event feed is a bounded live window. It does not replace audit history.
154
157
  - **Inspection and control** work the same way in both views. Agent detail includes Markdown-rendered tasks and results, highlighted YAML values, model, current tool, usage, worktree, and attach metadata. Tool-call details show highlighted command, file, and edit inputs, with Markdown or YAML outputs. Persisted bash calls keep their command text. Space peeks at an agent or actor transcript. `t` toggles between summary and transcript detail. The initial bounded tail is paged directly from Pi RPC, Pi session, and Claude stream-JSON logs. At the loaded top, `k` or Up fetches one older page, `g` loads and jumps to the true beginning, and `G` jumps to the growing tail and resumes follow mode. Assistant text uses native Markdown. Tool calls retain structured arguments and results, so they get the same read, bash, search, edit, and write previews as the parent card. Credential and token redaction applies before rendering. You can steer Main and active one-shot agents or queue them a follow-up, and one-shot agents can also be stopped safely. Persistent actors accept `s` mailbox messages. Where configured, they expose model (`m`), thinking (`e`), the complete session-bound Pi host-event catalog (`v`), instructions (`i`), mailbox clearing (`c`), and export (`x`). Remote participants expose only their advertised capabilities. Control resolves their owner and reports success after acknowledgement. From Activity, global templates stay available for import (`p`), instruction editing (`i`), and deletion (`d`).
155
- - `/fabric settings` opens an inline settings view that mirrors Pi core's `/settings`, with top and bottom borders, fuzzy search, and section submenus, and it writes changes to `fabric.json`. Trusted projects default to `<project>/.pi/fabric.json`. Pressing **Ctrl+G** anywhere in the view switches both the displayed configuration layer and the save destination between project and global `~/.pi/agent/fabric.json`. The global view keeps global edits visible even when a project override remains effective, and its scope banner states that precedence explicitly. Untrusted sessions stay global-only. In RPC hosts, the same hierarchy is exposed through recursive select/input dialogs; a root save-scope action replaces the Ctrl+G shortcut, while Back returns one section at a time. Full code mode, capture, executor, approvals, and UI changes apply immediately when they change the effective configuration. Mesh, agent, retention, and MCP changes persist and take effect on the next `/fabric reload`. The UI section includes **Tool display** (`full` by default or `compact`), a default-on **Agent tool preview** toggle, and a global **Update debounce** (`0`/Off through `1000ms`, default `100ms`); all apply immediately. Compact display makes the declared Fabric display name/description the card header, hides outer TypeScript at every expansion level, and retains bounded nested tool details. The Agents section selects the default runner, keeps independent Pi and runtime-enumerated Claude model pickers, and exposes free-text Veda backend, persona, and model fields for the Veda runner. List editors for `agents.defaultTools` and `capture.keepVisible` toggle known tools on and off. The `keepVisible` candidates include `fabric_exec` plus every captured extension tool; this legacy preference cannot override full-code or Schema enforce mode's sole `fabric_exec` model declaration on Pi 0.99.
158
+ - `/fabric settings` opens an inline settings view that mirrors Pi core's `/settings`, with top and bottom borders, fuzzy search, and section submenus, and it writes changes to `fabric.json`. Trusted projects default to `<project>/.pi/fabric.json`. Pressing **Ctrl+G** anywhere in the view switches both the displayed configuration layer and the save destination between project and global `~/.pi/agent/fabric.json`. The global view keeps global edits visible even when a project override remains effective, and its scope banner states that precedence explicitly. Untrusted sessions stay global-only. In RPC hosts, the same hierarchy is exposed through recursive select/input dialogs; a root save-scope action replaces the Ctrl+G shortcut, while Back returns one section at a time. Full code mode, capture, executor, approvals, and UI changes apply immediately when they change the effective configuration. Mesh, agent, retention, and MCP changes persist and take effect on the next `/fabric reload`. The UI section includes **Tool display** (`full` by default or `compact`), a default-on **Agent tool preview** toggle, and a global **Update debounce** (`0`/Off through `1000ms`, default `100ms`); all apply immediately. Compact display makes the declared Fabric display name/description the card header, hides outer TypeScript at every expansion level, and retains bounded nested tool details. The Agents section selects the default runner, keeps independent Pi and runtime-enumerated Claude model pickers, and exposes free-text Veda backend, persona, and model fields for the Veda runner. List editors for `agents.defaultTools` and `capture.keepVisible` toggle known tools on and off. The `keepVisible` candidates include `fabric_exec` plus every captured extension tool; this legacy preference cannot override full-code or Schema enforce mode's sole `fabric_exec` model declaration on Pi 0.99, so in those modes the row reads `(no effect)` and points to `foreground.tools`.
156
159
 
157
160
  ### Keybindings
158
161
 
@@ -214,7 +217,7 @@ async invoke(actionName, args, context) {
214
217
  /fabric run <ref> [json input]
215
218
  ```
216
219
 
217
- `/fabric decisions` lists open [durable decisions](decisions.md) and answers the picked one through native dialogs.
220
+ `/fabric decisions` lists open [durable decisions](decisions.md) and answers or cancels the picked one through native dialogs.
218
221
 
219
222
  `/fabric programs` lists [saved programs](programs.md) with their status; `promote` and `retire` are the only way to change one. `/fabric run` executes a saved program without the model, with the same approval policy as a model call, and shows the result in the transcript.
220
223
 
@@ -229,4 +232,4 @@ git diff | pi -p --no-session -t read,grep "Review this diff for concrete defect
229
232
  pi -p --no-session --mode json -e <path-to-pi-fabric> "Map the persistence layer."
230
233
  ```
231
234
 
232
- `--no-session` keeps the run ephemeral. `-t` restricts the tool allowlist. `--mode json` emits a structured event stream for scripting through `| jq`. `-e <pi-fabric>` loads Fabric so the agent can use `fabric_exec`. The process exits non-zero on failure. Run `pi --help` for the full flag list.
235
+ `--no-session` keeps the run ephemeral. `-t` restricts the tool allowlist. `--mode json` emits a structured event stream for scripting through `| jq`. `-e <pi-fabric>` loads Fabric so the agent can use `fabric_exec`. If your settings also install Fabric, the `-e` copy wins and the settings copy stays inactive. The process exits non-zero on failure. Run `pi --help` for the full flag list.
package/docs/jev.md CHANGED
@@ -171,7 +171,7 @@ Use named Fabric payloads when large code strings are awkward to quote. In a Jev
171
171
  - `program.emit(value)` records a bounded progress event.
172
172
  - With `observe` on spawn, `program.nextEvent()` waits for Main lifecycle events without polling.
173
173
  - `program.advise({eventId,message})` supplies the run ID to the policy-checked `jev.advise` action; declare that exact capability and opt into delivery.
174
- - `tools.call({ ref, args })` and ordinary Fabric provider proxies call only exact `requires` refs. Discovery is not a way to acquire additional authority.
174
+ - `tools.call({ ref, args })` and ordinary Fabric provider proxies call only exact `requires` refs. Discovery is not a way to acquire additional authority. A provider another extension registers is a typed global, such as `app.control(args)`, only when `requires` names one of its actions; see [program globals](providers.md#program-globals-and-types).
175
175
  - The same QuickJS context persists for the whole run: local variables and data structures survive every iteration. No host imports, `process`, or direct `fetch` are available.
176
176
 
177
177
  A reactive controller can use `while (true)` with these primitives. Observe fresh state, construct questions/candidate IDs, evaluate, verify applicability, act, and observe again. Revalidate target IDs/revisions before applying a decision. Define a no-match or escalation path. There is no mandatory model-generated planning step in the loop and no built-in 10 Hz guarantee: end-to-end rate includes observation, inference, and action latency.
package/docs/kernels.md CHANGED
@@ -130,7 +130,7 @@ return {"output": r["output"], "chars": len(text)}
130
130
 
131
131
  ### Shared host bridge, not TypeScript syntax
132
132
 
133
- Python uses the same host action namespaces: `tools`, `mcp`, `memory`, `state`, `schema`, `compact`, `agents`, `mesh`, and other registered Fabric providers. Full code mode also exposes `pi` and `extensions`; schema enforce uses the full-code bridge. Known actions use direct async calls, while computed refs use `tools.call`:
133
+ Python uses the same host action namespaces: `tools`, `mcp`, `memory`, `state`, `schema`, `compact`, `agents`, and `mesh`. A provider another extension registers is a global named after it, for example `await context.task_add(title="x")`; see [program globals](providers.md#program-globals-and-types). Full code mode also exposes `pi` and `extensions`; schema enforce uses the full-code bridge. Known actions use direct async calls, while computed refs use `tools.call`:
134
134
 
135
135
  ```python
136
136
  hits = await tools.search({"query": "deployment status", "limit": 3})
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025
3
+ Copyright (c) 2026 Tom X Nguyen
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,50 @@
1
+ # Managed-host migration: 0.119.7 → 0.127.1
2
+
3
+ ## 0.127.1 follow-up
4
+
5
+ The factory contract remains **v2** and provider registration remains v1. No option changes or downstream workarounds are needed.
6
+
7
+ - Native discovery previews retain field descriptions, including usage rules such as page numbering and identifier provenance.
8
+ - Preview limits apply to rendered declarations. Long description text is shortened first, then dropped before structural information is sacrificed. Oversized enums, unions and tuples are cut by rendered size; short 13–40-value contracts remain complete when they fit.
9
+ - Deeper structural cuts and whole-input fallback remain last resorts. Every lossy preview carries a visible marker and points to `fabric.tools.describe({ ref })` for the exact unmodified `inputSchema`.
10
+ - Public factory declarations explicitly use the embedding application's peer SDK, not Fabric's private worker SDK alias, so older supported hosts can type-check the integration.
11
+ - Managed execution guidance appears once through its guidance slot. Host `guidance` appears once in the system prompt. Tool and `code` descriptions are concise, and `promptGuidelines` contains only independent execution advice. Stable guidance remains byte-identical across turns.
12
+
13
+ The host should continue to use the v2 options documented below. Applications should not interpret a visibly truncated preview as the authoritative validation schema.
14
+
15
+ ## 0.127.0 changelog
16
+
17
+ The managed-host factory contract is **v2** (`FABRIC_MANAGED_HOST_VERSION === 2`). Provider registration is still v1. Existing `{ providers }` calls work; consumers that assert the factory version must update their assertion. This release adds optional foreground, guidance, skill-reader, CPU and compaction controls without enabling ambient configuration.
18
+
19
+ ### Replacement map for downstream patch hunks
20
+
21
+ | Hunk | Upstream replacement |
22
+ | --- | --- |
23
+ | A1 - stale script store after tool receipts | Automatic: later non-store custom entries are allowed on the same branch; aborts, session/generation changes, messages, compaction, navigation and either store writer still invalidate the transaction. |
24
+ | A2 - truncated enum/union/tuple declarations | Automatic: bounded, visibly marked previews. Fetch exact `inputSchema` with `fabric.tools.describe({ ref })`; native `describeTool` returns a bounded declaration, not the raw schema. |
25
+ | A3 - nested validation paths | Automatic: prefer TypeBox `instancePath`, falling back to `path`. |
26
+ | A4 - exact tool discovery | Automatic: trimmed exact name/raw name/ref/final `__` segment takes precedence within the requested namespace. |
27
+ | A5 - Jev in managed mode | Automatic: managed configuration disables Jev. |
28
+ | B1 - direct foreground tools | `managedHost.foreground: ["ask_user_questions", "ai_todo_write", "run_delegated_task"]`; register and activate those names. |
29
+ | B2 - provider-accurate tool and prompt text | Automatic managed metadata; put application policy in `managedHost.guidance` or the existing execution-guidance slot. |
30
+ | B3 - skill reader | `managedHost.skillReader: "mcp.files.read"` (use the host's real callable name), or omit and own skill loading entirely. |
31
+ | B4 - MCP-only native discovery | Automatic MCP fallback when Pi/extension discovery has no actions. |
32
+ | B5 - uninterrupted guest CPU | Managed default is 1000 ms; explicitly use `managedHost.executor: { maxCpuSliceMs: 1000 }`. Ordinary sessions can set `executor.maxCpuSliceMs` (`0` disables it). |
33
+ | B6 - host-owned compaction | `managedHost.compaction: "pi"`; omitted retains `"fabric"`. |
34
+
35
+ Deliberately not upstreamed: application-specific counting, scope-completion and receipt-reconciliation prose; it belongs in host guidance. The undeclared external schema renderer and 64 KiB per-tool expansion are also not carried forward: Fabric keeps compact previews and exact schema discovery, without a new dependency. Auto-promoting every `model-only` registration is not required: the explicit host foreground list avoids accidentally exposing unrelated tools.
36
+
37
+ ## Compatibility since 0.119.7
38
+
39
+ The public minimum remains Pi 1.0.0. Development and standard public-contract tests use Pi 1.3.0. A separate offline CLI smoke check passed with `pi-coding-agent`, `pi-agent-core`, `pi-ai` and `pi-codemode` all pinned to **1.0.2**, using the compiled bundle: v2 registration, a model-only foreground tool, MCP-only native discovery, visibly truncated declarations, all 20 raw enum values, a valid value past the preview cut, receipt-safe store/load across two scripts, and clean `agent_settled` with host-owned compaction. This is a focused compatibility check, not a claim that the entire test suite runs against 1.0.2. Fabric does **not** import the standalone `pi-codemode` package; its presence in an embedding application is independent.
40
+
41
+ Relevant intervening changes:
42
+
43
+ - Host SDK loading now resolves from the running Pi CLI or embedding entry, including mapped/compiled hosts. Managed installs need not place a second host SDK beside Fabric.
44
+ - External provider registration now contributes direct guest globals and schema-derived types; host provider names still pass closed-world authorization.
45
+ - Program-run events accept caller-supplied code. They execute in the current host's root capability view and policy; they do not widen managed provider authority.
46
+ - Interrupted read-only durable execution can rerun once in supported durable environments. Managed mode still does not enable native workers or agents.
47
+ - Child roster filtering and exact child-question names changed for native agents. Those facilities remain disabled in managed mode unless supplied by a host provider.
48
+ - Terminal-title, agent-panel, shell warming and background optimization work do not enable those native facilities in managed mode.
49
+
50
+ New deliberate changes in this release: the managed default CPU slice is bounded; Jev is disabled as documented; managed prompts no longer advertise unloaded coding providers or automatically contribute Fabric's coding skill tree. Host code should register desired skill resources itself. Native catalog declarations remain advisory, visibly incomplete when bounded; dispatch validates against the full schema.