@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,280 @@
1
+ {
2
+ "date": "2026-11-09",
3
+ "backend": "Modal fallback through supercomputer after boat setup/admission failures",
4
+ "runtime": {
5
+ "node": "24.22.1",
6
+ "bun": "1.4.4",
7
+ "core": "1.5.0",
8
+ "platform": "linux",
9
+ "arch": "x64"
10
+ },
11
+ "validation": {
12
+ "typecheck": "passed",
13
+ "targetedTests": 104,
14
+ "targetedFiles": 9,
15
+ "build": "passed",
16
+ "lazyGraph": "passed",
17
+ "gcAssertions": "passed",
18
+ "sdkFixture": "passed"
19
+ },
20
+ "artifactSha256": "ed4191b63f50d77e9f4c63780520da86c8fb515606efbff78d1fb2f3a698c372",
21
+ "notes": [
22
+ "The paged fixture uses text-block arrays to check collection of retired content with WeakRef.",
23
+ "The compiled Fabric SDK fixture uses string content, an offline provider, and two session replacements.",
24
+ "Three GCs with event-loop yields precede each sample. These are heap observations, not timing comparisons.",
25
+ "RSS stayed high; paging can temporarily increase peak memory and does not guarantee an immediate OS footprint drop."
26
+ ],
27
+ "samples": [
28
+ {
29
+ "step": "process-baseline",
30
+ "rssMiB": 93.26,
31
+ "heapTotalMiB": 7.8,
32
+ "heapUsedMiB": 4.84,
33
+ "externalMiB": 2.35,
34
+ "arrayBuffersMiB": 0.14,
35
+ "peakRssMiB": 93.5,
36
+ "node": "v24.22.1",
37
+ "platform": "linux",
38
+ "arch": "x64",
39
+ "mode": "paged",
40
+ "requestedMiB": 600
41
+ },
42
+ {
43
+ "step": "core-imported",
44
+ "rssMiB": 214.18,
45
+ "heapTotalMiB": 99.87,
46
+ "heapUsedMiB": 32.03,
47
+ "externalMiB": 3.37,
48
+ "arrayBuffersMiB": 0.15,
49
+ "peakRssMiB": 214.43,
50
+ "coreVersion": "1.5.0"
51
+ },
52
+ {
53
+ "step": "fixture-written",
54
+ "rssMiB": 216.18,
55
+ "heapTotalMiB": 99.87,
56
+ "heapUsedMiB": 31.97,
57
+ "externalMiB": 3.37,
58
+ "arrayBuffersMiB": 0.15,
59
+ "peakRssMiB": 216.18,
60
+ "fixtureBytes": 629173225,
61
+ "fixtureMiB": 600.03,
62
+ "fixtureEntries": 19090
63
+ },
64
+ {
65
+ "step": "history-loaded",
66
+ "rssMiB": 973.3,
67
+ "heapTotalMiB": 847.93,
68
+ "heapUsedMiB": 635.84,
69
+ "externalMiB": 3.37,
70
+ "arrayBuffersMiB": 0.15,
71
+ "peakRssMiB": 995.25,
72
+ "entries": 19090
73
+ },
74
+ {
75
+ "step": "full-context-built",
76
+ "rssMiB": 974.03,
77
+ "heapTotalMiB": 848.1,
78
+ "heapUsedMiB": 636.05,
79
+ "externalMiB": 3.37,
80
+ "arrayBuffersMiB": 0.15,
81
+ "peakRssMiB": 995.25,
82
+ "contextMessages": 19090
83
+ },
84
+ {
85
+ "step": "compacted",
86
+ "rssMiB": 974.76,
87
+ "heapTotalMiB": 847.93,
88
+ "heapUsedMiB": 635.93,
89
+ "externalMiB": 3.37,
90
+ "arrayBuffersMiB": 0.15,
91
+ "peakRssMiB": 995.25,
92
+ "entries": 19091,
93
+ "contextMessages": 1
94
+ },
95
+ {
96
+ "step": "history-paged",
97
+ "rssMiB": 1041.27,
98
+ "heapTotalMiB": 182.68,
99
+ "heapUsedMiB": 51.91,
100
+ "externalMiB": 9.68,
101
+ "arrayBuffersMiB": 0.15,
102
+ "peakRssMiB": 2242.13,
103
+ "pagedEntries": 19090,
104
+ "pagedMiB": 597.26
105
+ },
106
+ {
107
+ "step": "active-context-only-control",
108
+ "rssMiB": 1040.63,
109
+ "heapTotalMiB": 169.38,
110
+ "heapUsedMiB": 35.94,
111
+ "externalMiB": 9.71,
112
+ "arrayBuffersMiB": 0.15,
113
+ "peakRssMiB": 2242.13,
114
+ "entries": 1
115
+ },
116
+ {
117
+ "step": "new-empty-session",
118
+ "rssMiB": 1040.63,
119
+ "heapTotalMiB": 169.38,
120
+ "heapUsedMiB": 35.99,
121
+ "externalMiB": 9.73,
122
+ "arrayBuffersMiB": 0.15,
123
+ "peakRssMiB": 2242.13,
124
+ "entries": 0
125
+ },
126
+ {
127
+ "step": "reopen-1",
128
+ "rssMiB": 1043.1,
129
+ "heapTotalMiB": 852.93,
130
+ "heapUsedMiB": 639.02,
131
+ "externalMiB": 9.73,
132
+ "arrayBuffersMiB": 0.15,
133
+ "peakRssMiB": 2242.13,
134
+ "entries": 19091,
135
+ "contextMessages": 1
136
+ },
137
+ {
138
+ "step": "release-1",
139
+ "rssMiB": 1042.05,
140
+ "heapTotalMiB": 168.88,
141
+ "heapUsedMiB": 35.17,
142
+ "externalMiB": 9.73,
143
+ "arrayBuffersMiB": 0.15,
144
+ "peakRssMiB": 2242.13,
145
+ "entries": 0
146
+ },
147
+ {
148
+ "step": "reopen-2",
149
+ "rssMiB": 1043.6,
150
+ "heapTotalMiB": 852.68,
151
+ "heapUsedMiB": 639.04,
152
+ "externalMiB": 9.73,
153
+ "arrayBuffersMiB": 0.15,
154
+ "peakRssMiB": 2242.13,
155
+ "entries": 19091,
156
+ "contextMessages": 1
157
+ },
158
+ {
159
+ "step": "release-2",
160
+ "rssMiB": 1042.55,
161
+ "heapTotalMiB": 168.88,
162
+ "heapUsedMiB": 35.19,
163
+ "externalMiB": 9.73,
164
+ "arrayBuffersMiB": 0.15,
165
+ "peakRssMiB": 2242.13,
166
+ "entries": 0
167
+ },
168
+ {
169
+ "step": "manager-released",
170
+ "rssMiB": 1042.55,
171
+ "heapTotalMiB": 168.88,
172
+ "heapUsedMiB": 35.18,
173
+ "externalMiB": 9.73,
174
+ "arrayBuffersMiB": 0.15,
175
+ "peakRssMiB": 2242.13
176
+ },
177
+ {
178
+ "step": "process-baseline",
179
+ "rssMiB": 91.41,
180
+ "heapTotalMiB": 7.8,
181
+ "heapUsedMiB": 4.84,
182
+ "externalMiB": 2.35,
183
+ "arrayBuffersMiB": 0.14,
184
+ "peakRssMiB": 91.66,
185
+ "node": "v24.22.1",
186
+ "platform": "linux",
187
+ "arch": "x64",
188
+ "mode": "fabric",
189
+ "requestedMiB": 256
190
+ },
191
+ {
192
+ "step": "core-imported",
193
+ "rssMiB": 213.29,
194
+ "heapTotalMiB": 100.37,
195
+ "heapUsedMiB": 32.01,
196
+ "externalMiB": 3.37,
197
+ "arrayBuffersMiB": 0.15,
198
+ "peakRssMiB": 214.12,
199
+ "coreVersion": "1.5.0"
200
+ },
201
+ {
202
+ "step": "fixture-written",
203
+ "rssMiB": 216.34,
204
+ "heapTotalMiB": 100.37,
205
+ "heapUsedMiB": 31.94,
206
+ "externalMiB": 3.37,
207
+ "arrayBuffersMiB": 0.15,
208
+ "peakRssMiB": 216.34,
209
+ "fixtureBytes": 268458487,
210
+ "fixtureMiB": 256.02,
211
+ "fixtureEntries": 8152
212
+ },
213
+ {
214
+ "step": "sdk-created",
215
+ "rssMiB": 612.17,
216
+ "heapTotalMiB": 478.84,
217
+ "heapUsedMiB": 318.45,
218
+ "externalMiB": 8.22,
219
+ "arrayBuffersMiB": 0.47,
220
+ "peakRssMiB": 626.57,
221
+ "entries": 8153,
222
+ "contextMessages": 8152
223
+ },
224
+ {
225
+ "step": "sdk-compacted",
226
+ "rssMiB": 612.17,
227
+ "heapTotalMiB": 478.84,
228
+ "heapUsedMiB": 318.43,
229
+ "externalMiB": 8.22,
230
+ "arrayBuffersMiB": 0.47,
231
+ "peakRssMiB": 626.57,
232
+ "entries": 8154,
233
+ "contextMessages": 1
234
+ },
235
+ {
236
+ "step": "sdk-first-turn",
237
+ "rssMiB": 718.29,
238
+ "heapTotalMiB": 325.17,
239
+ "heapUsedMiB": 100.53,
240
+ "externalMiB": 42.14,
241
+ "arrayBuffersMiB": 0.95,
242
+ "peakRssMiB": 723.05,
243
+ "requests": 2,
244
+ "completedFabricRuns": 1
245
+ },
246
+ {
247
+ "step": "sdk-new-session-1",
248
+ "rssMiB": 718.25,
249
+ "heapTotalMiB": 230.85,
250
+ "heapUsedMiB": 95.44,
251
+ "externalMiB": 42.17,
252
+ "arrayBuffersMiB": 0.95,
253
+ "peakRssMiB": 723.05,
254
+ "entries": 7,
255
+ "requests": 4,
256
+ "completedFabricRuns": 2
257
+ },
258
+ {
259
+ "step": "sdk-new-session-2",
260
+ "rssMiB": 718.63,
261
+ "heapTotalMiB": 231.35,
262
+ "heapUsedMiB": 95.66,
263
+ "externalMiB": 42.17,
264
+ "arrayBuffersMiB": 0.95,
265
+ "peakRssMiB": 723.05,
266
+ "entries": 7,
267
+ "requests": 6,
268
+ "completedFabricRuns": 3
269
+ },
270
+ {
271
+ "step": "sdk-released",
272
+ "rssMiB": 718.38,
273
+ "heapTotalMiB": 229.6,
274
+ "heapUsedMiB": 93.45,
275
+ "externalMiB": 42.17,
276
+ "arrayBuffersMiB": 0.95,
277
+ "peakRssMiB": 723.05
278
+ }
279
+ ]
280
+ }
@@ -85,14 +85,14 @@ rendered under `[Carry Forward]`.
85
85
 
86
86
  1. **The session log is ground truth.** The summary is a bounded continuation view with stable entry-id and file addresses.
87
87
  2. **Live cut and cumulative truth are separate.** The cut comes from the window made live by the last compaction. Fabric rebuilds the summary from every typed, content-bearing entry on the supplied active branch prefix before the new kept boundary, after applying branch-relative `context_edit` omissions and content replacements. Abandoned recovery attempts remain addressable in raw history but never reappear in later summaries. System prompt/tool checkpoints are replayed by Pi, not selected as continuity content.
88
- 3. **Rendered summaries are never semantic input.** `compaction` entries, branch-summary prose, custom summary prose, and unknown roles produce no normalized events. A valid Fabric branch-summary details envelope may contribute its typed facts. Its `summary` string never contributes. Top-level Pi `custom_message` entries work differently: Pi puts them in model context, so Fabric preserves their typed `customType`, text content, visibility, and bounded JSON details. `custom` state entries that bear no context remain excluded.
88
+ 3. **Rendered summaries are never semantic input.** `compaction` entries, branch-summary prose, custom summary prose, and unknown roles produce no normalized events. A valid Fabric branch-summary details envelope may contribute its typed facts. Its `summary` string never contributes. Top-level Pi `custom_message` entries work differently: Pi puts them in model context, so Fabric preserves their typed `customType`, text content, visibility, and bounded JSON details. A visible custom message whose typed `details.source` is exactly `"user"` carries the user's own words from an input extension, such as a steering queue, and counts as a user message. `custom` state entries that bear no context remain excluded.
89
89
  4. **Structure drives projection.** The core uses entry/message types, roles, content-part types, custom-message fields, tool names, typed `fabric_exec` display fields, JSON arguments, call ids, `isError`, aggregate trace outcomes, exit codes, entry ids, ordering, valid Fabric execution traces, and valid Fabric branch-summary facts. It applies no semantic regex over prose, code, shell commands, or tool output. Whitespace normalization, bounded truncation, exact identity comparisons, and path segmentation stay mechanical.
90
90
  5. **Serialization is deterministic and bounded.** Identical branch entries and instructions produce byte-identical output. The rendered result is at most 32 KiB in UTF-8.
91
91
  6. **The nominal model window is the safety boundary.** Fabric never treats it as a target to fill. Fabric calibrates Pi's structural token estimate against `preparation.tokensBefore`, retains the largest closure-safe suffix within Pi's bounded `keepRecentTokens` continuity budget, and treats the configured occupancy ratio, Pi response reserve, estimator-error margin, and pre-compaction size as hard ceilings. Undocumented provider headroom never enters the budget.
92
92
 
93
93
  These invariants prevent compounding summary-chain drift, not all semantic
94
94
  forgetting. Pi replaces the previous rendered summary on each compaction.
95
- Fabric re-derives recent dialogue, historical requests, cumulative successful
95
+ Fabric re-derives recent dialogue, earlier user messages, cumulative successful
96
96
  file addresses, and error state from raw branch history every time. The
97
97
  protected dialogue window is bounded continuity, not permanent decision memory.
98
98
 
@@ -101,7 +101,7 @@ protected dialogue window is bounded continuity, not permanent decision memory.
101
101
  Fabric compaction is **source-lossless and addressably lossless**. The model's bounded continuation view does not stay byte-for-byte lossless:
102
102
 
103
103
  - Compaction appends a marker. It never deletes or rewrites raw session JSONL. The active parent-linked session branch remains ground truth.
104
- - The model receives a bounded deterministic projection plus the recent raw continuity tail. Fabric preserves role-labelled recent dialogue, historical requests, declared Fabric run intent paired with aggregate outcomes, file operations, failures, status, and stable addresses through mechanical rules. Arbitrary old prose, tool-output bodies, and thinking may fall out of the inline view.
104
+ - The model receives a bounded deterministic projection plus the recent raw continuity tail. Fabric preserves the user's messages verbatim, role-labelled recent dialogue, declared Fabric run intent paired with aggregate outcomes, file operations, failures, status, and stable addresses through mechanical rules. Arbitrary old prose, tool-output bodies, and thinking may fall out of the inline view.
105
105
  - Every sampled omission records a count and source entry-id range. `memory.expand` can re-read exact untruncated source by stable entry ID or operation address with source-hash and lineage checks.
106
106
  - The memory index remains derived and disposable. Compaction works without successful indexing, and it never treats an incomplete index as ground truth. Exact expansion reads session JSONL.
107
107
 
@@ -187,33 +187,66 @@ escapes the cut and the outer call/result pair remains closure-safe. A failed
187
187
  requested handoff compaction rejects the handoff and prevents the
188
188
  uncompacted fork from launching. Without destination metadata, the bounded fallback applies.
189
189
 
190
+ ## Context salience
191
+
192
+ A summary is what the model reads in place of the work it no longer sees, so
193
+ its byte budget follows the user's words, not the volume of activity. A long
194
+ autonomous stretch produces thousands of tool events and only a few user
195
+ messages. A summary sized by activity lets the user's objective shrink to one
196
+ sampled line while the agent's own latest plan reads as the current task.
197
+ Three verified kernels in `proofs/context.ts` hold the rendering to the user's
198
+ words:
199
+
200
+ - **Allocation.** The user's protected blocks take bytes before any
201
+ operational section (`summaryAllocation`). Operational history receives only
202
+ what remains.
203
+ - **Staleness.** `[User activity]` names the latest user message and counts,
204
+ since it, the earlier compaction markers and background deliveries on the
205
+ branch (`userStaleness`). Only a user message resets the count. A background
206
+ delivery never does, whatever its wording.
207
+ - **Failure ledger.** `[Outstanding Context]` accounts for every failure once
208
+ (`failureLedger`). Open failures after the previous compaction marker are
209
+ itemized first, newest first. Failures that an earlier summary already
210
+ itemized fill only the room the fresh ones leave. Everything else, including
211
+ failures that a later exact retry resolved, becomes a count with a source
212
+ entry range. A quiet session therefore keeps its one real open error, while a
213
+ long autonomous run stops repeating hundreds of stale ones.
214
+
215
+ Background deliveries also name their anchor. Agent-completion and
216
+ background-shell messages quote the user's latest request with its entry ID
217
+ and timestamp, so "the current task" never resolves to whichever thread fills
218
+ the context window.
219
+
190
220
  ## Bounded sections
191
221
 
192
- Fabric leads with protected recent dialogue, then explicit compaction requests
193
- and historical requests. Each of the last three eligible summarized or
222
+ Fabric leads with `[User activity]`, then every earlier user message verbatim,
223
+ then protected recent dialogue and explicit compaction requests. Each of the last three eligible summarized or
194
224
  cross-boundary user exchanges gets up to 3968 bytes including role/address
195
225
  headings. User text gets at least half the available text budget when needed;
196
226
  short replies leave room for the preceding assistant response. Complete
197
227
  multiline text survives whenever the exchange fits. Assistant replies are
198
- labelled **Historical assistant response (not a verified outcome)**: they may
199
- contain proposals, explanations, or old progress reports, not necessarily
200
- current state or accepted instructions. New eligible exchanges can age an
228
+ labelled **Assistant response (a proposal, not a verified outcome or user
229
+ instruction)**: they may contain proposals, explanations, or old progress
230
+ reports, not necessarily current state or accepted instructions. New eligible exchanges can age an
201
231
  exchange out; fully raw exchanges and more tool events alone cannot. There is
202
232
  no reset keyword detector or task ledger.
203
233
 
204
- Historical requests, files, operation-state, and earlier-turn collections still
205
- use deterministic earliest-plus-latest sampling. Sampled omissions record a
206
- count and source entry-id range. Protected excerpts instead report omitted
207
- UTF-8 bytes alongside their entry addresses. Historical requests are evidence
208
- of earlier instructions, not a reconstructed active mandate.
234
+ Earlier user messages render verbatim, each bounded to 2048 bytes, while the
235
+ block fits. Only a session with more than 64 earlier user messages keeps the
236
+ earliest and latest. Files, activity, and earlier-turn collections use
237
+ deterministic earliest-plus-latest sampling. Sampled omissions record a count
238
+ and source entry-id range. Protected excerpts instead report omitted UTF-8
239
+ bytes alongside their entry addresses. Earlier user messages are evidence of
240
+ what the user asked, not a reconstructed active mandate.
209
241
 
210
242
  Rendered block ceilings include their headers. Historical blocks may receive
211
243
  less under shared-budget pressure:
212
244
 
213
245
  | Block | UTF-8 ceiling |
214
246
  | --- | ---: |
247
+ | `[User activity]` | 512 bytes |
248
+ | `[Earlier user messages]` | 8192 bytes |
215
249
  | `[Recent user directions and discussion]` | 12288 bytes |
216
- | `[Historical requests]` | 4096 bytes |
217
250
  | `[Compaction Request]` | 3072 bytes |
218
251
  | `[Files And Changes]` | 4608 bytes |
219
252
  | `[Fabric Activity]` | 2048 bytes |
@@ -223,32 +256,35 @@ less under shared-budget pressure:
223
256
  | collapsed transcript | 5120 bytes |
224
257
  | footer | 1536 bytes |
225
258
 
226
- These ceilings are not simultaneous reservations. Fabric renders protected
227
- dialogue and explicit requests first, then subtracts their actual UTF-8 size,
228
- the footer, separators, and final newline from the unchanged 32 KiB ceiling.
259
+ These ceilings are not simultaneous reservations. Fabric renders the user
260
+ activity line, earlier user messages, protected dialogue, and explicit
261
+ requests first. The verified `summaryAllocation` then gives operational
262
+ history what remains of the unchanged 32 KiB ceiling after their actual UTF-8
263
+ size, the footer, separators, and final newline.
229
264
  Historical blocks keep their former ceilings whenever their capped content
230
265
  fits the remaining space. Only under pressure are they reduced proportionally
231
266
  to demand, reserving headers/omission markers or complete single-line blocks; sampling
232
267
  slack passes to later blocks. Small or absent dialogue therefore does not
233
268
  unconditionally shrink operational history. The raw-tail budget is unchanged,
234
269
  and a final UTF-8 guard remains in place. Projection limits stay finite: three
235
- eligible recent exchanges, 24 historical requests, 24 file addresses per
236
- operation kind, 32 operation-state records, 48 Fabric activity records, 32
270
+ eligible recent exchanges, 64 earlier user messages, 24 file addresses per
271
+ operation kind, 24 itemized open failures, 48 Fabric activity records, 32
237
272
  earlier turns, and 40 transcript events. Omitted source
238
273
  remains executable-addressable through entry-id ranges and the footer recall
239
274
  pointer.
240
275
 
241
276
  ## Sections
242
277
 
278
+ - **User activity**: the latest user message's entry ID and timestamp, then the time, earlier compaction markers, and background deliveries since it. Elapsed time ends at the last supplied entry, so output stays deterministic. The block appears only when the branch has a user message.
279
+ - **Earlier user messages**: every summarized user message outside the recent exchanges, verbatim and in order, including the original objective. The internal `goal` key remains for v2 compatibility.
243
280
  - **Recent user directions and discussion**: complete bounded user/preceding-assistant exchanges, with roles and entry IDs. This is source evidence, not an inferred current-goal declaration.
244
- - **Historical requests**: sampled older user requests, including the original objective once it leaves the recent window. The internal `goal` omission key remains for v2 compatibility.
245
281
  - **Compaction Request**: canonicalized, bounded custom instructions. See below.
246
282
  - **Carry Forward**: the persistent `compact.carry` list from the latest carry entry on the branch, in every summary until cleared. Protected like the request block and bounded to 3 KiB.
247
283
  - **Files And Changes**: successful typed file-tool addresses grouped as Created, Written, Modified, or Read. `edit` counts as Modified. `write` counts as Written unless a typed result explicitly proves creation.
248
- - **Fabric Activity**: completed named `fabric_exec` runs as bounded `name → outcome` records that place an em dash between the name and the optional description, followed in source order by phases and significant non-file nested operations, including bash, agents, workflow, mesh, state, MCP, and extension refs. Named runs expose the exact assistant call entry ID while sourced raw, and their typed fact address after branch rehydration. Nested phases and operations expose stable `entryId/subordinal` addresses. The name and outcome are mandatory for a rendered run. The optional description decays first under tighter views.
249
- - **Outstanding Context**: typed tool/bash failures and later exact structural resolutions. File failures require the same action and path, bash failures the same command, and generic failures the same ref and arguments. Fabric quotes explicit error text with bounds and never parses or classifies it. Trace failures use only `operation.outcome` and `operation.error`.
284
+ - **Fabric Activity**: completed named `fabric_exec` runs as bounded `name → outcome` records that place an em dash between the name and the optional description, followed in source order by phases and significant non-file nested operations, including bash, agents, workflow, mesh, state, MCP, and extension refs. Named runs expose the exact assistant call entry ID while sourced raw, and their typed fact address after branch rehydration. Nested phases and operations expose stable `entryId/subordinal` addresses. Successful `native.load` and `fabric.discovery.compatibility` calls are Fabric's own per-run setup and never take a line here, in Earlier Turns, or in the transcript. Their failures still appear. The name and outcome are mandatory for a rendered run. The optional description decays first under tighter views.
285
+ - **Outstanding Context**: typed tool/bash failures, accounted by the verified failure ledger. File failures resolve only through a later success with the same action and path, bash failures with the same command, and generic failures with the same ref and arguments. Up to 24 open failures are itemized: those after the previous compaction marker first, newest first, then failures an earlier summary already itemized while room remains. The rest and the resolved failures each collapse into one count with a source entry range. Fabric quotes explicit error text with bounds and never parses or classifies it. Trace failures use only `operation.outcome` and `operation.error`. A failed outer `fabric_exec` quotes only its typed `details.error`, never its program output, which often holds success lines from earlier calls.
250
286
  - **Earlier Turns**: sampled user/custom context one-liners, tool-name counts, and the latest named Fabric run plus outcome for each summarized turn.
251
- - **Current Status**: the latest summarized user/custom context, modification address, named Fabric run plus outcome, and assistant line.
287
+ - **Current Status**: the latest summarized user message with its entry ID, a later background custom message when one arrived after it, the modification address, named Fabric run plus outcome, and assistant line. A background delivery never replaces the latest request.
252
288
  - **Transcript**: the latest 40 typed events, including quoted and bounded custom-message content and bounded structural details, plus an omission range when applicable. A completed named `fabric_exec` replaces its generic outer call/result pair with `name → outcome`. The description stays in the richer Activity tier.
253
289
  - **Footer**: deterministic source timestamp, cumulative source range, and session-log recall guidance.
254
290
 
@@ -69,7 +69,7 @@ Every raised deadline is capped by `executor.maxTimeoutMs` (default `900000`, i.
69
69
  }
70
70
  ```
71
71
 
72
- `executor.shellHangMs` (default `120000` / 2 minutes, max `600000` / 10 minutes, `0` disables) is a nested-shell wait budget, not a program deadline. When a `pi.bash` / `pi.powershell` await exceeds it, Fabric **settles the await successfully** (`ok: true`) with a still-running notice, pid, and live output path while the process keeps writing that file. `background: true` (alias `run_in_background`) detaches immediately with the same envelope. Inspect with `pi.read(logPath)` and stop by running `kill <pid>` through `pi.bash`. Do not poll. An explicit shell `timeout` remains a hard cap. **ctrl+b twice** spills early (tmux-safe); **ctrl+k** kills the waiting command. Session shutdown aborts leftover processes, except `durable: true` tasks, which detach to their jev-fabric store. Captured shell overrides normally keep their own execution semantics; an extension can opt into [Fabric-owned bash execution with middleware](shell-middleware.md) to preserve its environment/output filters while gaining the same background handling.
72
+ `executor.shellHangMs` (default `120000` / 2 minutes, max `600000` / 10 minutes, `0` disables) is a nested-shell wait budget, not a program deadline. When a `pi.bash` / `pi.powershell` await exceeds it, Fabric **settles the await successfully** (`ok: true`) with a still-running notice, pid, and live output path while the process keeps writing that file. `background: true` (alias `run_in_background`) detaches immediately with the same envelope. Inspect with `pi.read(logPath)` and stop by running `kill <pid>` through `pi.bash`. Do not poll. An explicit shell `timeout` remains a hard cap on the process; it does not extend the wait. To keep waiting after a hand-off, call `tasks.wait` with the returned task id (up to 300000 ms per call) until it reports a terminal status. Give the enclosing `fabric_exec` a `timeoutMs` long enough for the wait, or shorten each observation timeout; `tasks.wait` does not extend the program deadline. **ctrl+b twice** spills early (tmux-safe); **ctrl+k** kills the waiting command. Session shutdown aborts leftover processes, except `durable: true` tasks, which detach to their jev-fabric store. Captured shell overrides normally keep their own execution semantics; an extension can opt into [Fabric-owned bash execution with middleware](shell-middleware.md) to preserve its environment/output filters while gaining the same background handling.
73
73
 
74
74
  `executor.jevFabric` configures the optional jev-fabric backend for [durable tasks](background-tasks.md#durable-tasks-through-jev-fabric) and [interactive sessions](shell-composition.md). `binary` (default `""`, also `"auto"`) picks your compatible install outside the workspace, then the bundled package; an explicit executable name or trusted absolute path (no shell arguments) is used or the call fails, never falling back. See [which jev-fabric](shell-composition.md#which-jev-fabric). `home` empty uses `JEV_FABRIC_HOME`, else `<cwd>/.jev-fabric-native`: the store other harnesses in the same project share by default. `timeoutMs` (default one hour, up to 24 hours) is a durable job's lifetime when the call gives no explicit `timeout`. Nothing runs or loads until the first `durable: true` call.
75
75
 
@@ -106,11 +106,7 @@ where absent values do not participate, and time spent inside a `humanWaitRefs`
106
106
  "resultFormat": "auto"
107
107
  },
108
108
  "approvals": {
109
- "read": "allow",
110
- "write": "allow",
111
- "execute": "allow",
112
- "network": "allow",
113
- "agent": "allow",
109
+ "default": "allow",
114
110
  "headless": "deny",
115
111
  "headlessTimeoutMs": 300000
116
112
  },
@@ -458,6 +454,28 @@ The result keeps `content`, exposes text content as `text`, and carries `details
458
454
 
459
455
  In full code mode and Schema enforce mode, `fabric_exec` is the only model-declared tool unless a [foreground policy](#foreground-tools) names others in full code mode. Pi 1.0 native `prepareLoadout` and per-request transcript projection hide all other declarations without removing tools from the native callable set. This includes native `codemode`, `tool_search`, MCP tools, and late registrations; `setActiveTools()` cannot open a second model-facing path. Inside Fabric, `pi.read`, `pi.bash`, and other built-ins still route through captured overrides when present. `extensions.read` exposes the override's native result shape. Native MCP tools are also callable by their captured names, for example `extensions.mcp__server__tool(...)`.
460
456
 
457
+ ### Diagnosing missing tool hooks
458
+
459
+ If nested `pi.bash`, `pi.write`, `pi.edit`, or interactive shell sessions report
460
+ that extension tool hooks have not initialized, start Pi with
461
+ `PI_FABRIC_DEBUG_TOOL_CAPTURE=1`. Fabric writes bounded `[pi-fabric tool-capture]`
462
+ records to stderr: the number of capture hubs installed, whether a compiled
463
+ host/mapped SDK loader was detected, and whether each observed tool-registry
464
+ refresh contained this Fabric instance's anchor. Logging stops after 32 records
465
+ per capture controller. Tool arguments, commands, paths, and results are not logged.
466
+
467
+ An installed hub with no matching refresh can mean that a different SDK copy was
468
+ patched, not that startup merely needs more time. Include these records and your
469
+ Pi/Fabric versions when reporting it. This flag enables diagnostics only; it does
470
+ not bypass other extensions' hooks or permit unhooked mutating calls.
471
+
472
+ To run the managed-install integration probe against a release binary as well as
473
+ the Node CLIs, set `PI_FABRIC_TEST_PI_BINARY` to its absolute executable path and
474
+ run `bunx vitest run tests/managed-install-host-sdk.test.ts` after `bun run build`.
475
+ The probe uses an offline model and checks nested writes, edits, bash, captured
476
+ extension tools, and blocking `tool_call` hooks without a physical host SDK beside
477
+ Fabric.
478
+
461
479
  ### Foreground tools
462
480
 
463
481
  Some extension tools only work as a direct model turn: a question to the human, a turn-steering control, a context or skill loader. `foreground` keeps a short list of them declared beside `fabric_exec` in full code mode:
@@ -564,6 +582,27 @@ Actions inside Jev programs pass through the same hooks. Jev programs do not rai
564
582
 
565
583
  Keys are an exact ref (`provider.action`, including multi-segment refs such as `mcp.github.search`) or a provider wildcard (`provider.*`). Values are `allow`, `ask`, or `deny`. An exact key beats a wildcard, which beats the risk-class mode. Other wildcard forms, unknown values, and more than 256 entries are configuration errors; Fabric never drops them silently. Overrides apply to every approval path keyed by a ref: actions inside `fabric_exec`, top-level native tools (`pi.<tool>` for Pi built-ins, `extensions.<tool>` otherwise), and Jev program observation. `deny` is absolute: inherited child risk grants and **Allow for this session** cannot lift it. `allow` and `ask` replace the risk-class mode and otherwise keep its semantics, including session grants for `ask`. Speculative prefetch only considers refs whose effective mode is `allow`. Overrides do not bypass Schema enforce or other host gates.
566
584
 
585
+ ### Default approval policy
586
+
587
+ Under `/fabric settings` → **Approvals**, set **Default policy** once to apply
588
+ `allow`, `ask`, `auto`, or `deny` to all action categories. The default remains
589
+ `allow` unless you change it. **Auto** classifies each call; it does not mean
590
+ unconditional approval.
591
+
592
+ **Category overrides** holds optional exceptions for read, write, execute,
593
+ network, and agent actions. Each starts at `inherit`, following the default.
594
+ Existing configured category policies are preserved. To move all five to the
595
+ new default at once, choose **Category overrides → Reset all to default**.
596
+ This does not remove exact-action or provider wildcard policies.
597
+
598
+ In `fabric.json`, `approvals.default` sets the fallback. An omitted category
599
+ inherits it; an explicit category mode overrides it. Set a category to
600
+ `"inherit"` to clear an override, including one inherited from global settings.
601
+ Project settings still override global settings, and untrusted projects cannot
602
+ supply project policy. Precedence is exact action → provider wildcard → category
603
+ → default. Session grants and host/schema restrictions retain their existing
604
+ semantics.
605
+
567
606
  ### Auto approval mode
568
607
 
569
608
  An `auto` policy sends each validated call and its prepared arguments to a separate Pi model or Jev classifier before invocation. Configure **Auto model** under `/fabric settings` → **Approvals**, or set the optional canonical `provider/model` key in `fabric.json`:
@@ -572,17 +611,18 @@ An `auto` policy sends each validated call and its prepared arguments to a separ
572
611
  {
573
612
  "approvals": {
574
613
  "model": "anthropic/claude-opus-4-6",
575
- "write": "auto",
576
- "execute": "auto",
577
- "network": "auto",
578
- "agent": "auto"
614
+ "default": "auto"
579
615
  }
580
616
  }
581
617
  ```
582
618
 
583
619
  Choose **Inherit** in the model picker to omit `approvals.model` and use the active Pi session model. Built-in and custom models dispatch through Pi's effective provider runtime, including providers with custom API identifiers. Older supported Pi versions fall back to their compatibility provider registry. Read access stays independently configurable, and most setups leave it at `allow`.
584
620
 
585
- The classifier receives the exact action, bounded prepared arguments, cwd, user-message text, and assistant tool calls. Fabric excludes assistant prose and tool outputs, so model-authored reasoning and retrieved hostile content cannot directly instruct the classifier. The classifier has no executable tools and must return a structured `allow` or `escalate` verdict. An `allow` verdict applies only to that call. `escalate`, malformed output, missing authentication, timeout, cancellation, or any classifier error falls back to the explicit **Allow once** / **Allow for this session** / **Deny** prompt. Headless runs fail closed when that prompt cannot be shown. Fabric attaches classifier token usage and cost to the resulting `fabric_exec` or native tool result, and execution traces record each nested verdict as `fabric.approval.auto`.
621
+ The classifier receives the exact action, bounded prepared arguments, cwd, user-message text, and assistant tool calls. Fabric excludes assistant prose and tool outputs, so model-authored reasoning and retrieved hostile content cannot directly instruct the classifier. The classifier has no executable tools and must return a structured `allow` or `escalate` verdict. An `allow` verdict applies only to that call. `escalate`, malformed output, missing authentication, or classifier failure blocks the call without opening a dialog in interactive sessions. The tool returns a permission ID immediately; neither the agent nor `fabric_exec` waits for a person. Cancellation still aborts the call. Headless runs retain their explicit `approvals.headless` policy and otherwise fail closed.
622
+
623
+ Use **`/fabric permissions`** to triage blocked calls. The editor-area overlay shows a compact queue; **Enter** opens the selected call's reason and scrollable argument preview. Only that review screen accepts **a** (allow once) or **d** (deny). **Esc** goes back or closes; **r** refreshes the list. There are no hover descriptions or automatic pop-up dialogs. Closing the queue sends the outcomes to the agent as a follow-up, without adding a prose notification card.
624
+
625
+ Approval authorizes one retry of the exact original call, not the whole failed program and not a risk category. The registry, tool descriptor, full arguments, working directory, schema, and current policies are checked again; a changed call needs its own approval. The blocked call has not executed and no saved closure is replayed. Programs that want other calls to continue can catch the pending-permission error or use `Promise.allSettled`. Pending requests and unused approvals expire after 30 minutes and are cleared on session change or reload. Explicit `ask` policies keep their synchronous permission dialog; hard denies cannot be approved through this queue. Fabric attaches classifier token usage and cost to the resulting `fabric_exec` or native tool result, and execution traces record each nested verdict as `fabric.approval.auto`.
586
626
 
587
627
  `deny` stays deterministic and runs before the classifier. Schema enforcement, project trust, budgets, and other host gates remain authoritative. Auto mode is a model-based policy advisor and provides no stronger sandbox boundary. Its initial conservative policy escalates destructive or irreversible actions, shared/external/production changes, credential or sensitive-data exposure, safety bypasses, actions beyond explicit user intent, and actions whose safety is uncertain. Fabric adapts the policy architecture described in Claude Code's [permission modes](https://code.claude.com/docs/en/permission-modes), [auto-mode configuration](https://code.claude.com/docs/en/auto-mode-config), and Anthropic's [auto-mode engineering write-up](https://www.anthropic.com/engineering/claude-code-auto-mode), adapted to Pi's model registry and Fabric's existing per-risk policy gate.
588
628
 
@@ -660,6 +700,8 @@ Other agent settings:
660
700
  - `notifyOnComplete`: show concise detached `agents.spawn()` completion notices and batch unread results for Main at a safe tool-turn boundary (or wake idle Main). `wait`/`join` and terminal `status` retract pending notifications; running/UI status does not. Escape/error parks results until new input.
661
701
  - `sessionExport`: export each agent run's usage as an attributed pi-format session file (on by default).
662
702
  - `sessionExportDir`: override the export store root (default `~/.pi-fabric/agent`, with `PI_FABRIC_AGENT_DIR` taking precedence).
703
+ - `worktree.root`: directory relative to the selected Git repository root (default `.pi/fabric/worktrees`). Worktrees are created at `<root>/<agent-id>`. Absolute paths, empty/dot/parent components, `.git` components (including Windows aliases), trailing dots/spaces, control characters, colons and symlink ancestors are rejected. The actual root is excluded from Git status and copy-on-write cloning.
704
+ - `worktree.branch`: branch template (default `pi-fabric/{name}-{id8}`). Supports `{name}` (lowercase, sanitized agent name, at most 30 characters), `{id}` (full agent ID) and `{id8}` (first eight ID characters). For example, `issue/{name}-{id}`. The expanded name must be a valid Git branch. Branch collisions fail and leave the existing branch unchanged.
663
705
  - `worktree.setup`: optional shell command (`/bin/sh`, or `cmd.exe` on Windows) run in each new `worktree: true` checkout before the child starts (unset by default; blank values are ignored). A per-request `worktreeSetup` overrides it, and a non-zero exit fails the launch. See [worktree results and setup](agents.md#transports).
664
706
  - `childQuestions`: `"cancel"` (default) cancels every dialog a Pi child opens; `"route"` forwards it to the parent's UI, or to a root-held [decision](decisions.md#routed-child-questions) when the parent has no UI. Durable runs always use a decision.
665
707
  - `childQuestionTimeoutMs`: default deadline for a routed child dialog (default `600000`, bounded to 1 s..24 h); a dialog's own timeout wins.
package/docs/entropy.md CHANGED
@@ -74,7 +74,10 @@ stop normal-form compilation; a busy artifact store does not prevent activation
74
74
  of freshly proved plans. One coalesced background retry uses exponential backoff
75
75
  with jitter (capped at 30 seconds), re-reading current evidence on each attempt.
76
76
  Retry timers do not keep Pi alive and are canceled on session start/shutdown;
77
- turn hooks never wait for them. Old locks from dead owners, incomplete writes,
77
+ turn hooks never wait for them. Shutdown drains already queued compilation before
78
+ Pi invalidates the old extension context; no retry survives reload, new/resumed
79
+ sessions, or forks. Session-start epochs also discard late results from an older
80
+ session. Old locks from dead owners, incomplete writes,
78
81
  or malformed metadata recover automatically after the 30-second grace period.
79
82
  Live owners (including permission-denied process probes) are never evicted just
80
83
  because a lock is old. Damaged pool/artifact data is still preserved and reported,