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,1265 @@
1
+ import {
2
+ DEFAULT_FABRIC_THINKING,
3
+ defaultCodePreviewSettings,
4
+ isFabricThinking,
5
+ normalizeCodePreviewSettings
6
+ } from "./chunk-JSBTB3P6.js";
7
+ import {
8
+ renameAtomic
9
+ } from "./chunk-KAD7UWT2.js";
10
+ import {
11
+ OMP_CORE_TOOL_NAME_SET
12
+ } from "./chunk-6N4XGAZY.js";
13
+
14
+ // src/core/model-resolution.ts
15
+ var PROVIDER_MODEL_RE = /^[^\s/]+\/[^\s/]+$/;
16
+ var FUZZY_RESOLUTION_MARKERS = ["closest", "recent", "latest"];
17
+ var modelKey = (model) => `${model.provider}/${model.id}`;
18
+ var sameModel = (left, right) => right !== void 0 && left.provider.toLowerCase() === right.provider.toLowerCase() && left.id.toLowerCase() === right.id.toLowerCase();
19
+ var normalizeModelAliases = (input) => {
20
+ if (typeof input !== "object" || input === null || Array.isArray(input)) return {};
21
+ const aliases = {};
22
+ for (const [rawName, rawValue] of Object.entries(input)) {
23
+ const name = rawName.trim();
24
+ if (!name) continue;
25
+ const values = typeof rawValue === "string" ? [rawValue] : rawValue;
26
+ if (!Array.isArray(values) || values.length === 0) continue;
27
+ const targets = [];
28
+ let valid = true;
29
+ for (const candidate of values) {
30
+ if (typeof candidate !== "string") {
31
+ valid = false;
32
+ break;
33
+ }
34
+ const target = candidate.trim();
35
+ if (!PROVIDER_MODEL_RE.test(target)) {
36
+ valid = false;
37
+ break;
38
+ }
39
+ if (!targets.includes(target)) targets.push(target);
40
+ }
41
+ if (valid && targets.length > 0) aliases[name] = targets;
42
+ }
43
+ return aliases;
44
+ };
45
+ var FUZZY_MIN_QUERY_LENGTH = 4;
46
+ var FUZZY_LEVENSHTEIN_MIN_RATIO = 0.55;
47
+ var subsequenceSpan = (needle, haystack) => {
48
+ let index = 0;
49
+ let first = -1;
50
+ let last = -1;
51
+ for (let i = 0; i < haystack.length && index < needle.length; i += 1) {
52
+ if (haystack[i] === needle[index]) {
53
+ if (first === -1) first = i;
54
+ last = i;
55
+ index += 1;
56
+ }
57
+ }
58
+ return index === needle.length ? last - first + 1 : Number.POSITIVE_INFINITY;
59
+ };
60
+ var levenshteinRatio = (left, right) => {
61
+ if (left === right) return 1;
62
+ if (left.length === 0 || right.length === 0) return 0;
63
+ let previous = Array.from({ length: right.length + 1 }, (_, column) => column);
64
+ for (let i = 0; i < left.length; i += 1) {
65
+ const current = [i + 1];
66
+ for (let j = 0; j < right.length; j += 1) {
67
+ current.push(Math.min(
68
+ previous[j] + 1,
69
+ current[j] + 1,
70
+ previous[j] + (left[i] === right[j] ? 0 : 1)
71
+ ));
72
+ }
73
+ previous = current;
74
+ }
75
+ return 1 - previous[right.length] / Math.max(left.length, right.length);
76
+ };
77
+ var closenessScore = (query, model) => {
78
+ const id = model.id.toLowerCase();
79
+ const name = model.name?.toLowerCase();
80
+ if (id.startsWith(query)) return 60 + query.length / id.length * 20;
81
+ if (id.includes(query)) return 50 + query.length / id.length * 15;
82
+ if (name?.startsWith(query) === true) return 45 + query.length / name.length * 15;
83
+ if (name?.includes(query) === true) return 40 + query.length / name.length * 10;
84
+ if (model.provider.toLowerCase().includes(query)) return 25;
85
+ if (query.length >= 3 && query[0] === id[0] && subsequenceSpan(query, id) <= query.length + 2) {
86
+ return 18 + query.length / id.length * 6;
87
+ }
88
+ if (query.length >= FUZZY_MIN_QUERY_LENGTH) {
89
+ const idRatio = levenshteinRatio(query, id);
90
+ if (idRatio >= FUZZY_LEVENSHTEIN_MIN_RATIO) return 8 + idRatio * 10;
91
+ if (name !== void 0) {
92
+ const nameRatio = levenshteinRatio(query, name);
93
+ if (nameRatio >= FUZZY_LEVENSHTEIN_MIN_RATIO) return 6 + nameRatio * 8;
94
+ }
95
+ }
96
+ return 0;
97
+ };
98
+ var pickClosestCandidate = (query, pool, lastUsed) => {
99
+ const usage = {};
100
+ for (const [key, value] of Object.entries(lastUsed ?? {})) {
101
+ usage[key.toLowerCase()] = value;
102
+ }
103
+ const recency = (model) => usage[`${model.provider}/${model.id}`.toLowerCase()] ?? 0;
104
+ let best;
105
+ let bestScore = 0;
106
+ let tied = false;
107
+ for (const model of pool) {
108
+ const score = closenessScore(query, model);
109
+ if (score <= 0) continue;
110
+ if (best === void 0 || score > bestScore) {
111
+ best = model;
112
+ bestScore = score;
113
+ tied = false;
114
+ continue;
115
+ }
116
+ if (score === bestScore) {
117
+ tied = true;
118
+ const bestRecent = recency(best);
119
+ const nextRecent = recency(model);
120
+ if (nextRecent > bestRecent || nextRecent === bestRecent && modelKey(model) > modelKey(best)) {
121
+ best = model;
122
+ }
123
+ }
124
+ }
125
+ if (best === void 0) return void 0;
126
+ const runnersUp = pool.filter(
127
+ (model) => model !== best && closenessScore(query, model) === bestScore
128
+ );
129
+ const wonOnRecency = tied && runnersUp.some((model) => recency(model) !== recency(best));
130
+ return {
131
+ model: best,
132
+ via: !tied ? "closest" : wonOnRecency ? "recent" : "latest"
133
+ };
134
+ };
135
+ var resolveFabricModel = (query, options) => {
136
+ const normalized = query.trim().toLowerCase();
137
+ if (!normalized) return { kind: "not-found", query };
138
+ const providerFilter = options.provider?.trim().toLowerCase();
139
+ const available = providerFilter ? options.available.filter((model) => model.provider.toLowerCase() === providerFilter) : [...options.available];
140
+ if (available.length === 0) return { kind: "not-found", query };
141
+ const aliasKey = Object.keys(options.aliases).find(
142
+ (key) => key.toLowerCase() === normalized
143
+ );
144
+ const tried = [];
145
+ if (aliasKey !== void 0) {
146
+ const chain = options.aliases[aliasKey] ?? [];
147
+ for (const target of chain) {
148
+ tried.push(target);
149
+ const separator = target.indexOf("/");
150
+ const provider = target.slice(0, separator);
151
+ const id = target.slice(separator + 1);
152
+ const match = available.find(
153
+ (model) => model.provider.toLowerCase() === provider.toLowerCase() && model.id.toLowerCase() === id.toLowerCase()
154
+ );
155
+ if (match) {
156
+ return sameModel(match, options.current) ? { kind: "already-active", model: match } : { kind: "resolved", model: match, via: aliasKey };
157
+ }
158
+ }
159
+ return { kind: "not-found", query, tried };
160
+ }
161
+ const exact = available.find((model) => modelKey(model).toLowerCase() === normalized) ?? available.find((model) => model.id.toLowerCase() === normalized);
162
+ if (exact) {
163
+ return sameModel(exact, options.current) ? { kind: "already-active", model: exact } : { kind: "resolved", model: exact };
164
+ }
165
+ const candidates = available.filter(
166
+ (model) => model.id.toLowerCase().includes(normalized) || model.name !== void 0 && model.name.toLowerCase().includes(normalized) || model.provider.toLowerCase().includes(normalized)
167
+ );
168
+ if (candidates.length === 1) {
169
+ const match = candidates[0];
170
+ if (match === void 0) return { kind: "not-found", query };
171
+ return sameModel(match, options.current) ? { kind: "already-active", model: match } : { kind: "resolved", model: match };
172
+ }
173
+ const pool = candidates.length > 1 ? candidates : available;
174
+ const picked = pickClosestCandidate(normalized, pool, options.lastUsed);
175
+ if (picked) {
176
+ return sameModel(picked.model, options.current) ? { kind: "already-active", model: picked.model } : { kind: "resolved", model: picked.model, via: picked.via };
177
+ }
178
+ if (candidates.length > 1) return { kind: "ambiguous", query, candidates };
179
+ return { kind: "not-found", query };
180
+ };
181
+ var unavailableOmpModelError = (query, resolution) => {
182
+ const detail = resolution?.kind === "not-found" && resolution.tried !== void 0 ? ` Alias targets tried: ${resolution.tried.join(", ")}.` : resolution?.kind === "ambiguous" ? ` Visible matches: ${resolution.candidates.map(modelKey).join(", ")}.` : "";
183
+ return new Error(
184
+ `Model ${JSON.stringify(query)} is not available to this OMP session.${detail} Use agents.models({ runner: "omp" }) to list the models visible to this session.`
185
+ );
186
+ };
187
+ var resolveAvailableOmpModel = (selector, options) => {
188
+ const query = selector.trim();
189
+ const alias = Object.keys(options.aliases).some(
190
+ (name) => name.toLowerCase() === query.toLowerCase()
191
+ );
192
+ if (PROVIDER_MODEL_RE.test(query) && !alias) {
193
+ const exact = options.available.find(
194
+ (model) => modelKey(model).toLowerCase() === query.toLowerCase()
195
+ );
196
+ if (exact) return exact;
197
+ throw unavailableOmpModelError(query);
198
+ }
199
+ const resolution = resolveFabricModel(query, options);
200
+ if (resolution.kind === "resolved" || resolution.kind === "already-active") {
201
+ return resolution.model;
202
+ }
203
+ throw unavailableOmpModelError(query, resolution);
204
+ };
205
+
206
+ // src/config.ts
207
+ import fs from "node:fs";
208
+ import os from "node:os";
209
+ import path from "node:path";
210
+
211
+ // src/config-migrations.ts
212
+ var CURRENT_FABRIC_CONFIG_VERSION = 4;
213
+ var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
214
+ var mergeObjects = (base, override) => {
215
+ const merged = { ...base };
216
+ for (const [key, value] of Object.entries(override)) {
217
+ const current = merged[key];
218
+ merged[key] = isObject(current) && isObject(value) ? mergeObjects(current, value) : value;
219
+ }
220
+ return merged;
221
+ };
222
+ var migrations = [
223
+ {
224
+ from: 0,
225
+ to: 1,
226
+ migrate(document) {
227
+ const migrated = { ...document };
228
+ const legacy = migrated.subagents;
229
+ const canonical = migrated.agents;
230
+ if (legacy !== void 0) {
231
+ if (canonical !== void 0 && isObject(legacy) !== isObject(canonical)) {
232
+ throw new Error(
233
+ "Fabric configuration cannot merge legacy subagents with a malformed agents section"
234
+ );
235
+ }
236
+ migrated.agents = isObject(legacy) && isObject(canonical) ? mergeObjects(legacy, canonical) : canonical ?? legacy;
237
+ }
238
+ delete migrated.subagents;
239
+ return migrated;
240
+ }
241
+ },
242
+ {
243
+ from: 1,
244
+ to: 2,
245
+ migrate(document) {
246
+ const migrated = { ...document };
247
+ const ui = migrated.ui;
248
+ if (isObject(ui) && Object.hasOwn(ui, "showNestedToolCalls")) {
249
+ const renamed = { ...ui };
250
+ if (!Object.hasOwn(renamed, "showAgentToolPreview")) {
251
+ renamed.showAgentToolPreview = renamed.showNestedToolCalls;
252
+ }
253
+ delete renamed.showNestedToolCalls;
254
+ migrated.ui = renamed;
255
+ }
256
+ return migrated;
257
+ }
258
+ },
259
+ {
260
+ from: 2,
261
+ to: 3,
262
+ migrate(document) {
263
+ const migrated = { ...document };
264
+ const ui = migrated.ui;
265
+ if (isObject(ui) && Object.hasOwn(ui, "nestedToolDebounceMs")) {
266
+ const renamed = { ...ui };
267
+ if (!Object.hasOwn(renamed, "updateDebounceMs")) {
268
+ renamed.updateDebounceMs = renamed.nestedToolDebounceMs;
269
+ }
270
+ delete renamed.nestedToolDebounceMs;
271
+ migrated.ui = renamed;
272
+ }
273
+ return migrated;
274
+ }
275
+ },
276
+ {
277
+ from: 3,
278
+ to: 4,
279
+ migrate(document) {
280
+ const migrated = { ...document };
281
+ const prewalk = migrated.prewalk;
282
+ if (isObject(prewalk) && (prewalk.enabled === "true" || prewalk.enabled === "false")) {
283
+ migrated.prewalk = {
284
+ ...prewalk,
285
+ enabled: prewalk.enabled === "true"
286
+ };
287
+ }
288
+ return migrated;
289
+ }
290
+ }
291
+ ];
292
+ var configVersion = (document) => {
293
+ const value = document.configVersion;
294
+ if (value === void 0) return 0;
295
+ if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
296
+ throw new Error("Fabric configuration configVersion must be a non-negative integer");
297
+ }
298
+ return value;
299
+ };
300
+ var migrateFabricConfigDocument = (input) => {
301
+ const fromVersion = configVersion(input);
302
+ if (fromVersion > CURRENT_FABRIC_CONFIG_VERSION) {
303
+ return {
304
+ document: structuredClone(input),
305
+ fromVersion,
306
+ toVersion: fromVersion,
307
+ appliedVersions: [],
308
+ changed: false,
309
+ forwardCompatible: true
310
+ };
311
+ }
312
+ let version = fromVersion;
313
+ let document = structuredClone(input);
314
+ const appliedVersions = [];
315
+ while (version < CURRENT_FABRIC_CONFIG_VERSION) {
316
+ const migration = migrations.find((candidate) => candidate.from === version);
317
+ if (!migration || migration.to !== version + 1) {
318
+ throw new Error(`No Fabric configuration migration exists for version ${version}`);
319
+ }
320
+ document = migration.migrate(document);
321
+ version = migration.to;
322
+ document.configVersion = version;
323
+ appliedVersions.push(version);
324
+ }
325
+ if (Object.hasOwn(document, "subagents")) {
326
+ throw new Error("Current Fabric configuration contains removed key subagents");
327
+ }
328
+ return {
329
+ document,
330
+ fromVersion,
331
+ toVersion: version,
332
+ appliedVersions,
333
+ changed: appliedVersions.length > 0,
334
+ forwardCompatible: false
335
+ };
336
+ };
337
+
338
+ // src/config.ts
339
+ var MIN_COMPACTION_TOKEN_THRESHOLD = 1e3;
340
+ var MAX_COMPACTION_TOKEN_THRESHOLD = 1e8;
341
+ var MIN_COMPACTION_RATIO_THRESHOLD = 0.25;
342
+ var MAX_COMPACTION_RATIO_THRESHOLD = 0.95;
343
+ var clampCompactionTokenThreshold = (value) => Math.min(
344
+ MAX_COMPACTION_TOKEN_THRESHOLD,
345
+ Math.max(MIN_COMPACTION_TOKEN_THRESHOLD, Math.round(value))
346
+ );
347
+ var clampCompactionRatioThreshold = (value) => Math.min(
348
+ MAX_COMPACTION_RATIO_THRESHOLD,
349
+ Math.max(MIN_COMPACTION_RATIO_THRESHOLD, value)
350
+ );
351
+ var MAX_EXECUTOR_TIMEOUT_MS = 24 * 36e5;
352
+ var MIN_AGENT_TIMEOUT_MS = 1e3;
353
+ var DEFAULT_AGENT_TIMEOUT_MS = 36e5;
354
+ var MAX_AGENT_TIMEOUT_MS = 24 * 36e5;
355
+ var QUICKJS_MAX_MEMORY_LIMIT_BYTES = 4294967295;
356
+ var MAX_EXECUTOR_MEMORY_LIMIT_BYTES = Math.max(
357
+ 8 * 1024 * 1024,
358
+ Math.min(Number.MAX_SAFE_INTEGER, Math.floor(os.totalmem()))
359
+ );
360
+ var maxExecutorMemoryLimitBytes = (runtime) => runtime === "quickjs" ? Math.min(QUICKJS_MAX_MEMORY_LIMIT_BYTES, MAX_EXECUTOR_MEMORY_LIMIT_BYTES) : MAX_EXECUTOR_MEMORY_LIMIT_BYTES;
361
+ var DEFAULT_FABRIC_CONFIG = {
362
+ fullCodeMode: false,
363
+ executor: {
364
+ runtime: "quickjs",
365
+ timeoutMs: 12e4,
366
+ maxTimeoutMs: 9e5,
367
+ hostCallTimeouts: {},
368
+ memoryLimitBytes: 64 * 1024 * 1024,
369
+ maxOutputChars: 5e4,
370
+ maxNestedResultChars: 2e6,
371
+ resultFormat: "auto"
372
+ },
373
+ approvals: {
374
+ read: "allow",
375
+ write: "allow",
376
+ execute: "allow",
377
+ network: "allow",
378
+ agent: "allow"
379
+ },
380
+ mcp: {
381
+ enabled: true,
382
+ disableOAuth: true,
383
+ allowDynamicServers: true,
384
+ callTimeoutMs: 12e4,
385
+ cache: {
386
+ enabled: true,
387
+ revalidate: "changed",
388
+ revalidateBudgetMs: 6e4
389
+ }
390
+ },
391
+ prewalk: {
392
+ mode: "in-place",
393
+ alwaysRearm: false,
394
+ compactOnReturn: true,
395
+ detectShellWrites: true
396
+ },
397
+ agents: {
398
+ enabled: true,
399
+ runner: "omp",
400
+ transport: "process",
401
+ claude: { binary: "claude" },
402
+ veda: { binary: "veda", backend: "agy", persona: "navigator-chat" },
403
+ thinking: DEFAULT_FABRIC_THINKING,
404
+ maxConcurrent: 4,
405
+ maxPerExecution: 100,
406
+ maxDepth: 2,
407
+ timeoutMs: DEFAULT_AGENT_TIMEOUT_MS,
408
+ extensions: true,
409
+ defaultTools: ["read", "bash", "edit", "write", "grep", "find", "ls"],
410
+ retainRuns: false,
411
+ notifyOnComplete: true,
412
+ budgetUsd: 0,
413
+ maxTokensPerChild: 0,
414
+ sessionExport: true,
415
+ sessionExportDir: ""
416
+ },
417
+ components: [],
418
+ capture: {
419
+ enabled: true,
420
+ hideFromModel: true,
421
+ keepVisible: ["fabric_exec"],
422
+ includeTools: [],
423
+ excludeTools: [],
424
+ defaultRisk: "execute",
425
+ risks: {
426
+ read: "read",
427
+ grep: "read",
428
+ find: "read",
429
+ ls: "read",
430
+ edit: "write",
431
+ write: "write",
432
+ bash: "execute",
433
+ fovea_sketch: "read",
434
+ fovea_focus: "read",
435
+ fovea_dwell: "read",
436
+ fovea_impact: "read"
437
+ }
438
+ },
439
+ ui: {
440
+ enabled: true,
441
+ widget: "auto",
442
+ maxRows: 6,
443
+ refreshMs: 500,
444
+ eventHistory: 80,
445
+ haltOnEscape: true,
446
+ showAgentToolPreview: true,
447
+ toolDisplay: "compact",
448
+ updateDebounceMs: 100
449
+ },
450
+ compaction: {
451
+ engine: "fabric",
452
+ targetContextRatio: 0.65,
453
+ thresholds: {},
454
+ tokenThresholds: {}
455
+ },
456
+ retention: {
457
+ orphanedTempRunMs: 6 * 60 * 60 * 1e3,
458
+ oneShotRunMs: 24 * 60 * 60 * 1e3,
459
+ actorRunArchiveMs: 7 * 24 * 60 * 60 * 1e3
460
+ },
461
+ mesh: {
462
+ enabled: true,
463
+ actorScope: "project",
464
+ maxEventBytes: 256 * 1024,
465
+ maxReadEvents: 500,
466
+ actorPollMs: 250,
467
+ actorQueueLimit: 32,
468
+ eventContextChars: 4e4,
469
+ actorContextEntries: 14
470
+ },
471
+ models: {
472
+ aliases: {}
473
+ },
474
+ memory: {
475
+ enabled: true,
476
+ maxSessions: 500,
477
+ maxEntryChars: 2e3,
478
+ indexThinking: false,
479
+ indexToolOutput: true,
480
+ hotSessions: 50,
481
+ digestTerms: 200,
482
+ maxColdVocabularyBytes: 512 * 1024,
483
+ maxColdCacheBytes: 1024 * 1024,
484
+ maxSyncSessions: 1e4,
485
+ maxSyncSourceBytes: 512 * 1024 * 1024,
486
+ maxCacheCleanupFiles: 1e5,
487
+ regexMaxPatternBytes: 1024,
488
+ regexMaxHaystackTerms: 2e4,
489
+ regexMaxHaystackBytes: 2 * 1024 * 1024,
490
+ regexTimeoutMs: 250
491
+ },
492
+ entropy: {
493
+ compile: true
494
+ },
495
+ repairs: {
496
+ enabled: true
497
+ },
498
+ schema: {
499
+ mode: "off",
500
+ certificateTtlMs: 3e4,
501
+ maxFiles: 100,
502
+ maxBytes: 10 * 1024 * 1024,
503
+ trustedCommands: {}
504
+ },
505
+ speculation: {
506
+ enabled: true,
507
+ maxConcurrent: 4,
508
+ maxEntries: 64,
509
+ maxBufferBytes: 2 * 1024 * 1024,
510
+ entryTtlMs: 18e4,
511
+ mcpAllowlist: []
512
+ },
513
+ codePreview: defaultCodePreviewSettings()
514
+ };
515
+ var readJsonObjectFile = (filePath) => {
516
+ try {
517
+ const source = fs.readFileSync(filePath, "utf8");
518
+ const parsed = JSON.parse(source);
519
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
520
+ throw new Error("configuration root must be an object");
521
+ }
522
+ return { document: parsed, source };
523
+ } catch (error) {
524
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return void 0;
525
+ const message = error instanceof Error ? error.message : String(error);
526
+ throw new Error(`Failed to read ${filePath}: ${message}`);
527
+ }
528
+ };
529
+ var mergeObjects2 = (base, override) => {
530
+ const merged = { ...base };
531
+ for (const [key, value] of Object.entries(override)) {
532
+ const baseValue = merged[key];
533
+ if (typeof baseValue === "object" && baseValue !== null && !Array.isArray(baseValue) && typeof value === "object" && value !== null && !Array.isArray(value)) {
534
+ merged[key] = mergeObjects2(
535
+ baseValue,
536
+ value
537
+ );
538
+ } else {
539
+ merged[key] = value;
540
+ }
541
+ }
542
+ return merged;
543
+ };
544
+ var approvalMode = (value, fallback) => value === "allow" || value === "ask" || value === "auto" || value === "deny" ? value : fallback;
545
+ var booleanValue = (value, fallback) => typeof value === "boolean" ? value : fallback;
546
+ var boundedInteger = (value, fallback, min, max) => typeof value === "number" && Number.isInteger(value) ? Math.max(min, Math.min(max, value)) : fallback;
547
+ var boundedFloat = (value, fallback, min, max) => typeof value === "number" && Number.isFinite(value) ? Math.max(min, Math.min(max, value)) : fallback;
548
+ var stringValue = (value) => typeof value === "string" && value.trim() ? value : void 0;
549
+ var runnerValue = (value, fallback) => value === "omp" || value === "claude" || value === "veda" ? value : fallback;
550
+ var prewalkModeValue = (value, fallback) => value === "in-place" || value === "trajectory" ? value : fallback;
551
+ var transportValue = (value, fallback) => value === "auto" || value === "process" || value === "tmux" || value === "screen" || value === "localterm" || value === "herdr" ? value : fallback;
552
+ var thinkingValue = (value, fallback) => isFabricThinking(value) ? value : fallback;
553
+ var objectValue = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
554
+ var widgetModeValue = (value, fallback) => value === "auto" || value === "always" || value === "hidden" ? value : fallback;
555
+ var toolDisplayModeValue = (value, fallback) => value === "full" || value === "compact" ? value : fallback;
556
+ var executorRuntimeValue = (value, fallback) => value === "quickjs" || value === "node-process" || value === "bun-process" ? value : fallback;
557
+ var resultFormatValue = (value, fallback) => value === "auto" || value === "yaml" || value === "json" || value === "text" ? value : fallback;
558
+ var compactionEngineValue = (value, fallback) => value === "omp" || value === "fabric" ? value : fallback;
559
+ var actorScopeValue = (value, fallback) => value === "project" || value === "session" ? value : fallback;
560
+ var schemaModeValue = (value, fallback) => value === "off" || value === "audit" || value === "enforce" ? value : fallback;
561
+ var mcpRevalidatePolicyValue = (value, fallback) => value === "changed" || value === "all" || value === "off" ? value : fallback;
562
+ var riskValue = (value, fallback) => value === "read" || value === "write" || value === "execute" || value === "network" || value === "agent" ? value : fallback;
563
+ var normalizeFabricConfig = (input) => {
564
+ const executor = objectValue(input.executor);
565
+ const executorMaxTimeoutMs = boundedInteger(
566
+ executor.maxTimeoutMs,
567
+ DEFAULT_FABRIC_CONFIG.executor.maxTimeoutMs,
568
+ 1e3,
569
+ MAX_EXECUTOR_TIMEOUT_MS
570
+ );
571
+ const approvals = objectValue(input.approvals);
572
+ const mcp = objectValue(input.mcp);
573
+ const mcpCache = objectValue(mcp.cache);
574
+ const prewalk = objectValue(input.prewalk);
575
+ const agents = objectValue(input.agents);
576
+ const claude = objectValue(agents.claude);
577
+ const veda = objectValue(agents.veda);
578
+ const capture = objectValue(input.capture);
579
+ const toolPolicy = objectValue(input.toolPolicy);
580
+ const ui = objectValue(input.ui);
581
+ const compaction = objectValue(input.compaction);
582
+ const retention = objectValue(input.retention);
583
+ const mesh = objectValue(input.mesh);
584
+ const memory = objectValue(input.memory);
585
+ const entropy = objectValue(input.entropy);
586
+ const repairs = objectValue(input.repairs);
587
+ const modelsSection = objectValue(input.models);
588
+ const schema = objectValue(input.schema);
589
+ const schemaMode = schemaModeValue(schema.mode, DEFAULT_FABRIC_CONFIG.schema.mode);
590
+ const speculation = objectValue(input.speculation);
591
+ const configuredExecutorRuntime = executorRuntimeValue(
592
+ executor.runtime,
593
+ DEFAULT_FABRIC_CONFIG.executor.runtime
594
+ );
595
+ const executorRuntime = schemaMode === "enforce" ? "quickjs" : configuredExecutorRuntime;
596
+ const configuredTools = Array.isArray(agents.defaultTools) ? agents.defaultTools.filter(
597
+ (tool) => typeof tool === "string" && Boolean(tool)
598
+ ) : DEFAULT_FABRIC_CONFIG.agents.defaultTools;
599
+ const approvalModel = stringValue(approvals.model);
600
+ const configPath = stringValue(mcp.configPath);
601
+ const meshRoot = stringValue(mesh.root);
602
+ const memoryIndexDir = stringValue(memory.indexDir);
603
+ const compactionThresholds = Object.fromEntries(
604
+ Object.entries(objectValue(compaction.thresholds)).filter(
605
+ ([model, threshold]) => model.includes("/") && typeof threshold === "number" && Number.isFinite(threshold)
606
+ ).map(([model, threshold]) => [
607
+ model,
608
+ clampCompactionRatioThreshold(threshold)
609
+ ])
610
+ );
611
+ const compactionTokenThresholds = Object.fromEntries(
612
+ Object.entries(objectValue(compaction.tokenThresholds)).filter(
613
+ ([model, tokens]) => model.includes("/") && typeof tokens === "number" && Number.isFinite(tokens)
614
+ ).map(([model, tokens]) => [
615
+ model,
616
+ clampCompactionTokenThreshold(tokens)
617
+ ])
618
+ );
619
+ const prewalkModel = stringValue(prewalk.model);
620
+ const prewalkThinking = isFabricThinking(prewalk.thinking) ? prewalk.thinking : void 0;
621
+ const agentModel = stringValue(agents.model);
622
+ const claudeBinary = stringValue(claude.binary);
623
+ const claudeModel = stringValue(claude.model);
624
+ const vedaBinary = stringValue(veda.binary);
625
+ const vedaBackend = stringValue(veda.backend);
626
+ const vedaModel = stringValue(veda.model);
627
+ const vedaPersona = stringValue(veda.persona);
628
+ const agentThinking = thinkingValue(agents.thinking, DEFAULT_FABRIC_CONFIG.agents.thinking);
629
+ const configuredComponents = Array.isArray(input.components) ? input.components.flatMap((raw) => {
630
+ const componentEntry = objectValue(raw);
631
+ const id = stringValue(componentEntry.id);
632
+ const component = stringValue(componentEntry.component);
633
+ if (!id || !component) return [];
634
+ return [{
635
+ id,
636
+ component,
637
+ ...Object.prototype.hasOwnProperty.call(componentEntry, "config") ? { config: componentEntry.config } : {},
638
+ ...typeof componentEntry.disabled === "boolean" ? { disabled: componentEntry.disabled } : {}
639
+ }];
640
+ }).slice(0, 256) : DEFAULT_FABRIC_CONFIG.components;
641
+ const configuredVisible = Array.isArray(capture.keepVisible) ? capture.keepVisible.filter(
642
+ (name) => typeof name === "string" && Boolean(name.trim())
643
+ ) : DEFAULT_FABRIC_CONFIG.capture.keepVisible;
644
+ const configuredIncluded = Array.isArray(capture.includeTools) ? capture.includeTools.filter(
645
+ (name) => typeof name === "string" && Boolean(name.trim())
646
+ ) : DEFAULT_FABRIC_CONFIG.capture.includeTools;
647
+ const configuredExcluded = Array.isArray(capture.excludeTools) ? capture.excludeTools.filter(
648
+ (name) => typeof name === "string" && Boolean(name.trim())
649
+ ) : DEFAULT_FABRIC_CONFIG.capture.excludeTools;
650
+ const configuredRisks = {
651
+ ...DEFAULT_FABRIC_CONFIG.capture.risks,
652
+ ...objectValue(capture.risks)
653
+ };
654
+ const trustedCommands = Object.fromEntries(
655
+ Object.entries(objectValue(schema.trustedCommands)).flatMap(([name, raw]) => {
656
+ if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/.test(name)) return [];
657
+ const command = objectValue(raw);
658
+ const executable = stringValue(command.command);
659
+ if (!executable) return [];
660
+ const shell = booleanValue(command.shell, false);
661
+ const args = !shell && Array.isArray(command.args) ? command.args.filter((arg) => typeof arg === "string").slice(0, 64) : [];
662
+ return [[name, {
663
+ command: executable,
664
+ args,
665
+ shell,
666
+ timeoutMs: boundedInteger(command.timeoutMs, 3e4, 1, 3e5)
667
+ }]];
668
+ })
669
+ );
670
+ const risks = Object.fromEntries(
671
+ Object.entries(configuredRisks).filter(([name]) => Boolean(name.trim())).map(([name, risk]) => [name, riskValue(risk, DEFAULT_FABRIC_CONFIG.capture.defaultRisk)])
672
+ );
673
+ return {
674
+ fullCodeMode: booleanValue(input.fullCodeMode, DEFAULT_FABRIC_CONFIG.fullCodeMode),
675
+ executor: {
676
+ runtime: executorRuntime,
677
+ maxTimeoutMs: boundedInteger(
678
+ executor.maxTimeoutMs,
679
+ DEFAULT_FABRIC_CONFIG.executor.maxTimeoutMs,
680
+ 1e3,
681
+ MAX_EXECUTOR_TIMEOUT_MS
682
+ ),
683
+ hostCallTimeouts: Object.fromEntries(
684
+ Object.entries(objectValue(executor.hostCallTimeouts)).filter(
685
+ ([ref, value]) => typeof ref === "string" && Boolean(ref.trim()) && typeof value === "number" && Number.isFinite(value) && value >= 1
686
+ ).map(([ref, value]) => [ref, boundedInteger(value, 1e3, 1e3, executorMaxTimeoutMs)])
687
+ ),
688
+ timeoutMs: boundedInteger(
689
+ executor.timeoutMs,
690
+ DEFAULT_FABRIC_CONFIG.executor.timeoutMs,
691
+ 1e3,
692
+ executorMaxTimeoutMs
693
+ ),
694
+ memoryLimitBytes: boundedInteger(
695
+ executor.memoryLimitBytes,
696
+ DEFAULT_FABRIC_CONFIG.executor.memoryLimitBytes,
697
+ 8 * 1024 * 1024,
698
+ maxExecutorMemoryLimitBytes(executorRuntime)
699
+ ),
700
+ maxOutputChars: boundedInteger(
701
+ executor.maxOutputChars,
702
+ DEFAULT_FABRIC_CONFIG.executor.maxOutputChars,
703
+ 1e3,
704
+ 1e6
705
+ ),
706
+ maxNestedResultChars: boundedInteger(
707
+ executor.maxNestedResultChars,
708
+ DEFAULT_FABRIC_CONFIG.executor.maxNestedResultChars,
709
+ 1e4,
710
+ 2e7
711
+ ),
712
+ resultFormat: resultFormatValue(
713
+ executor.resultFormat,
714
+ DEFAULT_FABRIC_CONFIG.executor.resultFormat
715
+ )
716
+ },
717
+ approvals: {
718
+ read: approvalMode(approvals.read, DEFAULT_FABRIC_CONFIG.approvals.read),
719
+ write: approvalMode(approvals.write, DEFAULT_FABRIC_CONFIG.approvals.write),
720
+ execute: approvalMode(approvals.execute, DEFAULT_FABRIC_CONFIG.approvals.execute),
721
+ network: approvalMode(approvals.network, DEFAULT_FABRIC_CONFIG.approvals.network),
722
+ agent: approvalMode(approvals.agent, DEFAULT_FABRIC_CONFIG.approvals.agent),
723
+ ...approvalModel ? { model: approvalModel } : {}
724
+ },
725
+ mcp: {
726
+ enabled: booleanValue(mcp.enabled, DEFAULT_FABRIC_CONFIG.mcp.enabled),
727
+ ...configPath ? { configPath } : {},
728
+ disableOAuth: booleanValue(mcp.disableOAuth, DEFAULT_FABRIC_CONFIG.mcp.disableOAuth),
729
+ allowDynamicServers: booleanValue(
730
+ mcp.allowDynamicServers,
731
+ DEFAULT_FABRIC_CONFIG.mcp.allowDynamicServers
732
+ ),
733
+ callTimeoutMs: boundedInteger(
734
+ mcp.callTimeoutMs,
735
+ DEFAULT_FABRIC_CONFIG.mcp.callTimeoutMs,
736
+ 1e3,
737
+ 9e5
738
+ ),
739
+ cache: {
740
+ enabled: booleanValue(mcpCache.enabled, DEFAULT_FABRIC_CONFIG.mcp.cache.enabled),
741
+ revalidate: mcpRevalidatePolicyValue(
742
+ mcpCache.revalidate,
743
+ DEFAULT_FABRIC_CONFIG.mcp.cache.revalidate
744
+ ),
745
+ revalidateBudgetMs: boundedInteger(
746
+ mcpCache.revalidateBudgetMs,
747
+ DEFAULT_FABRIC_CONFIG.mcp.cache.revalidateBudgetMs,
748
+ 1e3,
749
+ 6e5
750
+ )
751
+ }
752
+ },
753
+ prewalk: {
754
+ ...prewalk.enabled === false ? { enabled: false } : {},
755
+ mode: prewalkModeValue(prewalk.mode, DEFAULT_FABRIC_CONFIG.prewalk.mode),
756
+ ...prewalkModel ? { model: prewalkModel } : {},
757
+ ...prewalkThinking ? { thinking: prewalkThinking } : {},
758
+ alwaysRearm: booleanValue(
759
+ prewalk.alwaysRearm,
760
+ DEFAULT_FABRIC_CONFIG.prewalk.alwaysRearm
761
+ ),
762
+ compactOnReturn: booleanValue(
763
+ prewalk.compactOnReturn,
764
+ DEFAULT_FABRIC_CONFIG.prewalk.compactOnReturn
765
+ ),
766
+ detectShellWrites: booleanValue(
767
+ prewalk.detectShellWrites,
768
+ DEFAULT_FABRIC_CONFIG.prewalk.detectShellWrites
769
+ )
770
+ },
771
+ agents: {
772
+ enabled: booleanValue(agents.enabled, DEFAULT_FABRIC_CONFIG.agents.enabled),
773
+ runner: runnerValue(agents.runner, DEFAULT_FABRIC_CONFIG.agents.runner),
774
+ transport: transportValue(agents.transport, DEFAULT_FABRIC_CONFIG.agents.transport),
775
+ ...agentModel ? { model: agentModel } : {},
776
+ claude: {
777
+ binary: claudeBinary ?? DEFAULT_FABRIC_CONFIG.agents.claude.binary,
778
+ ...claudeModel ? { model: claudeModel } : {}
779
+ },
780
+ veda: {
781
+ binary: vedaBinary ?? DEFAULT_FABRIC_CONFIG.agents.veda.binary,
782
+ backend: vedaBackend ?? DEFAULT_FABRIC_CONFIG.agents.veda.backend,
783
+ ...vedaModel ? { model: vedaModel } : {},
784
+ persona: vedaPersona ?? DEFAULT_FABRIC_CONFIG.agents.veda.persona
785
+ },
786
+ thinking: agentThinking,
787
+ maxConcurrent: boundedInteger(
788
+ agents.maxConcurrent,
789
+ DEFAULT_FABRIC_CONFIG.agents.maxConcurrent,
790
+ 1,
791
+ 32
792
+ ),
793
+ maxPerExecution: boundedInteger(
794
+ agents.maxPerExecution,
795
+ DEFAULT_FABRIC_CONFIG.agents.maxPerExecution,
796
+ 1,
797
+ 1e3
798
+ ),
799
+ maxDepth: boundedInteger(
800
+ agents.maxDepth,
801
+ DEFAULT_FABRIC_CONFIG.agents.maxDepth,
802
+ 0,
803
+ Number.MAX_SAFE_INTEGER
804
+ ),
805
+ timeoutMs: boundedInteger(
806
+ agents.timeoutMs,
807
+ DEFAULT_FABRIC_CONFIG.agents.timeoutMs,
808
+ MIN_AGENT_TIMEOUT_MS,
809
+ MAX_AGENT_TIMEOUT_MS
810
+ ),
811
+ extensions: booleanValue(agents.extensions, DEFAULT_FABRIC_CONFIG.agents.extensions),
812
+ defaultTools: configuredTools,
813
+ retainRuns: booleanValue(agents.retainRuns, DEFAULT_FABRIC_CONFIG.agents.retainRuns),
814
+ notifyOnComplete: booleanValue(
815
+ agents.notifyOnComplete,
816
+ DEFAULT_FABRIC_CONFIG.agents.notifyOnComplete
817
+ ),
818
+ budgetUsd: boundedFloat(
819
+ agents.budgetUsd,
820
+ DEFAULT_FABRIC_CONFIG.agents.budgetUsd,
821
+ 0,
822
+ 1e6
823
+ ),
824
+ maxTokensPerChild: boundedInteger(
825
+ agents.maxTokensPerChild,
826
+ DEFAULT_FABRIC_CONFIG.agents.maxTokensPerChild,
827
+ 0,
828
+ 1e8
829
+ ),
830
+ sessionExport: booleanValue(
831
+ agents.sessionExport,
832
+ DEFAULT_FABRIC_CONFIG.agents.sessionExport
833
+ ),
834
+ sessionExportDir: typeof agents.sessionExportDir === "string" ? agents.sessionExportDir : DEFAULT_FABRIC_CONFIG.agents.sessionExportDir
835
+ },
836
+ components: configuredComponents.map((entry) => structuredClone(entry)),
837
+ capture: {
838
+ enabled: booleanValue(capture.enabled, DEFAULT_FABRIC_CONFIG.capture.enabled),
839
+ hideFromModel: booleanValue(
840
+ capture.hideFromModel,
841
+ DEFAULT_FABRIC_CONFIG.capture.hideFromModel
842
+ ),
843
+ keepVisible: [...new Set(configuredVisible)],
844
+ includeTools: [...new Set(configuredIncluded)],
845
+ excludeTools: [...new Set(configuredExcluded)],
846
+ defaultRisk: riskValue(capture.defaultRisk, DEFAULT_FABRIC_CONFIG.capture.defaultRisk),
847
+ risks
848
+ },
849
+ ui: {
850
+ enabled: booleanValue(ui.enabled, DEFAULT_FABRIC_CONFIG.ui.enabled),
851
+ widget: widgetModeValue(ui.widget, DEFAULT_FABRIC_CONFIG.ui.widget),
852
+ maxRows: boundedInteger(ui.maxRows, DEFAULT_FABRIC_CONFIG.ui.maxRows, 1, 20),
853
+ refreshMs: boundedInteger(ui.refreshMs, DEFAULT_FABRIC_CONFIG.ui.refreshMs, 100, 1e4),
854
+ eventHistory: boundedInteger(
855
+ ui.eventHistory,
856
+ DEFAULT_FABRIC_CONFIG.ui.eventHistory,
857
+ 1,
858
+ 500
859
+ ),
860
+ haltOnEscape: booleanValue(ui.haltOnEscape, DEFAULT_FABRIC_CONFIG.ui.haltOnEscape),
861
+ // Renamed from ui.showNestedToolCalls; the v2 migration rewrites persisted
862
+ // files, and this fallback covers configs normalized without migration.
863
+ showAgentToolPreview: booleanValue(
864
+ ui.showAgentToolPreview ?? ui.showNestedToolCalls,
865
+ DEFAULT_FABRIC_CONFIG.ui.showAgentToolPreview
866
+ ),
867
+ toolDisplay: toolDisplayModeValue(
868
+ ui.toolDisplay,
869
+ DEFAULT_FABRIC_CONFIG.ui.toolDisplay
870
+ ),
871
+ // Renamed from ui.nestedToolDebounceMs (v3): the window coalesces every
872
+ // live fabric_exec card update — nested calls, progress, agent previews.
873
+ updateDebounceMs: boundedInteger(
874
+ ui.updateDebounceMs ?? ui.nestedToolDebounceMs,
875
+ DEFAULT_FABRIC_CONFIG.ui.updateDebounceMs,
876
+ 0,
877
+ 2e3
878
+ )
879
+ },
880
+ compaction: {
881
+ engine: compactionEngineValue(compaction.engine, DEFAULT_FABRIC_CONFIG.compaction.engine),
882
+ targetContextRatio: boundedFloat(
883
+ compaction.targetContextRatio,
884
+ DEFAULT_FABRIC_CONFIG.compaction.targetContextRatio,
885
+ 0.25,
886
+ 0.85
887
+ ),
888
+ thresholds: compactionThresholds,
889
+ tokenThresholds: compactionTokenThresholds
890
+ },
891
+ retention: {
892
+ orphanedTempRunMs: boundedInteger(
893
+ retention.orphanedTempRunMs,
894
+ DEFAULT_FABRIC_CONFIG.retention.orphanedTempRunMs,
895
+ 60 * 60 * 1e3,
896
+ 365 * 24 * 60 * 60 * 1e3
897
+ ),
898
+ oneShotRunMs: boundedInteger(
899
+ retention.oneShotRunMs,
900
+ DEFAULT_FABRIC_CONFIG.retention.oneShotRunMs,
901
+ 60 * 60 * 1e3,
902
+ 365 * 24 * 60 * 60 * 1e3
903
+ ),
904
+ actorRunArchiveMs: boundedInteger(
905
+ retention.actorRunArchiveMs,
906
+ DEFAULT_FABRIC_CONFIG.retention.actorRunArchiveMs,
907
+ 60 * 60 * 1e3,
908
+ 365 * 24 * 60 * 60 * 1e3
909
+ )
910
+ },
911
+ mesh: {
912
+ enabled: booleanValue(mesh.enabled, DEFAULT_FABRIC_CONFIG.mesh.enabled),
913
+ ...meshRoot ? { root: meshRoot } : {},
914
+ actorScope: actorScopeValue(mesh.actorScope, DEFAULT_FABRIC_CONFIG.mesh.actorScope),
915
+ maxEventBytes: boundedInteger(
916
+ mesh.maxEventBytes,
917
+ DEFAULT_FABRIC_CONFIG.mesh.maxEventBytes,
918
+ 1024,
919
+ 4 * 1024 * 1024
920
+ ),
921
+ maxReadEvents: boundedInteger(
922
+ mesh.maxReadEvents,
923
+ DEFAULT_FABRIC_CONFIG.mesh.maxReadEvents,
924
+ 1,
925
+ 1e4
926
+ ),
927
+ actorPollMs: boundedInteger(
928
+ mesh.actorPollMs,
929
+ DEFAULT_FABRIC_CONFIG.mesh.actorPollMs,
930
+ 50,
931
+ 1e4
932
+ ),
933
+ actorQueueLimit: boundedInteger(
934
+ mesh.actorQueueLimit,
935
+ DEFAULT_FABRIC_CONFIG.mesh.actorQueueLimit,
936
+ 1,
937
+ 1e3
938
+ ),
939
+ eventContextChars: boundedInteger(
940
+ mesh.eventContextChars,
941
+ DEFAULT_FABRIC_CONFIG.mesh.eventContextChars,
942
+ 1e3,
943
+ 1e6
944
+ ),
945
+ actorContextEntries: boundedInteger(
946
+ mesh.actorContextEntries,
947
+ DEFAULT_FABRIC_CONFIG.mesh.actorContextEntries,
948
+ 1,
949
+ 100
950
+ )
951
+ },
952
+ models: {
953
+ aliases: normalizeModelAliases(modelsSection.aliases)
954
+ },
955
+ memory: {
956
+ enabled: booleanValue(memory.enabled, DEFAULT_FABRIC_CONFIG.memory.enabled),
957
+ ...memoryIndexDir ? { indexDir: memoryIndexDir } : {},
958
+ maxSessions: boundedInteger(
959
+ memory.maxSessions,
960
+ DEFAULT_FABRIC_CONFIG.memory.maxSessions,
961
+ 1,
962
+ 1e5
963
+ ),
964
+ maxEntryChars: boundedInteger(
965
+ memory.maxEntryChars,
966
+ DEFAULT_FABRIC_CONFIG.memory.maxEntryChars,
967
+ 100,
968
+ 1e6
969
+ ),
970
+ indexThinking: booleanValue(
971
+ memory.indexThinking,
972
+ DEFAULT_FABRIC_CONFIG.memory.indexThinking ?? false
973
+ ),
974
+ indexToolOutput: booleanValue(
975
+ memory.indexToolOutput,
976
+ DEFAULT_FABRIC_CONFIG.memory.indexToolOutput ?? true
977
+ ),
978
+ hotSessions: boundedInteger(
979
+ memory.hotSessions,
980
+ DEFAULT_FABRIC_CONFIG.memory.hotSessions ?? 50,
981
+ 0,
982
+ 1e5
983
+ ),
984
+ digestTerms: boundedInteger(
985
+ memory.digestTerms,
986
+ DEFAULT_FABRIC_CONFIG.memory.digestTerms ?? 200,
987
+ 1,
988
+ 1e4
989
+ ),
990
+ maxColdVocabularyBytes: boundedInteger(
991
+ memory.maxColdVocabularyBytes,
992
+ DEFAULT_FABRIC_CONFIG.memory.maxColdVocabularyBytes ?? 512 * 1024,
993
+ 2,
994
+ 64 * 1024 * 1024
995
+ ),
996
+ maxColdCacheBytes: boundedInteger(
997
+ memory.maxColdCacheBytes,
998
+ DEFAULT_FABRIC_CONFIG.memory.maxColdCacheBytes ?? 1024 * 1024,
999
+ 512,
1000
+ 128 * 1024 * 1024
1001
+ ),
1002
+ maxSyncSessions: boundedInteger(
1003
+ memory.maxSyncSessions,
1004
+ DEFAULT_FABRIC_CONFIG.memory.maxSyncSessions ?? 1e4,
1005
+ 1,
1006
+ 1e6
1007
+ ),
1008
+ maxSyncSourceBytes: boundedInteger(
1009
+ memory.maxSyncSourceBytes,
1010
+ DEFAULT_FABRIC_CONFIG.memory.maxSyncSourceBytes ?? 512 * 1024 * 1024,
1011
+ 1024,
1012
+ 8 * 1024 * 1024 * 1024
1013
+ ),
1014
+ maxCacheCleanupFiles: boundedInteger(
1015
+ memory.maxCacheCleanupFiles,
1016
+ DEFAULT_FABRIC_CONFIG.memory.maxCacheCleanupFiles ?? 1e5,
1017
+ 1,
1018
+ 1e6
1019
+ ),
1020
+ regexMaxPatternBytes: boundedInteger(
1021
+ memory.regexMaxPatternBytes,
1022
+ DEFAULT_FABRIC_CONFIG.memory.regexMaxPatternBytes ?? 1024,
1023
+ 1,
1024
+ 64 * 1024
1025
+ ),
1026
+ regexMaxHaystackTerms: boundedInteger(
1027
+ memory.regexMaxHaystackTerms,
1028
+ DEFAULT_FABRIC_CONFIG.memory.regexMaxHaystackTerms ?? 2e4,
1029
+ 1,
1030
+ 1e6
1031
+ ),
1032
+ regexMaxHaystackBytes: boundedInteger(
1033
+ memory.regexMaxHaystackBytes,
1034
+ DEFAULT_FABRIC_CONFIG.memory.regexMaxHaystackBytes ?? 2 * 1024 * 1024,
1035
+ 1024,
1036
+ 128 * 1024 * 1024
1037
+ ),
1038
+ regexTimeoutMs: boundedInteger(
1039
+ memory.regexTimeoutMs,
1040
+ DEFAULT_FABRIC_CONFIG.memory.regexTimeoutMs ?? 250,
1041
+ 10,
1042
+ 1e4
1043
+ )
1044
+ },
1045
+ entropy: {
1046
+ compile: booleanValue(entropy.compile, DEFAULT_FABRIC_CONFIG.entropy.compile)
1047
+ },
1048
+ repairs: {
1049
+ enabled: booleanValue(repairs.enabled, DEFAULT_FABRIC_CONFIG.repairs.enabled)
1050
+ },
1051
+ schema: {
1052
+ mode: schemaMode,
1053
+ certificateTtlMs: boundedInteger(
1054
+ schema.certificateTtlMs,
1055
+ DEFAULT_FABRIC_CONFIG.schema.certificateTtlMs,
1056
+ 1e3,
1057
+ 10 * 6e4
1058
+ ),
1059
+ maxFiles: boundedInteger(
1060
+ schema.maxFiles,
1061
+ DEFAULT_FABRIC_CONFIG.schema.maxFiles,
1062
+ 1,
1063
+ 1e3
1064
+ ),
1065
+ maxBytes: boundedInteger(
1066
+ schema.maxBytes,
1067
+ DEFAULT_FABRIC_CONFIG.schema.maxBytes,
1068
+ 1024,
1069
+ 100 * 1024 * 1024
1070
+ ),
1071
+ trustedCommands
1072
+ },
1073
+ speculation: {
1074
+ enabled: booleanValue(
1075
+ speculation.enabled,
1076
+ DEFAULT_FABRIC_CONFIG.speculation.enabled
1077
+ ),
1078
+ maxConcurrent: boundedInteger(
1079
+ speculation.maxConcurrent,
1080
+ DEFAULT_FABRIC_CONFIG.speculation.maxConcurrent,
1081
+ 1,
1082
+ 32
1083
+ ),
1084
+ maxEntries: boundedInteger(
1085
+ speculation.maxEntries,
1086
+ DEFAULT_FABRIC_CONFIG.speculation.maxEntries,
1087
+ 1,
1088
+ 1024
1089
+ ),
1090
+ maxBufferBytes: boundedInteger(
1091
+ speculation.maxBufferBytes,
1092
+ DEFAULT_FABRIC_CONFIG.speculation.maxBufferBytes,
1093
+ 64 * 1024,
1094
+ 64 * 1024 * 1024
1095
+ ),
1096
+ entryTtlMs: boundedInteger(
1097
+ speculation.entryTtlMs,
1098
+ DEFAULT_FABRIC_CONFIG.speculation.entryTtlMs,
1099
+ 5e3,
1100
+ 30 * 6e4
1101
+ ),
1102
+ mcpAllowlist: [
1103
+ ...new Set(
1104
+ (Array.isArray(speculation.mcpAllowlist) ? speculation.mcpAllowlist : []).filter(
1105
+ (entry) => typeof entry === "string" && entry.trim().length > 0
1106
+ ).map((entry) => entry.trim().slice(0, 256))
1107
+ )
1108
+ ].slice(0, 256)
1109
+ },
1110
+ codePreview: normalizeCodePreviewSettings(input.codePreview)
1111
+ };
1112
+ };
1113
+ var effectiveToolCaptureConfig = (config) => config.schema?.mode === "enforce" ? {
1114
+ ...config.capture,
1115
+ enabled: true,
1116
+ hideFromModel: true,
1117
+ keepVisible: ["fabric_exec"],
1118
+ risks: { ...config.capture.risks }
1119
+ } : config.fullCodeMode ? {
1120
+ ...config.capture,
1121
+ keepVisible: config.capture.keepVisible.filter(
1122
+ (name) => !OMP_CORE_TOOL_NAME_SET.has(name) || name === "fabric_exec"
1123
+ ),
1124
+ risks: { ...config.capture.risks }
1125
+ } : {
1126
+ ...config.capture,
1127
+ enabled: false,
1128
+ hideFromModel: false,
1129
+ keepVisible: [...config.capture.keepVisible],
1130
+ risks: { ...config.capture.risks }
1131
+ };
1132
+ var planConfigFile = (filePath) => {
1133
+ const input = readJsonObjectFile(filePath);
1134
+ if (!input) return void 0;
1135
+ const migration = migrateFabricConfigDocument(input.document);
1136
+ return {
1137
+ path: filePath,
1138
+ document: migration.document,
1139
+ source: input.source,
1140
+ changed: migration.changed
1141
+ };
1142
+ };
1143
+ var writeJsonAtomic = (filePath, document, expectedSource) => {
1144
+ const resolvedPath = fs.existsSync(filePath) ? fs.realpathSync(filePath) : filePath;
1145
+ const directory = path.dirname(resolvedPath);
1146
+ if (!fs.existsSync(directory)) fs.mkdirSync(directory, { recursive: true });
1147
+ const mode = fs.existsSync(resolvedPath) ? fs.statSync(resolvedPath).mode & 511 : 384;
1148
+ const temporaryPath = path.join(
1149
+ directory,
1150
+ `.${path.basename(resolvedPath)}.${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.tmp`
1151
+ );
1152
+ let descriptor;
1153
+ try {
1154
+ descriptor = fs.openSync(temporaryPath, "wx", mode);
1155
+ fs.writeFileSync(descriptor, `${JSON.stringify(document, null, 2)}
1156
+ `, "utf8");
1157
+ fs.fsyncSync(descriptor);
1158
+ fs.closeSync(descriptor);
1159
+ descriptor = void 0;
1160
+ if (expectedSource === null) {
1161
+ if (fs.existsSync(resolvedPath)) {
1162
+ throw new Error(`Fabric configuration changed while updating ${filePath}`);
1163
+ }
1164
+ } else {
1165
+ let currentSource;
1166
+ try {
1167
+ currentSource = fs.readFileSync(resolvedPath, "utf8");
1168
+ } catch (error) {
1169
+ throw new Error(`Fabric configuration changed while updating ${filePath}`, { cause: error });
1170
+ }
1171
+ if (currentSource !== expectedSource) {
1172
+ throw new Error(`Fabric configuration changed while updating ${filePath}`);
1173
+ }
1174
+ }
1175
+ renameAtomic(temporaryPath, resolvedPath);
1176
+ try {
1177
+ const directoryDescriptor = fs.openSync(directory, "r");
1178
+ try {
1179
+ fs.fsyncSync(directoryDescriptor);
1180
+ } finally {
1181
+ fs.closeSync(directoryDescriptor);
1182
+ }
1183
+ } catch (error) {
1184
+ const code = error instanceof Error && "code" in error ? error.code : void 0;
1185
+ if (code !== "EINVAL" && code !== "ENOTSUP" && code !== "EISDIR" && code !== "EPERM") throw error;
1186
+ }
1187
+ } catch (error) {
1188
+ if (descriptor !== void 0) fs.closeSync(descriptor);
1189
+ fs.rmSync(temporaryPath, { force: true });
1190
+ throw error;
1191
+ }
1192
+ };
1193
+ var resolveFabricConfig = (options, includeProject, applyEnvironmentOverrides) => {
1194
+ let merged = structuredClone(DEFAULT_FABRIC_CONFIG);
1195
+ const plans = [
1196
+ planConfigFile(path.join(options.agentDir, "fabric.json")),
1197
+ ...includeProject ? [planConfigFile(path.join(options.cwd, ".omp", "fabric.json"))] : []
1198
+ ].filter((plan) => plan !== void 0);
1199
+ for (const plan of plans) {
1200
+ if (plan.changed) writeJsonAtomic(plan.path, plan.document, plan.source);
1201
+ merged = mergeObjects2(merged, plan.document);
1202
+ }
1203
+ const inheritedFullCodeMode = process.env.OMP_FABRIC_FULL_CODE_MODE;
1204
+ if (applyEnvironmentOverrides && (inheritedFullCodeMode === "true" || inheritedFullCodeMode === "false")) {
1205
+ merged.fullCodeMode = inheritedFullCodeMode === "true";
1206
+ }
1207
+ return normalizeFabricConfig(merged);
1208
+ };
1209
+ var loadFabricConfigForScope = (options, scope) => {
1210
+ if (scope === "project" && !options.projectTrusted) {
1211
+ throw new Error("Cannot load project Fabric configuration for an untrusted project");
1212
+ }
1213
+ return resolveFabricConfig(options, scope === "project", false);
1214
+ };
1215
+ var loadFabricConfig = (options) => {
1216
+ const config = resolveFabricConfig(options, options.projectTrusted, true);
1217
+ if (config.compaction.engine === "fabric") {
1218
+ process.env.OMP_FABRIC_COMPACTION_ENGINE = "fabric";
1219
+ } else {
1220
+ delete process.env.OMP_FABRIC_COMPACTION_ENGINE;
1221
+ }
1222
+ return config;
1223
+ };
1224
+ var saveFabricConfig = (options, partial) => {
1225
+ const scope = options.scope ?? (options.projectTrusted ? "project" : "global");
1226
+ if (scope === "project" && !options.projectTrusted) {
1227
+ throw new Error("Cannot save project Fabric configuration for an untrusted project");
1228
+ }
1229
+ const targetPath = scope === "project" ? path.join(options.cwd, ".omp", "fabric.json") : path.join(options.agentDir, "fabric.json");
1230
+ if (Object.hasOwn(partial, "configVersion") || Object.hasOwn(partial, "subagents")) {
1231
+ throw new Error("Fabric configuration updates must use the current schema");
1232
+ }
1233
+ const input = readJsonObjectFile(targetPath);
1234
+ const existing = migrateFabricConfigDocument(input?.document ?? {}).document;
1235
+ const merged = mergeObjects2(existing, partial);
1236
+ merged.configVersion = Math.max(
1237
+ typeof merged.configVersion === "number" ? merged.configVersion : 0,
1238
+ CURRENT_FABRIC_CONFIG_VERSION
1239
+ );
1240
+ writeJsonAtomic(targetPath, merged, input?.source ?? null);
1241
+ return { scope, path: targetPath };
1242
+ };
1243
+
1244
+ export {
1245
+ FUZZY_RESOLUTION_MARKERS,
1246
+ normalizeModelAliases,
1247
+ resolveFabricModel,
1248
+ resolveAvailableOmpModel,
1249
+ MIN_COMPACTION_TOKEN_THRESHOLD,
1250
+ MAX_COMPACTION_TOKEN_THRESHOLD,
1251
+ MIN_COMPACTION_RATIO_THRESHOLD,
1252
+ MAX_COMPACTION_RATIO_THRESHOLD,
1253
+ clampCompactionTokenThreshold,
1254
+ clampCompactionRatioThreshold,
1255
+ MIN_AGENT_TIMEOUT_MS,
1256
+ MAX_AGENT_TIMEOUT_MS,
1257
+ QUICKJS_MAX_MEMORY_LIMIT_BYTES,
1258
+ maxExecutorMemoryLimitBytes,
1259
+ DEFAULT_FABRIC_CONFIG,
1260
+ effectiveToolCaptureConfig,
1261
+ loadFabricConfigForScope,
1262
+ loadFabricConfig,
1263
+ saveFabricConfig
1264
+ };
1265
+ //# sourceMappingURL=chunk-ROKMBLGN.js.map