@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,996 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_cache = require("./cache.cjs");
3
+ const require_inputs = require("./inputs.cjs");
4
+ let node_fs = require("node:fs");
5
+ node_fs = require_runtime.__toESM(node_fs, 1);
6
+ let node_module = require("node:module");
7
+ let node_path = require("node:path");
8
+ node_path = require_runtime.__toESM(node_path, 1);
9
+ let node_url = require("node:url");
10
+ let _agimon_ai_doompi_core_module_resolution = require("@agimon-ai/doompi-core/module-resolution");
11
+ let node_crypto = require("node:crypto");
12
+ //#region src/compiler/index.ts
13
+ /**
14
+ * Compiles TypeScript extensions into plain ESM ahead of the session.
15
+ *
16
+ * Pi loads extensions through jiti, which transpiles TypeScript at import time.
17
+ * That works, but it costs a transform per module on a cold cache and makes Node
18
+ * complain about type stripping under node_modules on every launch. Resolution
19
+ * already knows the full extension list, so each TypeScript graph is compiled
20
+ * to native ESM here and Pi imports it without a runtime transform. Lazy imports
21
+ * remain separate content-addressed chunks so their evaluation semantics survive
22
+ * compilation.
23
+ *
24
+ * Direct module artifacts bundle ordinary JavaScript dependencies. Node built-ins and Pi's
25
+ * shared runtime stay external; native or resource-bearing dependencies fail explicitly
26
+ * unless their package-owned resources are pinned into the artifact.
27
+ * Those imports are rewritten to absolute paths so a worktree-local artifact never relies
28
+ * on its generated directory having its own `node_modules` tree. Immutable build objects
29
+ * may be shared by linked worktrees, but materialized output stays worktree-local.
30
+ */
31
+ const TYPESCRIPT_SUFFIXES = [
32
+ ".ts",
33
+ ".mts",
34
+ ".cts"
35
+ ];
36
+ const COMPILED_SUFFIX = ".mjs";
37
+ const SET_CACHE_VERSION = "v15";
38
+ const HASH_LENGTH = 16;
39
+ const SET_DIRECTORY = "sets";
40
+ const MANIFEST_SUFFIX = ".json";
41
+ const VIRTUAL_SET_ENTRY = "\0doompi-extension-set";
42
+ const EXTENSION_SOURCE_HELPER = "@agimon-ai/doompi-ui/extensionName";
43
+ const SHARED_BUILD_VERSION = "v3-rolldown-1.2.5";
44
+ const SHARED_PATH_TOKEN_PREFIX = "__DOOMPI_PATH_";
45
+ const REPOSITORY_INPUT_PREFIX = "repo/";
46
+ const EXTERNAL_INPUT_PREFIX = "external/";
47
+ const DEFAULT_SET_OUTPUT_NAME = "doom-set";
48
+ /** Serializes data embedded in generated JavaScript without leaving HTML or line-separator code boundaries. */
49
+ function javascriptStringLiteral(value) {
50
+ return JSON.stringify(value).replaceAll("<", "\\u003c").replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029");
51
+ }
52
+ /** Pi's former npm scope. The packages are the same, published under a new name. */
53
+ const PI_SCOPE_RENAMES = {
54
+ "@mariozechner/pi-coding-agent": "@earendil-works/pi-coding-agent",
55
+ "@mariozechner/pi-tui": "@earendil-works/pi-tui",
56
+ "@mariozechner/pi-ai": "@earendil-works/pi-ai",
57
+ "@sinclair/typebox": "typebox"
58
+ };
59
+ function isTypeScriptEntry(entry) {
60
+ return TYPESCRIPT_SUFFIXES.some((suffix) => entry.endsWith(suffix));
61
+ }
62
+ function renameScope(specifier) {
63
+ for (const [before, after] of Object.entries(PI_SCOPE_RENAMES)) {
64
+ if (specifier === before) return after;
65
+ if (specifier.startsWith(`${before}/`)) return `${after}${specifier.slice(before.length)}`;
66
+ }
67
+ return specifier;
68
+ }
69
+ /**
70
+ * Packages that must resolve to the copy this harness runs, never to a second
71
+ * one bundled into an extension. Pi owns the TUI and the session state, so a
72
+ * duplicate renders into a different screen and mutates a different store.
73
+ */
74
+ const HOSTED_PACKAGES = /* @__PURE__ */ new Set([
75
+ "@earendil-works/pi-coding-agent",
76
+ "@earendil-works/pi-tui",
77
+ "@earendil-works/pi-ai"
78
+ ]);
79
+ /**
80
+ * Resolves packages Pi exposes to extensions as compatibility aliases.
81
+ *
82
+ * Extensions do not need to declare TypeBox themselves because Pi's loader
83
+ * provides it as a virtual module. A dist bundle bypasses that loader, so it
84
+ * resolves the same package against Pi's dependency tree and bundles it.
85
+ */
86
+ function piExtensionDependencyEntry(specifier) {
87
+ const piEntry = (0, _agimon_ai_doompi_core_module_resolution.optionalPackageEntry)("@earendil-works/pi-coding-agent", require("url").pathToFileURL(__filename).href);
88
+ if (!piEntry) return void 0;
89
+ try {
90
+ return (0, node_module.createRequire)(piEntry).resolve(specifier);
91
+ } catch {
92
+ return;
93
+ }
94
+ }
95
+ /** Packages whose native binaries or runtime discovery cannot be rolled up. */
96
+ const NATIVE_PACKAGES = /* @__PURE__ */ new Set([
97
+ "@parcel/watcher",
98
+ "@napi-rs/keyring",
99
+ "better-sqlite3",
100
+ "canvas",
101
+ "fsevents",
102
+ "isolated-vm",
103
+ "keytar",
104
+ "node-pty",
105
+ "onnxruntime-node",
106
+ "playwright",
107
+ "playwright-core",
108
+ "puppeteer",
109
+ "sharp",
110
+ "typescript"
111
+ ]);
112
+ const TURSO_DATABASE_PACKAGE = "@tursodatabase/database";
113
+ const TURSO_DATABASE_COMMON_PACKAGE = "@tursodatabase/database-common";
114
+ /**
115
+ * Dependency-heavy ESM runtimes that Pi set artifacts should retain in their installed graph.
116
+ *
117
+ * Folding these packages into the aggregate creates dozens of generated chunks
118
+ * that Node must parse and link before any extension factory can register. Node
119
+ * can load the installed graph directly while still sharing its module cache.
120
+ */
121
+ const STARTUP_EXTERNAL_PACKAGES = /* @__PURE__ */ new Set([
122
+ "@agimon-ai/foundation-port-registry",
123
+ "@agimon-ai/foundation-process-registry",
124
+ "@agimon-ai/log-sink-mcp",
125
+ "@modelcontextprotocol/sdk",
126
+ "@narumitw/pi-tui-kit",
127
+ "@rmux/sdk",
128
+ "@tursodatabase/database",
129
+ "@tursodatabase/database-common",
130
+ "ajv",
131
+ "ajv-formats",
132
+ "gpt-tokenizer",
133
+ "highlight.js",
134
+ "hono",
135
+ "inversify",
136
+ "open",
137
+ "reflect-metadata",
138
+ "zod-to-json-schema",
139
+ "yaml",
140
+ "zod"
141
+ ]);
142
+ const NODE_BUILTINS = new Set(node_module.builtinModules.flatMap((name) => [name, `node:${name}`]));
143
+ /**
144
+ * Direct modules may bundle ordinary JavaScript, but these packages carry runtime
145
+ * files or native bindings that require explicitly pinned resources.
146
+ */
147
+ const DIRECT_RESOURCE_PACKAGES = /* @__PURE__ */ new Set([
148
+ "@agimon-ai/doompi-runner-rmux-darwin-arm64",
149
+ "@agimon-ai/doompi-runner-rmux-darwin-x64",
150
+ "@agimon-ai/doompi-runner-rmux-linux-arm64",
151
+ "@agimon-ai/doompi-runner-rmux-linux-x64",
152
+ "@tursodatabase/database",
153
+ "@tursodatabase/database-common",
154
+ "onnxruntime-web",
155
+ "ruvector-onnx-embeddings-wasm",
156
+ "sherpa-onnx-node",
157
+ "sqlite-vec",
158
+ "open"
159
+ ]);
160
+ /** Published runtimes that intentionally retain their native dependency graph outside direct artifacts. */
161
+ const DIRECT_EXTERNAL_PACKAGES = /* @__PURE__ */ new Set(["@agimon-ai/style-system"]);
162
+ /**
163
+ * @rmux/sdk only looks up the caller-provided `rmux` executable by name and has
164
+ * no package-owned executable or resource lookup. Its JavaScript graph is safe
165
+ * to bundle; the RMUX binary remains an intentional host capability.
166
+ */
167
+ function directModuleDependencyIsUnbundlable(root) {
168
+ return NATIVE_PACKAGES.has(root) || DIRECT_RESOURCE_PACKAGES.has(root) || root.startsWith("@tursodatabase/database-") || root.startsWith("sherpa-onnx-");
169
+ }
170
+ function directModuleDependencyError(root, importer) {
171
+ return /* @__PURE__ */ new Error(`Cannot compile direct extension module because dependency "${root}" has native bindings or package-owned resources that are not part of the compiled artifact${importer ? ` (imported by ${importer})` : ""}`);
172
+ }
173
+ function safeOutputName(value) {
174
+ return value.trim().replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^[-.]+|[-.]+$/g, "") || DEFAULT_SET_OUTPUT_NAME;
175
+ }
176
+ function packageRootOf(specifier) {
177
+ const slash = specifier.startsWith("@") ? specifier.indexOf("/", specifier.indexOf("/") + 1) : specifier.indexOf("/");
178
+ return slash === -1 ? specifier : specifier.slice(0, slash);
179
+ }
180
+ function packageRootFromPath(target) {
181
+ let directory = node_path.default.dirname(target);
182
+ while (true) {
183
+ const manifestPath = node_path.default.join(directory, "package.json");
184
+ if (node_fs.default.existsSync(manifestPath)) try {
185
+ const manifest = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
186
+ if (isRecord(manifest) && typeof manifest.name === "string") return manifest.name;
187
+ } catch {
188
+ return;
189
+ }
190
+ const parent = node_path.default.dirname(directory);
191
+ if (parent === directory) return void 0;
192
+ directory = parent;
193
+ }
194
+ }
195
+ function canonicalPath(target) {
196
+ const absolute = node_path.default.resolve(target);
197
+ try {
198
+ return node_fs.default.realpathSync.native(absolute);
199
+ } catch {
200
+ return absolute;
201
+ }
202
+ }
203
+ function isInside(directory, target) {
204
+ const relative = node_path.default.relative(node_path.default.resolve(directory), node_path.default.resolve(target));
205
+ return relative === "" || !relative.startsWith("..") && !node_path.default.isAbsolute(relative);
206
+ }
207
+ function packageManifestDirectory(target) {
208
+ let directory = node_path.default.dirname(canonicalPath(target));
209
+ while (true) {
210
+ const manifestPath = node_path.default.join(directory, "package.json");
211
+ try {
212
+ const manifest = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
213
+ if (isRecord(manifest) && typeof manifest.name === "string") return directory;
214
+ } catch {}
215
+ const parent = node_path.default.dirname(directory);
216
+ if (parent === directory) return void 0;
217
+ directory = parent;
218
+ }
219
+ }
220
+ function packageDependencyNames(manifest) {
221
+ return ["dependencies", "optionalDependencies"].flatMap((field) => {
222
+ const dependencies = manifest[field];
223
+ return isRecord(dependencies) ? Object.keys(dependencies) : [];
224
+ });
225
+ }
226
+ function resolvePackageDirectory(name, manifestPath) {
227
+ try {
228
+ return packageManifestDirectory((0, node_module.createRequire)(manifestPath).resolve(name));
229
+ } catch {
230
+ return;
231
+ }
232
+ }
233
+ function nativePackageDirectories(entries) {
234
+ const queue = entries.map(packageManifestDirectory).filter((value) => value !== void 0);
235
+ const visited = /* @__PURE__ */ new Set();
236
+ const found = [];
237
+ while (queue.length > 0) {
238
+ const directory = canonicalPath(queue.shift());
239
+ if (visited.has(directory)) continue;
240
+ visited.add(directory);
241
+ const manifestPath = node_path.default.join(directory, "package.json");
242
+ let manifest;
243
+ try {
244
+ const parsed = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
245
+ if (!isRecord(parsed)) continue;
246
+ manifest = parsed;
247
+ } catch {
248
+ continue;
249
+ }
250
+ if (manifest.name === "@agimon-ai/log-sink-mcp") found.push(directory);
251
+ if (manifest.name === TURSO_DATABASE_PACKAGE || manifest.name === "sqlite-vec" || manifest.name === "ruvector-onnx-embeddings-wasm" || manifest.name === "@napi-rs/keyring") {
252
+ found.push(directory);
253
+ continue;
254
+ }
255
+ for (const dependency of packageDependencyNames(manifest)) {
256
+ const resolved = resolvePackageDirectory(dependency, manifestPath);
257
+ if (resolved) queue.push(resolved);
258
+ }
259
+ }
260
+ return found;
261
+ }
262
+ function currentTursoPlatformPackage() {
263
+ let suffix = `${process.platform}-${process.arch}`;
264
+ if (process.platform === "linux") {
265
+ const report = process.report.getReport();
266
+ if (!isRecord(report) || !isRecord(report.header) || typeof report.header.glibcVersionRuntime !== "string") return;
267
+ suffix += "-gnu";
268
+ } else if (process.platform === "win32") suffix += "-msvc";
269
+ return `${TURSO_DATABASE_PACKAGE}-${suffix}`;
270
+ }
271
+ function tursoPlatformResource(packageDirectory) {
272
+ const packageName = currentTursoPlatformPackage();
273
+ if (!packageName) return void 0;
274
+ const manifest = JSON.parse(node_fs.default.readFileSync(node_path.default.join(packageDirectory, "package.json"), "utf8"));
275
+ if (!isRecord(manifest) || !isRecord(manifest.optionalDependencies) || typeof manifest.optionalDependencies[packageName] !== "string") return;
276
+ let entry;
277
+ try {
278
+ entry = (0, node_module.createRequire)(node_path.default.join(packageDirectory, "package.json")).resolve(packageName);
279
+ } catch {
280
+ return;
281
+ }
282
+ const nativeDirectory = packageManifestDirectory(entry);
283
+ if (!nativeDirectory) return void 0;
284
+ const relative = node_path.default.relative(nativeDirectory, canonicalPath(entry)).split(node_path.default.sep).join("/");
285
+ if (!relative || relative.startsWith("../") || node_path.default.isAbsolute(relative)) return void 0;
286
+ return {
287
+ packageName,
288
+ packageDirectory: nativeDirectory,
289
+ files: [{ path: "package.json" }, { path: relative }]
290
+ };
291
+ }
292
+ function currentSqliteVecPlatformPackage() {
293
+ if (process.platform === "linux" && currentTursoPlatformPackage() === void 0) return void 0;
294
+ const target = `${process.platform === "win32" ? "windows" : process.platform}-${process.arch}`;
295
+ if (![
296
+ "darwin-arm64",
297
+ "darwin-x64",
298
+ "linux-arm64",
299
+ "linux-x64",
300
+ "windows-x64"
301
+ ].includes(target)) return void 0;
302
+ return `sqlite-vec-${target}`;
303
+ }
304
+ function sqliteVecPlatformResource(packageDirectory) {
305
+ const packageName = currentSqliteVecPlatformPackage();
306
+ if (!packageName) return void 0;
307
+ const manifest = JSON.parse(node_fs.default.readFileSync(node_path.default.join(packageDirectory, "package.json"), "utf8"));
308
+ if (!isRecord(manifest) || !isRecord(manifest.optionalDependencies) || typeof manifest.optionalDependencies[packageName] !== "string") return void 0;
309
+ const suffix = process.platform === "win32" ? "dll" : process.platform === "darwin" ? "dylib" : "so";
310
+ let entry;
311
+ try {
312
+ entry = (0, node_module.createRequire)(node_path.default.join(packageDirectory, "package.json")).resolve(`${packageName}/vec0.${suffix}`);
313
+ } catch {
314
+ return;
315
+ }
316
+ const nativeDirectory = packageManifestDirectory(entry);
317
+ if (!nativeDirectory) return void 0;
318
+ const relative = node_path.default.relative(nativeDirectory, canonicalPath(entry)).split(node_path.default.sep).join("/");
319
+ if (!relative || relative.startsWith("../") || node_path.default.isAbsolute(relative)) return void 0;
320
+ return {
321
+ packageName,
322
+ packageDirectory: nativeDirectory,
323
+ files: [{ path: "package.json" }, { path: relative }]
324
+ };
325
+ }
326
+ function vectorWasmResource(packageDirectory) {
327
+ const manifest = JSON.parse(node_fs.default.readFileSync(node_path.default.join(packageDirectory, "package.json"), "utf8"));
328
+ if (!isRecord(manifest) || !Array.isArray(manifest.files) || !manifest.files.every((file) => typeof file === "string") || !manifest.files.includes("ruvector_onnx_embeddings_wasm.js") || !manifest.files.includes("ruvector_onnx_embeddings_wasm_bg.wasm") || !manifest.files.includes("loader.js")) throw new Error("Unsupported embedding WASM resource manifest");
329
+ return {
330
+ packageName: "ruvector-onnx-embeddings-wasm",
331
+ packageDirectory,
332
+ files: ["package.json", ...manifest.files].map((file) => ({ path: file }))
333
+ };
334
+ }
335
+ function keyringResources(packageDirectory) {
336
+ const suffix = currentTursoPlatformPackage()?.slice(23);
337
+ const packageName = suffix && `@napi-rs/keyring${suffix}`;
338
+ const manifestPath = node_path.default.join(packageDirectory, "package.json");
339
+ const manifest = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
340
+ if (!packageName || !isRecord(manifest) || !isRecord(manifest.optionalDependencies) || typeof manifest.optionalDependencies[packageName] !== "string") throw new Error("Unsupported or missing native keyring binding");
341
+ const nativeDirectory = resolvePackageDirectory(packageName, manifestPath);
342
+ if (!nativeDirectory) throw new Error("Unsupported or missing native keyring binding");
343
+ const entry = (0, node_module.createRequire)(manifestPath).resolve(packageName);
344
+ return [{
345
+ packageName: "@napi-rs/keyring",
346
+ packageDirectory,
347
+ files: [
348
+ "package.json",
349
+ "index.js",
350
+ "keytar.js"
351
+ ].map((file) => ({ path: file }))
352
+ }, {
353
+ packageName,
354
+ packageDirectory: nativeDirectory,
355
+ files: [{ path: "package.json" }, { path: node_path.default.relative(nativeDirectory, canonicalPath(entry)).split(node_path.default.sep).join("/") }]
356
+ }];
357
+ }
358
+ function resourcesWithPinnedNativePlatforms(entries, resources = []) {
359
+ const pinned = resources.map((resource) => ({
360
+ ...resource,
361
+ packages: [...resource.packages]
362
+ }));
363
+ const packagesByName = new Map(pinned.flatMap((resource) => resource.packages.map((pkg) => [pkg.packageName, pkg])));
364
+ for (const directory of nativePackageDirectories(entries)) {
365
+ const manifest = JSON.parse(node_fs.default.readFileSync(node_path.default.join(directory, "package.json"), "utf8"));
366
+ if (manifest.name === "@agimon-ai/log-sink-mcp") {
367
+ if (!pinned.some((resource) => canonicalPath(resource.ownerDirectory) === canonicalPath(directory))) pinned.push({
368
+ ownerPackageName: manifest.name,
369
+ ownerDirectory: directory,
370
+ packages: []
371
+ });
372
+ continue;
373
+ }
374
+ if (manifest.name === "@napi-rs/keyring") {
375
+ for (const pkg of keyringResources(directory)) {
376
+ const existing = packagesByName.get(pkg.packageName);
377
+ if (existing) {
378
+ if (canonicalPath(existing.packageDirectory) !== canonicalPath(pkg.packageDirectory)) throw new Error(`Conflicting native package roots for ${pkg.packageName}`);
379
+ continue;
380
+ }
381
+ packagesByName.set(pkg.packageName, pkg);
382
+ pinned.push({
383
+ ownerPackageName: pkg.packageName,
384
+ ownerDirectory: pkg.packageDirectory,
385
+ packages: [pkg]
386
+ });
387
+ }
388
+ continue;
389
+ }
390
+ const sqliteVec = manifest.name === "sqlite-vec";
391
+ const platform = manifest.name === "ruvector-onnx-embeddings-wasm" ? vectorWasmResource(directory) : sqliteVec ? sqliteVecPlatformResource(directory) : tursoPlatformResource(directory);
392
+ if (!platform) throw new Error(`Unsupported or missing native ${sqliteVec ? "sqlite-vec" : "Turso"} binding for ${process.platform}-${process.arch}`);
393
+ const existing = packagesByName.get(platform.packageName);
394
+ if (existing) {
395
+ if (canonicalPath(existing.packageDirectory) !== canonicalPath(platform.packageDirectory)) throw new Error(`Conflicting native package roots for ${platform.packageName}`);
396
+ continue;
397
+ }
398
+ packagesByName.set(platform.packageName, platform);
399
+ pinned.push({
400
+ ownerPackageName: platform.packageName,
401
+ ownerDirectory: platform.packageDirectory,
402
+ packages: [platform]
403
+ });
404
+ }
405
+ return pinned;
406
+ }
407
+ function tursoPlatformIsPinned(resources) {
408
+ const packageName = currentTursoPlatformPackage();
409
+ return packageName !== void 0 && resources.some((resource) => resource.packages.some((pkg) => pkg.packageName === packageName));
410
+ }
411
+ function directModuleDependencyIsPinned(root, resources) {
412
+ if (root === "ruvector-onnx-embeddings-wasm" || root === "@napi-rs/keyring") return resources.some((resource) => resource.packages.some((pkg) => pkg.packageName === root));
413
+ if (root === "sqlite-vec") {
414
+ const packageName = currentSqliteVecPlatformPackage();
415
+ return packageName !== void 0 && resources.some((resource) => resource.packages.some((pkg) => pkg.packageName === packageName));
416
+ }
417
+ return (root === TURSO_DATABASE_PACKAGE || root === TURSO_DATABASE_COMMON_PACKAGE) && tursoPlatformIsPinned(resources);
418
+ }
419
+ function externalLogicalPath(sourcePath) {
420
+ const identity = (0, node_crypto.createHash)("sha256").update(sourcePath).digest("hex");
421
+ return `${EXTERNAL_INPUT_PREFIX}${identity}`;
422
+ }
423
+ function logicalInput(target, repositoryRoot) {
424
+ const absolute = canonicalPath(target);
425
+ if (isInside(repositoryRoot, absolute)) return {
426
+ logicalPath: `${REPOSITORY_INPUT_PREFIX}${node_path.default.relative(repositoryRoot, absolute).split(node_path.default.sep).join("/")}`,
427
+ target: absolute
428
+ };
429
+ return {
430
+ logicalPath: externalLogicalPath(absolute),
431
+ target: absolute,
432
+ sourcePath: absolute
433
+ };
434
+ }
435
+ function resolveLogicalInputPath(input, repositoryRoot) {
436
+ if (input.logicalPath.startsWith(REPOSITORY_INPUT_PREFIX) && input.sourcePath === void 0) {
437
+ const target = node_path.default.resolve(repositoryRoot, input.logicalPath.slice(5));
438
+ return isInside(repositoryRoot, target) ? target : void 0;
439
+ }
440
+ if (input.logicalPath.startsWith(EXTERNAL_INPUT_PREFIX) && input.sourcePath !== void 0 && input.logicalPath === externalLogicalPath(input.sourcePath)) return input.sourcePath;
441
+ }
442
+ function artifactsAreFresh(manifest, version, output) {
443
+ return manifest.version === version && manifest.output === output && node_fs.default.existsSync(output) && manifest.artifacts.every((artifact) => node_fs.default.existsSync(artifact));
444
+ }
445
+ function manifestIsFresh(manifest, entries) {
446
+ if (!artifactsAreFresh(manifest, SET_CACHE_VERSION, manifest.output)) return false;
447
+ if (JSON.stringify(manifest.entries) !== JSON.stringify(entries)) return false;
448
+ if (manifest.artifactInputs === void 0 || !require_inputs.inputsAreFresh(manifest.artifactInputs)) return false;
449
+ return require_inputs.inputsAreFresh(manifest.inputs);
450
+ }
451
+ function readCompiledExtensionManifest(manifestPath) {
452
+ try {
453
+ const parsed = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
454
+ return parsed && typeof parsed.output === "string" && Array.isArray(parsed.artifacts) ? parsed : void 0;
455
+ } catch {
456
+ return;
457
+ }
458
+ }
459
+ function readSetManifest(manifestPath) {
460
+ const parsed = readCompiledExtensionManifest(manifestPath);
461
+ return parsed && Array.isArray(parsed.entries) && Array.isArray(parsed.inputs) ? parsed : void 0;
462
+ }
463
+ function writeAtomic(target, contents, mode = 384) {
464
+ node_fs.default.mkdirSync(node_path.default.dirname(target), { recursive: true });
465
+ const temporary = `${target}.${process.pid}.${Date.now()}.tmp`;
466
+ node_fs.default.writeFileSync(temporary, contents, { mode });
467
+ try {
468
+ node_fs.default.renameSync(temporary, target);
469
+ node_fs.default.chmodSync(target, mode);
470
+ } catch (error) {
471
+ node_fs.default.rmSync(temporary, { force: true });
472
+ throw error;
473
+ }
474
+ }
475
+ function splitOutputOptions(entryFileNames) {
476
+ return {
477
+ format: "esm",
478
+ sourcemap: false,
479
+ minify: true,
480
+ codeSplitting: true,
481
+ hashCharacters: "hex",
482
+ entryFileNames,
483
+ chunkFileNames: `chunks/[name].[hash:${HASH_LENGTH}]${COMPILED_SUFFIX}`,
484
+ assetFileNames: `assets/[name].[hash:${HASH_LENGTH}][extname]`
485
+ };
486
+ }
487
+ function artifactTarget(outputDirectory, artifact) {
488
+ const target = node_path.default.resolve(outputDirectory, artifact.fileName);
489
+ const relative = node_path.default.relative(outputDirectory, target);
490
+ if (relative.startsWith("..") || node_path.default.isAbsolute(relative)) throw new Error(`Rolldown emitted an artifact outside the output directory: ${artifact.fileName}`);
491
+ return target;
492
+ }
493
+ function artifactMatches(target, contents) {
494
+ try {
495
+ const current = node_fs.default.readFileSync(target);
496
+ const generated = typeof contents === "string" ? Buffer.from(contents) : Buffer.from(contents);
497
+ return current.equals(generated);
498
+ } catch {
499
+ return false;
500
+ }
501
+ }
502
+ /** Writes referenced chunks first so a visible entry always has a complete graph. */
503
+ function writeCompiledGraph(generated, outputDirectory) {
504
+ const entry = generated.output.find((artifact) => artifact.type === "chunk" && artifact.isEntry);
505
+ if (!entry || entry.type !== "chunk") throw new Error("Rolldown produced no extension entry");
506
+ const root = node_path.default.resolve(outputDirectory);
507
+ const remaining = generated.output.filter((artifact) => artifact !== entry);
508
+ for (const artifact of [...remaining, entry]) {
509
+ const contents = artifact.type === "chunk" ? artifact.code : artifact.source;
510
+ const target = artifactTarget(root, artifact);
511
+ if (!artifactMatches(target, contents)) writeAtomic(target, contents);
512
+ }
513
+ return {
514
+ entry: artifactTarget(root, entry),
515
+ artifacts: generated.output.map((artifact) => artifactTarget(root, artifact)).sort()
516
+ };
517
+ }
518
+ function resourceInputPaths(resources = []) {
519
+ return resources.flatMap((resource) => resource.packages.map((pkg) => pkg.files.map((file) => node_path.default.resolve(pkg.packageDirectory, file.path))).flat());
520
+ }
521
+ function validateResourcePackageName(name) {
522
+ if (!/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u.test(name)) throw new Error(`Invalid resource package name: ${name}`);
523
+ }
524
+ function resourceArtifacts(resources = []) {
525
+ const artifacts = /* @__PURE__ */ new Map();
526
+ const owners = /* @__PURE__ */ new Set();
527
+ for (const resource of resources) {
528
+ validateResourcePackageName(resource.ownerPackageName);
529
+ const owner = canonicalPath(resource.ownerDirectory);
530
+ if (owners.has(owner)) throw new Error(`Duplicate resource owner: ${owner}`);
531
+ owners.add(owner);
532
+ for (const pkg of resource.packages) {
533
+ validateResourcePackageName(pkg.packageName);
534
+ for (const file of pkg.files) {
535
+ if (!file.path || file.path.includes("\\") || node_path.default.isAbsolute(file.path) || file.path.split("/").some((part) => !part || part === "./index" || part === "..")) throw new Error(`Invalid resource path: ${file.path}`);
536
+ if (file.mode !== void 0 && (!Number.isInteger(file.mode) || file.mode < 0 || file.mode > 511)) throw new Error(`Invalid resource mode: ${file.mode}`);
537
+ const source = canonicalPath(node_path.default.resolve(pkg.packageDirectory, file.path));
538
+ if (!isInside(canonicalPath(pkg.packageDirectory), source)) throw new Error(`Resource escapes package: ${file.path}`);
539
+ const stat = node_fs.default.statSync(source);
540
+ if (!stat.isFile()) throw new Error(`Resource is not a file: ${source}`);
541
+ const artifact = `node_modules/${pkg.packageName}/${file.path}`;
542
+ if (artifacts.has(artifact)) throw new Error(`Duplicate resource artifact: ${artifact}`);
543
+ artifacts.set(artifact, {
544
+ contents: node_fs.default.readFileSync(source),
545
+ mode: file.mode ?? stat.mode & 511
546
+ });
547
+ }
548
+ }
549
+ }
550
+ return artifacts;
551
+ }
552
+ /** Bind resource layout and permissions as well as input bytes to the cache identity. */
553
+ function resourceCacheKey(resources = [], artifacts, repositoryRoot) {
554
+ if (resources.length === 0) return "";
555
+ const identity = (directory) => repositoryRoot ? logicalInput(directory, repositoryRoot).logicalPath : canonicalPath(directory);
556
+ return (0, node_crypto.createHash)("sha256").update(JSON.stringify({
557
+ resources: resources.map((resource) => ({
558
+ ownerPackageName: resource.ownerPackageName,
559
+ ownerDirectory: identity(resource.ownerDirectory),
560
+ packages: resource.packages.map((pkg) => ({
561
+ ...pkg,
562
+ packageDirectory: identity(pkg.packageDirectory)
563
+ }))
564
+ })),
565
+ modes: [...artifacts].map(([name, asset]) => [name, asset.mode])
566
+ })).digest("hex");
567
+ }
568
+ function validateResourceOutputPaths(outputDirectory, artifacts) {
569
+ for (const artifact of artifacts.keys()) {
570
+ let target = canonicalPath(outputDirectory);
571
+ for (const segment of artifact.split("/")) {
572
+ target = node_path.default.join(target, segment);
573
+ try {
574
+ if (node_fs.default.lstatSync(target).isSymbolicLink()) throw new Error(`Resource output contains a symlink: ${artifact}`);
575
+ } catch (error) {
576
+ if (error.code !== "ENOENT") throw error;
577
+ }
578
+ }
579
+ }
580
+ }
581
+ function resourceArtifactsAreFresh(outputDirectory, artifacts) {
582
+ for (const [artifact, asset] of artifacts) {
583
+ const target = node_path.default.join(outputDirectory, artifact);
584
+ try {
585
+ if (!isInside(canonicalPath(outputDirectory), canonicalPath(target)) || !artifactMatches(target, asset.contents) || (node_fs.default.statSync(target).mode & 511) !== asset.mode) return false;
586
+ } catch {
587
+ return false;
588
+ }
589
+ }
590
+ return true;
591
+ }
592
+ function resourceModuleUrl(id, outputDirectory, resources = []) {
593
+ const resource = resources.find((candidate) => isInside(canonicalPath(candidate.ownerDirectory), canonicalPath(id)));
594
+ if (!resource) return void 0;
595
+ const relative = node_path.default.relative(canonicalPath(resource.ownerDirectory), canonicalPath(id));
596
+ return (0, node_url.pathToFileURL)(node_path.default.join(outputDirectory, "node_modules", resource.ownerPackageName, relative)).href;
597
+ }
598
+ function sharedLookupKey(entries, outputName) {
599
+ return (0, node_crypto.createHash)("sha256").update(SHARED_BUILD_VERSION).update(process.version).update(process.platform).update(process.arch).update(outputName).update(JSON.stringify(entries.map((entry) => entry.logicalPath))).digest("hex");
600
+ }
601
+ function tokenizedInputs(inputs, repositoryRoot) {
602
+ const logical = [];
603
+ for (const target of inputs) logical.push(logicalInput(target, repositoryRoot));
604
+ logical.sort((left, right) => left.logicalPath.localeCompare(right.logicalPath));
605
+ const shared = [{
606
+ logicalPath: REPOSITORY_INPUT_PREFIX,
607
+ sha256: "",
608
+ token: `${SHARED_PATH_TOKEN_PREFIX}ROOT__`
609
+ }];
610
+ const byTarget = /* @__PURE__ */ new Map([[repositoryRoot, `${SHARED_PATH_TOKEN_PREFIX}ROOT__`]]);
611
+ const tokenByLogicalPath = /* @__PURE__ */ new Map();
612
+ logical.forEach((input, index) => {
613
+ const existing = tokenByLogicalPath.get(input.logicalPath);
614
+ const token = existing ?? `${SHARED_PATH_TOKEN_PREFIX}${String(index)}__`;
615
+ if (!existing) {
616
+ shared.push({
617
+ logicalPath: input.logicalPath,
618
+ sha256: require_cache.contentSha256(node_fs.default.readFileSync(input.target)),
619
+ token,
620
+ ...input.sourcePath ? { sourcePath: input.sourcePath } : {}
621
+ });
622
+ tokenByLogicalPath.set(input.logicalPath, token);
623
+ }
624
+ byTarget.set(node_path.default.resolve(input.target), token);
625
+ });
626
+ for (const target of inputs) {
627
+ const input = logicalInput(target, repositoryRoot);
628
+ const token = tokenByLogicalPath.get(input.logicalPath);
629
+ if (token) byTarget.set(node_path.default.resolve(target), token);
630
+ }
631
+ return {
632
+ shared,
633
+ byTarget
634
+ };
635
+ }
636
+ function tokenizedArtifactContents(generated, tokens, outputDirectory) {
637
+ const artifacts = /* @__PURE__ */ new Map();
638
+ const outputToken = `${SHARED_PATH_TOKEN_PREFIX}OUTPUT__`;
639
+ const replacements = [...tokens.entries()].sort(([left], [right]) => right.length - left.length);
640
+ for (const artifact of generated.output) {
641
+ if (artifact.type === "asset") {
642
+ artifacts.set(artifact.fileName, typeof artifact.source === "string" ? artifact.source : artifact.source);
643
+ continue;
644
+ }
645
+ let source = artifact.code.replaceAll((0, node_url.pathToFileURL)(outputDirectory).href, `${outputToken}:url`).replaceAll(outputDirectory, outputToken);
646
+ for (const [target, token] of replacements) source = source.replaceAll((0, node_url.pathToFileURL)(target).href, `${token}:url`).replaceAll(pathToImportSpecifier(target), token).replaceAll(target, token);
647
+ artifacts.set(artifact.fileName, source);
648
+ }
649
+ return artifacts;
650
+ }
651
+ function writeLocalSetManifest(manifestPath, entries, output, artifacts, inputs) {
652
+ const fingerprintAll = (paths) => [...paths].map((target) => require_inputs.fingerprintInput(target)).filter((value) => value !== void 0).sort((left, right) => left.path.localeCompare(right.path));
653
+ const sortedArtifacts = [...artifacts].sort();
654
+ writeAtomic(manifestPath, `${JSON.stringify({
655
+ version: SET_CACHE_VERSION,
656
+ entries,
657
+ output,
658
+ artifacts: sortedArtifacts,
659
+ inputs: fingerprintAll([...inputs]),
660
+ artifactInputs: fingerprintAll([output, ...sortedArtifacts])
661
+ }, null, 2)}\n`);
662
+ }
663
+ function materializeSharedSet(build, outputDirectory, manifestPath, entries) {
664
+ const output = require_cache.materializeSharedBuild(build, outputDirectory);
665
+ const inputs = new Set(build.replacements.values());
666
+ writeLocalSetManifest(manifestPath, entries, output, build.manifest.artifacts.map((artifact) => node_path.default.join(outputDirectory, artifact.path)), inputs);
667
+ return output;
668
+ }
669
+ /** Stable lookup key for one exact Pi load order. */
670
+ function extensionSetKey(entries) {
671
+ return (0, node_crypto.createHash)("sha256").update(SET_CACHE_VERSION).update(JSON.stringify(entries.map((entry) => node_path.default.resolve(entry)))).digest("hex").slice(0, HASH_LENGTH);
672
+ }
673
+ function extensionSetSource(entries) {
674
+ const helper = (0, _agimon_ai_doompi_core_module_resolution.optionalPackageEntry)(EXTENSION_SOURCE_HELPER, require("url").pathToFileURL(__filename).href);
675
+ if (!helper) throw new Error(`Cannot resolve ${EXTENSION_SOURCE_HELPER}`);
676
+ const loaders = entries.map((entry) => `() => import(${javascriptStringLiteral(pathToImportSpecifier(entry))})`);
677
+ const names = entries.map((entry) => javascriptStringLiteral(entry));
678
+ return [
679
+ `import { withExtensionSource } from ${javascriptStringLiteral(pathToImportSpecifier(helper))};`,
680
+ `const loaders = [${loaders.join(",")}];`,
681
+ `const names = [${names.join(",")}];`,
682
+ "function report(index, phase, startedAt, error) {",
683
+ " const elapsed = (performance.now() - startedAt).toFixed(1);",
684
+ " const detail = error instanceof Error ? \": \" + error.message : error === undefined ? \"\" : \": \" + String(error);",
685
+ " process.stderr.write(\"[doompi:timing] \" + phase + \" \" + elapsed + \"ms \" + names[index] + detail + \"\\n\");",
686
+ "}",
687
+ "export default async function doompiExtensionSet(pi) {",
688
+ " const timings = process.env.DOOMPI_TIMING === \"1\" || process.env.PI_TIMING === \"1\";",
689
+ " const loaded = await Promise.all(loaders.map(async (load, index) => {",
690
+ " const startedAt = performance.now();",
691
+ " try {",
692
+ " const extension = await load();",
693
+ " if (timings) report(index, \"import\", startedAt);",
694
+ " return extension;",
695
+ " } catch (error) {",
696
+ " report(index, \"import-error\", startedAt, error);",
697
+ " return undefined;",
698
+ " }",
699
+ " }));",
700
+ " for (let index = 0; index < loaded.length; index += 1) {",
701
+ " const extension = loaded[index];",
702
+ " if (!extension) continue;",
703
+ " const startedAt = performance.now();",
704
+ " try {",
705
+ " const factory = extension.default;",
706
+ " if (typeof factory !== 'function') throw new Error('does not export an extension factory');",
707
+ " await factory(withExtensionSource(pi, names[index]));",
708
+ " if (timings) report(index, \"factory\", startedAt);",
709
+ " } catch (error) {",
710
+ " report(index, \"factory-error\", startedAt, error);",
711
+ " }",
712
+ " }",
713
+ "}"
714
+ ].join("\n");
715
+ }
716
+ function pathToImportSpecifier(target) {
717
+ return node_path.default.resolve(target).split(node_path.default.sep).join("/");
718
+ }
719
+ function setExternalResolver(inputs, kind, entry, resources = []) {
720
+ return {
721
+ name: "doom-set-external",
722
+ async resolveId(specifier, importer, options) {
723
+ if (specifier === VIRTUAL_SET_ENTRY) return null;
724
+ if (NODE_BUILTINS.has(specifier) || specifier.startsWith("node:")) return {
725
+ id: specifier,
726
+ external: true
727
+ };
728
+ if (node_path.default.isAbsolute(specifier)) {
729
+ if (!importer && entry && node_path.default.resolve(specifier) === node_path.default.resolve(entry)) return null;
730
+ const root = packageRootFromPath(specifier);
731
+ if (root && kind === "module" && DIRECT_EXTERNAL_PACKAGES.has(root)) {
732
+ inputs.add(specifier);
733
+ return {
734
+ id: specifier,
735
+ external: true
736
+ };
737
+ }
738
+ if (root && kind === "module" && directModuleDependencyIsUnbundlable(root) && !directModuleDependencyIsPinned(root, resources)) throw directModuleDependencyError(root, importer);
739
+ if (root === "@napi-rs/keyring" && kind === "module" && directModuleDependencyIsPinned(root, resources)) {
740
+ const directory = packageManifestDirectory(specifier);
741
+ if (!directory) throw directModuleDependencyError(root, importer);
742
+ return {
743
+ id: `${root}/${node_path.default.relative(directory, canonicalPath(specifier)).split(node_path.default.sep).join("/")}`,
744
+ external: true
745
+ };
746
+ }
747
+ if (root && (HOSTED_PACKAGES.has(root) || NATIVE_PACKAGES.has(root) || kind === "pi-set" && STARTUP_EXTERNAL_PACKAGES.has(root))) {
748
+ inputs.add(specifier);
749
+ return {
750
+ id: specifier,
751
+ external: true
752
+ };
753
+ }
754
+ return null;
755
+ }
756
+ if (specifier.startsWith("./index")) return null;
757
+ const renamed = renameScope(specifier);
758
+ const root = packageRootOf(renamed);
759
+ if (root && HOSTED_PACKAGES.has(root)) {
760
+ const hosted = (0, _agimon_ai_doompi_core_module_resolution.optionalPackageEntry)(renamed, require("url").pathToFileURL(__filename).href);
761
+ if (hosted) {
762
+ inputs.add(hosted);
763
+ return {
764
+ id: hosted,
765
+ external: true
766
+ };
767
+ }
768
+ }
769
+ if (root === "typebox") {
770
+ const typebox = piExtensionDependencyEntry(renamed);
771
+ if (typebox) {
772
+ inputs.add(typebox);
773
+ return {
774
+ id: typebox,
775
+ external: kind === "pi-set"
776
+ };
777
+ }
778
+ }
779
+ if (root && kind === "module" && DIRECT_EXTERNAL_PACKAGES.has(root)) {
780
+ const resolved = await this.resolve(renamed, importer, options);
781
+ if (resolved) {
782
+ inputs.add(resolved.id);
783
+ return {
784
+ id: resolved.id,
785
+ external: true
786
+ };
787
+ }
788
+ }
789
+ if (root && kind === "module" && directModuleDependencyIsUnbundlable(root) && !directModuleDependencyIsPinned(root, resources)) throw directModuleDependencyError(root, importer);
790
+ if (root === "@napi-rs/keyring" && kind === "module" && directModuleDependencyIsPinned(root, resources)) return {
791
+ id: renamed,
792
+ external: true
793
+ };
794
+ if (root && kind === "pi-set" && (NATIVE_PACKAGES.has(root) || STARTUP_EXTERNAL_PACKAGES.has(root))) {
795
+ const resolved = await this.resolve(renamed, importer, options);
796
+ if (resolved) {
797
+ inputs.add(resolved.id);
798
+ return {
799
+ id: resolved.id,
800
+ external: true
801
+ };
802
+ }
803
+ }
804
+ return null;
805
+ }
806
+ };
807
+ }
808
+ function inputCollector(inputs) {
809
+ return {
810
+ name: "doom-set-inputs",
811
+ load(id) {
812
+ if (node_path.default.isAbsolute(id) && node_fs.default.existsSync(id)) inputs.add(id);
813
+ return null;
814
+ }
815
+ };
816
+ }
817
+ /** An unresolved bare import would otherwise become a broken dist external. */
818
+ function failUnresolvedImport(_level, log, handler) {
819
+ if (log.code === "UNRESOLVED_IMPORT") handler("error", log);
820
+ }
821
+ function isRecord(value) {
822
+ return typeof value === "object" && value !== null && !Array.isArray(value);
823
+ }
824
+ function collectImportMetaUrlRanges(value, ranges) {
825
+ if (Array.isArray(value)) {
826
+ for (const item of value) collectImportMetaUrlRanges(item, ranges);
827
+ return;
828
+ }
829
+ if (!isRecord(value)) return;
830
+ const object = value.object;
831
+ const property = value.property;
832
+ if (value.type === "MemberExpression" && value.computed === false && typeof value.start === "number" && typeof value.end === "number" && isRecord(object) && object.type === "MetaProperty" && isRecord(object.meta) && object.meta.name === "import" && isRecord(object.property) && object.property.name === "meta" && isRecord(property) && property.name === "url") {
833
+ ranges.push({
834
+ start: value.start,
835
+ end: value.end
836
+ });
837
+ return;
838
+ }
839
+ for (const child of Object.values(value)) collectImportMetaUrlRanges(child, ranges);
840
+ }
841
+ /** Keeps package-owned resource lookup anchored to each original source file. */
842
+ function preserveImportMetaUrl(outputDirectory, resources = []) {
843
+ return {
844
+ name: "doom-original-import-meta-url",
845
+ transform(source, id) {
846
+ if (!node_path.default.isAbsolute(id) || !source.includes("import.meta.url")) return null;
847
+ const packageRoot = packageRootFromPath(id);
848
+ if (packageRoot === TURSO_DATABASE_PACKAGE || packageRoot === TURSO_DATABASE_COMMON_PACKAGE) return null;
849
+ const extension = node_path.default.extname(id).toLowerCase();
850
+ const lang = extension === ".tsx" ? "tsx" : extension === ".jsx" ? "jsx" : isTypeScriptEntry(id) ? "ts" : "js";
851
+ const ranges = [];
852
+ collectImportMetaUrlRanges(this.parse(source, { lang }), ranges);
853
+ if (ranges.length === 0) return null;
854
+ const replacement = javascriptStringLiteral(resourceModuleUrl(id, outputDirectory, resources) ?? (0, node_url.pathToFileURL)(id).href);
855
+ let transformed = source;
856
+ for (const range of ranges.sort((left, right) => right.start - left.start)) transformed = `${transformed.slice(0, range.start)}${replacement}${transformed.slice(range.end)}`;
857
+ return transformed;
858
+ }
859
+ };
860
+ }
861
+ /** Location of the lightweight input-fingerprint record for one extension set. */
862
+ function extensionSetManifestPath(entries, cacheDirectory, options = {}) {
863
+ const key = extensionSetKey(entries.map((entry) => node_path.default.resolve(entry)));
864
+ const outputDirectory = node_path.default.resolve(options.outputDirectory ?? node_path.default.join(cacheDirectory, SET_DIRECTORY));
865
+ const outputName = safeOutputName(options.outputName ?? DEFAULT_SET_OUTPUT_NAME);
866
+ const outputKey = (0, node_crypto.createHash)("sha256").update(outputDirectory).update(outputName).digest("hex").slice(0, HASH_LENGTH);
867
+ return node_path.default.join(cacheDirectory, SET_DIRECTORY, `${key}.${outputKey}${MANIFEST_SUFFIX}`);
868
+ }
869
+ /**
870
+ * Compiles an ordered extension set into one native ESM entry.
871
+ *
872
+ * The generated entry starts every module load together, then invokes factories
873
+ * sequentially in activation order. Its manifest records every loaded module,
874
+ * so a dependency edit invalidates the cache without running the compiler.
875
+ */
876
+ async function compileExtensionSet(entries, cacheDirectory, options = {}) {
877
+ return compileGraph(entries, cacheDirectory, options, "pi-set");
878
+ }
879
+ /** Exact compiler receipt used by sync to validate a direct module without importing it. */
880
+ function extensionModuleManifestPath(entry, cacheDirectory, options = {}) {
881
+ const root = options.repositoryRoot ? canonicalPath(options.repositoryRoot) : void 0;
882
+ const resources = resourcesWithPinnedNativePlatforms([node_path.default.resolve(entry)], options.resources);
883
+ const resourceKey = resourceCacheKey(resources, resourceArtifacts(resources), root);
884
+ const base = `${extensionSetManifestPath([entry], cacheDirectory, options)}.module.json`;
885
+ return resourceKey ? `${base}.${resourceKey}.json` : base;
886
+ }
887
+ /** Preserve a module's exports instead of wrapping its default in a Pi factory.
888
+ * External dependency and resource policies remain those of the shared compiler.
889
+ */
890
+ async function compileExtensionModule(entry, cacheDirectory, options = {}) {
891
+ return compileGraph([entry], cacheDirectory, options, "module");
892
+ }
893
+ async function compileGraph(entries, cacheDirectory, options, kind) {
894
+ if (entries.length === 0) throw new Error("Cannot compile an empty extension set");
895
+ const normalized = entries.map((entry) => node_path.default.resolve(entry));
896
+ const setDirectory = node_path.default.join(cacheDirectory, SET_DIRECTORY);
897
+ node_fs.default.mkdirSync(setDirectory, { recursive: true });
898
+ const outputDirectory = node_path.default.resolve(options.outputDirectory ?? setDirectory);
899
+ const outputName = safeOutputName(options.outputName ?? DEFAULT_SET_OUTPUT_NAME);
900
+ node_fs.default.mkdirSync(outputDirectory, { recursive: true });
901
+ const repositoryRoot = options.repositoryRoot ? canonicalPath(options.repositoryRoot) : void 0;
902
+ const effectiveResources = kind === "module" ? resourcesWithPinnedNativePlatforms(normalized, options.resources) : [...options.resources ?? []];
903
+ const resources = resourceArtifacts(effectiveResources);
904
+ validateResourceOutputPaths(outputDirectory, resources);
905
+ const resourceKey = resourceCacheKey(effectiveResources, resources, repositoryRoot);
906
+ const setManifestPath = extensionSetManifestPath(normalized, cacheDirectory, options);
907
+ const manifestPath = kind === "module" ? extensionModuleManifestPath(normalized[0], cacheDirectory, options) : resourceKey ? `${setManifestPath}.${resourceKey}.json` : setManifestPath;
908
+ const previous = readSetManifest(manifestPath);
909
+ if (previous && manifestIsFresh(previous, normalized) && resourceArtifactsAreFresh(outputDirectory, resources)) return previous.output;
910
+ const resourceInputs = resourceInputPaths(effectiveResources);
911
+ const generate = async () => {
912
+ const inputs = /* @__PURE__ */ new Set([...normalized, ...resourceInputs]);
913
+ const source = extensionSetSource(normalized);
914
+ const { rolldown } = await import("rolldown");
915
+ const build = await rolldown({
916
+ input: kind === "module" ? normalized[0] : VIRTUAL_SET_ENTRY,
917
+ platform: "node",
918
+ plugins: [
919
+ {
920
+ name: "doom-set-entry",
921
+ resolveId(id) {
922
+ return id === VIRTUAL_SET_ENTRY ? id : null;
923
+ },
924
+ load(id) {
925
+ return id === VIRTUAL_SET_ENTRY ? source : null;
926
+ }
927
+ },
928
+ setExternalResolver(inputs, kind, normalized[0], effectiveResources),
929
+ preserveImportMetaUrl(outputDirectory, effectiveResources),
930
+ inputCollector(inputs)
931
+ ],
932
+ onLog: failUnresolvedImport
933
+ });
934
+ try {
935
+ return {
936
+ generated: await build.generate(splitOutputOptions(`${outputName}.[hash:${HASH_LENGTH}]${COMPILED_SUFFIX}`)),
937
+ inputs
938
+ };
939
+ } finally {
940
+ await build.close();
941
+ }
942
+ };
943
+ if (repositoryRoot && options.sharedCacheDirectory) {
944
+ const setLookupKey = sharedLookupKey([...normalized, ...resourceInputs].map((entry) => logicalInput(entry, repositoryRoot)), outputName);
945
+ const lookupKey = kind === "module" || resourceKey ? (0, node_crypto.createHash)("sha256").update(kind).update(":").update(setLookupKey).update(resourceKey).digest("hex") : setLookupKey;
946
+ const resolveInput = (input) => resolveLogicalInputPath(input, repositoryRoot);
947
+ return require_cache.withSharedBuildLock(options.sharedCacheDirectory, lookupKey, async () => {
948
+ const cached = require_cache.findSharedBuild(options.sharedCacheDirectory, lookupKey, resolveInput);
949
+ if (cached) return materializeSharedSet(cached, outputDirectory, manifestPath, normalized);
950
+ const { generated, inputs } = await generate();
951
+ const tokenized = tokenizedInputs(inputs, repositoryRoot);
952
+ const artifacts = tokenizedArtifactContents(generated, tokenized.byTarget, outputDirectory);
953
+ for (const [artifactPath, asset] of resources) {
954
+ if (artifacts.has(artifactPath)) throw new Error(`Duplicate resource artifact: ${artifactPath}`);
955
+ artifacts.set(artifactPath, asset);
956
+ }
957
+ if ([...artifacts.values()].some((contents) => typeof contents === "string" && contents.includes(repositoryRoot))) throw new Error("Shared build graph still contains an absolute worktree path after tokenization");
958
+ const entry = generated.output.find((artifact) => artifact.type === "chunk" && artifact.isEntry);
959
+ if (!entry) throw new Error("Rolldown produced no shared extension entry");
960
+ require_cache.publishSharedBuild({
961
+ cacheDirectory: options.sharedCacheDirectory,
962
+ lookupKey,
963
+ entry: entry.fileName,
964
+ inputs: tokenized.shared,
965
+ artifacts
966
+ });
967
+ const published = require_cache.findSharedBuild(options.sharedCacheDirectory, lookupKey, resolveInput);
968
+ if (!published) throw new Error("Published shared build could not be verified");
969
+ return materializeSharedSet(published, outputDirectory, manifestPath, normalized);
970
+ });
971
+ }
972
+ const { generated, inputs } = await generate();
973
+ const compiled = writeCompiledGraph(generated, outputDirectory);
974
+ const resourceFiles = [];
975
+ for (const [artifact, asset] of resources) {
976
+ const target = node_path.default.resolve(canonicalPath(outputDirectory), artifact);
977
+ if (!isInside(canonicalPath(outputDirectory), canonicalPath(target))) throw new Error(`Resource escapes output: ${artifact}`);
978
+ node_fs.default.mkdirSync(node_path.default.dirname(target), {
979
+ recursive: true,
980
+ mode: 448
981
+ });
982
+ writeAtomic(target, asset.contents, asset.mode ?? 384);
983
+ resourceFiles.push(target);
984
+ }
985
+ writeLocalSetManifest(manifestPath, normalized, compiled.entry, [...compiled.artifacts, ...resourceFiles], inputs);
986
+ return compiled.entry;
987
+ }
988
+ //#endregion
989
+ exports.compileExtensionModule = compileExtensionModule;
990
+ exports.compileExtensionSet = compileExtensionSet;
991
+ exports.extensionModuleManifestPath = extensionModuleManifestPath;
992
+ exports.extensionSetKey = extensionSetKey;
993
+ exports.extensionSetManifestPath = extensionSetManifestPath;
994
+ exports.isTypeScriptEntry = isTypeScriptEntry;
995
+
996
+ //# sourceMappingURL=index.cjs.map