@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,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/pasted-images.ts"],
4
+ "sourcesContent": ["import { constants } from \"node:fs\";\nimport { lstat, open, realpath } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport path from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport type { ImageContent } from \"@earendil-works/pi-ai\";\n\n// Only Pi's generated clipboard files, directly in the OS temp directory.\n// Arbitrary paths (even other temp images) remain explicit read operations.\nconst CLIPBOARD_NAME = /^pi-clipboard-[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}\\.(?:png|jpe?g|gif|webp)$/i;\nconst MAX_FILE_BYTES = 20 * 1024 * 1024;\nconst MAX_MESSAGE_BYTES = 32 * 1024 * 1024;\nconst MAX_IMAGES = 8;\nconst fingerprint = (image: ImageContent) => {\n const mime = image.mimeType.split(\";\")[0]!.trim().toLowerCase().replace(/^image\\/jpg$/, \"image/jpeg\");\n return createHash(\"sha256\").update(mime).update(\"\\0\").update(Buffer.from(image.data, \"base64\")).digest(\"hex\");\n};\n\nexport interface PastedImageResult {\n text: string;\n images: ImageContent[];\n warnings: string[];\n changed: boolean;\n}\n\nfunction sniffImage(bytes: Buffer): string | undefined {\n if (bytes.length >= 24 && bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])) && bytes.toString(\"ascii\", 12, 16) === \"IHDR\") return \"image/png\";\n if (bytes.length >= 4 && bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255 && bytes[3] !== 247) return \"image/jpeg\";\n if (bytes.length >= 10 && /^GIF8[79]a$/.test(bytes.toString(\"ascii\", 0, 6))) return \"image/gif\";\n if (bytes.length >= 12 && bytes.toString(\"ascii\", 0, 4) === \"RIFF\" && bytes.toString(\"ascii\", 8, 12) === \"WEBP\") return \"image/webp\";\n return undefined;\n}\n\nasync function readClipboardImage(file: string, root: string, remainingBytes: number): Promise<ImageContent> {\n const stat = await lstat(file);\n if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1) throw new Error(\"not a regular clipboard file (symlinks and hard links are refused)\");\n if (path.dirname(await realpath(file)) !== root) throw new Error(\"clipboard file is outside the temporary directory\");\n const handle = await open(file, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));\n try {\n const opened = await handle.stat();\n if (!opened.isFile() || opened.dev !== stat.dev || opened.ino !== stat.ino || opened.nlink !== 1 || opened.mtimeMs !== stat.mtimeMs || opened.size !== stat.size || path.dirname(await realpath(file)) !== root) throw new Error(\"clipboard file changed while being opened\");\n if (opened.size <= 0 || opened.size > MAX_FILE_BYTES) throw new Error(\"clipboard image is empty or exceeds 20 MiB\");\n if (opened.size > remainingBytes) throw new Error(\"auto-attached images exceed 32 MiB\");\n // Bounded even if a file grows while being read. A sentinel byte detects it.\n const bytes = Buffer.alloc(opened.size + 1);\n let length = 0;\n while (length < bytes.length) {\n const read = await handle.read(bytes, length, bytes.length - length, null);\n if (!read.bytesRead) break;\n length += read.bytesRead;\n }\n const after = await handle.stat();\n if (length !== opened.size || after.size !== opened.size || after.mtimeMs !== opened.mtimeMs || after.ctimeMs !== opened.ctimeMs) throw new Error(\"clipboard file changed while being read\");\n const body = bytes.subarray(0, length);\n const mimeType = sniffImage(body);\n if (!mimeType) throw new Error(\"unsupported clipboard image format\");\n return { type: \"image\", mimeType, data: body.toString(\"base64\") };\n } finally {\n await handle.close();\n }\n}\n\n// Conservative Markdown masking: fenced code (backticks or tildes), inline\n// backtick spans of any delimiter length, indented code, and provenance labels.\nfunction excludedImageRanges(text: string): Array<[number, number]> {\n const ranges: Array<[number, number]> = [];\n let fence: { char: string; count: number; start: number } | undefined;\n for (const line of text.matchAll(/[^\\n]*(?:\\n|$)/g)) {\n if (!line[0]) continue;\n const start = line.index!, end = start + line[0].length;\n const delimiter = /^ {0,3}(`{3,}|~{3,})/.exec(line[0]);\n if (fence) {\n if (delimiter?.[1]?.[0] === fence.char && delimiter[1].length >= fence.count && line[0].slice(delimiter[0].length).trim() === \"\") {\n ranges.push([fence.start, end]); fence = undefined;\n }\n } else if (delimiter?.[1]) {\n fence = { char: delimiter[1][0]!, count: delimiter[1].length, start };\n } else if (/^(?: {4}|\\t)/.test(line[0])) ranges.push([start, end]);\n }\n if (fence) ranges.push([fence.start, text.length]);\n const inRange = (start: number, end: number) => ranges.some(([a, b]) => start < b && end > a);\n const ticks = [...text.matchAll(/`+/g)];\n for (let i = 0; i < ticks.length; i++) {\n const tick = ticks[i]!;\n if (inRange(tick.index!, tick.index! + tick[0].length)) continue;\n const close = ticks.findIndex((candidate, j) => j > i && candidate[0].length === tick[0].length && !inRange(candidate.index!, candidate.index! + candidate[0].length));\n if (close >= 0) { ranges.push([tick.index!, ticks[close]!.index! + ticks[close]![0].length]); i = close; }\n }\n for (const marker of text.matchAll(/\\[Attached image: [^\\]\\r\\n]*\\]/g)) ranges.push([marker.index!, marker.index! + marker[0].length]);\n return ranges;\n}\n\n/** Submit-time ingestion only. The host normalizes image dimensions and payload\n * sizes after input transforms; handoff consumes those same normalized blocks.\n * No persistent cache, speculative reads, SDK load, or model calls live here. */\nexport async function attachPastedImages(\n text: string,\n existing: readonly ImageContent[] = [],\n temporaryDirectory = tmpdir(),\n): Promise<PastedImageResult> {\n const result: PastedImageResult = { text, images: [...existing], warnings: [], changed: false };\n const excluded = excludedImageRanges(text);\n const candidates: Array<{ start: number; end: number; file: string }> = [];\n // Match the known temp prefix, not whitespace-delimited tokens: Pi inserts\n // unquoted paths, including spaces in Windows profile/temp directories.\n const prefix = path.join(temporaryDirectory, \"pi-clipboard-\").replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const paths = new RegExp(prefix + \"[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}\\\\.(?:png|jpe?g|gif|webp)\", \"gi\");\n for (const match of text.matchAll(paths)) {\n let start = match.index!, end = start + match[0].length;\n if (excluded.some(([from, to]) => start < to && end > from)) continue;\n const before = text[start - 1], after = text[end];\n if ((before && /[\\w:/\\\\.-]/.test(before)) || (after && /[\\w/\\\\-]/.test(after))) continue;\n const file = match[0];\n if (!path.isAbsolute(file) || !CLIPBOARD_NAME.test(path.basename(file))) continue;\n if (before && (before === '\"' || before === \"'\") && after === before) { start--; end++; }\n candidates.push({ start, end, file });\n }\n if (!candidates.length) return result;\n let root: string;\n try { root = await realpath(temporaryDirectory); } catch { return result; }\n const hashes = new Set(existing.map(fingerprint));\n const attached = new Set<string>();\n const failed = new Set<string>();\n let totalBytes = existing.reduce((sum, image) => sum + Buffer.byteLength(image.data, \"base64\"), 0);\n for (const { file } of candidates) {\n if (attached.has(file) || failed.has(file)) continue;\n try {\n if (result.images.length >= MAX_IMAGES) throw new Error(\"at most 8 images can be auto-attached to one message\");\n const image = await readClipboardImage(file, root, MAX_MESSAGE_BYTES - totalBytes);\n const hash = fingerprint(image);\n if (!hashes.has(hash)) {\n const size = Buffer.byteLength(image.data, \"base64\");\n if (totalBytes + size > MAX_MESSAGE_BYTES) throw new Error(\"auto-attached images exceed 32 MiB\");\n result.images.push(image);\n hashes.add(hash);\n totalBytes += size;\n }\n attached.add(file);\n } catch (error) {\n failed.add(file);\n result.warnings.push(`Could not attach ${file}: ${error instanceof Error ? error.message : String(error)}. The path is unchanged; use read to inspect it.`);\n }\n }\n // Replace backwards so offsets still refer to the submitted text.\n for (const candidate of candidates.reverse()) {\n if (!attached.has(candidate.file)) continue;\n result.text = result.text.slice(0, candidate.start) + `[Attached image: ${candidate.file}]` + result.text.slice(candidate.end);\n result.changed = true;\n }\n return result;\n}\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,OAAO,MAAM,gBAAgB;AACtC,SAAS,cAAc;AACvB,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAK3B,IAAM,iBAAiB;AACvB,IAAM,iBAAiB,KAAK,OAAO;AACnC,IAAM,oBAAoB,KAAK,OAAO;AACtC,IAAM,aAAa;AACnB,IAAM,cAAc,CAAC,UAAwB;AAC3C,QAAM,OAAO,MAAM,SAAS,MAAM,GAAG,EAAE,CAAC,EAAG,KAAK,EAAE,YAAY,EAAE,QAAQ,gBAAgB,YAAY;AACpG,SAAO,WAAW,QAAQ,EAAE,OAAO,IAAI,EAAE,OAAO,IAAI,EAAE,OAAO,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC,EAAE,OAAO,KAAK;AAC9G;AASA,SAAS,WAAW,OAAmC;AACrD,MAAI,MAAM,UAAU,MAAM,MAAM,SAAS,GAAG,CAAC,EAAE,OAAO,OAAO,KAAK,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,MAAM,SAAS,SAAS,IAAI,EAAE,MAAM,OAAQ,QAAO;AAC5J,MAAI,MAAM,UAAU,KAAK,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,IAAK,QAAO;AAC9G,MAAI,MAAM,UAAU,MAAM,cAAc,KAAK,MAAM,SAAS,SAAS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;AACf,sBAAc;AAAA,MAChB;AACA,eAAS,IAAI,IAAI;AAAA,IACnB,SAAS,OAAO;AACd,aAAO,IAAI,IAAI;AACf,aAAO,SAAS,KAAK,oBAAoB,IAAI,KAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,kDAAkD;AAAA,IAC5J;AAAA,EACF;AAEA,aAAW,aAAa,WAAW,QAAQ,GAAG;AAC5C,QAAI,CAAC,SAAS,IAAI,UAAU,IAAI,EAAG;AACnC,WAAO,OAAO,OAAO,KAAK,MAAM,GAAG,UAAU,KAAK,IAAI,oBAAoB,UAAU,IAAI,MAAM,OAAO,KAAK,MAAM,UAAU,GAAG;AAC7H,WAAO,UAAU;AAAA,EACnB;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,32 @@
1
+ import type { ResolvedFabricAction } from "./action-registry.js";
2
+ export type PermissionStatus = "pending" | "allowed" | "denied" | "used" | "expired";
3
+ export interface FabricPermissionRecord {
4
+ id: string;
5
+ ref: string;
6
+ risk: ResolvedFabricAction["risk"];
7
+ cwd: string;
8
+ preview: string;
9
+ reason: string;
10
+ status: PermissionStatus;
11
+ createdAt: number;
12
+ expiresAt: number;
13
+ }
14
+ /** Session-local retry authorizations, never saved arguments or executable
15
+ * closures. Allowing a ticket does not execute it: the next identical call
16
+ * must pass the live registry, schema, host policy and approval checks again.
17
+ * Host assumptions: SHA-256 identity covers the normalized descriptor, cwd
18
+ * and complete JSON arguments; one JS turn owns each mutation. The existing
19
+ * verified transition/consume kernels enforce current, one-use grants. */
20
+ export declare class FabricPermissionQueue {
21
+ #private;
22
+ readonly now: () => number;
23
+ constructor(now?: () => number);
24
+ list(): FabricPermissionRecord[];
25
+ get pendingCount(): number;
26
+ take(action: ResolvedFabricAction, args: Record<string, unknown>, cwd: string): "allowed" | FabricPermissionRecord | undefined;
27
+ block(action: ResolvedFabricAction, args: Record<string, unknown>, cwd: string, reason: string): FabricPermissionRecord;
28
+ decide(id: string, decision: "allowed" | "denied"): FabricPermissionRecord;
29
+ message(record: FabricPermissionRecord): string;
30
+ clear(): void;
31
+ }
32
+ //# sourceMappingURL=permission-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-queue.d.ts","sourceRoot":"","sources":["../../src/core/permission-queue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAKjE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AACrF,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAKD;;;;;0EAK0E;AAC1E,qBAAa,qBAAqB;;IAIpB,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM;gBAAjB,GAAG,GAAE,MAAM,MAAiB;IAejD,IAAI,IAAI,sBAAsB,EAAE;IAIhC,IAAI,YAAY,IAAI,MAAM,CAA6E;IAEvG,IAAI,CAAC,MAAM,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,sBAAsB,GAAG,SAAS;IAe9H,KAAK,CAAC,MAAM,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,sBAAsB;IAoBvH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,sBAAsB;IAU1E,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM;IAM/C,KAAK,IAAI,IAAI;CACd"}
@@ -0,0 +1,104 @@
1
+ import {
2
+ boundedPreviewValue,
3
+ previewArgs,
4
+ strictDecisionResult
5
+ } from "../chunks/chunk-2CD7HLVP.js";
6
+ import {
7
+ consume,
8
+ transitionCurrent
9
+ } from "../chunks/chunk-P7YSPKTM.js";
10
+ import {
11
+ stableJsonHash
12
+ } from "../chunks/chunk-3YZUQESG.js";
13
+
14
+ // src/core/permission-queue.ts
15
+ import { randomUUID } from "node:crypto";
16
+ var TTL_MS = 30 * 6e4;
17
+ var MAX_RECORDS = 200;
18
+ var FabricPermissionQueue = class {
19
+ constructor(now = Date.now) {
20
+ this.now = now;
21
+ }
22
+ #entries = /* @__PURE__ */ new Map();
23
+ #keys = /* @__PURE__ */ new Map();
24
+ #epoch = 0;
25
+ #key(action, args, cwd) {
26
+ strictDecisionResult(args);
27
+ return stableJsonHash({ action, args, cwd });
28
+ }
29
+ #expire() {
30
+ for (const entry of this.#entries.values()) {
31
+ if ((entry.record.status === "pending" || entry.record.status === "allowed" || entry.record.status === "denied") && this.now() >= entry.record.expiresAt) {
32
+ entry.record.status = "expired";
33
+ if (this.#keys.get(entry.key) === entry.record.id) this.#keys.delete(entry.key);
34
+ }
35
+ }
36
+ }
37
+ list() {
38
+ this.#expire();
39
+ return [...this.#entries.values()].map((entry) => structuredClone(entry.record)).reverse();
40
+ }
41
+ get pendingCount() {
42
+ return this.list().filter((record) => record.status === "pending").length;
43
+ }
44
+ take(action, args, cwd) {
45
+ this.#expire();
46
+ const key = this.#key(action, args, cwd);
47
+ const entry = this.#entries.get(this.#keys.get(key) ?? "");
48
+ if (!entry || entry.epoch !== this.#epoch) return void 0;
49
+ if (entry.record.status === "allowed") {
50
+ const token = consume(true);
51
+ if (!token.released || token.active) throw new Error("Permission token could not be consumed");
52
+ entry.record.status = "used";
53
+ this.#keys.delete(key);
54
+ return "allowed";
55
+ }
56
+ return structuredClone(entry.record);
57
+ }
58
+ block(action, args, cwd, reason) {
59
+ this.#expire();
60
+ const key = this.#key(action, args, cwd);
61
+ const old = this.#entries.get(this.#keys.get(key) ?? "");
62
+ if (old) return structuredClone(old.record);
63
+ for (const [id, entry] of this.#entries) {
64
+ if (this.#entries.size < MAX_RECORDS) break;
65
+ if (entry.record.status === "used" || entry.record.status === "expired") this.#entries.delete(id);
66
+ }
67
+ if (this.#entries.size >= MAX_RECORDS) throw new Error("Permission queue is full; triage with /fabric permissions");
68
+ const record = {
69
+ id: `perm_${randomUUID()}`,
70
+ ref: action.ref,
71
+ risk: action.risk,
72
+ cwd,
73
+ preview: JSON.stringify(boundedPreviewValue(previewArgs(action.ref, args), 16e3), null, 2),
74
+ reason: reason.slice(0, 2e3),
75
+ status: "pending",
76
+ createdAt: this.now(),
77
+ expiresAt: this.now() + TTL_MS
78
+ };
79
+ this.#entries.set(record.id, { record, key, epoch: this.#epoch });
80
+ this.#keys.set(key, record.id);
81
+ return structuredClone(record);
82
+ }
83
+ decide(id, decision) {
84
+ this.#expire();
85
+ const entry = this.#entries.get(id);
86
+ if (!entry || !transitionCurrent(false, entry.epoch === this.#epoch, true, entry.record.status !== "pending")) {
87
+ throw new Error("Permission is no longer pending");
88
+ }
89
+ entry.record.status = decision;
90
+ return structuredClone(entry.record);
91
+ }
92
+ message(record) {
93
+ return record.status === "denied" ? `Permission ${record.id} denied for ${record.ref}; the call did not run.` : `Permission ${record.id} pending for ${record.ref}; the call did not run. Continue independent work. The user can review /fabric permissions; after approval, retry only this call with identical arguments.`;
94
+ }
95
+ clear() {
96
+ this.#epoch++;
97
+ this.#entries.clear();
98
+ this.#keys.clear();
99
+ }
100
+ };
101
+ export {
102
+ FabricPermissionQueue
103
+ };
104
+ //# sourceMappingURL=permission-queue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/permission-queue.ts"],
4
+ "sourcesContent": ["import { randomUUID } from \"node:crypto\";\nimport type { ResolvedFabricAction } from \"./action-registry.js\";\nimport { stableJsonHash } from \"./stable-hash.js\";\nimport { boundedPreviewValue, previewArgs, strictDecisionResult } from \"./action-result.js\";\nimport { consume, transitionCurrent } from \"../verified/policy.js\";\n\nexport type PermissionStatus = \"pending\" | \"allowed\" | \"denied\" | \"used\" | \"expired\";\nexport interface FabricPermissionRecord {\n id: string;\n ref: string;\n risk: ResolvedFabricAction[\"risk\"];\n cwd: string;\n preview: string;\n reason: string;\n status: PermissionStatus;\n createdAt: number;\n expiresAt: number;\n}\ninterface Entry { record: FabricPermissionRecord; key: string; epoch: number }\nconst TTL_MS = 30 * 60_000;\nconst MAX_RECORDS = 200;\n\n/** Session-local retry authorizations, never saved arguments or executable\n * closures. Allowing a ticket does not execute it: the next identical call\n * must pass the live registry, schema, host policy and approval checks again.\n * Host assumptions: SHA-256 identity covers the normalized descriptor, cwd\n * and complete JSON arguments; one JS turn owns each mutation. The existing\n * verified transition/consume kernels enforce current, one-use grants. */\nexport class FabricPermissionQueue {\n #entries = new Map<string, Entry>();\n #keys = new Map<string, string>();\n #epoch = 0;\n constructor(readonly now: () => number = Date.now) {}\n\n #key(action: ResolvedFabricAction, args: Record<string, unknown>, cwd: string): string {\n // Reject lossy JSON rather than minting a grant for an ambiguous payload.\n strictDecisionResult(args);\n return stableJsonHash({ action, args, cwd });\n }\n #expire(): void {\n for (const entry of this.#entries.values()) {\n if ((entry.record.status === \"pending\" || entry.record.status === \"allowed\" || entry.record.status === \"denied\") && this.now() >= entry.record.expiresAt) {\n entry.record.status = \"expired\";\n if (this.#keys.get(entry.key) === entry.record.id) this.#keys.delete(entry.key);\n }\n }\n }\n list(): FabricPermissionRecord[] {\n this.#expire();\n return [...this.#entries.values()].map(entry => structuredClone(entry.record)).reverse();\n }\n get pendingCount(): number { return this.list().filter(record => record.status === \"pending\").length; }\n\n take(action: ResolvedFabricAction, args: Record<string, unknown>, cwd: string): \"allowed\" | FabricPermissionRecord | undefined {\n this.#expire();\n const key = this.#key(action, args, cwd);\n const entry = this.#entries.get(this.#keys.get(key) ?? \"\");\n if (!entry || entry.epoch !== this.#epoch) return undefined;\n if (entry.record.status === \"allowed\") {\n const token = consume(true);\n if (!token.released || token.active) throw new Error(\"Permission token could not be consumed\");\n entry.record.status = \"used\";\n this.#keys.delete(key);\n return \"allowed\";\n }\n return structuredClone(entry.record);\n }\n\n block(action: ResolvedFabricAction, args: Record<string, unknown>, cwd: string, reason: string): FabricPermissionRecord {\n this.#expire();\n const key = this.#key(action, args, cwd);\n const old = this.#entries.get(this.#keys.get(key) ?? \"\");\n if (old) return structuredClone(old.record);\n for (const [id, entry] of this.#entries) {\n if (this.#entries.size < MAX_RECORDS) break;\n if (entry.record.status === \"used\" || entry.record.status === \"expired\") this.#entries.delete(id);\n }\n if (this.#entries.size >= MAX_RECORDS) throw new Error(\"Permission queue is full; triage with /fabric permissions\");\n const record: FabricPermissionRecord = {\n id: `perm_${randomUUID()}`, ref: action.ref, risk: action.risk, cwd,\n preview: JSON.stringify(boundedPreviewValue(previewArgs(action.ref, args), 16_000), null, 2),\n reason: reason.slice(0, 2000), status: \"pending\", createdAt: this.now(), expiresAt: this.now() + TTL_MS,\n };\n this.#entries.set(record.id, { record, key, epoch: this.#epoch });\n this.#keys.set(key, record.id);\n return structuredClone(record);\n }\n\n decide(id: string, decision: \"allowed\" | \"denied\"): FabricPermissionRecord {\n this.#expire();\n const entry = this.#entries.get(id);\n if (!entry || !transitionCurrent(false, entry.epoch === this.#epoch, true, entry.record.status !== \"pending\")) {\n throw new Error(\"Permission is no longer pending\");\n }\n entry.record.status = decision;\n return structuredClone(entry.record);\n }\n\n message(record: FabricPermissionRecord): string {\n return record.status === \"denied\"\n ? `Permission ${record.id} denied for ${record.ref}; the call did not run.`\n : `Permission ${record.id} pending for ${record.ref}; the call did not run. Continue independent work. The user can review /fabric permissions; after approval, retry only this call with identical arguments.`;\n }\n\n clear():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AAO,EAAE;AAC7B,WAAO,gBAAgB,MAAM;AAAA,EAC/B;AAAA,EAEA,OAAO,IAAY,UAAwD;AACzE,SAAK,QAAQ;AACb,UAAM,QAAQ,KAAK,SAAS,IAAI,EAAE;AAClC,QAAI,CAAC,SAAS,CAAC,kBAAkB,OAAO,MAAM,UAAU,KAAK,QAAQ,MAAM,MAAM,OAAO,WAAW,SAAS,GAAG;AAC7G,YAAM,IAAI,MAAM,iCAAiC;AAAA,IACnD;AACA,UAAM,OAAO,SAAS;AACtB,WAAO,gBAAgB,MAAM,MAAM;AAAA,EACrC;AAAA,EAEA,QAAQ,QAAwC;AAC9C,WAAO,OAAO,WAAW,WACrB,cAAc,OAAO,EAAE,eAAe,OAAO,GAAG,4BAChD,cAAc,OAAO,EAAE,gBAAgB,OAAO,GAAG;AAAA,EACvD;AAAA,EAEA,QAAc;AAAE,SAAK;AAAU,SAAK,SAAS,MAAM;AAAG,SAAK,MAAM,MAAM;AAAA,EAAG;AAC5E;",
6
+ "names": []
7
+ }
@@ -1,3 +1,4 @@
1
+ export { fabricGuidanceDelivery, relocateFabricGuidelines, stripFabricRuleBullets } from "./guidance-delivery.js";
1
2
  export { coreOverridePromptGuidance } from "./core-override-guidance.js";
2
3
  export { buildSkillReferenceGuidance } from "./skill-references.js";
3
4
  export { managedHostExecutionGuidance, managedHostKernelGuidance } from "./managed-host-guidance.js";
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-guidance.d.ts","sourceRoot":"","sources":["../../src/core/prompt-guidance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"prompt-guidance.d.ts","sourceRoot":"","sources":["../../src/core/prompt-guidance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAClH,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
@@ -2,6 +2,52 @@ import {
2
2
  PI_CORE_TOOL_NAMES
3
3
  } from "../chunks/chunk-YU62DDKK.js";
4
4
 
5
+ // src/verified/generated/prompt-guidance.js
6
+ function $n(v, what) {
7
+ if (typeof v !== "number" || !Number.isSafeInteger(v) || v < 0) throw new RangeError(what + " must be a natural below 2^53, not " + v);
8
+ return v;
9
+ }
10
+ var promptGuidance = /* @__PURE__ */ (() => {
11
+ function init(params) {
12
+ const env = {}, s = {};
13
+ return { scalars: { "out.section": 0, "out.append": 0, "out.native": 0 }, maps: {} };
14
+ }
15
+ function step(params, state, input) {
16
+ const env = { "active": $n(input["active"], "input active"), "sections": $n(input["sections"], "input sections"), "forced": $n(input["forced"], "input forced") }, s = state.scalars, dft = { ...state.defaults }, maps = state.maps;
17
+ if (!(env["active"] <= 1 && env["sections"] <= 1 && env["forced"] <= 1)) throw new RangeError("portable prompt guidance: the request fails the rule's assumption, so no proof covers the step it would take");
18
+ const scalars = { ...s, "out.section": env["active"] === 1 && env["sections"] === 1 && !(env["forced"] === 1) ? 1 : 0, "out.append": env["active"] === 1 && (!(env["sections"] === 1) || env["forced"] === 1) ? 1 : 0, "out.native": !(env["active"] === 1) ? 1 : 0 };
19
+ return Object.keys(dft).length ? { scalars, maps: state.maps, defaults: dft } : { scalars, maps: state.maps };
20
+ }
21
+ return { init, step };
22
+ })();
23
+
24
+ // src/core/guidance-delivery.ts
25
+ function fabricGuidanceDelivery(active, sections, forced) {
26
+ const output = promptGuidance.step({}, promptGuidance.init({}), {
27
+ active: active ? 1 : 0,
28
+ sections: sections ? 1 : 0,
29
+ forced: forced ? 1 : 0
30
+ }).scalars;
31
+ return { section: output["out.section"] === 1, append: output["out.append"] === 1, native: output["out.native"] === 1 };
32
+ }
33
+ function stripFabricRuleBullets(prompt, ownedGuidelines) {
34
+ const owned = new Set(ownedGuidelines);
35
+ return prompt.split("\n").filter(
36
+ (line) => !line.startsWith("- ") || !owned.has(line.slice(2).trim())
37
+ ).join("\n");
38
+ }
39
+ function relocateFabricGuidelines(toolGuidelines, guidelines, delivery, ownedGuidelines = guidelines) {
40
+ if (delivery.native) return {};
41
+ const owned = new Set(ownedGuidelines);
42
+ for (const text of guidelines) owned.add(text);
43
+ return {
44
+ text: "Fabric execution rules:\n" + guidelines.map((text) => `- ${text}`).join("\n"),
45
+ ...toolGuidelines?.fabric_exec ? {
46
+ remaining: toolGuidelines.fabric_exec.filter((text) => !owned.has(text.trim()))
47
+ } : {}
48
+ };
49
+ }
50
+
5
51
  // src/core/core-override-guidance.ts
6
52
  var coreOverridePromptGuidance = (catalog, allowlist) => {
7
53
  const sections = [];
@@ -81,9 +127,9 @@ var fabricExecutionKernelGuidance = (fullCodeMode, kernel = "typescript", python
81
127
  // Files the model has not opened (images in particular) must be read before
82
128
  // use; this line rides the turn-stable kernel guidance so provider prefix
83
129
  // caches stay warm.
84
- `Read every file the user provides (images, screenshots, code, text) with the ${fullCodeMode ? "`pi.read`" : "`read`"} tool before responding \u2014 never assume its contents.`
130
+ `Read files the user provides with the ${fullCodeMode ? "`pi.read`" : "`read`"} tool before relying on their contents, unless their contents are already included in the conversation. When an image or supplied vision-handoff description is present, use it without reading the path again. [Attached image: ...] labels identify source paths, not proof that image content is available. If image content is unavailable, say so; never infer it from the filename.`
85
131
  ].join(" ");
86
- var defaultFabricExecutionGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty", profile = "additive") => kernel === "typescript" && profile === "native" ? "Native Pi codemode profile: tools.<name>(args) and nativeTools.<name>(args) use native results, including schema-backed error envelopes. searchTools/ALL_TOOLS return callable identifiers; describeTool returns a declaration string. image() emits images and saves host-side temporary artifacts. store/load share Pi codemode-store entries on this branch. Fabric discovery remains fabric.tools; pi.*, mcp.* and extensions.* keep Fabric result semantics. Policies and limits are unchanged. " + defaultFabricExecutionGuidance(fullCodeMode, kernel, pythonRuntime).replaceAll("tools.", "fabric.tools.").replaceAll("`tools`", "`fabric.tools`") : kernel === "python" ? (pythonRuntime === "monty" ? "Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. " : "Python backend: CPython; native standard-library imports are available. ") + 'Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query="example")`, `await tools.call(ref="provider.action", args={"key": "value"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads["key"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.' + (fullCodeMode ? ` \`await pi.read("/x")\`, \`await pi.grep(pattern="TODO", path="src")\`, \`await pi.find(pattern="*.py", path="src")\`, and \`await pi.ls("src")\` return strings. \`await pi.bash(command="ls")\`, \`await pi.edit(path="/x", oldText="a", newText="b")\`, and \`await pi.write(path="/y", content=\u03C0.body)\` return dicts; read \`r["output"]\`. Shell nonzero exits raise; \`settle=True\` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.` + SHELL_COMPOSITION_GUIDANCE + " Captured tools are `await extensions.<name>(...)`." : " Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.") : fullCodeMode ? "Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed." + SHELL_COMPOSITION_GUIDANCE + "\n`tools` exposes discovery/generic calls (`providers`/`catalog`/`list`/`search`/`describe`/`call`) plus the native `models` namespace. `models === tools.models`; `tools.models()` retains legacy model listing. Use `await models.getAvailableOfType('classifier')` (or `'image'`), then `models.classify(model,{state,questions})` or `models.generateImages(model,{input})`. Check native `stopReason`/`errorMessage`; classifier yes/no questions use `type:'bool'` and return `probability`. Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
132
+ var defaultFabricExecutionGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty", profile = "additive") => kernel === "typescript" && profile === "native" ? "Native Pi codemode profile: tools.<name>(args) and nativeTools.<name>(args) use native results, including schema-backed error envelopes. searchTools/ALL_TOOLS return callable identifiers; describeTool returns a declaration string. image() emits images and saves host-side temporary artifacts. store/load share Pi codemode-store entries on this branch. Fabric discovery remains fabric.tools; pi.*, mcp.* and extensions.* keep Fabric result semantics. Policies and limits are unchanged. " + defaultFabricExecutionGuidance(fullCodeMode, kernel, pythonRuntime).replaceAll("tools.", "fabric.tools.").replaceAll("`tools`", "`fabric.tools`") : kernel === "python" ? (pythonRuntime === "monty" ? "Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. " : "Python backend: CPython; native standard-library imports are available. ") + 'Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query="example")`, `await tools.call(ref="provider.action", args={"key": "value"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads["key"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.' + (fullCodeMode ? ` \`await pi.read("/x")\`, \`await pi.grep(pattern="TODO", path="src")\`, \`await pi.find(pattern="*.py", path="src")\`, and \`await pi.ls("src")\` return strings. \`await pi.bash(command="ls")\`, \`await pi.edit(path="/x", oldText="a", newText="b")\`, and \`await pi.write(path="/y", content=\u03C0.body)\` return dicts; read \`r["output"]\`. Shell nonzero exits raise; \`settle=True\` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; shell timeout bounds the process, not this wait; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.` + SHELL_COMPOSITION_GUIDANCE + " Captured tools are `await extensions.<name>(...)`." : " Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.") : fullCodeMode ? "Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; shell `timeout` bounds the process, not this wait; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed." + SHELL_COMPOSITION_GUIDANCE + "\n`tools` exposes discovery/generic calls (`providers`/`catalog`/`list`/`search`/`describe`/`call`) plus the native `models` namespace. `models === tools.models`; `tools.models()` retains legacy model listing. Use `await models.getAvailableOfType('classifier')` (or `'image'`), then `models.classify(model,{state,questions})` or `models.generateImages(model,{input})`. Check native `stopReason`/`errorMessage`; classifier yes/no questions use `type:'bool'` and return `probability`. Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
87
133
  var manifestNameCache = /* @__PURE__ */ new Map();
88
134
  var packageNameFromManifest = (startPath) => {
89
135
  if (!startPath) return void 0;
@@ -152,8 +198,11 @@ export {
152
198
  defaultFabricExecutionGuidance,
153
199
  extensionToolRosterGuidance,
154
200
  fabricExecutionKernelGuidance,
201
+ fabricGuidanceDelivery,
155
202
  fabricSchemaGuidance,
156
203
  managedHostExecutionGuidance,
157
- managedHostKernelGuidance
204
+ managedHostKernelGuidance,
205
+ relocateFabricGuidelines,
206
+ stripFabricRuleBullets
158
207
  };
159
208
  //# sourceMappingURL=prompt-guidance.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/core/core-override-guidance.ts", "../../src/core/skill-references.ts", "../../src/core/managed-host-guidance.ts", "../../src/core/system-guidance.ts"],
4
- "sourcesContent": ["import type { CapturedToolCatalog } from \"../capture/catalog.js\";\nimport { PI_CORE_TOOL_NAMES } from \"./pi-tools.js\";\n\n/**\n * Append authored guidance from the current exact-name core overrides without\n * presenting those definitions as separate extension tools.\n */\nexport const coreOverridePromptGuidance = (\n catalog: CapturedToolCatalog,\n allowlist?: { has(name: string): boolean },\n): string => {\n const sections: string[] = [];\n for (const name of PI_CORE_TOOL_NAMES) {\n if (allowlist && !allowlist.has(name)) continue;\n const entry = catalog.get(name);\n if (!entry) continue;\n const lines: string[] = [];\n if (entry.definition.promptSnippet) {\n lines.push(`Additional guidance for \\`pi.${name}\\`: ${entry.definition.promptSnippet}`);\n }\n const guidelines = entry.definition.promptGuidelines ?? [];\n if (guidelines.length > 0) {\n lines.push(`Guidelines for \\`pi.${name}\\`:`);\n lines.push(...guidelines.map((guideline) => `- ${guideline}`));\n }\n if (lines.length > 0) sections.push(lines.join(\"\\n\"));\n }\n return sections.length > 0\n ? `\\n\\nEffective compatible core override guidance:\\n${sections.join(\"\\n\")}`\n : \"\";\n};\n", "export interface SkillReference {\n name: string;\n filePath: string;\n disableModelInvocation?: boolean;\n}\n\nconst INVOCATION_VERB =\n /^\\s*(?:[-*]\\s*)?(?:(?:then|next|first|always|must|you must)\\s+)?(?:run|invoke|load|start|follow|use)\\b/i;\nconst NEGATED_INVOCATION =\n /^\\s*(?:[-*]\\s*)?(?:do not|don't|never)\\s+(?:run|invoke|load|start|follow|use)\\b/i;\n\nconst escapeRegex = (value: string): string =>\n value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\nconst referencesSkill = (line: string, skillName: string): boolean => {\n const name = escapeRegex(skillName);\n return new RegExp(`/(?:skill:)?${name}(?=[\\\\s\\`'\".,;:!?<>)\\\\]}]|$)`, \"i\").test(line);\n};\n\nexport const buildSkillReferenceGuidance = (\n prompt: string,\n skills: readonly SkillReference[],\n skillReader: string | null = \"pi.read\",\n): string | undefined => {\n if (skillReader === null) return undefined;\n const active = skills.find((skill) =>\n prompt.startsWith(`<skill name=\"${skill.name}\" location=\"${skill.filePath}\">`),\n );\n if (!active) return undefined;\n\n const closingTag = prompt.indexOf(\"</skill>\");\n if (closingTag < 0) return undefined;\n const openingEnd = prompt.indexOf(\"\\n\\n\");\n if (openingEnd < 0 || openingEnd >= closingTag) return undefined;\n const body = prompt.slice(openingEnd + 2, closingTag);\n const invocationLines = body\n .split(\"\\n\")\n .filter((line) => INVOCATION_VERB.test(line) && !NEGATED_INVOCATION.test(line));\n\n const referenced = skills.filter(\n (skill) =>\n skill.name !== active.name &&\n skill.disableModelInvocation !== true &&\n invocationLines.some((line) => referencesSkill(line, skill.name)),\n );\n if (referenced.length === 0) return undefined;\n\n const mappings = referenced\n .map((skill) => `- /${skill.name} -> ${JSON.stringify(skill.filePath)}`)\n .join(\"\\n\");\n return [\n `The active skill ${JSON.stringify(active.name)} is already expanded; do not reread ${JSON.stringify(active.filePath)}.`,\n \"Resolve the skill invocations below before task exploration:\",\n mappings,\n `Load each mapped SKILL.md through ${skillReader} inside fabric_exec and follow it. Skill loading is a dependency, not task exploration. Continue the active workflow after tool results and later user replies until it completes.`,\n ].join(\"\\n\");\n};\n", "import type { FabricManagedHostOptions } from \"../managed-host.js\";\n\n/** Names come from sealed host authority, not the ambient provider catalog. */\nexport const managedHostExecutionGuidance = (options: Readonly<FabricManagedHostOptions>): string => [\n `Managed provider namespaces: ${options.providers.length ? options.providers.join(\", \") : \"none\"}. Only registered host actions are available; do not assume other providers or coding tools exist.`,\n \"Use fabric.tools.search/describe for exact contracts and raw inputSchema, then fabric.tools.call({ref,args}) or the discovered provider namespace. nativeDiscovery.searchTools/describeTool and nativeTools also expose the authorized native catalog. Use exact discovered callable names.\",\n \"store/load persist branch-local JSON across successful scripts; they are not business memory tools. Host authorization, approval and cancellation remain authoritative.\",\n].join(\" \");\n\nexport const managedHostKernelGuidance = (options: Readonly<FabricManagedHostOptions>): string => [\n \"Configured fabric_exec kernel: type-checked TypeScript in isolated QuickJS. Top-level await and return are supported. Each invocation starts fresh; use store/load for branch-local JSON state.\",\n options.skillReader ? `Read supplied files and skills through the host reader \\`${options.skillReader}\\` inside \\`fabric_exec\\`; never assume their contents.` : \"The embedding host owns file and skill loading; do not assume a filesystem reader is available.\",\n].join(\" \");\n", "import type { FabricKernel } from \"../runtime/kernel.js\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport * as path from \"node:path\";\n\n// jev-fabric verbs for any background task; durable tasks and interactive\n// sessions exist only where jev-fabric can run (not Windows).\nconst SHELL_COMPOSITION_GUIDANCE =\n \" tasks.read (byte offset/next, waitMs long-poll) and tasks.watch with {id, match} read or filter any background task without a monitor.\" +\n (process.platform === \"win32\" ? \"\" : \" With jev-fabric (see tasks/sessions via tools.describe): pi.bash durable:true outlives Pi and reattaches on resume; sessions.open/write/read/stop drive interactive children (a Jev program's end with it).\");\n\nexport const fabricExecutionKernelGuidance = (fullCodeMode: boolean, kernel: FabricKernel = \"typescript\", pythonRuntime: \"cpython\" | \"monty\" = \"monty\", profile: \"additive\" | \"native\" = \"additive\"): string =>\n [\n kernel === \"python\"\n ? `Configured fabric_exec kernel: Python (${pythonRuntime === \"monty\" ? \"Monty sandboxed subset\" : \"CPython\"}). Write Python only in \\`code\\`: top-level await/return, dicts, True/False/None, and asyncio.gather. There is no per-call language switch.`\n : profile === \"native\"\n ? \"Configured fabric_exec kernel: TypeScript with native Pi codemode API. Write JavaScript async function bodies; top-level await and return work. Native source is not type-checked or repaired.\"\n : \"Configured fabric_exec kernel: TypeScript. Write TypeScript only in `code`; top-level await and return are supported.\",\n \"The configured kernel is exclusive for Fabric orchestration, including when skills or earlier messages show another language. Do not invoke another interpreter through shell tools or native subprocesses merely to run Fabric orchestration in a different language. Project builds, tests, and explicitly requested interpreter work remain legitimate shell commands.\",\n fullCodeMode\n ? \"Pi Fabric full code mode: `fabric_exec` is the only way to call Pi core tools \u2014 use them as `pi.*` inside `code`.\"\n : \"Pi Fabric is in orchestration-only mode. Pi core and registered extension tools stay on their native direct execution path; inside fabric_exec, `pi.*` and `extensions.*` are unavailable.\",\n // Files the model has not opened (images in particular) must be read before\n // use; this line rides the turn-stable kernel guidance so provider prefix\n // caches stay warm.\n `Read every file the user provides (images, screenshots, code, text) with the ${fullCodeMode ? \"`pi.read`\" : \"`read`\"} tool before responding \u2014 never assume its contents.`,\n ].join(\" \");\n\nexport const defaultFabricExecutionGuidance = (fullCodeMode: boolean, kernel: FabricKernel = \"typescript\", pythonRuntime: \"cpython\" | \"monty\" = \"monty\", profile: \"additive\" | \"native\" = \"additive\"): string =>\n kernel === \"typescript\" && profile === \"native\"\n ? \"Native Pi codemode profile: tools.<name>(args) and nativeTools.<name>(args) use native results, including schema-backed error envelopes. searchTools/ALL_TOOLS return callable identifiers; describeTool returns a declaration string. image() emits images and saves host-side temporary artifacts. store/load share Pi codemode-store entries on this branch. Fabric discovery remains fabric.tools; pi.*, mcp.* and extensions.* keep Fabric result semantics. Policies and limits are unchanged. \" + defaultFabricExecutionGuidance(fullCodeMode, kernel, pythonRuntime).replaceAll(\"tools.\", \"fabric.tools.\").replaceAll(\"`tools`\", \"`fabric.tools`\")\n : kernel === \"python\"\n ? (pythonRuntime === \"monty\"\n ? \"Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. \"\n : \"Python backend: CPython; native standard-library imports are available. \") + \"Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query=\\\"example\\\")`, `await tools.call(ref=\\\"provider.action\\\", args={\\\"key\\\": \\\"value\\\"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads[\\\"key\\\"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.\" + (fullCodeMode ? \" `await pi.read(\\\"/x\\\")`, `await pi.grep(pattern=\\\"TODO\\\", path=\\\"src\\\")`, `await pi.find(pattern=\\\"*.py\\\", path=\\\"src\\\")`, and `await pi.ls(\\\"src\\\")` return strings. `await pi.bash(command=\\\"ls\\\")`, `await pi.edit(path=\\\"/x\\\", oldText=\\\"a\\\", newText=\\\"b\\\")`, and `await pi.write(path=\\\"/y\\\", content=\u03C0.body)` return dicts; read `r[\\\"output\\\"]`. Shell nonzero exits raise; `settle=True` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.\" + SHELL_COMPOSITION_GUIDANCE + \" Captured tools are `await extensions.<name>(...)`.\" : \" Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.\")\n : fullCodeMode\n ? \"Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.\" + SHELL_COMPOSITION_GUIDANCE + \"\\n`tools` exposes discovery/generic calls (`providers`/`catalog`/`list`/`search`/`describe`/`call`) plus the native `models` namespace. `models === tools.models`; `tools.models()` retains legacy model listing. Use `await models.getAvailableOfType('classifier')` (or `'image'`), then `models.classify(model,{state,questions})` or `models.generateImages(model,{input})`. Check native `stopReason`/`errorMessage`; classifier yes/no questions use `type:'bool'` and return `probability`. Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool).\"\n : \"Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.\";\n\n// Shape of CapturedToolCatalog entries this renderer needs (kept structural to avoid a runtime dependency on the capture layer from a guidance module).\nexport interface ExtensionRosterToolSource {\n name: string;\n sourceInfo?: { source?: string; path?: string };\n}\n\n// Namespace labels come from the extension package's own identity: the\n// package.json `name` nearest the tool's source file, mirroring how pi names\n// npm-installed packages. Raw `source` strings are configured specifiers that\n// are often full relative paths, so they are only used when no manifest exists.\nconst manifestNameCache = new Map<string, string | undefined>();\n\nconst packageNameFromManifest = (startPath: string | undefined): string | undefined => {\n if (!startPath) return undefined;\n let directory = path.dirname(path.resolve(startPath));\n // Every folder the walk passes through resolves to the same answer, so the\n // result is cached for all of them. Caching undefined for a folder below the\n // manifest would make a later lookup that starts there miss the name.\n const visited: string[] = [];\n const settle = (name: string | undefined): string | undefined => {\n for (const folder of visited) manifestNameCache.set(folder, name);\n return name;\n };\n while (true) {\n if (manifestNameCache.has(directory)) return settle(manifestNameCache.get(directory));\n visited.push(directory);\n const manifestPath = path.join(directory, \"package.json\");\n let name: string | undefined;\n if (existsSync(manifestPath)) {\n try {\n const manifest = JSON.parse(readFileSync(manifestPath, \"utf8\")) as { name?: unknown };\n if (typeof manifest.name === \"string\" && manifest.name.trim()) name = manifest.name.trim();\n } catch {\n // Unreadable or invalid manifest; keep walking upward.\n }\n }\n if (name) return settle(name);\n const parent = path.dirname(directory);\n if (parent === directory) return settle(undefined);\n directory = parent;\n }\n};\n\n// In full code mode the model sees only fabric_exec in its tool list, so\n// registered extension tools are invisible unless named up front (#69). The\n// roster stays names-only: descriptions and schemas are on demand through the\n// tools.list/search/describe discovery surface, so the standing prompt cost is\n// a bare name index. Core overrides are excluded: they surface as pi.* via\n// coreOverridePromptGuidance.\nexport const extensionToolRosterGuidance = (\n tools: ReadonlyArray<ExtensionRosterToolSource>,\n coreToolNames: ReadonlySet<string>,\n nativeProfile = false,\n): string | undefined => {\n const extensionTools = tools.filter((tool) => !coreToolNames.has(tool.name));\n if (extensionTools.length === 0) return undefined;\n const namespaceLabel = (tool: ExtensionRosterToolSource): string => {\n const source = tool.sourceInfo?.source?.trim();\n if (source?.startsWith(\"npm:\")) return source.slice(\"npm:\".length) || source;\n const manifestName =\n packageNameFromManifest(tool.sourceInfo?.path) ??\n packageNameFromManifest(source && /[\\\\/]/.test(source) ? source : undefined);\n if (manifestName) return manifestName;\n if (source && !/[\\\\/]/.test(source)) return source;\n const parts = (tool.sourceInfo?.path ?? source ?? \"\").split(/[\\\\/]/).filter(Boolean);\n const base = parts.at(-1)?.trim() ?? \"\";\n // Entry files like index.js name the package directory, not the source.\n if (/^index\\./i.test(base)) return parts.at(-2)?.trim() || base;\n return base || \"extensions\";\n };\n const groups = new Map<string, string[]>();\n for (const tool of [...extensionTools].sort((left, right) => left.name.localeCompare(right.name))) {\n const label = namespaceLabel(tool);\n const names = groups.get(label);\n if (names) names.push(tool.name);\n else groups.set(label, [tool.name]);\n }\n return [\n `Registered extension tools are callable inside fabric_exec as \\`extensions.<name>(args)\\`; run \\`${nativeProfile ? \"fabric.tools\" : \"tools\"}.list\\` for full descriptions and schemas before re-implementing an effect with pi.bash.`,\n ...[...groups.entries()]\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([label, names]) => \"- \" + label + \": \" + names.join(\", \")),\n ].join(\"\\n\");\n};\n\nexport const fabricSchemaGuidance = (mode: \"off\" | \"audit\" | \"enforce\"): string | undefined => {\n if (mode === \"enforce\") {\n return \"Schema enforce mode is fixed for this session. Reads remain available, but protected-workspace changes must use schema.hypothesize \u2192 schema.verify \u2192 schema.commit in the same fabric_exec invocation. Direct pi.edit/write/bash/powershell, agents, state/mesh writes, compaction requests, MCP, extensions, and external providers are blocked by the host gate.\";\n }\n if (mode === \"audit\") {\n return \"Schema audit mode reports actions that enforce mode would block, but preserves their current behavior.\";\n }\n return undefined;\n};\n"],
5
- "mappings": ";;;;;AAOO,IAAM,6BAA6B,CACxC,SACA,cACW;AACX,QAAM,WAAqB,CAAC;AAC5B,aAAW,QAAQ,oBAAoB;AACrC,QAAI,aAAa,CAAC,UAAU,IAAI,IAAI,EAAG;AACvC,UAAM,QAAQ,QAAQ,IAAI,IAAI;AAC9B,QAAI,CAAC,MAAO;AACZ,UAAM,QAAkB,CAAC;AACzB,QAAI,MAAM,WAAW,eAAe;AAClC,YAAM,KAAK,gCAAgC,IAAI,OAAO,MAAM,WAAW,aAAa,EAAE;AAAA,IACxF;AACA,UAAM,aAAa,MAAM,WAAW,oBAAoB,CAAC;AACzD,QAAI,WAAW,SAAS,GAAG;AACzB,YAA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idance-delivery.ts", "../../src/core/core-override-guidance.ts", "../../src/core/skill-references.ts", "../../src/core/managed-host-guidance.ts", "../../src/core/system-guidance.ts"],
4
+ "sourcesContent": ["// Generated by scripts/verified-kernels.ts from proofs/prompt-guidance.ts with gdp-wired@0.31.1. Do not edit.\nfunction $n(v, what) { if (typeof v !== 'number' || !Number.isSafeInteger(v) || v < 0) throw new RangeError(what + ' must be a natural below 2^53, not ' + v); return v; }\n\nexport const promptGuidance = /* @__PURE__ */ (() => {\n// Generated from the machine portable prompt guidance. step consumes its state: keep the one it returns (fork to branch).\nfunction init(params) {\n const env = {}, s = {};\n return {scalars: {\"out.section\": 0, \"out.append\": 0, \"out.native\": 0}, maps: {}};\n}\nfunction step(params, state, input) {\n const env = {\"active\": $n(input[\"active\"], \"input active\"), \"sections\": $n(input[\"sections\"], \"input sections\"), \"forced\": $n(input[\"forced\"], \"input forced\")}, s = state.scalars, dft = {...state.defaults}, maps = state.maps;\n if (!((env[\"active\"] <= 1) && (env[\"sections\"] <= 1) && (env[\"forced\"] <= 1))) throw new RangeError(\"portable prompt guidance: the request fails the rule's assumption, so no proof covers the step it would take\");\n const scalars = {...s, \"out.section\": (((env[\"active\"] === 1) && (env[\"sections\"] === 1) && (!(env[\"forced\"] === 1))) ? 1 : 0), \"out.append\": (((env[\"active\"] === 1) && ((!(env[\"sections\"] === 1)) || (env[\"forced\"] === 1))) ? 1 : 0), \"out.native\": ((!(env[\"active\"] === 1)) ? 1 : 0)};\n return Object.keys(dft).length ? {scalars, maps: state.maps, defaults: dft} : {scalars, maps: state.maps};\n}\nreturn { init, step };\n})();\n", "import { promptGuidance } from \"../verified/generated/prompt-guidance.js\";\n\nexport interface FabricGuidanceDelivery {\n section: boolean;\n append: boolean;\n native: boolean;\n}\n\n/** Execute the proved routing decision; no provider-name heuristics. */\nexport function fabricGuidanceDelivery(active: boolean, sections: boolean, forced: boolean): FabricGuidanceDelivery {\n const output = promptGuidance.step({}, promptGuidance.init({}), {\n active: active ? 1 : 0, sections: sections ? 1 : 0, forced: forced ? 1 : 0,\n }).scalars;\n return { section: output[\"out.section\"] === 1, append: output[\"out.append\"] === 1, native: output[\"out.native\"] === 1 };\n}\n\n/** Remove only exact owned bullet lines, not prose mentioning their text. */\nexport function stripFabricRuleBullets(prompt: string, ownedGuidelines: readonly string[]): string {\n const owned = new Set(ownedGuidelines);\n return prompt.split(\"\\n\").filter((line) =>\n !line.startsWith(\"- \") || !owned.has(line.slice(2).trim()),\n ).join(\"\\n\");\n}\n\n/**\n * Prepare, without mutating host options. The caller commits only after every\n * fallible renderer succeeds. String retention is tested, not claimed by the\n * routing proof; an existing forced/legacy prompt is cleaned separately.\n */\nexport function relocateFabricGuidelines(\n toolGuidelines: Record<string, string[]> | undefined,\n guidelines: readonly string[],\n delivery: FabricGuidanceDelivery,\n ownedGuidelines: readonly string[] = guidelines,\n): { text?: string; remaining?: string[] } {\n if (delivery.native) return {};\n const owned = new Set(ownedGuidelines);\n for (const text of guidelines) owned.add(text);\n return {\n text: \"Fabric execution rules:\\n\" + guidelines.map((text) => `- ${text}`).join(\"\\n\"),\n ...(toolGuidelines?.fabric_exec ? {\n remaining: toolGuidelines.fabric_exec.filter((text) => !owned.has(text.trim())),\n } : {}),\n };\n}\n", "import type { CapturedToolCatalog } from \"../capture/catalog.js\";\nimport { PI_CORE_TOOL_NAMES } from \"./pi-tools.js\";\n\n/**\n * Append authored guidance from the current exact-name core overrides without\n * presenting those definitions as separate extension tools.\n */\nexport const coreOverridePromptGuidance = (\n catalog: CapturedToolCatalog,\n allowlist?: { has(name: string): boolean },\n): string => {\n const sections: string[] = [];\n for (const name of PI_CORE_TOOL_NAMES) {\n if (allowlist && !allowlist.has(name)) continue;\n const entry = catalog.get(name);\n if (!entry) continue;\n const lines: string[] = [];\n if (entry.definition.promptSnippet) {\n lines.push(`Additional guidance for \\`pi.${name}\\`: ${entry.definition.promptSnippet}`);\n }\n const guidelines = entry.definition.promptGuidelines ?? [];\n if (guidelines.length > 0) {\n lines.push(`Guidelines for \\`pi.${name}\\`:`);\n lines.push(...guidelines.map((guideline) => `- ${guideline}`));\n }\n if (lines.length > 0) sections.push(lines.join(\"\\n\"));\n }\n return sections.length > 0\n ? `\\n\\nEffective compatible core override guidance:\\n${sections.join(\"\\n\")}`\n : \"\";\n};\n", "export interface SkillReference {\n name: string;\n filePath: string;\n disableModelInvocation?: boolean;\n}\n\nconst INVOCATION_VERB =\n /^\\s*(?:[-*]\\s*)?(?:(?:then|next|first|always|must|you must)\\s+)?(?:run|invoke|load|start|follow|use)\\b/i;\nconst NEGATED_INVOCATION =\n /^\\s*(?:[-*]\\s*)?(?:do not|don't|never)\\s+(?:run|invoke|load|start|follow|use)\\b/i;\n\nconst escapeRegex = (value: string): string =>\n value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\nconst referencesSkill = (line: string, skillName: string): boolean => {\n const name = escapeRegex(skillName);\n return new RegExp(`/(?:skill:)?${name}(?=[\\\\s\\`'\".,;:!?<>)\\\\]}]|$)`, \"i\").test(line);\n};\n\nexport const buildSkillReferenceGuidance = (\n prompt: string,\n skills: readonly SkillReference[],\n skillReader: string | null = \"pi.read\",\n): string | undefined => {\n if (skillReader === null) return undefined;\n const active = skills.find((skill) =>\n prompt.startsWith(`<skill name=\"${skill.name}\" location=\"${skill.filePath}\">`),\n );\n if (!active) return undefined;\n\n const closingTag = prompt.indexOf(\"</skill>\");\n if (closingTag < 0) return undefined;\n const openingEnd = prompt.indexOf(\"\\n\\n\");\n if (openingEnd < 0 || openingEnd >= closingTag) return undefined;\n const body = prompt.slice(openingEnd + 2, closingTag);\n const invocationLines = body\n .split(\"\\n\")\n .filter((line) => INVOCATION_VERB.test(line) && !NEGATED_INVOCATION.test(line));\n\n const referenced = skills.filter(\n (skill) =>\n skill.name !== active.name &&\n skill.disableModelInvocation !== true &&\n invocationLines.some((line) => referencesSkill(line, skill.name)),\n );\n if (referenced.length === 0) return undefined;\n\n const mappings = referenced\n .map((skill) => `- /${skill.name} -> ${JSON.stringify(skill.filePath)}`)\n .join(\"\\n\");\n return [\n `The active skill ${JSON.stringify(active.name)} is already expanded; do not reread ${JSON.stringify(active.filePath)}.`,\n \"Resolve the skill invocations below before task exploration:\",\n mappings,\n `Load each mapped SKILL.md through ${skillReader} inside fabric_exec and follow it. Skill loading is a dependency, not task exploration. Continue the active workflow after tool results and later user replies until it completes.`,\n ].join(\"\\n\");\n};\n", "import type { FabricManagedHostOptions } from \"../managed-host.js\";\n\n/** Names come from sealed host authority, not the ambient provider catalog. */\nexport const managedHostExecutionGuidance = (options: Readonly<FabricManagedHostOptions>): string => [\n `Managed provider namespaces: ${options.providers.length ? options.providers.join(\", \") : \"none\"}. Only registered host actions are available; do not assume other providers or coding tools exist.`,\n \"Use fabric.tools.search/describe for exact contracts and raw inputSchema, then fabric.tools.call({ref,args}) or the discovered provider namespace. nativeDiscovery.searchTools/describeTool and nativeTools also expose the authorized native catalog. Use exact discovered callable names.\",\n \"store/load persist branch-local JSON across successful scripts; they are not business memory tools. Host authorization, approval and cancellation remain authoritative.\",\n].join(\" \");\n\nexport const managedHostKernelGuidance = (options: Readonly<FabricManagedHostOptions>): string => [\n \"Configured fabric_exec kernel: type-checked TypeScript in isolated QuickJS. Top-level await and return are supported. Each invocation starts fresh; use store/load for branch-local JSON state.\",\n options.skillReader ? `Read supplied files and skills through the host reader \\`${options.skillReader}\\` inside \\`fabric_exec\\`; never assume their contents.` : \"The embedding host owns file and skill loading; do not assume a filesystem reader is available.\",\n].join(\" \");\n", "import type { FabricKernel } from \"../runtime/kernel.js\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport * as path from \"node:path\";\n\n// jev-fabric verbs for any background task; durable tasks and interactive\n// sessions exist only where jev-fabric can run (not Windows).\nconst SHELL_COMPOSITION_GUIDANCE =\n \" tasks.read (byte offset/next, waitMs long-poll) and tasks.watch with {id, match} read or filter any background task without a monitor.\" +\n (process.platform === \"win32\" ? \"\" : \" With jev-fabric (see tasks/sessions via tools.describe): pi.bash durable:true outlives Pi and reattaches on resume; sessions.open/write/read/stop drive interactive children (a Jev program's end with it).\");\n\nexport const fabricExecutionKernelGuidance = (fullCodeMode: boolean, kernel: FabricKernel = \"typescript\", pythonRuntime: \"cpython\" | \"monty\" = \"monty\", profile: \"additive\" | \"native\" = \"additive\"): string =>\n [\n kernel === \"python\"\n ? `Configured fabric_exec kernel: Python (${pythonRuntime === \"monty\" ? \"Monty sandboxed subset\" : \"CPython\"}). Write Python only in \\`code\\`: top-level await/return, dicts, True/False/None, and asyncio.gather. There is no per-call language switch.`\n : profile === \"native\"\n ? \"Configured fabric_exec kernel: TypeScript with native Pi codemode API. Write JavaScript async function bodies; top-level await and return work. Native source is not type-checked or repaired.\"\n : \"Configured fabric_exec kernel: TypeScript. Write TypeScript only in `code`; top-level await and return are supported.\",\n \"The configured kernel is exclusive for Fabric orchestration, including when skills or earlier messages show another language. Do not invoke another interpreter through shell tools or native subprocesses merely to run Fabric orchestration in a different language. Project builds, tests, and explicitly requested interpreter work remain legitimate shell commands.\",\n fullCodeMode\n ? \"Pi Fabric full code mode: `fabric_exec` is the only way to call Pi core tools \u2014 use them as `pi.*` inside `code`.\"\n : \"Pi Fabric is in orchestration-only mode. Pi core and registered extension tools stay on their native direct execution path; inside fabric_exec, `pi.*` and `extensions.*` are unavailable.\",\n // Files the model has not opened (images in particular) must be read before\n // use; this line rides the turn-stable kernel guidance so provider prefix\n // caches stay warm.\n `Read files the user provides with the ${fullCodeMode ? \"`pi.read`\" : \"`read`\"} tool before relying on their contents, unless their contents are already included in the conversation. When an image or supplied vision-handoff description is present, use it without reading the path again. [Attached image: ...] labels identify source paths, not proof that image content is available. If image content is unavailable, say so; never infer it from the filename.`,\n ].join(\" \");\n\nexport const defaultFabricExecutionGuidance = (fullCodeMode: boolean, kernel: FabricKernel = \"typescript\", pythonRuntime: \"cpython\" | \"monty\" = \"monty\", profile: \"additive\" | \"native\" = \"additive\"): string =>\n kernel === \"typescript\" && profile === \"native\"\n ? \"Native Pi codemode profile: tools.<name>(args) and nativeTools.<name>(args) use native results, including schema-backed error envelopes. searchTools/ALL_TOOLS return callable identifiers; describeTool returns a declaration string. image() emits images and saves host-side temporary artifacts. store/load share Pi codemode-store entries on this branch. Fabric discovery remains fabric.tools; pi.*, mcp.* and extensions.* keep Fabric result semantics. Policies and limits are unchanged. \" + defaultFabricExecutionGuidance(fullCodeMode, kernel, pythonRuntime).replaceAll(\"tools.\", \"fabric.tools.\").replaceAll(\"`tools`\", \"`fabric.tools`\")\n : kernel === \"python\"\n ? (pythonRuntime === \"monty\"\n ? \"Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. \"\n : \"Python backend: CPython; native standard-library imports are available. \") + \"Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query=\\\"example\\\")`, `await tools.call(ref=\\\"provider.action\\\", args={\\\"key\\\": \\\"value\\\"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads[\\\"key\\\"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.\" + (fullCodeMode ? \" `await pi.read(\\\"/x\\\")`, `await pi.grep(pattern=\\\"TODO\\\", path=\\\"src\\\")`, `await pi.find(pattern=\\\"*.py\\\", path=\\\"src\\\")`, and `await pi.ls(\\\"src\\\")` return strings. `await pi.bash(command=\\\"ls\\\")`, `await pi.edit(path=\\\"/x\\\", oldText=\\\"a\\\", newText=\\\"b\\\")`, and `await pi.write(path=\\\"/y\\\", content=\u03C0.body)` return dicts; read `r[\\\"output\\\"]`. Shell nonzero exits raise; `settle=True` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; shell timeout bounds the process, not this wait; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.\" + SHELL_COMPOSITION_GUIDANCE + \" Captured tools are `await extensions.<name>(...)`.\" : \" Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.\")\n : fullCodeMode\n ? \"Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; shell `timeout` bounds the process, not this wait; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.\" + SHELL_COMPOSITION_GUIDANCE + \"\\n`tools` exposes discovery/generic calls (`providers`/`catalog`/`list`/`search`/`describe`/`call`) plus the native `models` namespace. `models === tools.models`; `tools.models()` retains legacy model listing. Use `await models.getAvailableOfType('classifier')` (or `'image'`), then `models.classify(model,{state,questions})` or `models.generateImages(model,{input})`. Check native `stopReason`/`errorMessage`; classifier yes/no questions use `type:'bool'` and return `probability`. Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool).\"\n : \"Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.\";\n\n// Shape of CapturedToolCatalog entries this renderer needs (kept structural to avoid a runtime dependency on the capture layer from a guidance module).\nexport interface ExtensionRosterToolSource {\n name: string;\n sourceInfo?: { source?: string; path?: string };\n}\n\n// Namespace labels come from the extension package's own identity: the\n// package.json `name` nearest the tool's source file, mirroring how pi names\n// npm-installed packages. Raw `source` strings are configured specifiers that\n// are often full relative paths, so they are only used when no manifest exists.\nconst manifestNameCache = new Map<string, string | undefined>();\n\nconst packageNameFromManifest = (startPath: string | undefined): string | undefined => {\n if (!startPath) return undefined;\n let directory = path.dirname(path.resolve(startPath));\n // Every folder the walk passes through resolves to the same answer, so the\n // result is cached for all of them. Caching undefined for a folder below the\n // manifest would make a later lookup that starts there miss the name.\n const visited: string[] = [];\n const settle = (name: string | undefined): string | undefined => {\n for (const folder of visited) manifestNameCache.set(folder, name);\n return name;\n };\n while (true) {\n if (manifestNameCache.has(directory)) return settle(manifestNameCache.get(directory));\n visited.push(directory);\n const manifestPath = path.join(directory, \"package.json\");\n let name: string | undefined;\n if (existsSync(manifestPath)) {\n try {\n const manifest = JSON.parse(readFileSync(manifestPath, \"utf8\")) as { name?: unknown };\n if (typeof manifest.name === \"string\" && manifest.name.trim()) name = manifest.name.trim();\n } catch {\n // Unreadable or invalid manifest; keep walking upward.\n }\n }\n if (name) return settle(name);\n const parent = path.dirname(directory);\n if (parent === directory) return settle(undefined);\n directory = parent;\n }\n};\n\n// In full code mode the model sees only fabric_exec in its tool list, so\n// registered extension tools are invisible unless named up front (#69). The\n// roster stays names-only: descriptions and schemas are on demand through the\n// tools.list/search/describe discovery surface, so the standing prompt cost is\n// a bare name index. Core overrides are excluded: they surface as pi.* via\n// coreOverridePromptGuidance.\nexport const extensionToolRosterGuidance = (\n tools: ReadonlyArray<ExtensionRosterToolSource>,\n coreToolNames: ReadonlySet<string>,\n nativeProfile = false,\n): string | undefined => {\n const extensionTools = tools.filter((tool) => !coreToolNames.has(tool.name));\n if (extensionTools.length === 0) return undefined;\n const namespaceLabel = (tool: ExtensionRosterToolSource): string => {\n const source = tool.sourceInfo?.source?.trim();\n if (source?.startsWith(\"npm:\")) return source.slice(\"npm:\".length) || source;\n const manifestName =\n packageNameFromManifest(tool.sourceInfo?.path) ??\n packageNameFromManifest(source && /[\\\\/]/.test(source) ? source : undefined);\n if (manifestName) return manifestName;\n if (source && !/[\\\\/]/.test(source)) return source;\n const parts = (tool.sourceInfo?.path ?? source ?? \"\").split(/[\\\\/]/).filter(Boolean);\n const base = parts.at(-1)?.trim() ?? \"\";\n // Entry files like index.js name the package directory, not the source.\n if (/^index\\./i.test(base)) return parts.at(-2)?.trim() || base;\n return base || \"extensions\";\n };\n const groups = new Map<string, string[]>();\n for (const tool of [...extensionTools].sort((left, right) => left.name.localeCompare(right.name))) {\n const label = namespaceLabel(tool);\n const names = groups.get(label);\n if (names) names.push(tool.name);\n else groups.set(label, [tool.name]);\n }\n return [\n `Registered extension tools are callable inside fabric_exec as \\`extensions.<name>(args)\\`; run \\`${nativeProfile ? \"fabric.tools\" : \"tools\"}.list\\` for full descriptions and schemas before re-implementing an effect with pi.bash.`,\n ...[...groups.entries()]\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([label, names]) => \"- \" + label + \": \" + names.join(\", \")),\n ].join(\"\\n\");\n};\n\nexport const fabricSchemaGuidance = (mode: \"off\" | \"audit\" | \"enforce\"): string | undefined => {\n if (mode === \"enforce\") {\n return \"Schema enforce mode is fixed for this session. Reads remain available, but protected-workspace changes must use schema.hypothesize \u2192 schema.verify \u2192 schema.commit in the same fabric_exec invocation. Direct pi.edit/write/bash/powershell, agents, state/mesh writes, compaction requests, MCP, extensions, and external providers are blocked by the host gate.\";\n }\n if (mode === \"audit\") {\n return \"Schema audit mode reports actions that enforce mode would block, but preserves their current behavior.\";\n }\n return undefined;\n};\n"],
5
+ "mappings": ";;;;;AACA,SAAS,GAAG,GAAG,MAAM;AAAE,MAAI,OAAO,MAAM,YAAY,CAAC,OAAO,cAAc,CAAC,KAAK,IAAI,EAAG,OAAM,IAAI,WAAW,OAAO,wCAAwC,CAAC;AAAG,SAAO;AAAG;AAElK,IAAM,iBAAkC,uBAAM;AAErD,WAAS,KAAK,QAAQ;AACpB,UAAM,MAAM,CAAC,GAAG,IAAI,CAAC;AACrB,WAAO,EAAC,SAAS,EAAC,eAAe,GAAG,cAAc,GAAG,cAAc,EAAC,GAAG,MAAM,CAAC,EAAC;AAAA,EACjF;AACA,WAAS,KAAK,QAAQ,OAAO,OAAO;AAClC,UAAM,MAAM,EAAC,UAAU,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AAO,EAAE,OAAO,OAAO;AACnF,UAAM,OAAO,MAAM,GAAG,EAAE,GAAG,KAAK,KAAK;AAErC,QAAI,YAAY,KAAK,IAAI,EAAG,QAAO,MAAM,GAAG,EAAE,GAAG,KAAK,KAAK;AAC3D,WAAO,QAAQ;AAAA,EACjB;AACA,QAAM,SAAS,oBAAI,IAAsB;AACzC,aAAW,QAAQ,CAAC,GAAG,cAAc,EAAE,KAAK,CAAC,MAAM,UAAU,KAAK,KAAK,cAAc,MAAM,IAAI,CAAC,GAAG;AACjG,UAAM,QAAQ,eAAe,IAAI;AACjC,UAAM,QAAQ,OAAO,IAAI,KAAK;AAC9B,QAAI,MAAO,OAAM,KAAK,KAAK,IAAI;AAAA,QAC1B,QAAO,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC;AAAA,EACpC;AACA,SAAO;AAAA,IACL,oGAAoG,gBAAgB,iBAAiB,OAAO;AAAA,IAC5I,GAAG,CAAC,GAAG,OAAO,QAAQ,CAAC,EACpB,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,MAAM,KAAK,cAAc,KAAK,CAAC,EACnD,IAAI,CAAC,CAAC,OAAO,KAAK,MAAM,OAAO,QAAQ,OAAO,MAAM,KAAK,IAAI,CAAC;AAAA,EACnE,EAAE,KAAK,IAAI;AACb;AAEO,IAAM,uBAAuB,CAAC,SAA0D;AAC7F,MAAI,SAAS,WAAW;AACtB,WAAO;AAAA,EACT;AACA,MAAI,SAAS,SAAS;AACpB,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  settleWithin,
7
7
  throwIfAborted
8
- } from "../chunks/chunk-7TB7NXSL.js";
8
+ } from "../chunks/chunk-7CIQQOOD.js";
9
9
 
10
10
  // src/core/provider-operations.ts
11
11
  import { randomUUID } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
2
- import type { FabricShellJobStore } from "./shell-jobs.js";
2
+ import { type FabricShellJobStore } from "./shell-jobs.js";
3
3
  export declare const SHELL_MESSAGE_TYPE = "pi-fabric-shell-event";
4
4
  export declare const SHELL_AWARENESS_MESSAGE_TYPE = "pi-fabric-shell-awareness";
5
5
  /** Event-driven delivery to this runtime's owning Pi session, never a global Main. */
@@ -1 +1 @@
1
- {"version":3,"file":"shell-inbox.d.ts","sourceRoot":"","sources":["../../src/core/shell-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4E,YAAY,EAAE,gBAAgB,EAA0C,MAAM,iCAAiC,CAAC;AACxM,OAAO,KAAK,EAA2C,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEpG,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAC1D,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAUxE,sFAAsF;AACtF,qBAAa,eAAe;;IAad,QAAQ,CAAC,EAAE,EAAE,YAAY;IAA6B,QAAQ,CAAC,IAAI,EAAE,mBAAmB;gBAA/E,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAW,IAAI,EAAE,mBAAmB;IA6MpG,KAAK,IAAI,IAAI;CASd"}
1
+ {"version":3,"file":"shell-inbox.d.ts","sourceRoot":"","sources":["../../src/core/shell-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4E,YAAY,EAAE,gBAAgB,EAA0C,MAAM,iCAAiC,CAAC;AACxM,OAAO,EAAsE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG/H,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAC1D,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAUxE,sFAAsF;AACtF,qBAAa,eAAe;;IAad,QAAQ,CAAC,EAAE,EAAE,YAAY;IAA6B,QAAQ,CAAC,IAAI,EAAE,mBAAmB;gBAA/E,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAW,IAAI,EAAE,mBAAmB;IAuNpG,KAAK,IAAI,IAAI;CASd"}
@@ -39,7 +39,7 @@ export declare const formatShellHangNotice: (input: {
39
39
  export declare const appendShellHangNotice: (output: string, notice: string) => string;
40
40
  export declare const parseShellPid: (text: string) => number | undefined;
41
41
  /** Shell tools, plus `fabric_exec` programs moved to the background. */
42
- export type FabricTaskTool = PiShellToolName | "fabric_exec";
42
+ export type FabricTaskTool = PiShellToolName | "fabric_exec" | "monitor";
43
43
  type FabricShellJobStatus = "running" | "spilled" | "exited" | "failed" | "killed" | "timed_out";
44
44
  /** A task whose process is owned by a jev-fabric store, not this Pi process. */
45
45
  export interface FabricDurableTaskInfo {
@@ -59,6 +59,17 @@ export interface FabricShellJobOptions {
59
59
  ownerId?: string;
60
60
  description?: string;
61
61
  monitor?: ShellMonitorOptions;
62
+ /**
63
+ * The caller's own process timeout. When set, a monitor's expiry ends only the
64
+ * watch; the process keeps running until this timeout or its own exit. Without
65
+ * it, the monitor deadline still bounds a watcher command that has no other end.
66
+ */
67
+ processTimeoutMs?: number;
68
+ /** An observer task owns its subscription, never the target process or participant. */
69
+ observes?: {
70
+ kind: "task" | "participant";
71
+ id: string;
72
+ };
62
73
  }
63
74
  export interface FabricShellJobEvent {
64
75
  type: "started" | "spilled" | "monitor" | "finished" | "acknowledged" | "stopping";
@@ -81,6 +92,12 @@ export interface FabricShellJobInfo {
81
92
  description?: string;
82
93
  lastOutputAt?: number;
83
94
  monitor?: ShellMonitorOptions;
95
+ /** When the monitor's watch expired while its process kept running. */
96
+ monitorEndedAt?: number;
97
+ observes?: {
98
+ kind: "task" | "participant";
99
+ id: string;
100
+ };
84
101
  lastEvent?: ShellMonitorBatch & {
85
102
  at: number;
86
103
  };
@@ -133,12 +150,20 @@ declare class FabricShellJob implements FabricShellJobHandle {
133
150
  exitCode?: number | null;
134
151
  status: FabricShellJobStatus;
135
152
  lastOutputAt?: number;
153
+ monitorEndedAt?: number;
136
154
  lastEvent?: ShellMonitorBatch & {
137
155
  at: number;
138
156
  };
139
157
  unread: boolean;
140
158
  get eventCount(): number;
141
159
  constructor(tool: FabricTaskTool, command: string, onChange: (type: FabricShellJobEvent["type"], output?: string) => void, tempRoot: string, options?: FabricShellJobOptions);
160
+ /** Whether a monitor is still watching this task. */
161
+ get monitorActive(): boolean;
162
+ /** Subscribe from now; retained output is available separately through read(). */
163
+ observeOutput(observer: (data: Buffer) => void): () => void;
164
+ flushMonitor(final?: boolean): void;
165
+ /** Structured observer events bypass the optional stdout filter. */
166
+ recordMonitorEvent(batch: ShellMonitorBatch, retain?: boolean, notify?: boolean): void;
142
167
  stop(reason?: string): boolean;
143
168
  /** Pages retained monitor lines after a cursor, disclosing lost positions. */
144
169
  replay(after: number): ShellReplayPage;
@@ -189,6 +214,8 @@ export declare class FabricShellJobStore {
189
214
  killWaiting(): number;
190
215
  close(): Promise<void>;
191
216
  }
217
+ /** An active observer owns notifications; its terminal receipt also deduplicates a racing source completion. */
218
+ export declare function hasWakeObserver(jobs: FabricShellJobStore, kind: "task" | "participant", id: string): boolean;
192
219
  export declare const raceShellHang: <T>(options: {
193
220
  execute: (signal: AbortSignal) => Promise<T>;
194
221
  parentSignal: AbortSignal | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"shell-jobs.d.ts","sourceRoot":"","sources":["../../src/core/shell-jobs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAwC,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5H,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,eAAO,MAAM,g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