@agimon-ai/doompi 0.0.1-alpha.76 → 0.0.1-alpha.78

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 (836) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  2. package/dist/antigravity.cjs +5 -0
  3. package/dist/antigravity.d.cts +2 -0
  4. package/dist/antigravity.d.mts +2 -0
  5. package/dist/antigravity.mjs +2 -0
  6. package/dist/api-contracts.cjs +11 -0
  7. package/dist/api-contracts.cjs.map +1 -0
  8. package/dist/api-contracts.d.cts +52 -0
  9. package/dist/api-contracts.d.cts.map +1 -0
  10. package/dist/api-contracts.d.mts +52 -0
  11. package/dist/api-contracts.d.mts.map +1 -0
  12. package/dist/api-contracts.mjs +7 -0
  13. package/dist/api-contracts.mjs.map +1 -0
  14. package/dist/base-command.cjs +3 -0
  15. package/dist/base-command.d.cts +2 -0
  16. package/dist/base-command.d.mts +2 -0
  17. package/dist/base-command.mjs +2 -0
  18. package/dist/bin/cli.cjs +29 -0
  19. package/dist/bin/cli.cjs.map +1 -0
  20. package/dist/bin/cli.d.cts +1 -0
  21. package/dist/bin/cli.d.mts +1 -0
  22. package/dist/bin/cli.mjs +30 -0
  23. package/dist/bin/cli.mjs.map +1 -0
  24. package/dist/bin/doomRunner.cjs +39 -0
  25. package/dist/bin/doomRunner.cjs.map +1 -0
  26. package/dist/bin/doomRunner.d.cts +12 -0
  27. package/dist/bin/doomRunner.d.cts.map +1 -0
  28. package/dist/bin/doomRunner.d.mts +12 -0
  29. package/dist/bin/doomRunner.d.mts.map +1 -0
  30. package/dist/bin/doomRunner.mjs +38 -0
  31. package/dist/bin/doomRunner.mjs.map +1 -0
  32. package/dist/bin/dpi.cjs +12 -0
  33. package/dist/bin/dpi.cjs.map +1 -0
  34. package/dist/bin/dpi.d.cts +1 -0
  35. package/dist/bin/dpi.d.mts +1 -0
  36. package/dist/bin/dpi.mjs +14 -0
  37. package/dist/bin/dpi.mjs.map +1 -0
  38. package/dist/bin/serve.cjs +11 -0
  39. package/dist/bin/serve.cjs.map +1 -0
  40. package/dist/bin/serve.d.cts +1 -0
  41. package/dist/bin/serve.d.mts +1 -0
  42. package/dist/bin/serve.mjs +13 -0
  43. package/dist/bin/serve.mjs.map +1 -0
  44. package/dist/builders/apiContractExport/index.cjs +81 -0
  45. package/dist/builders/apiContractExport/index.cjs.map +1 -0
  46. package/dist/builders/apiContractExport/index.mjs +77 -0
  47. package/dist/builders/apiContractExport/index.mjs.map +1 -0
  48. package/dist/builders/apiContracts/index.cjs +87 -0
  49. package/dist/builders/apiContracts/index.cjs.map +1 -0
  50. package/dist/builders/apiContracts/index.mjs +82 -0
  51. package/dist/builders/apiContracts/index.mjs.map +1 -0
  52. package/dist/builders/cli/bootstrapClaim.cjs +53 -0
  53. package/dist/builders/cli/bootstrapClaim.cjs.map +1 -0
  54. package/dist/builders/cli/bootstrapClaim.mjs +51 -0
  55. package/dist/builders/cli/bootstrapClaim.mjs.map +1 -0
  56. package/dist/builders/cli/bootstrapLocator/index.cjs +204 -0
  57. package/dist/builders/cli/bootstrapLocator/index.cjs.map +1 -0
  58. package/dist/builders/cli/bootstrapLocator/index.d.cts +5 -0
  59. package/dist/builders/cli/bootstrapLocator/index.d.cts.map +1 -0
  60. package/dist/builders/cli/bootstrapLocator/index.d.mts +5 -0
  61. package/dist/builders/cli/bootstrapLocator/index.d.mts.map +1 -0
  62. package/dist/builders/cli/bootstrapLocator/index.mjs +196 -0
  63. package/dist/builders/cli/bootstrapLocator/index.mjs.map +1 -0
  64. package/dist/builders/cli/composition.cjs +378 -0
  65. package/dist/builders/cli/composition.cjs.map +1 -0
  66. package/dist/builders/cli/composition.d.cts +119 -0
  67. package/dist/builders/cli/composition.d.cts.map +1 -0
  68. package/dist/builders/cli/composition.d.mts +119 -0
  69. package/dist/builders/cli/composition.d.mts.map +1 -0
  70. package/dist/builders/cli/composition.mjs +351 -0
  71. package/dist/builders/cli/composition.mjs.map +1 -0
  72. package/dist/builders/cli/compositionState.cjs +33 -0
  73. package/dist/builders/cli/compositionState.cjs.map +1 -0
  74. package/dist/builders/cli/compositionState.d.cts +9 -0
  75. package/dist/builders/cli/compositionState.d.cts.map +1 -0
  76. package/dist/builders/cli/compositionState.d.mts +9 -0
  77. package/dist/builders/cli/compositionState.d.mts.map +1 -0
  78. package/dist/builders/cli/compositionState.mjs +30 -0
  79. package/dist/builders/cli/compositionState.mjs.map +1 -0
  80. package/dist/builders/cli/constants.cjs +20 -0
  81. package/dist/builders/cli/constants.cjs.map +1 -0
  82. package/dist/builders/cli/constants.d.cts +17 -0
  83. package/dist/builders/cli/constants.d.cts.map +1 -0
  84. package/dist/builders/cli/constants.d.mts +17 -0
  85. package/dist/builders/cli/constants.d.mts.map +1 -0
  86. package/dist/builders/cli/constants.mjs +19 -0
  87. package/dist/builders/cli/constants.mjs.map +1 -0
  88. package/dist/builders/cli/contextCatalog.cjs +130 -0
  89. package/dist/builders/cli/contextCatalog.cjs.map +1 -0
  90. package/dist/builders/cli/contextCatalog.mjs +130 -0
  91. package/dist/builders/cli/contextCatalog.mjs.map +1 -0
  92. package/dist/builders/cli/dpiSettings.cjs +118 -0
  93. package/dist/builders/cli/dpiSettings.cjs.map +1 -0
  94. package/dist/builders/cli/dpiSettings.mjs +111 -0
  95. package/dist/builders/cli/dpiSettings.mjs.map +1 -0
  96. package/dist/builders/cli/entryResolution.cjs +23 -0
  97. package/dist/builders/cli/entryResolution.cjs.map +1 -0
  98. package/dist/builders/cli/entryResolution.d.cts +5 -0
  99. package/dist/builders/cli/entryResolution.d.cts.map +1 -0
  100. package/dist/builders/cli/entryResolution.d.mts +5 -0
  101. package/dist/builders/cli/entryResolution.d.mts.map +1 -0
  102. package/dist/builders/cli/entryResolution.mjs +20 -0
  103. package/dist/builders/cli/entryResolution.mjs.map +1 -0
  104. package/dist/builders/cli/extensionAssembler/index.cjs +386 -0
  105. package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -0
  106. package/dist/builders/cli/extensionAssembler/index.d.cts +113 -0
  107. package/dist/builders/cli/extensionAssembler/index.d.cts.map +1 -0
  108. package/dist/builders/cli/extensionAssembler/index.d.mts +113 -0
  109. package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -0
  110. package/dist/builders/cli/extensionAssembler/index.mjs +376 -0
  111. package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -0
  112. package/dist/builders/cli/harnessContext.cjs +186 -0
  113. package/dist/builders/cli/harnessContext.cjs.map +1 -0
  114. package/dist/builders/cli/harnessContext.d.cts +51 -0
  115. package/dist/builders/cli/harnessContext.d.cts.map +1 -0
  116. package/dist/builders/cli/harnessContext.d.mts +51 -0
  117. package/dist/builders/cli/harnessContext.d.mts.map +1 -0
  118. package/dist/builders/cli/harnessContext.mjs +179 -0
  119. package/dist/builders/cli/harnessContext.mjs.map +1 -0
  120. package/dist/builders/cli/index.cjs +151 -0
  121. package/dist/builders/cli/index.cjs.map +1 -0
  122. package/dist/builders/cli/index.d.cts +22 -0
  123. package/dist/builders/cli/index.d.cts.map +1 -0
  124. package/dist/builders/cli/index.d.mts +22 -0
  125. package/dist/builders/cli/index.d.mts.map +1 -0
  126. package/dist/builders/cli/index.mjs +147 -0
  127. package/dist/builders/cli/index.mjs.map +1 -0
  128. package/dist/builders/cli/launchPlan/index.cjs +102 -0
  129. package/dist/builders/cli/launchPlan/index.cjs.map +1 -0
  130. package/dist/builders/cli/launchPlan/index.d.cts +43 -0
  131. package/dist/builders/cli/launchPlan/index.d.cts.map +1 -0
  132. package/dist/builders/cli/launchPlan/index.d.mts +43 -0
  133. package/dist/builders/cli/launchPlan/index.d.mts.map +1 -0
  134. package/dist/builders/cli/launchPlan/index.mjs +100 -0
  135. package/dist/builders/cli/launchPlan/index.mjs.map +1 -0
  136. package/dist/builders/cli/launcherComposition/index.cjs +84 -0
  137. package/dist/builders/cli/launcherComposition/index.cjs.map +1 -0
  138. package/dist/builders/cli/launcherComposition/index.mjs +80 -0
  139. package/dist/builders/cli/launcherComposition/index.mjs.map +1 -0
  140. package/dist/builders/cli/piExtensionAlias/index.cjs +40 -0
  141. package/dist/builders/cli/piExtensionAlias/index.cjs.map +1 -0
  142. package/dist/builders/cli/piExtensionAlias/index.mjs +35 -0
  143. package/dist/builders/cli/piExtensionAlias/index.mjs.map +1 -0
  144. package/dist/builders/cli/piExtensionDispatcher/index.cjs +205 -0
  145. package/dist/builders/cli/piExtensionDispatcher/index.cjs.map +1 -0
  146. package/dist/builders/cli/piExtensionDispatcher/index.mjs +198 -0
  147. package/dist/builders/cli/piExtensionDispatcher/index.mjs.map +1 -0
  148. package/dist/builders/cli/prepare.cjs +64 -0
  149. package/dist/builders/cli/prepare.cjs.map +1 -0
  150. package/dist/builders/cli/prepare.mjs +62 -0
  151. package/dist/builders/cli/prepare.mjs.map +1 -0
  152. package/dist/builders/cli/projectSettings.cjs +155 -0
  153. package/dist/builders/cli/projectSettings.cjs.map +1 -0
  154. package/dist/builders/cli/projectSettings.d.cts +27 -0
  155. package/dist/builders/cli/projectSettings.d.cts.map +1 -0
  156. package/dist/builders/cli/projectSettings.d.mts +27 -0
  157. package/dist/builders/cli/projectSettings.d.mts.map +1 -0
  158. package/dist/builders/cli/projectSettings.mjs +144 -0
  159. package/dist/builders/cli/projectSettings.mjs.map +1 -0
  160. package/dist/builders/cli/runtimeBundle/index.cjs +130 -0
  161. package/dist/builders/cli/runtimeBundle/index.cjs.map +1 -0
  162. package/dist/builders/cli/runtimeBundle/index.d.cts +21 -0
  163. package/dist/builders/cli/runtimeBundle/index.d.cts.map +1 -0
  164. package/dist/builders/cli/runtimeBundle/index.d.mts +21 -0
  165. package/dist/builders/cli/runtimeBundle/index.d.mts.map +1 -0
  166. package/dist/builders/cli/runtimeBundle/index.mjs +126 -0
  167. package/dist/builders/cli/runtimeBundle/index.mjs.map +1 -0
  168. package/dist/builders/server/index.cjs +184 -0
  169. package/dist/builders/server/index.cjs.map +1 -0
  170. package/dist/builders/server/index.mjs +181 -0
  171. package/dist/builders/server/index.mjs.map +1 -0
  172. package/dist/builders/server/runtime.cjs +603 -0
  173. package/dist/builders/server/runtime.cjs.map +1 -0
  174. package/dist/builders/server/runtime.mjs +595 -0
  175. package/dist/builders/server/runtime.mjs.map +1 -0
  176. package/dist/builders/server/selectionStatus.cjs +12 -0
  177. package/dist/builders/server/selectionStatus.cjs.map +1 -0
  178. package/dist/builders/server/selectionStatus.mjs +12 -0
  179. package/dist/builders/server/selectionStatus.mjs.map +1 -0
  180. package/dist/builders/server/sessionArguments.cjs +22 -0
  181. package/dist/builders/server/sessionArguments.cjs.map +1 -0
  182. package/dist/builders/server/sessionArguments.mjs +22 -0
  183. package/dist/builders/server/sessionArguments.mjs.map +1 -0
  184. package/dist/builders/web/bundle.cjs +110 -0
  185. package/dist/builders/web/bundle.cjs.map +1 -0
  186. package/dist/builders/web/bundle.d.cts +29 -0
  187. package/dist/builders/web/bundle.d.cts.map +1 -0
  188. package/dist/builders/web/bundle.d.mts +29 -0
  189. package/dist/builders/web/bundle.d.mts.map +1 -0
  190. package/dist/builders/web/bundle.mjs +107 -0
  191. package/dist/builders/web/bundle.mjs.map +1 -0
  192. package/dist/builders/web/bundleAssetPolicy.cjs +96 -0
  193. package/dist/builders/web/bundleAssetPolicy.cjs.map +1 -0
  194. package/dist/builders/web/bundleAssetPolicy.d.cts +22 -0
  195. package/dist/builders/web/bundleAssetPolicy.d.cts.map +1 -0
  196. package/dist/builders/web/bundleAssetPolicy.d.mts +22 -0
  197. package/dist/builders/web/bundleAssetPolicy.d.mts.map +1 -0
  198. package/dist/builders/web/bundleAssetPolicy.mjs +95 -0
  199. package/dist/builders/web/bundleAssetPolicy.mjs.map +1 -0
  200. package/dist/builders/web/index.cjs +75 -0
  201. package/dist/builders/web/index.cjs.map +1 -0
  202. package/dist/builders/web/index.d.cts +29 -0
  203. package/dist/builders/web/index.d.cts.map +1 -0
  204. package/dist/builders/web/index.d.mts +29 -0
  205. package/dist/builders/web/index.d.mts.map +1 -0
  206. package/dist/builders/web/index.mjs +72 -0
  207. package/dist/builders/web/index.mjs.map +1 -0
  208. package/dist/builders/web/webDevRoots.cjs +27 -0
  209. package/dist/builders/web/webDevRoots.cjs.map +1 -0
  210. package/dist/builders/web/webDevRoots.d.cts +22 -0
  211. package/dist/builders/web/webDevRoots.d.cts.map +1 -0
  212. package/dist/builders/web/webDevRoots.d.mts +22 -0
  213. package/dist/builders/web/webDevRoots.d.mts.map +1 -0
  214. package/dist/builders/web/webDevRoots.mjs +25 -0
  215. package/dist/builders/web/webDevRoots.mjs.map +1 -0
  216. package/dist/builders/web/webPluginGenerate.cjs +113 -0
  217. package/dist/builders/web/webPluginGenerate.cjs.map +1 -0
  218. package/dist/builders/web/webPluginGenerate.d.cts +28 -0
  219. package/dist/builders/web/webPluginGenerate.d.cts.map +1 -0
  220. package/dist/builders/web/webPluginGenerate.d.mts +28 -0
  221. package/dist/builders/web/webPluginGenerate.d.mts.map +1 -0
  222. package/dist/builders/web/webPluginGenerate.mjs +106 -0
  223. package/dist/builders/web/webPluginGenerate.mjs.map +1 -0
  224. package/dist/builders/web/webPluginManifest.cjs +92 -0
  225. package/dist/builders/web/webPluginManifest.cjs.map +1 -0
  226. package/dist/builders/web/webPluginManifest.d.cts +44 -0
  227. package/dist/builders/web/webPluginManifest.d.cts.map +1 -0
  228. package/dist/builders/web/webPluginManifest.d.mts +44 -0
  229. package/dist/builders/web/webPluginManifest.d.mts.map +1 -0
  230. package/dist/builders/web/webPluginManifest.mjs +88 -0
  231. package/dist/builders/web/webPluginManifest.mjs.map +1 -0
  232. package/dist/builders/web/webPluginScan.cjs +53 -0
  233. package/dist/builders/web/webPluginScan.cjs.map +1 -0
  234. package/dist/builders/web/webPluginScan.d.cts +16 -0
  235. package/dist/builders/web/webPluginScan.d.cts.map +1 -0
  236. package/dist/builders/web/webPluginScan.d.mts +16 -0
  237. package/dist/builders/web/webPluginScan.d.mts.map +1 -0
  238. package/dist/builders/web/webPluginScan.mjs +50 -0
  239. package/dist/builders/web/webPluginScan.mjs.map +1 -0
  240. package/dist/builders/web/webPluginVite.cjs +124 -0
  241. package/dist/builders/web/webPluginVite.cjs.map +1 -0
  242. package/dist/builders/web/webPluginVite.d.cts +36 -0
  243. package/dist/builders/web/webPluginVite.d.cts.map +1 -0
  244. package/dist/builders/web/webPluginVite.d.mts +36 -0
  245. package/dist/builders/web/webPluginVite.d.mts.map +1 -0
  246. package/dist/builders/web/webPluginVite.mjs +116 -0
  247. package/dist/builders/web/webPluginVite.mjs.map +1 -0
  248. package/dist/builders/web.cjs +33 -0
  249. package/dist/builders/web.d.cts +9 -0
  250. package/dist/builders/web.d.mts +9 -0
  251. package/dist/builders/web.mjs +9 -0
  252. package/dist/cli/cliApp.cjs +177 -0
  253. package/dist/cli/cliApp.cjs.map +1 -0
  254. package/dist/cli/cliApp.d.cts +25 -0
  255. package/dist/cli/cliApp.d.cts.map +1 -0
  256. package/dist/cli/cliApp.d.mts +25 -0
  257. package/dist/cli/cliApp.d.mts.map +1 -0
  258. package/dist/cli/cliApp.mjs +175 -0
  259. package/dist/cli/cliApp.mjs.map +1 -0
  260. package/dist/cli/commands/api-export/index.cjs +65 -0
  261. package/dist/cli/commands/api-export/index.cjs.map +1 -0
  262. package/dist/cli/commands/api-export/index.mjs +61 -0
  263. package/dist/cli/commands/api-export/index.mjs.map +1 -0
  264. package/dist/cli/commands/baseCommand.cjs +16 -0
  265. package/dist/cli/commands/baseCommand.cjs.map +1 -0
  266. package/dist/cli/commands/baseCommand.d.cts +24 -0
  267. package/dist/cli/commands/baseCommand.d.cts.map +1 -0
  268. package/dist/cli/commands/baseCommand.d.mts +24 -0
  269. package/dist/cli/commands/baseCommand.d.mts.map +1 -0
  270. package/dist/cli/commands/baseCommand.mjs +16 -0
  271. package/dist/cli/commands/baseCommand.mjs.map +1 -0
  272. package/dist/cli/commands/compat/context.cjs +115 -0
  273. package/dist/cli/commands/compat/context.cjs.map +1 -0
  274. package/dist/cli/commands/compat/context.d.cts +22 -0
  275. package/dist/cli/commands/compat/context.d.cts.map +1 -0
  276. package/dist/cli/commands/compat/context.d.mts +22 -0
  277. package/dist/cli/commands/compat/context.d.mts.map +1 -0
  278. package/dist/cli/commands/compat/context.mjs +110 -0
  279. package/dist/cli/commands/compat/context.mjs.map +1 -0
  280. package/dist/cli/commands/compat/help.cjs +26 -0
  281. package/dist/cli/commands/compat/help.cjs.map +1 -0
  282. package/dist/cli/commands/compat/help.d.cts +4 -0
  283. package/dist/cli/commands/compat/help.d.cts.map +1 -0
  284. package/dist/cli/commands/compat/help.d.mts +4 -0
  285. package/dist/cli/commands/compat/help.d.mts.map +1 -0
  286. package/dist/cli/commands/compat/help.mjs +25 -0
  287. package/dist/cli/commands/compat/help.mjs.map +1 -0
  288. package/dist/cli/commands/compat/index.cjs +73 -0
  289. package/dist/cli/commands/compat/index.cjs.map +1 -0
  290. package/dist/cli/commands/compat/index.d.cts +14 -0
  291. package/dist/cli/commands/compat/index.d.cts.map +1 -0
  292. package/dist/cli/commands/compat/index.d.mts +14 -0
  293. package/dist/cli/commands/compat/index.d.mts.map +1 -0
  294. package/dist/cli/commands/compat/index.mjs +70 -0
  295. package/dist/cli/commands/compat/index.mjs.map +1 -0
  296. package/dist/cli/commands/compat/options.cjs +88 -0
  297. package/dist/cli/commands/compat/options.cjs.map +1 -0
  298. package/dist/cli/commands/compat/options.d.cts +15 -0
  299. package/dist/cli/commands/compat/options.d.cts.map +1 -0
  300. package/dist/cli/commands/compat/options.d.mts +15 -0
  301. package/dist/cli/commands/compat/options.d.mts.map +1 -0
  302. package/dist/cli/commands/compat/options.mjs +86 -0
  303. package/dist/cli/commands/compat/options.mjs.map +1 -0
  304. package/dist/cli/commands/compat/providers/antigravity.cjs +294 -0
  305. package/dist/cli/commands/compat/providers/antigravity.cjs.map +1 -0
  306. package/dist/cli/commands/compat/providers/antigravity.d.cts +9 -0
  307. package/dist/cli/commands/compat/providers/antigravity.d.cts.map +1 -0
  308. package/dist/cli/commands/compat/providers/antigravity.d.mts +9 -0
  309. package/dist/cli/commands/compat/providers/antigravity.d.mts.map +1 -0
  310. package/dist/cli/commands/compat/providers/antigravity.mjs +289 -0
  311. package/dist/cli/commands/compat/providers/antigravity.mjs.map +1 -0
  312. package/dist/cli/commands/compat/providers/codex.cjs +178 -0
  313. package/dist/cli/commands/compat/providers/codex.cjs.map +1 -0
  314. package/dist/cli/commands/compat/providers/codex.d.cts +17 -0
  315. package/dist/cli/commands/compat/providers/codex.d.cts.map +1 -0
  316. package/dist/cli/commands/compat/providers/codex.d.mts +17 -0
  317. package/dist/cli/commands/compat/providers/codex.d.mts.map +1 -0
  318. package/dist/cli/commands/compat/providers/codex.mjs +170 -0
  319. package/dist/cli/commands/compat/providers/codex.mjs.map +1 -0
  320. package/dist/cli/commands/compat/providers/index.cjs +65 -0
  321. package/dist/cli/commands/compat/providers/index.cjs.map +1 -0
  322. package/dist/cli/commands/compat/providers/index.d.cts +15 -0
  323. package/dist/cli/commands/compat/providers/index.d.cts.map +1 -0
  324. package/dist/cli/commands/compat/providers/index.d.mts +15 -0
  325. package/dist/cli/commands/compat/providers/index.d.mts.map +1 -0
  326. package/dist/cli/commands/compat/providers/index.mjs +45 -0
  327. package/dist/cli/commands/compat/providers/index.mjs.map +1 -0
  328. package/dist/cli/commands/compat/providers/process.cjs +172 -0
  329. package/dist/cli/commands/compat/providers/process.cjs.map +1 -0
  330. package/dist/cli/commands/compat/providers/process.d.cts +33 -0
  331. package/dist/cli/commands/compat/providers/process.d.cts.map +1 -0
  332. package/dist/cli/commands/compat/providers/process.d.mts +33 -0
  333. package/dist/cli/commands/compat/providers/process.d.mts.map +1 -0
  334. package/dist/cli/commands/compat/providers/process.mjs +159 -0
  335. package/dist/cli/commands/compat/providers/process.mjs.map +1 -0
  336. package/dist/cli/commands/compat/providers/shared.cjs +76 -0
  337. package/dist/cli/commands/compat/providers/shared.cjs.map +1 -0
  338. package/dist/cli/commands/compat/providers/shared.d.cts +40 -0
  339. package/dist/cli/commands/compat/providers/shared.d.cts.map +1 -0
  340. package/dist/cli/commands/compat/providers/shared.d.mts +40 -0
  341. package/dist/cli/commands/compat/providers/shared.d.mts.map +1 -0
  342. package/dist/cli/commands/compat/providers/shared.mjs +61 -0
  343. package/dist/cli/commands/compat/providers/shared.mjs.map +1 -0
  344. package/dist/cli/commands/compat/types.d.cts +31 -0
  345. package/dist/cli/commands/compat/types.d.cts.map +1 -0
  346. package/dist/cli/commands/compat/types.d.mts +31 -0
  347. package/dist/cli/commands/compat/types.d.mts.map +1 -0
  348. package/dist/cli/commands/doctor/help.cjs +19 -0
  349. package/dist/cli/commands/doctor/help.cjs.map +1 -0
  350. package/dist/cli/commands/doctor/help.d.cts +4 -0
  351. package/dist/cli/commands/doctor/help.d.cts.map +1 -0
  352. package/dist/cli/commands/doctor/help.d.mts +4 -0
  353. package/dist/cli/commands/doctor/help.d.mts.map +1 -0
  354. package/dist/cli/commands/doctor/help.mjs +19 -0
  355. package/dist/cli/commands/doctor/help.mjs.map +1 -0
  356. package/dist/cli/commands/doctor/index.cjs +116 -0
  357. package/dist/cli/commands/doctor/index.cjs.map +1 -0
  358. package/dist/cli/commands/doctor/index.d.cts +12 -0
  359. package/dist/cli/commands/doctor/index.d.cts.map +1 -0
  360. package/dist/cli/commands/doctor/index.d.mts +12 -0
  361. package/dist/cli/commands/doctor/index.d.mts.map +1 -0
  362. package/dist/cli/commands/doctor/index.mjs +112 -0
  363. package/dist/cli/commands/doctor/index.mjs.map +1 -0
  364. package/dist/cli/commands/emit-mcp/index.cjs +32 -0
  365. package/dist/cli/commands/emit-mcp/index.cjs.map +1 -0
  366. package/dist/cli/commands/emit-mcp/index.d.cts +19 -0
  367. package/dist/cli/commands/emit-mcp/index.d.cts.map +1 -0
  368. package/dist/cli/commands/emit-mcp/index.d.mts +19 -0
  369. package/dist/cli/commands/emit-mcp/index.d.mts.map +1 -0
  370. package/dist/cli/commands/emit-mcp/index.mjs +31 -0
  371. package/dist/cli/commands/emit-mcp/index.mjs.map +1 -0
  372. package/dist/cli/commands/explain/index.cjs +155 -0
  373. package/dist/cli/commands/explain/index.cjs.map +1 -0
  374. package/dist/cli/commands/explain/index.d.cts +57 -0
  375. package/dist/cli/commands/explain/index.d.cts.map +1 -0
  376. package/dist/cli/commands/explain/index.d.mts +57 -0
  377. package/dist/cli/commands/explain/index.d.mts.map +1 -0
  378. package/dist/cli/commands/explain/index.mjs +150 -0
  379. package/dist/cli/commands/explain/index.mjs.map +1 -0
  380. package/dist/cli/commands/history-export/help.cjs +18 -0
  381. package/dist/cli/commands/history-export/help.cjs.map +1 -0
  382. package/dist/cli/commands/history-export/help.d.cts +4 -0
  383. package/dist/cli/commands/history-export/help.d.cts.map +1 -0
  384. package/dist/cli/commands/history-export/help.d.mts +4 -0
  385. package/dist/cli/commands/history-export/help.d.mts.map +1 -0
  386. package/dist/cli/commands/history-export/help.mjs +18 -0
  387. package/dist/cli/commands/history-export/help.mjs.map +1 -0
  388. package/dist/cli/commands/history-export/index.cjs +76 -0
  389. package/dist/cli/commands/history-export/index.cjs.map +1 -0
  390. package/dist/cli/commands/history-export/index.mjs +74 -0
  391. package/dist/cli/commands/history-export/index.mjs.map +1 -0
  392. package/dist/cli/commands/history-import/help.cjs +20 -0
  393. package/dist/cli/commands/history-import/help.cjs.map +1 -0
  394. package/dist/cli/commands/history-import/help.d.cts +4 -0
  395. package/dist/cli/commands/history-import/help.d.cts.map +1 -0
  396. package/dist/cli/commands/history-import/help.d.mts +4 -0
  397. package/dist/cli/commands/history-import/help.d.mts.map +1 -0
  398. package/dist/cli/commands/history-import/help.mjs +20 -0
  399. package/dist/cli/commands/history-import/help.mjs.map +1 -0
  400. package/dist/cli/commands/history-import/index.cjs +78 -0
  401. package/dist/cli/commands/history-import/index.cjs.map +1 -0
  402. package/dist/cli/commands/history-import/index.mjs +75 -0
  403. package/dist/cli/commands/history-import/index.mjs.map +1 -0
  404. package/dist/cli/commands/init/constants.cjs +11 -0
  405. package/dist/cli/commands/init/constants.cjs.map +1 -0
  406. package/dist/cli/commands/init/constants.mjs +11 -0
  407. package/dist/cli/commands/init/constants.mjs.map +1 -0
  408. package/dist/cli/commands/init/help.cjs +17 -0
  409. package/dist/cli/commands/init/help.cjs.map +1 -0
  410. package/dist/cli/commands/init/help.d.cts +4 -0
  411. package/dist/cli/commands/init/help.d.cts.map +1 -0
  412. package/dist/cli/commands/init/help.d.mts +4 -0
  413. package/dist/cli/commands/init/help.d.mts.map +1 -0
  414. package/dist/cli/commands/init/help.mjs +17 -0
  415. package/dist/cli/commands/init/help.mjs.map +1 -0
  416. package/dist/cli/commands/init/index.cjs +87 -0
  417. package/dist/cli/commands/init/index.cjs.map +1 -0
  418. package/dist/cli/commands/init/index.d.cts +12 -0
  419. package/dist/cli/commands/init/index.d.cts.map +1 -0
  420. package/dist/cli/commands/init/index.d.mts +12 -0
  421. package/dist/cli/commands/init/index.d.mts.map +1 -0
  422. package/dist/cli/commands/init/index.mjs +83 -0
  423. package/dist/cli/commands/init/index.mjs.map +1 -0
  424. package/dist/cli/commands/init/presenter.cjs +170 -0
  425. package/dist/cli/commands/init/presenter.cjs.map +1 -0
  426. package/dist/cli/commands/init/presenter.d.cts +8 -0
  427. package/dist/cli/commands/init/presenter.d.cts.map +1 -0
  428. package/dist/cli/commands/init/presenter.d.mts +8 -0
  429. package/dist/cli/commands/init/presenter.d.mts.map +1 -0
  430. package/dist/cli/commands/init/presenter.mjs +170 -0
  431. package/dist/cli/commands/init/presenter.mjs.map +1 -0
  432. package/dist/cli/commands/launch/index.cjs +128 -0
  433. package/dist/cli/commands/launch/index.cjs.map +1 -0
  434. package/dist/cli/commands/launch/index.d.cts +29 -0
  435. package/dist/cli/commands/launch/index.d.cts.map +1 -0
  436. package/dist/cli/commands/launch/index.d.mts +29 -0
  437. package/dist/cli/commands/launch/index.d.mts.map +1 -0
  438. package/dist/cli/commands/launch/index.mjs +122 -0
  439. package/dist/cli/commands/launch/index.mjs.map +1 -0
  440. package/dist/cli/commands/sandbox/args.cjs +50 -0
  441. package/dist/cli/commands/sandbox/args.cjs.map +1 -0
  442. package/dist/cli/commands/sandbox/args.mjs +50 -0
  443. package/dist/cli/commands/sandbox/args.mjs.map +1 -0
  444. package/dist/cli/commands/sandbox/harness.cjs +61 -0
  445. package/dist/cli/commands/sandbox/harness.cjs.map +1 -0
  446. package/dist/cli/commands/sandbox/harness.mjs +60 -0
  447. package/dist/cli/commands/sandbox/harness.mjs.map +1 -0
  448. package/dist/cli/commands/sandbox/index.cjs +57 -0
  449. package/dist/cli/commands/sandbox/index.cjs.map +1 -0
  450. package/dist/cli/commands/sandbox/index.mjs +56 -0
  451. package/dist/cli/commands/sandbox/index.mjs.map +1 -0
  452. package/dist/cli/commands/sync/help.cjs +31 -0
  453. package/dist/cli/commands/sync/help.cjs.map +1 -0
  454. package/dist/cli/commands/sync/help.d.cts +4 -0
  455. package/dist/cli/commands/sync/help.d.cts.map +1 -0
  456. package/dist/cli/commands/sync/help.d.mts +4 -0
  457. package/dist/cli/commands/sync/help.d.mts.map +1 -0
  458. package/dist/cli/commands/sync/help.mjs +31 -0
  459. package/dist/cli/commands/sync/help.mjs.map +1 -0
  460. package/dist/cli/commands/sync/index.cjs +577 -0
  461. package/dist/cli/commands/sync/index.cjs.map +1 -0
  462. package/dist/cli/commands/sync/index.d.cts +65 -0
  463. package/dist/cli/commands/sync/index.d.cts.map +1 -0
  464. package/dist/cli/commands/sync/index.d.mts +65 -0
  465. package/dist/cli/commands/sync/index.d.mts.map +1 -0
  466. package/dist/cli/commands/sync/index.mjs +560 -0
  467. package/dist/cli/commands/sync/index.mjs.map +1 -0
  468. package/dist/cli/commands/sync/prepare.cjs +43 -0
  469. package/dist/cli/commands/sync/prepare.cjs.map +1 -0
  470. package/dist/cli/commands/sync/prepare.mjs +40 -0
  471. package/dist/cli/commands/sync/prepare.mjs.map +1 -0
  472. package/dist/cli/commands/sync/presenter.cjs +58 -0
  473. package/dist/cli/commands/sync/presenter.cjs.map +1 -0
  474. package/dist/cli/commands/sync/presenter.d.cts +16 -0
  475. package/dist/cli/commands/sync/presenter.d.cts.map +1 -0
  476. package/dist/cli/commands/sync/presenter.d.mts +16 -0
  477. package/dist/cli/commands/sync/presenter.d.mts.map +1 -0
  478. package/dist/cli/commands/sync/presenter.mjs +57 -0
  479. package/dist/cli/commands/sync/presenter.mjs.map +1 -0
  480. package/dist/cli/commands/sync/workflow.cjs +99 -0
  481. package/dist/cli/commands/sync/workflow.cjs.map +1 -0
  482. package/dist/cli/commands/sync/workflow.mjs +96 -0
  483. package/dist/cli/commands/sync/workflow.mjs.map +1 -0
  484. package/dist/cli/dpi.cjs +98 -0
  485. package/dist/cli/dpi.cjs.map +1 -0
  486. package/dist/cli/dpi.mjs +91 -0
  487. package/dist/cli/dpi.mjs.map +1 -0
  488. package/dist/cli/harnessOptions.cjs +60 -0
  489. package/dist/cli/harnessOptions.cjs.map +1 -0
  490. package/dist/cli/harnessOptions.d.cts +24 -0
  491. package/dist/cli/harnessOptions.d.cts.map +1 -0
  492. package/dist/cli/harnessOptions.d.mts +24 -0
  493. package/dist/cli/harnessOptions.d.mts.map +1 -0
  494. package/dist/cli/harnessOptions.mjs +57 -0
  495. package/dist/cli/harnessOptions.mjs.map +1 -0
  496. package/dist/cli/help.cjs +89 -0
  497. package/dist/cli/help.cjs.map +1 -0
  498. package/dist/cli/help.d.cts +12 -0
  499. package/dist/cli/help.d.cts.map +1 -0
  500. package/dist/cli/help.d.mts +12 -0
  501. package/dist/cli/help.d.mts.map +1 -0
  502. package/dist/cli/help.mjs +83 -0
  503. package/dist/cli/help.mjs.map +1 -0
  504. package/dist/cli/matrixOptions.cjs +178 -0
  505. package/dist/cli/matrixOptions.cjs.map +1 -0
  506. package/dist/cli/matrixOptions.d.cts +90 -0
  507. package/dist/cli/matrixOptions.d.cts.map +1 -0
  508. package/dist/cli/matrixOptions.d.mts +90 -0
  509. package/dist/cli/matrixOptions.d.mts.map +1 -0
  510. package/dist/cli/matrixOptions.mjs +151 -0
  511. package/dist/cli/matrixOptions.mjs.map +1 -0
  512. package/dist/cli/options.cjs +306 -0
  513. package/dist/cli/options.cjs.map +1 -0
  514. package/dist/cli/options.d.cts +5 -0
  515. package/dist/cli/options.d.cts.map +1 -0
  516. package/dist/cli/options.d.mts +5 -0
  517. package/dist/cli/options.d.mts.map +1 -0
  518. package/dist/cli/options.mjs +304 -0
  519. package/dist/cli/options.mjs.map +1 -0
  520. package/dist/cli/router.cjs +59 -0
  521. package/dist/cli/router.cjs.map +1 -0
  522. package/dist/cli/router.d.cts +32 -0
  523. package/dist/cli/router.d.cts.map +1 -0
  524. package/dist/cli/router.d.mts +32 -0
  525. package/dist/cli/router.d.mts.map +1 -0
  526. package/dist/cli/router.mjs +56 -0
  527. package/dist/cli/router.mjs.map +1 -0
  528. package/dist/cli/server/options.cjs +71 -0
  529. package/dist/cli/server/options.cjs.map +1 -0
  530. package/dist/cli/server/options.mjs +70 -0
  531. package/dist/cli/server/options.mjs.map +1 -0
  532. package/dist/cli/server/run.cjs +45 -0
  533. package/dist/cli/server/run.cjs.map +1 -0
  534. package/dist/cli/server/run.mjs +45 -0
  535. package/dist/cli/server/run.mjs.map +1 -0
  536. package/dist/cli-app.cjs +5 -0
  537. package/dist/cli-app.d.cts +2 -0
  538. package/dist/cli-app.d.mts +2 -0
  539. package/dist/cli-app.mjs +2 -0
  540. package/dist/cli.cjs +28 -0
  541. package/dist/cli.d.cts +11 -0
  542. package/dist/cli.d.mts +11 -0
  543. package/dist/cli.mjs +11 -0
  544. package/dist/codex.cjs +8 -0
  545. package/dist/codex.d.cts +2 -0
  546. package/dist/codex.d.mts +2 -0
  547. package/dist/codex.mjs +2 -0
  548. package/dist/commands.cjs +23 -0
  549. package/dist/commands.d.cts +9 -0
  550. package/dist/commands.d.mts +9 -0
  551. package/dist/commands.mjs +9 -0
  552. package/dist/compatibility-command.cjs +4 -0
  553. package/dist/compatibility-command.d.cts +2 -0
  554. package/dist/compatibility-command.d.mts +2 -0
  555. package/dist/compatibility-command.mjs +2 -0
  556. package/dist/compatibility-context.cjs +3 -0
  557. package/dist/compatibility-context.d.cts +2 -0
  558. package/dist/compatibility-context.d.mts +2 -0
  559. package/dist/compatibility-context.mjs +2 -0
  560. package/dist/compatibility-options.cjs +5 -0
  561. package/dist/compatibility-options.d.cts +2 -0
  562. package/dist/compatibility-options.d.mts +2 -0
  563. package/dist/compatibility-options.mjs +2 -0
  564. package/dist/compatibility.cjs +27 -0
  565. package/dist/compatibility.d.cts +6 -0
  566. package/dist/compatibility.d.mts +6 -0
  567. package/dist/compatibility.mjs +6 -0
  568. package/dist/compiler/cache.cjs +331 -0
  569. package/dist/compiler/cache.cjs.map +1 -0
  570. package/dist/compiler/cache.mjs +323 -0
  571. package/dist/compiler/cache.mjs.map +1 -0
  572. package/dist/compiler/index.cjs +996 -0
  573. package/dist/compiler/index.cjs.map +1 -0
  574. package/dist/compiler/index.mjs +988 -0
  575. package/dist/compiler/index.mjs.map +1 -0
  576. package/dist/compiler/inputs.cjs +83 -0
  577. package/dist/compiler/inputs.cjs.map +1 -0
  578. package/dist/compiler/inputs.mjs +78 -0
  579. package/dist/compiler/inputs.mjs.map +1 -0
  580. package/dist/composer.cjs +28 -0
  581. package/dist/composer.d.cts +4 -0
  582. package/dist/composer.d.mts +4 -0
  583. package/dist/composer.mjs +4 -0
  584. package/dist/composition/harnessState/index.cjs +48 -0
  585. package/dist/composition/harnessState/index.cjs.map +1 -0
  586. package/dist/composition/harnessState/index.d.cts +19 -0
  587. package/dist/composition/harnessState/index.d.cts.map +1 -0
  588. package/dist/composition/harnessState/index.d.mts +19 -0
  589. package/dist/composition/harnessState/index.d.mts.map +1 -0
  590. package/dist/composition/harnessState/index.mjs +34 -0
  591. package/dist/composition/harnessState/index.mjs.map +1 -0
  592. package/dist/composition/layerPackageInstaller/index.cjs +342 -0
  593. package/dist/composition/layerPackageInstaller/index.cjs.map +1 -0
  594. package/dist/composition/layerPackageInstaller/index.d.cts +45 -0
  595. package/dist/composition/layerPackageInstaller/index.d.cts.map +1 -0
  596. package/dist/composition/layerPackageInstaller/index.d.mts +45 -0
  597. package/dist/composition/layerPackageInstaller/index.d.mts.map +1 -0
  598. package/dist/composition/layerPackageInstaller/index.mjs +334 -0
  599. package/dist/composition/layerPackageInstaller/index.mjs.map +1 -0
  600. package/dist/composition/projectTrust/index.cjs +51 -0
  601. package/dist/composition/projectTrust/index.cjs.map +1 -0
  602. package/dist/composition/projectTrust/index.d.cts +22 -0
  603. package/dist/composition/projectTrust/index.d.cts.map +1 -0
  604. package/dist/composition/projectTrust/index.d.mts +22 -0
  605. package/dist/composition/projectTrust/index.d.mts.map +1 -0
  606. package/dist/composition/projectTrust/index.mjs +48 -0
  607. package/dist/composition/projectTrust/index.mjs.map +1 -0
  608. package/dist/composition/repository/index.cjs +69 -0
  609. package/dist/composition/repository/index.cjs.map +1 -0
  610. package/dist/composition/repository/index.d.cts +22 -0
  611. package/dist/composition/repository/index.d.cts.map +1 -0
  612. package/dist/composition/repository/index.d.mts +22 -0
  613. package/dist/composition/repository/index.d.mts.map +1 -0
  614. package/dist/composition/repository/index.mjs +64 -0
  615. package/dist/composition/repository/index.mjs.map +1 -0
  616. package/dist/composition/syncDrift/index.cjs +160 -0
  617. package/dist/composition/syncDrift/index.cjs.map +1 -0
  618. package/dist/composition/syncDrift/index.d.cts +41 -0
  619. package/dist/composition/syncDrift/index.d.cts.map +1 -0
  620. package/dist/composition/syncDrift/index.d.mts +41 -0
  621. package/dist/composition/syncDrift/index.d.mts.map +1 -0
  622. package/dist/composition/syncDrift/index.mjs +152 -0
  623. package/dist/composition/syncDrift/index.mjs.map +1 -0
  624. package/dist/composition/syncState/index.cjs +593 -0
  625. package/dist/composition/syncState/index.cjs.map +1 -0
  626. package/dist/composition/syncState/index.d.cts +188 -0
  627. package/dist/composition/syncState/index.d.cts.map +1 -0
  628. package/dist/composition/syncState/index.d.mts +188 -0
  629. package/dist/composition/syncState/index.d.mts.map +1 -0
  630. package/dist/composition/syncState/index.mjs +559 -0
  631. package/dist/composition/syncState/index.mjs.map +1 -0
  632. package/dist/composition/transitionLayers.cjs +17 -0
  633. package/dist/composition/transitionLayers.cjs.map +1 -0
  634. package/dist/composition/transitionLayers.d.cts +6 -0
  635. package/dist/composition/transitionLayers.d.cts.map +1 -0
  636. package/dist/composition/transitionLayers.d.mts +6 -0
  637. package/dist/composition/transitionLayers.d.mts.map +1 -0
  638. package/dist/composition/transitionLayers.mjs +16 -0
  639. package/dist/composition/transitionLayers.mjs.map +1 -0
  640. package/dist/composition/types/harness.d.cts +49 -0
  641. package/dist/composition/types/harness.d.cts.map +1 -0
  642. package/dist/composition/types/harness.d.mts +49 -0
  643. package/dist/composition/types/harness.d.mts.map +1 -0
  644. package/dist/config.cjs +163 -0
  645. package/dist/config.d.cts +7 -0
  646. package/dist/config.d.mts +7 -0
  647. package/dist/config.mjs +7 -0
  648. package/dist/emit-mcp-command.cjs +4 -0
  649. package/dist/emit-mcp-command.d.cts +2 -0
  650. package/dist/emit-mcp-command.d.mts +2 -0
  651. package/dist/emit-mcp-command.mjs +2 -0
  652. package/dist/explain-command.cjs +5 -0
  653. package/dist/explain-command.d.cts +2 -0
  654. package/dist/explain-command.d.mts +2 -0
  655. package/dist/explain-command.mjs +2 -0
  656. package/dist/extensions/agent-model.cjs +41 -0
  657. package/dist/extensions/agent-model.cjs.map +1 -0
  658. package/dist/extensions/agent-model.d.cts +22 -0
  659. package/dist/extensions/agent-model.d.cts.map +1 -0
  660. package/dist/extensions/agent-model.d.mts +22 -0
  661. package/dist/extensions/agent-model.d.mts.map +1 -0
  662. package/dist/extensions/agent-model.mjs +35 -0
  663. package/dist/extensions/agent-model.mjs.map +1 -0
  664. package/dist/extensions/composed-pi.cjs +46 -0
  665. package/dist/extensions/composed-pi.cjs.map +1 -0
  666. package/dist/extensions/composed-pi.d.cts +13 -0
  667. package/dist/extensions/composed-pi.d.cts.map +1 -0
  668. package/dist/extensions/composed-pi.d.mts +13 -0
  669. package/dist/extensions/composed-pi.d.mts.map +1 -0
  670. package/dist/extensions/composed-pi.mjs +41 -0
  671. package/dist/extensions/composed-pi.mjs.map +1 -0
  672. package/dist/extensions/context-catalog.cjs +96 -0
  673. package/dist/extensions/context-catalog.cjs.map +1 -0
  674. package/dist/extensions/context-catalog.d.cts +4 -0
  675. package/dist/extensions/context-catalog.d.cts.map +1 -0
  676. package/dist/extensions/context-catalog.d.mts +5 -0
  677. package/dist/extensions/context-catalog.d.mts.map +1 -0
  678. package/dist/extensions/context-catalog.mjs +96 -0
  679. package/dist/extensions/context-catalog.mjs.map +1 -0
  680. package/dist/extensions/cordis-finalizer.cjs +24 -0
  681. package/dist/extensions/cordis-finalizer.cjs.map +1 -0
  682. package/dist/extensions/cordis-finalizer.d.cts +7 -0
  683. package/dist/extensions/cordis-finalizer.d.cts.map +1 -0
  684. package/dist/extensions/cordis-finalizer.d.mts +7 -0
  685. package/dist/extensions/cordis-finalizer.d.mts.map +1 -0
  686. package/dist/extensions/cordis-finalizer.mjs +19 -0
  687. package/dist/extensions/cordis-finalizer.mjs.map +1 -0
  688. package/dist/extensions/cordis-host.cjs +19 -0
  689. package/dist/extensions/cordis-host.cjs.map +1 -0
  690. package/dist/extensions/cordis-host.d.cts +7 -0
  691. package/dist/extensions/cordis-host.d.cts.map +1 -0
  692. package/dist/extensions/cordis-host.d.mts +7 -0
  693. package/dist/extensions/cordis-host.d.mts.map +1 -0
  694. package/dist/extensions/cordis-host.mjs +14 -0
  695. package/dist/extensions/cordis-host.mjs.map +1 -0
  696. package/dist/extensions/effort.cjs +54 -0
  697. package/dist/extensions/effort.cjs.map +1 -0
  698. package/dist/extensions/effort.d.cts +8 -0
  699. package/dist/extensions/effort.d.cts.map +1 -0
  700. package/dist/extensions/effort.d.mts +8 -0
  701. package/dist/extensions/effort.d.mts.map +1 -0
  702. package/dist/extensions/effort.mjs +48 -0
  703. package/dist/extensions/effort.mjs.map +1 -0
  704. package/dist/extensions/launcher-bootstrap.cjs +38 -0
  705. package/dist/extensions/launcher-bootstrap.cjs.map +1 -0
  706. package/dist/extensions/launcher-bootstrap.d.cts +16 -0
  707. package/dist/extensions/launcher-bootstrap.d.cts.map +1 -0
  708. package/dist/extensions/launcher-bootstrap.d.mts +16 -0
  709. package/dist/extensions/launcher-bootstrap.d.mts.map +1 -0
  710. package/dist/extensions/launcher-bootstrap.mjs +33 -0
  711. package/dist/extensions/launcher-bootstrap.mjs.map +1 -0
  712. package/dist/extensions/ollama-provider.cjs +32 -0
  713. package/dist/extensions/ollama-provider.cjs.map +1 -0
  714. package/dist/extensions/ollama-provider.d.cts +5 -0
  715. package/dist/extensions/ollama-provider.d.cts.map +1 -0
  716. package/dist/extensions/ollama-provider.d.mts +5 -0
  717. package/dist/extensions/ollama-provider.d.mts.map +1 -0
  718. package/dist/extensions/ollama-provider.mjs +32 -0
  719. package/dist/extensions/ollama-provider.mjs.map +1 -0
  720. package/dist/extensions/pi.cjs +63 -0
  721. package/dist/extensions/pi.cjs.map +1 -0
  722. package/dist/extensions/pi.d.cts +7 -0
  723. package/dist/extensions/pi.d.cts.map +1 -0
  724. package/dist/extensions/pi.d.mts +7 -0
  725. package/dist/extensions/pi.d.mts.map +1 -0
  726. package/dist/extensions/pi.mjs +58 -0
  727. package/dist/extensions/pi.mjs.map +1 -0
  728. package/dist/extensions/server.cjs +20 -0
  729. package/dist/extensions/server.cjs.map +1 -0
  730. package/dist/extensions/server.d.cts +5 -0
  731. package/dist/extensions/server.d.cts.map +1 -0
  732. package/dist/extensions/server.d.mts +5 -0
  733. package/dist/extensions/server.d.mts.map +1 -0
  734. package/dist/extensions/server.mjs +15 -0
  735. package/dist/extensions/server.mjs.map +1 -0
  736. package/dist/extensions/style-system.cjs +234 -0
  737. package/dist/extensions/style-system.cjs.map +1 -0
  738. package/dist/extensions/style-system.d.cts +32 -0
  739. package/dist/extensions/style-system.d.cts.map +1 -0
  740. package/dist/extensions/style-system.d.mts +32 -0
  741. package/dist/extensions/style-system.d.mts.map +1 -0
  742. package/dist/extensions/style-system.mjs +219 -0
  743. package/dist/extensions/style-system.mjs.map +1 -0
  744. package/dist/extensions/terminal-child-session.cjs +76 -0
  745. package/dist/extensions/terminal-child-session.cjs.map +1 -0
  746. package/dist/extensions/terminal-child-session.d.cts +7 -0
  747. package/dist/extensions/terminal-child-session.d.cts.map +1 -0
  748. package/dist/extensions/terminal-child-session.d.mts +7 -0
  749. package/dist/extensions/terminal-child-session.d.mts.map +1 -0
  750. package/dist/extensions/terminal-child-session.mjs +69 -0
  751. package/dist/extensions/terminal-child-session.mjs.map +1 -0
  752. package/dist/extensions/transition-coordinator.cjs +154 -0
  753. package/dist/extensions/transition-coordinator.cjs.map +1 -0
  754. package/dist/extensions/transition-coordinator.d.cts +8 -0
  755. package/dist/extensions/transition-coordinator.d.cts.map +1 -0
  756. package/dist/extensions/transition-coordinator.d.mts +8 -0
  757. package/dist/extensions/transition-coordinator.d.mts.map +1 -0
  758. package/dist/extensions/transition-coordinator.mjs +146 -0
  759. package/dist/extensions/transition-coordinator.mjs.map +1 -0
  760. package/dist/harness-context.cjs +5 -0
  761. package/dist/harness-context.d.cts +2 -0
  762. package/dist/harness-context.d.mts +2 -0
  763. package/dist/harness-context.mjs +2 -0
  764. package/dist/harness-state.cjs +19 -0
  765. package/dist/harness-state.d.cts +2 -0
  766. package/dist/harness-state.d.mts +2 -0
  767. package/dist/harness-state.mjs +2 -0
  768. package/dist/help.cjs +16 -0
  769. package/dist/help.d.cts +8 -0
  770. package/dist/help.d.mts +8 -0
  771. package/dist/help.mjs +8 -0
  772. package/dist/index.cjs +368 -0
  773. package/dist/index.d.cts +49 -0
  774. package/dist/index.d.mts +49 -0
  775. package/dist/index.mjs +46 -0
  776. package/dist/init-command.cjs +4 -0
  777. package/dist/init-command.d.cts +2 -0
  778. package/dist/init-command.d.mts +2 -0
  779. package/dist/init-command.mjs +2 -0
  780. package/dist/launch-command.cjs +7 -0
  781. package/dist/launch-command.d.cts +2 -0
  782. package/dist/launch-command.d.mts +2 -0
  783. package/dist/launch-command.mjs +2 -0
  784. package/dist/matrix-options.cjs +28 -0
  785. package/dist/matrix-options.d.cts +2 -0
  786. package/dist/matrix-options.d.mts +2 -0
  787. package/dist/matrix-options.mjs +2 -0
  788. package/dist/matrix-switcher.cjs +11 -0
  789. package/dist/matrix-switcher.d.cts +3 -0
  790. package/dist/matrix-switcher.d.mts +3 -0
  791. package/dist/matrix-switcher.mjs +3 -0
  792. package/dist/mcp-filter.cjs +9 -0
  793. package/dist/mcp-filter.d.cts +1 -0
  794. package/dist/mcp-filter.d.mts +1 -0
  795. package/dist/mcp-filter.mjs +2 -0
  796. package/dist/options.cjs +3 -0
  797. package/dist/options.d.cts +2 -0
  798. package/dist/options.d.mts +2 -0
  799. package/dist/options.mjs +2 -0
  800. package/dist/process.cjs +12 -0
  801. package/dist/process.d.cts +2 -0
  802. package/dist/process.d.mts +2 -0
  803. package/dist/process.mjs +2 -0
  804. package/dist/project-trust.cjs +6 -0
  805. package/dist/project-trust.d.cts +2 -0
  806. package/dist/project-trust.d.mts +2 -0
  807. package/dist/project-trust.mjs +2 -0
  808. package/dist/repository.cjs +5 -0
  809. package/dist/repository.d.cts +2 -0
  810. package/dist/repository.d.mts +2 -0
  811. package/dist/repository.mjs +2 -0
  812. package/dist/resource-collector.cjs +9 -0
  813. package/dist/resource-collector.d.cts +1 -0
  814. package/dist/resource-collector.d.mts +1 -0
  815. package/dist/resource-collector.mjs +2 -0
  816. package/dist/services.cjs +154 -0
  817. package/dist/services.d.cts +21 -0
  818. package/dist/services.d.mts +21 -0
  819. package/dist/services.mjs +21 -0
  820. package/dist/shared.cjs +18 -0
  821. package/dist/shared.d.cts +2 -0
  822. package/dist/shared.d.mts +2 -0
  823. package/dist/shared.mjs +2 -0
  824. package/dist/sync-command.cjs +13 -0
  825. package/dist/sync-command.d.cts +2 -0
  826. package/dist/sync-command.d.mts +2 -0
  827. package/dist/sync-command.mjs +2 -0
  828. package/dist/sync-state.cjs +33 -0
  829. package/dist/sync-state.d.cts +2 -0
  830. package/dist/sync-state.d.mts +2 -0
  831. package/dist/sync-state.mjs +2 -0
  832. package/dist/utils.cjs +6 -0
  833. package/dist/utils.d.cts +3 -0
  834. package/dist/utils.d.mts +3 -0
  835. package/dist/utils.mjs +3 -0
  836. package/package.json +16 -16
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["os","resolveSyncLocation","readSyncRegistration","path","fs","crypto","isRecord","loadDomains","resolvePluginEntries","loadProfiles","PERSONA_FILES","PRECOMPILE_STATE_VERSION","SYNC_STATE_VERSION","isDoomMcpProjection","LAYER_RESOLVERS","PERSONA_ENTRY","OLLAMA_PRESET"],"sources":["../../../src/composition/syncState/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nimport { loadDomains, resolvePluginEntries } from '@agimon-ai/doompi-config/domains';\nimport type { LayerResolvers, MajorModesConfig } from '@agimon-ai/doompi-config/majorModes';\nimport { loadProfiles, PERSONA_FILES } from '@agimon-ai/doompi-config/profiles';\nimport type { HarnessState } from '@agimon-ai/doompi-config/types';\nimport { isDoomMcpProjection, type DoomMcpProjection } from '@agimon-ai/doompi-core/mcp-projection';\nimport { isRecord } from '@agimon-ai/doompi-core/runtime-json';\nimport type { JsonObject } from '@agimon-ai/doompi-core/runtime-json';\nimport {\n assertSyncLocationSafe,\n resolveSyncLocation,\n type SyncIdentity,\n type SyncLocation,\n} from '@agimon-ai/doompi-core/sync-location';\nimport { readSyncRegistration } from '@agimon-ai/doompi-core/sync-registration';\nimport { PRECOMPILE_STATE_VERSION, SYNC_STATE_VERSION } from '@agimon-ai/doompi-core/sync-state-contract';\n\nimport {\n assembleChildExtensions,\n assembleExtensions,\n type ExtensionLayerResolvers,\n LAYER_RESOLVERS,\n OLLAMA_PRESET,\n PERSONA_ENTRY,\n} from '../../builders/cli/extensionAssembler';\n\nexport { SYNC_STATE_VERSION } from '@agimon-ai/doompi-core/sync-state-contract';\n\n/**\n * The file `doom-pi sync` writes and the doom-pi Pi extension reads back.\n *\n * This is the whole contract between the two halves of the synced path. Sync\n * runs in plain Node, where module resolution and the repository config are\n * available; the extension runs inside a Pi session, where neither can be\n * relied on. Everything the extension needs is therefore resolved once here,\n * and everything in this file has to survive JSON.\n */\n\nconst PI_DIRECTORY = '.pi';\n/** The `.doom` config directory name, under both the repo root and `~/.pi`. */\nconst DOOM_CONFIG_DIRECTORY = '.doom';\nconst RUN_DIRECTORY = 'run';\nconst DEFAULT_PRESET = 'default';\nconst PRIVATE_FILE_MODE = 0o600;\nconst PRIVATE_DIRECTORY_MODE = 0o700;\nconst OWN_PREFIX = 'own:';\nconst PACKAGE_PREFIX = 'pkg:';\nconst LOCAL_PREFIX = 'local:';\nconst LOCAL_PACKAGE_NAME_PREFIX = 'local-package-name:';\nconst ENTRY_INDEX_SEPARATOR = ':entry:';\nconst COMPOSITION_FINGERPRINT = /^[a-f0-9]{64}$/u;\nconst PLUGIN_MCP_CONFIG_FILES = ['.mcp.json', 'mcp.json'] as const;\nconst PACKAGE_MANIFEST_FILE = 'package.json';\n/** Folder the cockpit bundler compiles straight from each installed package. */\nconst WEB_PLUGIN_DIRECTORY = 'web';\n\n/** Config that feeds a sync, in the order the hash reads it. */\nconst HASHED_CONFIG_FILES = ['config.yaml', 'modes.yaml', 'domains.yaml', 'profiles.yaml', 'hooks.yaml'] as const;\n\nexport interface SyncSelection {\n majorMode: string;\n domains: string[];\n profile?: string;\n preset: string;\n}\n\n/** Paths to the resources sync staged, before any live switch replaces them. */\nexport interface SyncBaseline {\n mcpConfigPath?: string;\n personaFile?: string;\n themePath: string;\n themeName: string;\n}\n\nexport interface SyncPrecompileState {\n /** Version of the lightweight freshness contract used by package startup. */\n version: number;\n strategy: 'bundle';\n /** Package entry the generated bootstrap bundles. */\n bootstrapEntry: string;\n /** Compiler manifest whose output is the graph-bundled package bootstrap. */\n bootstrapManifest: string;\n /** Compiler manifest for each graph-bundled composition. */\n bundleManifests: Record<string, string>;\n}\n\nexport interface SyncServerBundleState {\n descriptorPath: string;\n fingerprint: string;\n compilerManifests: Record<string, string>;\n sourcesHash: string;\n}\n\nexport interface SyncState {\n version: number;\n root: string;\n /** Canonical repository and worktree namespace that owns this state. */\n identity: SyncIdentity;\n /** Hash of the config that produced this state, for the staleness warning. */\n inputsHash: string;\n /**\n * Hash of the cockpit sources and package versions this state was built from.\n *\n * Absent in a state written before cockpit sources were tracked, which reads\n * as \"cannot be compared\" rather than as a change, so an old state does not\n * force a resync on sight.\n */\n webSourcesHash?: string;\n /** Canonical composition selected when this state was recorded. */\n compositionFingerprint: string;\n selection: SyncSelection;\n /** Harness environment the extension applies when the values are unset. */\n env: Record<string, string>;\n /**\n * State the environment does not carry, so it has to be recorded on its own.\n *\n * Plugin hooks, the profile's environment defaults, and the neutral MCP\n * projection live in the session state file rather than in variables.\n */\n fileState: Pick<HarnessState, 'profileEnvironment' | 'pluginHooks'> & {\n mcpProjection: DoomMcpProjection;\n };\n /** Entry name to absolute path, covering every layer, not just the selected mode's. */\n resolved: Record<string, string>;\n /**\n * The same entries after TypeScript ones were bundled to plain ESM.\n *\n * Kept apart from `resolved` so the staleness check still compares resolution\n * against resolution; a state written before this existed simply has none and\n * falls back to loading the source.\n */\n compiled?: Record<string, string>;\n /** Aggregate entry by canonical composition fingerprint. */\n bundles?: Record<string, string>;\n /** Graph-compiled synced bootstrap dynamically loaded by the package entry. */\n bootstrap?: string;\n /** Inputs used to validate generated artifacts without loading the compiler. */\n precompile?: SyncPrecompileState;\n /** Absent only in generations produced before the server descriptor cutover. */\n serverBundle?: SyncServerBundleState;\n baseline: SyncBaseline;\n}\n\nexport function syncDirectory(repoRoot: string, homeDirectory: string = os.homedir()): string {\n return resolveSyncLocation(repoRoot, homeDirectory).directory;\n}\n\nexport function syncStatePath(repoRoot: string, homeDirectory: string = os.homedir()): string {\n return (\n readSyncRegistration(repoRoot, homeDirectory)?.statePath ?? resolveSyncLocation(repoRoot, homeDirectory).statePath\n );\n}\n\nexport function legacySyncDirectory(repoRoot: string): string {\n return resolveSyncLocation(repoRoot).legacyDirectory;\n}\n\nexport function legacySyncStatePath(repoRoot: string): string {\n return resolveSyncLocation(repoRoot).legacyStatePath;\n}\n\nfunction canonicalPath(target: string): string {\n const absolute = path.resolve(target);\n try {\n return fs.realpathSync(absolute);\n } catch {\n const parent = path.dirname(absolute);\n if (parent === absolute) return absolute;\n return path.join(canonicalPath(parent), path.basename(absolute));\n }\n}\n\nfunction isInside(directory: string, target: string): boolean {\n const relative = path.relative(canonicalPath(directory), canonicalPath(target));\n return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));\n}\n\n/** Whether generated state belongs to the repository that is reading it. */\nexport function syncStateRootMatches(repoRoot: string, stateRoot: string): boolean {\n return canonicalPath(repoRoot) === canonicalPath(stateRoot);\n}\n\n/**\n * Per-process scratch directory for live `/domains` and `/profile` switches.\n *\n * Switching rewrites the MCP config and the persona prompt. Writing those back\n * into the synced directory would both mutate the pinned baseline and let two\n * Pi sessions in one repository overwrite each other, which the launcher avoids\n * by giving every run its own temporary directory.\n */\nexport function runDirectory(\n repoRoot: string,\n processId: number = process.pid,\n homeDirectory: string = os.homedir(),\n): string {\n return path.join(syncDirectory(repoRoot, homeDirectory), RUN_DIRECTORY, String(processId));\n}\n\n/**\n * How a Pi project settings file should refer to a generated path.\n *\n * Relative to `.pi` when the target lives in the repository, which keeps the\n * committed settings file identical on every machine. A doom-pi installed\n * outside the repository stays absolute: Pi accepts both, and a relative path\n * climbing out of the project would be neither portable nor readable.\n */\nexport function settingsRelativePath(repoRoot: string, target: string): string {\n const relative = path.relative(repoRoot, target);\n if (relative.startsWith('..') || path.isAbsolute(relative)) return target;\n return path.relative(path.join(repoRoot, PI_DIRECTORY), target).split(path.sep).join('/');\n}\n\nfunction readIfPresent(filePath: string): string {\n return fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';\n}\n\nfunction updateFramedHash(hash: ReturnType<typeof crypto.createHash>, label: string, value: string | Buffer): void {\n const bytes = typeof value === 'string' ? Buffer.from(value) : value;\n hash.update(`${String(label.length)}:${label}:${String(bytes.byteLength)}:`);\n hash.update(bytes);\n}\n\n/** Hashes path, existence, and bytes without making absent and empty files aliases. */\nfunction updateFileInputHash(hash: ReturnType<typeof crypto.createHash>, filePath: string): void {\n const absolutePath = path.resolve(filePath);\n updateFramedHash(hash, 'path', absolutePath);\n if (!fs.existsSync(absolutePath)) {\n updateFramedHash(hash, 'state', 'missing');\n return;\n }\n updateFramedHash(hash, 'state', 'present');\n updateFramedHash(hash, 'contents', fs.readFileSync(absolutePath));\n}\n\n/** Package root owning a resolved entry, or undefined when it sits outside one. */\nfunction owningPackageRoot(entryPath: string): string | undefined {\n // The resolved map also carries package-name metadata. Relative metadata must\n // not become a filesystem path whose meaning changes with process.cwd().\n if (!path.isAbsolute(entryPath)) return undefined;\n let directory = path.dirname(entryPath);\n for (;;) {\n if (fs.existsSync(path.join(directory, PACKAGE_MANIFEST_FILE))) return directory;\n const parent = path.dirname(directory);\n if (parent === directory) return undefined;\n directory = parent;\n }\n}\n\n/** Every regular file under a directory, as absolute paths in a stable order. */\nfunction filesUnder(directory: string): string[] {\n if (!fs.existsSync(directory)) return [];\n const found: string[] = [];\n const walk = (current: string): void => {\n for (const entry of fs.readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {\n const full = path.join(current, entry.name);\n if (entry.isDirectory()) walk(full);\n else if (entry.isFile()) found.push(full);\n }\n };\n walk(directory);\n return found;\n}\n\n/**\n * Hashes the cockpit sources and package versions a sync compiled.\n *\n * The cockpit bundle is built from each installed package's `web/` folder by\n * `syncWebBundle`, straight from source, with no compiler manifest recording\n * what went in. Nothing else in the drift check reads those files, so editing a\n * plugin surface and rebuilding left the hub serving the previously bundled\n * cockpit with nothing reporting a reason. Compiled entries are covered\n * elsewhere, by the content digests in their compiler manifests, so only the\n * entry identity and its package version are folded in here.\n *\n * Bounded on purpose: the web sources of a full composition are a few hundred\n * small files, which is cheap enough for the hub to poll.\n */\nexport function computeWebSourcesHash(resolved: Record<string, string>): string {\n const hash = crypto.createHash('sha256');\n const roots = [...new Set(Object.values(resolved).flatMap((entry) => owningPackageRoot(entry) ?? []))].sort();\n for (const root of roots) {\n updateFramedHash(hash, 'package', root);\n const manifestPath = path.join(root, PACKAGE_MANIFEST_FILE);\n let manifest: { name?: unknown; version?: unknown } = {};\n try {\n manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')) as { name?: unknown; version?: unknown };\n } catch {\n // An unreadable manifest still contributes its path above, so the package\n // is not silently dropped from the hash; the version simply reads empty\n // and any later repair shows up as a change.\n manifest = {};\n }\n updateFramedHash(hash, 'name', typeof manifest.name === 'string' ? manifest.name : '');\n updateFramedHash(hash, 'version', typeof manifest.version === 'string' ? manifest.version : '');\n for (const file of filesUnder(path.join(root, WEB_PLUGIN_DIRECTORY))) updateFileInputHash(hash, file);\n }\n for (const [name, entry] of Object.entries(resolved).sort(([left], [right]) => left.localeCompare(right))) {\n updateFramedHash(hash, 'entry', `${name}\u0000${entry}`);\n }\n return hash.digest('hex');\n}\n\n/** Include declaration changes even for packages that did not previously expose a server facet. */\nexport function computeServerSourcesHash(resolved: Record<string, string>): string {\n const hash = crypto.createHash('sha256');\n const roots = [...new Set(Object.values(resolved).flatMap((entry) => owningPackageRoot(entry) ?? []))].sort();\n for (const root of roots) {\n const manifestPath = path.join(root, PACKAGE_MANIFEST_FILE);\n updateFileInputHash(hash, manifestPath);\n const manifest: unknown = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));\n if (!isRecord(manifest) || !isRecord(manifest.doompiServer) || !isRecord(manifest.doompiServer.contracts)) continue;\n // Include missing declarations too: building or repairing a contract must invalidate an incomplete generation.\n for (const file of [manifest.doompiServer.contracts.entry, manifest.doompiServer.contracts.dist]) {\n if (typeof file !== 'string' || !file.startsWith('./') || file.split('/').includes('..') || /[\\\\%?#]/u.test(file))\n continue;\n updateFileInputHash(hash, path.join(root, file));\n }\n }\n for (const [name, entry] of Object.entries(resolved).sort(([left], [right]) => left.localeCompare(right))) {\n updateFramedHash(hash, 'entry', JSON.stringify([name, entry]));\n }\n return hash.digest('hex');\n}\n\n/**\n * Hashes the configuration a sync consumed.\n *\n * Deliberately cheap: the extension recomputes this on every session start, so\n * it reads config, marketplace, local plugin manifests, and profile persona text\n * without downloading plugins or re-resolving packages. A dependency upgrade that\n * moves a package path therefore does not show up here; `doom-pi sync --check`\n * re-resolves and is the check that catches that.\n */\nexport function computeInputsHash(\n repoRoot: string,\n selection: SyncSelection,\n homeDirectory: string = os.homedir(),\n): string {\n // Match sync publication, including callers that reach the repository through a symlink.\n repoRoot = resolveSyncLocation(repoRoot, homeDirectory).root;\n const hash = crypto.createHash('sha256');\n hash.update(JSON.stringify({ ...selection, domains: [...selection.domains].sort() }));\n // Every .doom document layers the global copy under the repository one, so an\n // edit in either location is a real change.\n for (const directory of [\n path.join(homeDirectory, PI_DIRECTORY, DOOM_CONFIG_DIRECTORY),\n path.join(repoRoot, DOOM_CONFIG_DIRECTORY),\n ]) {\n for (const fileName of HASHED_CONFIG_FILES) hash.update(readIfPresent(path.join(directory, fileName)));\n }\n updateFileInputHash(hash, path.join(repoRoot, '.mcp.json'));\n\n const catalog = loadDomains(repoRoot, homeDirectory).plugins;\n for (const root of catalog.roots) hash.update(root);\n for (const diagnostic of catalog.diagnostics) hash.update(diagnostic);\n for (const marketplace of catalog.marketplaces) {\n hash.update(marketplace);\n hash.update(readIfPresent(marketplace));\n }\n for (const [name, plugin] of Object.entries(catalog.entries).sort(([left], [right]) => left.localeCompare(right))) {\n hash.update(name);\n hash.update(JSON.stringify(plugin.source));\n if (plugin.manifest) {\n hash.update(plugin.manifest.path);\n hash.update(readIfPresent(plugin.manifest.path));\n }\n }\n\n let selectedPluginDirectories: string[] = [];\n try {\n selectedPluginDirectories = [\n ...new Set(\n resolvePluginEntries(repoRoot, selection.domains, [], homeDirectory)\n .filter((plugin) => plugin.mcp !== false)\n .map((plugin) => path.resolve(plugin.directory)),\n ),\n ].sort();\n } catch {\n // The surrounding .doom inputs already make an invalid or removed domain\n // selection stale. Keep this lightweight check readable for old state\n // instead of turning that expected staleness into a startup exception.\n }\n for (const directory of selectedPluginDirectories) {\n for (const fileName of PLUGIN_MCP_CONFIG_FILES) {\n updateFileInputHash(hash, path.join(directory, fileName));\n }\n }\n\n for (const profile of loadProfiles(repoRoot, homeDirectory)) {\n hash.update(profile.name);\n hash.update(profile.personaRoot);\n hash.update(profile.persona);\n hash.update(JSON.stringify(profile.env));\n const personaDirectory = path.resolve(profile.personaRoot, profile.persona);\n for (const fileName of PERSONA_FILES) {\n const filePath = path.join(personaDirectory, fileName);\n hash.update(filePath);\n hash.update(readIfPresent(filePath));\n }\n }\n return hash.digest('hex');\n}\n\nfunction stringRecord(value: unknown, field: string, statePath: string): Record<string, string> {\n if (!isRecord(value)) throw new Error(`Doom sync state at ${statePath} requires ${field} to be an object`);\n return Object.fromEntries(\n Object.entries(value).filter((entry): entry is [string, string] => typeof entry[1] === 'string'),\n );\n}\n\nfunction parsePrecompileState(value: unknown, statePath: string): SyncPrecompileState {\n if (\n !isRecord(value) ||\n value.version !== PRECOMPILE_STATE_VERSION ||\n value.strategy !== 'bundle' ||\n typeof value.bootstrapEntry !== 'string' ||\n typeof value.bootstrapManifest !== 'string' ||\n !isRecord(value.bundleManifests) ||\n Object.entries(value.bundleManifests).some(\n ([fingerprint, manifest]) => !COMPOSITION_FINGERPRINT.test(fingerprint) || typeof manifest !== 'string',\n )\n ) {\n throw new Error(`Doom sync state at ${statePath} has an invalid precompile record`);\n }\n return {\n version: value.version,\n strategy: value.strategy,\n bootstrapEntry: value.bootstrapEntry,\n bootstrapManifest: value.bootstrapManifest,\n bundleManifests: value.bundleManifests as Record<string, string>,\n };\n}\n\nfunction precompileMatchesBundles(\n precompile: SyncPrecompileState,\n bundles: Record<string, string> | undefined,\n): boolean {\n const bundleFingerprints = Object.keys(bundles ?? {}).sort();\n const manifestFingerprints = Object.keys(precompile.bundleManifests).sort();\n return (\n bundleFingerprints.length === manifestFingerprints.length &&\n bundleFingerprints.every((fingerprint, index) => fingerprint === manifestFingerprints[index])\n );\n}\n\ninterface ParseSyncStateOptions {\n repoRoot: string;\n location: SyncLocation;\n legacy: boolean;\n}\n\nfunction identityMatches(left: SyncIdentity, right: SyncIdentity): boolean {\n return left.repositoryId === right.repositoryId && left.worktreeId === right.worktreeId;\n}\n\nfunction parseSyncIdentity(value: unknown, statePath: string): SyncIdentity {\n if (!isRecord(value) || typeof value.repositoryId !== 'string' || typeof value.worktreeId !== 'string') {\n throw new Error(`Doom sync state at ${statePath} requires repository and worktree identity`);\n }\n return { repositoryId: value.repositoryId, worktreeId: value.worktreeId };\n}\n\nfunction parseSyncState(source: string, statePath: string, options: ParseSyncStateOptions): SyncState {\n let parsed: unknown;\n try {\n parsed = JSON.parse(source);\n } catch (error) {\n throw new Error(`Doom sync state at ${statePath} is not valid JSON`, { cause: error });\n }\n if (!isRecord(parsed)) throw new Error(`Doom sync state at ${statePath} must be an object`);\n if (typeof parsed.version !== 'number' || parsed.version !== SYNC_STATE_VERSION) {\n throw new Error(\n `Doom sync state at ${statePath} has version ${String(parsed.version)}, expected ${SYNC_STATE_VERSION}. Run doompi sync.`,\n );\n }\n if (typeof parsed.root !== 'string' || typeof parsed.inputsHash !== 'string') {\n throw new Error(`Doom sync state at ${statePath} requires string root and inputsHash`);\n }\n if (\n typeof parsed.compositionFingerprint !== 'string' ||\n !COMPOSITION_FINGERPRINT.test(parsed.compositionFingerprint)\n ) {\n throw new Error(`Doom sync state at ${statePath} requires a canonical compositionFingerprint`);\n }\n if (parsed.nativeGraphs !== undefined) {\n throw new Error(`Doom sync state at ${statePath} contains removed native graph state. Run doompi sync.`);\n }\n if (!syncStateRootMatches(options.repoRoot, parsed.root)) {\n throw new Error(`Doom sync state at ${statePath} belongs to a different repository: ${parsed.root}`);\n }\n const identity = parseSyncIdentity(parsed.identity, statePath);\n if (!identityMatches(identity, options.location.identity)) {\n throw new Error(`Doom sync state at ${statePath} belongs to a different repository or worktree identity`);\n }\n if (!isRecord(parsed.selection) || typeof parsed.selection.majorMode !== 'string') {\n throw new Error(`Doom sync state at ${statePath} requires a selection with a majorMode`);\n }\n if (!isRecord(parsed.baseline) || typeof parsed.baseline.themePath !== 'string') {\n throw new Error(`Doom sync state at ${statePath} requires a baseline with a themePath`);\n }\n const { majorMode, domains, profile, preset } = parsed.selection;\n const fileState = isRecord(parsed.fileState) ? parsed.fileState : {};\n if (!isDoomMcpProjection(fileState.mcpProjection)) {\n throw new Error(`Doom sync state at ${statePath} requires a valid MCP projection. Run doompi sync.`);\n }\n if (!syncStateRootMatches(parsed.root, fileState.mcpProjection.repoRoot)) {\n throw new Error(`Doom sync state at ${statePath} contains an MCP projection for a different repository`);\n }\n const generatedDirectory = options.legacy ? options.location.legacyDirectory : options.location.directory;\n const compiled = parsed.compiled === undefined ? undefined : stringRecord(parsed.compiled, 'compiled', statePath);\n const bundles = parsed.bundles === undefined ? undefined : stringRecord(parsed.bundles, 'bundles', statePath);\n const precompile = parsed.precompile === undefined ? undefined : parsePrecompileState(parsed.precompile, statePath);\n if (precompile && !precompileMatchesBundles(precompile, bundles)) {\n throw new Error(`Doom sync state at ${statePath} has an invalid precompile record`);\n }\n let serverBundle: SyncServerBundleState | undefined;\n if (parsed.serverBundle !== undefined) {\n const value = parsed.serverBundle;\n if (\n !isRecord(value) ||\n typeof value.descriptorPath !== 'string' ||\n typeof value.fingerprint !== 'string' ||\n !COMPOSITION_FINGERPRINT.test(value.fingerprint) ||\n typeof value.sourcesHash !== 'string' ||\n !COMPOSITION_FINGERPRINT.test(value.sourcesHash)\n ) {\n throw new Error(`Doom sync state at ${statePath} has an invalid server bundle record`);\n }\n const compilerManifests = stringRecord(value.compilerManifests, 'server compiler manifests', statePath);\n if (\n [value.descriptorPath, ...Object.values(compilerManifests)].some((entry) => !isInside(generatedDirectory, entry))\n ) {\n throw new Error(`Doom sync state at ${statePath} references server material outside ${generatedDirectory}`);\n }\n serverBundle = {\n descriptorPath: value.descriptorPath,\n fingerprint: value.fingerprint,\n compilerManifests,\n sourcesHash: value.sourcesHash,\n };\n }\n const bootstrap = typeof parsed.bootstrap === 'string' ? parsed.bootstrap : undefined;\n const generatedPaths = [bootstrap, ...Object.values(compiled ?? {}), ...Object.values(bundles ?? {})].filter(\n (entry): entry is string => entry !== undefined,\n );\n if (generatedPaths.some((entry) => !isInside(generatedDirectory, entry))) {\n throw new Error(`Doom sync state at ${statePath} references generated material outside ${generatedDirectory}`);\n }\n return {\n version: parsed.version,\n root: parsed.root,\n identity,\n inputsHash: parsed.inputsHash,\n webSourcesHash: typeof parsed.webSourcesHash === 'string' ? parsed.webSourcesHash : undefined,\n compositionFingerprint: parsed.compositionFingerprint,\n selection: {\n majorMode,\n domains: Array.isArray(domains) ? domains.filter((name): name is string => typeof name === 'string') : [],\n profile: typeof profile === 'string' ? profile : undefined,\n preset: typeof preset === 'string' ? preset : DEFAULT_PRESET,\n },\n env: stringRecord(parsed.env, 'env', statePath),\n fileState: {\n profileEnvironment: isRecord(fileState.profileEnvironment)\n ? (fileState.profileEnvironment as Record<string, string>)\n : {},\n pluginHooks: Array.isArray(fileState.pluginHooks) ? (fileState.pluginHooks as HarnessState['pluginHooks']) : [],\n mcpProjection: fileState.mcpProjection,\n },\n resolved: stringRecord(parsed.resolved, 'resolved', statePath),\n compiled,\n bundles,\n bootstrap,\n precompile,\n ...(serverBundle ? { serverBundle } : {}),\n baseline: parsed.baseline as unknown as SyncBaseline,\n };\n}\n\nexport interface LocatedSyncState {\n state: SyncState;\n location: SyncLocation;\n layout: 'global';\n}\n\n/** Reads only state reached through this repository/worktree's validated registration. */\nexport function readLocatedSyncState(\n repoRoot: string,\n homeDirectory: string = os.homedir(),\n): LocatedSyncState | undefined {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n const registration = readSyncRegistration(repoRoot, homeDirectory);\n if (!registration) return undefined;\n return {\n state: parseSyncState(fs.readFileSync(registration.statePath, 'utf8'), registration.statePath, {\n repoRoot,\n location,\n legacy: false,\n }),\n location,\n layout: 'global',\n };\n}\n\n/** Reads the synced state, or undefined when the repository was never synced. */\nexport function readSyncState(repoRoot: string, homeDirectory: string = os.homedir()): SyncState | undefined {\n return readLocatedSyncState(repoRoot, homeDirectory)?.state;\n}\n\nexport function serializeSyncState(state: SyncState): string {\n return `${JSON.stringify(state, null, 2)}\\n`;\n}\n\nexport async function writeSyncState(\n repoRoot: string,\n state: SyncState,\n homeDirectory: string = os.homedir(),\n targetPath?: string,\n): Promise<string> {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n const statePath = targetPath ?? location.statePath;\n if (state.version !== SYNC_STATE_VERSION) {\n throw new Error(`Doom sync state writes require version ${SYNC_STATE_VERSION}`);\n }\n if (!COMPOSITION_FINGERPRINT.test(state.compositionFingerprint)) {\n throw new Error('Doom sync state writes require a canonical composition fingerprint');\n }\n if (!isDoomMcpProjection(state.fileState.mcpProjection)) {\n throw new Error('Doom sync state writes require a valid MCP projection');\n }\n if (!syncStateRootMatches(state.root, state.fileState.mcpProjection.repoRoot)) {\n throw new Error('Refusing to write a Doom sync state whose MCP projection belongs to another repository');\n }\n if (!syncStateRootMatches(repoRoot, state.root) || !identityMatches(state.identity, location.identity)) {\n throw new Error('Refusing to write Doom sync state for a different repository or worktree');\n }\n if (state.precompile) {\n const precompile = parsePrecompileState(state.precompile, statePath);\n if (!precompileMatchesBundles(precompile, state.bundles)) {\n throw new Error(`Doom sync state at ${statePath} has an invalid precompile record`);\n }\n }\n if (!isInside(location.directory, statePath)) {\n throw new Error(`Refusing to write Doom sync state outside ${location.directory}`);\n }\n assertSyncLocationSafe(location);\n await fs.promises.mkdir(path.dirname(statePath), { mode: PRIVATE_DIRECTORY_MODE, recursive: true });\n const temporaryPath = `${statePath}.${process.pid}.${crypto.randomUUID()}.tmp`;\n try {\n await fs.promises.writeFile(temporaryPath, serializeSyncState(state), { mode: PRIVATE_FILE_MODE });\n await fs.promises.rename(temporaryPath, statePath);\n } catch (error) {\n await fs.promises.rm(temporaryPath, { force: true });\n throw error;\n }\n return statePath;\n}\n\nexport function ownKey(name: string): string {\n return `${OWN_PREFIX}${name}`;\n}\n\nexport function packageKey(specifier: string): string {\n return `${PACKAGE_PREFIX}${specifier}`;\n}\n\nexport function packageEntryKey(specifier: string, index: number): string {\n return index === 0 ? packageKey(specifier) : `${packageKey(specifier)}${ENTRY_INDEX_SEPARATOR}${index}`;\n}\n\n/**\n * Keyed by the absolute target, because the same relative specifier means\n * different files under the repository and the global config directory.\n */\nexport function localKey(specifier: string, baseDirectory: string): string {\n return `${LOCAL_PREFIX}${path.resolve(baseDirectory, specifier)}`;\n}\n\nexport function localEntryKey(specifier: string, baseDirectory: string, index: number): string {\n return index === 0\n ? localKey(specifier, baseDirectory)\n : `${localKey(specifier, baseDirectory)}${ENTRY_INDEX_SEPARATOR}${index}`;\n}\n\nexport function localPackageNameKey(specifier: string, baseDirectory: string): string {\n return `${LOCAL_PACKAGE_NAME_PREFIX}${path.resolve(baseDirectory, specifier)}`;\n}\n\nexport interface RecordingResolvers extends ExtensionLayerResolvers {\n /** Every name this resolver was asked for, keyed for the state file. */\n readonly resolved: Record<string, string>;\n packageEntries(name: string): string[];\n optionalPackageEntries(name: string): string[] | undefined;\n localEntries(specifier: string, baseDirectory: string): string[] | undefined;\n}\n\n/**\n * Resolvers that record what they resolve.\n *\n * Sync composes once with every layer selected and hands the recording to the\n * state file, so the extension never has to resolve a specifier itself.\n */\nexport function createRecordingResolvers(base: LayerResolvers = LAYER_RESOLVERS): RecordingResolvers {\n const resolved: Record<string, string> = {};\n const extensionBase = base as ExtensionLayerResolvers;\n const recordEntries = (entries: string[], keyFor: (index: number) => string): string[] => {\n entries.forEach((entry, index) => {\n resolved[keyFor(index)] = entry;\n });\n return entries;\n };\n return {\n resolved,\n ownEntry(name) {\n const entry = base.ownEntry(name);\n resolved[ownKey(name)] = entry;\n return entry;\n },\n packageEntry(name) {\n const entry = base.packageEntry(name);\n resolved[packageKey(name)] = entry;\n return entry;\n },\n optionalPackageEntry(name) {\n const entry = base.optionalPackageEntry(name);\n // A miss is recorded by omission, which is what later makes the extension\n // treat it as absent instead of failing the whole composition.\n if (entry) resolved[packageKey(name)] = entry;\n return entry;\n },\n packageEntries(name) {\n const entries = extensionBase.packageEntries?.(name) ?? [base.packageEntry(name)];\n return recordEntries(entries, (index) => packageEntryKey(name, index));\n },\n optionalPackageEntries(name) {\n let entries = extensionBase.optionalPackageEntries?.(name);\n if (entries === undefined) {\n const entry = base.optionalPackageEntry(name);\n entries = entry ? [entry] : undefined;\n }\n return entries ? recordEntries(entries, (index) => packageEntryKey(name, index)) : undefined;\n },\n localEntry(specifier, baseDirectory) {\n const entry = base.localEntry(specifier, baseDirectory);\n if (entry) resolved[localKey(specifier, baseDirectory)] = entry;\n return entry;\n },\n localEntries(specifier, baseDirectory) {\n let entries = extensionBase.localEntries?.(specifier, baseDirectory);\n if (entries === undefined) {\n const entry = base.localEntry(specifier, baseDirectory);\n entries = entry ? [entry] : undefined;\n }\n return entries ? recordEntries(entries, (index) => localEntryKey(specifier, baseDirectory, index)) : undefined;\n },\n localPackageName(specifier, baseDirectory) {\n const name = extensionBase.localPackageName?.(specifier, baseDirectory);\n if (name) resolved[localPackageNameKey(specifier, baseDirectory)] = name;\n return name;\n },\n };\n}\n\n/**\n * Resolves every entry any layer could contribute, in one pass.\n *\n * Composing with every layer selected and the widest options is what makes the\n * map complete: a later `/mode` switch inside a Pi session can then pick a\n * different set without resolving anything itself. The persona entry is asked\n * for separately because it remains a fixed host entry rather than a layer.\n */\nexport function recordResolvedEntries(\n majorModesConfig: MajorModesConfig,\n base: LayerResolvers = LAYER_RESOLVERS,\n): Record<string, string> {\n const recording = createRecordingResolvers(base);\n recording.packageEntry(PERSONA_ENTRY);\n assembleExtensions({\n agents: true,\n autoStop: true,\n mute: false,\n // The one preset that contributes an extension of its own.\n preset: OLLAMA_PRESET,\n layers: Object.keys(majorModesConfig.layers),\n majorModesConfig,\n resolvers: recording,\n });\n assembleChildExtensions({\n agents: false,\n autoStop: false,\n mute: true,\n preset: OLLAMA_PRESET,\n layers: Object.keys(majorModesConfig.layers),\n majorModesConfig,\n resolvers: recording,\n });\n return recording.resolved;\n}\n\n/** Resolvers backed by a synced map, for composing inside a Pi session. */\nexport function createMapResolvers(\n resolved: Record<string, string>,\n compiled: Record<string, string> = {},\n): ExtensionLayerResolvers {\n // The compiled bundle when this entry has one, the source otherwise.\n const entryFor = (key: string): string | undefined => compiled[key] ?? resolved[key];\n const lookup = (key: string, name: string): string => {\n const entry = entryFor(key);\n if (!entry) throw new Error(`${name} is missing from the doompi sync state. Run doompi sync.`);\n return entry;\n };\n const indexedEntries = (keyFor: (index: number) => string): string[] | undefined => {\n const first = entryFor(keyFor(0));\n if (!first) return undefined;\n const entries = [first];\n for (let index = 1; ; index += 1) {\n const entry = entryFor(keyFor(index));\n if (!entry) break;\n entries.push(entry);\n }\n return entries;\n };\n return {\n ownEntry: (name) => lookup(ownKey(name), name),\n packageEntry: (name) => lookup(packageKey(name), name),\n optionalPackageEntry: (name) => entryFor(packageKey(name)),\n packageEntries: (name) => {\n const entries = indexedEntries((index) => packageEntryKey(name, index));\n if (!entries) throw new Error(`${name} is missing from the doompi sync state. Run doompi sync.`);\n return entries;\n },\n optionalPackageEntries: (name) => indexedEntries((index) => packageEntryKey(name, index)),\n localEntry: (specifier, baseDirectory) => entryFor(localKey(specifier, baseDirectory)),\n localEntries: (specifier, baseDirectory) =>\n indexedEntries((index) => localEntryKey(specifier, baseDirectory, index)),\n localPackageName: (specifier, baseDirectory) => resolved[localPackageNameKey(specifier, baseDirectory)],\n };\n}\n\n/** Reads the resolved MCP servers back out of a generated config. */\nexport function readMcpServerNames(configPath: string): string[] {\n if (!fs.existsSync(configPath)) return [];\n const config = JSON.parse(fs.readFileSync(configPath, 'utf8')) as JsonObject;\n return isRecord(config.mcpServers) ? Object.keys(config.mcpServers) : [];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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a,YAAY,MAAM,CAAC;CAC7D,QAAA,GAAOE,oCAAAA,SAAAA,CAAS,OAAO,UAAU,IAAI,OAAO,KAAK,OAAO,UAAU,IAAI,CAAC;AACzE"}
@@ -0,0 +1,188 @@
1
+ import { ExtensionLayerResolvers } from "../../builders/cli/extensionAssembler/index.cjs";
2
+ import { LayerResolvers, MajorModesConfig } from "@agimon-ai/doompi-config/majorModes";
3
+ import { HarnessState } from "@agimon-ai/doompi-config/types";
4
+ import { DoomMcpProjection } from "@agimon-ai/doompi-core/mcp-projection";
5
+ import { SyncIdentity, SyncLocation } from "@agimon-ai/doompi-core/sync-location";
6
+ import { SYNC_STATE_VERSION } from "@agimon-ai/doompi-core/sync-state-contract";
7
+ //#region src/composition/syncState/index.d.ts
8
+ export interface SyncSelection {
9
+ majorMode: string;
10
+ domains: string[];
11
+ profile?: string;
12
+ preset: string;
13
+ }
14
+ /** Paths to the resources sync staged, before any live switch replaces them. */
15
+ export interface SyncBaseline {
16
+ mcpConfigPath?: string;
17
+ personaFile?: string;
18
+ themePath: string;
19
+ themeName: string;
20
+ }
21
+ export interface SyncPrecompileState {
22
+ /** Version of the lightweight freshness contract used by package startup. */
23
+ version: number;
24
+ strategy: 'bundle';
25
+ /** Package entry the generated bootstrap bundles. */
26
+ bootstrapEntry: string;
27
+ /** Compiler manifest whose output is the graph-bundled package bootstrap. */
28
+ bootstrapManifest: string;
29
+ /** Compiler manifest for each graph-bundled composition. */
30
+ bundleManifests: Record<string, string>;
31
+ }
32
+ export interface SyncServerBundleState {
33
+ descriptorPath: string;
34
+ fingerprint: string;
35
+ compilerManifests: Record<string, string>;
36
+ sourcesHash: string;
37
+ }
38
+ export interface SyncState {
39
+ version: number;
40
+ root: string;
41
+ /** Canonical repository and worktree namespace that owns this state. */
42
+ identity: SyncIdentity;
43
+ /** Hash of the config that produced this state, for the staleness warning. */
44
+ inputsHash: string;
45
+ /**
46
+ * Hash of the cockpit sources and package versions this state was built from.
47
+ *
48
+ * Absent in a state written before cockpit sources were tracked, which reads
49
+ * as "cannot be compared" rather than as a change, so an old state does not
50
+ * force a resync on sight.
51
+ */
52
+ webSourcesHash?: string;
53
+ /** Canonical composition selected when this state was recorded. */
54
+ compositionFingerprint: string;
55
+ selection: SyncSelection;
56
+ /** Harness environment the extension applies when the values are unset. */
57
+ env: Record<string, string>;
58
+ /**
59
+ * State the environment does not carry, so it has to be recorded on its own.
60
+ *
61
+ * Plugin hooks, the profile's environment defaults, and the neutral MCP
62
+ * projection live in the session state file rather than in variables.
63
+ */
64
+ fileState: Pick<HarnessState, 'profileEnvironment' | 'pluginHooks'> & {
65
+ mcpProjection: DoomMcpProjection;
66
+ };
67
+ /** Entry name to absolute path, covering every layer, not just the selected mode's. */
68
+ resolved: Record<string, string>;
69
+ /**
70
+ * The same entries after TypeScript ones were bundled to plain ESM.
71
+ *
72
+ * Kept apart from `resolved` so the staleness check still compares resolution
73
+ * against resolution; a state written before this existed simply has none and
74
+ * falls back to loading the source.
75
+ */
76
+ compiled?: Record<string, string>;
77
+ /** Aggregate entry by canonical composition fingerprint. */
78
+ bundles?: Record<string, string>;
79
+ /** Graph-compiled synced bootstrap dynamically loaded by the package entry. */
80
+ bootstrap?: string;
81
+ /** Inputs used to validate generated artifacts without loading the compiler. */
82
+ precompile?: SyncPrecompileState;
83
+ /** Absent only in generations produced before the server descriptor cutover. */
84
+ serverBundle?: SyncServerBundleState;
85
+ baseline: SyncBaseline;
86
+ }
87
+ export declare function syncDirectory(repoRoot: string, homeDirectory?: string): string;
88
+ export declare function syncStatePath(repoRoot: string, homeDirectory?: string): string;
89
+ export declare function legacySyncDirectory(repoRoot: string): string;
90
+ export declare function legacySyncStatePath(repoRoot: string): string;
91
+ /** Whether generated state belongs to the repository that is reading it. */
92
+ export declare function syncStateRootMatches(repoRoot: string, stateRoot: string): boolean;
93
+ /**
94
+ * Per-process scratch directory for live `/domains` and `/profile` switches.
95
+ *
96
+ * Switching rewrites the MCP config and the persona prompt. Writing those back
97
+ * into the synced directory would both mutate the pinned baseline and let two
98
+ * Pi sessions in one repository overwrite each other, which the launcher avoids
99
+ * by giving every run its own temporary directory.
100
+ */
101
+ export declare function runDirectory(repoRoot: string, processId?: number, homeDirectory?: string): string;
102
+ /**
103
+ * How a Pi project settings file should refer to a generated path.
104
+ *
105
+ * Relative to `.pi` when the target lives in the repository, which keeps the
106
+ * committed settings file identical on every machine. A doom-pi installed
107
+ * outside the repository stays absolute: Pi accepts both, and a relative path
108
+ * climbing out of the project would be neither portable nor readable.
109
+ */
110
+ export declare function settingsRelativePath(repoRoot: string, target: string): string;
111
+ /**
112
+ * Hashes the cockpit sources and package versions a sync compiled.
113
+ *
114
+ * The cockpit bundle is built from each installed package's `web/` folder by
115
+ * `syncWebBundle`, straight from source, with no compiler manifest recording
116
+ * what went in. Nothing else in the drift check reads those files, so editing a
117
+ * plugin surface and rebuilding left the hub serving the previously bundled
118
+ * cockpit with nothing reporting a reason. Compiled entries are covered
119
+ * elsewhere, by the content digests in their compiler manifests, so only the
120
+ * entry identity and its package version are folded in here.
121
+ *
122
+ * Bounded on purpose: the web sources of a full composition are a few hundred
123
+ * small files, which is cheap enough for the hub to poll.
124
+ */
125
+ export declare function computeWebSourcesHash(resolved: Record<string, string>): string;
126
+ /** Include declaration changes even for packages that did not previously expose a server facet. */
127
+ export declare function computeServerSourcesHash(resolved: Record<string, string>): string;
128
+ /**
129
+ * Hashes the configuration a sync consumed.
130
+ *
131
+ * Deliberately cheap: the extension recomputes this on every session start, so
132
+ * it reads config, marketplace, local plugin manifests, and profile persona text
133
+ * without downloading plugins or re-resolving packages. A dependency upgrade that
134
+ * moves a package path therefore does not show up here; `doom-pi sync --check`
135
+ * re-resolves and is the check that catches that.
136
+ */
137
+ export declare function computeInputsHash(repoRoot: string, selection: SyncSelection, homeDirectory?: string): string;
138
+ export interface LocatedSyncState {
139
+ state: SyncState;
140
+ location: SyncLocation;
141
+ layout: 'global';
142
+ }
143
+ /** Reads only state reached through this repository/worktree's validated registration. */
144
+ export declare function readLocatedSyncState(repoRoot: string, homeDirectory?: string): LocatedSyncState | undefined;
145
+ /** Reads the synced state, or undefined when the repository was never synced. */
146
+ export declare function readSyncState(repoRoot: string, homeDirectory?: string): SyncState | undefined;
147
+ export declare function serializeSyncState(state: SyncState): string;
148
+ export declare function writeSyncState(repoRoot: string, state: SyncState, homeDirectory?: string, targetPath?: string): Promise<string>;
149
+ export declare function ownKey(name: string): string;
150
+ export declare function packageKey(specifier: string): string;
151
+ export declare function packageEntryKey(specifier: string, index: number): string;
152
+ /**
153
+ * Keyed by the absolute target, because the same relative specifier means
154
+ * different files under the repository and the global config directory.
155
+ */
156
+ export declare function localKey(specifier: string, baseDirectory: string): string;
157
+ export declare function localEntryKey(specifier: string, baseDirectory: string, index: number): string;
158
+ export declare function localPackageNameKey(specifier: string, baseDirectory: string): string;
159
+ export interface RecordingResolvers extends ExtensionLayerResolvers {
160
+ /** Every name this resolver was asked for, keyed for the state file. */
161
+ readonly resolved: Record<string, string>;
162
+ packageEntries(name: string): string[];
163
+ optionalPackageEntries(name: string): string[] | undefined;
164
+ localEntries(specifier: string, baseDirectory: string): string[] | undefined;
165
+ }
166
+ /**
167
+ * Resolvers that record what they resolve.
168
+ *
169
+ * Sync composes once with every layer selected and hands the recording to the
170
+ * state file, so the extension never has to resolve a specifier itself.
171
+ */
172
+ export declare function createRecordingResolvers(base?: LayerResolvers): RecordingResolvers;
173
+ /**
174
+ * Resolves every entry any layer could contribute, in one pass.
175
+ *
176
+ * Composing with every layer selected and the widest options is what makes the
177
+ * map complete: a later `/mode` switch inside a Pi session can then pick a
178
+ * different set without resolving anything itself. The persona entry is asked
179
+ * for separately because it remains a fixed host entry rather than a layer.
180
+ */
181
+ export declare function recordResolvedEntries(majorModesConfig: MajorModesConfig, base?: LayerResolvers): Record<string, string>;
182
+ /** Resolvers backed by a synced map, for composing inside a Pi session. */
183
+ export declare function createMapResolvers(resolved: Record<string, string>, compiled?: Record<string, string>): ExtensionLayerResolvers;
184
+ /** Reads the resolved MCP servers back out of a generated config. */
185
+ export declare function readMcpServerNames(configPath: string): string[];
186
+ //#endregion
187
+ export { SYNC_STATE_VERSION };
188
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/composition/syncState/index.ts"],"mappings":";;;;;;;iBA+DiB;EACf;EACA;EACA;EACA;;;iBAIe;EACf;EACA;EACA;EACA;;iBAGe;;EAEf;EACA;;EAEA;;EAEA;;EAEA,iBAAiB;;iBAGF;EACf;EACA;EACA,mBAAmB;EACnB;;iBAGe;EACf;EACA;;EAEA,UAAU;;EAEV;;;;;;;;EAQA;;EAEA;EACA,WAAW;;EAEX,KAAK;;;;;;;EAOL,WAAW,KAAK;IACd,eAAe;;;EAGjB,UAAU;;;;;;;;EAQV,WAAW;;EAEX,UAAU;;EAEV;;EAEA,aAAa;;EAEb,eAAe;EACf,UAAU;;wBAGI,cAAc,kBAAkB;wBAIhC,cAAc,kBAAkB;wBAMhC,oBAAoB;wBAIpB,oBAAoB;;wBAqBpB,qBAAqB,kBAAkB;;;;;;;;;wBAYvC,aACd,kBACA,oBACA;;;;;;;;;wBAac,qBAAqB,kBAAkB;;;;;;;;;;;;;;;wBAuEvC,sBAAsB,UAAU;;wBA0BhC,yBAAyB,UAAU;;;;;;;;;;wBA8BnC,kBACd,kBACA,WAAW,eACX;iBAmPe;EACf,OAAO;EACP,UAAU;EACV;;;wBAIc,qBACd,kBACA,yBACC;;wBAgBa,cAAc,kBAAkB,yBAAuC;wBAIvE,mBAAmB,OAAO;wBAIpB,eACpB,kBACA,OAAO,WACP,wBACA,sBACC;wBAwCa,OAAO;wBAIP,WAAW;wBAIX,gBAAgB,mBAAmB;;;;;wBAQnC,SAAS,mBAAmB;wBAI5B,cAAc,mBAAmB,uBAAuB;wBAMxD,oBAAoB,mBAAmB;iBAItC,2BAA2B;;WAEjC,UAAU;EACnB,eAAe;EACf,uBAAuB;EACvB,aAAa,mBAAmB;;;;;;;;wBASlB,yBAAyB,OAAM,iBAAmC;;;;;;;;;wBAqElE,sBACd,kBAAkB,kBAClB,OAAM,iBACL;;wBA0Ba,mBACd,UAAU,wBACV,WAAU,yBACT;;wBAqCa,mBAAmB"}
@@ -0,0 +1,188 @@
1
+ import { ExtensionLayerResolvers } from "../../builders/cli/extensionAssembler/index.mjs";
2
+ import { LayerResolvers, MajorModesConfig } from "@agimon-ai/doompi-config/majorModes";
3
+ import { DoomMcpProjection } from "@agimon-ai/doompi-core/mcp-projection";
4
+ import { SyncIdentity, SyncLocation } from "@agimon-ai/doompi-core/sync-location";
5
+ import { SYNC_STATE_VERSION as SYNC_STATE_VERSION$1 } from "@agimon-ai/doompi-core/sync-state-contract";
6
+ import { HarnessState } from "@agimon-ai/doompi-config/types";
7
+ //#region src/composition/syncState/index.d.ts
8
+ export interface SyncSelection {
9
+ majorMode: string;
10
+ domains: string[];
11
+ profile?: string;
12
+ preset: string;
13
+ }
14
+ /** Paths to the resources sync staged, before any live switch replaces them. */
15
+ export interface SyncBaseline {
16
+ mcpConfigPath?: string;
17
+ personaFile?: string;
18
+ themePath: string;
19
+ themeName: string;
20
+ }
21
+ export interface SyncPrecompileState {
22
+ /** Version of the lightweight freshness contract used by package startup. */
23
+ version: number;
24
+ strategy: 'bundle';
25
+ /** Package entry the generated bootstrap bundles. */
26
+ bootstrapEntry: string;
27
+ /** Compiler manifest whose output is the graph-bundled package bootstrap. */
28
+ bootstrapManifest: string;
29
+ /** Compiler manifest for each graph-bundled composition. */
30
+ bundleManifests: Record<string, string>;
31
+ }
32
+ export interface SyncServerBundleState {
33
+ descriptorPath: string;
34
+ fingerprint: string;
35
+ compilerManifests: Record<string, string>;
36
+ sourcesHash: string;
37
+ }
38
+ export interface SyncState {
39
+ version: number;
40
+ root: string;
41
+ /** Canonical repository and worktree namespace that owns this state. */
42
+ identity: SyncIdentity;
43
+ /** Hash of the config that produced this state, for the staleness warning. */
44
+ inputsHash: string;
45
+ /**
46
+ * Hash of the cockpit sources and package versions this state was built from.
47
+ *
48
+ * Absent in a state written before cockpit sources were tracked, which reads
49
+ * as "cannot be compared" rather than as a change, so an old state does not
50
+ * force a resync on sight.
51
+ */
52
+ webSourcesHash?: string;
53
+ /** Canonical composition selected when this state was recorded. */
54
+ compositionFingerprint: string;
55
+ selection: SyncSelection;
56
+ /** Harness environment the extension applies when the values are unset. */
57
+ env: Record<string, string>;
58
+ /**
59
+ * State the environment does not carry, so it has to be recorded on its own.
60
+ *
61
+ * Plugin hooks, the profile's environment defaults, and the neutral MCP
62
+ * projection live in the session state file rather than in variables.
63
+ */
64
+ fileState: Pick<HarnessState, 'profileEnvironment' | 'pluginHooks'> & {
65
+ mcpProjection: DoomMcpProjection;
66
+ };
67
+ /** Entry name to absolute path, covering every layer, not just the selected mode's. */
68
+ resolved: Record<string, string>;
69
+ /**
70
+ * The same entries after TypeScript ones were bundled to plain ESM.
71
+ *
72
+ * Kept apart from `resolved` so the staleness check still compares resolution
73
+ * against resolution; a state written before this existed simply has none and
74
+ * falls back to loading the source.
75
+ */
76
+ compiled?: Record<string, string>;
77
+ /** Aggregate entry by canonical composition fingerprint. */
78
+ bundles?: Record<string, string>;
79
+ /** Graph-compiled synced bootstrap dynamically loaded by the package entry. */
80
+ bootstrap?: string;
81
+ /** Inputs used to validate generated artifacts without loading the compiler. */
82
+ precompile?: SyncPrecompileState;
83
+ /** Absent only in generations produced before the server descriptor cutover. */
84
+ serverBundle?: SyncServerBundleState;
85
+ baseline: SyncBaseline;
86
+ }
87
+ export declare function syncDirectory(repoRoot: string, homeDirectory?: string): string;
88
+ export declare function syncStatePath(repoRoot: string, homeDirectory?: string): string;
89
+ export declare function legacySyncDirectory(repoRoot: string): string;
90
+ export declare function legacySyncStatePath(repoRoot: string): string;
91
+ /** Whether generated state belongs to the repository that is reading it. */
92
+ export declare function syncStateRootMatches(repoRoot: string, stateRoot: string): boolean;
93
+ /**
94
+ * Per-process scratch directory for live `/domains` and `/profile` switches.
95
+ *
96
+ * Switching rewrites the MCP config and the persona prompt. Writing those back
97
+ * into the synced directory would both mutate the pinned baseline and let two
98
+ * Pi sessions in one repository overwrite each other, which the launcher avoids
99
+ * by giving every run its own temporary directory.
100
+ */
101
+ export declare function runDirectory(repoRoot: string, processId?: number, homeDirectory?: string): string;
102
+ /**
103
+ * How a Pi project settings file should refer to a generated path.
104
+ *
105
+ * Relative to `.pi` when the target lives in the repository, which keeps the
106
+ * committed settings file identical on every machine. A doom-pi installed
107
+ * outside the repository stays absolute: Pi accepts both, and a relative path
108
+ * climbing out of the project would be neither portable nor readable.
109
+ */
110
+ export declare function settingsRelativePath(repoRoot: string, target: string): string;
111
+ /**
112
+ * Hashes the cockpit sources and package versions a sync compiled.
113
+ *
114
+ * The cockpit bundle is built from each installed package's `web/` folder by
115
+ * `syncWebBundle`, straight from source, with no compiler manifest recording
116
+ * what went in. Nothing else in the drift check reads those files, so editing a
117
+ * plugin surface and rebuilding left the hub serving the previously bundled
118
+ * cockpit with nothing reporting a reason. Compiled entries are covered
119
+ * elsewhere, by the content digests in their compiler manifests, so only the
120
+ * entry identity and its package version are folded in here.
121
+ *
122
+ * Bounded on purpose: the web sources of a full composition are a few hundred
123
+ * small files, which is cheap enough for the hub to poll.
124
+ */
125
+ export declare function computeWebSourcesHash(resolved: Record<string, string>): string;
126
+ /** Include declaration changes even for packages that did not previously expose a server facet. */
127
+ export declare function computeServerSourcesHash(resolved: Record<string, string>): string;
128
+ /**
129
+ * Hashes the configuration a sync consumed.
130
+ *
131
+ * Deliberately cheap: the extension recomputes this on every session start, so
132
+ * it reads config, marketplace, local plugin manifests, and profile persona text
133
+ * without downloading plugins or re-resolving packages. A dependency upgrade that
134
+ * moves a package path therefore does not show up here; `doom-pi sync --check`
135
+ * re-resolves and is the check that catches that.
136
+ */
137
+ export declare function computeInputsHash(repoRoot: string, selection: SyncSelection, homeDirectory?: string): string;
138
+ export interface LocatedSyncState {
139
+ state: SyncState;
140
+ location: SyncLocation;
141
+ layout: 'global';
142
+ }
143
+ /** Reads only state reached through this repository/worktree's validated registration. */
144
+ export declare function readLocatedSyncState(repoRoot: string, homeDirectory?: string): LocatedSyncState | undefined;
145
+ /** Reads the synced state, or undefined when the repository was never synced. */
146
+ export declare function readSyncState(repoRoot: string, homeDirectory?: string): SyncState | undefined;
147
+ export declare function serializeSyncState(state: SyncState): string;
148
+ export declare function writeSyncState(repoRoot: string, state: SyncState, homeDirectory?: string, targetPath?: string): Promise<string>;
149
+ export declare function ownKey(name: string): string;
150
+ export declare function packageKey(specifier: string): string;
151
+ export declare function packageEntryKey(specifier: string, index: number): string;
152
+ /**
153
+ * Keyed by the absolute target, because the same relative specifier means
154
+ * different files under the repository and the global config directory.
155
+ */
156
+ export declare function localKey(specifier: string, baseDirectory: string): string;
157
+ export declare function localEntryKey(specifier: string, baseDirectory: string, index: number): string;
158
+ export declare function localPackageNameKey(specifier: string, baseDirectory: string): string;
159
+ export interface RecordingResolvers extends ExtensionLayerResolvers {
160
+ /** Every name this resolver was asked for, keyed for the state file. */
161
+ readonly resolved: Record<string, string>;
162
+ packageEntries(name: string): string[];
163
+ optionalPackageEntries(name: string): string[] | undefined;
164
+ localEntries(specifier: string, baseDirectory: string): string[] | undefined;
165
+ }
166
+ /**
167
+ * Resolvers that record what they resolve.
168
+ *
169
+ * Sync composes once with every layer selected and hands the recording to the
170
+ * state file, so the extension never has to resolve a specifier itself.
171
+ */
172
+ export declare function createRecordingResolvers(base?: LayerResolvers): RecordingResolvers;
173
+ /**
174
+ * Resolves every entry any layer could contribute, in one pass.
175
+ *
176
+ * Composing with every layer selected and the widest options is what makes the
177
+ * map complete: a later `/mode` switch inside a Pi session can then pick a
178
+ * different set without resolving anything itself. The persona entry is asked
179
+ * for separately because it remains a fixed host entry rather than a layer.
180
+ */
181
+ export declare function recordResolvedEntries(majorModesConfig: MajorModesConfig, base?: LayerResolvers): Record<string, string>;
182
+ /** Resolvers backed by a synced map, for composing inside a Pi session. */
183
+ export declare function createMapResolvers(resolved: Record<string, string>, compiled?: Record<string, string>): ExtensionLayerResolvers;
184
+ /** Reads the resolved MCP servers back out of a generated config. */
185
+ export declare function readMcpServerNames(configPath: string): string[];
186
+ //#endregion
187
+ export { SYNC_STATE_VERSION$1 as SYNC_STATE_VERSION };
188
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/composition/syncState/index.ts"],"mappings":";;;;;;;iBA+DiB;EACf;EACA;EACA;EACA;;;iBAIe;EACf;EACA;EACA;EACA;;iBAGe;;EAEf;EACA;;EAEA;;EAEA;;EAEA,iBAAiB;;iBAGF;EACf;EACA;EACA,mBAAmB;EACnB;;iBAGe;EACf;EACA;;EAEA,UAAU;;EAEV;;;;;;;;EAQA;;EAEA;EACA,WAAW;;EAEX,KAAK;;;;;;;EAOL,WAAW,KAAK;IACd,eAAe;;;EAGjB,UAAU;;;;;;;;EAQV,WAAW;;EAEX,UAAU;;EAEV;;EAEA,aAAa;;EAEb,eAAe;EACf,UAAU;;wBAGI,cAAc,kBAAkB;wBAIhC,cAAc,kBAAkB;wBAMhC,oBAAoB;wBAIpB,oBAAoB;;wBAqBpB,qBAAqB,kBAAkB;;;;;;;;;wBAYvC,aACd,kBACA,oBACA;;;;;;;;;wBAac,qBAAqB,kBAAkB;;;;;;;;;;;;;;;wBAuEvC,sBAAsB,UAAU;;wBA0BhC,yBAAyB,UAAU;;;;;;;;;;wBA8BnC,kBACd,kBACA,WAAW,eACX;iBAmPe;EACf,OAAO;EACP,UAAU;EACV;;;wBAIc,qBACd,kBACA,yBACC;;wBAgBa,cAAc,kBAAkB,yBAAuC;wBAIvE,mBAAmB,OAAO;wBAIpB,eACpB,kBACA,OAAO,WACP,wBACA,sBACC;wBAwCa,OAAO;wBAIP,WAAW;wBAIX,gBAAgB,mBAAmB;;;;;wBAQnC,SAAS,mBAAmB;wBAI5B,cAAc,mBAAmB,uBAAuB;wBAMxD,oBAAoB,mBAAmB;iBAItC,2BAA2B;;WAEjC,UAAU;EACnB,eAAe;EACf,uBAAuB;EACvB,aAAa,mBAAmB;;;;;;;;wBASlB,yBAAyB,OAAM,iBAAmC;;;;;;;;;wBAqElE,sBACd,kBAAkB,kBAClB,OAAM,iBACL;;wBA0Ba,mBACd,UAAU,wBACV,WAAU,yBACT;;wBAqCa,mBAAmB"}