@agimon-ai/doompi 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +546 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/bin/cli.cjs +3 -0
  5. package/dist/bin/cli.cjs.map +1 -0
  6. package/dist/bin/cli.d.cts +1 -0
  7. package/dist/bin/cli.d.mts +1 -0
  8. package/dist/bin/cli.mjs +3 -0
  9. package/dist/bin/cli.mjs.map +1 -0
  10. package/dist/bin/doomRunner.cjs +3 -0
  11. package/dist/bin/doomRunner.cjs.map +1 -0
  12. package/dist/bin/doomRunner.d.cts +1 -0
  13. package/dist/bin/doomRunner.d.mts +1 -0
  14. package/dist/bin/doomRunner.mjs +3 -0
  15. package/dist/bin/doomRunner.mjs.map +1 -0
  16. package/dist/cli/cliApp.cjs +2 -0
  17. package/dist/cli/cliApp.cjs.map +1 -0
  18. package/dist/cli/cliApp.d.cts +50 -0
  19. package/dist/cli/cliApp.d.cts.map +1 -0
  20. package/dist/cli/cliApp.d.mts +50 -0
  21. package/dist/cli/cliApp.d.mts.map +1 -0
  22. package/dist/cli/cliApp.mjs +2 -0
  23. package/dist/cli/cliApp.mjs.map +1 -0
  24. package/dist/cli/compatibilityOptions.cjs +2 -0
  25. package/dist/cli/compatibilityOptions.cjs.map +1 -0
  26. package/dist/cli/compatibilityOptions.d.cts +15 -0
  27. package/dist/cli/compatibilityOptions.d.cts.map +1 -0
  28. package/dist/cli/compatibilityOptions.d.mts +15 -0
  29. package/dist/cli/compatibilityOptions.d.mts.map +1 -0
  30. package/dist/cli/compatibilityOptions.mjs +2 -0
  31. package/dist/cli/compatibilityOptions.mjs.map +1 -0
  32. package/dist/cli/help.cjs +61 -0
  33. package/dist/cli/help.cjs.map +1 -0
  34. package/dist/cli/help.d.cts +6 -0
  35. package/dist/cli/help.d.cts.map +1 -0
  36. package/dist/cli/help.d.mts +6 -0
  37. package/dist/cli/help.d.mts.map +1 -0
  38. package/dist/cli/help.mjs +61 -0
  39. package/dist/cli/help.mjs.map +1 -0
  40. package/dist/cli/index.cjs +1 -0
  41. package/dist/cli/index.d.cts +5 -0
  42. package/dist/cli/index.d.mts +5 -0
  43. package/dist/cli/index.mjs +1 -0
  44. package/dist/cli/matrixOptions.cjs +2 -0
  45. package/dist/cli/matrixOptions.cjs.map +1 -0
  46. package/dist/cli/matrixOptions.d.cts +99 -0
  47. package/dist/cli/matrixOptions.d.cts.map +1 -0
  48. package/dist/cli/matrixOptions.d.mts +99 -0
  49. package/dist/cli/matrixOptions.d.mts.map +1 -0
  50. package/dist/cli/matrixOptions.mjs +2 -0
  51. package/dist/cli/matrixOptions.mjs.map +1 -0
  52. package/dist/cli/options.cjs +2 -0
  53. package/dist/cli/options.cjs.map +1 -0
  54. package/dist/cli/options.d.cts +7 -0
  55. package/dist/cli/options.d.cts.map +1 -0
  56. package/dist/cli/options.d.mts +7 -0
  57. package/dist/cli/options.d.mts.map +1 -0
  58. package/dist/cli/options.mjs +2 -0
  59. package/dist/cli/options.mjs.map +1 -0
  60. package/dist/commands/baseCommand.cjs +2 -0
  61. package/dist/commands/baseCommand.cjs.map +1 -0
  62. package/dist/commands/baseCommand.d.cts +36 -0
  63. package/dist/commands/baseCommand.d.cts.map +1 -0
  64. package/dist/commands/baseCommand.d.mts +36 -0
  65. package/dist/commands/baseCommand.d.mts.map +1 -0
  66. package/dist/commands/baseCommand.mjs +2 -0
  67. package/dist/commands/baseCommand.mjs.map +1 -0
  68. package/dist/commands/compatibilityCommand.cjs +2 -0
  69. package/dist/commands/compatibilityCommand.cjs.map +1 -0
  70. package/dist/commands/compatibilityCommand.d.cts +14 -0
  71. package/dist/commands/compatibilityCommand.d.cts.map +1 -0
  72. package/dist/commands/compatibilityCommand.d.mts +14 -0
  73. package/dist/commands/compatibilityCommand.d.mts.map +1 -0
  74. package/dist/commands/compatibilityCommand.mjs +2 -0
  75. package/dist/commands/compatibilityCommand.mjs.map +1 -0
  76. package/dist/commands/emitMcpCommand.cjs +2 -0
  77. package/dist/commands/emitMcpCommand.cjs.map +1 -0
  78. package/dist/commands/emitMcpCommand.d.cts +19 -0
  79. package/dist/commands/emitMcpCommand.d.cts.map +1 -0
  80. package/dist/commands/emitMcpCommand.d.mts +19 -0
  81. package/dist/commands/emitMcpCommand.d.mts.map +1 -0
  82. package/dist/commands/emitMcpCommand.mjs +2 -0
  83. package/dist/commands/emitMcpCommand.mjs.map +1 -0
  84. package/dist/commands/explainCommand.cjs +21 -0
  85. package/dist/commands/explainCommand.cjs.map +1 -0
  86. package/dist/commands/explainCommand.d.cts +63 -0
  87. package/dist/commands/explainCommand.d.cts.map +1 -0
  88. package/dist/commands/explainCommand.d.mts +63 -0
  89. package/dist/commands/explainCommand.d.mts.map +1 -0
  90. package/dist/commands/explainCommand.mjs +21 -0
  91. package/dist/commands/explainCommand.mjs.map +1 -0
  92. package/dist/commands/index.cjs +1 -0
  93. package/dist/commands/index.d.cts +8 -0
  94. package/dist/commands/index.d.mts +8 -0
  95. package/dist/commands/index.mjs +1 -0
  96. package/dist/commands/initCommand.cjs +3 -0
  97. package/dist/commands/initCommand.cjs.map +1 -0
  98. package/dist/commands/initCommand.d.cts +11 -0
  99. package/dist/commands/initCommand.d.cts.map +1 -0
  100. package/dist/commands/initCommand.d.mts +11 -0
  101. package/dist/commands/initCommand.d.mts.map +1 -0
  102. package/dist/commands/initCommand.mjs +3 -0
  103. package/dist/commands/initCommand.mjs.map +1 -0
  104. package/dist/commands/launchCommand.cjs +2 -0
  105. package/dist/commands/launchCommand.cjs.map +1 -0
  106. package/dist/commands/launchCommand.d.cts +31 -0
  107. package/dist/commands/launchCommand.d.cts.map +1 -0
  108. package/dist/commands/launchCommand.d.mts +31 -0
  109. package/dist/commands/launchCommand.d.mts.map +1 -0
  110. package/dist/commands/launchCommand.mjs +2 -0
  111. package/dist/commands/launchCommand.mjs.map +1 -0
  112. package/dist/commands/syncCommand.cjs +6 -0
  113. package/dist/commands/syncCommand.cjs.map +1 -0
  114. package/dist/commands/syncCommand.d.cts +37 -0
  115. package/dist/commands/syncCommand.d.cts.map +1 -0
  116. package/dist/commands/syncCommand.d.mts +37 -0
  117. package/dist/commands/syncCommand.d.mts.map +1 -0
  118. package/dist/commands/syncCommand.mjs +6 -0
  119. package/dist/commands/syncCommand.mjs.map +1 -0
  120. package/dist/config/harnessState.cjs +2 -0
  121. package/dist/config/harnessState.cjs.map +1 -0
  122. package/dist/config/harnessState.d.cts +24 -0
  123. package/dist/config/harnessState.d.cts.map +1 -0
  124. package/dist/config/harnessState.d.mts +24 -0
  125. package/dist/config/harnessState.d.mts.map +1 -0
  126. package/dist/config/harnessState.mjs +2 -0
  127. package/dist/config/harnessState.mjs.map +1 -0
  128. package/dist/config/index.cjs +1 -0
  129. package/dist/config/index.d.cts +7 -0
  130. package/dist/config/index.d.mts +7 -0
  131. package/dist/config/index.mjs +1 -0
  132. package/dist/config/projectTrust.cjs +2 -0
  133. package/dist/config/projectTrust.cjs.map +1 -0
  134. package/dist/config/projectTrust.d.cts +14 -0
  135. package/dist/config/projectTrust.d.cts.map +1 -0
  136. package/dist/config/projectTrust.d.mts +14 -0
  137. package/dist/config/projectTrust.d.mts.map +1 -0
  138. package/dist/config/projectTrust.mjs +2 -0
  139. package/dist/config/projectTrust.mjs.map +1 -0
  140. package/dist/entries/autoStop.cjs +2 -0
  141. package/dist/entries/autoStop.cjs.map +1 -0
  142. package/dist/entries/autoStop.d.cts +6 -0
  143. package/dist/entries/autoStop.d.cts.map +1 -0
  144. package/dist/entries/autoStop.d.mts +7 -0
  145. package/dist/entries/autoStop.d.mts.map +1 -0
  146. package/dist/entries/autoStop.mjs +2 -0
  147. package/dist/entries/autoStop.mjs.map +1 -0
  148. package/dist/entries/components/matrixPicker.cjs +2 -0
  149. package/dist/entries/components/matrixPicker.cjs.map +1 -0
  150. package/dist/entries/components/matrixPicker.d.cts +55 -0
  151. package/dist/entries/components/matrixPicker.d.cts.map +1 -0
  152. package/dist/entries/components/matrixPicker.d.mts +55 -0
  153. package/dist/entries/components/matrixPicker.d.mts.map +1 -0
  154. package/dist/entries/components/matrixPicker.mjs +2 -0
  155. package/dist/entries/components/matrixPicker.mjs.map +1 -0
  156. package/dist/entries/components/skillsOverlay.cjs +4 -0
  157. package/dist/entries/components/skillsOverlay.cjs.map +1 -0
  158. package/dist/entries/components/skillsOverlay.d.cts +58 -0
  159. package/dist/entries/components/skillsOverlay.d.cts.map +1 -0
  160. package/dist/entries/components/skillsOverlay.d.mts +58 -0
  161. package/dist/entries/components/skillsOverlay.d.mts.map +1 -0
  162. package/dist/entries/components/skillsOverlay.mjs +4 -0
  163. package/dist/entries/components/skillsOverlay.mjs.map +1 -0
  164. package/dist/entries/domains.cjs +2 -0
  165. package/dist/entries/domains.cjs.map +1 -0
  166. package/dist/entries/domains.d.cts +10 -0
  167. package/dist/entries/domains.d.cts.map +1 -0
  168. package/dist/entries/domains.d.mts +10 -0
  169. package/dist/entries/domains.d.mts.map +1 -0
  170. package/dist/entries/domains.mjs +2 -0
  171. package/dist/entries/domains.mjs.map +1 -0
  172. package/dist/entries/doom.cjs +2 -0
  173. package/dist/entries/doom.cjs.map +1 -0
  174. package/dist/entries/doom.d.cts +13 -0
  175. package/dist/entries/doom.d.cts.map +1 -0
  176. package/dist/entries/doom.d.mts +14 -0
  177. package/dist/entries/doom.d.mts.map +1 -0
  178. package/dist/entries/doom.mjs +2 -0
  179. package/dist/entries/doom.mjs.map +1 -0
  180. package/dist/entries/effort.cjs +2 -0
  181. package/dist/entries/effort.cjs.map +1 -0
  182. package/dist/entries/effort.d.cts +10 -0
  183. package/dist/entries/effort.d.cts.map +1 -0
  184. package/dist/entries/effort.d.mts +10 -0
  185. package/dist/entries/effort.d.mts.map +1 -0
  186. package/dist/entries/effort.mjs +2 -0
  187. package/dist/entries/effort.mjs.map +1 -0
  188. package/dist/entries/majorMode.cjs +6 -0
  189. package/dist/entries/majorMode.cjs.map +1 -0
  190. package/dist/entries/majorMode.d.cts +29 -0
  191. package/dist/entries/majorMode.d.cts.map +1 -0
  192. package/dist/entries/majorMode.d.mts +29 -0
  193. package/dist/entries/majorMode.d.mts.map +1 -0
  194. package/dist/entries/majorMode.mjs +6 -0
  195. package/dist/entries/majorMode.mjs.map +1 -0
  196. package/dist/entries/notifications.cjs +2 -0
  197. package/dist/entries/notifications.cjs.map +1 -0
  198. package/dist/entries/notifications.d.cts +13 -0
  199. package/dist/entries/notifications.d.cts.map +1 -0
  200. package/dist/entries/notifications.d.mts +13 -0
  201. package/dist/entries/notifications.d.mts.map +1 -0
  202. package/dist/entries/notifications.mjs +2 -0
  203. package/dist/entries/notifications.mjs.map +1 -0
  204. package/dist/entries/ollamaProvider.cjs +2 -0
  205. package/dist/entries/ollamaProvider.cjs.map +1 -0
  206. package/dist/entries/ollamaProvider.d.cts +6 -0
  207. package/dist/entries/ollamaProvider.d.cts.map +1 -0
  208. package/dist/entries/ollamaProvider.d.mts +7 -0
  209. package/dist/entries/ollamaProvider.d.mts.map +1 -0
  210. package/dist/entries/ollamaProvider.mjs +2 -0
  211. package/dist/entries/ollamaProvider.mjs.map +1 -0
  212. package/dist/entries/persona.cjs +2 -0
  213. package/dist/entries/persona.cjs.map +1 -0
  214. package/dist/entries/persona.d.cts +14 -0
  215. package/dist/entries/persona.d.cts.map +1 -0
  216. package/dist/entries/persona.d.mts +15 -0
  217. package/dist/entries/persona.d.mts.map +1 -0
  218. package/dist/entries/persona.mjs +2 -0
  219. package/dist/entries/persona.mjs.map +1 -0
  220. package/dist/entries/profile.cjs +3 -0
  221. package/dist/entries/profile.cjs.map +1 -0
  222. package/dist/entries/profile.d.cts +16 -0
  223. package/dist/entries/profile.d.cts.map +1 -0
  224. package/dist/entries/profile.d.mts +16 -0
  225. package/dist/entries/profile.d.mts.map +1 -0
  226. package/dist/entries/profile.mjs +3 -0
  227. package/dist/entries/profile.mjs.map +1 -0
  228. package/dist/entries/repositoryHooks.cjs +9 -0
  229. package/dist/entries/repositoryHooks.cjs.map +1 -0
  230. package/dist/entries/repositoryHooks.d.cts +7 -0
  231. package/dist/entries/repositoryHooks.d.cts.map +1 -0
  232. package/dist/entries/repositoryHooks.d.mts +8 -0
  233. package/dist/entries/repositoryHooks.d.mts.map +1 -0
  234. package/dist/entries/repositoryHooks.mjs +9 -0
  235. package/dist/entries/repositoryHooks.mjs.map +1 -0
  236. package/dist/entries/skills.cjs +2 -0
  237. package/dist/entries/skills.cjs.map +1 -0
  238. package/dist/entries/skills.d.cts +34 -0
  239. package/dist/entries/skills.d.cts.map +1 -0
  240. package/dist/entries/skills.d.mts +34 -0
  241. package/dist/entries/skills.d.mts.map +1 -0
  242. package/dist/entries/skills.mjs +2 -0
  243. package/dist/entries/skills.mjs.map +1 -0
  244. package/dist/entries/styleSystem.cjs +4 -0
  245. package/dist/entries/styleSystem.cjs.map +1 -0
  246. package/dist/entries/styleSystem.d.cts +32 -0
  247. package/dist/entries/styleSystem.d.cts.map +1 -0
  248. package/dist/entries/styleSystem.d.mts +32 -0
  249. package/dist/entries/styleSystem.d.mts.map +1 -0
  250. package/dist/entries/styleSystem.mjs +4 -0
  251. package/dist/entries/styleSystem.mjs.map +1 -0
  252. package/dist/index.cjs +1 -0
  253. package/dist/index.d.cts +34 -0
  254. package/dist/index.d.mts +34 -0
  255. package/dist/index.mjs +1 -0
  256. package/dist/interfaces/compatibility.d.cts +23 -0
  257. package/dist/interfaces/compatibility.d.cts.map +1 -0
  258. package/dist/interfaces/compatibility.d.mts +23 -0
  259. package/dist/interfaces/compatibility.d.mts.map +1 -0
  260. package/dist/interfaces/harness.d.cts +83 -0
  261. package/dist/interfaces/harness.d.cts.map +1 -0
  262. package/dist/interfaces/harness.d.mts +83 -0
  263. package/dist/interfaces/harness.d.mts.map +1 -0
  264. package/dist/logSinkTelemetry.cjs +2 -0
  265. package/dist/logSinkTelemetry.cjs.map +1 -0
  266. package/dist/logSinkTelemetry.d.cts +49 -0
  267. package/dist/logSinkTelemetry.d.cts.map +1 -0
  268. package/dist/logSinkTelemetry.d.mts +49 -0
  269. package/dist/logSinkTelemetry.d.mts.map +1 -0
  270. package/dist/logSinkTelemetry.mjs +2 -0
  271. package/dist/logSinkTelemetry.mjs.map +1 -0
  272. package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.cjs +2 -0
  273. package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.cjs.map +1 -0
  274. package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.mjs +2 -0
  275. package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.mjs.map +1 -0
  276. package/dist/services/compatibility/antigravity.cjs +2 -0
  277. package/dist/services/compatibility/antigravity.cjs.map +1 -0
  278. package/dist/services/compatibility/antigravity.d.cts +11 -0
  279. package/dist/services/compatibility/antigravity.d.cts.map +1 -0
  280. package/dist/services/compatibility/antigravity.d.mts +11 -0
  281. package/dist/services/compatibility/antigravity.d.mts.map +1 -0
  282. package/dist/services/compatibility/antigravity.mjs +2 -0
  283. package/dist/services/compatibility/antigravity.mjs.map +1 -0
  284. package/dist/services/compatibility/codex.cjs +2 -0
  285. package/dist/services/compatibility/codex.cjs.map +1 -0
  286. package/dist/services/compatibility/codex.d.cts +19 -0
  287. package/dist/services/compatibility/codex.d.cts.map +1 -0
  288. package/dist/services/compatibility/codex.d.mts +19 -0
  289. package/dist/services/compatibility/codex.d.mts.map +1 -0
  290. package/dist/services/compatibility/codex.mjs +2 -0
  291. package/dist/services/compatibility/codex.mjs.map +1 -0
  292. package/dist/services/compatibility/index.cjs +2 -0
  293. package/dist/services/compatibility/index.cjs.map +1 -0
  294. package/dist/services/compatibility/index.d.cts +16 -0
  295. package/dist/services/compatibility/index.d.cts.map +1 -0
  296. package/dist/services/compatibility/index.d.mts +16 -0
  297. package/dist/services/compatibility/index.d.mts.map +1 -0
  298. package/dist/services/compatibility/index.mjs +2 -0
  299. package/dist/services/compatibility/index.mjs.map +1 -0
  300. package/dist/services/compatibility/process.cjs +2 -0
  301. package/dist/services/compatibility/process.cjs.map +1 -0
  302. package/dist/services/compatibility/process.d.cts +35 -0
  303. package/dist/services/compatibility/process.d.cts.map +1 -0
  304. package/dist/services/compatibility/process.d.mts +35 -0
  305. package/dist/services/compatibility/process.d.mts.map +1 -0
  306. package/dist/services/compatibility/process.mjs +2 -0
  307. package/dist/services/compatibility/process.mjs.map +1 -0
  308. package/dist/services/compatibility/shared.cjs +2 -0
  309. package/dist/services/compatibility/shared.cjs.map +1 -0
  310. package/dist/services/compatibility/shared.d.cts +33 -0
  311. package/dist/services/compatibility/shared.d.cts.map +1 -0
  312. package/dist/services/compatibility/shared.d.mts +33 -0
  313. package/dist/services/compatibility/shared.d.mts.map +1 -0
  314. package/dist/services/compatibility/shared.mjs +2 -0
  315. package/dist/services/compatibility/shared.mjs.map +1 -0
  316. package/dist/services/compatibilityContext.cjs +2 -0
  317. package/dist/services/compatibilityContext.cjs.map +1 -0
  318. package/dist/services/compatibilityContext.d.cts +23 -0
  319. package/dist/services/compatibilityContext.d.cts.map +1 -0
  320. package/dist/services/compatibilityContext.d.mts +23 -0
  321. package/dist/services/compatibilityContext.d.mts.map +1 -0
  322. package/dist/services/compatibilityContext.mjs +2 -0
  323. package/dist/services/compatibilityContext.mjs.map +1 -0
  324. package/dist/services/composer.cjs +2 -0
  325. package/dist/services/composer.cjs.map +1 -0
  326. package/dist/services/composer.d.cts +133 -0
  327. package/dist/services/composer.d.cts.map +1 -0
  328. package/dist/services/composer.d.mts +133 -0
  329. package/dist/services/composer.d.mts.map +1 -0
  330. package/dist/services/composer.mjs +2 -0
  331. package/dist/services/composer.mjs.map +1 -0
  332. package/dist/services/extensionAssembler.cjs +2 -0
  333. package/dist/services/extensionAssembler.cjs.map +1 -0
  334. package/dist/services/extensionAssembler.d.cts +72 -0
  335. package/dist/services/extensionAssembler.d.cts.map +1 -0
  336. package/dist/services/extensionAssembler.d.mts +72 -0
  337. package/dist/services/extensionAssembler.d.mts.map +1 -0
  338. package/dist/services/extensionAssembler.mjs +2 -0
  339. package/dist/services/extensionAssembler.mjs.map +1 -0
  340. package/dist/services/extensionCompiler.cjs +2 -0
  341. package/dist/services/extensionCompiler.cjs.map +1 -0
  342. package/dist/services/extensionCompiler.mjs +2 -0
  343. package/dist/services/extensionCompiler.mjs.map +1 -0
  344. package/dist/services/harnessContext.cjs +2 -0
  345. package/dist/services/harnessContext.cjs.map +1 -0
  346. package/dist/services/harnessContext.d.cts +61 -0
  347. package/dist/services/harnessContext.d.cts.map +1 -0
  348. package/dist/services/harnessContext.d.mts +61 -0
  349. package/dist/services/harnessContext.d.mts.map +1 -0
  350. package/dist/services/harnessContext.mjs +2 -0
  351. package/dist/services/harnessContext.mjs.map +1 -0
  352. package/dist/services/index.cjs +1 -0
  353. package/dist/services/index.d.cts +14 -0
  354. package/dist/services/index.d.mts +14 -0
  355. package/dist/services/index.mjs +1 -0
  356. package/dist/services/matrixSwitcher.cjs +2 -0
  357. package/dist/services/matrixSwitcher.cjs.map +1 -0
  358. package/dist/services/matrixSwitcher.d.cts +46 -0
  359. package/dist/services/matrixSwitcher.d.cts.map +1 -0
  360. package/dist/services/matrixSwitcher.d.mts +46 -0
  361. package/dist/services/matrixSwitcher.d.mts.map +1 -0
  362. package/dist/services/matrixSwitcher.mjs +2 -0
  363. package/dist/services/matrixSwitcher.mjs.map +1 -0
  364. package/dist/services/mcpFilter.cjs +3 -0
  365. package/dist/services/mcpFilter.cjs.map +1 -0
  366. package/dist/services/mcpFilter.d.cts +40 -0
  367. package/dist/services/mcpFilter.d.cts.map +1 -0
  368. package/dist/services/mcpFilter.d.mts +40 -0
  369. package/dist/services/mcpFilter.d.mts.map +1 -0
  370. package/dist/services/mcpFilter.mjs +3 -0
  371. package/dist/services/mcpFilter.mjs.map +1 -0
  372. package/dist/services/piSettings.cjs +2 -0
  373. package/dist/services/piSettings.cjs.map +1 -0
  374. package/dist/services/piSettings.d.cts +24 -0
  375. package/dist/services/piSettings.d.cts.map +1 -0
  376. package/dist/services/piSettings.d.mts +24 -0
  377. package/dist/services/piSettings.d.mts.map +1 -0
  378. package/dist/services/piSettings.mjs +2 -0
  379. package/dist/services/piSettings.mjs.map +1 -0
  380. package/dist/services/resourceCollector.cjs +3 -0
  381. package/dist/services/resourceCollector.cjs.map +1 -0
  382. package/dist/services/resourceCollector.d.cts +16 -0
  383. package/dist/services/resourceCollector.d.cts.map +1 -0
  384. package/dist/services/resourceCollector.d.mts +16 -0
  385. package/dist/services/resourceCollector.d.mts.map +1 -0
  386. package/dist/services/resourceCollector.mjs +3 -0
  387. package/dist/services/resourceCollector.mjs.map +1 -0
  388. package/dist/services/skillCatalog.cjs +2 -0
  389. package/dist/services/skillCatalog.cjs.map +1 -0
  390. package/dist/services/skillCatalog.d.cts +56 -0
  391. package/dist/services/skillCatalog.d.cts.map +1 -0
  392. package/dist/services/skillCatalog.d.mts +56 -0
  393. package/dist/services/skillCatalog.d.mts.map +1 -0
  394. package/dist/services/skillCatalog.mjs +2 -0
  395. package/dist/services/skillCatalog.mjs.map +1 -0
  396. package/dist/services/skillSources.cjs +2 -0
  397. package/dist/services/skillSources.cjs.map +1 -0
  398. package/dist/services/skillSources.d.cts +24 -0
  399. package/dist/services/skillSources.d.cts.map +1 -0
  400. package/dist/services/skillSources.d.mts +24 -0
  401. package/dist/services/skillSources.d.mts.map +1 -0
  402. package/dist/services/skillSources.mjs +2 -0
  403. package/dist/services/skillSources.mjs.map +1 -0
  404. package/dist/services/syncState.cjs +2 -0
  405. package/dist/services/syncState.cjs.map +1 -0
  406. package/dist/services/syncState.d.cts +130 -0
  407. package/dist/services/syncState.d.cts.map +1 -0
  408. package/dist/services/syncState.d.mts +130 -0
  409. package/dist/services/syncState.d.mts.map +1 -0
  410. package/dist/services/syncState.mjs +2 -0
  411. package/dist/services/syncState.mjs.map +1 -0
  412. package/dist/utils/index.cjs +1 -0
  413. package/dist/utils/index.d.cts +5 -0
  414. package/dist/utils/index.d.mts +5 -0
  415. package/dist/utils/index.mjs +1 -0
  416. package/dist/utils/json.cjs +2 -0
  417. package/dist/utils/json.cjs.map +1 -0
  418. package/dist/utils/json.d.cts +23 -0
  419. package/dist/utils/json.d.cts.map +1 -0
  420. package/dist/utils/json.d.mts +23 -0
  421. package/dist/utils/json.d.mts.map +1 -0
  422. package/dist/utils/json.mjs +2 -0
  423. package/dist/utils/json.mjs.map +1 -0
  424. package/dist/utils/moduleResolution.cjs +2 -0
  425. package/dist/utils/moduleResolution.cjs.map +1 -0
  426. package/dist/utils/moduleResolution.d.cts +56 -0
  427. package/dist/utils/moduleResolution.d.cts.map +1 -0
  428. package/dist/utils/moduleResolution.d.mts +56 -0
  429. package/dist/utils/moduleResolution.d.mts.map +1 -0
  430. package/dist/utils/moduleResolution.mjs +2 -0
  431. package/dist/utils/moduleResolution.mjs.map +1 -0
  432. package/dist/utils/repository.cjs +2 -0
  433. package/dist/utils/repository.cjs.map +1 -0
  434. package/dist/utils/repository.d.cts +21 -0
  435. package/dist/utils/repository.d.cts.map +1 -0
  436. package/dist/utils/repository.d.mts +21 -0
  437. package/dist/utils/repository.d.mts.map +1 -0
  438. package/dist/utils/repository.mjs +2 -0
  439. package/dist/utils/repository.mjs.map +1 -0
  440. package/dist/utils/toolNames.cjs +2 -0
  441. package/dist/utils/toolNames.cjs.map +1 -0
  442. package/dist/utils/toolNames.d.cts +25 -0
  443. package/dist/utils/toolNames.d.cts.map +1 -0
  444. package/dist/utils/toolNames.d.mts +25 -0
  445. package/dist/utils/toolNames.d.mts.map +1 -0
  446. package/dist/utils/toolNames.mjs +2 -0
  447. package/dist/utils/toolNames.mjs.map +1 -0
  448. package/package.json +369 -0
@@ -0,0 +1,50 @@
1
+ import { HarnessOptions } from "../interfaces/harness.cjs";
2
+ import { HarnessTelemetry } from "../logSinkTelemetry.cjs";
3
+ import { BaseCommand } from "../commands/baseCommand.cjs";
4
+ //#region src/cli/cliApp.d.ts
5
+ /**
6
+ * Main CLI Application
7
+ *
8
+ * Owns command registration and dispatch. Preparation is shared: the context
9
+ * is built once and handed to whichever command claims the run.
10
+ */
11
+ declare class CliApp {
12
+ private readonly commands;
13
+ private readonly compatibilityCommand;
14
+ private readonly initCommand;
15
+ private readonly syncCommand;
16
+ private readonly telemetry;
17
+ constructor(telemetry?: HarnessTelemetry);
18
+ /**
19
+ * Initialize all available commands.
20
+ *
21
+ * Order matters. The first match wins and LaunchCommand matches everything,
22
+ * so the diagnostic commands have to come before it.
23
+ */
24
+ private initializeCommands;
25
+ /** Picks the command the parsed options select. */
26
+ selectCommand(options: HarnessOptions): BaseCommand;
27
+ /**
28
+ * Builds the context, runs the selected command, and always cleans up.
29
+ *
30
+ * The whole run is one span so the sink shows preparation and the child
31
+ * process as a single timeline: a slow launch is almost always a slow stage
32
+ * inside here, and that is only visible when the stages share a trace.
33
+ */
34
+ runHarness(options: HarnessOptions): Promise<number>;
35
+ /** Entry point for raw process arguments. */
36
+ run(args: string[]): Promise<number>;
37
+ }
38
+ /**
39
+ * Convenience wrapper kept so the binary and tests need no CliApp knowledge.
40
+ *
41
+ * Telemetry is shut down here rather than inside runHarness, because this is
42
+ * the only scope that owns the process: flushing earlier would drop the records
43
+ * a later command still emits.
44
+ */
45
+ declare function runCli(args: string[]): Promise<number>;
46
+ /** Runs an already-resolved option set, skipping argument parsing. */
47
+ declare function runHarness(options: HarnessOptions): Promise<number>;
48
+ //#endregion
49
+ export { CliApp, runCli, runHarness };
50
+ //# sourceMappingURL=cliApp.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliApp.d.cts","names":[],"sources":["../../src/cli/cliApp.ts"],"mappings":";;;;;;;AA6BA;;;cAAa,MAAA;EAAA,iBACM,QAAA;EAAA,iBACA,oBAAA;EAAA,iBACA,WAAA;EAAA,iBACA,WAAA;EAAA,iBACA,SAAA;cAKL,SAAA,GAAW,gBAAA;EA+DW;;;;;;EAAA,QAjD1B,kBAAA;EAde;EAqBvB,aAAA,CAAc,OAAA,EAAS,cAAA,GAAiB,WAAA;EAPhC;;;;;;;EAoBF,UAAA,CAAW,OAAA,EAAS,cAAA,GAAiB,OAAA;EAAA;EA6BrC,GAAA,CAAI,IAAA,aAAiB,OAAA;AAAA;;;;AA+B7B;;;;iBAAsB,MAAA,CAAO,IAAA,aAAiB,OAAA;AAU9C;AAAA,iBAAsB,UAAA,CAAW,OAAA,EAAS,cAAA,GAAiB,OAAA"}
@@ -0,0 +1,50 @@
1
+ import { HarnessOptions } from "../interfaces/harness.mjs";
2
+ import { HarnessTelemetry } from "../logSinkTelemetry.mjs";
3
+ import { BaseCommand } from "../commands/baseCommand.mjs";
4
+ //#region src/cli/cliApp.d.ts
5
+ /**
6
+ * Main CLI Application
7
+ *
8
+ * Owns command registration and dispatch. Preparation is shared: the context
9
+ * is built once and handed to whichever command claims the run.
10
+ */
11
+ declare class CliApp {
12
+ private readonly commands;
13
+ private readonly compatibilityCommand;
14
+ private readonly initCommand;
15
+ private readonly syncCommand;
16
+ private readonly telemetry;
17
+ constructor(telemetry?: HarnessTelemetry);
18
+ /**
19
+ * Initialize all available commands.
20
+ *
21
+ * Order matters. The first match wins and LaunchCommand matches everything,
22
+ * so the diagnostic commands have to come before it.
23
+ */
24
+ private initializeCommands;
25
+ /** Picks the command the parsed options select. */
26
+ selectCommand(options: HarnessOptions): BaseCommand;
27
+ /**
28
+ * Builds the context, runs the selected command, and always cleans up.
29
+ *
30
+ * The whole run is one span so the sink shows preparation and the child
31
+ * process as a single timeline: a slow launch is almost always a slow stage
32
+ * inside here, and that is only visible when the stages share a trace.
33
+ */
34
+ runHarness(options: HarnessOptions): Promise<number>;
35
+ /** Entry point for raw process arguments. */
36
+ run(args: string[]): Promise<number>;
37
+ }
38
+ /**
39
+ * Convenience wrapper kept so the binary and tests need no CliApp knowledge.
40
+ *
41
+ * Telemetry is shut down here rather than inside runHarness, because this is
42
+ * the only scope that owns the process: flushing earlier would drop the records
43
+ * a later command still emits.
44
+ */
45
+ declare function runCli(args: string[]): Promise<number>;
46
+ /** Runs an already-resolved option set, skipping argument parsing. */
47
+ declare function runHarness(options: HarnessOptions): Promise<number>;
48
+ //#endregion
49
+ export { CliApp, runCli, runHarness };
50
+ //# sourceMappingURL=cliApp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliApp.d.mts","names":[],"sources":["../../src/cli/cliApp.ts"],"mappings":";;;;;;;AA6BA;;;cAAa,MAAA;EAAA,iBACM,QAAA;EAAA,iBACA,oBAAA;EAAA,iBACA,WAAA;EAAA,iBACA,WAAA;EAAA,iBACA,SAAA;cAKL,SAAA,GAAW,gBAAA;EA+DW;;;;;;EAAA,QAjD1B,kBAAA;EAde;EAqBvB,aAAA,CAAc,OAAA,EAAS,cAAA,GAAiB,WAAA;EAPhC;;;;;;;EAoBF,UAAA,CAAW,OAAA,EAAS,cAAA,GAAiB,OAAA;EAAA;EA6BrC,GAAA,CAAI,IAAA,aAAiB,OAAA;AAAA;;;;AA+B7B;;;;iBAAsB,MAAA,CAAO,IAAA,aAAiB,OAAA;AAU9C;AAAA,iBAAsB,UAAA,CAAW,OAAA,EAAS,cAAA,GAAiB,OAAA"}
@@ -0,0 +1,2 @@
1
+ import{HARNESS_EVENT as e,createHarnessTelemetry as t,toFailureReporter as n}from"../logSinkTelemetry.mjs";import{readHarnessState as r}from"../config/harnessState.mjs";import"../config/index.mjs";import{findRepositoryRoot as i}from"../utils/repository.mjs";import"../utils/index.mjs";import{buildHarnessContext as a}from"../services/harnessContext.mjs";import"../services/index.mjs";import{CompatibilityCommand as o}from"../commands/compatibilityCommand.mjs";import{EmitMcpCommand as s}from"../commands/emitMcpCommand.mjs";import{ExplainCommand as c}from"../commands/explainCommand.mjs";import{InitCommand as l}from"../commands/initCommand.mjs";import{LaunchCommand as u}from"../commands/launchCommand.mjs";import{parseHarnessArgs as d}from"./options.mjs";import{SyncCommand as f}from"../commands/syncCommand.mjs";import"../commands/index.mjs";import{HARNESS_VERSION as p,printHelp as m}from"./help.mjs";import h from"node:path";var g=class{commands=[];compatibilityCommand;initCommand;syncCommand;telemetry;constructor(e=t()){this.telemetry=e,this.compatibilityCommand=new o(e),this.initCommand=new l,this.syncCommand=new f,this.initializeCommands()}initializeCommands(){this.commands.push(new s),this.commands.push(new c),this.commands.push(new u)}selectCommand(e){let t=this.commands.find(t=>t.matches(e));if(!t)throw Error(`No command matched the given options`);return t}async runHarness(t){return this.telemetry.runInSpan(`doom_pi.run`,{"harness.major_mode":t.majorMode,"harness.domain_count":t.domains.length,"harness.agents":t.agents,"harness.mcp":t.mcp,"harness.hooks":t.hooks,...t.profile?{"harness.profile":t.profile}:{},...t.preset?{"harness.preset":t.preset}:{}},async()=>{let n=await a(t,this.telemetry),r=this.selectCommand(n.options);try{return await r.execute(n,this.telemetry)}catch(t){throw await this.telemetry.recordError(e.cliFailed,t),t}finally{await n.cleanup()}})}async run(e){if(this.initCommand.matches(e))return this.initCommand.execute(e);if(this.syncCommand.matches(e))return this.syncCommand.execute(e);if(this.compatibilityCommand.matches(e))return this.compatibilityCommand.execute(e);let t=d(e);if(t.help)return m(),0;if(t.version)return process.stdout.write(`${p}\n`),0;let a=r(process.env,n(this.telemetry)).root,o=a?h.resolve(a):i(t.options.cwd);return this.runHarness({repoRoot:o,...t.options})}};async function _(e){let n=t();try{return await new g(n).run(e)}finally{await n.shutdown()}}async function v(e){let n=t();try{return await new g(n).runHarness(e)}finally{await n.shutdown()}}export{g as CliApp,_ as runCli,v as runHarness};
2
+ //# sourceMappingURL=cliApp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliApp.mjs","names":[],"sources":["../../src/cli/cliApp.ts"],"sourcesContent":["import path from 'node:path';\nimport {\n BaseCommand,\n CompatibilityCommand,\n EmitMcpCommand,\n ExplainCommand,\n InitCommand,\n LaunchCommand,\n SyncCommand,\n} from '../commands/index.ts';\nimport { readHarnessState } from '../config/index.ts';\nimport type { HarnessOptions } from '../interfaces/index.ts';\nimport { buildHarnessContext } from '../services/index.ts';\nimport {\n createHarnessTelemetry,\n HARNESS_EVENT,\n toFailureReporter,\n type HarnessTelemetry,\n} from '../logSinkTelemetry.ts';\nimport { findRepositoryRoot } from '../utils/index.ts';\nimport { HARNESS_VERSION, printHelp } from './help.ts';\nimport { parseHarnessArgs } from './options.ts';\n\n/**\n * Main CLI Application\n *\n * Owns command registration and dispatch. Preparation is shared: the context\n * is built once and handed to whichever command claims the run.\n */\nexport class CliApp {\n private readonly commands: BaseCommand[] = [];\n private readonly compatibilityCommand: CompatibilityCommand;\n private readonly initCommand: InitCommand;\n private readonly syncCommand: SyncCommand;\n private readonly telemetry: HarnessTelemetry;\n\n // Fields are declared and assigned explicitly rather than as constructor\n // parameter properties: the launcher scripts run this file straight from\n // source under Node's strip-only TypeScript mode, which rejects them.\n constructor(telemetry: HarnessTelemetry = createHarnessTelemetry()) {\n this.telemetry = telemetry;\n this.compatibilityCommand = new CompatibilityCommand(telemetry);\n this.initCommand = new InitCommand();\n this.syncCommand = new SyncCommand();\n this.initializeCommands();\n }\n\n /**\n * Initialize all available commands.\n *\n * Order matters. The first match wins and LaunchCommand matches everything,\n * so the diagnostic commands have to come before it.\n */\n private initializeCommands(): void {\n this.commands.push(new EmitMcpCommand());\n this.commands.push(new ExplainCommand());\n this.commands.push(new LaunchCommand());\n }\n\n /** Picks the command the parsed options select. */\n selectCommand(options: HarnessOptions): BaseCommand {\n const command = this.commands.find((candidate) => candidate.matches(options));\n if (!command) throw new Error('No command matched the given options');\n return command;\n }\n\n /**\n * Builds the context, runs the selected command, and always cleans up.\n *\n * The whole run is one span so the sink shows preparation and the child\n * process as a single timeline: a slow launch is almost always a slow stage\n * inside here, and that is only visible when the stages share a trace.\n */\n async runHarness(options: HarnessOptions): Promise<number> {\n return this.telemetry.runInSpan(\n 'doom_pi.run',\n {\n 'harness.major_mode': options.majorMode,\n 'harness.domain_count': options.domains.length,\n 'harness.agents': options.agents,\n 'harness.mcp': options.mcp,\n 'harness.hooks': options.hooks,\n ...(options.profile ? { 'harness.profile': options.profile } : {}),\n ...(options.preset ? { 'harness.preset': options.preset } : {}),\n },\n async () => {\n const context = await buildHarnessContext(options, this.telemetry);\n const command = this.selectCommand(context.options);\n try {\n // Selection uses the same resolved options used to build the context.\n return await command.execute(context, this.telemetry);\n } catch (error) {\n await this.telemetry.recordError(HARNESS_EVENT.cliFailed, error);\n throw error;\n } finally {\n await context.cleanup();\n }\n },\n );\n }\n\n /** Entry point for raw process arguments. */\n async run(args: string[]): Promise<number> {\n if (this.initCommand.matches(args)) return this.initCommand.execute(args);\n // Config management rather than a launch: it resolves the matrix and writes\n // it out for plain Pi, so it never builds a launch context of its own.\n if (this.syncCommand.matches(args)) return this.syncCommand.execute(args);\n if (this.compatibilityCommand.matches(args)) return this.compatibilityCommand.execute(args);\n\n const parsed = parseHarnessArgs(args);\n if (parsed.help) {\n printHelp();\n return 0;\n }\n if (parsed.version) {\n process.stdout.write(`${HARNESS_VERSION}\\n`);\n return 0;\n }\n // An inherited root wins, which is how a nested run stays pinned to the\n // outer repository rather than re-deriving one from its own cwd.\n const inheritedRoot = readHarnessState(process.env, toFailureReporter(this.telemetry)).root;\n const repoRoot = inheritedRoot ? path.resolve(inheritedRoot) : findRepositoryRoot(parsed.options.cwd);\n return this.runHarness({ repoRoot, ...parsed.options });\n }\n}\n\n/**\n * Convenience wrapper kept so the binary and tests need no CliApp knowledge.\n *\n * Telemetry is shut down here rather than inside runHarness, because this is\n * the only scope that owns the process: flushing earlier would drop the records\n * a later command still emits.\n */\nexport async function runCli(args: string[]): Promise<number> {\n const telemetry = createHarnessTelemetry();\n try {\n return await new CliApp(telemetry).run(args);\n } finally {\n await telemetry.shutdown();\n }\n}\n\n/** Runs an already-resolved option set, skipping argument parsing. */\nexport async function runHarness(options: HarnessOptions): Promise<number> {\n const telemetry = createHarnessTelemetry();\n try {\n return await new CliApp(telemetry).runHarness(options);\n } finally {\n await telemetry.shutdown();\n }\n}\n"],"mappings":"k6BA6BA,IAAa,EAAb,KAAoB,CAClB,SAA2C,EAAE,CAC7C,qBACA,YACA,YACA,UAKA,YAAY,EAA8B,GAAwB,CAAE,CAClE,KAAK,UAAY,EACjB,KAAK,qBAAuB,IAAI,EAAqB,EAAU,CAC/D,KAAK,YAAc,IAAI,EACvB,KAAK,YAAc,IAAI,EACvB,KAAK,oBAAoB,CAS3B,oBAAmC,CACjC,KAAK,SAAS,KAAK,IAAI,EAAiB,CACxC,KAAK,SAAS,KAAK,IAAI,EAAiB,CACxC,KAAK,SAAS,KAAK,IAAI,EAAgB,CAIzC,cAAc,EAAsC,CAClD,IAAM,EAAU,KAAK,SAAS,KAAM,GAAc,EAAU,QAAQ,EAAQ,CAAC,CAC7E,GAAI,CAAC,EAAS,MAAU,MAAM,uCAAuC,CACrE,OAAO,EAUT,MAAM,WAAW,EAA0C,CACzD,OAAO,KAAK,UAAU,UACpB,cACA,CACE,qBAAsB,EAAQ,UAC9B,uBAAwB,EAAQ,QAAQ,OACxC,iBAAkB,EAAQ,OAC1B,cAAe,EAAQ,IACvB,gBAAiB,EAAQ,MACzB,GAAI,EAAQ,QAAU,CAAE,kBAAmB,EAAQ,QAAS,CAAG,EAAE,CACjE,GAAI,EAAQ,OAAS,CAAE,iBAAkB,EAAQ,OAAQ,CAAG,EAAE,CAC/D,CACD,SAAY,CACV,IAAM,EAAU,MAAM,EAAoB,EAAS,KAAK,UAAU,CAC5D,EAAU,KAAK,cAAc,EAAQ,QAAQ,CACnD,GAAI,CAEF,OAAO,MAAM,EAAQ,QAAQ,EAAS,KAAK,UAAU,OAC9C,EAAO,CAEd,MADA,MAAM,KAAK,UAAU,YAAY,EAAc,UAAW,EAAM,CAC1D,SACE,CACR,MAAM,EAAQ,SAAS,GAG5B,CAIH,MAAM,IAAI,EAAiC,CACzC,GAAI,KAAK,YAAY,QAAQ,EAAK,CAAE,OAAO,KAAK,YAAY,QAAQ,EAAK,CAGzE,GAAI,KAAK,YAAY,QAAQ,EAAK,CAAE,OAAO,KAAK,YAAY,QAAQ,EAAK,CACzE,GAAI,KAAK,qBAAqB,QAAQ,EAAK,CAAE,OAAO,KAAK,qBAAqB,QAAQ,EAAK,CAE3F,IAAM,EAAS,EAAiB,EAAK,CACrC,GAAI,EAAO,KAET,OADA,GAAW,CACJ,EAET,GAAI,EAAO,QAET,OADA,QAAQ,OAAO,MAAM,GAAG,EAAgB,IAAI,CACrC,EAIT,IAAM,EAAgB,EAAiB,QAAQ,IAAK,EAAkB,KAAK,UAAU,CAAC,CAAC,KACjF,EAAW,EAAgB,EAAK,QAAQ,EAAc,CAAG,EAAmB,EAAO,QAAQ,IAAI,CACrG,OAAO,KAAK,WAAW,CAAE,WAAU,GAAG,EAAO,QAAS,CAAC,GAW3D,eAAsB,EAAO,EAAiC,CAC5D,IAAM,EAAY,GAAwB,CAC1C,GAAI,CACF,OAAO,MAAM,IAAI,EAAO,EAAU,CAAC,IAAI,EAAK,QACpC,CACR,MAAM,EAAU,UAAU,EAK9B,eAAsB,EAAW,EAA0C,CACzE,IAAM,EAAY,GAAwB,CAC1C,GAAI,CACF,OAAO,MAAM,IAAI,EAAO,EAAU,CAAC,WAAW,EAAQ,QAC9C,CACR,MAAM,EAAU,UAAU"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./matrixOptions.cjs`),t=new Set([`antigravity`,`claude`,`codex`]);function n(e){if(!e||!t.has(e))throw Error(`compat requires one of: ${[...t].join(`, `)}`);return e}function r(t,n=process.env,r=process.cwd()){let i=e.resolveInheritedProfile(n),a=!1,o=e.resolveInheritedMajorMode(n),s=!1,c=[],l=[];for(let n=0;n<t.length;n+=1){let r=t[n];if(r===`--`){l.push(...t.slice(n+1));break}if(e.matchesOption(r,`--target`))throw Error(`${e.REMOVED_TARGET_OPTION} was replaced by ${e.MAJOR_MODE_OPTION}`);if(e.matchesOption(r,`--layer`))throw Error(`${e.REMOVED_LAYER_OPTION} was replaced by ${e.MAJOR_MODE_OPTION}`);if(e.matchesOption(r,`--layers`))throw Error(`${e.REMOVED_LAYERS_OPTION} was removed; select one major mode with ${e.MAJOR_MODE_OPTION}`);let u=e.readOption(t,n,e.MAJOR_MODE_OPTION);if(u){if(s)throw Error(`${e.MAJOR_MODE_OPTION} can only be provided once`);o=e.parseMajorMode(u.value,e.MAJOR_MODE_OPTION),s=!0,n=u.nextIndex;continue}let d=e.readOption(t,n,e.PROFILE_OPTION);if(d){if(a)throw Error(`${e.PROFILE_OPTION} can only be provided once`);i=e.parseProfileValue(d.value,e.PROFILE_OPTION),a=!0,n=d.nextIndex;continue}let f=e.readOption(t,n,`--domains`)??e.readOption(t,n,`--domain`);if(f){c.push(...e.parseRequiredCsv(f.value,e.matchesOption(r,`--domains`)?e.DOMAINS_OPTION:e.DOMAIN_OPTION)),n=f.nextIndex;continue}l.push(r)}return c.length===0&&c.push(...e.defaultDomainsForMajorMode(o,n)),{options:{currentDirectory:r,profile:i,domains:c,majorMode:o,providerArgs:l,additionalDirectories:[...new Set(e.resolveAdditionalDirectories(n,r))]}}}exports.parseCompatibilityArgs=r,exports.parseCompatibilityProvider=n;
2
+ //# sourceMappingURL=compatibilityOptions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibilityOptions.cjs","names":["resolveInheritedProfile","resolveInheritedMajorMode","matchesOption","REMOVED_TARGET_OPTION","MAJOR_MODE_OPTION","REMOVED_LAYER_OPTION","REMOVED_LAYERS_OPTION","readOption","parseMajorMode","PROFILE_OPTION","parseProfileValue","parseRequiredCsv","DOMAINS_OPTION","DOMAIN_OPTION","defaultDomainsForMajorMode","resolveAdditionalDirectories"],"sources":["../../src/cli/compatibilityOptions.ts"],"sourcesContent":["import type { CompatibilityProvider, ParsedCompatibilityArgs } from '../interfaces/index.ts';\nimport {\n DOMAIN_OPTION,\n DOMAINS_OPTION,\n MAJOR_MODE_OPTION,\n PROFILE_OPTION,\n REMOVED_LAYER_OPTION,\n REMOVED_LAYERS_OPTION,\n REMOVED_TARGET_OPTION,\n defaultDomainsForMajorMode,\n matchesOption,\n parseMajorMode,\n parseProfileValue,\n parseRequiredCsv,\n readOption,\n resolveAdditionalDirectories,\n resolveInheritedMajorMode,\n resolveInheritedProfile,\n} from './matrixOptions.ts';\n\nconst COMPATIBILITY_PROVIDERS = new Set<CompatibilityProvider>(['antigravity', 'claude', 'codex']);\nconst PROVIDER_ARGUMENT_SEPARATOR = '--';\n\nexport function parseCompatibilityProvider(value: string | undefined): CompatibilityProvider {\n if (!value || !COMPATIBILITY_PROVIDERS.has(value as CompatibilityProvider)) {\n throw new Error(`compat requires one of: ${[...COMPATIBILITY_PROVIDERS].join(', ')}`);\n }\n return value as CompatibilityProvider;\n}\n\n/**\n * Parses only the matrix options shared by every frontend.\n *\n * Every other argument remains untouched for the selected provider. In\n * particular, Pi aliases such as --effort and --output-format are not rewritten.\n * Use -- to pass a provider-native --profile, --domain, or --major-mode option.\n */\nexport function parseCompatibilityArgs(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n): ParsedCompatibilityArgs {\n let profile = resolveInheritedProfile(environment);\n let profileProvided = false;\n let majorMode = resolveInheritedMajorMode(environment);\n let majorModeProvided = false;\n const domains: string[] = [];\n const providerArgs: string[] = [];\n\n for (let index = 0; index < args.length; index += 1) {\n const arg = args[index]!;\n if (arg === PROVIDER_ARGUMENT_SEPARATOR) {\n providerArgs.push(...args.slice(index + 1));\n break;\n }\n if (matchesOption(arg, REMOVED_TARGET_OPTION)) {\n throw new Error(`${REMOVED_TARGET_OPTION} was replaced by ${MAJOR_MODE_OPTION}`);\n }\n if (matchesOption(arg, REMOVED_LAYER_OPTION)) {\n throw new Error(`${REMOVED_LAYER_OPTION} was replaced by ${MAJOR_MODE_OPTION}`);\n }\n if (matchesOption(arg, REMOVED_LAYERS_OPTION)) {\n throw new Error(`${REMOVED_LAYERS_OPTION} was removed; select one major mode with ${MAJOR_MODE_OPTION}`);\n }\n\n const majorModeMatch = readOption(args, index, MAJOR_MODE_OPTION);\n if (majorModeMatch) {\n if (majorModeProvided) throw new Error(`${MAJOR_MODE_OPTION} can only be provided once`);\n majorMode = parseMajorMode(majorModeMatch.value, MAJOR_MODE_OPTION);\n majorModeProvided = true;\n index = majorModeMatch.nextIndex;\n continue;\n }\n\n const profileMatch = readOption(args, index, PROFILE_OPTION);\n if (profileMatch) {\n if (profileProvided) throw new Error(`${PROFILE_OPTION} can only be provided once`);\n profile = parseProfileValue(profileMatch.value, PROFILE_OPTION);\n profileProvided = true;\n index = profileMatch.nextIndex;\n continue;\n }\n\n const domainMatch = readOption(args, index, DOMAINS_OPTION) ?? readOption(args, index, DOMAIN_OPTION);\n if (domainMatch) {\n domains.push(\n ...parseRequiredCsv(domainMatch.value, matchesOption(arg, DOMAINS_OPTION) ? DOMAINS_OPTION : DOMAIN_OPTION),\n );\n index = domainMatch.nextIndex;\n continue;\n }\n\n providerArgs.push(arg);\n }\n\n if (domains.length === 0) domains.push(...defaultDomainsForMajorMode(majorMode, environment));\n\n return {\n options: {\n currentDirectory,\n profile,\n domains,\n majorMode,\n providerArgs,\n additionalDirectories: [...new Set(resolveAdditionalDirectories(environment, currentDirectory))],\n },\n };\n}\n"],"mappings":"0GAoBM,EAA0B,IAAI,IAA2B,CAAC,cAAe,SAAU,QAAQ,CAAC,CAGlG,SAAgB,EAA2B,EAAkD,CAC3F,GAAI,CAAC,GAAS,CAAC,EAAwB,IAAI,EAA+B,CACxE,MAAU,MAAM,2BAA2B,CAAC,GAAG,EAAwB,CAAC,KAAK,KAAK,GAAG,CAEvF,OAAO,EAUT,SAAgB,EACd,EACA,EAAiC,QAAQ,IACzC,EAAmB,QAAQ,KAAK,CACP,CACzB,IAAI,EAAUA,EAAAA,wBAAwB,EAAY,CAC9C,EAAkB,GAClB,EAAYC,EAAAA,0BAA0B,EAAY,CAClD,EAAoB,GAClB,EAAoB,EAAE,CACtB,EAAyB,EAAE,CAEjC,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAK,OAAQ,GAAS,EAAG,CACnD,IAAM,EAAM,EAAK,GACjB,GAAI,IAAQ,KAA6B,CACvC,EAAa,KAAK,GAAG,EAAK,MAAM,EAAQ,EAAE,CAAC,CAC3C,MAEF,GAAIC,EAAAA,cAAc,EAAA,WAA2B,CAC3C,MAAU,MAAM,GAAGC,EAAAA,sBAAsB,mBAAmBC,EAAAA,oBAAoB,CAElF,GAAIF,EAAAA,cAAc,EAAA,UAA0B,CAC1C,MAAU,MAAM,GAAGG,EAAAA,qBAAqB,mBAAmBD,EAAAA,oBAAoB,CAEjF,GAAIF,EAAAA,cAAc,EAAA,WAA2B,CAC3C,MAAU,MAAM,GAAGI,EAAAA,sBAAsB,2CAA2CF,EAAAA,oBAAoB,CAG1G,IAAM,EAAiBG,EAAAA,WAAW,EAAM,EAAOH,EAAAA,kBAAkB,CACjE,GAAI,EAAgB,CAClB,GAAI,EAAmB,MAAU,MAAM,GAAGA,EAAAA,kBAAkB,4BAA4B,CACxF,EAAYI,EAAAA,eAAe,EAAe,MAAOJ,EAAAA,kBAAkB,CACnE,EAAoB,GACpB,EAAQ,EAAe,UACvB,SAGF,IAAM,EAAeG,EAAAA,WAAW,EAAM,EAAOE,EAAAA,eAAe,CAC5D,GAAI,EAAc,CAChB,GAAI,EAAiB,MAAU,MAAM,GAAGA,EAAAA,eAAe,4BAA4B,CACnF,EAAUC,EAAAA,kBAAkB,EAAa,MAAOD,EAAAA,eAAe,CAC/D,EAAkB,GAClB,EAAQ,EAAa,UACrB,SAGF,IAAM,EAAcF,EAAAA,WAAW,EAAM,EAAA,YAAsB,EAAIA,EAAAA,WAAW,EAAM,EAAA,WAAqB,CACrG,GAAI,EAAa,CACf,EAAQ,KACN,GAAGI,EAAAA,iBAAiB,EAAY,MAAOT,EAAAA,cAAc,EAAA,YAAoB,CAAGU,EAAAA,eAAiBC,EAAAA,cAAc,CAC5G,CACD,EAAQ,EAAY,UACpB,SAGF,EAAa,KAAK,EAAI,CAKxB,OAFI,EAAQ,SAAW,GAAG,EAAQ,KAAK,GAAGC,EAAAA,2BAA2B,EAAW,EAAY,CAAC,CAEtF,CACL,QAAS,CACP,mBACA,UACA,UACA,YACA,eACA,sBAAuB,CAAC,GAAG,IAAI,IAAIC,EAAAA,6BAA6B,EAAa,EAAiB,CAAC,CAAC,CACjG,CACF"}
@@ -0,0 +1,15 @@
1
+ import { CompatibilityProvider, ParsedCompatibilityArgs } from "../interfaces/compatibility.cjs";
2
+
3
+ //#region src/cli/compatibilityOptions.d.ts
4
+ declare function parseCompatibilityProvider(value: string | undefined): CompatibilityProvider;
5
+ /**
6
+ * Parses only the matrix options shared by every frontend.
7
+ *
8
+ * Every other argument remains untouched for the selected provider. In
9
+ * particular, Pi aliases such as --effort and --output-format are not rewritten.
10
+ * Use -- to pass a provider-native --profile, --domain, or --major-mode option.
11
+ */
12
+ declare function parseCompatibilityArgs(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string): ParsedCompatibilityArgs;
13
+ //#endregion
14
+ export { parseCompatibilityArgs, parseCompatibilityProvider };
15
+ //# sourceMappingURL=compatibilityOptions.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibilityOptions.d.cts","names":[],"sources":["../../src/cli/compatibilityOptions.ts"],"mappings":";;;iBAuBgB,0BAAA,CAA2B,KAAA,uBAA4B,qBAAA;;AAAvE;;;;;AAcA;iBAAgB,sBAAA,CACd,IAAA,YACA,WAAA,GAAa,MAAA,CAAO,UAAA,EACpB,gBAAA,YACC,uBAAA"}
@@ -0,0 +1,15 @@
1
+ import { CompatibilityProvider, ParsedCompatibilityArgs } from "../interfaces/compatibility.mjs";
2
+
3
+ //#region src/cli/compatibilityOptions.d.ts
4
+ declare function parseCompatibilityProvider(value: string | undefined): CompatibilityProvider;
5
+ /**
6
+ * Parses only the matrix options shared by every frontend.
7
+ *
8
+ * Every other argument remains untouched for the selected provider. In
9
+ * particular, Pi aliases such as --effort and --output-format are not rewritten.
10
+ * Use -- to pass a provider-native --profile, --domain, or --major-mode option.
11
+ */
12
+ declare function parseCompatibilityArgs(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string): ParsedCompatibilityArgs;
13
+ //#endregion
14
+ export { parseCompatibilityArgs, parseCompatibilityProvider };
15
+ //# sourceMappingURL=compatibilityOptions.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibilityOptions.d.mts","names":[],"sources":["../../src/cli/compatibilityOptions.ts"],"mappings":";;;iBAuBgB,0BAAA,CAA2B,KAAA,uBAA4B,qBAAA;;AAAvE;;;;;AAcA;iBAAgB,sBAAA,CACd,IAAA,YACA,WAAA,GAAa,MAAA,CAAO,UAAA,EACpB,gBAAA,YACC,uBAAA"}
@@ -0,0 +1,2 @@
1
+ import{DOMAINS_OPTION as e,DOMAIN_OPTION as t,MAJOR_MODE_OPTION as n,PROFILE_OPTION as r,REMOVED_LAYERS_OPTION as i,REMOVED_LAYER_OPTION as a,REMOVED_TARGET_OPTION as o,defaultDomainsForMajorMode as s,matchesOption as c,parseMajorMode as l,parseProfileValue as u,parseRequiredCsv as d,readOption as f,resolveAdditionalDirectories as p,resolveInheritedMajorMode as m,resolveInheritedProfile as h}from"./matrixOptions.mjs";const g=new Set([`antigravity`,`claude`,`codex`]);function _(e){if(!e||!g.has(e))throw Error(`compat requires one of: ${[...g].join(`, `)}`);return e}function v(g,_=process.env,v=process.cwd()){let y=h(_),b=!1,x=m(_),S=!1,C=[],w=[];for(let s=0;s<g.length;s+=1){let p=g[s];if(p===`--`){w.push(...g.slice(s+1));break}if(c(p,`--target`))throw Error(`${o} was replaced by ${n}`);if(c(p,`--layer`))throw Error(`${a} was replaced by ${n}`);if(c(p,`--layers`))throw Error(`${i} was removed; select one major mode with ${n}`);let m=f(g,s,n);if(m){if(S)throw Error(`${n} can only be provided once`);x=l(m.value,n),S=!0,s=m.nextIndex;continue}let h=f(g,s,r);if(h){if(b)throw Error(`${r} can only be provided once`);y=u(h.value,r),b=!0,s=h.nextIndex;continue}let _=f(g,s,`--domains`)??f(g,s,`--domain`);if(_){C.push(...d(_.value,c(p,`--domains`)?e:t)),s=_.nextIndex;continue}w.push(p)}return C.length===0&&C.push(...s(x,_)),{options:{currentDirectory:v,profile:y,domains:C,majorMode:x,providerArgs:w,additionalDirectories:[...new Set(p(_,v))]}}}export{v as parseCompatibilityArgs,_ as parseCompatibilityProvider};
2
+ //# sourceMappingURL=compatibilityOptions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibilityOptions.mjs","names":[],"sources":["../../src/cli/compatibilityOptions.ts"],"sourcesContent":["import type { CompatibilityProvider, ParsedCompatibilityArgs } from '../interfaces/index.ts';\nimport {\n DOMAIN_OPTION,\n DOMAINS_OPTION,\n MAJOR_MODE_OPTION,\n PROFILE_OPTION,\n REMOVED_LAYER_OPTION,\n REMOVED_LAYERS_OPTION,\n REMOVED_TARGET_OPTION,\n defaultDomainsForMajorMode,\n matchesOption,\n parseMajorMode,\n parseProfileValue,\n parseRequiredCsv,\n readOption,\n resolveAdditionalDirectories,\n resolveInheritedMajorMode,\n resolveInheritedProfile,\n} from './matrixOptions.ts';\n\nconst COMPATIBILITY_PROVIDERS = new Set<CompatibilityProvider>(['antigravity', 'claude', 'codex']);\nconst PROVIDER_ARGUMENT_SEPARATOR = '--';\n\nexport function parseCompatibilityProvider(value: string | undefined): CompatibilityProvider {\n if (!value || !COMPATIBILITY_PROVIDERS.has(value as CompatibilityProvider)) {\n throw new Error(`compat requires one of: ${[...COMPATIBILITY_PROVIDERS].join(', ')}`);\n }\n return value as CompatibilityProvider;\n}\n\n/**\n * Parses only the matrix options shared by every frontend.\n *\n * Every other argument remains untouched for the selected provider. In\n * particular, Pi aliases such as --effort and --output-format are not rewritten.\n * Use -- to pass a provider-native --profile, --domain, or --major-mode option.\n */\nexport function parseCompatibilityArgs(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n): ParsedCompatibilityArgs {\n let profile = resolveInheritedProfile(environment);\n let profileProvided = false;\n let majorMode = resolveInheritedMajorMode(environment);\n let majorModeProvided = false;\n const domains: string[] = [];\n const providerArgs: string[] = [];\n\n for (let index = 0; index < args.length; index += 1) {\n const arg = args[index]!;\n if (arg === PROVIDER_ARGUMENT_SEPARATOR) {\n providerArgs.push(...args.slice(index + 1));\n break;\n }\n if (matchesOption(arg, REMOVED_TARGET_OPTION)) {\n throw new Error(`${REMOVED_TARGET_OPTION} was replaced by ${MAJOR_MODE_OPTION}`);\n }\n if (matchesOption(arg, REMOVED_LAYER_OPTION)) {\n throw new Error(`${REMOVED_LAYER_OPTION} was replaced by ${MAJOR_MODE_OPTION}`);\n }\n if (matchesOption(arg, REMOVED_LAYERS_OPTION)) {\n throw new Error(`${REMOVED_LAYERS_OPTION} was removed; select one major mode with ${MAJOR_MODE_OPTION}`);\n }\n\n const majorModeMatch = readOption(args, index, MAJOR_MODE_OPTION);\n if (majorModeMatch) {\n if (majorModeProvided) throw new Error(`${MAJOR_MODE_OPTION} can only be provided once`);\n majorMode = parseMajorMode(majorModeMatch.value, MAJOR_MODE_OPTION);\n majorModeProvided = true;\n index = majorModeMatch.nextIndex;\n continue;\n }\n\n const profileMatch = readOption(args, index, PROFILE_OPTION);\n if (profileMatch) {\n if (profileProvided) throw new Error(`${PROFILE_OPTION} can only be provided once`);\n profile = parseProfileValue(profileMatch.value, PROFILE_OPTION);\n profileProvided = true;\n index = profileMatch.nextIndex;\n continue;\n }\n\n const domainMatch = readOption(args, index, DOMAINS_OPTION) ?? readOption(args, index, DOMAIN_OPTION);\n if (domainMatch) {\n domains.push(\n ...parseRequiredCsv(domainMatch.value, matchesOption(arg, DOMAINS_OPTION) ? DOMAINS_OPTION : DOMAIN_OPTION),\n );\n index = domainMatch.nextIndex;\n continue;\n }\n\n providerArgs.push(arg);\n }\n\n if (domains.length === 0) domains.push(...defaultDomainsForMajorMode(majorMode, environment));\n\n return {\n options: {\n currentDirectory,\n profile,\n domains,\n majorMode,\n providerArgs,\n additionalDirectories: [...new Set(resolveAdditionalDirectories(environment, currentDirectory))],\n },\n };\n}\n"],"mappings":"qaAoBA,MAAM,EAA0B,IAAI,IAA2B,CAAC,cAAe,SAAU,QAAQ,CAAC,CAGlG,SAAgB,EAA2B,EAAkD,CAC3F,GAAI,CAAC,GAAS,CAAC,EAAwB,IAAI,EAA+B,CACxE,MAAU,MAAM,2BAA2B,CAAC,GAAG,EAAwB,CAAC,KAAK,KAAK,GAAG,CAEvF,OAAO,EAUT,SAAgB,EACd,EACA,EAAiC,QAAQ,IACzC,EAAmB,QAAQ,KAAK,CACP,CACzB,IAAI,EAAU,EAAwB,EAAY,CAC9C,EAAkB,GAClB,EAAY,EAA0B,EAAY,CAClD,EAAoB,GAClB,EAAoB,EAAE,CACtB,EAAyB,EAAE,CAEjC,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAK,OAAQ,GAAS,EAAG,CACnD,IAAM,EAAM,EAAK,GACjB,GAAI,IAAQ,KAA6B,CACvC,EAAa,KAAK,GAAG,EAAK,MAAM,EAAQ,EAAE,CAAC,CAC3C,MAEF,GAAI,EAAc,EAAA,WAA2B,CAC3C,MAAU,MAAM,GAAG,EAAsB,mBAAmB,IAAoB,CAElF,GAAI,EAAc,EAAA,UAA0B,CAC1C,MAAU,MAAM,GAAG,EAAqB,mBAAmB,IAAoB,CAEjF,GAAI,EAAc,EAAA,WAA2B,CAC3C,MAAU,MAAM,GAAG,EAAsB,2CAA2C,IAAoB,CAG1G,IAAM,EAAiB,EAAW,EAAM,EAAO,EAAkB,CACjE,GAAI,EAAgB,CAClB,GAAI,EAAmB,MAAU,MAAM,GAAG,EAAkB,4BAA4B,CACxF,EAAY,EAAe,EAAe,MAAO,EAAkB,CACnE,EAAoB,GACpB,EAAQ,EAAe,UACvB,SAGF,IAAM,EAAe,EAAW,EAAM,EAAO,EAAe,CAC5D,GAAI,EAAc,CAChB,GAAI,EAAiB,MAAU,MAAM,GAAG,EAAe,4BAA4B,CACnF,EAAU,EAAkB,EAAa,MAAO,EAAe,CAC/D,EAAkB,GAClB,EAAQ,EAAa,UACrB,SAGF,IAAM,EAAc,EAAW,EAAM,EAAA,YAAsB,EAAI,EAAW,EAAM,EAAA,WAAqB,CACrG,GAAI,EAAa,CACf,EAAQ,KACN,GAAG,EAAiB,EAAY,MAAO,EAAc,EAAA,YAAoB,CAAG,EAAiB,EAAc,CAC5G,CACD,EAAQ,EAAY,UACpB,SAGF,EAAa,KAAK,EAAI,CAKxB,OAFI,EAAQ,SAAW,GAAG,EAAQ,KAAK,GAAG,EAA2B,EAAW,EAAY,CAAC,CAEtF,CACL,QAAS,CACP,mBACA,UACA,UACA,YACA,eACA,sBAAuB,CAAC,GAAG,IAAI,IAAI,EAA6B,EAAa,EAAiB,CAAC,CAAC,CACjG,CACF"}
@@ -0,0 +1,61 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=(0,require(`node:module`).createRequire)(require(`url`).pathToFileURL(__filename).href)(`../../package.json`).version;function t(){process.stdout.write(`doompi
2
+
3
+ Usage: doompi [harness options] [Pi options] [prompt]
4
+ doompi init
5
+ doompi sync [matrix options] [--check]
6
+ doompi compat <codex|claude|antigravity> [matrix options] [provider arguments]
7
+
8
+ Initialization:
9
+ doompi init Fill missing files in ~/.pi/.doom
10
+ doompi sync Resolve the matrix into .pi so plain pi can load it
11
+ doompi sync --check Exit non-zero when the synced config is out of date
12
+
13
+ After a sync, run pi directly. The synced session accepts --major-mode,
14
+ --domains, --profile, and --mute, and /major-mode, /domains, and /profile switch
15
+ without a restart. Selection defaults come from the selection block in
16
+ .doom/config.yaml.
17
+
18
+ Compatibility matrix options:
19
+ --profile <name> Persona and env from .doom/profiles.yaml
20
+ --domains <names> Comma-separated content domains
21
+ --major-mode <name> Named major mode from .doom/modes.yaml
22
+ -- Pass following matrix-named flags to the provider
23
+
24
+ All other compatibility arguments pass to the provider unchanged.
25
+
26
+ Harness options:
27
+ --major-mode <name> Named major mode from .doom/modes.yaml
28
+ (default: copilot). Not --mode: Pi owns that one.
29
+ --profile <name> Persona and env from .doom/profiles.yaml
30
+ --domains <names> Comma-separated domains (content: plugins, skills)
31
+ --no-domains Load no content domains
32
+ --explain Print the resolved matrix and exit
33
+ --emit-mcp <dir> Write the resolved MCP config to a directory and exit
34
+ --plugin-dir <path> Load an explicit plugin directory, repeatable
35
+ --add-dir <path> Add an accessible directory, repeatable
36
+ --preset <name> default, kimi, or ollama
37
+ --cwd <path> Run Pi in this directory
38
+ --automation Use print mode, JSON output, and project approval
39
+ --output-format vibe-lint Read a vibe-lint request from stdin and emit one JSON response
40
+ --mute Disable the notification extension for this run
41
+ --auto-stop Exit interactive Pi when the agent settles
42
+ --allow-protected-writes Allow writes to protected repository paths
43
+ --hooks, --no-hooks Enable or disable repository and plugin hooks
44
+ --mcp, --no-mcp Enable or disable MCP configuration
45
+ --agents, --no-agents Enable or disable spawnable agents
46
+ -h, --help Show harness help
47
+ -v, --version Show harness version
48
+
49
+ Interactive commands:
50
+ /loop Open the loop launcher picker
51
+ /loops List active loops and stop future scheduling
52
+ /workflow [on|off] Toggle workflow tools for the agent
53
+ /effort <level> Set and persist the thinking effort
54
+ /plan [on|off|status] Toggle repository read-only plan mode
55
+ /major-mode Pick a named major mode
56
+ /domains [names] Show the selected domains or pick a different set
57
+ /profile List or switch persona and environment profiles
58
+
59
+ All remaining options are passed to Pi.
60
+ `)}exports.HARNESS_VERSION=e,exports.printHelp=t;
61
+ //# sourceMappingURL=help.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.cjs","names":["require"],"sources":["../../src/cli/help.ts"],"sourcesContent":["import { createRequire } from 'node:module';\n\n// createRequire rather than a JSON import: this file runs both from src under\n// Node's strip-only TypeScript mode (how pi.sh starts it) and from dist, and\n// resolves package.json relative to itself in either case.\nconst require = createRequire(import.meta.url);\n\nexport const HARNESS_VERSION = (require('../../package.json') as { version: string }).version;\n\nexport function printHelp(): void {\n process.stdout.write(`doompi\n\nUsage: doompi [harness options] [Pi options] [prompt]\n doompi init\n doompi sync [matrix options] [--check]\n doompi compat <codex|claude|antigravity> [matrix options] [provider arguments]\n\nInitialization:\n doompi init Fill missing files in ~/.pi/.doom\n doompi sync Resolve the matrix into .pi so plain pi can load it\n doompi sync --check Exit non-zero when the synced config is out of date\n\nAfter a sync, run pi directly. The synced session accepts --major-mode,\n--domains, --profile, and --mute, and /major-mode, /domains, and /profile switch\nwithout a restart. Selection defaults come from the selection block in\n.doom/config.yaml.\n\nCompatibility matrix options:\n --profile <name> Persona and env from .doom/profiles.yaml\n --domains <names> Comma-separated content domains\n --major-mode <name> Named major mode from .doom/modes.yaml\n -- Pass following matrix-named flags to the provider\n\nAll other compatibility arguments pass to the provider unchanged.\n\nHarness options:\n --major-mode <name> Named major mode from .doom/modes.yaml\n (default: copilot). Not --mode: Pi owns that one.\n --profile <name> Persona and env from .doom/profiles.yaml\n --domains <names> Comma-separated domains (content: plugins, skills)\n --no-domains Load no content domains\n --explain Print the resolved matrix and exit\n --emit-mcp <dir> Write the resolved MCP config to a directory and exit\n --plugin-dir <path> Load an explicit plugin directory, repeatable\n --add-dir <path> Add an accessible directory, repeatable\n --preset <name> default, kimi, or ollama\n --cwd <path> Run Pi in this directory\n --automation Use print mode, JSON output, and project approval\n --output-format vibe-lint Read a vibe-lint request from stdin and emit one JSON response\n --mute Disable the notification extension for this run\n --auto-stop Exit interactive Pi when the agent settles\n --allow-protected-writes Allow writes to protected repository paths\n --hooks, --no-hooks Enable or disable repository and plugin hooks\n --mcp, --no-mcp Enable or disable MCP configuration\n --agents, --no-agents Enable or disable spawnable agents\n -h, --help Show harness help\n -v, --version Show harness version\n\nInteractive commands:\n /loop Open the loop launcher picker\n /loops List active loops and stop future scheduling\n /workflow [on|off] Toggle workflow tools for the agent\n /effort <level> Set and persist the thinking effort\n /plan [on|off|status] Toggle repository read-only plan mode\n /major-mode Pick a named major mode\n /domains [names] Show the selected domains or pick a different set\n /profile List or switch persona and environment profiles\n\nAll remaining options are passed to Pi.\n`);\n}\n"],"mappings":"gHAOA,MAAa,GAFPA,wBAAAA,CAAAA,eAAAA,QAAAA,MAAAA,CAAAA,cAAAA,WAAAA,CAAAA,KAE0BA,CAAQ,qBAAqB,CAAyB,QAEtF,SAAgB,GAAkB,CAChC,QAAQ,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DrB"}
@@ -0,0 +1,6 @@
1
+ //#region src/cli/help.d.ts
2
+ declare const HARNESS_VERSION: string;
3
+ declare function printHelp(): void;
4
+ //#endregion
5
+ export { HARNESS_VERSION, printHelp };
6
+ //# sourceMappingURL=help.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.cts","names":[],"sources":["../../src/cli/help.ts"],"mappings":";cAOa,eAAA;AAAA,iBAEG,SAAA,CAAA"}
@@ -0,0 +1,6 @@
1
+ //#region src/cli/help.d.ts
2
+ declare const HARNESS_VERSION: string;
3
+ declare function printHelp(): void;
4
+ //#endregion
5
+ export { HARNESS_VERSION, printHelp };
6
+ //# sourceMappingURL=help.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.mts","names":[],"sources":["../../src/cli/help.ts"],"mappings":";cAOa,eAAA;AAAA,iBAEG,SAAA,CAAA"}
@@ -0,0 +1,61 @@
1
+ import{createRequire as e}from"node:module";const t=e(import.meta.url)(`../../package.json`).version;function n(){process.stdout.write(`doompi
2
+
3
+ Usage: doompi [harness options] [Pi options] [prompt]
4
+ doompi init
5
+ doompi sync [matrix options] [--check]
6
+ doompi compat <codex|claude|antigravity> [matrix options] [provider arguments]
7
+
8
+ Initialization:
9
+ doompi init Fill missing files in ~/.pi/.doom
10
+ doompi sync Resolve the matrix into .pi so plain pi can load it
11
+ doompi sync --check Exit non-zero when the synced config is out of date
12
+
13
+ After a sync, run pi directly. The synced session accepts --major-mode,
14
+ --domains, --profile, and --mute, and /major-mode, /domains, and /profile switch
15
+ without a restart. Selection defaults come from the selection block in
16
+ .doom/config.yaml.
17
+
18
+ Compatibility matrix options:
19
+ --profile <name> Persona and env from .doom/profiles.yaml
20
+ --domains <names> Comma-separated content domains
21
+ --major-mode <name> Named major mode from .doom/modes.yaml
22
+ -- Pass following matrix-named flags to the provider
23
+
24
+ All other compatibility arguments pass to the provider unchanged.
25
+
26
+ Harness options:
27
+ --major-mode <name> Named major mode from .doom/modes.yaml
28
+ (default: copilot). Not --mode: Pi owns that one.
29
+ --profile <name> Persona and env from .doom/profiles.yaml
30
+ --domains <names> Comma-separated domains (content: plugins, skills)
31
+ --no-domains Load no content domains
32
+ --explain Print the resolved matrix and exit
33
+ --emit-mcp <dir> Write the resolved MCP config to a directory and exit
34
+ --plugin-dir <path> Load an explicit plugin directory, repeatable
35
+ --add-dir <path> Add an accessible directory, repeatable
36
+ --preset <name> default, kimi, or ollama
37
+ --cwd <path> Run Pi in this directory
38
+ --automation Use print mode, JSON output, and project approval
39
+ --output-format vibe-lint Read a vibe-lint request from stdin and emit one JSON response
40
+ --mute Disable the notification extension for this run
41
+ --auto-stop Exit interactive Pi when the agent settles
42
+ --allow-protected-writes Allow writes to protected repository paths
43
+ --hooks, --no-hooks Enable or disable repository and plugin hooks
44
+ --mcp, --no-mcp Enable or disable MCP configuration
45
+ --agents, --no-agents Enable or disable spawnable agents
46
+ -h, --help Show harness help
47
+ -v, --version Show harness version
48
+
49
+ Interactive commands:
50
+ /loop Open the loop launcher picker
51
+ /loops List active loops and stop future scheduling
52
+ /workflow [on|off] Toggle workflow tools for the agent
53
+ /effort <level> Set and persist the thinking effort
54
+ /plan [on|off|status] Toggle repository read-only plan mode
55
+ /major-mode Pick a named major mode
56
+ /domains [names] Show the selected domains or pick a different set
57
+ /profile List or switch persona and environment profiles
58
+
59
+ All remaining options are passed to Pi.
60
+ `)}export{t as HARNESS_VERSION,n as printHelp};
61
+ //# sourceMappingURL=help.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.mjs","names":[],"sources":["../../src/cli/help.ts"],"sourcesContent":["import { createRequire } from 'node:module';\n\n// createRequire rather than a JSON import: this file runs both from src under\n// Node's strip-only TypeScript mode (how pi.sh starts it) and from dist, and\n// resolves package.json relative to itself in either case.\nconst require = createRequire(import.meta.url);\n\nexport const HARNESS_VERSION = (require('../../package.json') as { version: string }).version;\n\nexport function printHelp(): void {\n process.stdout.write(`doompi\n\nUsage: doompi [harness options] [Pi options] [prompt]\n doompi init\n doompi sync [matrix options] [--check]\n doompi compat <codex|claude|antigravity> [matrix options] [provider arguments]\n\nInitialization:\n doompi init Fill missing files in ~/.pi/.doom\n doompi sync Resolve the matrix into .pi so plain pi can load it\n doompi sync --check Exit non-zero when the synced config is out of date\n\nAfter a sync, run pi directly. The synced session accepts --major-mode,\n--domains, --profile, and --mute, and /major-mode, /domains, and /profile switch\nwithout a restart. Selection defaults come from the selection block in\n.doom/config.yaml.\n\nCompatibility matrix options:\n --profile <name> Persona and env from .doom/profiles.yaml\n --domains <names> Comma-separated content domains\n --major-mode <name> Named major mode from .doom/modes.yaml\n -- Pass following matrix-named flags to the provider\n\nAll other compatibility arguments pass to the provider unchanged.\n\nHarness options:\n --major-mode <name> Named major mode from .doom/modes.yaml\n (default: copilot). Not --mode: Pi owns that one.\n --profile <name> Persona and env from .doom/profiles.yaml\n --domains <names> Comma-separated domains (content: plugins, skills)\n --no-domains Load no content domains\n --explain Print the resolved matrix and exit\n --emit-mcp <dir> Write the resolved MCP config to a directory and exit\n --plugin-dir <path> Load an explicit plugin directory, repeatable\n --add-dir <path> Add an accessible directory, repeatable\n --preset <name> default, kimi, or ollama\n --cwd <path> Run Pi in this directory\n --automation Use print mode, JSON output, and project approval\n --output-format vibe-lint Read a vibe-lint request from stdin and emit one JSON response\n --mute Disable the notification extension for this run\n --auto-stop Exit interactive Pi when the agent settles\n --allow-protected-writes Allow writes to protected repository paths\n --hooks, --no-hooks Enable or disable repository and plugin hooks\n --mcp, --no-mcp Enable or disable MCP configuration\n --agents, --no-agents Enable or disable spawnable agents\n -h, --help Show harness help\n -v, --version Show harness version\n\nInteractive commands:\n /loop Open the loop launcher picker\n /loops List active loops and stop future scheduling\n /workflow [on|off] Toggle workflow tools for the agent\n /effort <level> Set and persist the thinking effort\n /plan [on|off|status] Toggle repository read-only plan mode\n /major-mode Pick a named major mode\n /domains [names] Show the selected domains or pick a different set\n /profile List or switch persona and environment profiles\n\nAll remaining options are passed to Pi.\n`);\n}\n"],"mappings":"4CAOA,MAAa,EAFG,EAAc,OAAO,KAAK,IAEV,CAAQ,qBAAqB,CAAyB,QAEtF,SAAgB,GAAkB,CAChC,QAAQ,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DrB"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./compatibilityOptions.cjs`),t=require(`./options.cjs`),n=require(`./help.cjs`),r=require(`./cliApp.cjs`);exports.CliApp=r.CliApp,exports.HARNESS_VERSION=n.HARNESS_VERSION,exports.parseCompatibilityArgs=e.parseCompatibilityArgs,exports.parseCompatibilityProvider=e.parseCompatibilityProvider,exports.parseHarnessArgs=t.parseHarnessArgs,exports.printHelp=n.printHelp,exports.runCli=r.runCli,exports.runHarness=r.runHarness;
@@ -0,0 +1,5 @@
1
+ import { CliApp, runCli, runHarness } from "./cliApp.cjs";
2
+ import { parseCompatibilityArgs, parseCompatibilityProvider } from "./compatibilityOptions.cjs";
3
+ import { HARNESS_VERSION, printHelp } from "./help.cjs";
4
+ import { parseHarnessArgs } from "./options.cjs";
5
+ export { CliApp, HARNESS_VERSION, parseCompatibilityArgs, parseCompatibilityProvider, parseHarnessArgs, printHelp, runCli, runHarness };
@@ -0,0 +1,5 @@
1
+ import { CliApp, runCli, runHarness } from "./cliApp.mjs";
2
+ import { parseCompatibilityArgs, parseCompatibilityProvider } from "./compatibilityOptions.mjs";
3
+ import { HARNESS_VERSION, printHelp } from "./help.mjs";
4
+ import { parseHarnessArgs } from "./options.mjs";
5
+ export { CliApp, HARNESS_VERSION, parseCompatibilityArgs, parseCompatibilityProvider, parseHarnessArgs, printHelp, runCli, runHarness };
@@ -0,0 +1 @@
1
+ import{parseCompatibilityArgs as e,parseCompatibilityProvider as t}from"./compatibilityOptions.mjs";import{parseHarnessArgs as n}from"./options.mjs";import{HARNESS_VERSION as r,printHelp as i}from"./help.mjs";import{CliApp as a,runCli as o,runHarness as s}from"./cliApp.mjs";export{a as CliApp,r as HARNESS_VERSION,e as parseCompatibilityArgs,t as parseCompatibilityProvider,n as parseHarnessArgs,i as printHelp,o as runCli,s as runHarness};
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`);let t=require(`node:path`);t=e.__toESM(t,1);const n=`DOOMPI_PROFILE`,r=`DOOMPI_DOMAINS`,i=`DOOMPI_MAJOR_MODE`,a=`DOOMPI_LAYER`,o=`AGENT_HARNESS_`,s=`DOOMPI_`,c=`default`,l=`marketing`;function u(e,t,n){let r=e[t];if(r===n){let r=e[t+1];if(!r||r.startsWith(`--`))throw Error(`${n} requires a value`);return{value:r,nextIndex:t+1,inline:!1}}let i=`${n}=`;if(!r.startsWith(i))return;let a=r.slice(i.length);if(!a)throw Error(`${n} requires a value`);return{value:a,nextIndex:t,inline:!0}}function d(e,t){return e===t||e.startsWith(`${t}=`)}function f(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function p(e,t){let n=f(e);if(n.length===0)throw Error(`${t} requires a value`);return n}function m(e,t){let n=e.trim();if(!n)throw Error(`${t} requires a value`);if(n.includes(`,`))throw Error(`${t} accepts one major mode name`);return n}function h(e,t){if(e.includes(`,`))throw Error(`${t} accepts one profile name`);if(!e.trim())throw Error(`${t} requires a value`);return e}function g(e){let t=Object.keys(e).filter(e=>e.startsWith(o)).sort();if(t.length===0)return;let n=t.map(e=>`${e} -> ${s}${e.slice(14)}`);throw Error(`The ${o}* environment was replaced by ${s}*. Unset or rename: ${n.join(`, `)}`)}function _(e){if(g(e),e.DOOMPI_LAYER)throw Error(`${a} was replaced by ${i}`);return m(e.DOOMPI_MAJOR_MODE||`copilot`,i)}function v(e){let t=e.DOOMPI_PROFILE||void 0;if(t?.includes(`,`))throw Error(`${n} accepts one profile name`);return t}function y(e,t){let n=t[r];return f(n===void 0?e===l?l:c:n)}function b(e,n){return(e.DOOMPI_ADDITIONAL_DIRS??``).split(t.default.delimiter).filter(Boolean).map(e=>t.default.resolve(n,e))}exports.ADD_DIRECTORY_OPTION=`--add-dir`,exports.DEFAULT_DOMAIN=c,exports.DEFAULT_MAJOR_MODE=`copilot`,exports.DOMAINS_OPTION=`--domains`,exports.DOMAIN_OPTION=`--domain`,exports.DOOMPI_ADDITIONAL_DIRECTORIES_ENV=`DOOMPI_ADDITIONAL_DIRS`,exports.DOOMPI_DOMAINS_ENV=r,exports.DOOMPI_MAJOR_MODE_ENV=i,exports.DOOMPI_PRESET_ENV=`DOOMPI_PRESET`,exports.DOOMPI_PROFILE_ENV=n,exports.MAJOR_MODE_OPTION=`--major-mode`,exports.PROFILE_OPTION=`--profile`,exports.REMOVED_DOOMPI_LAYER_ENV=a,exports.REMOVED_LAYERS_OPTION=`--layers`,exports.REMOVED_LAYER_OPTION=`--layer`,exports.REMOVED_TARGET_OPTION=`--target`,exports.assertNoRetiredEnvironment=g,exports.defaultDomainsForMajorMode=y,exports.matchesOption=d,exports.parseCsv=f,exports.parseMajorMode=m,exports.parseProfileValue=h,exports.parseRequiredCsv=p,exports.readOption=u,exports.resolveAdditionalDirectories=b,exports.resolveInheritedMajorMode=_,exports.resolveInheritedProfile=v;
2
+ //# sourceMappingURL=matrixOptions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrixOptions.cjs","names":["path"],"sources":["../../src/cli/matrixOptions.ts"],"sourcesContent":["import path from 'node:path';\n\n/**\n * Matrix selection shared by the Pi and compatibility parsers.\n *\n * Both frontends pick the same three axes (profile, domains, major mode) out of\n * the same environment variables with the same defaults. They used to hold two\n * copies of that logic, and the copies drifted: the inline `--name=value` forms\n * and the strict value reader existed in the compatibility parser only, so\n * `./pi.sh --profile=x` silently forwarded an unknown flag to Pi. One copy here\n * is what keeps them honest.\n */\n\n/**\n * One variable per axis.\n *\n * These used to come in pairs, `DOOM_PI_*` for what the caller selected and\n * `DOOMPI_*` for what the harness resolved and published, with the second\n * outranking the first. A nested run still inherits its launcher's choice under\n * one name, because the launcher projects into the child environment and\n * overwrites the same key. Two names for one value only ever meant two ways to\n * disagree.\n */\nexport const DOOMPI_PROFILE_ENV = 'DOOMPI_PROFILE';\nexport const DOOMPI_DOMAINS_ENV = 'DOOMPI_DOMAINS';\nexport const DOOMPI_MAJOR_MODE_ENV = 'DOOMPI_MAJOR_MODE';\nexport const DOOMPI_ADDITIONAL_DIRECTORIES_ENV = 'DOOMPI_ADDITIONAL_DIRS';\nexport const DOOMPI_PRESET_ENV = 'DOOMPI_PRESET';\n\n/** Removed spelling of the major mode axis, reported rather than honored. */\nexport const REMOVED_DOOMPI_LAYER_ENV = 'DOOMPI_LAYER';\n\n/**\n * The whole retired namespace, reported rather than ignored.\n *\n * A prefix scan rather than a constant per variable: there were 28 of them, and\n * a list maintained by hand is a list that misses one. A stale\n * `export AGENT_HARNESS_MAJOR_MODE=dev` in a shell profile would otherwise\n * silently start the session on `copilot`.\n */\nconst RETIRED_ENV_PREFIX = 'AGENT_HARNESS_';\nconst CURRENT_ENV_PREFIX = 'DOOMPI_';\n\nexport const PROFILE_OPTION = '--profile';\nexport const DOMAIN_OPTION = '--domain';\nexport const DOMAINS_OPTION = '--domains';\n/**\n * The major mode flag.\n *\n * Not `--mode`: Pi owns that one for its output mode, and for a value outside\n * `text|json|rpc` it consumes both tokens and ignores them without a\n * diagnostic. A synced `pi --mode dev` would have failed silently.\n */\nexport const MAJOR_MODE_OPTION = '--major-mode';\nexport const ADD_DIRECTORY_OPTION = '--add-dir';\nexport const REMOVED_LAYER_OPTION = '--layer';\nexport const REMOVED_LAYERS_OPTION = '--layers';\nexport const REMOVED_TARGET_OPTION = '--target';\n\nexport const DEFAULT_MAJOR_MODE = 'copilot';\nexport const DEFAULT_DOMAIN = 'default';\n\nconst MARKETING_MAJOR_MODE = 'marketing';\nconst CSV_DELIMITER = ',';\nconst OPTION_PREFIX = '--';\n\nexport interface OptionMatch {\n value: string;\n /** Index of the last argument consumed, for the caller's loop cursor. */\n nextIndex: number;\n /** True for `--name=value`. Callers that re-emit an option preserve the form. */\n inline: boolean;\n}\n\n/**\n * Reads `--name value` or `--name=value`, returning undefined for anything else.\n *\n * A value starting with `--` is rejected rather than consumed, so\n * `--profile --explain` reports a missing value instead of swallowing the next\n * flag. In compatibility mode this is also what stops the `--` provider\n * delimiter being taken as a matrix value.\n */\nexport function readOption(args: string[], index: number, name: string): OptionMatch | undefined {\n // Callers walk `args` by index, so this is always in range.\n const arg = args[index]!;\n if (arg === name) {\n const value = args[index + 1];\n if (!value || value.startsWith(OPTION_PREFIX)) throw new Error(`${name} requires a value`);\n return { value, nextIndex: index + 1, inline: false };\n }\n const inlinePrefix = `${name}=`;\n if (!arg.startsWith(inlinePrefix)) return undefined;\n const value = arg.slice(inlinePrefix.length);\n if (!value) throw new Error(`${name} requires a value`);\n return { value, nextIndex: index, inline: true };\n}\n\n/** Matches `--name` or `--name=value`, for reporting options that were removed. */\nexport function matchesOption(arg: string, name: string): boolean {\n return arg === name || arg.startsWith(`${name}=`);\n}\n\nexport function parseCsv(value: string): string[] {\n return value\n .split(CSV_DELIMITER)\n .map((item) => item.trim())\n .filter(Boolean);\n}\n\nexport function parseRequiredCsv(value: string, option: string): string[] {\n const values = parseCsv(value);\n if (values.length === 0) throw new Error(`${option} requires a value`);\n return values;\n}\n\nexport function parseMajorMode(value: string, source: string): string {\n const majorMode = value.trim();\n if (!majorMode) throw new Error(`${source} requires a value`);\n if (majorMode.includes(CSV_DELIMITER)) throw new Error(`${source} accepts one major mode name`);\n return majorMode;\n}\n\nexport function parseProfileValue(value: string, source: string): string {\n if (value.includes(CSV_DELIMITER)) throw new Error(`${source} accepts one profile name`);\n if (!value.trim()) throw new Error(`${source} requires a value`);\n return value;\n}\n\n/**\n * Reports any variable left over from the retired `AGENT_HARNESS_*` namespace.\n *\n * Called before anything reads the environment, so a stale export fails the\n * session instead of being quietly outvoted by a default. Both prefixes are\n * built from the constants above rather than written inline, because a\n * search-and-replace over this repository is exactly what retired the old one.\n */\nexport function assertNoRetiredEnvironment(environment: NodeJS.ProcessEnv): void {\n const stale = Object.keys(environment)\n .filter((key) => key.startsWith(RETIRED_ENV_PREFIX))\n .sort();\n if (stale.length === 0) return;\n const replacements = stale.map((key) => `${key} -> ${CURRENT_ENV_PREFIX}${key.slice(RETIRED_ENV_PREFIX.length)}`);\n throw new Error(\n `The ${RETIRED_ENV_PREFIX}* environment was replaced by ${CURRENT_ENV_PREFIX}*. Unset or rename: ${replacements.join(', ')}`,\n );\n}\n\n/**\n * The major mode a nested run inherits from its launcher, or the default.\n *\n * The removed spelling throws rather than being ignored. A stale\n * `export DOOMPI_LAYER=dev` left in a shell profile would otherwise silently\n * select `copilot`, which is the exact confusion the rename removed.\n */\nexport function resolveInheritedMajorMode(environment: NodeJS.ProcessEnv): string {\n assertNoRetiredEnvironment(environment);\n if (environment[REMOVED_DOOMPI_LAYER_ENV]) {\n throw new Error(`${REMOVED_DOOMPI_LAYER_ENV} was replaced by ${DOOMPI_MAJOR_MODE_ENV}`);\n }\n const inherited = environment[DOOMPI_MAJOR_MODE_ENV] || DEFAULT_MAJOR_MODE;\n return parseMajorMode(inherited, DOOMPI_MAJOR_MODE_ENV);\n}\n\n/** The profile a run inherits from its environment, validated once up front. */\nexport function resolveInheritedProfile(environment: NodeJS.ProcessEnv): string | undefined {\n const inherited = environment[DOOMPI_PROFILE_ENV] || undefined;\n if (inherited?.includes(CSV_DELIMITER)) throw new Error(`${DOOMPI_PROFILE_ENV} accepts one profile name`);\n return inherited;\n}\n\n/**\n * Domains selected when the caller names none.\n *\n * The only point where the major mode axis influences the domain axis. It lives\n * in one function so a new mode with a domain opinion is a single edit rather\n * than a matching change in both parsers.\n */\nexport function defaultDomainsForMajorMode(majorMode: string, environment: NodeJS.ProcessEnv): string[] {\n const configured = environment[DOOMPI_DOMAINS_ENV];\n // An explicitly empty variable means no domains, so this tests for the key\n // rather than for a truthy value.\n if (configured !== undefined) return parseCsv(configured);\n return parseCsv(majorMode === MARKETING_MAJOR_MODE ? MARKETING_MAJOR_MODE : DEFAULT_DOMAIN);\n}\n\n/** Directories inherited from the launcher environment. */\nexport function resolveAdditionalDirectories(environment: NodeJS.ProcessEnv, baseDirectory: string): string[] {\n return (environment[DOOMPI_ADDITIONAL_DIRECTORIES_ENV] ?? '')\n .split(path.delimiter)\n .filter(Boolean)\n .map((directory) => path.resolve(baseDirectory, directory));\n}\n"],"mappings":"oKAuBA,MAAa,EAAqB,iBACrB,EAAqB,iBACrB,EAAwB,oBAKxB,EAA2B,eAUlC,EAAqB,iBACrB,EAAqB,UAmBd,EAAiB,UAExB,EAAuB,YAoB7B,SAAgB,EAAW,EAAgB,EAAe,EAAuC,CAE/F,IAAM,EAAM,EAAK,GACjB,GAAI,IAAQ,EAAM,CAChB,IAAM,EAAQ,EAAK,EAAQ,GAC3B,GAAI,CAAC,GAAS,EAAM,WAAW,KAAc,CAAE,MAAU,MAAM,GAAG,EAAK,mBAAmB,CAC1F,MAAO,CAAE,QAAO,UAAW,EAAQ,EAAG,OAAQ,GAAO,CAEvD,IAAM,EAAe,GAAG,EAAK,GAC7B,GAAI,CAAC,EAAI,WAAW,EAAa,CAAE,OACnC,IAAM,EAAQ,EAAI,MAAM,EAAa,OAAO,CAC5C,GAAI,CAAC,EAAO,MAAU,MAAM,GAAG,EAAK,mBAAmB,CACvD,MAAO,CAAE,QAAO,UAAW,EAAO,OAAQ,GAAM,CAIlD,SAAgB,EAAc,EAAa,EAAuB,CAChE,OAAO,IAAQ,GAAQ,EAAI,WAAW,GAAG,EAAK,GAAG,CAGnD,SAAgB,EAAS,EAAyB,CAChD,OAAO,EACJ,MAAM,IAAc,CACpB,IAAK,GAAS,EAAK,MAAM,CAAC,CAC1B,OAAO,QAAQ,CAGpB,SAAgB,EAAiB,EAAe,EAA0B,CACxE,IAAM,EAAS,EAAS,EAAM,CAC9B,GAAI,EAAO,SAAW,EAAG,MAAU,MAAM,GAAG,EAAO,mBAAmB,CACtE,OAAO,EAGT,SAAgB,EAAe,EAAe,EAAwB,CACpE,IAAM,EAAY,EAAM,MAAM,CAC9B,GAAI,CAAC,EAAW,MAAU,MAAM,GAAG,EAAO,mBAAmB,CAC7D,GAAI,EAAU,SAAS,IAAc,CAAE,MAAU,MAAM,GAAG,EAAO,8BAA8B,CAC/F,OAAO,EAGT,SAAgB,EAAkB,EAAe,EAAwB,CACvE,GAAI,EAAM,SAAS,IAAc,CAAE,MAAU,MAAM,GAAG,EAAO,2BAA2B,CACxF,GAAI,CAAC,EAAM,MAAM,CAAE,MAAU,MAAM,GAAG,EAAO,mBAAmB,CAChE,OAAO,EAWT,SAAgB,EAA2B,EAAsC,CAC/E,IAAM,EAAQ,OAAO,KAAK,EAAY,CACnC,OAAQ,GAAQ,EAAI,WAAW,EAAmB,CAAC,CACnD,MAAM,CACT,GAAI,EAAM,SAAW,EAAG,OACxB,IAAM,EAAe,EAAM,IAAK,GAAQ,GAAG,EAAI,MAAM,IAAqB,EAAI,MAAM,GAA0B,GAAG,CACjH,MAAU,MACR,OAAO,EAAmB,gCAAgC,EAAmB,sBAAsB,EAAa,KAAK,KAAK,GAC3H,CAUH,SAAgB,EAA0B,EAAwC,CAEhF,GADA,EAA2B,EAAY,CACnC,EAAA,aACF,MAAU,MAAM,GAAG,EAAyB,mBAAmB,IAAwB,CAGzF,OAAO,EADW,EAAA,mBAAA,UACe,EAAsB,CAIzD,SAAgB,EAAwB,EAAoD,CAC1F,IAAM,EAAY,EAAA,gBAAmC,IAAA,GACrD,GAAI,GAAW,SAAS,IAAc,CAAE,MAAU,MAAM,GAAG,EAAmB,2BAA2B,CACzG,OAAO,EAUT,SAAgB,EAA2B,EAAmB,EAA0C,CACtG,IAAM,EAAa,EAAY,GAI/B,OAAO,EADH,IAAe,IAAA,GACH,IAAc,EAAuB,EAAuB,EAD9B,EAAW,CAK3D,SAAgB,EAA6B,EAAgC,EAAiC,CAC5G,OAAQ,EAAA,wBAAkD,IACvD,MAAMA,EAAAA,QAAK,UAAU,CACrB,OAAO,QAAQ,CACf,IAAK,GAAcA,EAAAA,QAAK,QAAQ,EAAe,EAAU,CAAC"}
@@ -0,0 +1,99 @@
1
+ //#region src/cli/matrixOptions.d.ts
2
+ /**
3
+ * Matrix selection shared by the Pi and compatibility parsers.
4
+ *
5
+ * Both frontends pick the same three axes (profile, domains, major mode) out of
6
+ * the same environment variables with the same defaults. They used to hold two
7
+ * copies of that logic, and the copies drifted: the inline `--name=value` forms
8
+ * and the strict value reader existed in the compatibility parser only, so
9
+ * `./pi.sh --profile=x` silently forwarded an unknown flag to Pi. One copy here
10
+ * is what keeps them honest.
11
+ */
12
+ /**
13
+ * One variable per axis.
14
+ *
15
+ * These used to come in pairs, `DOOM_PI_*` for what the caller selected and
16
+ * `DOOMPI_*` for what the harness resolved and published, with the second
17
+ * outranking the first. A nested run still inherits its launcher's choice under
18
+ * one name, because the launcher projects into the child environment and
19
+ * overwrites the same key. Two names for one value only ever meant two ways to
20
+ * disagree.
21
+ */
22
+ declare const DOOMPI_PROFILE_ENV = "DOOMPI_PROFILE";
23
+ declare const DOOMPI_DOMAINS_ENV = "DOOMPI_DOMAINS";
24
+ declare const DOOMPI_MAJOR_MODE_ENV = "DOOMPI_MAJOR_MODE";
25
+ declare const DOOMPI_ADDITIONAL_DIRECTORIES_ENV = "DOOMPI_ADDITIONAL_DIRS";
26
+ declare const DOOMPI_PRESET_ENV = "DOOMPI_PRESET";
27
+ /** Removed spelling of the major mode axis, reported rather than honored. */
28
+ declare const REMOVED_DOOMPI_LAYER_ENV = "DOOMPI_LAYER";
29
+ declare const PROFILE_OPTION = "--profile";
30
+ declare const DOMAIN_OPTION = "--domain";
31
+ declare const DOMAINS_OPTION = "--domains";
32
+ /**
33
+ * The major mode flag.
34
+ *
35
+ * Not `--mode`: Pi owns that one for its output mode, and for a value outside
36
+ * `text|json|rpc` it consumes both tokens and ignores them without a
37
+ * diagnostic. A synced `pi --mode dev` would have failed silently.
38
+ */
39
+ declare const MAJOR_MODE_OPTION = "--major-mode";
40
+ declare const ADD_DIRECTORY_OPTION = "--add-dir";
41
+ declare const REMOVED_LAYER_OPTION = "--layer";
42
+ declare const REMOVED_LAYERS_OPTION = "--layers";
43
+ declare const REMOVED_TARGET_OPTION = "--target";
44
+ declare const DEFAULT_MAJOR_MODE = "copilot";
45
+ declare const DEFAULT_DOMAIN = "default";
46
+ interface OptionMatch {
47
+ value: string;
48
+ /** Index of the last argument consumed, for the caller's loop cursor. */
49
+ nextIndex: number;
50
+ /** True for `--name=value`. Callers that re-emit an option preserve the form. */
51
+ inline: boolean;
52
+ }
53
+ /**
54
+ * Reads `--name value` or `--name=value`, returning undefined for anything else.
55
+ *
56
+ * A value starting with `--` is rejected rather than consumed, so
57
+ * `--profile --explain` reports a missing value instead of swallowing the next
58
+ * flag. In compatibility mode this is also what stops the `--` provider
59
+ * delimiter being taken as a matrix value.
60
+ */
61
+ declare function readOption(args: string[], index: number, name: string): OptionMatch | undefined;
62
+ /** Matches `--name` or `--name=value`, for reporting options that were removed. */
63
+ declare function matchesOption(arg: string, name: string): boolean;
64
+ declare function parseCsv(value: string): string[];
65
+ declare function parseRequiredCsv(value: string, option: string): string[];
66
+ declare function parseMajorMode(value: string, source: string): string;
67
+ declare function parseProfileValue(value: string, source: string): string;
68
+ /**
69
+ * Reports any variable left over from the retired `AGENT_HARNESS_*` namespace.
70
+ *
71
+ * Called before anything reads the environment, so a stale export fails the
72
+ * session instead of being quietly outvoted by a default. Both prefixes are
73
+ * built from the constants above rather than written inline, because a
74
+ * search-and-replace over this repository is exactly what retired the old one.
75
+ */
76
+ declare function assertNoRetiredEnvironment(environment: NodeJS.ProcessEnv): void;
77
+ /**
78
+ * The major mode a nested run inherits from its launcher, or the default.
79
+ *
80
+ * The removed spelling throws rather than being ignored. A stale
81
+ * `export DOOMPI_LAYER=dev` left in a shell profile would otherwise silently
82
+ * select `copilot`, which is the exact confusion the rename removed.
83
+ */
84
+ declare function resolveInheritedMajorMode(environment: NodeJS.ProcessEnv): string;
85
+ /** The profile a run inherits from its environment, validated once up front. */
86
+ declare function resolveInheritedProfile(environment: NodeJS.ProcessEnv): string | undefined;
87
+ /**
88
+ * Domains selected when the caller names none.
89
+ *
90
+ * The only point where the major mode axis influences the domain axis. It lives
91
+ * in one function so a new mode with a domain opinion is a single edit rather
92
+ * than a matching change in both parsers.
93
+ */
94
+ declare function defaultDomainsForMajorMode(majorMode: string, environment: NodeJS.ProcessEnv): string[];
95
+ /** Directories inherited from the launcher environment. */
96
+ declare function resolveAdditionalDirectories(environment: NodeJS.ProcessEnv, baseDirectory: string): string[];
97
+ //#endregion
98
+ export { ADD_DIRECTORY_OPTION, DEFAULT_DOMAIN, DEFAULT_MAJOR_MODE, DOMAINS_OPTION, DOMAIN_OPTION, DOOMPI_ADDITIONAL_DIRECTORIES_ENV, DOOMPI_DOMAINS_ENV, DOOMPI_MAJOR_MODE_ENV, DOOMPI_PRESET_ENV, DOOMPI_PROFILE_ENV, MAJOR_MODE_OPTION, OptionMatch, PROFILE_OPTION, REMOVED_DOOMPI_LAYER_ENV, REMOVED_LAYERS_OPTION, REMOVED_LAYER_OPTION, REMOVED_TARGET_OPTION, assertNoRetiredEnvironment, defaultDomainsForMajorMode, matchesOption, parseCsv, parseMajorMode, parseProfileValue, parseRequiredCsv, readOption, resolveAdditionalDirectories, resolveInheritedMajorMode, resolveInheritedProfile };
99
+ //# sourceMappingURL=matrixOptions.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrixOptions.d.cts","names":[],"sources":["../../src/cli/matrixOptions.ts"],"mappings":";;AAuBA;;;;;AACA;;;;;AACA;;;;;AACA;;;;cAHa,kBAAA;AAAA,cACA,kBAAA;AAAA,cACA,qBAAA;AAAA,cACA,iCAAA;AAAA,cACA,iBAAA;;cAGA,wBAAA;AAAA,cAaA,cAAA;AAAA,cACA,aAAA;AAAA,cACA,cAAA;;AAFb;;;;;AACA;cASa,iBAAA;AAAA,cACA,oBAAA;AAAA,cACA,oBAAA;AAAA,cACA,qBAAA;AAAA,cACA,qBAAA;AAAA,cAEA,kBAAA;AAAA,cACA,cAAA;AAAA,UAMI,WAAA;EACf,KAAA;EAdW;EAgBX,SAAA;;EAEA,MAAA;AAAA;AAjBF;;;;;AACA;;;AADA,iBA4BgB,UAAA,CAAW,IAAA,YAAgB,KAAA,UAAe,IAAA,WAAe,WAAA;;iBAgBzD,aAAA,CAAc,GAAA,UAAa,IAAA;AAAA,iBAI3B,QAAA,CAAS,KAAA;AAAA,iBAOT,gBAAA,CAAiB,KAAA,UAAe,MAAA;AAAA,iBAMhC,cAAA,CAAe,KAAA,UAAe,MAAA;AAAA,iBAO9B,iBAAA,CAAkB,KAAA,UAAe,MAAA;AAjEjD;;;;;AAEA;;;AAFA,iBA+EgB,0BAAA,CAA2B,WAAA,EAAa,MAAA,CAAO,UAAA;;AA5E/D;;;;;AAMA;iBAwFgB,yBAAA,CAA0B,WAAA,EAAa,MAAA,CAAO,UAAA;;iBAU9C,uBAAA,CAAwB,WAAA,EAAa,MAAA,CAAO,UAAA;;;;;;AAlF5D;;iBA+FgB,0BAAA,CAA2B,SAAA,UAAmB,WAAA,EAAa,MAAA,CAAO,UAAA;;iBASlE,4BAAA,CAA6B,WAAA,EAAa,MAAA,CAAO,UAAA,EAAY,aAAA"}