omp-fabric 0.85.0

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 (772) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -0
  3. package/THIRD_PARTY_NOTICES.md +33 -0
  4. package/dist/activity/store.d.ts +32 -0
  5. package/dist/activity/store.d.ts.map +1 -0
  6. package/dist/activity/types.d.ts +104 -0
  7. package/dist/activity/types.d.ts.map +1 -0
  8. package/dist/actors/binding-store.d.ts +17 -0
  9. package/dist/actors/binding-store.d.ts.map +1 -0
  10. package/dist/actors/context.d.ts +13 -0
  11. package/dist/actors/context.d.ts.map +1 -0
  12. package/dist/actors/delivery-policy.d.ts +8 -0
  13. package/dist/actors/delivery-policy.d.ts.map +1 -0
  14. package/dist/actors/directory.d.ts +47 -0
  15. package/dist/actors/directory.d.ts.map +1 -0
  16. package/dist/actors/global-registry.d.ts +47 -0
  17. package/dist/actors/global-registry.d.ts.map +1 -0
  18. package/dist/actors/host-event-observer.d.ts +5 -0
  19. package/dist/actors/host-event-observer.d.ts.map +1 -0
  20. package/dist/actors/host-event-payload.d.ts +14 -0
  21. package/dist/actors/host-event-payload.d.ts.map +1 -0
  22. package/dist/actors/manager.d.ts +175 -0
  23. package/dist/actors/manager.d.ts.map +1 -0
  24. package/dist/actors/predicate.d.ts +7 -0
  25. package/dist/actors/predicate.d.ts.map +1 -0
  26. package/dist/actors/types.d.ts +211 -0
  27. package/dist/actors/types.d.ts.map +1 -0
  28. package/dist/agents/bash-worktree-add.d.ts +24 -0
  29. package/dist/agents/bash-worktree-add.d.ts.map +1 -0
  30. package/dist/agents/budget-ledger.d.ts +88 -0
  31. package/dist/agents/budget-ledger.d.ts.map +1 -0
  32. package/dist/agents/claude-cli.d.ts +32 -0
  33. package/dist/agents/claude-cli.d.ts.map +1 -0
  34. package/dist/agents/claude-cli.js +17 -0
  35. package/dist/agents/claude-cli.js.map +7 -0
  36. package/dist/agents/clone-first-worktree.d.ts +17 -0
  37. package/dist/agents/clone-first-worktree.d.ts.map +1 -0
  38. package/dist/agents/compact-control.d.ts +32 -0
  39. package/dist/agents/compact-control.d.ts.map +1 -0
  40. package/dist/agents/compact-control.js +127 -0
  41. package/dist/agents/compact-control.js.map +7 -0
  42. package/dist/agents/constants.d.ts +5 -0
  43. package/dist/agents/constants.d.ts.map +1 -0
  44. package/dist/agents/cow-clone.d.ts +8 -0
  45. package/dist/agents/cow-clone.d.ts.map +1 -0
  46. package/dist/agents/handoff.d.ts +19 -0
  47. package/dist/agents/handoff.d.ts.map +1 -0
  48. package/dist/agents/manager.d.ts +68 -0
  49. package/dist/agents/manager.d.ts.map +1 -0
  50. package/dist/agents/omp-binary.d.ts +7 -0
  51. package/dist/agents/omp-binary.d.ts.map +1 -0
  52. package/dist/agents/rm.d.ts +15 -0
  53. package/dist/agents/rm.d.ts.map +1 -0
  54. package/dist/agents/semaphore.d.ts +7 -0
  55. package/dist/agents/semaphore.d.ts.map +1 -0
  56. package/dist/agents/session-export.d.ts +9 -0
  57. package/dist/agents/session-export.d.ts.map +1 -0
  58. package/dist/agents/thinking-transfer.d.ts +39 -0
  59. package/dist/agents/thinking-transfer.d.ts.map +1 -0
  60. package/dist/agents/transports/herdr-transport.d.ts +10 -0
  61. package/dist/agents/transports/herdr-transport.d.ts.map +1 -0
  62. package/dist/agents/transports/localterm-transport.d.ts +7 -0
  63. package/dist/agents/transports/localterm-transport.d.ts.map +1 -0
  64. package/dist/agents/transports/process-transport.d.ts +7 -0
  65. package/dist/agents/transports/process-transport.d.ts.map +1 -0
  66. package/dist/agents/transports/process-utils.d.ts +29 -0
  67. package/dist/agents/transports/process-utils.d.ts.map +1 -0
  68. package/dist/agents/transports/screen-transport.d.ts +7 -0
  69. package/dist/agents/transports/screen-transport.d.ts.map +1 -0
  70. package/dist/agents/transports/tmux-transport.d.ts +7 -0
  71. package/dist/agents/transports/tmux-transport.d.ts.map +1 -0
  72. package/dist/agents/types.d.ts +251 -0
  73. package/dist/agents/types.d.ts.map +1 -0
  74. package/dist/agents/veda-cli.d.ts +22 -0
  75. package/dist/agents/veda-cli.d.ts.map +1 -0
  76. package/dist/agents/veda-cli.js +13 -0
  77. package/dist/agents/veda-cli.js.map +7 -0
  78. package/dist/agents/worktree-manager.d.ts +14 -0
  79. package/dist/agents/worktree-manager.d.ts.map +1 -0
  80. package/dist/agents/worktree-paths.d.ts +5 -0
  81. package/dist/agents/worktree-paths.d.ts.map +1 -0
  82. package/dist/async-settlement.d.ts +4 -0
  83. package/dist/async-settlement.d.ts.map +1 -0
  84. package/dist/audit/details.d.ts +82 -0
  85. package/dist/audit/details.d.ts.map +1 -0
  86. package/dist/audit/index.d.ts +4 -0
  87. package/dist/audit/index.d.ts.map +1 -0
  88. package/dist/audit/projection.d.ts +20 -0
  89. package/dist/audit/projection.d.ts.map +1 -0
  90. package/dist/audit/trace.d.ts +95 -0
  91. package/dist/audit/trace.d.ts.map +1 -0
  92. package/dist/capture/catalog.d.ts +29 -0
  93. package/dist/capture/catalog.d.ts.map +1 -0
  94. package/dist/capture/interceptor.d.ts +21 -0
  95. package/dist/capture/interceptor.d.ts.map +1 -0
  96. package/dist/capture/wrapper.d.ts +15 -0
  97. package/dist/capture/wrapper.d.ts.map +1 -0
  98. package/dist/chunks/chunk-2GQC324T.js +5001 -0
  99. package/dist/chunks/chunk-2GQC324T.js.map +7 -0
  100. package/dist/chunks/chunk-2KEWFW56.js +1229 -0
  101. package/dist/chunks/chunk-2KEWFW56.js.map +7 -0
  102. package/dist/chunks/chunk-3J7BKUNG.js +354 -0
  103. package/dist/chunks/chunk-3J7BKUNG.js.map +7 -0
  104. package/dist/chunks/chunk-4A4MVZQW.js +253 -0
  105. package/dist/chunks/chunk-4A4MVZQW.js.map +7 -0
  106. package/dist/chunks/chunk-4HQDSTHN.js +221 -0
  107. package/dist/chunks/chunk-4HQDSTHN.js.map +7 -0
  108. package/dist/chunks/chunk-4LEDA76O.js +688 -0
  109. package/dist/chunks/chunk-4LEDA76O.js.map +7 -0
  110. package/dist/chunks/chunk-5GTPD4BA.js +1318 -0
  111. package/dist/chunks/chunk-5GTPD4BA.js.map +7 -0
  112. package/dist/chunks/chunk-5IWFSDU5.js +87 -0
  113. package/dist/chunks/chunk-5IWFSDU5.js.map +7 -0
  114. package/dist/chunks/chunk-6N4XGAZY.js +21 -0
  115. package/dist/chunks/chunk-6N4XGAZY.js.map +7 -0
  116. package/dist/chunks/chunk-6QBPSZJ5.js +647 -0
  117. package/dist/chunks/chunk-6QBPSZJ5.js.map +7 -0
  118. package/dist/chunks/chunk-6X6WUU2K.js +73 -0
  119. package/dist/chunks/chunk-6X6WUU2K.js.map +7 -0
  120. package/dist/chunks/chunk-7363CD5A.js +38 -0
  121. package/dist/chunks/chunk-7363CD5A.js.map +7 -0
  122. package/dist/chunks/chunk-77FQHHZD.js +231 -0
  123. package/dist/chunks/chunk-77FQHHZD.js.map +7 -0
  124. package/dist/chunks/chunk-7BIA5BJN.js +112 -0
  125. package/dist/chunks/chunk-7BIA5BJN.js.map +7 -0
  126. package/dist/chunks/chunk-7BOAOKWH.js +64 -0
  127. package/dist/chunks/chunk-7BOAOKWH.js.map +7 -0
  128. package/dist/chunks/chunk-7TB7NXSL.js +58 -0
  129. package/dist/chunks/chunk-7TB7NXSL.js.map +7 -0
  130. package/dist/chunks/chunk-7VIQNUPS.js +17 -0
  131. package/dist/chunks/chunk-7VIQNUPS.js.map +7 -0
  132. package/dist/chunks/chunk-CT2AJ2UI.js +225 -0
  133. package/dist/chunks/chunk-CT2AJ2UI.js.map +7 -0
  134. package/dist/chunks/chunk-DLXPTBPL.js +151 -0
  135. package/dist/chunks/chunk-DLXPTBPL.js.map +7 -0
  136. package/dist/chunks/chunk-ED3BRM6P.js +17 -0
  137. package/dist/chunks/chunk-ED3BRM6P.js.map +7 -0
  138. package/dist/chunks/chunk-G2IBGGBM.js +42 -0
  139. package/dist/chunks/chunk-G2IBGGBM.js.map +7 -0
  140. package/dist/chunks/chunk-GKOFZ76R.js +1596 -0
  141. package/dist/chunks/chunk-GKOFZ76R.js.map +7 -0
  142. package/dist/chunks/chunk-HDJBUXDX.js +1102 -0
  143. package/dist/chunks/chunk-HDJBUXDX.js.map +7 -0
  144. package/dist/chunks/chunk-IGVDD2HT.js +10 -0
  145. package/dist/chunks/chunk-IGVDD2HT.js.map +7 -0
  146. package/dist/chunks/chunk-JHKOG5GS.js +187 -0
  147. package/dist/chunks/chunk-JHKOG5GS.js.map +7 -0
  148. package/dist/chunks/chunk-JP4LIZFT.js +1334 -0
  149. package/dist/chunks/chunk-JP4LIZFT.js.map +7 -0
  150. package/dist/chunks/chunk-JSBTB3P6.js +127 -0
  151. package/dist/chunks/chunk-JSBTB3P6.js.map +7 -0
  152. package/dist/chunks/chunk-KAD7UWT2.js +99 -0
  153. package/dist/chunks/chunk-KAD7UWT2.js.map +7 -0
  154. package/dist/chunks/chunk-KIH3KLZU.js +95 -0
  155. package/dist/chunks/chunk-KIH3KLZU.js.map +7 -0
  156. package/dist/chunks/chunk-KIREBD2V.js +2208 -0
  157. package/dist/chunks/chunk-KIREBD2V.js.map +7 -0
  158. package/dist/chunks/chunk-LMAVZN7J.js +8 -0
  159. package/dist/chunks/chunk-LMAVZN7J.js.map +7 -0
  160. package/dist/chunks/chunk-NCPJZXLM.js +57 -0
  161. package/dist/chunks/chunk-NCPJZXLM.js.map +7 -0
  162. package/dist/chunks/chunk-OJZNMROB.js +195 -0
  163. package/dist/chunks/chunk-OJZNMROB.js.map +7 -0
  164. package/dist/chunks/chunk-OPTP4PSE.js +469 -0
  165. package/dist/chunks/chunk-OPTP4PSE.js.map +7 -0
  166. package/dist/chunks/chunk-QPXSCMTG.js +24 -0
  167. package/dist/chunks/chunk-QPXSCMTG.js.map +7 -0
  168. package/dist/chunks/chunk-ROKMBLGN.js +1265 -0
  169. package/dist/chunks/chunk-ROKMBLGN.js.map +7 -0
  170. package/dist/chunks/chunk-SXMWV447.js +2445 -0
  171. package/dist/chunks/chunk-SXMWV447.js.map +7 -0
  172. package/dist/chunks/chunk-T5ZA5YRU.js +786 -0
  173. package/dist/chunks/chunk-T5ZA5YRU.js.map +7 -0
  174. package/dist/chunks/chunk-T6OAX4FO.js +1835 -0
  175. package/dist/chunks/chunk-T6OAX4FO.js.map +7 -0
  176. package/dist/chunks/chunk-U5FYOMG5.js +119 -0
  177. package/dist/chunks/chunk-U5FYOMG5.js.map +7 -0
  178. package/dist/chunks/chunk-UOSJZXJV.js +142 -0
  179. package/dist/chunks/chunk-UOSJZXJV.js.map +7 -0
  180. package/dist/chunks/chunk-UPCARIJP.js +6627 -0
  181. package/dist/chunks/chunk-UPCARIJP.js.map +7 -0
  182. package/dist/chunks/chunk-VPPIJRNZ.js +50 -0
  183. package/dist/chunks/chunk-VPPIJRNZ.js.map +7 -0
  184. package/dist/chunks/chunk-XU5Z4JCQ.js +297 -0
  185. package/dist/chunks/chunk-XU5Z4JCQ.js.map +7 -0
  186. package/dist/chunks/chunk-YWEXP724.js +427 -0
  187. package/dist/chunks/chunk-YWEXP724.js.map +7 -0
  188. package/dist/chunks/chunk-YZZIKJX6.js +60 -0
  189. package/dist/chunks/chunk-YZZIKJX6.js.map +7 -0
  190. package/dist/chunks/chunk-ZNAJDPT7.js +2203 -0
  191. package/dist/chunks/chunk-ZNAJDPT7.js.map +7 -0
  192. package/dist/chunks/chunk-ZTM45GH5.js +163 -0
  193. package/dist/chunks/chunk-ZTM45GH5.js.map +7 -0
  194. package/dist/commands/fabric.d.ts +17 -0
  195. package/dist/commands/fabric.d.ts.map +1 -0
  196. package/dist/compaction/bounds.d.ts +23 -0
  197. package/dist/compaction/bounds.d.ts.map +1 -0
  198. package/dist/compaction/branch-details.d.ts +83 -0
  199. package/dist/compaction/branch-details.d.ts.map +1 -0
  200. package/dist/compaction/branch-summary.d.ts +9 -0
  201. package/dist/compaction/branch-summary.d.ts.map +1 -0
  202. package/dist/compaction/enrichers.d.ts +10 -0
  203. package/dist/compaction/enrichers.d.ts.map +1 -0
  204. package/dist/compaction/hook.d.ts +98 -0
  205. package/dist/compaction/hook.d.ts.map +1 -0
  206. package/dist/compaction/hook.js +19 -0
  207. package/dist/compaction/hook.js.map +7 -0
  208. package/dist/compaction/instructions.d.ts +38 -0
  209. package/dist/compaction/instructions.d.ts.map +1 -0
  210. package/dist/compaction/normalize.d.ts +83 -0
  211. package/dist/compaction/normalize.d.ts.map +1 -0
  212. package/dist/compaction/projections.d.ts +31 -0
  213. package/dist/compaction/projections.d.ts.map +1 -0
  214. package/dist/compaction/qa.d.ts +27 -0
  215. package/dist/compaction/qa.d.ts.map +1 -0
  216. package/dist/compaction/render.d.ts +10 -0
  217. package/dist/compaction/render.d.ts.map +1 -0
  218. package/dist/compaction/threshold.d.ts +5 -0
  219. package/dist/compaction/threshold.d.ts.map +1 -0
  220. package/dist/compaction/trace-events.d.ts +23 -0
  221. package/dist/compaction/trace-events.d.ts.map +1 -0
  222. package/dist/components/catalog.d.ts +25 -0
  223. package/dist/components/catalog.d.ts.map +1 -0
  224. package/dist/components/effect-scope.d.ts +31 -0
  225. package/dist/components/effect-scope.d.ts.map +1 -0
  226. package/dist/components/loader.d.ts +27 -0
  227. package/dist/components/loader.d.ts.map +1 -0
  228. package/dist/components/model-guidance.d.ts +48 -0
  229. package/dist/components/model-guidance.d.ts.map +1 -0
  230. package/dist/components/provider-component.d.ts +31 -0
  231. package/dist/components/provider-component.d.ts.map +1 -0
  232. package/dist/components/supervisor.d.ts +29 -0
  233. package/dist/components/supervisor.d.ts.map +1 -0
  234. package/dist/components/types.d.ts +140 -0
  235. package/dist/components/types.d.ts.map +1 -0
  236. package/dist/config-migrations.d.ts +11 -0
  237. package/dist/config-migrations.d.ts.map +1 -0
  238. package/dist/config.d.ts +269 -0
  239. package/dist/config.d.ts.map +1 -0
  240. package/dist/core/action-registry.d.ts +159 -0
  241. package/dist/core/action-registry.d.ts.map +1 -0
  242. package/dist/core/action-registry.js +17 -0
  243. package/dist/core/action-registry.js.map +7 -0
  244. package/dist/core/action-repair.d.ts +20 -0
  245. package/dist/core/action-repair.d.ts.map +1 -0
  246. package/dist/core/agent-dir.d.ts +2 -0
  247. package/dist/core/agent-dir.d.ts.map +1 -0
  248. package/dist/core/approval-controller.d.ts +30 -0
  249. package/dist/core/approval-controller.d.ts.map +1 -0
  250. package/dist/core/atomic-write.d.ts +15 -0
  251. package/dist/core/atomic-write.d.ts.map +1 -0
  252. package/dist/core/auto-approval-classifier.d.ts +13 -0
  253. package/dist/core/auto-approval-classifier.d.ts.map +1 -0
  254. package/dist/core/call-preview.d.ts +8 -0
  255. package/dist/core/call-preview.d.ts.map +1 -0
  256. package/dist/core/child-tool-allowlist.d.ts +3 -0
  257. package/dist/core/child-tool-allowlist.d.ts.map +1 -0
  258. package/dist/core/compact-controller.d.ts +42 -0
  259. package/dist/core/compact-controller.d.ts.map +1 -0
  260. package/dist/core/core-override-guidance.d.ts +7 -0
  261. package/dist/core/core-override-guidance.d.ts.map +1 -0
  262. package/dist/core/direct-tool-approval.d.ts +19 -0
  263. package/dist/core/direct-tool-approval.d.ts.map +1 -0
  264. package/dist/core/effect-conflict.d.ts +3 -0
  265. package/dist/core/effect-conflict.d.ts.map +1 -0
  266. package/dist/core/file-lock.d.ts +12 -0
  267. package/dist/core/file-lock.d.ts.map +1 -0
  268. package/dist/core/model-resolution.d.ts +62 -0
  269. package/dist/core/model-resolution.d.ts.map +1 -0
  270. package/dist/core/model-usage.d.ts +8 -0
  271. package/dist/core/model-usage.d.ts.map +1 -0
  272. package/dist/core/omp-bash-error.d.ts +11 -0
  273. package/dist/core/omp-bash-error.d.ts.map +1 -0
  274. package/dist/core/omp-tools.d.ts +9 -0
  275. package/dist/core/omp-tools.d.ts.map +1 -0
  276. package/dist/core/provider-bindings.d.ts +47 -0
  277. package/dist/core/provider-bindings.d.ts.map +1 -0
  278. package/dist/core/proxy-contract.d.ts +18 -0
  279. package/dist/core/proxy-contract.d.ts.map +1 -0
  280. package/dist/core/session-context.d.ts +6 -0
  281. package/dist/core/session-context.d.ts.map +1 -0
  282. package/dist/core/skill-block.d.ts +10 -0
  283. package/dist/core/skill-block.d.ts.map +1 -0
  284. package/dist/core/skill-dir.d.ts +4 -0
  285. package/dist/core/skill-dir.d.ts.map +1 -0
  286. package/dist/core/skill-prompt.d.ts +3 -0
  287. package/dist/core/skill-prompt.d.ts.map +1 -0
  288. package/dist/core/skill-references.d.ts +7 -0
  289. package/dist/core/skill-references.d.ts.map +1 -0
  290. package/dist/core/stable-hash.d.ts +3 -0
  291. package/dist/core/stable-hash.d.ts.map +1 -0
  292. package/dist/core/system-guidance.d.ts +12 -0
  293. package/dist/core/system-guidance.d.ts.map +1 -0
  294. package/dist/core/token-math.d.ts +16 -0
  295. package/dist/core/token-math.d.ts.map +1 -0
  296. package/dist/core/tool-ownership.d.ts +52 -0
  297. package/dist/core/tool-ownership.d.ts.map +1 -0
  298. package/dist/core/tool-result-proxy.d.ts +18 -0
  299. package/dist/core/tool-result-proxy.d.ts.map +1 -0
  300. package/dist/entropy/active.d.ts +7 -0
  301. package/dist/entropy/active.d.ts.map +1 -0
  302. package/dist/entropy/compiled-store.d.ts +16 -0
  303. package/dist/entropy/compiled-store.d.ts.map +1 -0
  304. package/dist/entropy/compiled-surface.d.ts +51 -0
  305. package/dist/entropy/compiled-surface.d.ts.map +1 -0
  306. package/dist/entropy/compiler.d.ts +28 -0
  307. package/dist/entropy/compiler.d.ts.map +1 -0
  308. package/dist/entropy/corpus.d.ts +22 -0
  309. package/dist/entropy/corpus.d.ts.map +1 -0
  310. package/dist/entropy/fingerprint.d.ts +9 -0
  311. package/dist/entropy/fingerprint.d.ts.map +1 -0
  312. package/dist/entropy/index.d.ts +15 -0
  313. package/dist/entropy/index.d.ts.map +1 -0
  314. package/dist/entropy/index.js +172 -0
  315. package/dist/entropy/index.js.map +7 -0
  316. package/dist/entropy/meter.d.ts +10 -0
  317. package/dist/entropy/meter.d.ts.map +1 -0
  318. package/dist/entropy/passes.d.ts +13 -0
  319. package/dist/entropy/passes.d.ts.map +1 -0
  320. package/dist/entropy/pool-store.d.ts +15 -0
  321. package/dist/entropy/pool-store.d.ts.map +1 -0
  322. package/dist/entropy/pool.d.ts +41 -0
  323. package/dist/entropy/pool.d.ts.map +1 -0
  324. package/dist/entropy/presentation.d.ts +13 -0
  325. package/dist/entropy/presentation.d.ts.map +1 -0
  326. package/dist/entropy/sessions.d.ts +47 -0
  327. package/dist/entropy/sessions.d.ts.map +1 -0
  328. package/dist/entropy/surface.d.ts +30 -0
  329. package/dist/entropy/surface.d.ts.map +1 -0
  330. package/dist/entropy/trial.d.ts +35 -0
  331. package/dist/entropy/trial.d.ts.map +1 -0
  332. package/dist/entropy/types.d.ts +158 -0
  333. package/dist/entropy/types.d.ts.map +1 -0
  334. package/dist/execution-service.d.ts +63 -0
  335. package/dist/execution-service.d.ts.map +1 -0
  336. package/dist/fabric-exec-arguments.d.ts +5 -0
  337. package/dist/fabric-exec-arguments.d.ts.map +1 -0
  338. package/dist/fabric-exec-tool.d.ts +8 -0
  339. package/dist/fabric-exec-tool.d.ts.map +1 -0
  340. package/dist/fabric-runtime-state.d.ts +90 -0
  341. package/dist/fabric-runtime-state.d.ts.map +1 -0
  342. package/dist/fabric-runtime-state.js +13060 -0
  343. package/dist/fabric-runtime-state.js.map +7 -0
  344. package/dist/fabric-state.d.ts +89 -0
  345. package/dist/fabric-state.d.ts.map +1 -0
  346. package/dist/failure-progress.d.ts +3 -0
  347. package/dist/failure-progress.d.ts.map +1 -0
  348. package/dist/host-compatibility.d.ts +5 -0
  349. package/dist/host-compatibility.d.ts.map +1 -0
  350. package/dist/index.d.ts +6 -0
  351. package/dist/index.d.ts.map +1 -0
  352. package/dist/index.js +5719 -0
  353. package/dist/index.js.map +7 -0
  354. package/dist/lifecycle/broker.d.ts +30 -0
  355. package/dist/lifecycle/broker.d.ts.map +1 -0
  356. package/dist/lifecycle/delivery-scheduler.d.ts +30 -0
  357. package/dist/lifecycle/delivery-scheduler.d.ts.map +1 -0
  358. package/dist/lifecycle/types.d.ts +91 -0
  359. package/dist/lifecycle/types.d.ts.map +1 -0
  360. package/dist/log-tail.d.ts +11 -0
  361. package/dist/log-tail.d.ts.map +1 -0
  362. package/dist/main-agent.d.ts +70 -0
  363. package/dist/main-agent.d.ts.map +1 -0
  364. package/dist/memory/context.d.ts +112 -0
  365. package/dist/memory/context.d.ts.map +1 -0
  366. package/dist/memory/digest.d.ts +48 -0
  367. package/dist/memory/digest.d.ts.map +1 -0
  368. package/dist/memory/digest.js +7 -0
  369. package/dist/memory/digest.js.map +7 -0
  370. package/dist/memory/discovery.d.ts +43 -0
  371. package/dist/memory/discovery.d.ts.map +1 -0
  372. package/dist/memory/discovery.js +23 -0
  373. package/dist/memory/discovery.js.map +7 -0
  374. package/dist/memory/index.d.ts +107 -0
  375. package/dist/memory/index.d.ts.map +1 -0
  376. package/dist/memory/lineage.d.ts +20 -0
  377. package/dist/memory/lineage.d.ts.map +1 -0
  378. package/dist/memory/normalize.d.ts +170 -0
  379. package/dist/memory/normalize.d.ts.map +1 -0
  380. package/dist/memory/normalize.js +22 -0
  381. package/dist/memory/normalize.js.map +7 -0
  382. package/dist/memory/regex.d.ts +19 -0
  383. package/dist/memory/regex.d.ts.map +1 -0
  384. package/dist/memory/search.d.ts +98 -0
  385. package/dist/memory/search.d.ts.map +1 -0
  386. package/dist/memory/search.js +22 -0
  387. package/dist/memory/search.js.map +7 -0
  388. package/dist/memory/tokenize.d.ts +24 -0
  389. package/dist/memory/tokenize.d.ts.map +1 -0
  390. package/dist/mesh/store.d.ts +78 -0
  391. package/dist/mesh/store.d.ts.map +1 -0
  392. package/dist/output-budget.d.ts +12 -0
  393. package/dist/output-budget.d.ts.map +1 -0
  394. package/dist/prewalk/arm.d.ts +8 -0
  395. package/dist/prewalk/arm.d.ts.map +1 -0
  396. package/dist/prewalk/controller.d.ts +60 -0
  397. package/dist/prewalk/controller.d.ts.map +1 -0
  398. package/dist/prewalk/fs-drift.d.ts +19 -0
  399. package/dist/prewalk/fs-drift.d.ts.map +1 -0
  400. package/dist/prewalk/handoff.d.ts +45 -0
  401. package/dist/prewalk/handoff.d.ts.map +1 -0
  402. package/dist/protocol.d.ts +273 -0
  403. package/dist/protocol.d.ts.map +1 -0
  404. package/dist/protocol.js +46 -0
  405. package/dist/protocol.js.map +7 -0
  406. package/dist/providers/agents-actions.d.ts +3 -0
  407. package/dist/providers/agents-actions.d.ts.map +1 -0
  408. package/dist/providers/agents-provider.d.ts +59 -0
  409. package/dist/providers/agents-provider.d.ts.map +1 -0
  410. package/dist/providers/arg-normalization.d.ts +15 -0
  411. package/dist/providers/arg-normalization.d.ts.map +1 -0
  412. package/dist/providers/captured-tools-provider.d.ts +23 -0
  413. package/dist/providers/captured-tools-provider.d.ts.map +1 -0
  414. package/dist/providers/compact-provider.d.ts +14 -0
  415. package/dist/providers/compact-provider.d.ts.map +1 -0
  416. package/dist/providers/components-provider.d.ts +12 -0
  417. package/dist/providers/components-provider.d.ts.map +1 -0
  418. package/dist/providers/mcp-descriptor-cache.d.ts +47 -0
  419. package/dist/providers/mcp-descriptor-cache.d.ts.map +1 -0
  420. package/dist/providers/mcp-provider.d.ts +27 -0
  421. package/dist/providers/mcp-provider.d.ts.map +1 -0
  422. package/dist/providers/memory-provider.d.ts +35 -0
  423. package/dist/providers/memory-provider.d.ts.map +1 -0
  424. package/dist/providers/memory-provider.js +16 -0
  425. package/dist/providers/memory-provider.js.map +7 -0
  426. package/dist/providers/mesh-provider.d.ts +17 -0
  427. package/dist/providers/mesh-provider.d.ts.map +1 -0
  428. package/dist/providers/omp-bash-cwd.d.ts +31 -0
  429. package/dist/providers/omp-bash-cwd.d.ts.map +1 -0
  430. package/dist/providers/omp-tools-provider.d.ts +15 -0
  431. package/dist/providers/omp-tools-provider.d.ts.map +1 -0
  432. package/dist/providers/schema-provider.d.ts +15 -0
  433. package/dist/providers/schema-provider.d.ts.map +1 -0
  434. package/dist/providers/state-provider.d.ts +16 -0
  435. package/dist/providers/state-provider.d.ts.map +1 -0
  436. package/dist/providers/write-diff-limits.d.ts +5 -0
  437. package/dist/providers/write-diff-limits.d.ts.map +1 -0
  438. package/dist/providers/write-preview.d.ts +3 -0
  439. package/dist/providers/write-preview.d.ts.map +1 -0
  440. package/dist/ref-names.d.ts +2 -0
  441. package/dist/ref-names.d.ts.map +1 -0
  442. package/dist/repairs/active.d.ts +7 -0
  443. package/dist/repairs/active.d.ts.map +1 -0
  444. package/dist/repairs/apply.d.ts +7 -0
  445. package/dist/repairs/apply.d.ts.map +1 -0
  446. package/dist/repairs/catalog-digest.d.ts +5 -0
  447. package/dist/repairs/catalog-digest.d.ts.map +1 -0
  448. package/dist/repairs/classify.d.ts +10 -0
  449. package/dist/repairs/classify.d.ts.map +1 -0
  450. package/dist/repairs/compiler.d.ts +33 -0
  451. package/dist/repairs/compiler.d.ts.map +1 -0
  452. package/dist/repairs/promote.d.ts +4 -0
  453. package/dist/repairs/promote.d.ts.map +1 -0
  454. package/dist/repairs/store.d.ts +10 -0
  455. package/dist/repairs/store.d.ts.map +1 -0
  456. package/dist/repairs/types.d.ts +49 -0
  457. package/dist/repairs/types.d.ts.map +1 -0
  458. package/dist/residency/actor-client.d.ts +16 -0
  459. package/dist/residency/actor-client.d.ts.map +1 -0
  460. package/dist/residency/actor-client.js +9 -0
  461. package/dist/residency/actor-client.js.map +7 -0
  462. package/dist/residency/client.d.ts +44 -0
  463. package/dist/residency/client.d.ts.map +1 -0
  464. package/dist/residency/host.d.ts +3 -0
  465. package/dist/residency/host.d.ts.map +1 -0
  466. package/dist/residency/host.js +25 -0
  467. package/dist/residency/host.js.map +7 -0
  468. package/dist/residency/launcher-owner.d.ts +7 -0
  469. package/dist/residency/launcher-owner.d.ts.map +1 -0
  470. package/dist/residency/launcher.d.ts +3 -0
  471. package/dist/residency/launcher.d.ts.map +1 -0
  472. package/dist/residency/launcher.js +152 -0
  473. package/dist/residency/launcher.js.map +7 -0
  474. package/dist/residency/omp-entry.d.ts +3 -0
  475. package/dist/residency/omp-entry.d.ts.map +1 -0
  476. package/dist/residency/omp-entry.js +41 -0
  477. package/dist/residency/omp-entry.js.map +7 -0
  478. package/dist/residency/protocol.d.ts +119 -0
  479. package/dist/residency/protocol.d.ts.map +1 -0
  480. package/dist/run-display.d.ts +3 -0
  481. package/dist/run-display.d.ts.map +1 -0
  482. package/dist/runtime/core-override-guest-types.d.ts +15 -0
  483. package/dist/runtime/core-override-guest-types.d.ts.map +1 -0
  484. package/dist/runtime/core-override-guest-types.js +291 -0
  485. package/dist/runtime/core-override-guest-types.js.map +7 -0
  486. package/dist/runtime/core-tool-properties.d.ts +6 -0
  487. package/dist/runtime/core-tool-properties.d.ts.map +1 -0
  488. package/dist/runtime/dynamic-guest-types.d.ts +3 -0
  489. package/dist/runtime/dynamic-guest-types.d.ts.map +1 -0
  490. package/dist/runtime/dynamic-guest-types.js +226 -0
  491. package/dist/runtime/dynamic-guest-types.js.map +7 -0
  492. package/dist/runtime/guest-code-repair.d.ts +2 -0
  493. package/dist/runtime/guest-code-repair.d.ts.map +1 -0
  494. package/dist/runtime/guest-stack-map.d.ts +11 -0
  495. package/dist/runtime/guest-stack-map.d.ts.map +1 -0
  496. package/dist/runtime/guest-types.d.ts +35 -0
  497. package/dist/runtime/guest-types.d.ts.map +1 -0
  498. package/dist/runtime/guest-types.js +13 -0
  499. package/dist/runtime/guest-types.js.map +7 -0
  500. package/dist/runtime/node-process-child-source.d.ts +2 -0
  501. package/dist/runtime/node-process-child-source.d.ts.map +1 -0
  502. package/dist/runtime/node-process-runtime.d.ts +10 -0
  503. package/dist/runtime/node-process-runtime.d.ts.map +1 -0
  504. package/dist/runtime/node-process-runtime.js +319 -0
  505. package/dist/runtime/node-process-runtime.js.map +7 -0
  506. package/dist/runtime/orchestration.d.ts +3 -0
  507. package/dist/runtime/orchestration.d.ts.map +1 -0
  508. package/dist/runtime/quickjs-runtime.d.ts +24 -0
  509. package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
  510. package/dist/runtime/quickjs-runtime.js +12 -0
  511. package/dist/runtime/quickjs-runtime.js.map +7 -0
  512. package/dist/runtime/type-checker.d.ts +21 -0
  513. package/dist/runtime/type-checker.d.ts.map +1 -0
  514. package/dist/runtime/type-checker.js +15 -0
  515. package/dist/runtime/type-checker.js.map +7 -0
  516. package/dist/runtime-paths.d.ts +7 -0
  517. package/dist/runtime-paths.d.ts.map +1 -0
  518. package/dist/schema/controller.d.ts +35 -0
  519. package/dist/schema/controller.d.ts.map +1 -0
  520. package/dist/schema/types.d.ts +86 -0
  521. package/dist/schema/types.d.ts.map +1 -0
  522. package/dist/schema/workspace.d.ts +19 -0
  523. package/dist/schema/workspace.d.ts.map +1 -0
  524. package/dist/speculation/eligibility.d.ts +22 -0
  525. package/dist/speculation/eligibility.d.ts.map +1 -0
  526. package/dist/speculation/freshness.d.ts +10 -0
  527. package/dist/speculation/freshness.d.ts.map +1 -0
  528. package/dist/speculation/partial-json.d.ts +9 -0
  529. package/dist/speculation/partial-json.d.ts.map +1 -0
  530. package/dist/speculation/scanner.d.ts +13 -0
  531. package/dist/speculation/scanner.d.ts.map +1 -0
  532. package/dist/speculation/scanner.js +182 -0
  533. package/dist/speculation/scanner.js.map +7 -0
  534. package/dist/speculation/store.d.ts +39 -0
  535. package/dist/speculation/store.d.ts.map +1 -0
  536. package/dist/speculation/stream-tap.d.ts +27 -0
  537. package/dist/speculation/stream-tap.d.ts.map +1 -0
  538. package/dist/speculation/types.d.ts +44 -0
  539. package/dist/speculation/types.d.ts.map +1 -0
  540. package/dist/state/complexity.d.ts +13 -0
  541. package/dist/state/complexity.d.ts.map +1 -0
  542. package/dist/state/evidence-runner.d.ts +17 -0
  543. package/dist/state/evidence-runner.d.ts.map +1 -0
  544. package/dist/state/store.d.ts +76 -0
  545. package/dist/state/store.d.ts.map +1 -0
  546. package/dist/state/types.d.ts +165 -0
  547. package/dist/state/types.d.ts.map +1 -0
  548. package/dist/storage/retention.d.ts +22 -0
  549. package/dist/storage/retention.d.ts.map +1 -0
  550. package/dist/thinking.d.ts +19 -0
  551. package/dist/thinking.d.ts.map +1 -0
  552. package/dist/topology/control-plane.d.ts +58 -0
  553. package/dist/topology/control-plane.d.ts.map +1 -0
  554. package/dist/topology/participant-directory.d.ts +33 -0
  555. package/dist/topology/participant-directory.d.ts.map +1 -0
  556. package/dist/topology/peer-settle.d.ts +51 -0
  557. package/dist/topology/peer-settle.d.ts.map +1 -0
  558. package/dist/topology/records.d.ts +6 -0
  559. package/dist/topology/records.d.ts.map +1 -0
  560. package/dist/topology/types.d.ts +89 -0
  561. package/dist/topology/types.d.ts.map +1 -0
  562. package/dist/type-error-guidance.d.ts +3 -0
  563. package/dist/type-error-guidance.d.ts.map +1 -0
  564. package/dist/ui/arc-group.d.ts +17 -0
  565. package/dist/ui/arc-group.d.ts.map +1 -0
  566. package/dist/ui/code-preview-shell.d.ts +26 -0
  567. package/dist/ui/code-preview-shell.d.ts.map +1 -0
  568. package/dist/ui/code-preview.d.ts +53 -0
  569. package/dist/ui/code-preview.d.ts.map +1 -0
  570. package/dist/ui/controller.d.ts +20 -0
  571. package/dist/ui/controller.d.ts.map +1 -0
  572. package/dist/ui/conversation-chrome.d.ts +15 -0
  573. package/dist/ui/conversation-chrome.d.ts.map +1 -0
  574. package/dist/ui/conversation-chrome.js +10 -0
  575. package/dist/ui/conversation-chrome.js.map +7 -0
  576. package/dist/ui/conversation-native-reader.d.ts +106 -0
  577. package/dist/ui/conversation-native-reader.d.ts.map +1 -0
  578. package/dist/ui/conversation-native-reader.js +784 -0
  579. package/dist/ui/conversation-native-reader.js.map +7 -0
  580. package/dist/ui/conversation-queue-store.d.ts +12 -0
  581. package/dist/ui/conversation-queue-store.d.ts.map +1 -0
  582. package/dist/ui/conversation-queue.d.ts +242 -0
  583. package/dist/ui/conversation-queue.d.ts.map +1 -0
  584. package/dist/ui/conversation-render.d.ts +45 -0
  585. package/dist/ui/conversation-render.d.ts.map +1 -0
  586. package/dist/ui/conversation-shortcut.d.ts +3 -0
  587. package/dist/ui/conversation-shortcut.d.ts.map +1 -0
  588. package/dist/ui/conversation-targets.d.ts +7 -0
  589. package/dist/ui/conversation-targets.d.ts.map +1 -0
  590. package/dist/ui/conversation-targets.js +12 -0
  591. package/dist/ui/conversation-targets.js.map +7 -0
  592. package/dist/ui/conversation-transcript.d.ts +25 -0
  593. package/dist/ui/conversation-transcript.d.ts.map +1 -0
  594. package/dist/ui/conversation.d.ts +170 -0
  595. package/dist/ui/conversation.d.ts.map +1 -0
  596. package/dist/ui/conversation.js +1868 -0
  597. package/dist/ui/conversation.js.map +7 -0
  598. package/dist/ui/core-tool-render.d.ts +20 -0
  599. package/dist/ui/core-tool-render.d.ts.map +1 -0
  600. package/dist/ui/dashboard-detail.d.ts +68 -0
  601. package/dist/ui/dashboard-detail.d.ts.map +1 -0
  602. package/dist/ui/dashboard-fabric-graph.d.ts +50 -0
  603. package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -0
  604. package/dist/ui/dashboard-model.d.ts +111 -0
  605. package/dist/ui/dashboard-model.d.ts.map +1 -0
  606. package/dist/ui/dashboard-presentation.d.ts +6 -0
  607. package/dist/ui/dashboard-presentation.d.ts.map +1 -0
  608. package/dist/ui/dashboard.d.ts +188 -0
  609. package/dist/ui/dashboard.d.ts.map +1 -0
  610. package/dist/ui/dashboard.js +4604 -0
  611. package/dist/ui/dashboard.js.map +7 -0
  612. package/dist/ui/diff-background.d.ts +12 -0
  613. package/dist/ui/diff-background.d.ts.map +1 -0
  614. package/dist/ui/dynamic-border.d.ts +8 -0
  615. package/dist/ui/dynamic-border.d.ts.map +1 -0
  616. package/dist/ui/escape-halt.d.ts +11 -0
  617. package/dist/ui/escape-halt.d.ts.map +1 -0
  618. package/dist/ui/fabric-actor-delivery-selector.d.ts +17 -0
  619. package/dist/ui/fabric-actor-delivery-selector.d.ts.map +1 -0
  620. package/dist/ui/fabric-actor-tool-selector.d.ts +22 -0
  621. package/dist/ui/fabric-actor-tool-selector.d.ts.map +1 -0
  622. package/dist/ui/fabric-code-parser.d.ts +8 -0
  623. package/dist/ui/fabric-code-parser.d.ts.map +1 -0
  624. package/dist/ui/fabric-host-event-selector.d.ts +29 -0
  625. package/dist/ui/fabric-host-event-selector.d.ts.map +1 -0
  626. package/dist/ui/fabric-model-selector.d.ts +64 -0
  627. package/dist/ui/fabric-model-selector.d.ts.map +1 -0
  628. package/dist/ui/fabric-render.d.ts +113 -0
  629. package/dist/ui/fabric-render.d.ts.map +1 -0
  630. package/dist/ui/fabric-thinking-selector.d.ts +26 -0
  631. package/dist/ui/fabric-thinking-selector.d.ts.map +1 -0
  632. package/dist/ui/fabric-title-hint.d.ts +2 -0
  633. package/dist/ui/fabric-title-hint.d.ts.map +1 -0
  634. package/dist/ui/format.d.ts +9 -0
  635. package/dist/ui/format.d.ts.map +1 -0
  636. package/dist/ui/highlight.d.ts +69 -0
  637. package/dist/ui/highlight.d.ts.map +1 -0
  638. package/dist/ui/model-picker.d.ts +46 -0
  639. package/dist/ui/model-picker.d.ts.map +1 -0
  640. package/dist/ui/model-picker.js +17 -0
  641. package/dist/ui/model-picker.js.map +7 -0
  642. package/dist/ui/preview-lines.d.ts +16 -0
  643. package/dist/ui/preview-lines.d.ts.map +1 -0
  644. package/dist/ui/row-balance.d.ts +29 -0
  645. package/dist/ui/row-balance.d.ts.map +1 -0
  646. package/dist/ui/settings.d.ts +57 -0
  647. package/dist/ui/settings.d.ts.map +1 -0
  648. package/dist/ui/settings.js +1908 -0
  649. package/dist/ui/settings.js.map +7 -0
  650. package/dist/ui/shiki-language.d.ts +7 -0
  651. package/dist/ui/shiki-language.d.ts.map +1 -0
  652. package/dist/ui/shiki-theme.d.ts +7 -0
  653. package/dist/ui/shiki-theme.d.ts.map +1 -0
  654. package/dist/ui/snapshot.d.ts +7 -0
  655. package/dist/ui/snapshot.d.ts.map +1 -0
  656. package/dist/ui/spinner.d.ts +6 -0
  657. package/dist/ui/spinner.d.ts.map +1 -0
  658. package/dist/ui/state-file-preview.d.ts +13 -0
  659. package/dist/ui/state-file-preview.d.ts.map +1 -0
  660. package/dist/ui/structured.d.ts +9 -0
  661. package/dist/ui/structured.d.ts.map +1 -0
  662. package/dist/ui/symbol-theme.d.ts +3 -0
  663. package/dist/ui/symbol-theme.d.ts.map +1 -0
  664. package/dist/ui/tool-call-timing.d.ts +2 -0
  665. package/dist/ui/tool-call-timing.d.ts.map +1 -0
  666. package/dist/ui/tool-display.d.ts +8 -0
  667. package/dist/ui/tool-display.d.ts.map +1 -0
  668. package/dist/ui/topology.d.ts +162 -0
  669. package/dist/ui/topology.d.ts.map +1 -0
  670. package/dist/ui/transcript-parser.d.ts +18 -0
  671. package/dist/ui/transcript-parser.d.ts.map +1 -0
  672. package/dist/ui/transcript-reader.d.ts +10 -0
  673. package/dist/ui/transcript-reader.d.ts.map +1 -0
  674. package/dist/ui/transcript-sanitization.d.ts +14 -0
  675. package/dist/ui/transcript-sanitization.d.ts.map +1 -0
  676. package/dist/ui/transcript.d.ts +52 -0
  677. package/dist/ui/transcript.d.ts.map +1 -0
  678. package/dist/ui/types.d.ts +84 -0
  679. package/dist/ui/types.d.ts.map +1 -0
  680. package/dist/ui/widget.d.ts +16 -0
  681. package/dist/ui/widget.d.ts.map +1 -0
  682. package/dist/ui/word-diff/alignment.d.ts +6 -0
  683. package/dist/ui/word-diff/alignment.d.ts.map +1 -0
  684. package/dist/ui/word-diff/change-block.d.ts +18 -0
  685. package/dist/ui/word-diff/change-block.d.ts.map +1 -0
  686. package/dist/ui/word-diff/changed-line.d.ts +14 -0
  687. package/dist/ui/word-diff/changed-line.d.ts.map +1 -0
  688. package/dist/ui/word-diff/emphasis.d.ts +9 -0
  689. package/dist/ui/word-diff/emphasis.d.ts.map +1 -0
  690. package/dist/ui/word-diff/line-emphasis.d.ts +7 -0
  691. package/dist/ui/word-diff/line-emphasis.d.ts.map +1 -0
  692. package/dist/ui/word-diff/line-matching.d.ts +10 -0
  693. package/dist/ui/word-diff/line-matching.d.ts.map +1 -0
  694. package/dist/ui/word-diff/line-similarity.d.ts +16 -0
  695. package/dist/ui/word-diff/line-similarity.d.ts.map +1 -0
  696. package/dist/ui/word-diff/normalize.d.ts +3 -0
  697. package/dist/ui/word-diff/normalize.d.ts.map +1 -0
  698. package/dist/ui/word-diff/parse.d.ts +17 -0
  699. package/dist/ui/word-diff/parse.d.ts.map +1 -0
  700. package/dist/ui/word-diff/range-refinement.d.ts +5 -0
  701. package/dist/ui/word-diff/range-refinement.d.ts.map +1 -0
  702. package/dist/ui/word-diff/ranges.d.ts +11 -0
  703. package/dist/ui/word-diff/ranges.d.ts.map +1 -0
  704. package/dist/ui/word-diff/smart-filter.d.ts +3 -0
  705. package/dist/ui/word-diff/smart-filter.d.ts.map +1 -0
  706. package/dist/ui/word-diff/sparse-line-matching.d.ts +25 -0
  707. package/dist/ui/word-diff/sparse-line-matching.d.ts.map +1 -0
  708. package/dist/ui/word-diff/text-boundaries.d.ts +11 -0
  709. package/dist/ui/word-diff/text-boundaries.d.ts.map +1 -0
  710. package/dist/ui/word-diff/token-alignment.d.ts +9 -0
  711. package/dist/ui/word-diff/token-alignment.d.ts.map +1 -0
  712. package/dist/ui/word-diff/token-text-refinement.d.ts +4 -0
  713. package/dist/ui/word-diff/token-text-refinement.d.ts.map +1 -0
  714. package/dist/ui/word-diff/tokens.d.ts +16 -0
  715. package/dist/ui/word-diff/tokens.d.ts.map +1 -0
  716. package/dist/ui/word-diff/types.d.ts +10 -0
  717. package/dist/ui/word-diff/types.d.ts.map +1 -0
  718. package/dist/util.d.ts +3 -0
  719. package/dist/util.d.ts.map +1 -0
  720. package/dist/worker/options.d.ts +3 -0
  721. package/dist/worker/options.d.ts.map +1 -0
  722. package/dist/worker/options.js +104 -0
  723. package/dist/worker/options.js.map +7 -0
  724. package/dist/worker/run-record.d.ts +22 -0
  725. package/dist/worker/run-record.d.ts.map +1 -0
  726. package/dist/worker/run-record.js +123 -0
  727. package/dist/worker/run-record.js.map +7 -0
  728. package/dist/worker/session-export.d.ts +45 -0
  729. package/dist/worker/session-export.d.ts.map +1 -0
  730. package/dist/worker/session-export.js +91 -0
  731. package/dist/worker/session-export.js.map +7 -0
  732. package/dist/worker.d.ts +3 -0
  733. package/dist/worker.d.ts.map +1 -0
  734. package/dist/worker.js +1061 -0
  735. package/dist/worker.js.map +7 -0
  736. package/docs/agents.md +564 -0
  737. package/docs/architecture.md +139 -0
  738. package/docs/audit-trace.md +116 -0
  739. package/docs/certification.md +134 -0
  740. package/docs/compaction.md +332 -0
  741. package/docs/component-calculus.md +191 -0
  742. package/docs/components.md +329 -0
  743. package/docs/configuration.md +478 -0
  744. package/docs/entropy.md +396 -0
  745. package/docs/interface.md +149 -0
  746. package/docs/memory-recall.md +614 -0
  747. package/docs/programmatic-compaction.md +207 -0
  748. package/docs/provider-component-calculus.md +378 -0
  749. package/docs/providers.md +109 -0
  750. package/docs/repairs.md +69 -0
  751. package/docs/residency-runtime.md +82 -0
  752. package/docs/schema-enforcement.md +166 -0
  753. package/docs/skills.md +48 -0
  754. package/docs/speculation.md +132 -0
  755. package/docs/state-layer.md +197 -0
  756. package/package.json +116 -0
  757. package/skills/fabric-advisor/SKILL.md +29 -0
  758. package/skills/fabric-ambient/SKILL.md +44 -0
  759. package/skills/fabric-ambient/references/setup.md +90 -0
  760. package/skills/fabric-council/SKILL.md +94 -0
  761. package/skills/fabric-exec/SKILL.md +123 -0
  762. package/skills/fabric-exec/references/agents.md +211 -0
  763. package/skills/fabric-exec/references/mcp.md +49 -0
  764. package/skills/fabric-exec/references/mesh.md +51 -0
  765. package/skills/fabric-fusion/SKILL.md +332 -0
  766. package/skills/fabric-guide/SKILL.md +28 -0
  767. package/skills/fabric-rlm/SKILL.md +284 -0
  768. package/skills/fabric-schema/SKILL.md +121 -0
  769. package/skills/fabric-spec/SKILL.md +42 -0
  770. package/skills/fabric-supervisor/SKILL.md +37 -0
  771. package/skills/fabric-swarm/SKILL.md +80 -0
  772. package/skills/fabric-workflow/SKILL.md +133 -0
@@ -0,0 +1,1908 @@
1
+ import {
2
+ FabricModelSelector
3
+ } from "../chunks/chunk-OJZNMROB.js";
4
+ import {
5
+ ompSymbolTheme
6
+ } from "../chunks/chunk-G2IBGGBM.js";
7
+ import {
8
+ INHERIT_VALUE,
9
+ buildClaudeModelSource,
10
+ buildModelSource,
11
+ modelKey
12
+ } from "../chunks/chunk-7BOAOKWH.js";
13
+ import {
14
+ DynamicBorder
15
+ } from "../chunks/chunk-7VIQNUPS.js";
16
+ import {
17
+ MAX_COMPACTION_RATIO_THRESHOLD,
18
+ MAX_COMPACTION_TOKEN_THRESHOLD,
19
+ MIN_COMPACTION_RATIO_THRESHOLD,
20
+ MIN_COMPACTION_TOKEN_THRESHOLD,
21
+ QUICKJS_MAX_MEMORY_LIMIT_BYTES,
22
+ clampCompactionRatioThreshold,
23
+ clampCompactionTokenThreshold,
24
+ loadFabricConfigForScope,
25
+ maxExecutorMemoryLimitBytes,
26
+ saveFabricConfig
27
+ } from "../chunks/chunk-ROKMBLGN.js";
28
+ import {
29
+ THINKING_LEVELS,
30
+ thinkingLabel
31
+ } from "../chunks/chunk-JSBTB3P6.js";
32
+ import "../chunks/chunk-KAD7UWT2.js";
33
+ import "../chunks/chunk-6N4XGAZY.js";
34
+
35
+ // src/ui/settings.ts
36
+ import {
37
+ Container,
38
+ Input,
39
+ Key,
40
+ matchesKey,
41
+ SelectList,
42
+ SettingsList,
43
+ Spacer,
44
+ Text
45
+ } from "@oh-my-pi/pi-tui";
46
+ var SUBMENU_LAYOUT = {
47
+ minPrimaryColumnWidth: 12,
48
+ maxPrimaryColumnWidth: 32
49
+ };
50
+ var BOOLEANS = ["true", "false"];
51
+ var APPROVAL_MODES = ["allow", "ask", "auto", "deny"];
52
+ var RUNNERS = ["omp", "claude", "veda"];
53
+ var TRANSPORTS = ["auto", "process", "tmux", "screen", "localterm", "herdr"];
54
+ var WIDGET_MODES = ["auto", "always", "hidden"];
55
+ var TOOL_DISPLAY_MODES = ["full", "compact"];
56
+ var RESULT_FORMATS = ["auto", "yaml", "json", "text"];
57
+ var EXECUTOR_RUNTIMES = ["quickjs", "node-process", "bun-process"];
58
+ var SCHEMA_MODES = ["off", "audit", "enforce"];
59
+ var COMPACTION_ENGINES = ["fabric", "omp"];
60
+ var COMPACTION_THRESHOLD_SETTING_ID = "compaction.threshold";
61
+ var COMPACTION_DEFAULT_THRESHOLD_LABEL = "OMP default";
62
+ var COMPACTION_PERCENT_OPTION_LABEL = "Custom percent\u2026";
63
+ var COMPACTION_TOKENS_OPTION_LABEL = "Custom tokens\u2026";
64
+ var COMPACTION_PERCENT_MIN = Math.round(MIN_COMPACTION_RATIO_THRESHOLD * 100);
65
+ var COMPACTION_PERCENT_MAX = Math.round(MAX_COMPACTION_RATIO_THRESHOLD * 100);
66
+ var clampCompactionPercentThreshold = (value) => Math.round(clampCompactionRatioThreshold(value / 100) * 100);
67
+ var COMPACTION_TARGET_RATIOS = Array.from(
68
+ { length: 13 },
69
+ (_, index) => String((25 + index * 5) / 100)
70
+ );
71
+ var ACTOR_SCOPES = ["project", "session"];
72
+ var DIFF_INTENSITIES = ["off", "subtle", "medium"];
73
+ var WORD_EMPHASES = ["all", "smart", "off"];
74
+ var TOOL_CALL_BACKGROUNDS = ["on", "border", "off"];
75
+ var PATH_ICON_MODES = ["unicode", "nerd", "off"];
76
+ var CODE_PREVIEW_EDIT_LINES_ID = "codePreview.editCollapsedLines";
77
+ var CODE_PREVIEW_ALL_LINES = "All lines";
78
+ var SHIKI_THEME_PRESETS = [
79
+ "auto",
80
+ "github-light/github-dark",
81
+ "light-plus/dark-plus",
82
+ "solarized-light/solarized-dark",
83
+ "catppuccin-latte/catppuccin-mocha",
84
+ "github-light",
85
+ "light-plus",
86
+ "solarized-light",
87
+ "dark-plus",
88
+ "github-dark",
89
+ "solarized-dark",
90
+ "nord",
91
+ "one-dark-pro"
92
+ ];
93
+ var RISKS = ["read", "write", "execute", "network", "agent"];
94
+ var CORE_RISK_TOOLS = ["read", "grep", "find", "edit", "write", "bash"];
95
+ var CORE_DEFAULT_TOOL_CANDIDATES = ["read", "bash", "edit", "write", "grep", "find", "ls"];
96
+ var BUDGET_VALUES = [0, 0.05, 0.1, 0.25, 0.5, 1, 2, 5, 10];
97
+ var TOKEN_VALUES = [0, 5e4, 1e5, 25e4, 5e5, 1e6, 2e6];
98
+ var PREWALK_MODEL_UNSET_LABEL = "Ask each time";
99
+ var PREWALK_THINKING_INHERIT_LABEL = "Agents default";
100
+ var PREWALK_MODES = ["in-place", "trajectory"];
101
+ var ROOT_ITEM_IDS = [
102
+ "fullCodeMode",
103
+ "executor",
104
+ "schema",
105
+ "approvals",
106
+ "mcp",
107
+ "prewalk",
108
+ "agents",
109
+ "capture",
110
+ "ui",
111
+ "compaction",
112
+ "retention",
113
+ "mesh",
114
+ "codePreview"
115
+ ];
116
+ var RELOAD_SECTIONS = /* @__PURE__ */ new Set(["mesh", "agents", "mcp", "retention"]);
117
+ var SAVE_SCOPE_SHORTCUT = Key.ctrl("g");
118
+ var unique = (values) => [...new Set(values)];
119
+ var settingsListTheme = (theme) => ({
120
+ label: (text, selected) => selected ? theme.fg("accent", text) : text,
121
+ value: (text, selected) => selected ? theme.fg("accent", text) : theme.fg("muted", text),
122
+ description: (text) => theme.fg("dim", text),
123
+ cursor: theme.fg("accent", "\u2192 "),
124
+ hint: (text) => theme.fg("dim", text)
125
+ });
126
+ var selectListTheme = (theme) => ({
127
+ selectedPrefix: (text) => theme.fg("accent", text),
128
+ selectedText: (text) => theme.fg("accent", text),
129
+ description: (text) => theme.fg("muted", text),
130
+ scrollInfo: (text) => theme.fg("muted", text),
131
+ noMatch: (text) => theme.fg("muted", text),
132
+ symbols: ompSymbolTheme
133
+ });
134
+ var formatDebounce = (ms) => ms === 0 ? "Off" : ms < 1e3 ? `${ms}ms` : `${ms / 1e3}s`;
135
+ var formatMs = (ms) => ms < 1e3 ? `${ms}ms` : ms < 6e4 ? `${ms / 1e3}s` : ms < 36e5 ? `${ms / 6e4}m` : `${ms / 36e5}h`;
136
+ var formatRetention = (ms) => ms >= 24 * 60 * 60 * 1e3 && ms % (24 * 60 * 60 * 1e3) === 0 ? `${ms / (24 * 60 * 60 * 1e3)}d` : formatMs(ms);
137
+ var formatBytes = (bytes) => bytes >= 1024 * 1024 * 1024 ? `${Number((bytes / (1024 * 1024 * 1024)).toFixed(2))} GB` : bytes >= 1024 * 1024 ? `${Number((bytes / (1024 * 1024)).toFixed(2))} MB` : `${Number((bytes / 1024).toFixed(2))} KB`;
138
+ var executorMemoryLimitOptions = (maximumBytes = QUICKJS_MAX_MEMORY_LIMIT_BYTES) => {
139
+ const minimumBytes = 16 * 1024 * 1024;
140
+ const values = [];
141
+ for (let value = minimumBytes; value <= maximumBytes; value *= 2) values.push(value);
142
+ if (maximumBytes >= minimumBytes && values.at(-1) !== maximumBytes) values.push(maximumBytes);
143
+ return values;
144
+ };
145
+ var formatUsd = (value) => value <= 0 ? "Off" : `$${value.toFixed(2)}`;
146
+ var formatTokens = (value) => value <= 0 ? "Off" : value >= 1e6 ? `${value / 1e6}M` : value >= 1e3 ? `${value / 1e3}k` : String(value);
147
+ var formatToolCount = (count) => `${count} ${count === 1 ? "tool" : "tools"}`;
148
+ var formatCompactionThreshold = (config, modelKey2) => {
149
+ const tokens = config.compaction.tokenThresholds[modelKey2];
150
+ if (tokens !== void 0) return `${formatTokens(tokens)} tokens`;
151
+ const ratio = config.compaction.thresholds[modelKey2];
152
+ return ratio === void 0 ? COMPACTION_DEFAULT_THRESHOLD_LABEL : `${Math.round(ratio * 100)}%`;
153
+ };
154
+ var compactionThresholdPartial = (modelKey2, selection) => ({
155
+ compaction: {
156
+ thresholds: { [modelKey2]: selection.mode === "percent" ? selection.value : null },
157
+ tokenThresholds: { [modelKey2]: selection.mode === "tokens" ? selection.value : null }
158
+ }
159
+ });
160
+ var numericOptions = (values, format, currentValue) => {
161
+ const options = values.map((value) => ({
162
+ value: String(value),
163
+ label: format(value)
164
+ }));
165
+ if (!options.some((option) => option.value === currentValue || option.label === currentValue)) {
166
+ options.unshift({ value: currentValue, label: currentValue });
167
+ }
168
+ return options;
169
+ };
170
+ var getPath = (config, id) => {
171
+ const segments = id.split(".");
172
+ let current = config;
173
+ for (const segment of segments) {
174
+ if (typeof current !== "object" || current === null) return void 0;
175
+ current = current[segment];
176
+ }
177
+ return current;
178
+ };
179
+ var parseBudgetValue = (value) => {
180
+ if (value === "Off") return 0;
181
+ const digits = Number.parseFloat(value.replace(/[^0-9.]/g, ""));
182
+ return Number.isFinite(digits) ? digits : 0;
183
+ };
184
+ var parseFormattedNumericValue = (value) => {
185
+ const normalized = value.trim();
186
+ if (normalized === "Off") return 0;
187
+ if (normalized.startsWith("$")) return parseBudgetValue(normalized);
188
+ const bytes = normalized.match(/^([0-9]+(?:\.[0-9]+)?) (KB|MB|GB)$/);
189
+ if (bytes) {
190
+ const amount = Number(bytes[1]);
191
+ const units = { KB: 1024, MB: 1024 ** 2, GB: 1024 ** 3 };
192
+ return Math.round(amount * units[bytes[2]]);
193
+ }
194
+ const duration = normalized.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m|h|d)$/);
195
+ if (duration) {
196
+ const amount = Number(duration[1]);
197
+ const units = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
198
+ return Math.round(amount * units[duration[2]]);
199
+ }
200
+ const tokens = normalized.match(/^([0-9]+(?:\.[0-9]+)?)(k|M)$/);
201
+ if (tokens) return Math.round(Number(tokens[1]) * (tokens[2] === "M" ? 1e6 : 1e3));
202
+ return Number(normalized.replaceAll(",", ""));
203
+ };
204
+ var coerceValue = (id, value, config) => {
205
+ if (id === COMPACTION_THRESHOLD_SETTING_ID) {
206
+ if (value === COMPACTION_DEFAULT_THRESHOLD_LABEL) return { mode: "default" };
207
+ const tokens = /^(.+?) tokens$/.exec(value);
208
+ if (tokens?.[1] !== void 0) {
209
+ return {
210
+ mode: "tokens",
211
+ value: clampCompactionTokenThreshold(parseFormattedNumericValue(tokens[1]))
212
+ };
213
+ }
214
+ return { mode: "percent", value: Number(value.replace("%", "")) / 100 };
215
+ }
216
+ if (id === CODE_PREVIEW_EDIT_LINES_ID) {
217
+ if (value === CODE_PREVIEW_ALL_LINES || value === "all") return "all";
218
+ const parsed = Number.parseInt(value, 10);
219
+ if (Number.isFinite(parsed) && parsed > 0) return parsed;
220
+ const current2 = getPath(config, id);
221
+ return typeof current2 === "number" ? current2 : 160;
222
+ }
223
+ const current = getPath(config, id);
224
+ if (typeof current === "boolean" || id === "prewalk.enabled") return value === "true";
225
+ if (typeof current === "number") return parseFormattedNumericValue(value);
226
+ if (id === "approvals.model" || id === "prewalk.model" || id === "agents.model" || id === "agents.claude.model" || id === "agents.veda.model") {
227
+ return value === INHERIT_VALUE || value === PREWALK_MODEL_UNSET_LABEL ? "" : value;
228
+ }
229
+ if (id === "prewalk.thinking" && value === PREWALK_THINKING_INHERIT_LABEL) return "";
230
+ if (id === "agents.thinking" || id === "prewalk.thinking") {
231
+ return THINKING_LEVELS.find((level) => thinkingLabel(level) === value) ?? value;
232
+ }
233
+ return value;
234
+ };
235
+ var buildPartial = (id, value) => {
236
+ const segments = id.split(".");
237
+ const root = {};
238
+ let current = root;
239
+ for (let index = 0; index < segments.length - 1; index++) {
240
+ const segment = segments[index];
241
+ if (segment === void 0) break;
242
+ const next = {};
243
+ current[segment] = next;
244
+ current = next;
245
+ }
246
+ const last = segments[segments.length - 1];
247
+ if (last !== void 0) current[last] = value;
248
+ return root;
249
+ };
250
+ var summaryFor = (id, config) => {
251
+ switch (id) {
252
+ case "fullCodeMode":
253
+ return config.fullCodeMode ? "true" : "false";
254
+ case "executor": {
255
+ const refFloors = Object.keys(config.executor.hostCallTimeouts).length;
256
+ return `${config.executor.runtime} \xB7 ${formatMs(config.executor.timeoutMs)} \xB7 max ${formatMs(config.executor.maxTimeoutMs)}${refFloors > 0 ? ` \xB7 ${refFloors} ref floor${refFloors === 1 ? "" : "s"}` : ""}`;
257
+ }
258
+ case "schema":
259
+ return config.schema.mode;
260
+ case "approvals":
261
+ return config.approvals.execute;
262
+ case "mcp":
263
+ return config.mcp.enabled ? "enabled" : "disabled";
264
+ case "prewalk":
265
+ return `${config.prewalk.enabled === false ? "off \xB7 " : ""}${config.prewalk.mode} \xB7 ${config.prewalk.model || PREWALK_MODEL_UNSET_LABEL}${config.prewalk.thinking ? ` \xB7 ${thinkingLabel(config.prewalk.thinking)}` : ""}${config.prewalk.alwaysRearm ? " \xB7 repeat" : ""}`;
266
+ case "agents":
267
+ return `${config.agents.runner}/${config.agents.transport}`;
268
+ case "capture":
269
+ return config.capture.enabled ? "enabled" : "disabled";
270
+ case "ui":
271
+ return config.ui.widget;
272
+ case "compaction":
273
+ return config.compaction.engine;
274
+ case "retention":
275
+ return `${formatRetention(config.retention.orphanedTempRunMs)} \xB7 ${formatRetention(config.retention.oneShotRunMs)} \xB7 ${formatRetention(config.retention.actorRunArchiveMs)}`;
276
+ case "mesh":
277
+ return config.mesh.enabled ? "enabled" : "disabled";
278
+ case "codePreview":
279
+ return config.codePreview.shikiTheme;
280
+ default:
281
+ return "";
282
+ }
283
+ };
284
+ var setting = (id, label, currentValue, rest = {}) => {
285
+ const item = { id, label, currentValue };
286
+ if (rest.description !== void 0) item.description = rest.description;
287
+ if (rest.values !== void 0) item.values = [...rest.values];
288
+ if (rest.submenu !== void 0) item.submenu = rest.submenu;
289
+ return item;
290
+ };
291
+ var numericSubmenu = (theme, values, format, title, description) => (currentValue, done) => {
292
+ const options = numericOptions(values, format, currentValue);
293
+ const selectedValue = options.find((option) => option.value === currentValue || option.label === currentValue)?.value ?? currentValue;
294
+ return new SelectSubmenu(
295
+ theme,
296
+ title,
297
+ description,
298
+ options,
299
+ selectedValue,
300
+ (value) => done(options.find((option) => option.value === value)?.label ?? value),
301
+ () => done()
302
+ );
303
+ };
304
+ var nonNegativeIntegerSubmenu = (theme, title, description) => (currentValue, done) => new IntegerInputSubmenu(theme, title, description, currentValue, done, () => done());
305
+ var stringInputSubmenu = (theme, title, description) => (currentValue, done) => new StringInputSubmenu(theme, title, description, currentValue, done, () => done());
306
+ var compactionThresholdSubmenu = (theme) => (currentValue, done) => new CompactionThresholdSubmenu(theme, currentValue, done);
307
+ var stringOptionsSubmenu = (theme, values, title, description) => (currentValue, done) => {
308
+ const options = values.map((value) => ({ value, label: value }));
309
+ if (!options.some((option) => option.value === currentValue)) {
310
+ options.unshift({ value: currentValue, label: currentValue });
311
+ }
312
+ const selectedValue = options.find((option) => option.value === currentValue || option.label === currentValue)?.value ?? currentValue;
313
+ return new SelectSubmenu(
314
+ theme,
315
+ title,
316
+ description,
317
+ options,
318
+ selectedValue,
319
+ (value) => done(value),
320
+ () => done()
321
+ );
322
+ };
323
+ var listSubmenu = (theme, id, title, description, candidates, currentList, onCommit) => {
324
+ const prefix = `${id}.`;
325
+ return (_currentValue, done) => {
326
+ const items = unique([...candidates, ...currentList]).map(
327
+ (name) => setting(`${id}.${name}`, name, currentList.includes(name) ? "true" : "false", {
328
+ description: `Toggle ${name}.`,
329
+ values: BOOLEANS
330
+ })
331
+ );
332
+ const onChange = (_itemId, _newValue) => {
333
+ const selected = items.filter((item) => item.currentValue === "true").map((item) => item.id.slice(prefix.length));
334
+ onCommit(selected);
335
+ };
336
+ return new SectionSubmenu(theme, title, description, items, onChange, () => done(), true);
337
+ };
338
+ };
339
+ var markDrillIn = (items) => {
340
+ for (const item of items) {
341
+ if (item.submenu && !item.label.endsWith("\u203A")) item.label = `${item.label} \u203A`;
342
+ }
343
+ return items;
344
+ };
345
+ var sectionSubmenu = (theme, title, description, items, persist) => (_currentValue, done) => (
346
+ // Match the root page: sections get type-to-search filtering too.
347
+ new SectionSubmenu(theme, title, description, markDrillIn(items), persist, () => done(), true)
348
+ );
349
+ var IntegerInputSubmenu = class extends Container {
350
+ input;
351
+ validationText;
352
+ constructor(theme, title, description, currentValue, onSelect, onCancel) {
353
+ super();
354
+ this.addChild(new Text(theme.bold(theme.fg("accent", title)), 0, 0));
355
+ this.addChild(new Spacer(1));
356
+ this.addChild(new Text(theme.fg("muted", description), 0, 0));
357
+ this.addChild(new Spacer(1));
358
+ this.input = new Input();
359
+ this.input.handleInput(currentValue);
360
+ this.input.focused = true;
361
+ this.validationText = new Text("", 0, 0);
362
+ this.input.onSubmit = (value) => {
363
+ const normalized = value.trim();
364
+ const parsed = /^\d+$/.test(normalized) ? Number(normalized) : Number.NaN;
365
+ if (!Number.isSafeInteger(parsed) || parsed < 0) {
366
+ this.validationText.setText(
367
+ theme.fg("error", "Enter a non-negative safe integer.")
368
+ );
369
+ return;
370
+ }
371
+ onSelect(String(parsed));
372
+ };
373
+ this.input.onEscape = onCancel;
374
+ this.addChild(this.input);
375
+ this.addChild(this.validationText);
376
+ this.addChild(new Spacer(1));
377
+ this.addChild(new Text(theme.fg("dim", " Enter to save \xB7 Esc to go back"), 0, 0));
378
+ }
379
+ handleInput(data) {
380
+ this.validationText.setText("");
381
+ this.input.handleInput(data);
382
+ }
383
+ render(width) {
384
+ this.input.focused = true;
385
+ return super.render(width);
386
+ }
387
+ submitRpc(value) {
388
+ this.input.setValue(value);
389
+ this.input.handleInput("\r");
390
+ }
391
+ };
392
+ var StringInputSubmenu = class extends Container {
393
+ input;
394
+ constructor(theme, title, description, currentValue, onSelect, onCancel) {
395
+ super();
396
+ this.addChild(new Text(theme.bold(theme.fg("accent", title)), 0, 0));
397
+ this.addChild(new Spacer(1));
398
+ this.addChild(new Text(theme.fg("muted", description), 0, 0));
399
+ this.addChild(new Spacer(1));
400
+ this.input = new Input();
401
+ this.input.handleInput(currentValue);
402
+ this.input.focused = true;
403
+ this.input.onSubmit = (value) => onSelect(value.trim());
404
+ this.input.onEscape = onCancel;
405
+ this.addChild(this.input);
406
+ this.addChild(new Spacer(1));
407
+ this.addChild(new Text(theme.fg("dim", " Enter to save \xB7 Esc to go back"), 0, 0));
408
+ }
409
+ handleInput(data) {
410
+ this.input.handleInput(data);
411
+ }
412
+ render(width) {
413
+ this.input.focused = true;
414
+ return super.render(width);
415
+ }
416
+ submitRpc(value) {
417
+ this.input.setValue(value);
418
+ this.input.handleInput("\r");
419
+ }
420
+ };
421
+ var SelectSubmenu = class extends Container {
422
+ selectList;
423
+ options;
424
+ constructor(theme, title, description, options, currentValue, onSelect, onCancel) {
425
+ super();
426
+ this.options = options;
427
+ this.addChild(new Text(theme.bold(theme.fg("accent", title)), 0, 0));
428
+ if (description) {
429
+ this.addChild(new Spacer(1));
430
+ this.addChild(new Text(theme.fg("muted", description), 0, 0));
431
+ }
432
+ this.addChild(new Spacer(1));
433
+ this.selectList = new SelectList(
434
+ options,
435
+ Math.min(options.length, 10),
436
+ selectListTheme(theme),
437
+ SUBMENU_LAYOUT
438
+ );
439
+ const index = options.findIndex((option) => option.value === currentValue);
440
+ if (index !== -1) this.selectList.setSelectedIndex(index);
441
+ this.selectList.onSelect = (item) => onSelect(item.value);
442
+ this.selectList.onCancel = onCancel;
443
+ this.addChild(this.selectList);
444
+ this.addChild(new Spacer(1));
445
+ this.addChild(new Text(theme.fg("dim", " Enter to select \xB7 Esc to go back"), 0, 0));
446
+ }
447
+ handleInput(data) {
448
+ this.selectList.handleInput(data);
449
+ }
450
+ selectRpc(value) {
451
+ const option = this.options.find((candidate) => candidate.value === value);
452
+ if (!option) return false;
453
+ this.selectList.onSelect?.(option);
454
+ return true;
455
+ }
456
+ };
457
+ var CompactionThresholdSubmenu = class extends Container {
458
+ constructor(theme, currentValue, done) {
459
+ super();
460
+ this.theme = theme;
461
+ this.currentValue = currentValue;
462
+ this.done = done;
463
+ this.showSelect();
464
+ }
465
+ selectList;
466
+ input;
467
+ active;
468
+ swap(next) {
469
+ this.clear();
470
+ this.addChild(next);
471
+ this.active = next;
472
+ }
473
+ showSelect() {
474
+ const options = [
475
+ { value: COMPACTION_DEFAULT_THRESHOLD_LABEL, label: COMPACTION_DEFAULT_THRESHOLD_LABEL },
476
+ { value: COMPACTION_PERCENT_OPTION_LABEL, label: COMPACTION_PERCENT_OPTION_LABEL },
477
+ { value: COMPACTION_TOKENS_OPTION_LABEL, label: COMPACTION_TOKENS_OPTION_LABEL }
478
+ ];
479
+ const select = new SelectSubmenu(
480
+ this.theme,
481
+ "Compaction threshold",
482
+ "Percent of the context window that triggers compaction, or an exact token count, entered via the custom options.",
483
+ options,
484
+ this.currentValue,
485
+ (value) => {
486
+ if (value === COMPACTION_PERCENT_OPTION_LABEL) this.showPercent();
487
+ else if (value === COMPACTION_TOKENS_OPTION_LABEL) this.showTokens();
488
+ else this.done(value);
489
+ },
490
+ () => this.done()
491
+ );
492
+ this.selectList = select.selectList;
493
+ this.input = void 0;
494
+ this.swap(select);
495
+ }
496
+ showPercent() {
497
+ const percent = /^(\d+)%$/.exec(this.currentValue);
498
+ const inputSubmenu = new IntegerInputSubmenu(
499
+ this.theme,
500
+ "Compaction percent threshold",
501
+ `Compaction triggers once context usage reaches this percent of its window (${COMPACTION_PERCENT_MIN}\u2013${COMPACTION_PERCENT_MAX}).`,
502
+ percent?.[1] ?? "",
503
+ (value) => this.done(`${clampCompactionPercentThreshold(Number(value))}%`),
504
+ () => this.showSelect()
505
+ );
506
+ this.selectList = void 0;
507
+ this.input = inputSubmenu.input;
508
+ this.swap(inputSubmenu);
509
+ }
510
+ showTokens() {
511
+ const tokens = /^(.+?) tokens$/.exec(this.currentValue);
512
+ const prefilled = tokens?.[1] === void 0 ? "" : String(parseFormattedNumericValue(tokens[1]));
513
+ const inputSubmenu = new IntegerInputSubmenu(
514
+ this.theme,
515
+ "Compaction token threshold",
516
+ `Compaction triggers once context usage reaches this many tokens (${MIN_COMPACTION_TOKEN_THRESHOLD}\u2013${MAX_COMPACTION_TOKEN_THRESHOLD}).`,
517
+ prefilled,
518
+ (value) => this.done(`${formatTokens(clampCompactionTokenThreshold(Number(value)))} tokens`),
519
+ () => this.showSelect()
520
+ );
521
+ this.selectList = void 0;
522
+ this.input = inputSubmenu.input;
523
+ this.swap(inputSubmenu);
524
+ }
525
+ handleInput(data) {
526
+ this.active.handleInput(data);
527
+ }
528
+ completeRpc(selectedValue) {
529
+ this.done(selectedValue);
530
+ }
531
+ };
532
+ var thinkingSubmenu = (theme, overrides = {}) => (currentValue, done) => {
533
+ const canonicalCurrent = THINKING_LEVELS.find((level) => thinkingLabel(level) === currentValue) ?? currentValue;
534
+ const options = THINKING_LEVELS.map((level) => ({
535
+ value: level,
536
+ label: thinkingLabel(level)
537
+ }));
538
+ if (overrides.inheritLabel) {
539
+ options.unshift({ value: overrides.inheritLabel, label: overrides.inheritLabel });
540
+ }
541
+ if (!options.some((option) => option.value === canonicalCurrent)) {
542
+ options.unshift({ value: canonicalCurrent, label: currentValue });
543
+ }
544
+ return new SelectSubmenu(
545
+ theme,
546
+ overrides.title ?? "Default thinking",
547
+ overrides.description ?? "Reasoning effort forwarded to spawned agents and actors when a call does not specify one. The level is clamped to each model's supported levels (next highest if unsupported).",
548
+ options,
549
+ canonicalCurrent,
550
+ (value) => done(options.find((option) => option.value === value)?.label ?? value),
551
+ () => done()
552
+ );
553
+ };
554
+ var modelPickerSubmenu = (theme, source, options = {}) => (currentValue, done) => {
555
+ const canonicalCurrent = options.inheritLabel && currentValue === options.inheritLabel ? INHERIT_VALUE : currentValue;
556
+ return new FabricModelSelector({
557
+ theme,
558
+ source,
559
+ currentValue: canonicalCurrent,
560
+ onSelect: (value) => done(
561
+ value === INHERIT_VALUE && options.inheritLabel ? options.inheritLabel : value
562
+ ),
563
+ onCancel: () => done(),
564
+ ...options.headerText ? { headerText: options.headerText } : {},
565
+ ...options.inheritLabel ? { inheritLabel: options.inheritLabel } : {},
566
+ ...options.inheritName ? { inheritName: options.inheritName } : {}
567
+ });
568
+ };
569
+ var SectionSubmenu = class extends Container {
570
+ settingsList;
571
+ items;
572
+ applyChange;
573
+ constructor(theme, title, description, items, onChange, onCancel, enableSearch = false) {
574
+ super();
575
+ this.items = items;
576
+ this.applyChange = onChange;
577
+ this.addChild(new Text(theme.bold(theme.fg("accent", title)), 0, 0));
578
+ if (description) {
579
+ this.addChild(new Spacer(1));
580
+ this.addChild(new Text(theme.fg("muted", description), 0, 0));
581
+ }
582
+ this.addChild(new Spacer(1));
583
+ this.settingsList = new SettingsList(
584
+ items,
585
+ Math.min(items.length, 16),
586
+ settingsListTheme(theme),
587
+ onChange,
588
+ onCancel,
589
+ { typeToSearch: enableSearch }
590
+ );
591
+ this.addChild(this.settingsList);
592
+ }
593
+ handleInput(data) {
594
+ this.settingsList.handleInput(data);
595
+ }
596
+ };
597
+ var FabricSettingsComponent = class extends Container {
598
+ settingsList;
599
+ theme;
600
+ saveScopeText;
601
+ settingsListContainer;
602
+ projectScopeAvailable;
603
+ onChange;
604
+ onCancel;
605
+ onSaveScopeChange;
606
+ itemsForSaveScope;
607
+ saveScope;
608
+ constructor(theme, items, onChange, onCancel, options = {}) {
609
+ super();
610
+ this.theme = theme;
611
+ this.projectScopeAvailable = options.projectScopeAvailable ?? true;
612
+ this.saveScope = options.initialSaveScope === "global" || !this.projectScopeAvailable ? "global" : "project";
613
+ this.onChange = onChange;
614
+ this.onCancel = onCancel;
615
+ this.onSaveScopeChange = options.onSaveScopeChange ?? (() => {
616
+ });
617
+ this.itemsForSaveScope = options.itemsForSaveScope;
618
+ this.addChild(new DynamicBorder((text) => theme.fg("border", text)));
619
+ this.saveScopeText = new Text("", 1, 0);
620
+ this.updateSaveScopeText();
621
+ this.addChild(this.saveScopeText);
622
+ this.addChild(new Spacer(1));
623
+ this.settingsListContainer = new Container();
624
+ this.settingsList = this.createSettingsList(items);
625
+ this.settingsListContainer.addChild(this.settingsList);
626
+ this.addChild(this.settingsListContainer);
627
+ this.addChild(new DynamicBorder((text) => theme.fg("border", text)));
628
+ }
629
+ handleInput(data) {
630
+ if (matchesKey(data, SAVE_SCOPE_SHORTCUT)) {
631
+ if (!this.projectScopeAvailable) return;
632
+ this.saveScope = this.saveScope === "project" ? "global" : "project";
633
+ this.updateSaveScopeText();
634
+ this.onSaveScopeChange(this.saveScope);
635
+ const nextItems = this.itemsForSaveScope?.(this.saveScope);
636
+ if (nextItems) {
637
+ this.settingsListContainer.clear();
638
+ this.settingsList = this.createSettingsList(nextItems);
639
+ this.settingsListContainer.addChild(this.settingsList);
640
+ }
641
+ return;
642
+ }
643
+ this.settingsList.handleInput(data);
644
+ }
645
+ createSettingsList(items) {
646
+ return new SettingsList(
647
+ items,
648
+ 10,
649
+ settingsListTheme(this.theme),
650
+ this.onChange,
651
+ this.onCancel,
652
+ { typeToSearch: true }
653
+ );
654
+ }
655
+ updateSaveScopeText() {
656
+ const destination = this.saveScope === "project" ? "Project overrides (.omp/fabric.json)" : "Global defaults (<active OMP agent dir>/fabric.json)";
657
+ const hint = !this.projectScopeAvailable ? " \xB7 project scope unavailable for untrusted projects" : this.saveScope === "global" ? " \xB7 Ctrl+G switches scope \xB7 project overrides may remain active here" : " \xB7 Ctrl+G switches scope";
658
+ this.saveScopeText.setText(
659
+ this.theme.fg("muted", "Editing: ") + this.theme.fg("accent", destination) + this.theme.fg("dim", hint)
660
+ );
661
+ }
662
+ };
663
+ var populateClaudeModelSource = async (source, load) => {
664
+ const loaded = buildClaudeModelSource(await load());
665
+ source.models.splice(0, source.models.length, ...loaded.models);
666
+ source.lastUsed = loaded.lastUsed;
667
+ };
668
+ var buildFabricSettingsItems = (theme, config, apply, options) => {
669
+ const persist = (id, newValue) => apply(id, coerceValue(id, newValue, config));
670
+ const envFullCode = process.env.OMP_FABRIC_FULL_CODE_MODE;
671
+ const fullCodeDescription = envFullCode ? "Fabric owns OMP core tools (read, bash, edit, write, grep, find, ls) via fabric_exec. Currently overridden by the OMP_FABRIC_FULL_CODE_MODE environment variable." : "Fabric owns OMP core tools (read, bash, edit, write, grep, find, ls) via fabric_exec. Disable to keep native tools model-facing (orchestration-only mode).";
672
+ const executorMemoryDescription = () => config.executor.runtime === "quickjs" ? "Maximum QuickJS heap size. WASM32 limits this to less than 4 GiB." : config.executor.runtime === "bun-process" ? "Heap target for the disposable Bun process. Bun ignores V8 heap flags, so this limit is not enforced." : "V8 old-generation heap limit for the disposable Node process. Large allocations may destabilize the system.";
673
+ const defaultToolsItem = setting(
674
+ "agents.defaultTools",
675
+ "Default tools",
676
+ formatToolCount(config.agents.defaultTools.length),
677
+ { description: "OMP core tools exposed to spawned agents by default." }
678
+ );
679
+ defaultToolsItem.submenu = listSubmenu(
680
+ theme,
681
+ "agents.defaultTools",
682
+ "Default tools",
683
+ "OMP core tools exposed to spawned agents by default.",
684
+ CORE_DEFAULT_TOOL_CANDIDATES,
685
+ config.agents.defaultTools,
686
+ (selected) => {
687
+ apply("agents.defaultTools", selected);
688
+ defaultToolsItem.currentValue = formatToolCount(selected.length);
689
+ }
690
+ );
691
+ const keepVisibleItem = setting(
692
+ "capture.keepVisible",
693
+ "Keep visible",
694
+ formatToolCount(config.capture.keepVisible.length),
695
+ { description: "Captured tool names that stay model-visible despite hideFromModel." }
696
+ );
697
+ keepVisibleItem.submenu = listSubmenu(
698
+ theme,
699
+ "capture.keepVisible",
700
+ "Keep visible",
701
+ "Captured tool names that stay model-visible despite hideFromModel.",
702
+ options.keepVisibleCandidates,
703
+ config.capture.keepVisible,
704
+ (selected) => {
705
+ apply("capture.keepVisible", selected);
706
+ keepVisibleItem.currentValue = formatToolCount(selected.length);
707
+ }
708
+ );
709
+ const includeToolsItem = setting(
710
+ "capture.includeTools",
711
+ "Include tools",
712
+ formatToolCount(config.capture.includeTools.length),
713
+ { description: "Explicitly keep registered tools visible; unavailable names are ignored." }
714
+ );
715
+ includeToolsItem.submenu = listSubmenu(
716
+ theme,
717
+ "capture.includeTools",
718
+ "Include tools",
719
+ "Explicit include overrides capture hiding. Explicit excludes still win.",
720
+ options.toolCandidates ?? [],
721
+ config.capture.includeTools,
722
+ (selected) => {
723
+ apply("capture.includeTools", selected);
724
+ includeToolsItem.currentValue = formatToolCount(selected.length);
725
+ }
726
+ );
727
+ const excludeToolsItem = setting(
728
+ "capture.excludeTools",
729
+ "Exclude tools",
730
+ formatToolCount(config.capture.excludeTools.length),
731
+ { description: "Hide selected registered tools from the model; excludes win over includes." }
732
+ );
733
+ excludeToolsItem.submenu = listSubmenu(
734
+ theme,
735
+ "capture.excludeTools",
736
+ "Exclude tools",
737
+ "Explicit exclude wins when a tool appears in both lists.",
738
+ options.toolCandidates ?? [],
739
+ config.capture.excludeTools,
740
+ (selected) => {
741
+ apply("capture.excludeTools", selected);
742
+ excludeToolsItem.currentValue = formatToolCount(selected.length);
743
+ }
744
+ );
745
+ const items = [
746
+ setting("fullCodeMode", "Full code mode", config.fullCodeMode ? "true" : "false", {
747
+ description: fullCodeDescription,
748
+ values: BOOLEANS
749
+ }),
750
+ setting("executor", "Executor", summaryFor("executor", config), {
751
+ description: "Runtime and resource limits for fabric_exec programs.",
752
+ submenu: sectionSubmenu(
753
+ theme,
754
+ "Executor",
755
+ "Runtime and resource limits for fabric_exec programs.",
756
+ [
757
+ setting("executor.runtime", "Runtime", config.executor.runtime, {
758
+ description: config.schema.mode === "enforce" ? "Schema enforce mode requires the isolated QuickJS runtime." : "QuickJS is isolated and limited by WASM32. Node/Bun processes support larger heaps but are an unsafe trusted-code escape hatch, not a security sandbox.",
759
+ values: config.schema.mode === "enforce" ? ["quickjs"] : EXECUTOR_RUNTIMES
760
+ }),
761
+ setting("executor.timeoutMs", "Timeout", formatMs(config.executor.timeoutMs), {
762
+ description: `Default wall-clock time for a single fabric_exec program. A per-invocation timeoutMs or a matching executor.hostCallTimeouts ref can raise it up to the ${formatMs(config.executor.maxTimeoutMs)} policy maximum.`,
763
+ submenu: numericSubmenu(
764
+ theme,
765
+ [15e3, 3e4, 6e4, 12e4, 3e5, 6e5],
766
+ formatMs,
767
+ "Executor timeout",
768
+ `Default wall-clock time for a single fabric_exec program (policy max ${formatMs(config.executor.maxTimeoutMs)}).`
769
+ )
770
+ }),
771
+ setting(
772
+ "executor.maxTimeoutMs",
773
+ "Policy max",
774
+ formatMs(config.executor.maxTimeoutMs),
775
+ {
776
+ description: "Ceiling for every executor deadline: per-invocation timeoutMs requests and executor.hostCallTimeouts ref floors are capped at this value. Values above it are normalized on load.",
777
+ submenu: numericSubmenu(
778
+ theme,
779
+ [3e5, 6e5, 9e5, 18e5, 36e5],
780
+ formatMs,
781
+ "Executor policy maximum",
782
+ "Ceiling for every executor deadline, including per-invocation requests and per-ref floors."
783
+ )
784
+ }
785
+ ),
786
+ setting(
787
+ "executor.hostCallTimeouts",
788
+ "Per-ref floors",
789
+ Object.keys(config.executor.hostCallTimeouts).length > 0 ? Object.keys(config.executor.hostCallTimeouts).map((ref) => `${ref}=${formatMs(config.executor.hostCallTimeouts[ref] ?? 0)}`).join(", ") : "none",
790
+ {
791
+ description: 'Exact-ref deadline floors for known long-running host calls (configured in the Fabric config file), e.g. "extensions.subagent": 3600000.'
792
+ }
793
+ ),
794
+ setting(
795
+ "executor.memoryLimitBytes",
796
+ "Memory limit",
797
+ formatBytes(config.executor.memoryLimitBytes),
798
+ {
799
+ description: executorMemoryDescription(),
800
+ submenu: (currentValue, done) => numericSubmenu(
801
+ theme,
802
+ executorMemoryLimitOptions(maxExecutorMemoryLimitBytes(config.executor.runtime)),
803
+ formatBytes,
804
+ "Executor memory limit",
805
+ executorMemoryDescription()
806
+ )(currentValue, done)
807
+ }
808
+ ),
809
+ setting("executor.maxOutputChars", "Max output chars", config.executor.maxOutputChars.toLocaleString(), {
810
+ description: "Character cap applied to the final fabric_exec return value shown to the model.",
811
+ submenu: numericSubmenu(
812
+ theme,
813
+ [2e4, 5e4, 1e5, 2e5, 5e5],
814
+ (n) => n.toLocaleString(),
815
+ "Max output chars",
816
+ "Character cap applied to the final fabric_exec return value shown to the model."
817
+ )
818
+ }),
819
+ setting("executor.resultFormat", "Result format", config.executor.resultFormat, {
820
+ description: "Default formatting for fabric_exec return values. Auto renders structured values as syntax-highlighted YAML; each call can override this.",
821
+ values: RESULT_FORMATS
822
+ }),
823
+ setting(
824
+ "executor.maxNestedResultChars",
825
+ "Max nested result chars",
826
+ config.executor.maxNestedResultChars.toLocaleString(),
827
+ {
828
+ description: "Character cap applied to results returned by nested tool calls inside the sandbox.",
829
+ submenu: numericSubmenu(
830
+ theme,
831
+ [5e5, 1e6, 2e6, 5e6, 1e7],
832
+ (n) => n.toLocaleString(),
833
+ "Max nested result chars",
834
+ "Character cap applied to results returned by nested tool calls inside the sandbox."
835
+ )
836
+ }
837
+ )
838
+ ],
839
+ persist
840
+ )
841
+ }),
842
+ setting("schema", "Schema", summaryFor("schema", config), {
843
+ description: "Typed evidence loop and local-file transaction channel. Enforcement is locked per session; mode changes take effect in the next session.",
844
+ submenu: sectionSubmenu(
845
+ theme,
846
+ "Schema",
847
+ "Typed evidence loop and local-file transaction channel. In enforce mode, protected-workspace mutations require schema.hypothesize \u2192 schema.verify \u2192 schema.commit inside one fabric_exec call.",
848
+ [
849
+ setting("schema.mode", "Mode", config.schema.mode, {
850
+ description: "off (default) leaves the control plane ungated. audit records would_block events for actions enforce would deny. enforce admits only the schema transaction channel for protected-workspace changes and forces the QuickJS runtime. Takes effect in the next session.",
851
+ values: SCHEMA_MODES
852
+ }),
853
+ setting("schema.certificateTtlMs", "Certificate TTL", formatMs(config.schema.certificateTtlMs), {
854
+ description: "How long a schema.verify certificate stays valid. Clamped to 1s\u201310min.",
855
+ submenu: numericSubmenu(
856
+ theme,
857
+ [1e3, 5e3, 1e4, 3e4, 6e4, 12e4, 3e5, 6e5],
858
+ formatMs,
859
+ "Certificate TTL",
860
+ "How long a schema.verify certificate stays valid. Clamped to 1s\u201310min."
861
+ )
862
+ }),
863
+ setting("schema.maxFiles", "Max files", String(config.schema.maxFiles), {
864
+ description: "Maximum files in one schema.commit transaction. Clamped to 1\u20131000.",
865
+ submenu: numericSubmenu(
866
+ theme,
867
+ [1, 5, 10, 25, 50, 100, 250, 500, 1e3],
868
+ (n) => String(n),
869
+ "Max files",
870
+ "Maximum files in one schema.commit transaction. Clamped to 1\u20131000."
871
+ )
872
+ }),
873
+ setting("schema.maxBytes", "Max bytes", formatBytes(config.schema.maxBytes), {
874
+ description: "Maximum total bytes written by one schema.commit transaction. Clamped to 1 KiB\u2013100 MiB.",
875
+ submenu: numericSubmenu(
876
+ theme,
877
+ [1048576, 5242880, 10485760, 52428800, 104857600],
878
+ formatBytes,
879
+ "Max bytes",
880
+ "Maximum total bytes written by one schema.commit transaction. Clamped to 1 KiB\u2013100 MiB."
881
+ )
882
+ })
883
+ ],
884
+ persist
885
+ )
886
+ }),
887
+ setting("approvals", "Approvals", summaryFor("approvals", config), {
888
+ description: "Per-action approval policy for Fabric and model-requested native tool calls.",
889
+ submenu: sectionSubmenu(
890
+ theme,
891
+ "Approvals",
892
+ "Approval policy for Fabric and model-requested native tool calls. Auto routes each call through a dedicated safety classifier and escalates uncertain actions to you.",
893
+ [
894
+ setting("approvals.model", "Auto model", config.approvals.model || INHERIT_VALUE, {
895
+ description: "OMP model used as the auto-mode safety classifier. Inherit uses the active session model. The classifier has no executable tools and returns a structured allow-or-escalate verdict.",
896
+ submenu: modelPickerSubmenu(
897
+ theme,
898
+ options.modelSource,
899
+ {
900
+ headerText: "Safety classifier for auto approval policies. Pick Inherit to use the active OMP session model.",
901
+ inheritName: "Use the active OMP session model"
902
+ }
903
+ )
904
+ }),
905
+ setting("approvals.read", "Read", config.approvals.read, {
906
+ description: "Approval policy for read operations. Read is normally safe to leave allowed.",
907
+ values: APPROVAL_MODES
908
+ }),
909
+ setting("approvals.write", "Write", config.approvals.write, {
910
+ description: "Approval policy for write and edit operations. Auto classifies each call.",
911
+ values: APPROVAL_MODES
912
+ }),
913
+ setting("approvals.execute", "Execute", config.approvals.execute, {
914
+ description: "Approval policy for shell execution. Auto classifies each command.",
915
+ values: APPROVAL_MODES
916
+ }),
917
+ setting("approvals.network", "Network", config.approvals.network, {
918
+ description: "Approval policy for network operations. Auto classifies each destination and payload.",
919
+ values: APPROVAL_MODES
920
+ }),
921
+ setting("approvals.agent", "Agent", config.approvals.agent, {
922
+ description: "Approval policy for agent and actor operations. Auto classifies each request.",
923
+ values: APPROVAL_MODES
924
+ })
925
+ ],
926
+ persist
927
+ )
928
+ }),
929
+ setting("mcp", "MCP", summaryFor("mcp", config), {
930
+ description: "Model Context Protocol provider discovery and invocation.",
931
+ submenu: sectionSubmenu(
932
+ theme,
933
+ "MCP",
934
+ "Model Context Protocol provider discovery and invocation.",
935
+ [
936
+ setting("mcp.enabled", "Enabled", config.mcp.enabled ? "true" : "false", {
937
+ description: "Enable the MCP provider inside fabric_exec.",
938
+ values: BOOLEANS
939
+ }),
940
+ setting("mcp.disableOAuth", "Disable OAuth", config.mcp.disableOAuth ? "true" : "false", {
941
+ description: "Skip MCP OAuth flows.",
942
+ values: BOOLEANS
943
+ }),
944
+ setting("mcp.allowDynamicServers", "Dynamic servers", config.mcp.allowDynamicServers ? "true" : "false", {
945
+ description: "Allow servers to be added at runtime via the MCP protocol.",
946
+ values: BOOLEANS
947
+ }),
948
+ setting("mcp.callTimeoutMs", "Call timeout", formatMs(config.mcp.callTimeoutMs), {
949
+ description: "Timeout for individual MCP tool calls.",
950
+ submenu: numericSubmenu(
951
+ theme,
952
+ [15e3, 3e4, 6e4, 12e4, 3e5],
953
+ formatMs,
954
+ "MCP call timeout",
955
+ "Timeout for individual MCP tool calls."
956
+ )
957
+ }),
958
+ setting("mcp.cache.enabled", "Descriptor cache", config.mcp.cache.enabled ? "true" : "false", {
959
+ description: "Cache MCP tool metadata across sessions keyed by mcporter config; discovery no longer spawns every server.",
960
+ values: BOOLEANS
961
+ }),
962
+ setting("mcp.cache.revalidate", "Revalidate on start", config.mcp.cache.revalidate, {
963
+ description: "Background re-listing at session start: changed servers only, all servers, or off.",
964
+ values: ["changed", "all", "off"]
965
+ }),
966
+ setting("mcp.cache.revalidateBudgetMs", "Revalidate budget", formatMs(config.mcp.cache.revalidateBudgetMs), {
967
+ description: "Wall-clock budget for the session-start background MCP revalidation.",
968
+ submenu: numericSubmenu(
969
+ theme,
970
+ [15e3, 3e4, 6e4, 12e4, 3e5],
971
+ formatMs,
972
+ "MCP revalidate budget",
973
+ "Wall-clock budget for the session-start background MCP revalidation."
974
+ )
975
+ })
976
+ ],
977
+ persist
978
+ )
979
+ }),
980
+ setting("prewalk", "Prewalk", summaryFor("prewalk", config), {
981
+ description: "Continue Main in place or opt into a child trajectory handoff at the completed fabric_exec boundary.",
982
+ submenu: sectionSubmenu(
983
+ theme,
984
+ "Prewalk",
985
+ "Automatic continuation at the completed outer fabric_exec boundary.",
986
+ [
987
+ setting("prewalk.enabled", "Enabled", config.prewalk.enabled === false ? "false" : "true", {
988
+ description: "Master switch for prewalk. When off, manual arming, session auto-arm, and boundary claims are all inert until re-enabled. Same effect as /fabric prewalk --disable and --enable; a live arm is cancelled on disable.",
989
+ values: BOOLEANS
990
+ }),
991
+ setting("prewalk.mode", "Mode", config.prewalk.mode, {
992
+ description: "In-place temporarily switches Main to the executor, queues a hidden continuation, then returns to Main's previous model. Trajectory moves the session snapshot to a visible child executor, then queues a hidden verify-and-summarize continuation for Main when it finishes.",
993
+ values: PREWALK_MODES
994
+ }),
995
+ setting(
996
+ "prewalk.alwaysRearm",
997
+ "Always re-arm",
998
+ config.prewalk.alwaysRearm ? "true" : "false",
999
+ {
1000
+ description: "Arm prewalk automatically at every session start and again after each completed handoff until /fabric prewalk --off cancels it for the session. Auto-arm needs prewalk.model (provider/model). Read-only turns never disarm prewalk.",
1001
+ values: BOOLEANS
1002
+ }
1003
+ ),
1004
+ setting(
1005
+ "prewalk.detectShellWrites",
1006
+ "Detect shell writes",
1007
+ config.prewalk.detectShellWrites ? "true" : "false",
1008
+ {
1009
+ description: "Filesystem fallback trigger: when an armed task ran a successful omp.bash in fabric_exec without an audited omp.edit / omp.write / schema.commit, claim the handoff if file stats drifted from baseline, so shell heredocs, sed -i, or formatter-binary writes also reach the executor.",
1010
+ values: BOOLEANS
1011
+ }
1012
+ ),
1013
+ setting(
1014
+ "prewalk.compactOnReturn",
1015
+ "Compact on return",
1016
+ config.prewalk.compactOnReturn ? "true" : "false",
1017
+ {
1018
+ description: "After an in-place continuation settles, compact the session with the configured compaction engine just before Main's boundary model is restored, so Main re-ingests a compacted transcript rather than the executor's full scratch work.",
1019
+ values: BOOLEANS
1020
+ }
1021
+ ),
1022
+ setting(
1023
+ "prewalk.thinking",
1024
+ "Thinking",
1025
+ config.prewalk.thinking ? thinkingLabel(config.prewalk.thinking) : PREWALK_THINKING_INHERIT_LABEL,
1026
+ {
1027
+ description: "Reasoning effort for the trajectory child executor. Agents default inherits Agents \u203A Default thinking; in-place keeps Main's session level. The level is clamped to each model's supported levels.",
1028
+ submenu: thinkingSubmenu(theme, {
1029
+ title: "Prewalk thinking",
1030
+ description: "Reasoning effort for the trajectory child executor. Agents default uses the Agents section's Default thinking; in-place keeps Main's session level. Clamped to each model's supported levels (next highest if unsupported).",
1031
+ inheritLabel: PREWALK_THINKING_INHERIT_LABEL
1032
+ })
1033
+ }
1034
+ ),
1035
+ setting(
1036
+ "prewalk.model",
1037
+ "Executor model",
1038
+ config.prewalk.model || PREWALK_MODEL_UNSET_LABEL,
1039
+ {
1040
+ description: "OMP provider/model used by /fabric prewalk. In-place selects it for Main; trajectory uses it for the child executor. Ask each time is interactive only.",
1041
+ submenu: modelPickerSubmenu(
1042
+ theme,
1043
+ options.modelSource,
1044
+ {
1045
+ headerText: "Executor model for automatic /fabric prewalk continuation. Pick Ask each time to open the model picker for every prewalk.",
1046
+ inheritLabel: PREWALK_MODEL_UNSET_LABEL,
1047
+ inheritName: "Open the model picker whenever prewalk is armed"
1048
+ }
1049
+ )
1050
+ }
1051
+ )
1052
+ ],
1053
+ persist
1054
+ )
1055
+ }),
1056
+ setting("agents", "Agents", summaryFor("agents", config), {
1057
+ description: "One-shot child agents spawned from inside fabric_exec.",
1058
+ submenu: sectionSubmenu(
1059
+ theme,
1060
+ "Agents",
1061
+ "One-shot child agents spawned from inside fabric_exec.",
1062
+ [
1063
+ setting("agents.enabled", "Enabled", config.agents.enabled ? "true" : "false", {
1064
+ description: "Enable agent spawning via workflow.agent() and agents.run().",
1065
+ values: BOOLEANS
1066
+ }),
1067
+ setting("agents.runner", "Default runner", config.agents.runner, {
1068
+ description: "Execution harness used when agents.run/create does not specify runner.",
1069
+ values: RUNNERS
1070
+ }),
1071
+ setting("agents.transport", "Transport", config.agents.transport, {
1072
+ description: "Preferred transport for spawned agents.",
1073
+ values: TRANSPORTS
1074
+ }),
1075
+ setting("agents.model", "Default model", config.agents.model || INHERIT_VALUE, {
1076
+ description: "Model forwarded to OMP-backed agents and actors when a call does not specify one. Pick Inherit to use the host session's default. Order matches pi-model-sort (most recently used first).",
1077
+ submenu: modelPickerSubmenu(
1078
+ theme,
1079
+ options.modelSource
1080
+ )
1081
+ }),
1082
+ setting(
1083
+ "agents.claude.model",
1084
+ "Claude model",
1085
+ config.agents.claude.model || INHERIT_VALUE,
1086
+ {
1087
+ description: "Claude Code model used by Claude-backed agents and actors. Models are enumerated from the installed claude runtime; Inherit uses Claude Code's default.",
1088
+ submenu: modelPickerSubmenu(
1089
+ theme,
1090
+ options.claudeModelSource ?? { models: [], lastUsed: {} },
1091
+ {
1092
+ headerText: "Default model for Claude-backed Fabric agents and actors. Pick Inherit to use Claude Code's runtime default.",
1093
+ inheritName: "Use Claude Code's runtime default model"
1094
+ }
1095
+ )
1096
+ }
1097
+ ),
1098
+ setting("agents.veda.backend", "Veda backend", config.agents.veda.backend, {
1099
+ description: "External backend driven by the Veda CLI: agy, codex, claude-code, droid, pi, or a backend registered by the installed Veda build.",
1100
+ submenu: stringInputSubmenu(
1101
+ theme,
1102
+ "Veda backend",
1103
+ "External CLI backend the Veda runner drives for agent runs."
1104
+ )
1105
+ }),
1106
+ setting("agents.veda.persona", "Veda persona", config.agents.veda.persona, {
1107
+ description: "Veda persona: navigator-plan, navigator-chat, reviewer, worker, or a custom persona under ~/.config/veda/personas/<name>/AGENTS.md.",
1108
+ submenu: stringInputSubmenu(
1109
+ theme,
1110
+ "Veda persona",
1111
+ "Persona controlling the Veda agent's behavior. Leave as navigator-chat for the default."
1112
+ )
1113
+ }),
1114
+ setting("agents.veda.model", "Veda model", config.agents.veda.model || INHERIT_VALUE, {
1115
+ description: "Default model forwarded to the Veda backend when a call does not specify one. Leave empty for the backend default.",
1116
+ submenu: stringInputSubmenu(
1117
+ theme,
1118
+ "Veda model",
1119
+ "Model or alias forwarded to the Veda backend. Empty uses the backend default."
1120
+ )
1121
+ }),
1122
+ setting("agents.thinking", "Default thinking", thinkingLabel(config.agents.thinking), {
1123
+ description: "Reasoning effort forwarded to spawned agents and actors when a call does not specify one. Clamped to each model's supported levels (next highest if unsupported).",
1124
+ submenu: thinkingSubmenu(theme)
1125
+ }),
1126
+ setting("agents.maxConcurrent", "Max concurrent", String(config.agents.maxConcurrent), {
1127
+ description: "Maximum number of agents that may run at the same time.",
1128
+ submenu: numericSubmenu(
1129
+ theme,
1130
+ [1, 2, 4, 8, 16, 32],
1131
+ String,
1132
+ "Agent concurrency",
1133
+ "Maximum number of agents that may run at the same time."
1134
+ )
1135
+ }),
1136
+ setting("agents.maxPerExecution", "Max per execution", String(config.agents.maxPerExecution), {
1137
+ description: "Maximum number of agent calls allowed within a single fabric_exec program.",
1138
+ submenu: numericSubmenu(
1139
+ theme,
1140
+ [10, 25, 50, 100, 200, 500],
1141
+ String,
1142
+ "Agents per execution",
1143
+ "Maximum number of agent calls allowed within a single fabric_exec program."
1144
+ )
1145
+ }),
1146
+ setting("agents.maxDepth", "Max depth", String(config.agents.maxDepth), {
1147
+ description: "Maximum nesting depth for child agent calls. Enter any non-negative integer; 0 disables child spawning.",
1148
+ submenu: nonNegativeIntegerSubmenu(
1149
+ theme,
1150
+ "Agent depth",
1151
+ "Maximum nesting depth for child agent calls. Enter any non-negative integer; 0 disables child spawning."
1152
+ )
1153
+ }),
1154
+ setting("agents.budgetUsd", "Recursion budget", formatUsd(config.agents.budgetUsd), {
1155
+ description: "Maximum USD spend for agent work across the whole recursion tree. 0 disables the budget.",
1156
+ submenu: numericSubmenu(
1157
+ theme,
1158
+ BUDGET_VALUES,
1159
+ formatUsd,
1160
+ "Recursion budget",
1161
+ "Maximum USD spend for agent work across the whole recursion tree. 0 disables the budget."
1162
+ )
1163
+ }),
1164
+ setting("agents.sessionExport", "Usage export", config.agents.sessionExport ? "true" : "false", {
1165
+ description: "Write usage-only OMP-format session files (tokens/cost, never transcript content) for every agent run so tokscale and ccusage can track Fabric subagents.",
1166
+ values: BOOLEANS
1167
+ }),
1168
+ setting("agents.sessionExportDir", "Usage export dir", config.agents.sessionExportDir || "<active OMP agent dir> (co-hosted, hidden .fabric namespace)", {
1169
+ description: "Root of the export store; sessions land under <dir>/sessions/.fabric/. Default reuses OMP's own agent dir (tokscale/ccusage count it with zero setup; OMP's resume picker never sees the hidden namespace). OMP_FABRIC_AGENT_DIR overrides.",
1170
+ submenu: stringInputSubmenu(
1171
+ theme,
1172
+ "Usage export dir",
1173
+ "Root of the export store; OMP_FABRIC_AGENT_DIR overrides this value."
1174
+ )
1175
+ }),
1176
+ setting("agents.maxTokensPerChild", "Token limit", formatTokens(config.agents.maxTokensPerChild), {
1177
+ description: "Maximum cumulative tokens a single agent may use before it is terminated (0 disables). Caps a runaway child before the host session compacts.",
1178
+ submenu: numericSubmenu(
1179
+ theme,
1180
+ TOKEN_VALUES,
1181
+ formatTokens,
1182
+ "Agent token limit",
1183
+ "Maximum cumulative tokens a single agent may use before it is terminated (0 disables)."
1184
+ )
1185
+ }),
1186
+ setting("agents.timeoutMs", "Timeout", formatMs(config.agents.timeoutMs), {
1187
+ description: "Default wall-clock timeout and minimum for per-call agent timeouts.",
1188
+ submenu: numericSubmenu(
1189
+ theme,
1190
+ [
1191
+ 6e4,
1192
+ 12e4,
1193
+ 3e5,
1194
+ 6e5,
1195
+ 18e5,
1196
+ 36e5,
1197
+ 72e5,
1198
+ 144e5,
1199
+ 288e5,
1200
+ 864e5
1201
+ ],
1202
+ formatMs,
1203
+ "Agent timeout",
1204
+ "Default wall-clock timeout and minimum for per-call agent timeouts."
1205
+ )
1206
+ }),
1207
+ setting("agents.extensions", "Extensions", config.agents.extensions ? "true" : "false", {
1208
+ description: "Allow agents to load registered extensions.",
1209
+ values: BOOLEANS
1210
+ }),
1211
+ defaultToolsItem,
1212
+ setting("agents.retainRuns", "Retain runs", config.agents.retainRuns ? "true" : "false", {
1213
+ description: "Keep completed agent run artifacts for later inspection.",
1214
+ values: BOOLEANS
1215
+ }),
1216
+ setting("agents.notifyOnComplete", "Notify on complete", config.agents.notifyOnComplete ? "true" : "false", {
1217
+ description: "Post a message when a background agent completes.",
1218
+ values: BOOLEANS
1219
+ })
1220
+ ],
1221
+ persist
1222
+ )
1223
+ }),
1224
+ setting("capture", "Capture", summaryFor("capture", config), {
1225
+ description: "Registered tool capture and model visibility policy.",
1226
+ submenu: sectionSubmenu(
1227
+ theme,
1228
+ "Capture",
1229
+ "Registered tool capture and model visibility policy.",
1230
+ [
1231
+ setting("capture.enabled", "Enabled", config.capture.enabled ? "true" : "false", {
1232
+ description: "Capture registered extension tools so they are callable from fabric_exec.",
1233
+ values: BOOLEANS
1234
+ }),
1235
+ setting("capture.hideFromModel", "Hide from model", config.capture.hideFromModel ? "true" : "false", {
1236
+ description: "Hide captured tools from the parent model's tool schema.",
1237
+ values: BOOLEANS
1238
+ }),
1239
+ setting("capture.defaultRisk", "Default risk", config.capture.defaultRisk, {
1240
+ description: "Approval risk level applied to registered tools without an explicit override.",
1241
+ values: RISKS
1242
+ }),
1243
+ keepVisibleItem,
1244
+ ...CORE_RISK_TOOLS.map(
1245
+ (tool) => setting(`capture.risks.${tool}`, `${tool} risk`, config.capture.risks[tool] ?? config.capture.defaultRisk, {
1246
+ description: `Approval risk level for the ${tool} tool on native and captured paths.`,
1247
+ values: RISKS
1248
+ })
1249
+ ),
1250
+ includeToolsItem,
1251
+ excludeToolsItem
1252
+ ],
1253
+ persist
1254
+ )
1255
+ }),
1256
+ setting("ui", "UI", summaryFor("ui", config), {
1257
+ description: "Fabric activity widget and dashboard.",
1258
+ submenu: sectionSubmenu(
1259
+ theme,
1260
+ "UI",
1261
+ "Fabric activity widget and dashboard.",
1262
+ [
1263
+ setting("ui.enabled", "Enabled", config.ui.enabled ? "true" : "false", {
1264
+ description: "Show the Fabric activity widget and dashboard.",
1265
+ values: BOOLEANS
1266
+ }),
1267
+ setting("ui.widget", "Widget", config.ui.widget, {
1268
+ description: "When to show the activity widget above the editor.",
1269
+ values: WIDGET_MODES
1270
+ }),
1271
+ setting("ui.toolDisplay", "Tool display", config.ui.toolDisplay, {
1272
+ description: "Show full Fabric TypeScript or a compact intent-and-tools transcript; the tool-expand key (ctrl+o) expands a compact card to full.",
1273
+ values: TOOL_DISPLAY_MODES
1274
+ }),
1275
+ setting(
1276
+ "ui.showAgentToolPreview",
1277
+ "Agent tool preview",
1278
+ config.ui.showAgentToolPreview ? "true" : "false",
1279
+ {
1280
+ description: "Show spawned agent/actor tool trees \u2014 including recursive descendants \u2014 in Fabric tool-call previews.",
1281
+ values: BOOLEANS
1282
+ }
1283
+ ),
1284
+ setting(
1285
+ "ui.updateDebounceMs",
1286
+ "Update debounce",
1287
+ formatDebounce(config.ui.updateDebounceMs),
1288
+ {
1289
+ description: "One global coalescing window for live card updates \u2014 nested calls, progress, agent previews.",
1290
+ submenu: numericSubmenu(
1291
+ theme,
1292
+ [0, 16, 50, 100, 150, 250, 500, 1e3],
1293
+ formatDebounce,
1294
+ "Update debounce",
1295
+ "One global coalescing window for live card updates \u2014 nested calls, progress, agent previews. Off emits every update."
1296
+ )
1297
+ }
1298
+ ),
1299
+ setting("ui.maxRows", "Max rows", String(config.ui.maxRows), {
1300
+ description: "Maximum rows rendered by the activity widget.",
1301
+ submenu: numericSubmenu(
1302
+ theme,
1303
+ [1, 2, 3, 5, 6, 8, 10, 15, 20],
1304
+ String,
1305
+ "Widget max rows",
1306
+ "Maximum rows rendered by the activity widget."
1307
+ )
1308
+ }),
1309
+ setting("ui.refreshMs", "Refresh interval", formatMs(config.ui.refreshMs), {
1310
+ description: "Refresh interval for the activity widget.",
1311
+ submenu: numericSubmenu(
1312
+ theme,
1313
+ [100, 250, 500, 1e3, 2e3],
1314
+ formatMs,
1315
+ "Widget refresh interval",
1316
+ "Refresh interval for the activity widget."
1317
+ )
1318
+ }),
1319
+ setting("ui.eventHistory", "Event history", String(config.ui.eventHistory), {
1320
+ description: "Number of mesh events kept in the dashboard history.",
1321
+ submenu: numericSubmenu(
1322
+ theme,
1323
+ [20, 40, 80, 120, 200, 500],
1324
+ String,
1325
+ "Event history",
1326
+ "Number of mesh events kept in the dashboard history."
1327
+ )
1328
+ })
1329
+ ],
1330
+ persist
1331
+ )
1332
+ }),
1333
+ setting("compaction", "Compaction", summaryFor("compaction", config), {
1334
+ description: "Compaction engine used at session compaction boundaries.",
1335
+ submenu: sectionSubmenu(
1336
+ theme,
1337
+ "Compaction",
1338
+ "Choose Fabric deterministic compaction or OMP core model-driven compaction.",
1339
+ [
1340
+ ...options.activeModelKey ? [setting(
1341
+ COMPACTION_THRESHOLD_SETTING_ID,
1342
+ "Threshold",
1343
+ formatCompactionThreshold(config, options.activeModelKey),
1344
+ {
1345
+ description: `Context usage that triggers compaction for ${options.activeModelKey}, as a percent of its window or an exact token count.`,
1346
+ submenu: compactionThresholdSubmenu(theme)
1347
+ }
1348
+ )] : [],
1349
+ setting("compaction.engine", "Engine", config.compaction.engine, {
1350
+ description: "Fabric uses deterministic branch summaries; OMP delegates compaction to OMP core.",
1351
+ values: COMPACTION_ENGINES
1352
+ }),
1353
+ setting(
1354
+ "compaction.targetContextRatio",
1355
+ "Max occupancy",
1356
+ String(config.compaction.targetContextRatio),
1357
+ {
1358
+ description: "Hard post-compaction occupancy ceiling; Fabric normally keeps OMP's bounded recent-token tail instead.",
1359
+ values: COMPACTION_TARGET_RATIOS
1360
+ }
1361
+ )
1362
+ ],
1363
+ persist
1364
+ )
1365
+ }),
1366
+ setting("retention", "Retention", summaryFor("retention", config), {
1367
+ description: "Age-based cleanup for inactive Fabric run artifacts.",
1368
+ submenu: sectionSubmenu(
1369
+ theme,
1370
+ "Retention",
1371
+ "Cleanup only removes dead temporary roots and terminal run artifacts. Active runs and actor session.jsonl files are never modified.",
1372
+ [
1373
+ setting(
1374
+ "retention.orphanedTempRunMs",
1375
+ "Orphaned temp runs",
1376
+ formatRetention(config.retention.orphanedTempRunMs),
1377
+ {
1378
+ description: "Remove temporary run roots this long after their owner process dies.",
1379
+ submenu: numericSubmenu(
1380
+ theme,
1381
+ [36e5, 3 * 36e5, 6 * 36e5, 12 * 36e5, 24 * 36e5],
1382
+ formatRetention,
1383
+ "Orphaned temp runs",
1384
+ "Remove temporary run roots this long after their owner process dies."
1385
+ )
1386
+ }
1387
+ ),
1388
+ setting(
1389
+ "retention.oneShotRunMs",
1390
+ "One-shot runs",
1391
+ formatRetention(config.retention.oneShotRunMs),
1392
+ {
1393
+ description: "Retain completed one-shot agent run artifacts for this duration.",
1394
+ submenu: numericSubmenu(
1395
+ theme,
1396
+ [6 * 36e5, 12 * 36e5, 24 * 36e5, 2 * 864e5, 3 * 864e5, 7 * 864e5],
1397
+ formatRetention,
1398
+ "One-shot runs",
1399
+ "Retain completed one-shot agent run artifacts for this duration."
1400
+ )
1401
+ }
1402
+ ),
1403
+ setting(
1404
+ "retention.actorRunArchiveMs",
1405
+ "Actor run archives",
1406
+ formatRetention(config.retention.actorRunArchiveMs),
1407
+ {
1408
+ description: "Retain terminal actor run archives for this duration; the latest run is always preserved.",
1409
+ submenu: numericSubmenu(
1410
+ theme,
1411
+ [864e5, 3 * 864e5, 7 * 864e5, 14 * 864e5, 30 * 864e5, 90 * 864e5],
1412
+ formatRetention,
1413
+ "Actor run archives",
1414
+ "Retain terminal actor run archives for this duration; the latest run is always preserved."
1415
+ )
1416
+ }
1417
+ )
1418
+ ],
1419
+ persist
1420
+ )
1421
+ }),
1422
+ setting("mesh", "Mesh", summaryFor("mesh", config), {
1423
+ description: "Durable mesh coordination store and actors.",
1424
+ submenu: sectionSubmenu(
1425
+ theme,
1426
+ "Mesh",
1427
+ "Durable mesh coordination store and actors.",
1428
+ [
1429
+ setting("mesh.enabled", "Enabled", config.mesh.enabled ? "true" : "false", {
1430
+ description: "Enable the durable mesh store and actor providers.",
1431
+ values: BOOLEANS
1432
+ }),
1433
+ setting("mesh.actorScope", "Actor scope", config.mesh.actorScope, {
1434
+ description: "Default storage for newly created actors. Each agents.create call may choose project or session independently; project actors are shared, while session actors follow the root OMP session and its participant agents.",
1435
+ values: ACTOR_SCOPES
1436
+ }),
1437
+ setting("mesh.maxReadEvents", "Max read events", String(config.mesh.maxReadEvents), {
1438
+ description: "Maximum events returned by a single mesh read.",
1439
+ submenu: numericSubmenu(
1440
+ theme,
1441
+ [100, 200, 500, 1e3, 5e3],
1442
+ String,
1443
+ "Max read events",
1444
+ "Maximum events returned by a single mesh read."
1445
+ )
1446
+ }),
1447
+ setting("mesh.actorPollMs", "Actor poll fallback", formatMs(config.mesh.actorPollMs), {
1448
+ description: "Fallback polling interval when mesh filesystem notifications are unavailable.",
1449
+ submenu: numericSubmenu(
1450
+ theme,
1451
+ [50, 100, 250, 500, 1e3],
1452
+ formatMs,
1453
+ "Actor poll fallback",
1454
+ "Fallback polling interval when mesh filesystem notifications are unavailable."
1455
+ )
1456
+ }),
1457
+ setting("mesh.actorQueueLimit", "Actor queue limit", String(config.mesh.actorQueueLimit), {
1458
+ description: "Maximum messages queued per actor mailbox.",
1459
+ submenu: numericSubmenu(
1460
+ theme,
1461
+ [4, 8, 16, 32, 64, 128],
1462
+ String,
1463
+ "Actor queue limit",
1464
+ "Maximum messages queued per actor mailbox."
1465
+ )
1466
+ }),
1467
+ setting("mesh.actorContextEntries", "Actor context entries", String(config.mesh.actorContextEntries), {
1468
+ description: "Transcript entries forwarded to actors as context.",
1469
+ submenu: numericSubmenu(
1470
+ theme,
1471
+ [3, 5, 10, 14, 20, 50],
1472
+ String,
1473
+ "Actor context entries",
1474
+ "Transcript entries forwarded to actors as context."
1475
+ )
1476
+ }),
1477
+ setting("mesh.eventContextChars", "Event context chars", config.mesh.eventContextChars.toLocaleString(), {
1478
+ description: "Character cap applied to host events dispatched to actors.",
1479
+ submenu: numericSubmenu(
1480
+ theme,
1481
+ [1e4, 2e4, 4e4, 8e4, 16e4],
1482
+ (n) => n.toLocaleString(),
1483
+ "Event context chars",
1484
+ "Character cap applied to host events dispatched to actors."
1485
+ )
1486
+ })
1487
+ ],
1488
+ persist
1489
+ )
1490
+ }),
1491
+ setting("codePreview", "Code previews", summaryFor("codePreview", config), {
1492
+ description: "Core tool previews, diffs, and Shiki syntax highlighting.",
1493
+ submenu: sectionSubmenu(
1494
+ theme,
1495
+ "Code previews",
1496
+ "Core tool previews, diffs, and Shiki syntax highlighting. Persisted to fabric.json codePreview.",
1497
+ [
1498
+ setting("codePreview.shikiTheme", "Shiki theme", config.codePreview.shikiTheme, {
1499
+ description: `"auto" follows OMP's resolved light/dark variant; "<light>/<dark>" pins both; any other value fixes one theme.`,
1500
+ submenu: stringOptionsSubmenu(
1501
+ theme,
1502
+ SHIKI_THEME_PRESETS,
1503
+ "Shiki theme",
1504
+ `"auto" follows OMP's light/dark switching (github-light/dark-plus); "<light>/<dark>" pins both variants.`
1505
+ )
1506
+ }),
1507
+ setting("codePreview.syntaxHighlighting", "Syntax highlighting", config.codePreview.syntaxHighlighting ? "true" : "false", {
1508
+ description: "Highlight code in previews with Shiki.",
1509
+ values: BOOLEANS
1510
+ }),
1511
+ setting("codePreview.diffIntensity", "Diff background", config.codePreview.diffIntensity, {
1512
+ description: "Full-row background tint for added and removed diff lines.",
1513
+ values: DIFF_INTENSITIES
1514
+ }),
1515
+ setting("codePreview.wordEmphasis", "Word emphasis", config.codePreview.wordEmphasis, {
1516
+ description: "Highlight changed words inside added and removed diff lines.",
1517
+ values: WORD_EMPHASES
1518
+ }),
1519
+ setting("codePreview.toolCallBackground", "Tool call background", config.codePreview.toolCallBackground, {
1520
+ description: "Background treatment for tool call frames.",
1521
+ values: TOOL_CALL_BACKGROUNDS
1522
+ }),
1523
+ setting("codePreview.toolCallTiming", "Tool call timing", config.codePreview.toolCallTiming ? "true" : "false", {
1524
+ description: "Show per-call duration on tool frames.",
1525
+ values: BOOLEANS
1526
+ }),
1527
+ setting("codePreview.pathIcons", "Path icons", config.codePreview.pathIcons, {
1528
+ description: "Icon set for path tree previews.",
1529
+ values: PATH_ICON_MODES
1530
+ }),
1531
+ setting("codePreview.readCollapsedLines", "Read lines", String(config.codePreview.readCollapsedLines), {
1532
+ description: "Collapsed read preview budget.",
1533
+ submenu: numericSubmenu(theme, [3, 5, 10, 15, 20, 30], String, "Read lines", "Collapsed read preview budget.")
1534
+ }),
1535
+ setting("codePreview.writeCollapsedLines", "Write lines", String(config.codePreview.writeCollapsedLines), {
1536
+ description: "Collapsed write preview budget.",
1537
+ submenu: numericSubmenu(theme, [3, 5, 10, 15, 20, 30], String, "Write lines", "Collapsed write preview budget.")
1538
+ }),
1539
+ setting(
1540
+ CODE_PREVIEW_EDIT_LINES_ID,
1541
+ "Edit diff lines",
1542
+ config.codePreview.editCollapsedLines === "all" ? CODE_PREVIEW_ALL_LINES : String(config.codePreview.editCollapsedLines),
1543
+ {
1544
+ description: "Collapsed edit diff budget, or every diff line.",
1545
+ submenu: stringOptionsSubmenu(
1546
+ theme,
1547
+ ["10", "40", "80", "160", "320", CODE_PREVIEW_ALL_LINES],
1548
+ "Edit diff lines",
1549
+ "Collapsed edit diff budget, or every diff line."
1550
+ )
1551
+ }
1552
+ ),
1553
+ setting("codePreview.grepCollapsedLines", "Grep lines", String(config.codePreview.grepCollapsedLines), {
1554
+ description: "Collapsed grep result budget.",
1555
+ submenu: numericSubmenu(theme, [5, 10, 15, 25, 40], String, "Grep lines", "Collapsed grep result budget.")
1556
+ }),
1557
+ setting("codePreview.pathListCollapsedLines", "Path list lines", String(config.codePreview.pathListCollapsedLines), {
1558
+ description: "Collapsed find/ls path tree budget.",
1559
+ submenu: numericSubmenu(theme, [10, 20, 40, 80], String, "Path list lines", "Collapsed find/ls path tree budget.")
1560
+ }),
1561
+ setting("codePreview.readContentPreview", "Read preview", config.codePreview.readContentPreview ? "true" : "false", {
1562
+ description: "Show file content previews for read calls.",
1563
+ values: BOOLEANS
1564
+ }),
1565
+ setting("codePreview.writeContentPreview", "Write preview", config.codePreview.writeContentPreview ? "true" : "false", {
1566
+ description: "Show content previews for write calls.",
1567
+ values: BOOLEANS
1568
+ }),
1569
+ setting("codePreview.editDiffPreview", "Edit diff preview", config.codePreview.editDiffPreview ? "true" : "false", {
1570
+ description: "Show diffs for edit calls.",
1571
+ values: BOOLEANS
1572
+ }),
1573
+ setting("codePreview.grepResultPreview", "Grep results", config.codePreview.grepResultPreview ? "true" : "false", {
1574
+ description: "Show grouped grep result previews.",
1575
+ values: BOOLEANS
1576
+ }),
1577
+ setting("codePreview.findResultPreview", "Find results", config.codePreview.findResultPreview ? "true" : "false", {
1578
+ description: "Show find result path trees.",
1579
+ values: BOOLEANS
1580
+ }),
1581
+ setting("codePreview.lsResultPreview", "Ls results", config.codePreview.lsResultPreview ? "true" : "false", {
1582
+ description: "Show ls result path trees.",
1583
+ values: BOOLEANS
1584
+ }),
1585
+ setting("codePreview.readLineNumbers", "Read line numbers", config.codePreview.readLineNumbers ? "true" : "false", {
1586
+ description: "Show line-number gutters in read previews.",
1587
+ values: BOOLEANS
1588
+ }),
1589
+ setting("codePreview.bashResultPreview", "Bash results", config.codePreview.bashResultPreview ? "true" : "false", {
1590
+ description: "Show bash output previews.",
1591
+ values: BOOLEANS
1592
+ }),
1593
+ setting("codePreview.bashWarnings", "Bash warnings", config.codePreview.bashWarnings ? "true" : "false", {
1594
+ description: "Annotate risky bash commands.",
1595
+ values: BOOLEANS
1596
+ }),
1597
+ setting("codePreview.secretWarnings", "Secret warnings", config.codePreview.secretWarnings ? "true" : "false", {
1598
+ description: "Flag suspected secrets in previews.",
1599
+ values: BOOLEANS
1600
+ })
1601
+ ],
1602
+ persist
1603
+ )
1604
+ })
1605
+ ];
1606
+ return markDrillIn(items);
1607
+ };
1608
+ var RPC_BACK = "\u2190 Back";
1609
+ var RPC_DONE = "Done";
1610
+ var RPC_SWITCH_SCOPE = "Switch save scope";
1611
+ var rpcTitle = (path, description) => description ? `${path}
1612
+ ${description}` : path;
1613
+ var cleanSettingLabel = (label) => label.replace(/\s+›$/, "");
1614
+ var rpcSettingRow = (item) => {
1615
+ const label = cleanSettingLabel(item.label);
1616
+ const current = item.currentValue ? ` \xB7 ${item.currentValue}` : "";
1617
+ return item.description ? `${label}${current} \u2014 ${item.description}` : `${label}${current}`;
1618
+ };
1619
+ var rpcChoiceRow = (choice) => {
1620
+ const current = choice.current ? " \xB7 Current" : "";
1621
+ return choice.description ? `${choice.label}${current} \u2014 ${choice.description}` : `${choice.label}${current}`;
1622
+ };
1623
+ var selectRpcChoice = async (context, title, choices) => {
1624
+ const rows = choices.map(rpcChoiceRow);
1625
+ const selected = await context.ui.select(title, rows);
1626
+ if (selected === void 0) return void 0;
1627
+ const index = rows.indexOf(selected);
1628
+ return index < 0 ? void 0 : choices[index]?.value;
1629
+ };
1630
+ var browseRpcSettings = async (context, path, description, items, onChange) => {
1631
+ while (true) {
1632
+ const rows = items.map(rpcSettingRow);
1633
+ const selected = await context.ui.select(rpcTitle(path, description), [...rows, RPC_BACK]);
1634
+ if (selected === void 0 || selected === RPC_BACK) return;
1635
+ const index = rows.indexOf(selected);
1636
+ const item = index < 0 ? void 0 : items[index];
1637
+ if (!item) continue;
1638
+ await editRpcSetting(context, `${path} \u203A ${cleanSettingLabel(item.label)}`, item, onChange);
1639
+ }
1640
+ };
1641
+ var editRpcSetting = async (context, path, item, onChange) => {
1642
+ if (!item.submenu) {
1643
+ const values = item.values ?? [];
1644
+ if (values.length === 0) {
1645
+ context.ui.notify(`${cleanSettingLabel(item.label)} is read-only`, "info");
1646
+ return;
1647
+ }
1648
+ const selected = await selectRpcChoice(
1649
+ context,
1650
+ rpcTitle(path, item.description),
1651
+ unique([item.currentValue, ...values]).map((value) => ({
1652
+ value,
1653
+ label: value,
1654
+ current: value === item.currentValue
1655
+ }))
1656
+ );
1657
+ if (selected === void 0) return;
1658
+ item.currentValue = selected;
1659
+ onChange(item.id, selected);
1660
+ return;
1661
+ }
1662
+ let completed = false;
1663
+ let selectedValue;
1664
+ const component = item.submenu(item.currentValue, (value) => {
1665
+ completed = true;
1666
+ selectedValue = value;
1667
+ });
1668
+ if (component instanceof SectionSubmenu) {
1669
+ await browseRpcSettings(
1670
+ context,
1671
+ path,
1672
+ item.description,
1673
+ component.items,
1674
+ (id, value) => {
1675
+ const child = component.items.find((candidate) => candidate.id === id);
1676
+ if (child) child.currentValue = value;
1677
+ component.applyChange(id, value);
1678
+ }
1679
+ );
1680
+ return;
1681
+ }
1682
+ if (component instanceof SelectSubmenu) {
1683
+ const selected = await selectRpcChoice(
1684
+ context,
1685
+ rpcTitle(path, item.description),
1686
+ component.options.map((option) => ({
1687
+ value: option.value,
1688
+ label: option.label,
1689
+ ...option.description ? { description: option.description } : {},
1690
+ current: option.value === item.currentValue || option.label === item.currentValue
1691
+ }))
1692
+ );
1693
+ if (selected === void 0 || !component.selectRpc(selected)) return;
1694
+ } else if (component instanceof IntegerInputSubmenu) {
1695
+ while (!completed) {
1696
+ const value = await context.ui.input(rpcTitle(path, item.description), component.input.getValue());
1697
+ if (value === void 0) return;
1698
+ if (!/^\d+$/.test(value.trim()) || !Number.isSafeInteger(Number(value.trim()))) {
1699
+ context.ui.notify("Enter a non-negative safe integer.", "warning");
1700
+ continue;
1701
+ }
1702
+ component.submitRpc(value);
1703
+ }
1704
+ } else if (component instanceof StringInputSubmenu) {
1705
+ const value = await context.ui.input(rpcTitle(path, item.description), component.input.getValue());
1706
+ if (value === void 0) return;
1707
+ component.submitRpc(value);
1708
+ } else if (component instanceof CompactionThresholdSubmenu) {
1709
+ const selected = await selectRpcChoice(
1710
+ context,
1711
+ rpcTitle(path, item.description),
1712
+ [
1713
+ { value: COMPACTION_DEFAULT_THRESHOLD_LABEL, label: COMPACTION_DEFAULT_THRESHOLD_LABEL, current: item.currentValue === COMPACTION_DEFAULT_THRESHOLD_LABEL },
1714
+ { value: COMPACTION_PERCENT_OPTION_LABEL, label: COMPACTION_PERCENT_OPTION_LABEL, current: item.currentValue.endsWith("%") },
1715
+ { value: COMPACTION_TOKENS_OPTION_LABEL, label: COMPACTION_TOKENS_OPTION_LABEL, current: item.currentValue.endsWith(" tokens") }
1716
+ ]
1717
+ );
1718
+ if (selected === void 0) return;
1719
+ if (selected === COMPACTION_DEFAULT_THRESHOLD_LABEL) {
1720
+ component.completeRpc(selected);
1721
+ } else {
1722
+ const percent = /^(\d+)%$/.exec(item.currentValue)?.[1] ?? "";
1723
+ const tokenText = /^(.+?) tokens$/.exec(item.currentValue)?.[1];
1724
+ const placeholder = selected === COMPACTION_PERCENT_OPTION_LABEL ? percent : tokenText === void 0 ? "" : String(parseFormattedNumericValue(tokenText));
1725
+ const input = await context.ui.input(rpcTitle(path, item.description), placeholder);
1726
+ if (input === void 0 || !/^\d+$/.test(input.trim())) return;
1727
+ const numeric = Number(input.trim());
1728
+ component.completeRpc(
1729
+ selected === COMPACTION_PERCENT_OPTION_LABEL ? `${clampCompactionPercentThreshold(numeric)}%` : `${formatTokens(clampCompactionTokenThreshold(numeric))} tokens`
1730
+ );
1731
+ }
1732
+ } else if (component instanceof FabricModelSelector) {
1733
+ const selected = await selectRpcChoice(
1734
+ context,
1735
+ rpcTitle(path, item.description),
1736
+ component.rpcChoices().map((choice) => ({
1737
+ value: choice.value,
1738
+ label: choice.label,
1739
+ description: choice.description,
1740
+ current: choice.current
1741
+ }))
1742
+ );
1743
+ if (selected === void 0 || !component.selectRpc(selected)) return;
1744
+ } else {
1745
+ context.ui.notify(`${cleanSettingLabel(item.label)} requires terminal UI`, "warning");
1746
+ return;
1747
+ }
1748
+ if (!completed || selectedValue === void 0) return;
1749
+ item.currentValue = selectedValue;
1750
+ onChange(item.id, selectedValue);
1751
+ };
1752
+ var openRpcFabricSettings = async (context, options) => {
1753
+ while (true) {
1754
+ const scope = options.getScope();
1755
+ const items = options.itemsForScope(scope);
1756
+ const rows = items.map(rpcSettingRow);
1757
+ const scopeDestination = scope === "project" ? "Project overrides (.omp/fabric.json)" : "Global defaults (<active OMP agent dir>/fabric.json)";
1758
+ const controls = [
1759
+ ...options.projectScopeAvailable ? [`${RPC_SWITCH_SCOPE} \xB7 ${scope === "project" ? "Global defaults" : "Project overrides"}`] : [],
1760
+ RPC_DONE
1761
+ ];
1762
+ const selected = await context.ui.select(
1763
+ rpcTitle("Fabric settings", `Editing: ${scopeDestination}`),
1764
+ [...rows, ...controls]
1765
+ );
1766
+ if (selected === void 0 || selected === RPC_DONE) return;
1767
+ if (selected.startsWith(RPC_SWITCH_SCOPE)) {
1768
+ options.setScope(scope === "project" ? "global" : "project");
1769
+ continue;
1770
+ }
1771
+ const index = rows.indexOf(selected);
1772
+ const item = index < 0 ? void 0 : items[index];
1773
+ if (!item) continue;
1774
+ await editRpcSetting(context, `Fabric settings \u203A ${cleanSettingLabel(item.label)}`, item, options.persist);
1775
+ }
1776
+ };
1777
+ async function openFabricSettings(context, deps) {
1778
+ await deps.state.ensure(context);
1779
+ const { getAgentDir } = await import("@oh-my-pi/pi-utils");
1780
+ const agentDir = getAgentDir();
1781
+ const projectTrusted = context.isProjectTrusted();
1782
+ const configLocation = { cwd: context.cwd, agentDir, projectTrusted };
1783
+ let saveScope = projectTrusted ? "project" : "global";
1784
+ let settingsConfig = loadFabricConfigForScope(configLocation, saveScope);
1785
+ let rootComponent;
1786
+ const changedSections = /* @__PURE__ */ new Set();
1787
+ let dirty = false;
1788
+ const activeModelKey = context.model ? modelKey(context.model.provider, context.model.id) : void 0;
1789
+ const apply = (id, value) => {
1790
+ const partial = id === COMPACTION_THRESHOLD_SETTING_ID && activeModelKey ? compactionThresholdPartial(activeModelKey, value) : buildPartial(id, value);
1791
+ try {
1792
+ saveFabricConfig(
1793
+ { cwd: context.cwd, agentDir, projectTrusted, scope: saveScope },
1794
+ partial
1795
+ );
1796
+ } catch (error) {
1797
+ context.ui.notify(
1798
+ `Failed to save Fabric settings: ${error instanceof Error ? error.message : String(error)}`,
1799
+ "error"
1800
+ );
1801
+ return;
1802
+ }
1803
+ deps.state.reloadConfig(context);
1804
+ Object.assign(settingsConfig, loadFabricConfigForScope(configLocation, saveScope));
1805
+ deps.onConfigApplied?.(id);
1806
+ dirty = true;
1807
+ changedSections.add(id.split(".")[0] ?? id);
1808
+ const list = rootComponent?.settingsList;
1809
+ if (list) for (const rootId of ROOT_ITEM_IDS) list.updateValue(rootId, summaryFor(rootId, settingsConfig));
1810
+ };
1811
+ const persist = (id, newValue) => apply(id, coerceValue(id, newValue, settingsConfig));
1812
+ const keepVisibleCandidates = unique([
1813
+ "fabric_exec",
1814
+ ...deps.capturedTools.list().map((tool) => tool.name)
1815
+ ]);
1816
+ const modelSource = buildModelSource(context.modelRegistry, agentDir);
1817
+ const configuredClaudeModel = deps.state.config.agents.claude.model;
1818
+ const claudeModelSource = {
1819
+ models: configuredClaudeModel ? [{ provider: "claude", id: configuredClaudeModel.replace(/^claude\//, "") }] : [],
1820
+ lastUsed: {}
1821
+ };
1822
+ void populateClaudeModelSource(
1823
+ claudeModelSource,
1824
+ () => deps.state.agents.claudeModels()
1825
+ ).catch((error) => {
1826
+ if (deps.state.config.agents.runner === "claude") {
1827
+ context.ui.notify(
1828
+ `Claude model discovery failed: ${error instanceof Error ? error.message : String(error)}`,
1829
+ "warning"
1830
+ );
1831
+ }
1832
+ });
1833
+ const toolCandidates = keepVisibleCandidates;
1834
+ const itemsForScope = (scope, theme) => {
1835
+ settingsConfig = loadFabricConfigForScope(configLocation, scope);
1836
+ return buildFabricSettingsItems(theme, settingsConfig, apply, {
1837
+ keepVisibleCandidates,
1838
+ toolCandidates,
1839
+ modelSource,
1840
+ claudeModelSource,
1841
+ ...activeModelKey ? { activeModelKey } : {}
1842
+ });
1843
+ };
1844
+ if (context.mode === "rpc") {
1845
+ await openRpcFabricSettings(context, {
1846
+ projectScopeAvailable: projectTrusted,
1847
+ getScope: () => saveScope,
1848
+ setScope: (scope) => {
1849
+ saveScope = scope;
1850
+ },
1851
+ itemsForScope: (scope) => itemsForScope(scope, context.ui.theme),
1852
+ persist
1853
+ });
1854
+ } else if (context.mode !== "tui") {
1855
+ context.ui.notify("Fabric settings require an interactive UI", "warning");
1856
+ return;
1857
+ } else {
1858
+ await context.ui.custom(
1859
+ (tui, theme, _keybindings, done) => {
1860
+ const component = new FabricSettingsComponent(
1861
+ theme,
1862
+ itemsForScope(saveScope, theme),
1863
+ persist,
1864
+ () => done(),
1865
+ {
1866
+ initialSaveScope: saveScope,
1867
+ projectScopeAvailable: projectTrusted,
1868
+ onSaveScopeChange: (scope) => {
1869
+ saveScope = scope;
1870
+ tui.requestRender();
1871
+ },
1872
+ itemsForSaveScope: (scope) => itemsForScope(scope, theme)
1873
+ }
1874
+ );
1875
+ rootComponent = component;
1876
+ return component;
1877
+ }
1878
+ );
1879
+ }
1880
+ if (dirty) {
1881
+ deps.applyFabricMode();
1882
+ const needsReload = [...changedSections].some((section) => RELOAD_SECTIONS.has(section));
1883
+ if (needsReload) {
1884
+ context.ui.notify(
1885
+ "Fabric settings saved. Run /fabric reload to apply mesh, agent, and MCP changes.",
1886
+ "info"
1887
+ );
1888
+ } else if (changedSections.has("schema")) {
1889
+ context.ui.notify(
1890
+ "Fabric settings saved. Schema changes take effect in the next session.",
1891
+ "info"
1892
+ );
1893
+ } else {
1894
+ context.ui.notify("Fabric settings saved.", "info");
1895
+ }
1896
+ }
1897
+ }
1898
+ export {
1899
+ FabricSettingsComponent,
1900
+ buildFabricSettingsItems,
1901
+ compactionThresholdPartial,
1902
+ executorMemoryLimitOptions,
1903
+ openFabricSettings,
1904
+ parseBudgetValue,
1905
+ parseFormattedNumericValue,
1906
+ populateClaudeModelSource
1907
+ };
1908
+ //# sourceMappingURL=settings.js.map