@e4779/pi-fabric 0.131.4-fork.33 → 0.138.1-fork.1

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 (435) hide show
  1. package/README.md +8 -0
  2. package/dist/actors/context.d.ts.map +1 -1
  3. package/dist/agents/clone-first-worktree.d.ts +2 -0
  4. package/dist/agents/clone-first-worktree.d.ts.map +1 -1
  5. package/dist/agents/completion-inbox.d.ts +2 -1
  6. package/dist/agents/completion-inbox.d.ts.map +1 -1
  7. package/dist/agents/handoff.d.ts.map +1 -1
  8. package/dist/agents/manager.d.ts.map +1 -1
  9. package/dist/agents/worktree-manager.d.ts +4 -1
  10. package/dist/agents/worktree-manager.d.ts.map +1 -1
  11. package/dist/agents/worktree-paths.d.ts +8 -3
  12. package/dist/agents/worktree-paths.d.ts.map +1 -1
  13. package/dist/agents.js +6 -1
  14. package/dist/agents.js.map +1 -1
  15. package/dist/async-settlement.d.ts +1 -1
  16. package/dist/async-settlement.d.ts.map +1 -1
  17. package/dist/audit/details.d.ts.map +1 -1
  18. package/dist/capture/catalog.d.ts +2 -0
  19. package/dist/capture/catalog.d.ts.map +1 -1
  20. package/dist/capture/interceptor.d.ts.map +1 -1
  21. package/dist/chunks/{chunk-7N7IC3Z2.js → chunk-2CD7HLVP.js} +3 -84
  22. package/dist/chunks/chunk-2CD7HLVP.js.map +7 -0
  23. package/dist/chunks/{chunk-7YNE4NB2.js → chunk-2MELFQCQ.js} +2 -2
  24. package/dist/chunks/{chunk-HSEZPCL5.js → chunk-2OC4YJOL.js} +3 -3
  25. package/dist/chunks/{chunk-TXCNZCZP.js → chunk-2QJ4MNS6.js} +2 -2
  26. package/dist/chunks/{chunk-F6A6MQ6G.js → chunk-2WPTD6BI.js} +11 -15
  27. package/dist/chunks/chunk-2WPTD6BI.js.map +7 -0
  28. package/dist/chunks/{chunk-QOEOKW2X.js → chunk-3QH6JAE3.js} +2 -2
  29. package/dist/chunks/chunk-4U47NCP2.js +88 -0
  30. package/dist/chunks/chunk-4U47NCP2.js.map +7 -0
  31. package/dist/chunks/{chunk-OJ4HAALD.js → chunk-5VZEAAHD.js} +10 -9
  32. package/dist/chunks/chunk-5VZEAAHD.js.map +7 -0
  33. package/dist/chunks/{chunk-LKYLD5SN.js → chunk-6HM4TX7L.js} +10 -8
  34. package/dist/chunks/chunk-6HM4TX7L.js.map +7 -0
  35. package/dist/chunks/{chunk-L6H46CPY.js → chunk-6NNL5LOG.js} +2 -2
  36. package/dist/chunks/{chunk-7TB7NXSL.js → chunk-7CIQQOOD.js} +11 -3
  37. package/dist/chunks/{chunk-7TB7NXSL.js.map → chunk-7CIQQOOD.js.map} +2 -2
  38. package/dist/chunks/{chunk-RWKQ5SRW.js → chunk-7ZFPVOV2.js} +2 -2
  39. package/dist/chunks/{chunk-PUBHBEYO.js → chunk-B2FIGOPI.js} +2 -2
  40. package/dist/chunks/{chunk-HRDMBGMY.js → chunk-BLT66VHH.js} +331 -22
  41. package/dist/chunks/chunk-BLT66VHH.js.map +7 -0
  42. package/dist/chunks/{chunk-4WKD3YM3.js → chunk-C3UPHOJW.js} +3 -3
  43. package/dist/chunks/{chunk-G2DZJ5LK.js → chunk-CB72SLHB.js} +451 -134
  44. package/dist/chunks/chunk-CB72SLHB.js.map +7 -0
  45. package/dist/chunks/{chunk-B5L3X3ID.js → chunk-CCJ6PUZJ.js} +1 -1
  46. package/dist/chunks/{chunk-B5L3X3ID.js.map → chunk-CCJ6PUZJ.js.map} +1 -1
  47. package/dist/chunks/{chunk-FK73YJKV.js → chunk-DWM63MAJ.js} +21 -9
  48. package/dist/chunks/chunk-DWM63MAJ.js.map +7 -0
  49. package/dist/chunks/{chunk-56NMRVTV.js → chunk-FFJ7TV66.js} +32 -29
  50. package/dist/chunks/chunk-FFJ7TV66.js.map +7 -0
  51. package/dist/chunks/{chunk-LRSZFYUC.js → chunk-FUMALXYQ.js} +15 -15
  52. package/dist/chunks/chunk-FUMALXYQ.js.map +7 -0
  53. package/dist/chunks/{chunk-TJZYM2SP.js → chunk-G3RQ3HUK.js} +8 -3
  54. package/dist/chunks/{chunk-TJZYM2SP.js.map → chunk-G3RQ3HUK.js.map} +2 -2
  55. package/dist/chunks/{chunk-RAA3FAYZ.js → chunk-GNPTDN6K.js} +2 -2
  56. package/dist/chunks/{chunk-XFOSUGLU.js → chunk-JCGEW5OQ.js} +5 -5
  57. package/dist/chunks/{chunk-CXYJJ3HZ.js → chunk-LJ2MG6U2.js} +3 -3
  58. package/dist/chunks/{chunk-3MOY6WIB.js → chunk-LRBDEAKB.js} +3 -3
  59. package/dist/chunks/{chunk-2RWNVCFD.js → chunk-MPFBOVOD.js} +1 -1
  60. package/dist/chunks/{chunk-2RWNVCFD.js.map → chunk-MPFBOVOD.js.map} +1 -1
  61. package/dist/chunks/{chunk-NQ7IWEIF.js → chunk-MQGRQMVM.js} +2 -2
  62. package/dist/chunks/{chunk-3VK6UGAN.js → chunk-O5SHIUIL.js} +6 -1
  63. package/dist/chunks/chunk-O5SHIUIL.js.map +7 -0
  64. package/dist/chunks/{chunk-U6Y6TKJL.js → chunk-OK2EKY3M.js} +15 -11
  65. package/dist/chunks/chunk-OK2EKY3M.js.map +7 -0
  66. package/dist/chunks/{chunk-DGUXJSYA.js → chunk-OR44GYXD.js} +70 -3
  67. package/dist/chunks/chunk-OR44GYXD.js.map +7 -0
  68. package/dist/chunks/{chunk-DGERP4VL.js → chunk-P4TALNLX.js} +11 -10
  69. package/dist/chunks/chunk-P4TALNLX.js.map +7 -0
  70. package/dist/chunks/{chunk-4BYS4ZLY.js → chunk-PHGPOSCP.js} +267 -71
  71. package/dist/chunks/chunk-PHGPOSCP.js.map +7 -0
  72. package/dist/chunks/{chunk-3XT5WHSG.js → chunk-QAGEWWCJ.js} +260 -59
  73. package/dist/chunks/chunk-QAGEWWCJ.js.map +7 -0
  74. package/dist/chunks/{chunk-WKFRGICG.js → chunk-RBYRHS24.js} +2 -2
  75. package/dist/chunks/{chunk-ZHROHNEE.js → chunk-RFNYH7S7.js} +8 -8
  76. package/dist/chunks/{chunk-VGRUWTMG.js → chunk-RPZJVLML.js} +472 -466
  77. package/dist/chunks/chunk-RPZJVLML.js.map +7 -0
  78. package/dist/chunks/{chunk-H57KPL3V.js → chunk-S2JWFXW5.js} +2 -2
  79. package/dist/chunks/{chunk-LZ2ZXOCU.js → chunk-SSB2JN3I.js} +168 -5
  80. package/dist/chunks/chunk-SSB2JN3I.js.map +7 -0
  81. package/dist/chunks/{chunk-RKJPBTBB.js → chunk-SVQ7ZHEQ.js} +33 -16
  82. package/dist/chunks/chunk-SVQ7ZHEQ.js.map +7 -0
  83. package/dist/chunks/{chunk-MPMEK3IQ.js → chunk-TV5NCPPS.js} +6 -5
  84. package/dist/chunks/chunk-TV5NCPPS.js.map +7 -0
  85. package/dist/chunks/{chunk-XOBLUZMB.js → chunk-UIVMSMSQ.js} +10 -1
  86. package/dist/chunks/chunk-UIVMSMSQ.js.map +7 -0
  87. package/dist/chunks/{chunk-QGTD3LAZ.js → chunk-UYS5VZUU.js} +9 -3
  88. package/dist/chunks/chunk-UYS5VZUU.js.map +7 -0
  89. package/dist/chunks/{chunk-HRVYXRWZ.js → chunk-V5RZK45W.js} +37 -3
  90. package/dist/chunks/chunk-V5RZK45W.js.map +7 -0
  91. package/dist/chunks/{chunk-KIFOEBYJ.js → chunk-VEXCD3RA.js} +2 -2
  92. package/dist/chunks/{chunk-GS67KDMV.js → chunk-VN7AE3EY.js} +2 -2
  93. package/dist/chunks/{chunk-HFDJWLMS.js → chunk-WFGJUVTH.js} +106 -65
  94. package/dist/chunks/chunk-WFGJUVTH.js.map +7 -0
  95. package/dist/chunks/chunk-WMULZZER.js +196 -0
  96. package/dist/chunks/chunk-WMULZZER.js.map +7 -0
  97. package/dist/chunks/{chunk-QNMQJNXE.js → chunk-X4HDI7RT.js} +14 -4
  98. package/dist/chunks/chunk-X4HDI7RT.js.map +7 -0
  99. package/dist/chunks/{chunk-MX53BRAC.js → chunk-XBAOTA4U.js} +2 -2
  100. package/dist/chunks/{chunk-MSDL7U6Q.js → chunk-XQCNVH3Y.js} +4 -4
  101. package/dist/chunks/{chunk-4PBW54I2.js → chunk-YC6NV7FK.js} +88 -54
  102. package/dist/chunks/chunk-YC6NV7FK.js.map +7 -0
  103. package/dist/chunks/{chunk-6GWDGTHC.js → chunk-YLO62DWD.js} +4 -4
  104. package/dist/cli/decisions.js +2 -2
  105. package/dist/cli/mesh.js +3 -3
  106. package/dist/commands/fabric-handler.d.ts.map +1 -1
  107. package/dist/commands/fabric-handler.js +18 -4
  108. package/dist/commands/fabric-handler.js.map +2 -2
  109. package/dist/commands/fabric.d.ts.map +1 -1
  110. package/dist/compaction/branch-summary.d.ts.map +1 -1
  111. package/dist/compaction/claim-events.js +9 -9
  112. package/dist/compaction/hook.d.ts.map +1 -1
  113. package/dist/compaction/hook.js +6 -6
  114. package/dist/compaction/normalize.d.ts +9 -0
  115. package/dist/compaction/normalize.d.ts.map +1 -1
  116. package/dist/compaction/owner.js +7 -7
  117. package/dist/compaction/projections.d.ts +18 -2
  118. package/dist/compaction/projections.d.ts.map +1 -1
  119. package/dist/compaction/qa.d.ts +3 -2
  120. package/dist/compaction/qa.d.ts.map +1 -1
  121. package/dist/compaction/render.d.ts +3 -0
  122. package/dist/compaction/render.d.ts.map +1 -1
  123. package/dist/compaction/threshold.d.ts.map +1 -1
  124. package/dist/compaction/user-activity.d.ts +31 -0
  125. package/dist/compaction/user-activity.d.ts.map +1 -0
  126. package/dist/components/configuration.js +4 -4
  127. package/dist/config.d.ts +13 -6
  128. package/dist/config.d.ts.map +1 -1
  129. package/dist/core/action-registry.d.ts +1 -1
  130. package/dist/core/action-registry.d.ts.map +1 -1
  131. package/dist/core/action-registry.js +10 -9
  132. package/dist/core/approval-controller.d.ts +3 -0
  133. package/dist/core/approval-controller.d.ts.map +1 -1
  134. package/dist/core/atomic-write.d.ts +1 -0
  135. package/dist/core/atomic-write.d.ts.map +1 -1
  136. package/dist/core/attached-monitors.d.ts +39 -0
  137. package/dist/core/attached-monitors.d.ts.map +1 -0
  138. package/dist/core/control-abort.d.ts +3 -0
  139. package/dist/core/control-abort.d.ts.map +1 -0
  140. package/dist/core/crash-guard.d.ts +15 -0
  141. package/dist/core/crash-guard.d.ts.map +1 -0
  142. package/dist/core/execution-guidelines.d.ts +6 -0
  143. package/dist/core/execution-guidelines.d.ts.map +1 -0
  144. package/dist/core/guidance-delivery.d.ts +19 -0
  145. package/dist/core/guidance-delivery.d.ts.map +1 -0
  146. package/dist/core/lifecycle-settlement.d.ts +9 -0
  147. package/dist/core/lifecycle-settlement.d.ts.map +1 -0
  148. package/dist/core/observation-actions.d.ts +9 -0
  149. package/dist/core/observation-actions.d.ts.map +1 -0
  150. package/dist/core/pasted-images.d.ts +12 -0
  151. package/dist/core/pasted-images.d.ts.map +1 -0
  152. package/dist/core/pasted-images.js +139 -0
  153. package/dist/core/pasted-images.js.map +7 -0
  154. package/dist/core/permission-queue.d.ts +32 -0
  155. package/dist/core/permission-queue.d.ts.map +1 -0
  156. package/dist/core/permission-queue.js +104 -0
  157. package/dist/core/permission-queue.js.map +7 -0
  158. package/dist/core/prompt-guidance.d.ts +1 -0
  159. package/dist/core/prompt-guidance.d.ts.map +1 -1
  160. package/dist/core/prompt-guidance.js +52 -3
  161. package/dist/core/prompt-guidance.js.map +3 -3
  162. package/dist/core/provider-operations.js +1 -1
  163. package/dist/core/shell-inbox.d.ts +1 -1
  164. package/dist/core/shell-inbox.d.ts.map +1 -1
  165. package/dist/core/shell-jobs.d.ts +28 -1
  166. package/dist/core/shell-jobs.d.ts.map +1 -1
  167. package/dist/core/shell-monitor.d.ts +1 -0
  168. package/dist/core/shell-monitor.d.ts.map +1 -1
  169. package/dist/durable/worker.js +0 -42
  170. package/dist/durable/worker.js.map +3 -3
  171. package/dist/durable-extension.d.ts +2 -2
  172. package/dist/durable-extension.d.ts.map +1 -1
  173. package/dist/durable-extension.js +215 -1
  174. package/dist/durable-extension.js.map +3 -3
  175. package/dist/entropy/index.d.ts +2 -0
  176. package/dist/entropy/index.d.ts.map +1 -1
  177. package/dist/entropy/index.js +23 -13
  178. package/dist/entropy/pool-store.d.ts +8 -1
  179. package/dist/entropy/pool-store.d.ts.map +1 -1
  180. package/dist/entropy/pool-worker.d.ts +18 -0
  181. package/dist/entropy/pool-worker.d.ts.map +1 -0
  182. package/dist/entropy/pool-writer.d.ts +23 -0
  183. package/dist/entropy/pool-writer.d.ts.map +1 -0
  184. package/dist/entropy/pool.d.ts +11 -0
  185. package/dist/entropy/pool.d.ts.map +1 -1
  186. package/dist/entropy/sessions.d.ts +5 -0
  187. package/dist/entropy/sessions.d.ts.map +1 -1
  188. package/dist/execution-service.d.ts.map +1 -1
  189. package/dist/extension-bootstrap.d.ts.map +1 -1
  190. package/dist/extension-bootstrap.js +19 -19
  191. package/dist/extension.d.ts.map +1 -1
  192. package/dist/fabric-exec-tool.d.ts.map +1 -1
  193. package/dist/fabric-runtime-state.d.ts.map +1 -1
  194. package/dist/fabric-runtime-state.js +534 -261
  195. package/dist/fabric-runtime-state.js.map +4 -4
  196. package/dist/fabric-state.d.ts.map +1 -1
  197. package/dist/index.js +40 -30
  198. package/dist/index.js.map +1 -1
  199. package/dist/jev/client.js +2 -2
  200. package/dist/jev/observation.js +7 -6
  201. package/dist/jev.js +12 -11
  202. package/dist/main-agent.d.ts.map +1 -1
  203. package/dist/managed-host.d.ts +4 -0
  204. package/dist/managed-host.d.ts.map +1 -1
  205. package/dist/memory/discovery.js +6 -6
  206. package/dist/memory/expand-service.d.ts.map +1 -1
  207. package/dist/memory/file-worker.js +9 -8
  208. package/dist/memory/file-worker.js.map +1 -1
  209. package/dist/memory/history-paging.d.ts +9 -0
  210. package/dist/memory/history-paging.d.ts.map +1 -0
  211. package/dist/memory/history-paging.js +164 -0
  212. package/dist/memory/history-paging.js.map +7 -0
  213. package/dist/memory/index.d.ts.map +1 -1
  214. package/dist/memory/normalize.js +5 -5
  215. package/dist/memory/outline-service.d.ts +7 -0
  216. package/dist/memory/outline-service.d.ts.map +1 -0
  217. package/dist/memory/request-cache.d.ts +3 -1
  218. package/dist/memory/request-cache.d.ts.map +1 -1
  219. package/dist/memory/request-context.d.ts +1 -0
  220. package/dist/memory/request-context.d.ts.map +1 -1
  221. package/dist/memory/request-limits.d.ts +2 -0
  222. package/dist/memory/request-limits.d.ts.map +1 -1
  223. package/dist/memory/search.js +7 -6
  224. package/dist/memory/worker-provider.d.ts.map +1 -1
  225. package/dist/memory/worker-provider.js +10 -9
  226. package/dist/memory.d.ts +16 -1
  227. package/dist/memory.d.ts.map +1 -1
  228. package/dist/memory.js +64 -12
  229. package/dist/memory.js.map +1 -1
  230. package/dist/mesh/store.d.ts +2 -1
  231. package/dist/mesh/store.d.ts.map +1 -1
  232. package/dist/programs/host.js +2 -2
  233. package/dist/protocol.d.ts +5 -0
  234. package/dist/protocol.d.ts.map +1 -1
  235. package/dist/protocol.js +1 -1
  236. package/dist/providers/agents-actions.d.ts.map +1 -1
  237. package/dist/providers/agents-message-router.d.ts +1 -0
  238. package/dist/providers/agents-message-router.d.ts.map +1 -1
  239. package/dist/providers/agents-provider.d.ts +2 -0
  240. package/dist/providers/agents-provider.d.ts.map +1 -1
  241. package/dist/providers/jev-provider.js +12 -11
  242. package/dist/providers/memory-provider.d.ts +4 -0
  243. package/dist/providers/memory-provider.d.ts.map +1 -1
  244. package/dist/providers/memory-provider.js +9 -8
  245. package/dist/providers/pi-read-operations.d.ts +24 -0
  246. package/dist/providers/pi-read-operations.d.ts.map +1 -0
  247. package/dist/providers/pi-tools-provider.d.ts +7 -0
  248. package/dist/providers/pi-tools-provider.d.ts.map +1 -1
  249. package/dist/providers/sessions-provider.d.ts +1 -1
  250. package/dist/providers/sessions-provider.d.ts.map +1 -1
  251. package/dist/providers/tasks-provider.d.ts +3 -1
  252. package/dist/providers/tasks-provider.d.ts.map +1 -1
  253. package/dist/residency/actor-client.js +3 -3
  254. package/dist/residency/client.d.ts.map +1 -1
  255. package/dist/residency/host.d.ts.map +1 -1
  256. package/dist/residency/host.js +17 -16
  257. package/dist/residency/launcher.js +1 -1
  258. package/dist/residency/pi-entry.js +17 -16
  259. package/dist/residency/pi-entry.js.map +1 -1
  260. package/dist/residency/protocol.d.ts +2 -0
  261. package/dist/residency/protocol.d.ts.map +1 -1
  262. package/dist/runtime/core-override-guest-types.js +2 -2
  263. package/dist/runtime/cpython-runtime.d.ts.map +1 -1
  264. package/dist/runtime/cpython-runtime.js +7 -6
  265. package/dist/runtime/cpython-runtime.js.map +2 -2
  266. package/dist/runtime/guest-types.d.ts +1 -1
  267. package/dist/runtime/guest-types.d.ts.map +1 -1
  268. package/dist/runtime/guest-types.js +1 -1
  269. package/dist/runtime/monty-runtime.d.ts.map +1 -1
  270. package/dist/runtime/monty-runtime.js +7 -6
  271. package/dist/runtime/monty-runtime.js.map +2 -2
  272. package/dist/runtime/node-process-runtime.d.ts.map +1 -1
  273. package/dist/runtime/node-process-runtime.js +6 -6
  274. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  275. package/dist/runtime/quickjs-runtime.js +4 -4
  276. package/dist/runtime/type-checker.d.ts.map +1 -1
  277. package/dist/runtime/type-checker.js +1 -1
  278. package/dist/runtime/typescript-kernel.js +10 -10
  279. package/dist/runtime-state-builtins.d.ts +2 -0
  280. package/dist/runtime-state-builtins.d.ts.map +1 -1
  281. package/dist/schema/policy.d.ts.map +1 -1
  282. package/dist/speculation/eligibility.d.ts.map +1 -1
  283. package/dist/speculation/store.d.ts.map +1 -1
  284. package/dist/topology/participant-directory.d.ts +1 -0
  285. package/dist/topology/participant-directory.d.ts.map +1 -1
  286. package/dist/topology/peer-presence.d.ts.map +1 -1
  287. package/dist/topology/provider-participants.d.ts +1 -0
  288. package/dist/topology/provider-participants.d.ts.map +1 -1
  289. package/dist/type-error-guidance.js +1 -1
  290. package/dist/ui/code-preview-shell.d.ts +1 -0
  291. package/dist/ui/code-preview-shell.d.ts.map +1 -1
  292. package/dist/ui/controller.d.ts.map +1 -1
  293. package/dist/ui/conversation-chrome.d.ts.map +1 -1
  294. package/dist/ui/conversation-chrome.js +2 -2
  295. package/dist/ui/conversation-feedback.d.ts +8 -0
  296. package/dist/ui/conversation-feedback.d.ts.map +1 -0
  297. package/dist/ui/conversation-latest.d.ts.map +1 -1
  298. package/dist/ui/conversation-native-reader.d.ts.map +1 -1
  299. package/dist/ui/conversation-native-reader.js +3 -3
  300. package/dist/ui/conversation-native-reader.js.map +2 -2
  301. package/dist/ui/conversation-render.d.ts.map +1 -1
  302. package/dist/ui/conversation.d.ts +1 -0
  303. package/dist/ui/conversation.d.ts.map +1 -1
  304. package/dist/ui/conversation.js +139 -86
  305. package/dist/ui/conversation.js.map +4 -4
  306. package/dist/ui/core-tool-render.d.ts.map +1 -1
  307. package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -1
  308. package/dist/ui/dashboard.js +47 -48
  309. package/dist/ui/dashboard.js.map +3 -3
  310. package/dist/ui/fabric-render.d.ts.map +1 -1
  311. package/dist/ui/format.d.ts.map +1 -1
  312. package/dist/ui/highlight.d.ts.map +1 -1
  313. package/dist/ui/permissions.d.ts +18 -0
  314. package/dist/ui/permissions.d.ts.map +1 -0
  315. package/dist/ui/permissions.js +178 -0
  316. package/dist/ui/permissions.js.map +7 -0
  317. package/dist/ui/row-balance.d.ts +1 -1
  318. package/dist/ui/row-balance.d.ts.map +1 -1
  319. package/dist/ui/settings-sections-execution.d.ts.map +1 -1
  320. package/dist/ui/settings-values.d.ts.map +1 -1
  321. package/dist/ui/settings.js +37 -31
  322. package/dist/ui/settings.js.map +2 -2
  323. package/dist/ui/shell-hang-keys.d.ts.map +1 -1
  324. package/dist/ui/shell-tasks.d.ts.map +1 -1
  325. package/dist/ui/shell-tasks.js +28 -11
  326. package/dist/ui/shell-tasks.js.map +2 -2
  327. package/dist/ui/structured.d.ts.map +1 -1
  328. package/dist/ui/tool-display.d.ts +18 -2
  329. package/dist/ui/tool-display.d.ts.map +1 -1
  330. package/dist/ui/truncate.d.ts +3 -0
  331. package/dist/ui/truncate.d.ts.map +1 -0
  332. package/dist/ui/widget.d.ts +7 -2
  333. package/dist/ui/widget.d.ts.map +1 -1
  334. package/dist/verified/context.d.ts +35 -0
  335. package/dist/verified/context.d.ts.map +1 -0
  336. package/dist/verified/execution.d.ts +7 -0
  337. package/dist/verified/execution.d.ts.map +1 -0
  338. package/dist/verified/generated/context.d.ts +6 -0
  339. package/dist/verified/generated/context.js +51 -0
  340. package/dist/verified/generated/execution.d.ts +5 -0
  341. package/dist/verified/generated/execution.js +32 -0
  342. package/dist/verified/generated/manifest.json +34 -3
  343. package/dist/verified/generated/prompt-guidance.d.ts +4 -0
  344. package/dist/verified/generated/prompt-guidance.js +17 -0
  345. package/dist/worker/recovery-watchdog.d.ts +7 -0
  346. package/dist/worker/recovery-watchdog.d.ts.map +1 -1
  347. package/dist/worker/recovery-watchdog.js +66 -4
  348. package/dist/worker/recovery-watchdog.js.map +2 -2
  349. package/dist/worker.js +22 -3
  350. package/dist/worker.js.map +2 -2
  351. package/docs/agents.md +37 -4
  352. package/docs/architecture.md +13 -0
  353. package/docs/background-tasks.md +81 -5
  354. package/docs/benchmarks/cli-resume-2026-11-09.json +1260 -0
  355. package/docs/benchmarks/interactivity-2026-11-09.json +2280 -0
  356. package/docs/benchmarks/resume-latency-2026-11-09.json +12105 -0
  357. package/docs/benchmarks/resume-startup-fix-2026-11-09.json +5452 -0
  358. package/docs/benchmarks/session-memory-2026-11-09.json +1320 -0
  359. package/docs/benchmarks/session-memory-fix-2026-11-09.json +280 -0
  360. package/docs/compaction.md +59 -23
  361. package/docs/configuration.md +53 -11
  362. package/docs/entropy.md +4 -1
  363. package/docs/history-paging.md +99 -0
  364. package/docs/interactivity-investigation.md +109 -0
  365. package/docs/interface.md +2 -2
  366. package/docs/jev.md +1 -1
  367. package/docs/memory-recall.md +42 -1
  368. package/docs/providers.md +24 -1
  369. package/docs/resume-latency-investigation.md +249 -0
  370. package/docs/session-memory-investigation.md +223 -0
  371. package/docs/verified-kernels.md +56 -0
  372. package/package.json +211 -211
  373. package/proofs/context.ts +139 -0
  374. package/proofs/execution.ts +48 -0
  375. package/proofs/index.ts +6 -0
  376. package/proofs/prompt-guidance.ts +38 -0
  377. package/scripts/verified-kernels.ts +1 -1
  378. package/skillsets/python/fabric-council/SKILL.md +31 -21
  379. package/skillsets/python/fabric-exec/SKILL.md +1 -1
  380. package/skillsets/python/fabric-exec/references/agents.md +2 -0
  381. package/skillsets/python/fabric-guide/SKILL.md +1 -0
  382. package/skillsets/python/fabric-memory/SKILL.md +82 -0
  383. package/skillsets/typescript/fabric-council/SKILL.md +26 -17
  384. package/skillsets/typescript/fabric-exec/SKILL.md +3 -2
  385. package/skillsets/typescript/fabric-exec/references/agents.md +1 -0
  386. package/skillsets/typescript/fabric-guide/SKILL.md +1 -0
  387. package/skillsets/typescript/fabric-memory/SKILL.md +87 -0
  388. package/dist/chunks/chunk-3VK6UGAN.js.map +0 -7
  389. package/dist/chunks/chunk-3XT5WHSG.js.map +0 -7
  390. package/dist/chunks/chunk-4BYS4ZLY.js.map +0 -7
  391. package/dist/chunks/chunk-4PBW54I2.js.map +0 -7
  392. package/dist/chunks/chunk-56NMRVTV.js.map +0 -7
  393. package/dist/chunks/chunk-7N7IC3Z2.js.map +0 -7
  394. package/dist/chunks/chunk-DGERP4VL.js.map +0 -7
  395. package/dist/chunks/chunk-DGUXJSYA.js.map +0 -7
  396. package/dist/chunks/chunk-F6A6MQ6G.js.map +0 -7
  397. package/dist/chunks/chunk-FK73YJKV.js.map +0 -7
  398. package/dist/chunks/chunk-G2DZJ5LK.js.map +0 -7
  399. package/dist/chunks/chunk-HFDJWLMS.js.map +0 -7
  400. package/dist/chunks/chunk-HRDMBGMY.js.map +0 -7
  401. package/dist/chunks/chunk-HRVYXRWZ.js.map +0 -7
  402. package/dist/chunks/chunk-LKYLD5SN.js.map +0 -7
  403. package/dist/chunks/chunk-LRSZFYUC.js.map +0 -7
  404. package/dist/chunks/chunk-LZ2ZXOCU.js.map +0 -7
  405. package/dist/chunks/chunk-MPMEK3IQ.js.map +0 -7
  406. package/dist/chunks/chunk-OJ4HAALD.js.map +0 -7
  407. package/dist/chunks/chunk-QGTD3LAZ.js.map +0 -7
  408. package/dist/chunks/chunk-QNMQJNXE.js.map +0 -7
  409. package/dist/chunks/chunk-RKJPBTBB.js.map +0 -7
  410. package/dist/chunks/chunk-U6Y6TKJL.js.map +0 -7
  411. package/dist/chunks/chunk-VGRUWTMG.js.map +0 -7
  412. package/dist/chunks/chunk-XOBLUZMB.js.map +0 -7
  413. package/dist/durable/openai-sse-patch.d.ts +0 -21
  414. package/dist/durable/openai-sse-patch.d.ts.map +0 -1
  415. /package/dist/chunks/{chunk-7YNE4NB2.js.map → chunk-2MELFQCQ.js.map} +0 -0
  416. /package/dist/chunks/{chunk-HSEZPCL5.js.map → chunk-2OC4YJOL.js.map} +0 -0
  417. /package/dist/chunks/{chunk-TXCNZCZP.js.map → chunk-2QJ4MNS6.js.map} +0 -0
  418. /package/dist/chunks/{chunk-QOEOKW2X.js.map → chunk-3QH6JAE3.js.map} +0 -0
  419. /package/dist/chunks/{chunk-L6H46CPY.js.map → chunk-6NNL5LOG.js.map} +0 -0
  420. /package/dist/chunks/{chunk-RWKQ5SRW.js.map → chunk-7ZFPVOV2.js.map} +0 -0
  421. /package/dist/chunks/{chunk-PUBHBEYO.js.map → chunk-B2FIGOPI.js.map} +0 -0
  422. /package/dist/chunks/{chunk-4WKD3YM3.js.map → chunk-C3UPHOJW.js.map} +0 -0
  423. /package/dist/chunks/{chunk-RAA3FAYZ.js.map → chunk-GNPTDN6K.js.map} +0 -0
  424. /package/dist/chunks/{chunk-XFOSUGLU.js.map → chunk-JCGEW5OQ.js.map} +0 -0
  425. /package/dist/chunks/{chunk-CXYJJ3HZ.js.map → chunk-LJ2MG6U2.js.map} +0 -0
  426. /package/dist/chunks/{chunk-3MOY6WIB.js.map → chunk-LRBDEAKB.js.map} +0 -0
  427. /package/dist/chunks/{chunk-NQ7IWEIF.js.map → chunk-MQGRQMVM.js.map} +0 -0
  428. /package/dist/chunks/{chunk-WKFRGICG.js.map → chunk-RBYRHS24.js.map} +0 -0
  429. /package/dist/chunks/{chunk-ZHROHNEE.js.map → chunk-RFNYH7S7.js.map} +0 -0
  430. /package/dist/chunks/{chunk-H57KPL3V.js.map → chunk-S2JWFXW5.js.map} +0 -0
  431. /package/dist/chunks/{chunk-KIFOEBYJ.js.map → chunk-VEXCD3RA.js.map} +0 -0
  432. /package/dist/chunks/{chunk-GS67KDMV.js.map → chunk-VN7AE3EY.js.map} +0 -0
  433. /package/dist/chunks/{chunk-MX53BRAC.js.map → chunk-XBAOTA4U.js.map} +0 -0
  434. /package/dist/chunks/{chunk-MSDL7U6Q.js.map → chunk-XQCNVH3Y.js.map} +0 -0
  435. /package/dist/chunks/{chunk-6GWDGTHC.js.map → chunk-YLO62DWD.js.map} +0 -0
@@ -0,0 +1,223 @@
1
+ # Session memory investigation (2026-11-09)
2
+
3
+ ## Finding
4
+
5
+ Pi core 1.5.0 retains the complete parsed session history after context compaction.
6
+ This behavior reproduces without importing Fabric. It is history-size-dependent
7
+ retention, not evidence of unreachable objects leaking. Starting a new session
8
+ releases the old history; V8/allocator RSS need not fall at the same time.
9
+
10
+ Fabric adds overhead, but the tested executor/session lifecycle did not exhibit
11
+ runaway retained-heap growth. These controls do **not** fully attribute a live
12
+ macOS process's footprint or exclude leaks in untested workloads/extensions.
13
+
14
+ ## Reproducer
15
+
16
+ `scripts/benchmark-session-memory.mjs` generates synthetic histories only. It
17
+ never reads real conversations. SDK modes use a local deterministic provider,
18
+ disable model-network refresh, isolate configuration in a temporary directory,
19
+ and disable optional Fabric engines/services. No actual model requests are made.
20
+ Temporary histories are removed on normal completion or caught failure.
21
+
22
+ Modes:
23
+
24
+ - `manager`: core SessionManager only. Load, build context, compact, replace with
25
+ an active-context-only control, start new, and reopen/release twice.
26
+ - `paged`: the manager control plus Fabric payload paging. It uses text-block
27
+ arrays so it can assert with weak references that the retired payloads were
28
+ collected, then checks an exact cold read and unchanged source file.
29
+ - `sdk`: real core AgentSessionRuntime, an offline turn, and repeated new sessions.
30
+ - `fabric`: the same SDK lifecycle with the compiled Fabric extension and one
31
+ successful `fabric_exec` (`return 1`) per session.
32
+ - `checkpoint`: retain a synthetic full archive on disk but open a new, tiny
33
+ checkpoint session referencing it via `parentSession`. Core does not eagerly
34
+ load the parent archive.
35
+
36
+ `--mib` sets the approximate synthetic archive size (1–1024 MiB).
37
+ `--cycles` sets SDK replacement count (1–200; default 6).
38
+ All measurements force three garbage collections across event-loop turns.
39
+ The script asserts context counts, model-context equivalence for the synthetic
40
+ projection, successful Fabric calls, non-cancelled replacements and no extension
41
+ errors. Memory values are observations, not timing-sensitive test thresholds.
42
+
43
+ ```sh
44
+ # Run the checked-in matrix on boat; results include logs and placement.json.
45
+ supercomputer run --jobs scripts/benchmark-session-memory.jobs.json \
46
+ --out /tmp/pi-session-memory --class interactive --vm-type large --timing
47
+
48
+ # Equivalent single case, inside a prepared remote checkout:
49
+ bun install --frozen-lockfile
50
+ bun run build
51
+ node --expose-gc scripts/benchmark-session-memory.mjs --mode fabric --mib 256
52
+ ```
53
+
54
+ ## Measured results
55
+
56
+ Nine isolated jobs passed on boat, each alone on a `large` VM, AMD Ryzen 9 9950X,
57
+ two pinned vCPUs. Runtime: Node v24.22.1, Linux x64; core: 1.5.0;
58
+ Fabric source base: `5946b458`. Each scenario used a fresh process.
59
+
60
+ Raw measurements, batch tree identities and placements are in
61
+ [`benchmarks/session-memory-2026-11-09.json`](benchmarks/session-memory-2026-11-09.json).
62
+ The initial three manager jobs predate the projection-control step added to the
63
+ reproducer; the later manager job verifies that step separately.
64
+
65
+ ### History retention without Fabric
66
+
67
+ | Synthetic JSONL | Loaded heap | After compaction | After new session |
68
+ | --- | ---: | ---: | ---: |
69
+ | 64 MiB | 96.20 MiB | 96.28 MiB | 32.12 MiB |
70
+ | 256 MiB | 288.95 MiB | 289.04 MiB | 32.14 MiB |
71
+ | 600 MiB | 634.54 MiB | 634.62 MiB | 32.13 MiB |
72
+
73
+ Compaction reduced model context to **one message** in all cases. Reopening the
74
+ compacted file restored approximately the same large heap. Releasing it again
75
+ returned to approximately 32 MiB, with no accumulating copies of the old history.
76
+
77
+ RSS differs from reachable heap: in the 600 MiB case, new-session heap dropped
78
+ from 635 to 32 MiB, but RSS stayed near 789 MiB. Peak RSS over the repeated reopen
79
+ experiment reached 951 MiB. GC alone cannot be treated as an RSS reset.
80
+
81
+ ### Matched SDK/Fabric controls (256 MiB history)
82
+
83
+ | State | Core SDK heap | Core SDK + Fabric heap |
84
+ | --- | ---: | ---: |
85
+ | Session created | 289.84 MiB | 318.44 MiB |
86
+ | Compacted | 289.83 MiB | 318.43 MiB |
87
+ | First offline turn / Fabric execution | 290.00 MiB | 350.78 MiB |
88
+ | First new session and turn | 33.26 MiB | 94.81 MiB |
89
+ | Released after six replacements | 33.51 MiB | 94.84 MiB |
90
+
91
+ The approximately 257 MiB history component disappears in **both** cases.
92
+ Fabric's first-use overhead includes compiler/runtime/module allocations; it is
93
+ not a measurement of the activity store under large nested workloads.
94
+
95
+ A separate 120-replacement control (1 MiB initial fixture) ended at 34.92 MiB
96
+ core heap and 102.34 MiB with Fabric. The Fabric samples at replacements
97
+ 30/60/90/120 were 100.78/102.52/107.84/102.34 MiB; there was no runaway growth.
98
+ After disposal they were 34.60/99.16 MiB. RSS still climbed and must not be
99
+ confused with continually retained session histories.
100
+
101
+ ### Prevention control
102
+
103
+ Opening a tiny fresh checkpoint linked to an untouched 600 MiB archive used
104
+ 31.98 MiB heap and 173 MiB RSS, including fixture-generation overhead. Opening
105
+ the whole archive used 634.54 MiB heap and 788 MiB RSS. Separately, replacing an
106
+ already-loaded 256 MiB history with its synthetic active projection reduced heap
107
+ from 289.04 to 32.10 MiB, but did not immediately reduce RSS.
108
+
109
+ These controls demonstrate the memory benefit of not loading/retaining the archive.
110
+ They are **not** a production session migration: real histories also carry
111
+ extension state, model/tool state, usage, labels and branches.
112
+
113
+ ## Why core does this
114
+
115
+ In the installed core's `dist/core/session-manager.js`:
116
+
117
+ - `loadEntriesFromFile()` streams the file but retains every parsed entry.
118
+ - `SessionManager.fileEntries` and `byId` retain those entries. They share objects;
119
+ the two indexes are not two deep copies of the payloads.
120
+ - `appendCompaction()` appends a summary; `buildContextEntries()` selects a shorter
121
+ active projection. Neither removes the older entries from the history store.
122
+ - `newSession()` replaces `fileEntries` and clears the indexes.
123
+ - Core's AgentSessionRuntime replacement tears down the old session and recreates
124
+ its services. The SDK controls exercised that path, including extension shutdown.
125
+
126
+ ## Direct Fabric-side implementation
127
+
128
+ The follow-up implementation pages inactive message payloads through the existing
129
+ entry objects, preserving history APIs and cached entry references. It also keeps
130
+ archived history out of actor-event context construction and removes awaited
131
+ mesh publication from abort boundaries. See [history paging](history-paging.md)
132
+ for configuration, compatibility assumptions, storage behavior and tests. The
133
+ measurements above remain the **pre-fix baseline**, not post-fix measurements.
134
+
135
+ ## Other prevention avenues
136
+
137
+ 1. **Immediately usable: fresh sessions with a concise handoff.** Keep the old
138
+ JSONL as the archive and carry only the necessary summary/state into a fresh
139
+ session. Restart the process too when immediate physical-memory reclamation
140
+ matters. Resuming the same huge file reloads its history. Ordinary compaction,
141
+ `/clone`, or a fork carrying the full ancestral path is not an archive-eviction
142
+ mechanism.
143
+ 2. **Best upstream fix: disk-backed/paged history.** Keep entry IDs, parent links,
144
+ offsets and needed metadata in memory; hydrate payloads with a bounded cache.
145
+ Keep the active model projection hot. History navigation, extension state,
146
+ usage accounting, branches, labels and exports must still work. Merely clearing
147
+ `fileEntries`/`byId` from an extension is unsafe and violates those contracts.
148
+ 3. **Lower-risk upstream feature: an explicit checkpoint/continuation operation.**
149
+ Create a new session with the complete current prompt/tool/model state,
150
+ compaction summary, retained recent messages and required extension state,
151
+ linked to the unchanged archive. Require an explicit user decision; a plain
152
+ compaction should not silently change history/navigation semantics.
153
+ 4. **Fabric-side pressure reduction.** Add a total byte budget to retained activity
154
+ payloads and move bulky audit detail to lazy disk-backed references. Currently
155
+ `src/activity/store.ts` permits 24 runs × 1,000 calls, with 64,000-character
156
+ individual argument/result/preview caps. `src/audit/details.ts` caps each
157
+ persisted result envelope at 512 KiB, not the total session. Those bounds can
158
+ still accumulate substantially. Lower model-output caps alone do not bound
159
+ historical input, persisted details or the activity store.
160
+ 5. **Guardrails, not cures.** A memory/session-size warning can offer a handoff
161
+ before pressure becomes severe. V8 heap flags do not cap total RSS/native
162
+ allocations and may turn legitimate large histories into OOM failures. Forced
163
+ GC cannot collect history still reachable from SessionManager. Process
164
+ isolation/recycling is the reliable physical-memory reset.
165
+
166
+ ## Limits and next checks
167
+
168
+ The fixtures contain ASCII user text, not a replica of a production conversation.
169
+ The SDK controls have no terminal rendering, graphics/image allocations, real
170
+ provider streaming, MCP servers, or other installed extensions. They establish
171
+ core history retention and quantify minimal Fabric overhead, not ownership of
172
+ every byte in the reported 1.8–2.25 GB macOS processes. A profile of one affected
173
+ live process or a separately authorized representative workload is still needed
174
+ for complete attribution. No user session was rewritten or terminated.
175
+
176
+ ## Fabric retention in a long-lived process (2026-11-10)
177
+
178
+ A heap snapshot of a Pi process after five hours of Fabric work held 350 to
179
+ 430 MB of live heap. Session history was paged and was not the cause. Four
180
+ Fabric structures were, and each one is bounded now.
181
+
182
+ 1. **Tool card invalidators (a leak).** `FabricToolDisplayController` kept the
183
+ invalidate closure of every `fabric_exec` card it had seen, so the setting
184
+ for compact or full tool display could redraw them. A closure holds Pi's
185
+ whole transcript component with the call's arguments and its result. Pi
186
+ drops those components when it rebuilds the transcript after compaction,
187
+ and the controller kept them alive: 34.7 MB after five hours, growing with
188
+ every call. The controller now holds each card's renderer state through a
189
+ `WeakRef` and keys the closures by that state in a `WeakMap`, so a card
190
+ lives exactly as long as Pi's transcript holds it.
191
+ 2. **TypeScript lib files.** Each of the up to four cached guest type checkers
192
+ parsed its own copy of TypeScript's lib declarations. They are parsed once
193
+ per process now. Heap for four checkers fell from 48.7 MB to 26.1 MB.
194
+ 3. **Entropy session evidence.** The session reader cached evidence for 16
195
+ files by count, and the observation summary cache held the same arrays for
196
+ another 16 files. Evidence outside the eight most recently read files now
197
+ stays only within an estimated 16 MiB, and the summary cache keeps the ends
198
+ of each array, enough to recognize an appended window. The active window
199
+ is always kept, so the background compile never rescans a session it read
200
+ on the previous turn.
201
+ 4. **Syntax highlighting.** Fabric's previews used Shiki's default engine,
202
+ Oniguruma compiled to WebAssembly. Its linear memory only grows: compiling
203
+ grammar scanners took it from 16 MB to 172 MB on this repository's files,
204
+ and four more passes over them left it there. Fabric uses Shiki's
205
+ JavaScript regex engine now. On 432 blocks (this repository's TypeScript,
206
+ JavaScript, Markdown, JSON, YAML, shell and Python files, plus long
207
+ single-line cases) it produced identical tokens for every block except
208
+ three long lines cut by Shiki's 500 ms time limit, and it settled at about
209
+ 53 MB of collectable heap. Its warm tokenizing is slower: 112 ms at the
210
+ 95th percentile per block against 46 ms. Highlighted blocks are cached, so
211
+ a block pays this once.
212
+
213
+ The same measurement found a freeze. A TextMate grammar can be quadratic in
214
+ one line's length, inside a single regex search that Shiki's time limit cannot
215
+ interrupt: an 80,000-character TypeScript string literal blocked the thread
216
+ for 100 seconds with Oniguruma and 10 seconds with the JavaScript engine.
217
+ Lines longer than 2,000 characters now render plain, which bounds that case
218
+ near 115 ms per line.
219
+
220
+ The process footprint can still sit two to three times above the live heap:
221
+ V8 returns freed memory to the system slowly after a spike. Fabric's shell job
222
+ store keeps up to 256 finished jobs with their logs for 24 hours (about 14 MB
223
+ in the snapshot), a fixed bound left as it is.
@@ -27,6 +27,7 @@ a set of small policy kernels, **not a proof of every subsystem invariant**.
27
27
  | Capability authority | `authority.ts`: `capabilityAuthority` | `verified/authority.ts`, `core/action-registry.ts` | `authority_issue_exact`, `authority_use_safe`, `authority_use_complete`, `authority_derive_safe`, `authority_derive_complete`, `authority_child_use_safe`, `authority_released_cannot_derive`, `authority_released_not_live`, `authority_released_refused` |
28
28
  | Binding lifecycle | `lifecycle.ts`: `bindingStep` | `verified/lifecycle.ts`, `core/provider-bindings.ts`, `core/provider-operations.ts` | 19 step laws: safety, `Open`-based completeness, exact counts, close reservation, quarantine |
29
29
  | Compaction | `compaction.ts`: `compactionCut`; `policy.ts`: `summaryWithin`, `sampleWithin` | `compaction/hook.ts`, `compaction/bounds.ts` | `cut_sound`, `span_sound`, `refusal_final`, `header_once`, `cut_complete`, `summary_bounds`, `summary_complete`, `sample_accounting`, `sample_complete` |
30
+ | Compaction context salience | `context.ts`: `summaryAllocation`, `userStaleness`, `failureLedger` | `verified/context.ts`, `compaction/render.ts`, `compaction/user-activity.ts`, `compaction/projections.ts` | `user_first`, `allocation_within`, `operations_use_the_rest`, `unanchored_is_zero`, `user_resets`, `background_never_resets`, `compaction_counts_once`, `only_user_clears`, `failures_conserved`, `itemized_bounded`, `skipped_are_open`, `resolved_never_itemized`, `open_itemized_with_room`, `fresh_first`, `aged_fills_room` |
30
31
  | Memory | `policy.ts`: `lineageSelected`, `pointerCurrent`, `chunkAccepted`, `coverageComplete` | `memory/normalize.ts`, `memory/expand-service.ts`, `memory/digest.ts`, `memory/index.ts` | `active_lineage_only`, `explicit_all_lineages`, `pointer_sound`, `pointer_complete`, `chunk_sound`, `chunk_complete`, `coverage_sound`, `coverage_complete` |
31
32
  | Entropy normal forms | `policy.ts`: `useNormalized` | `entropy/normal-form.ts` | `normalization_sound`, `normalization_complete`, `canonical_identity` |
32
33
  | Storage CAS | `storage.ts`: `storageTransition` | `verified/storage.ts`, `mesh/store.ts` | `storage_safe` (three plan cases), `storage_put_complete`, `storage_delete_complete`, `storage_absent_delete_complete`, `storage_stale_refused`, `storage_put_overflow`, `storage_delete_overflow` |
@@ -34,7 +35,9 @@ a set of small policy kernels, **not a proof of every subsystem invariant**.
34
35
  | State and Schema | `policy.ts`: `headReadable`, `certificateAccepted`, `consume` | `state/store.ts`, `schema/controller.ts` | `head_sound`, `pending_without_marker_hidden`, `committed_head_visible`, `pending_head_visible`, `certificate_sound`, `certificate_complete`, `consume_once`, `consume_retires` |
35
36
  | External mesh grants | `grants.ts`: `meshGrantTake` | `verified/grants.ts`, `mesh/grants.ts` | Exact scoped admission, expiry/refusal precedence, exact decrement, refusal preservation and kind/topic forwarding |
36
37
  | Speculation bookkeeping | `speculation.ts`: `speculationAdmission`, `speculationCheck`, `speculationAccounting`; `policy.ts`: `consume` | `verified/speculation.ts`, `speculation/store.ts` | Exact admission caps, checkpoint refusal precedence, one-use entry reservation, exact event counters and epoch successor |
38
+ | Portable prompt guidance | `prompt-guidance.ts`: `promptGuidance` | `core/guidance-delivery.ts`, `extension.ts` | Exactly one portable destination while active, no inactive injection, structured routing, forced/legacy fallback |
37
39
  | Actor name decision | `actor-name.ts`: `actorName` | `actors/name-policy.ts`, `actors/manager.ts`, `actors/directory.ts` | Active dominates stopped, stopped is refused absent active, neither is available; host snapshot only, not a reservation |
40
+ | Execution limits and human waits | `execution.ts`: `outputCeiling`, `humanWaitAdmission` | `verified/execution.ts`, `managed-host.ts`, `execution-service.ts` | Valid positive host overrides only, exact defaults/overrides, positive accepted ceilings; native pause capability only with runtime support and no hard deadline |
38
41
  | Agent budget admission | `budget.ts`: `budgetAdmission` | `verified/budget.ts`, `agents/manager.ts` | Strict threshold safety/completeness, equality refusal, invalid observations refused |
39
42
  | Effect diagnostics | `policy.ts`: `unknownConflict`, `knownConflict` | `components/effect-policy.ts` | `unknown_conflict_exact`, `unknown_conflict_symmetric`, `known_conflict_exact` |
40
43
 
@@ -191,6 +194,14 @@ so its cost grows with the rows and their matches, not with every pair of rows.
191
194
  allowed. Together they give the old `spans_sound` over any finite span list.
192
195
  The production check feeds every span to the compiled machine.
193
196
 
197
+ - The failure ledger is a fold over failures: fresh ones newest first, then
198
+ aged ones, then resolved ones. `failures_conserved` holds over every run, so
199
+ each failure in a summary is itemized or counted in exactly one addressed
200
+ range. `fresh_first` keeps aged failures out of the room once a fresh open
201
+ failure was left out. The staleness fold counts compaction markers
202
+ and background deliveries after the latest user message; only a user message
203
+ resets it.
204
+
194
205
  ### Proof-backed testing
195
206
 
196
207
  gdp-wired checks universal policy properties. JavaScript tests check the codecs
@@ -249,6 +260,29 @@ spending ceiling. Nonfinite spend and invalid present budgets now fail closed
249
260
  budget remains distinct from an invalid observation of an active budget. Ledger
250
261
  parsing, aggregation, file I/O and recursive environment propagation remain tested.
251
262
 
263
+ ### Execution ceiling and human-wait boundaries
264
+
265
+ `execution.outputCeiling` selects a host default for an omitted option and accepts
266
+ a present override only when it is valid and positive. Accepted overrides retain
267
+ the exact value, even above the default. The bridge derives validity from a
268
+ positive-safe-integer check without coercion and validates the default too.
269
+ `undefined` and `null` mean omitted, preserving nullish-default compatibility;
270
+ other malformed present values throw. The
271
+ generated acceptance flag is checked before a ceiling is returned. Final and nested ceilings are separate host-owned settings;
272
+ this decision does not prove serialization sizes, token estimates, log bounds,
273
+ truncation, or the separate native-result ceiling.
274
+
275
+ `execution.humanWaitAdmission` exposes the existing native callback exactly when
276
+ one is supplied and `hardTimeoutMs` is absent. The bridge forwards the same
277
+ callback; it does not synthesize authority. During `fabric_exec`, the invocation
278
+ context always has the property, with `undefined` when the callback is unavailable.
279
+ These are admission laws, not a proof of elapsed
280
+ time, timer precision, balanced pause ownership, or provider behavior. The
281
+ existing pause counter and floating-point clock remain unchanged. Integration
282
+ tests exercise real runtimes, overlapping waits, rejection, cancellation and
283
+ resumed work. Trusted providers must wrap only authenticated human decisions and
284
+ honor the abort signal; malicious host code is outside the claim.
285
+
252
286
  ### Producer/checker boundaries
253
287
 
254
288
  The compactor's optimized TypeScript selector still proposes cuts. `computeCut`
@@ -300,6 +334,28 @@ reducer proves that provider promises account for every subprocess or remote
300
334
  effect. Arbitrary inverses, ambient effects, liveness, schedule confluence and
301
335
  author-defined observational equivalence are not claimed.
302
336
 
337
+ ### Portable execution guidance
338
+
339
+ Fabric's execution rules have one authored source in `core/execution-guidelines.ts`.
340
+ The tool metadata exposes them to Pi, and the first-use prompt hook moves only
341
+ those exact rules into the named `fabric` section (or the explicit append when
342
+ a prompt is forced or the host has no sections). This keeps providers that
343
+ project custom sections but discard Pi's generated rules, such as
344
+ `pi-claude-bridge`, from losing batching and bounded-output instructions.
345
+ Unrelated tool rules remain in their original place. Preparation is pure: the
346
+ hook commits the relocation only after all renderers succeed, and removes exact
347
+ owned bullet lines from already-rendered forced/legacy prompts before appending
348
+ the current rules. Stale rules from a previous kernel selection are owned too.
349
+
350
+ The compiled `promptGuidance` decision proves an active render selects exactly
351
+ one portable destination and removes duplicate native ownership; an inactive
352
+ render keeps native ownership and injects nothing. Forced prompts always take
353
+ the append, even when a sections object exists. These are routing laws, not
354
+ proofs about prose semantics, provider compliance, or model token savings.
355
+ Exact string preservation, language variants, other extensions' rules, stable
356
+ re-renders, and Pi's actual named-section/forced-prompt pipeline are tested
357
+ offline. No model inference is needed.
358
+
303
359
  ## Reproducible bridge
304
360
 
305
361
  `gdp-wired` is an exact devDependency. Installed Fabric needs neither the prover