ostacky 0.5.10 → 0.6.1

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 (911) hide show
  1. package/README.md +20 -19
  2. package/assets/agents/ostacky.md +191 -79
  3. package/assets/commands/install-stack.md +137 -66
  4. package/assets/mcp/openspec/bun.lock +20 -0
  5. package/assets/mcp/openspec/index.js +300 -0
  6. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
  7. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/README.md +40 -0
  8. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts → openspec/node_modules/@modelcontextprotocol/core/dist/auth-B2Q9_Vxp.d.cts} +768 -465
  9. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/auth-B2Q9_Vxp.d.cts.map +1 -0
  10. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs → openspec/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs} +31 -6
  11. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
  12. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts → openspec/node_modules/@modelcontextprotocol/core/dist/auth-CVhIKulL.d.mts} +768 -465
  13. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/auth-CVhIKulL.d.mts.map +1 -0
  14. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs → openspec/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs} +42 -5
  15. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
  16. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
  17. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
  18. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
  19. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
  20. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
  21. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
  22. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
  23. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
  24. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
  25. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
  26. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/core/package.json +85 -0
  27. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
  28. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/README.md +30 -0
  29. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-B_4czhCS.d.cts +1054 -0
  30. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-B_4czhCS.d.cts.map +1 -0
  31. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-BdSo9BII.d.mts +1054 -0
  32. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-BdSo9BII.d.mts.map +1 -0
  33. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-Brn-Q2J_.cjs +7086 -0
  34. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-Brn-Q2J_.cjs.map +1 -0
  35. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CplOkyLC.mjs +7069 -0
  36. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CplOkyLC.mjs.map +1 -0
  37. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BYRW5af5.d.mts +59 -0
  38. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BYRW5af5.d.mts.map +1 -0
  39. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-Bd-iTHAF.mjs +970 -0
  40. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-Bd-iTHAF.mjs.map +1 -0
  41. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-D9GAttn8.d.cts +59 -0
  42. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-D9GAttn8.d.cts.map +1 -0
  43. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-ojcZaap3.cjs +976 -0
  44. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-ojcZaap3.cjs.map +1 -0
  45. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
  46. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
  47. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D93NefGZ.d.mts → openspec/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CEckaSEs.d.mts} +41 -13
  48. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CEckaSEs.d.mts.map +1 -0
  49. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BRM5MGf9.d.cts → openspec/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DzBzpE4_.d.cts} +41 -13
  50. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DzBzpE4_.d.cts.map +1 -0
  51. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.cjs +1999 -0
  52. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
  53. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.d.cts +732 -0
  54. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
  55. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.d.mts +732 -0
  56. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
  57. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.mjs +1814 -0
  58. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
  59. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-CzU40gwu.cjs → openspec/node_modules/@modelcontextprotocol/server/dist/mcp-DM1iHYFo.cjs} +55 -14
  60. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/mcp-DM1iHYFo.cjs.map +1 -0
  61. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-Ctiu4nBa.mjs → openspec/node_modules/@modelcontextprotocol/server/dist/mcp-IJurDZVN.mjs} +50 -15
  62. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/mcp-IJurDZVN.mjs.map +1 -0
  63. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
  64. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
  65. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
  66. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
  67. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
  68. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
  69. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
  70. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
  71. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
  72. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
  73. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
  74. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
  75. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
  76. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
  77. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
  78. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
  79. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
  80. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
  81. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
  82. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
  83. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D9A7ArDn.cjs → openspec/node_modules/@modelcontextprotocol/server/dist/src-BX_fm-dB.cjs} +91 -22
  84. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/src-BX_fm-dB.cjs.map +1 -0
  85. package/assets/mcp/{ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D5Nfqtoz.mjs → openspec/node_modules/@modelcontextprotocol/server/dist/src-D86MbS1I.mjs} +93 -24
  86. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/src-D86MbS1I.mjs.map +1 -0
  87. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
  88. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
  89. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
  90. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
  91. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
  92. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
  93. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
  94. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
  95. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
  96. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
  97. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/types-mS0yxCL0.d.mts +1099 -0
  98. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/types-mS0yxCL0.d.mts.map +1 -0
  99. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
  100. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
  101. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
  102. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
  103. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
  104. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
  105. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
  106. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
  107. package/assets/mcp/openspec/node_modules/@modelcontextprotocol/server/package.json +160 -0
  108. package/assets/mcp/openspec/node_modules/zod/LICENSE +21 -0
  109. package/assets/mcp/openspec/node_modules/zod/README.md +191 -0
  110. package/assets/mcp/openspec/node_modules/zod/index.cjs +33 -0
  111. package/assets/mcp/openspec/node_modules/zod/index.d.cts +4 -0
  112. package/assets/mcp/openspec/node_modules/zod/index.d.ts +4 -0
  113. package/assets/mcp/openspec/node_modules/zod/index.js +4 -0
  114. package/assets/mcp/openspec/node_modules/zod/locales/index.cjs +17 -0
  115. package/assets/mcp/openspec/node_modules/zod/locales/index.d.cts +1 -0
  116. package/assets/mcp/openspec/node_modules/zod/locales/index.d.ts +1 -0
  117. package/assets/mcp/openspec/node_modules/zod/locales/index.js +1 -0
  118. package/assets/mcp/openspec/node_modules/zod/locales/package.json +7 -0
  119. package/assets/mcp/openspec/node_modules/zod/mini/index.cjs +32 -0
  120. package/assets/mcp/openspec/node_modules/zod/mini/index.d.cts +3 -0
  121. package/assets/mcp/openspec/node_modules/zod/mini/index.d.ts +3 -0
  122. package/assets/mcp/openspec/node_modules/zod/mini/index.js +3 -0
  123. package/assets/mcp/openspec/node_modules/zod/mini/package.json +7 -0
  124. package/assets/mcp/openspec/node_modules/zod/package.json +135 -0
  125. package/assets/mcp/openspec/node_modules/zod/src/index.ts +4 -0
  126. package/assets/mcp/openspec/node_modules/zod/src/locales/index.ts +1 -0
  127. package/assets/mcp/openspec/node_modules/zod/src/mini/index.ts +3 -0
  128. package/assets/mcp/openspec/node_modules/zod/src/v3/ZodError.ts +330 -0
  129. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  130. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  131. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  132. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  133. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  134. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  135. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  136. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  137. package/assets/mcp/openspec/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  138. package/assets/mcp/openspec/node_modules/zod/src/v3/errors.ts +13 -0
  139. package/assets/mcp/openspec/node_modules/zod/src/v3/external.ts +6 -0
  140. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  141. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  142. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  143. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  144. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  145. package/assets/mcp/openspec/node_modules/zod/src/v3/helpers/util.ts +224 -0
  146. package/assets/mcp/openspec/node_modules/zod/src/v3/index.ts +4 -0
  147. package/assets/mcp/openspec/node_modules/zod/src/v3/locales/en.ts +124 -0
  148. package/assets/mcp/openspec/node_modules/zod/src/v3/standard-schema.ts +113 -0
  149. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  150. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  151. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  152. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  153. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  154. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  155. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  156. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  157. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  158. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  159. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  160. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  161. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  162. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  163. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  164. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  165. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  166. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  167. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  168. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  169. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  170. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  171. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  172. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  173. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  174. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  175. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  176. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  177. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  178. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  179. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  180. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  181. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  182. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  183. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  184. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  185. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  186. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  187. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  188. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  189. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  190. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  191. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  192. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  193. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  194. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  195. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  196. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  197. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  198. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  199. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  200. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  201. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  202. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  203. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  204. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  205. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  206. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  207. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  208. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  209. package/assets/mcp/openspec/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  210. package/assets/mcp/openspec/node_modules/zod/src/v3/types.ts +5138 -0
  211. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/checks.ts +32 -0
  212. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  213. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/compat.ts +70 -0
  214. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/errors.ts +82 -0
  215. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/external.ts +52 -0
  216. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  217. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/index.ts +5 -0
  218. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/iso.ts +90 -0
  219. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/parse.ts +82 -0
  220. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  221. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  222. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  223. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  224. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  225. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  226. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  227. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  228. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  229. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  230. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  231. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  232. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  233. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  234. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  235. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  236. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  237. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  238. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  239. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  240. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  241. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  242. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  243. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  244. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  245. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  246. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  247. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  248. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  249. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  250. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  251. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  252. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  253. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  254. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  255. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  256. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  257. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  258. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  259. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  260. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  261. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  262. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  263. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  264. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  265. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  266. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  267. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  268. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  269. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  270. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  271. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  272. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  273. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  274. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  275. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  276. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  277. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  278. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  279. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  280. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  281. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  282. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  283. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  284. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  285. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  286. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  287. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  288. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  289. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  290. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  291. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  292. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  293. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  294. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  295. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  296. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  297. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  298. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  299. package/assets/mcp/openspec/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  300. package/assets/mcp/openspec/node_modules/zod/src/v4/core/api.ts +1823 -0
  301. package/assets/mcp/openspec/node_modules/zod/src/v4/core/checks.ts +1293 -0
  302. package/assets/mcp/openspec/node_modules/zod/src/v4/core/config.ts +15 -0
  303. package/assets/mcp/openspec/node_modules/zod/src/v4/core/core.ts +153 -0
  304. package/assets/mcp/openspec/node_modules/zod/src/v4/core/doc.ts +44 -0
  305. package/assets/mcp/openspec/node_modules/zod/src/v4/core/errors.ts +455 -0
  306. package/assets/mcp/openspec/node_modules/zod/src/v4/core/index.ts +16 -0
  307. package/assets/mcp/openspec/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  308. package/assets/mcp/openspec/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  309. package/assets/mcp/openspec/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  310. package/assets/mcp/openspec/node_modules/zod/src/v4/core/parse.ts +195 -0
  311. package/assets/mcp/openspec/node_modules/zod/src/v4/core/regexes.ts +190 -0
  312. package/assets/mcp/openspec/node_modules/zod/src/v4/core/registries.ts +105 -0
  313. package/assets/mcp/openspec/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  314. package/assets/mcp/openspec/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  315. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  316. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  317. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  318. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  319. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  320. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  321. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  322. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  323. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  324. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  325. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  326. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  327. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  328. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  329. package/assets/mcp/openspec/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  330. package/assets/mcp/openspec/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  331. package/assets/mcp/openspec/node_modules/zod/src/v4/core/util.ts +983 -0
  332. package/assets/mcp/openspec/node_modules/zod/src/v4/core/versions.ts +5 -0
  333. package/assets/mcp/openspec/node_modules/zod/src/v4/core/zsf.ts +323 -0
  334. package/assets/mcp/openspec/node_modules/zod/src/v4/index.ts +4 -0
  335. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ar.ts +115 -0
  336. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/az.ts +111 -0
  337. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/be.ts +176 -0
  338. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/bg.ts +128 -0
  339. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ca.ts +116 -0
  340. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/cs.ts +118 -0
  341. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/da.ts +123 -0
  342. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/de.ts +116 -0
  343. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/el.ts +121 -0
  344. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/en.ts +123 -0
  345. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/eo.ts +118 -0
  346. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/es.ts +141 -0
  347. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/fa.ts +126 -0
  348. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/fi.ts +121 -0
  349. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  350. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/fr.ts +132 -0
  351. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/he.ts +246 -0
  352. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/hr.ts +131 -0
  353. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/hu.ts +117 -0
  354. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/hy.ts +164 -0
  355. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/id.ts +115 -0
  356. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/index.ts +52 -0
  357. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/is.ts +119 -0
  358. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/it.ts +116 -0
  359. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ja.ts +114 -0
  360. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ka.ts +123 -0
  361. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/kh.ts +7 -0
  362. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/km.ts +119 -0
  363. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ko.ts +121 -0
  364. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/lt.ts +239 -0
  365. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/mk.ts +118 -0
  366. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ms.ts +115 -0
  367. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/nl.ts +121 -0
  368. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/no.ts +116 -0
  369. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ota.ts +117 -0
  370. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/pl.ts +118 -0
  371. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ps.ts +126 -0
  372. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/pt.ts +116 -0
  373. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ro.ts +129 -0
  374. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ru.ts +176 -0
  375. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/sl.ts +118 -0
  376. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/sv.ts +119 -0
  377. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ta.ts +118 -0
  378. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/th.ts +119 -0
  379. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/tr.ts +111 -0
  380. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ua.ts +7 -0
  381. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/uk.ts +117 -0
  382. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/ur.ts +119 -0
  383. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/uz.ts +117 -0
  384. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/vi.ts +117 -0
  385. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/yo.ts +124 -0
  386. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  387. package/assets/mcp/openspec/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  388. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/checks.ts +32 -0
  389. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  390. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/external.ts +41 -0
  391. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/index.ts +3 -0
  392. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/iso.ts +66 -0
  393. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/parse.ts +14 -0
  394. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  395. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  396. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  397. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  398. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  399. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  400. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  401. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  402. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  403. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  404. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  405. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  406. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  407. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  408. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  409. package/assets/mcp/openspec/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  410. package/assets/mcp/openspec/node_modules/zod/src/v4-mini/index.ts +3 -0
  411. package/assets/mcp/openspec/node_modules/zod/v3/ZodError.cjs +138 -0
  412. package/assets/mcp/openspec/node_modules/zod/v3/ZodError.d.cts +164 -0
  413. package/assets/mcp/openspec/node_modules/zod/v3/ZodError.d.ts +164 -0
  414. package/assets/mcp/openspec/node_modules/zod/v3/ZodError.js +133 -0
  415. package/assets/mcp/openspec/node_modules/zod/v3/errors.cjs +17 -0
  416. package/assets/mcp/openspec/node_modules/zod/v3/errors.d.cts +5 -0
  417. package/assets/mcp/openspec/node_modules/zod/v3/errors.d.ts +5 -0
  418. package/assets/mcp/openspec/node_modules/zod/v3/errors.js +9 -0
  419. package/assets/mcp/openspec/node_modules/zod/v3/external.cjs +22 -0
  420. package/assets/mcp/openspec/node_modules/zod/v3/external.d.cts +6 -0
  421. package/assets/mcp/openspec/node_modules/zod/v3/external.d.ts +6 -0
  422. package/assets/mcp/openspec/node_modules/zod/v3/external.js +6 -0
  423. package/assets/mcp/openspec/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  424. package/assets/mcp/openspec/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  425. package/assets/mcp/openspec/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  426. package/assets/mcp/openspec/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  427. package/assets/mcp/openspec/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  428. package/assets/mcp/openspec/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  429. package/assets/mcp/openspec/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  430. package/assets/mcp/openspec/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  431. package/assets/mcp/openspec/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  432. package/assets/mcp/openspec/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  433. package/assets/mcp/openspec/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  434. package/assets/mcp/openspec/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  435. package/assets/mcp/openspec/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  436. package/assets/mcp/openspec/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  437. package/assets/mcp/openspec/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  438. package/assets/mcp/openspec/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  439. package/assets/mcp/openspec/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  440. package/assets/mcp/openspec/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  441. package/assets/mcp/openspec/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  442. package/assets/mcp/openspec/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  443. package/assets/mcp/openspec/node_modules/zod/v3/helpers/util.cjs +137 -0
  444. package/assets/mcp/openspec/node_modules/zod/v3/helpers/util.d.cts +85 -0
  445. package/assets/mcp/openspec/node_modules/zod/v3/helpers/util.d.ts +85 -0
  446. package/assets/mcp/openspec/node_modules/zod/v3/helpers/util.js +133 -0
  447. package/assets/mcp/openspec/node_modules/zod/v3/index.cjs +33 -0
  448. package/assets/mcp/openspec/node_modules/zod/v3/index.d.cts +4 -0
  449. package/assets/mcp/openspec/node_modules/zod/v3/index.d.ts +4 -0
  450. package/assets/mcp/openspec/node_modules/zod/v3/index.js +4 -0
  451. package/assets/mcp/openspec/node_modules/zod/v3/locales/en.cjs +112 -0
  452. package/assets/mcp/openspec/node_modules/zod/v3/locales/en.d.cts +3 -0
  453. package/assets/mcp/openspec/node_modules/zod/v3/locales/en.d.ts +3 -0
  454. package/assets/mcp/openspec/node_modules/zod/v3/locales/en.js +109 -0
  455. package/assets/mcp/openspec/node_modules/zod/v3/package.json +7 -0
  456. package/assets/mcp/openspec/node_modules/zod/v3/standard-schema.cjs +2 -0
  457. package/assets/mcp/openspec/node_modules/zod/v3/standard-schema.d.cts +102 -0
  458. package/assets/mcp/openspec/node_modules/zod/v3/standard-schema.d.ts +102 -0
  459. package/assets/mcp/openspec/node_modules/zod/v3/standard-schema.js +1 -0
  460. package/assets/mcp/openspec/node_modules/zod/v3/types.cjs +3777 -0
  461. package/assets/mcp/openspec/node_modules/zod/v3/types.d.cts +1034 -0
  462. package/assets/mcp/openspec/node_modules/zod/v3/types.d.ts +1034 -0
  463. package/assets/mcp/openspec/node_modules/zod/v3/types.js +3695 -0
  464. package/assets/mcp/openspec/node_modules/zod/v4/classic/checks.cjs +33 -0
  465. package/assets/mcp/openspec/node_modules/zod/v4/classic/checks.d.cts +1 -0
  466. package/assets/mcp/openspec/node_modules/zod/v4/classic/checks.d.ts +1 -0
  467. package/assets/mcp/openspec/node_modules/zod/v4/classic/checks.js +1 -0
  468. package/assets/mcp/openspec/node_modules/zod/v4/classic/coerce.cjs +47 -0
  469. package/assets/mcp/openspec/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  470. package/assets/mcp/openspec/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  471. package/assets/mcp/openspec/node_modules/zod/v4/classic/coerce.js +17 -0
  472. package/assets/mcp/openspec/node_modules/zod/v4/classic/compat.cjs +61 -0
  473. package/assets/mcp/openspec/node_modules/zod/v4/classic/compat.d.cts +50 -0
  474. package/assets/mcp/openspec/node_modules/zod/v4/classic/compat.d.ts +50 -0
  475. package/assets/mcp/openspec/node_modules/zod/v4/classic/compat.js +31 -0
  476. package/assets/mcp/openspec/node_modules/zod/v4/classic/errors.cjs +74 -0
  477. package/assets/mcp/openspec/node_modules/zod/v4/classic/errors.d.cts +30 -0
  478. package/assets/mcp/openspec/node_modules/zod/v4/classic/errors.d.ts +30 -0
  479. package/assets/mcp/openspec/node_modules/zod/v4/classic/errors.js +48 -0
  480. package/assets/mcp/openspec/node_modules/zod/v4/classic/external.cjs +73 -0
  481. package/assets/mcp/openspec/node_modules/zod/v4/classic/external.d.cts +16 -0
  482. package/assets/mcp/openspec/node_modules/zod/v4/classic/external.d.ts +16 -0
  483. package/assets/mcp/openspec/node_modules/zod/v4/classic/external.js +20 -0
  484. package/assets/mcp/openspec/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  485. package/assets/mcp/openspec/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  486. package/assets/mcp/openspec/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  487. package/assets/mcp/openspec/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  488. package/assets/mcp/openspec/node_modules/zod/v4/classic/index.cjs +33 -0
  489. package/assets/mcp/openspec/node_modules/zod/v4/classic/index.d.cts +4 -0
  490. package/assets/mcp/openspec/node_modules/zod/v4/classic/index.d.ts +4 -0
  491. package/assets/mcp/openspec/node_modules/zod/v4/classic/index.js +4 -0
  492. package/assets/mcp/openspec/node_modules/zod/v4/classic/iso.cjs +60 -0
  493. package/assets/mcp/openspec/node_modules/zod/v4/classic/iso.d.cts +22 -0
  494. package/assets/mcp/openspec/node_modules/zod/v4/classic/iso.d.ts +22 -0
  495. package/assets/mcp/openspec/node_modules/zod/v4/classic/iso.js +30 -0
  496. package/assets/mcp/openspec/node_modules/zod/v4/classic/package.json +7 -0
  497. package/assets/mcp/openspec/node_modules/zod/v4/classic/parse.cjs +41 -0
  498. package/assets/mcp/openspec/node_modules/zod/v4/classic/parse.d.cts +31 -0
  499. package/assets/mcp/openspec/node_modules/zod/v4/classic/parse.d.ts +31 -0
  500. package/assets/mcp/openspec/node_modules/zod/v4/classic/parse.js +15 -0
  501. package/assets/mcp/openspec/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  502. package/assets/mcp/openspec/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  503. package/assets/mcp/openspec/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  504. package/assets/mcp/openspec/node_modules/zod/v4/classic/schemas.js +1395 -0
  505. package/assets/mcp/openspec/node_modules/zod/v4/core/api.cjs +1227 -0
  506. package/assets/mcp/openspec/node_modules/zod/v4/core/api.d.cts +325 -0
  507. package/assets/mcp/openspec/node_modules/zod/v4/core/api.d.ts +325 -0
  508. package/assets/mcp/openspec/node_modules/zod/v4/core/api.js +1087 -0
  509. package/assets/mcp/openspec/node_modules/zod/v4/core/checks.cjs +601 -0
  510. package/assets/mcp/openspec/node_modules/zod/v4/core/checks.d.cts +278 -0
  511. package/assets/mcp/openspec/node_modules/zod/v4/core/checks.d.ts +278 -0
  512. package/assets/mcp/openspec/node_modules/zod/v4/core/checks.js +575 -0
  513. package/assets/mcp/openspec/node_modules/zod/v4/core/core.cjs +85 -0
  514. package/assets/mcp/openspec/node_modules/zod/v4/core/core.d.cts +70 -0
  515. package/assets/mcp/openspec/node_modules/zod/v4/core/core.d.ts +70 -0
  516. package/assets/mcp/openspec/node_modules/zod/v4/core/core.js +78 -0
  517. package/assets/mcp/openspec/node_modules/zod/v4/core/doc.cjs +39 -0
  518. package/assets/mcp/openspec/node_modules/zod/v4/core/doc.d.cts +14 -0
  519. package/assets/mcp/openspec/node_modules/zod/v4/core/doc.d.ts +14 -0
  520. package/assets/mcp/openspec/node_modules/zod/v4/core/doc.js +35 -0
  521. package/assets/mcp/openspec/node_modules/zod/v4/core/errors.cjs +216 -0
  522. package/assets/mcp/openspec/node_modules/zod/v4/core/errors.d.cts +221 -0
  523. package/assets/mcp/openspec/node_modules/zod/v4/core/errors.d.ts +221 -0
  524. package/assets/mcp/openspec/node_modules/zod/v4/core/errors.js +185 -0
  525. package/assets/mcp/openspec/node_modules/zod/v4/core/index.cjs +47 -0
  526. package/assets/mcp/openspec/node_modules/zod/v4/core/index.d.cts +16 -0
  527. package/assets/mcp/openspec/node_modules/zod/v4/core/index.d.ts +16 -0
  528. package/assets/mcp/openspec/node_modules/zod/v4/core/index.js +16 -0
  529. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  530. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  531. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  532. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  533. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  534. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  535. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  536. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  537. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema.cjs +2 -0
  538. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  539. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  540. package/assets/mcp/openspec/node_modules/zod/v4/core/json-schema.js +1 -0
  541. package/assets/mcp/openspec/node_modules/zod/v4/core/package.json +7 -0
  542. package/assets/mcp/openspec/node_modules/zod/v4/core/parse.cjs +131 -0
  543. package/assets/mcp/openspec/node_modules/zod/v4/core/parse.d.cts +49 -0
  544. package/assets/mcp/openspec/node_modules/zod/v4/core/parse.d.ts +49 -0
  545. package/assets/mcp/openspec/node_modules/zod/v4/core/parse.js +93 -0
  546. package/assets/mcp/openspec/node_modules/zod/v4/core/regexes.cjs +172 -0
  547. package/assets/mcp/openspec/node_modules/zod/v4/core/regexes.d.cts +85 -0
  548. package/assets/mcp/openspec/node_modules/zod/v4/core/regexes.d.ts +85 -0
  549. package/assets/mcp/openspec/node_modules/zod/v4/core/regexes.js +139 -0
  550. package/assets/mcp/openspec/node_modules/zod/v4/core/registries.cjs +56 -0
  551. package/assets/mcp/openspec/node_modules/zod/v4/core/registries.d.cts +35 -0
  552. package/assets/mcp/openspec/node_modules/zod/v4/core/registries.d.ts +35 -0
  553. package/assets/mcp/openspec/node_modules/zod/v4/core/registries.js +51 -0
  554. package/assets/mcp/openspec/node_modules/zod/v4/core/schemas.cjs +2270 -0
  555. package/assets/mcp/openspec/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  556. package/assets/mcp/openspec/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  557. package/assets/mcp/openspec/node_modules/zod/v4/core/schemas.js +2239 -0
  558. package/assets/mcp/openspec/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  559. package/assets/mcp/openspec/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  560. package/assets/mcp/openspec/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  561. package/assets/mcp/openspec/node_modules/zod/v4/core/standard-schema.js +1 -0
  562. package/assets/mcp/openspec/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  563. package/assets/mcp/openspec/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  564. package/assets/mcp/openspec/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  565. package/assets/mcp/openspec/node_modules/zod/v4/core/to-json-schema.js +448 -0
  566. package/assets/mcp/openspec/node_modules/zod/v4/core/util.cjs +734 -0
  567. package/assets/mcp/openspec/node_modules/zod/v4/core/util.d.cts +200 -0
  568. package/assets/mcp/openspec/node_modules/zod/v4/core/util.d.ts +200 -0
  569. package/assets/mcp/openspec/node_modules/zod/v4/core/util.js +674 -0
  570. package/assets/mcp/openspec/node_modules/zod/v4/core/versions.cjs +8 -0
  571. package/assets/mcp/openspec/node_modules/zod/v4/core/versions.d.cts +5 -0
  572. package/assets/mcp/openspec/node_modules/zod/v4/core/versions.d.ts +5 -0
  573. package/assets/mcp/openspec/node_modules/zod/v4/core/versions.js +5 -0
  574. package/assets/mcp/openspec/node_modules/zod/v4/index.cjs +22 -0
  575. package/assets/mcp/openspec/node_modules/zod/v4/index.d.cts +3 -0
  576. package/assets/mcp/openspec/node_modules/zod/v4/index.d.ts +3 -0
  577. package/assets/mcp/openspec/node_modules/zod/v4/index.js +3 -0
  578. package/assets/mcp/openspec/node_modules/zod/v4/locales/ar.cjs +133 -0
  579. package/assets/mcp/openspec/node_modules/zod/v4/locales/ar.d.cts +5 -0
  580. package/assets/mcp/openspec/node_modules/zod/v4/locales/ar.d.ts +4 -0
  581. package/assets/mcp/openspec/node_modules/zod/v4/locales/ar.js +106 -0
  582. package/assets/mcp/openspec/node_modules/zod/v4/locales/az.cjs +132 -0
  583. package/assets/mcp/openspec/node_modules/zod/v4/locales/az.d.cts +5 -0
  584. package/assets/mcp/openspec/node_modules/zod/v4/locales/az.d.ts +4 -0
  585. package/assets/mcp/openspec/node_modules/zod/v4/locales/az.js +105 -0
  586. package/assets/mcp/openspec/node_modules/zod/v4/locales/be.cjs +183 -0
  587. package/assets/mcp/openspec/node_modules/zod/v4/locales/be.d.cts +5 -0
  588. package/assets/mcp/openspec/node_modules/zod/v4/locales/be.d.ts +4 -0
  589. package/assets/mcp/openspec/node_modules/zod/v4/locales/be.js +156 -0
  590. package/assets/mcp/openspec/node_modules/zod/v4/locales/bg.cjs +147 -0
  591. package/assets/mcp/openspec/node_modules/zod/v4/locales/bg.d.cts +5 -0
  592. package/assets/mcp/openspec/node_modules/zod/v4/locales/bg.d.ts +4 -0
  593. package/assets/mcp/openspec/node_modules/zod/v4/locales/bg.js +120 -0
  594. package/assets/mcp/openspec/node_modules/zod/v4/locales/ca.cjs +134 -0
  595. package/assets/mcp/openspec/node_modules/zod/v4/locales/ca.d.cts +5 -0
  596. package/assets/mcp/openspec/node_modules/zod/v4/locales/ca.d.ts +4 -0
  597. package/assets/mcp/openspec/node_modules/zod/v4/locales/ca.js +107 -0
  598. package/assets/mcp/openspec/node_modules/zod/v4/locales/cs.cjs +138 -0
  599. package/assets/mcp/openspec/node_modules/zod/v4/locales/cs.d.cts +5 -0
  600. package/assets/mcp/openspec/node_modules/zod/v4/locales/cs.d.ts +4 -0
  601. package/assets/mcp/openspec/node_modules/zod/v4/locales/cs.js +111 -0
  602. package/assets/mcp/openspec/node_modules/zod/v4/locales/da.cjs +142 -0
  603. package/assets/mcp/openspec/node_modules/zod/v4/locales/da.d.cts +5 -0
  604. package/assets/mcp/openspec/node_modules/zod/v4/locales/da.d.ts +4 -0
  605. package/assets/mcp/openspec/node_modules/zod/v4/locales/da.js +115 -0
  606. package/assets/mcp/openspec/node_modules/zod/v4/locales/de.cjs +135 -0
  607. package/assets/mcp/openspec/node_modules/zod/v4/locales/de.d.cts +5 -0
  608. package/assets/mcp/openspec/node_modules/zod/v4/locales/de.d.ts +4 -0
  609. package/assets/mcp/openspec/node_modules/zod/v4/locales/de.js +108 -0
  610. package/assets/mcp/openspec/node_modules/zod/v4/locales/el.cjs +136 -0
  611. package/assets/mcp/openspec/node_modules/zod/v4/locales/el.d.cts +5 -0
  612. package/assets/mcp/openspec/node_modules/zod/v4/locales/el.d.ts +4 -0
  613. package/assets/mcp/openspec/node_modules/zod/v4/locales/el.js +109 -0
  614. package/assets/mcp/openspec/node_modules/zod/v4/locales/en.cjs +140 -0
  615. package/assets/mcp/openspec/node_modules/zod/v4/locales/en.d.cts +5 -0
  616. package/assets/mcp/openspec/node_modules/zod/v4/locales/en.d.ts +4 -0
  617. package/assets/mcp/openspec/node_modules/zod/v4/locales/en.js +113 -0
  618. package/assets/mcp/openspec/node_modules/zod/v4/locales/eo.cjs +136 -0
  619. package/assets/mcp/openspec/node_modules/zod/v4/locales/eo.d.cts +5 -0
  620. package/assets/mcp/openspec/node_modules/zod/v4/locales/eo.d.ts +4 -0
  621. package/assets/mcp/openspec/node_modules/zod/v4/locales/eo.js +109 -0
  622. package/assets/mcp/openspec/node_modules/zod/v4/locales/es.cjs +159 -0
  623. package/assets/mcp/openspec/node_modules/zod/v4/locales/es.d.cts +5 -0
  624. package/assets/mcp/openspec/node_modules/zod/v4/locales/es.d.ts +4 -0
  625. package/assets/mcp/openspec/node_modules/zod/v4/locales/es.js +132 -0
  626. package/assets/mcp/openspec/node_modules/zod/v4/locales/fa.cjs +141 -0
  627. package/assets/mcp/openspec/node_modules/zod/v4/locales/fa.d.cts +5 -0
  628. package/assets/mcp/openspec/node_modules/zod/v4/locales/fa.d.ts +4 -0
  629. package/assets/mcp/openspec/node_modules/zod/v4/locales/fa.js +114 -0
  630. package/assets/mcp/openspec/node_modules/zod/v4/locales/fi.cjs +139 -0
  631. package/assets/mcp/openspec/node_modules/zod/v4/locales/fi.d.cts +5 -0
  632. package/assets/mcp/openspec/node_modules/zod/v4/locales/fi.d.ts +4 -0
  633. package/assets/mcp/openspec/node_modules/zod/v4/locales/fi.js +112 -0
  634. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  635. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  636. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  637. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr-CA.js +107 -0
  638. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr.cjs +152 -0
  639. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr.d.cts +5 -0
  640. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr.d.ts +4 -0
  641. package/assets/mcp/openspec/node_modules/zod/v4/locales/fr.js +125 -0
  642. package/assets/mcp/openspec/node_modules/zod/v4/locales/he.cjs +241 -0
  643. package/assets/mcp/openspec/node_modules/zod/v4/locales/he.d.cts +5 -0
  644. package/assets/mcp/openspec/node_modules/zod/v4/locales/he.d.ts +4 -0
  645. package/assets/mcp/openspec/node_modules/zod/v4/locales/he.js +214 -0
  646. package/assets/mcp/openspec/node_modules/zod/v4/locales/hr.cjs +149 -0
  647. package/assets/mcp/openspec/node_modules/zod/v4/locales/hr.d.cts +5 -0
  648. package/assets/mcp/openspec/node_modules/zod/v4/locales/hr.d.ts +4 -0
  649. package/assets/mcp/openspec/node_modules/zod/v4/locales/hr.js +122 -0
  650. package/assets/mcp/openspec/node_modules/zod/v4/locales/hu.cjs +135 -0
  651. package/assets/mcp/openspec/node_modules/zod/v4/locales/hu.d.cts +5 -0
  652. package/assets/mcp/openspec/node_modules/zod/v4/locales/hu.d.ts +4 -0
  653. package/assets/mcp/openspec/node_modules/zod/v4/locales/hu.js +108 -0
  654. package/assets/mcp/openspec/node_modules/zod/v4/locales/hy.cjs +174 -0
  655. package/assets/mcp/openspec/node_modules/zod/v4/locales/hy.d.cts +5 -0
  656. package/assets/mcp/openspec/node_modules/zod/v4/locales/hy.d.ts +4 -0
  657. package/assets/mcp/openspec/node_modules/zod/v4/locales/hy.js +147 -0
  658. package/assets/mcp/openspec/node_modules/zod/v4/locales/id.cjs +133 -0
  659. package/assets/mcp/openspec/node_modules/zod/v4/locales/id.d.cts +5 -0
  660. package/assets/mcp/openspec/node_modules/zod/v4/locales/id.d.ts +4 -0
  661. package/assets/mcp/openspec/node_modules/zod/v4/locales/id.js +106 -0
  662. package/assets/mcp/openspec/node_modules/zod/v4/locales/index.cjs +111 -0
  663. package/assets/mcp/openspec/node_modules/zod/v4/locales/index.d.cts +52 -0
  664. package/assets/mcp/openspec/node_modules/zod/v4/locales/index.d.ts +52 -0
  665. package/assets/mcp/openspec/node_modules/zod/v4/locales/index.js +52 -0
  666. package/assets/mcp/openspec/node_modules/zod/v4/locales/is.cjs +136 -0
  667. package/assets/mcp/openspec/node_modules/zod/v4/locales/is.d.cts +5 -0
  668. package/assets/mcp/openspec/node_modules/zod/v4/locales/is.d.ts +4 -0
  669. package/assets/mcp/openspec/node_modules/zod/v4/locales/is.js +109 -0
  670. package/assets/mcp/openspec/node_modules/zod/v4/locales/it.cjs +135 -0
  671. package/assets/mcp/openspec/node_modules/zod/v4/locales/it.d.cts +5 -0
  672. package/assets/mcp/openspec/node_modules/zod/v4/locales/it.d.ts +4 -0
  673. package/assets/mcp/openspec/node_modules/zod/v4/locales/it.js +108 -0
  674. package/assets/mcp/openspec/node_modules/zod/v4/locales/ja.cjs +134 -0
  675. package/assets/mcp/openspec/node_modules/zod/v4/locales/ja.d.cts +5 -0
  676. package/assets/mcp/openspec/node_modules/zod/v4/locales/ja.d.ts +4 -0
  677. package/assets/mcp/openspec/node_modules/zod/v4/locales/ja.js +107 -0
  678. package/assets/mcp/openspec/node_modules/zod/v4/locales/ka.cjs +139 -0
  679. package/assets/mcp/openspec/node_modules/zod/v4/locales/ka.d.cts +5 -0
  680. package/assets/mcp/openspec/node_modules/zod/v4/locales/ka.d.ts +4 -0
  681. package/assets/mcp/openspec/node_modules/zod/v4/locales/ka.js +112 -0
  682. package/assets/mcp/openspec/node_modules/zod/v4/locales/kh.cjs +12 -0
  683. package/assets/mcp/openspec/node_modules/zod/v4/locales/kh.d.cts +5 -0
  684. package/assets/mcp/openspec/node_modules/zod/v4/locales/kh.d.ts +5 -0
  685. package/assets/mcp/openspec/node_modules/zod/v4/locales/kh.js +5 -0
  686. package/assets/mcp/openspec/node_modules/zod/v4/locales/km.cjs +137 -0
  687. package/assets/mcp/openspec/node_modules/zod/v4/locales/km.d.cts +5 -0
  688. package/assets/mcp/openspec/node_modules/zod/v4/locales/km.d.ts +4 -0
  689. package/assets/mcp/openspec/node_modules/zod/v4/locales/km.js +110 -0
  690. package/assets/mcp/openspec/node_modules/zod/v4/locales/ko.cjs +138 -0
  691. package/assets/mcp/openspec/node_modules/zod/v4/locales/ko.d.cts +5 -0
  692. package/assets/mcp/openspec/node_modules/zod/v4/locales/ko.d.ts +4 -0
  693. package/assets/mcp/openspec/node_modules/zod/v4/locales/ko.js +111 -0
  694. package/assets/mcp/openspec/node_modules/zod/v4/locales/lt.cjs +230 -0
  695. package/assets/mcp/openspec/node_modules/zod/v4/locales/lt.d.cts +5 -0
  696. package/assets/mcp/openspec/node_modules/zod/v4/locales/lt.d.ts +4 -0
  697. package/assets/mcp/openspec/node_modules/zod/v4/locales/lt.js +203 -0
  698. package/assets/mcp/openspec/node_modules/zod/v4/locales/mk.cjs +136 -0
  699. package/assets/mcp/openspec/node_modules/zod/v4/locales/mk.d.cts +5 -0
  700. package/assets/mcp/openspec/node_modules/zod/v4/locales/mk.d.ts +4 -0
  701. package/assets/mcp/openspec/node_modules/zod/v4/locales/mk.js +109 -0
  702. package/assets/mcp/openspec/node_modules/zod/v4/locales/ms.cjs +134 -0
  703. package/assets/mcp/openspec/node_modules/zod/v4/locales/ms.d.cts +5 -0
  704. package/assets/mcp/openspec/node_modules/zod/v4/locales/ms.d.ts +4 -0
  705. package/assets/mcp/openspec/node_modules/zod/v4/locales/ms.js +107 -0
  706. package/assets/mcp/openspec/node_modules/zod/v4/locales/nl.cjs +137 -0
  707. package/assets/mcp/openspec/node_modules/zod/v4/locales/nl.d.cts +5 -0
  708. package/assets/mcp/openspec/node_modules/zod/v4/locales/nl.d.ts +4 -0
  709. package/assets/mcp/openspec/node_modules/zod/v4/locales/nl.js +110 -0
  710. package/assets/mcp/openspec/node_modules/zod/v4/locales/no.cjs +135 -0
  711. package/assets/mcp/openspec/node_modules/zod/v4/locales/no.d.cts +5 -0
  712. package/assets/mcp/openspec/node_modules/zod/v4/locales/no.d.ts +4 -0
  713. package/assets/mcp/openspec/node_modules/zod/v4/locales/no.js +108 -0
  714. package/assets/mcp/openspec/node_modules/zod/v4/locales/ota.cjs +136 -0
  715. package/assets/mcp/openspec/node_modules/zod/v4/locales/ota.d.cts +5 -0
  716. package/assets/mcp/openspec/node_modules/zod/v4/locales/ota.d.ts +4 -0
  717. package/assets/mcp/openspec/node_modules/zod/v4/locales/ota.js +109 -0
  718. package/assets/mcp/openspec/node_modules/zod/v4/locales/package.json +7 -0
  719. package/assets/mcp/openspec/node_modules/zod/v4/locales/pl.cjs +136 -0
  720. package/assets/mcp/openspec/node_modules/zod/v4/locales/pl.d.cts +5 -0
  721. package/assets/mcp/openspec/node_modules/zod/v4/locales/pl.d.ts +4 -0
  722. package/assets/mcp/openspec/node_modules/zod/v4/locales/pl.js +109 -0
  723. package/assets/mcp/openspec/node_modules/zod/v4/locales/ps.cjs +141 -0
  724. package/assets/mcp/openspec/node_modules/zod/v4/locales/ps.d.cts +5 -0
  725. package/assets/mcp/openspec/node_modules/zod/v4/locales/ps.d.ts +4 -0
  726. package/assets/mcp/openspec/node_modules/zod/v4/locales/ps.js +114 -0
  727. package/assets/mcp/openspec/node_modules/zod/v4/locales/pt.cjs +135 -0
  728. package/assets/mcp/openspec/node_modules/zod/v4/locales/pt.d.cts +5 -0
  729. package/assets/mcp/openspec/node_modules/zod/v4/locales/pt.d.ts +4 -0
  730. package/assets/mcp/openspec/node_modules/zod/v4/locales/pt.js +108 -0
  731. package/assets/mcp/openspec/node_modules/zod/v4/locales/ro.cjs +146 -0
  732. package/assets/mcp/openspec/node_modules/zod/v4/locales/ro.d.cts +5 -0
  733. package/assets/mcp/openspec/node_modules/zod/v4/locales/ro.d.ts +4 -0
  734. package/assets/mcp/openspec/node_modules/zod/v4/locales/ro.js +119 -0
  735. package/assets/mcp/openspec/node_modules/zod/v4/locales/ru.cjs +183 -0
  736. package/assets/mcp/openspec/node_modules/zod/v4/locales/ru.d.cts +5 -0
  737. package/assets/mcp/openspec/node_modules/zod/v4/locales/ru.d.ts +4 -0
  738. package/assets/mcp/openspec/node_modules/zod/v4/locales/ru.js +156 -0
  739. package/assets/mcp/openspec/node_modules/zod/v4/locales/sl.cjs +136 -0
  740. package/assets/mcp/openspec/node_modules/zod/v4/locales/sl.d.cts +5 -0
  741. package/assets/mcp/openspec/node_modules/zod/v4/locales/sl.d.ts +4 -0
  742. package/assets/mcp/openspec/node_modules/zod/v4/locales/sl.js +109 -0
  743. package/assets/mcp/openspec/node_modules/zod/v4/locales/sv.cjs +137 -0
  744. package/assets/mcp/openspec/node_modules/zod/v4/locales/sv.d.cts +5 -0
  745. package/assets/mcp/openspec/node_modules/zod/v4/locales/sv.d.ts +4 -0
  746. package/assets/mcp/openspec/node_modules/zod/v4/locales/sv.js +110 -0
  747. package/assets/mcp/openspec/node_modules/zod/v4/locales/ta.cjs +137 -0
  748. package/assets/mcp/openspec/node_modules/zod/v4/locales/ta.d.cts +5 -0
  749. package/assets/mcp/openspec/node_modules/zod/v4/locales/ta.d.ts +4 -0
  750. package/assets/mcp/openspec/node_modules/zod/v4/locales/ta.js +110 -0
  751. package/assets/mcp/openspec/node_modules/zod/v4/locales/th.cjs +137 -0
  752. package/assets/mcp/openspec/node_modules/zod/v4/locales/th.d.cts +5 -0
  753. package/assets/mcp/openspec/node_modules/zod/v4/locales/th.d.ts +4 -0
  754. package/assets/mcp/openspec/node_modules/zod/v4/locales/th.js +110 -0
  755. package/assets/mcp/openspec/node_modules/zod/v4/locales/tr.cjs +132 -0
  756. package/assets/mcp/openspec/node_modules/zod/v4/locales/tr.d.cts +5 -0
  757. package/assets/mcp/openspec/node_modules/zod/v4/locales/tr.d.ts +4 -0
  758. package/assets/mcp/openspec/node_modules/zod/v4/locales/tr.js +105 -0
  759. package/assets/mcp/openspec/node_modules/zod/v4/locales/ua.cjs +12 -0
  760. package/assets/mcp/openspec/node_modules/zod/v4/locales/ua.d.cts +5 -0
  761. package/assets/mcp/openspec/node_modules/zod/v4/locales/ua.d.ts +5 -0
  762. package/assets/mcp/openspec/node_modules/zod/v4/locales/ua.js +5 -0
  763. package/assets/mcp/openspec/node_modules/zod/v4/locales/uk.cjs +135 -0
  764. package/assets/mcp/openspec/node_modules/zod/v4/locales/uk.d.cts +5 -0
  765. package/assets/mcp/openspec/node_modules/zod/v4/locales/uk.d.ts +4 -0
  766. package/assets/mcp/openspec/node_modules/zod/v4/locales/uk.js +108 -0
  767. package/assets/mcp/openspec/node_modules/zod/v4/locales/ur.cjs +137 -0
  768. package/assets/mcp/openspec/node_modules/zod/v4/locales/ur.d.cts +5 -0
  769. package/assets/mcp/openspec/node_modules/zod/v4/locales/ur.d.ts +4 -0
  770. package/assets/mcp/openspec/node_modules/zod/v4/locales/ur.js +110 -0
  771. package/assets/mcp/openspec/node_modules/zod/v4/locales/uz.cjs +137 -0
  772. package/assets/mcp/openspec/node_modules/zod/v4/locales/uz.d.cts +5 -0
  773. package/assets/mcp/openspec/node_modules/zod/v4/locales/uz.d.ts +4 -0
  774. package/assets/mcp/openspec/node_modules/zod/v4/locales/uz.js +110 -0
  775. package/assets/mcp/openspec/node_modules/zod/v4/locales/vi.cjs +135 -0
  776. package/assets/mcp/openspec/node_modules/zod/v4/locales/vi.d.cts +5 -0
  777. package/assets/mcp/openspec/node_modules/zod/v4/locales/vi.d.ts +4 -0
  778. package/assets/mcp/openspec/node_modules/zod/v4/locales/vi.js +108 -0
  779. package/assets/mcp/openspec/node_modules/zod/v4/locales/yo.cjs +134 -0
  780. package/assets/mcp/openspec/node_modules/zod/v4/locales/yo.d.cts +5 -0
  781. package/assets/mcp/openspec/node_modules/zod/v4/locales/yo.d.ts +4 -0
  782. package/assets/mcp/openspec/node_modules/zod/v4/locales/yo.js +107 -0
  783. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  784. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  785. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  786. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-CN.js +109 -0
  787. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  788. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  789. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  790. package/assets/mcp/openspec/node_modules/zod/v4/locales/zh-TW.js +107 -0
  791. package/assets/mcp/openspec/node_modules/zod/v4/mini/checks.cjs +34 -0
  792. package/assets/mcp/openspec/node_modules/zod/v4/mini/checks.d.cts +1 -0
  793. package/assets/mcp/openspec/node_modules/zod/v4/mini/checks.d.ts +1 -0
  794. package/assets/mcp/openspec/node_modules/zod/v4/mini/checks.js +1 -0
  795. package/assets/mcp/openspec/node_modules/zod/v4/mini/coerce.cjs +52 -0
  796. package/assets/mcp/openspec/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  797. package/assets/mcp/openspec/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  798. package/assets/mcp/openspec/node_modules/zod/v4/mini/coerce.js +22 -0
  799. package/assets/mcp/openspec/node_modules/zod/v4/mini/external.cjs +63 -0
  800. package/assets/mcp/openspec/node_modules/zod/v4/mini/external.d.cts +13 -0
  801. package/assets/mcp/openspec/node_modules/zod/v4/mini/external.d.ts +13 -0
  802. package/assets/mcp/openspec/node_modules/zod/v4/mini/external.js +14 -0
  803. package/assets/mcp/openspec/node_modules/zod/v4/mini/index.cjs +32 -0
  804. package/assets/mcp/openspec/node_modules/zod/v4/mini/index.d.cts +3 -0
  805. package/assets/mcp/openspec/node_modules/zod/v4/mini/index.d.ts +3 -0
  806. package/assets/mcp/openspec/node_modules/zod/v4/mini/index.js +3 -0
  807. package/assets/mcp/openspec/node_modules/zod/v4/mini/iso.cjs +64 -0
  808. package/assets/mcp/openspec/node_modules/zod/v4/mini/iso.d.cts +22 -0
  809. package/assets/mcp/openspec/node_modules/zod/v4/mini/iso.d.ts +22 -0
  810. package/assets/mcp/openspec/node_modules/zod/v4/mini/iso.js +34 -0
  811. package/assets/mcp/openspec/node_modules/zod/v4/mini/package.json +7 -0
  812. package/assets/mcp/openspec/node_modules/zod/v4/mini/parse.cjs +16 -0
  813. package/assets/mcp/openspec/node_modules/zod/v4/mini/parse.d.cts +1 -0
  814. package/assets/mcp/openspec/node_modules/zod/v4/mini/parse.d.ts +1 -0
  815. package/assets/mcp/openspec/node_modules/zod/v4/mini/parse.js +1 -0
  816. package/assets/mcp/openspec/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  817. package/assets/mcp/openspec/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  818. package/assets/mcp/openspec/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  819. package/assets/mcp/openspec/node_modules/zod/v4/mini/schemas.js +961 -0
  820. package/assets/mcp/openspec/node_modules/zod/v4/package.json +7 -0
  821. package/assets/mcp/openspec/node_modules/zod/v4-mini/index.cjs +32 -0
  822. package/assets/mcp/openspec/node_modules/zod/v4-mini/index.d.cts +3 -0
  823. package/assets/mcp/openspec/node_modules/zod/v4-mini/index.d.ts +3 -0
  824. package/assets/mcp/openspec/node_modules/zod/v4-mini/index.js +3 -0
  825. package/assets/mcp/openspec/node_modules/zod/v4-mini/package.json +7 -0
  826. package/assets/mcp/openspec/package.json +10 -0
  827. package/assets/mcp/ostacky-controller/index.js +245 -103
  828. package/assets/mcp/ostacky-controller/node_modules/.package-lock.json +8 -8
  829. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-B2Q9_Vxp.d.cts +8501 -0
  830. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-B2Q9_Vxp.d.cts.map +1 -0
  831. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +1678 -0
  832. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
  833. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CVhIKulL.d.mts +8501 -0
  834. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CVhIKulL.d.mts.map +1 -0
  835. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +2899 -0
  836. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
  837. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.cjs +2 -1
  838. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -2
  839. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -2
  840. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.mjs +2 -2
  841. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.cjs +3 -1
  842. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +14 -2
  843. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -1
  844. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +14 -2
  845. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -1
  846. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.mjs +2 -2
  847. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/package.json +1 -1
  848. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CEckaSEs.d.mts +4041 -0
  849. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CEckaSEs.d.mts.map +1 -0
  850. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DzBzpE4_.d.cts +4043 -0
  851. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DzBzpE4_.d.cts.map +1 -0
  852. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs +12 -3
  853. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -1
  854. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.cts +2 -2
  855. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.mts +2 -2
  856. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs +5 -4
  857. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -1
  858. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-DM1iHYFo.cjs +2004 -0
  859. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-DM1iHYFo.cjs.map +1 -0
  860. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-IJurDZVN.mjs +1919 -0
  861. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-IJurDZVN.mjs.map +1 -0
  862. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +1 -1
  863. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +1 -1
  864. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-BX_fm-dB.cjs +8069 -0
  865. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-BX_fm-dB.cjs.map +1 -0
  866. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D86MbS1I.mjs +7571 -0
  867. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D86MbS1I.mjs.map +1 -0
  868. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +3 -3
  869. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -1
  870. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +1 -1
  871. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +1 -1
  872. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +3 -3
  873. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -1
  874. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/package.json +3 -3
  875. package/assets/mcp/ostacky-controller/package-lock.json +10 -10
  876. package/assets/mcp/ostacky-controller/package.json +2 -2
  877. package/assets/plugins/engram.ts +537 -0
  878. package/assets/skills/{thinking → brainstorming}/SKILL.md +8 -6
  879. package/assets/skills/dispatching-parallel-agents/SKILL.md +7 -7
  880. package/assets/skills/execution-mode-evaluation/SKILL.md +10 -8
  881. package/assets/skills/graceful-degradation/SKILL.md +235 -0
  882. package/assets/skills/openspec-apply-change/SKILL.md +4 -2
  883. package/assets/skills/openspec-archive-change/SKILL.md +4 -4
  884. package/assets/skills/openspec-explore/SKILL.md +288 -0
  885. package/assets/skills/openspec-propose/SKILL.md +7 -5
  886. package/assets/skills/subagent-driven-development/SKILL.md +18 -17
  887. package/assets/skills/tdd/SKILL.md +1 -1
  888. package/assets/skills/using-git-worktrees/SKILL.md +3 -11
  889. package/assets/skills/using-superpowers/SKILL.md +14 -20
  890. package/assets/skills/writing-plans/SKILL.md +5 -3
  891. package/assets/skills/writing-skills/SKILL.md +9 -9
  892. package/dist/cli.js +2397 -1713
  893. package/manifest.json +61 -40
  894. package/package.json +9 -3
  895. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts.map +0 -1
  896. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs.map +0 -1
  897. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts.map +0 -1
  898. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs.map +0 -1
  899. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BRM5MGf9.d.cts.map +0 -1
  900. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D93NefGZ.d.mts.map +0 -1
  901. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-Ctiu4nBa.mjs.map +0 -1
  902. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-CzU40gwu.cjs.map +0 -1
  903. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D5Nfqtoz.mjs.map +0 -1
  904. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D9A7ArDn.cjs.map +0 -1
  905. package/assets/skills/execution-mode-evaluation/README.md +0 -257
  906. package/assets/tests/agent-contract.test.js +0 -227
  907. package/assets/tests/controller.test.js +0 -187
  908. package/assets/tests/e2e-scenarios.md +0 -502
  909. package/assets/tests/validate-config.sh +0 -272
  910. package/dist/mcp/ask-user-server/index.js +0 -19657
  911. package/dist/mcp/ostacky-controller/index.js +0 -20187
package/dist/cli.js CHANGED
@@ -30,6 +30,20 @@ var __toESM = (mod, isNodeMode, target) => {
30
30
  return to;
31
31
  };
32
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, {
40
+ get: all[name],
41
+ enumerable: true,
42
+ configurable: true,
43
+ set: __exportSetter.bind(all, name)
44
+ });
45
+ };
46
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
33
47
 
34
48
  // node_modules/sisteransi/src/index.js
35
49
  var require_src = __commonJS((exports, module) => {
@@ -158,54 +172,8 @@ var require_picocolors = __commonJS((exports, module) => {
158
172
  module.exports = createColors();
159
173
  module.exports.createColors = createColors;
160
174
  });
161
- // package.json
162
- var package_default = {
163
- name: "ostacky",
164
- version: "0.5.10",
165
- description: "Instalador interactivo de agentes y comandos para OpenCode",
166
- type: "module",
167
- bin: {
168
- ostacky: "./dist/cli.js"
169
- },
170
- scripts: {
171
- dev: "bun run src/cli.ts",
172
- build: "bun build src/cli.ts --target=node --format=esm --outfile dist/cli.js && bun scripts/bundle-mcp.ts && bun scripts/add-shebang.ts",
173
- start: "node dist/cli.js",
174
- test: "bun test",
175
- "hash:check": "bun run scripts/update-manifest-hashes.ts --check",
176
- "hash:update": "bun run scripts/update-manifest-hashes.ts",
177
- prepublishOnly: "bun run build"
178
- },
179
- files: [
180
- "dist/",
181
- "assets/",
182
- "manifest.json",
183
- "LICENSE"
184
- ],
185
- keywords: [
186
- "opencode",
187
- "installer",
188
- "cli",
189
- "agent"
190
- ],
191
- license: "MIT",
192
- dependencies: {
193
- "@clack/prompts": "^0.9.0"
194
- },
195
- devDependencies: {
196
- "@types/bun": "latest",
197
- typescript: "^5.0.0"
198
- },
199
- engines: {
200
- node: ">=18.0.0"
201
- }
202
- };
203
-
204
- // node_modules/@clack/prompts/dist/index.mjs
205
- import { stripVTControlCharacters as T2 } from "node:util";
206
175
 
207
176
  // node_modules/@clack/core/dist/index.mjs
208
- var import_sisteransi = __toESM(require_src(), 1);
209
177
  import { stdin as $, stdout as j } from "node:process";
210
178
  import * as f from "node:readline";
211
179
  import M from "node:readline";
@@ -214,7 +182,6 @@ function J({ onlyFirst: t = false } = {}) {
214
182
  const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
215
183
  return new RegExp(F, t ? undefined : "g");
216
184
  }
217
- var Q = J();
218
185
  function T(t) {
219
186
  if (typeof t != "string")
220
187
  throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
@@ -223,43 +190,6 @@ function T(t) {
223
190
  function O(t) {
224
191
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
225
192
  }
226
- var P = { exports: {} };
227
- (function(t) {
228
- var u = {};
229
- t.exports = u, u.eastAsianWidth = function(e) {
230
- var s = e.charCodeAt(0), i = e.length == 2 ? e.charCodeAt(1) : 0, D = s;
231
- return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
232
- }, u.characterLength = function(e) {
233
- var s = this.eastAsianWidth(e);
234
- return s == "F" || s == "W" || s == "A" ? 2 : 1;
235
- };
236
- function F(e) {
237
- return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
238
- }
239
- u.length = function(e) {
240
- for (var s = F(e), i = 0, D = 0;D < s.length; D++)
241
- i = i + this.characterLength(s[D]);
242
- return i;
243
- }, u.slice = function(e, s, i) {
244
- textLen = u.length(e), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
245
- for (var D = "", C = 0, o = F(e), E = 0;E < o.length; E++) {
246
- var a = o[E], n = u.length(a);
247
- if (C >= s - (n == 2 ? 1 : 0))
248
- if (C + n <= i)
249
- D += a;
250
- else
251
- break;
252
- C += n;
253
- }
254
- return D;
255
- };
256
- })(P);
257
- var X = P.exports;
258
- var DD = O(X);
259
- var uD = function() {
260
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
261
- };
262
- var FD = O(uD);
263
193
  function A(t, u = {}) {
264
194
  if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = T(t), t.length === 0))
265
195
  return 0;
@@ -284,15 +214,6 @@ function A(t, u = {}) {
284
214
  }
285
215
  return e;
286
216
  }
287
- var m = 10;
288
- var L = (t = 0) => (u) => `\x1B[${u + t}m`;
289
- var N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
290
- var I = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
291
- var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
292
- Object.keys(r.modifier);
293
- var tD = Object.keys(r.color);
294
- var eD = Object.keys(r.bgColor);
295
- [...tD, ...eD];
296
217
  function sD() {
297
218
  const t = new Map;
298
219
  for (const [u, F] of Object.entries(r)) {
@@ -328,91 +249,27 @@ function sD() {
328
249
  return i === 2 && (D += 60), D;
329
250
  }, enumerable: false }, rgbToAnsi: { value: (u, F, e) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
330
251
  }
331
- var iD = sD();
332
- var v = new Set(["\x1B", "›"]);
333
- var CD = 39;
334
- var w = "\x07";
335
- var W = "[";
336
- var rD = "]";
337
- var R = "m";
338
- var y = `${rD}8;;`;
339
- var V = (t) => `${v.values().next().value}${W}${t}${R}`;
340
- var z = (t) => `${v.values().next().value}${y}${t}${w}`;
341
- var ED = (t) => t.split(" ").map((u) => A(u));
342
- var _ = (t, u, F) => {
343
- const e = [...u];
344
- let s = false, i = false, D = A(T(t[t.length - 1]));
345
- for (const [C, o] of e.entries()) {
346
- const E = A(o);
347
- if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), v.has(o) && (s = true, i = e.slice(C + 1).join("").startsWith(y)), s) {
348
- i ? o === w && (s = false, i = false) : o === R && (s = false);
349
- continue;
350
- }
351
- D += E, D === F && C < e.length - 1 && (t.push(""), D = 0);
352
- }
353
- !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
354
- };
355
- var nD = (t) => {
356
- const u = t.split(" ");
357
- let F = u.length;
358
- for (;F > 0 && !(A(u[F - 1]) > 0); )
359
- F--;
360
- return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
361
- };
362
- var oD = (t, u, F = {}) => {
363
- if (F.trim !== false && t.trim() === "")
364
- return "";
365
- let e = "", s, i;
366
- const D = ED(t);
367
- let C = [""];
368
- for (const [E, a] of t.split(" ").entries()) {
369
- F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
370
- let n = A(C[C.length - 1]);
371
- if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (C.push(""), n = 0), (n > 0 || F.trim === false) && (C[C.length - 1] += " ", n++)), F.hard && D[E] > u) {
372
- const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
373
- Math.floor((D[E] - 1) / u) < p && C.push(""), _(C, a, u);
374
- continue;
375
- }
376
- if (n + D[E] > u && n > 0 && D[E] > 0) {
377
- if (F.wordWrap === false && n < u) {
378
- _(C, a, u);
379
- continue;
380
- }
381
- C.push("");
382
- }
383
- if (n + D[E] > u && F.wordWrap === false) {
384
- _(C, a, u);
385
- continue;
386
- }
387
- C[C.length - 1] += a;
388
- }
389
- F.trim !== false && (C = C.map((E) => nD(E)));
390
- const o = [...C.join(`
391
- `)];
392
- for (const [E, a] of o.entries()) {
393
- if (e += a, v.has(a)) {
394
- const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y}(?<uri>.*)${w})`).exec(o.slice(E).join("")) || { groups: {} };
395
- if (B.code !== undefined) {
396
- const p = Number.parseFloat(B.code);
397
- s = p === CD ? undefined : p;
398
- } else
399
- B.uri !== undefined && (i = B.uri.length === 0 ? undefined : B.uri);
400
- }
401
- const n = iD.codes.get(Number(s));
402
- o[E + 1] === `
403
- ` ? (i && (e += z("")), s && n && (e += V(n))) : a === `
404
- ` && (s && n && (e += V(s)), i && (e += z(i)));
405
- }
406
- return e;
407
- };
408
252
  function G(t, u, F) {
409
253
  return String(t).normalize().replace(/\r\n/g, `
410
254
  `).split(`
411
255
  `).map((e) => oD(e, u, F)).join(`
412
256
  `);
413
257
  }
414
- var aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
415
- var c = { actions: new Set(aD), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]) };
258
+ function hD(t) {
259
+ for (const u in t) {
260
+ const F = u;
261
+ if (!Object.hasOwn(t, F))
262
+ continue;
263
+ const e = t[F];
264
+ switch (F) {
265
+ case "aliases": {
266
+ for (const s in e)
267
+ Object.hasOwn(e, s) && (c.aliases.has(s) || c.aliases.set(s, e[s]));
268
+ break;
269
+ }
270
+ }
271
+ }
272
+ }
416
273
  function k(t, u) {
417
274
  if (typeof t == "string")
418
275
  return c.aliases.get(t) === u;
@@ -431,8 +288,6 @@ function lD(t, u) {
431
288
  F[i] !== e[i] && s.push(i);
432
289
  return s;
433
290
  }
434
- var xD = globalThis.process.platform.startsWith("win");
435
- var S = Symbol("clack:cancel");
436
291
  function BD(t) {
437
292
  return t === S;
438
293
  }
@@ -462,9 +317,6 @@ function cD({ input: t = $, output: u = j, overwrite: F = true, hideCursor: e =
462
317
  t.off("keypress", i), e && u.write(import_sisteransi.cursor.show), t.isTTY && !xD && t.setRawMode(false), s.terminal = false, s.close();
463
318
  };
464
319
  }
465
- var AD = Object.defineProperty;
466
- var pD = (t, u, F) => (u in t) ? AD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
467
- var h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F);
468
320
 
469
321
  class x {
470
322
  constructor(u, F = true) {
@@ -560,286 +412,562 @@ class x {
560
412
  }
561
413
  }
562
414
  }
563
-
564
- class fD extends x {
565
- get cursor() {
566
- return this.value ? 0 : 1;
567
- }
568
- get _value() {
569
- return this.cursor === 0;
570
- }
571
- constructor(u) {
572
- super(u, false), this.value = !!u.initialValue, this.on("value", () => {
573
- this.value = this._value;
574
- }), this.on("confirm", (F) => {
575
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
576
- }), this.on("cursor", () => {
577
- this.value = !this.value;
578
- });
415
+ var import_sisteransi, import_picocolors, Q, P, X, DD, uD = function() {
416
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
417
+ }, FD, m = 10, L = (t = 0) => (u) => `\x1B[${u + t}m`, N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`, I = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`, r, tD, eD, iD, v, CD = 39, w = "\x07", W = "[", rD = "]", R = "m", y, V = (t) => `${v.values().next().value}${W}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w}`, ED = (t) => t.split(" ").map((u) => A(u)), _ = (t, u, F) => {
418
+ const e = [...u];
419
+ let s = false, i = false, D = A(T(t[t.length - 1]));
420
+ for (const [C, o] of e.entries()) {
421
+ const E = A(o);
422
+ if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), v.has(o) && (s = true, i = e.slice(C + 1).join("").startsWith(y)), s) {
423
+ i ? o === w && (s = false, i = false) : o === R && (s = false);
424
+ continue;
425
+ }
426
+ D += E, D === F && C < e.length - 1 && (t.push(""), D = 0);
579
427
  }
580
- }
581
- var bD = Object.defineProperty;
582
- var mD = (t, u, F) => (u in t) ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
583
- var Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F);
584
- var wD = class extends x {
585
- constructor(u) {
586
- super(u, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
587
- F === "a" && this.toggleAll();
588
- }), this.on("cursor", (F) => {
589
- switch (F) {
590
- case "left":
591
- case "up":
592
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
593
- break;
594
- case "down":
595
- case "right":
596
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
597
- break;
598
- case "space":
599
- this.toggleValue();
600
- break;
428
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
429
+ }, nD = (t) => {
430
+ const u = t.split(" ");
431
+ let F = u.length;
432
+ for (;F > 0 && !(A(u[F - 1]) > 0); )
433
+ F--;
434
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
435
+ }, oD = (t, u, F = {}) => {
436
+ if (F.trim !== false && t.trim() === "")
437
+ return "";
438
+ let e = "", s, i;
439
+ const D = ED(t);
440
+ let C = [""];
441
+ for (const [E, a] of t.split(" ").entries()) {
442
+ F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
443
+ let n = A(C[C.length - 1]);
444
+ if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (C.push(""), n = 0), (n > 0 || F.trim === false) && (C[C.length - 1] += " ", n++)), F.hard && D[E] > u) {
445
+ const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
446
+ Math.floor((D[E] - 1) / u) < p && C.push(""), _(C, a, u);
447
+ continue;
448
+ }
449
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
450
+ if (F.wordWrap === false && n < u) {
451
+ _(C, a, u);
452
+ continue;
601
453
  }
602
- });
603
- }
604
- get _value() {
605
- return this.options[this.cursor].value;
606
- }
607
- toggleAll() {
608
- const u = this.value.length === this.options.length;
609
- this.value = u ? [] : this.options.map((F) => F.value);
454
+ C.push("");
455
+ }
456
+ if (n + D[E] > u && F.wordWrap === false) {
457
+ _(C, a, u);
458
+ continue;
459
+ }
460
+ C[C.length - 1] += a;
610
461
  }
611
- toggleValue() {
612
- const u = this.value.includes(this._value);
613
- this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
462
+ F.trim !== false && (C = C.map((E) => nD(E)));
463
+ const o = [...C.join(`
464
+ `)];
465
+ for (const [E, a] of o.entries()) {
466
+ if (e += a, v.has(a)) {
467
+ const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y}(?<uri>.*)${w})`).exec(o.slice(E).join("")) || { groups: {} };
468
+ if (B.code !== undefined) {
469
+ const p = Number.parseFloat(B.code);
470
+ s = p === CD ? undefined : p;
471
+ } else
472
+ B.uri !== undefined && (i = B.uri.length === 0 ? undefined : B.uri);
473
+ }
474
+ const n = iD.codes.get(Number(s));
475
+ o[E + 1] === `
476
+ ` ? (i && (e += z("")), s && n && (e += V(n))) : a === `
477
+ ` && (s && n && (e += V(s)), i && (e += z(i)));
614
478
  }
615
- };
616
- var SD = Object.defineProperty;
617
- var $D = (t, u, F) => (u in t) ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
618
- var q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F);
619
-
620
- class jD extends x {
621
- constructor(u) {
622
- super(u, false), q(this, "options"), q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
623
- switch (F) {
624
- case "left":
625
- case "up":
626
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
627
- break;
628
- case "down":
629
- case "right":
630
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
631
- break;
479
+ return e;
480
+ }, aD, c, xD, S, AD, pD = (t, u, F) => (u in t) ? AD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F), fD, gD, vD = (t, u, F) => (u in t) ? gD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, K = (t, u, F) => (vD(t, typeof u != "symbol" ? u + "" : u, F), F), dD, bD, mD = (t, u, F) => (u in t) ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F), wD, yD, _D = (t, u, F) => (u in t) ? yD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, Z = (t, u, F) => (_D(t, typeof u != "symbol" ? u + "" : u, F), F), kD, SD, $D = (t, u, F) => (u in t) ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F), jD, MD, TD = (t, u, F) => (u in t) ? MD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, H = (t, u, F) => (TD(t, typeof u != "symbol" ? u + "" : u, F), F), OD, PD;
481
+ var init_dist = __esm(() => {
482
+ import_sisteransi = __toESM(require_src(), 1);
483
+ import_picocolors = __toESM(require_picocolors(), 1);
484
+ Q = J();
485
+ P = { exports: {} };
486
+ (function(t) {
487
+ var u = {};
488
+ t.exports = u, u.eastAsianWidth = function(e) {
489
+ var s = e.charCodeAt(0), i = e.length == 2 ? e.charCodeAt(1) : 0, D = s;
490
+ return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
491
+ }, u.characterLength = function(e) {
492
+ var s = this.eastAsianWidth(e);
493
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
494
+ };
495
+ function F(e) {
496
+ return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
497
+ }
498
+ u.length = function(e) {
499
+ for (var s = F(e), i = 0, D = 0;D < s.length; D++)
500
+ i = i + this.characterLength(s[D]);
501
+ return i;
502
+ }, u.slice = function(e, s, i) {
503
+ textLen = u.length(e), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
504
+ for (var D = "", C = 0, o = F(e), E = 0;E < o.length; E++) {
505
+ var a = o[E], n = u.length(a);
506
+ if (C >= s - (n == 2 ? 1 : 0))
507
+ if (C + n <= i)
508
+ D += a;
509
+ else
510
+ break;
511
+ C += n;
632
512
  }
633
- this.changeValue();
634
- });
635
- }
636
- get _value() {
637
- return this.options[this.cursor];
638
- }
639
- changeValue() {
640
- this.value = this._value.value;
641
- }
642
- }
513
+ return D;
514
+ };
515
+ })(P);
516
+ X = P.exports;
517
+ DD = O(X);
518
+ FD = O(uD);
519
+ r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
520
+ Object.keys(r.modifier);
521
+ tD = Object.keys(r.color);
522
+ eD = Object.keys(r.bgColor);
523
+ [...tD, ...eD];
524
+ iD = sD();
525
+ v = new Set(["\x1B", "›"]);
526
+ y = `${rD}8;;`;
527
+ aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
528
+ c = { actions: new Set(aD), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]) };
529
+ xD = globalThis.process.platform.startsWith("win");
530
+ S = Symbol("clack:cancel");
531
+ AD = Object.defineProperty;
532
+ fD = class fD extends x {
533
+ get cursor() {
534
+ return this.value ? 0 : 1;
535
+ }
536
+ get _value() {
537
+ return this.cursor === 0;
538
+ }
539
+ constructor(u) {
540
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
541
+ this.value = this._value;
542
+ }), this.on("confirm", (F) => {
543
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
544
+ }), this.on("cursor", () => {
545
+ this.value = !this.value;
546
+ });
547
+ }
548
+ };
549
+ gD = Object.defineProperty;
550
+ dD = class extends x {
551
+ constructor(u) {
552
+ super(u, false), K(this, "options"), K(this, "cursor", 0);
553
+ const { options: F } = u;
554
+ this.options = Object.entries(F).flatMap(([e, s]) => [{ value: e, group: true, label: e }, ...s.map((i) => ({ ...i, group: e }))]), this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e }) => e === u.cursorAt), 0), this.on("cursor", (e) => {
555
+ switch (e) {
556
+ case "left":
557
+ case "up":
558
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
559
+ break;
560
+ case "down":
561
+ case "right":
562
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
563
+ break;
564
+ case "space":
565
+ this.toggleValue();
566
+ break;
567
+ }
568
+ });
569
+ }
570
+ getGroupItems(u) {
571
+ return this.options.filter((F) => F.group === u);
572
+ }
573
+ isGroupSelected(u) {
574
+ return this.getGroupItems(u).every((F) => this.value.includes(F.value));
575
+ }
576
+ toggleValue() {
577
+ const u = this.options[this.cursor];
578
+ if (u.group === true) {
579
+ const F = u.value, e = this.getGroupItems(F);
580
+ this.isGroupSelected(F) ? this.value = this.value.filter((s) => e.findIndex((i) => i.value === s) === -1) : this.value = [...this.value, ...e.map((s) => s.value)], this.value = Array.from(new Set(this.value));
581
+ } else {
582
+ const F = this.value.includes(u.value);
583
+ this.value = F ? this.value.filter((e) => e !== u.value) : [...this.value, u.value];
584
+ }
585
+ }
586
+ };
587
+ bD = Object.defineProperty;
588
+ wD = class extends x {
589
+ constructor(u) {
590
+ super(u, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
591
+ F === "a" && this.toggleAll();
592
+ }), this.on("cursor", (F) => {
593
+ switch (F) {
594
+ case "left":
595
+ case "up":
596
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
597
+ break;
598
+ case "down":
599
+ case "right":
600
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
601
+ break;
602
+ case "space":
603
+ this.toggleValue();
604
+ break;
605
+ }
606
+ });
607
+ }
608
+ get _value() {
609
+ return this.options[this.cursor].value;
610
+ }
611
+ toggleAll() {
612
+ const u = this.value.length === this.options.length;
613
+ this.value = u ? [] : this.options.map((F) => F.value);
614
+ }
615
+ toggleValue() {
616
+ const u = this.value.includes(this._value);
617
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
618
+ }
619
+ };
620
+ yD = Object.defineProperty;
621
+ kD = class kD extends x {
622
+ constructor({ mask: u, ...F }) {
623
+ super(F), Z(this, "valueWithCursor", ""), Z(this, "_mask", "•"), this._mask = u ?? "•", this.on("finalize", () => {
624
+ this.valueWithCursor = this.masked;
625
+ }), this.on("value", () => {
626
+ if (this.cursor >= this.value.length)
627
+ this.valueWithCursor = `${this.masked}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
628
+ else {
629
+ const e = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
630
+ this.valueWithCursor = `${e}${import_picocolors.default.inverse(s[0])}${s.slice(1)}`;
631
+ }
632
+ });
633
+ }
634
+ get cursor() {
635
+ return this._cursor;
636
+ }
637
+ get masked() {
638
+ return this.value.replaceAll(/./g, this._mask);
639
+ }
640
+ };
641
+ SD = Object.defineProperty;
642
+ jD = class jD extends x {
643
+ constructor(u) {
644
+ super(u, false), q(this, "options"), q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
645
+ switch (F) {
646
+ case "left":
647
+ case "up":
648
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
649
+ break;
650
+ case "down":
651
+ case "right":
652
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
653
+ break;
654
+ }
655
+ this.changeValue();
656
+ });
657
+ }
658
+ get _value() {
659
+ return this.options[this.cursor];
660
+ }
661
+ changeValue() {
662
+ this.value = this._value.value;
663
+ }
664
+ };
665
+ MD = Object.defineProperty;
666
+ OD = class OD extends x {
667
+ constructor(u) {
668
+ super(u, false), H(this, "options"), H(this, "cursor", 0), this.options = u.options;
669
+ const F = this.options.map(({ value: [e] }) => e?.toLowerCase());
670
+ this.cursor = Math.max(F.indexOf(u.initialValue), 0), this.on("key", (e) => {
671
+ if (!F.includes(e))
672
+ return;
673
+ const s = this.options.find(({ value: [i] }) => i?.toLowerCase() === e);
674
+ s && (this.value = s.value, this.state = "submit", this.emit("submit"));
675
+ });
676
+ }
677
+ };
678
+ PD = class PD extends x {
679
+ get valueWithCursor() {
680
+ if (this.state === "submit")
681
+ return this.value;
682
+ if (this.cursor >= this.value.length)
683
+ return `${this.value}█`;
684
+ const u = this.value.slice(0, this.cursor), [F, ...e] = this.value.slice(this.cursor);
685
+ return `${u}${import_picocolors.default.inverse(F)}${e.join("")}`;
686
+ }
687
+ get cursor() {
688
+ return this._cursor;
689
+ }
690
+ constructor(u) {
691
+ super(u), this.on("finalize", () => {
692
+ this.value || (this.value = u.defaultValue);
693
+ });
694
+ }
695
+ };
696
+ });
643
697
 
644
698
  // node_modules/@clack/prompts/dist/index.mjs
645
- var import_picocolors = __toESM(require_picocolors(), 1);
646
- var import_sisteransi2 = __toESM(require_src(), 1);
699
+ var exports_dist = {};
700
+ __export(exports_dist, {
701
+ updateSettings: () => hD,
702
+ text: () => ue,
703
+ tasks: () => xe,
704
+ spinner: () => L2,
705
+ selectKey: () => he,
706
+ select: () => de,
707
+ password: () => $e,
708
+ outro: () => fe,
709
+ note: () => ye,
710
+ multiselect: () => pe,
711
+ log: () => v2,
712
+ isCancel: () => BD,
713
+ intro: () => we,
714
+ groupMultiselect: () => ge,
715
+ group: () => be,
716
+ confirm: () => me,
717
+ cancel: () => ve
718
+ });
719
+ import { stripVTControlCharacters as T2 } from "node:util";
647
720
  import p from "node:process";
648
721
  function X2() {
649
722
  return p.platform !== "win32" ? p.env.TERM !== "linux" : !!p.env.CI || !!p.env.WT_SESSION || !!p.env.TERMINUS_SUBLIME || p.env.ConEmuTask === "{cmd::Cmder}" || p.env.TERM_PROGRAM === "Terminus-Sublime" || p.env.TERM_PROGRAM === "vscode" || p.env.TERM === "xterm-256color" || p.env.TERM === "alacritty" || p.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
650
723
  }
651
- var E = X2();
652
- var u = (s, n) => E ? s : n;
653
- var ee = u("◆", "*");
654
- var A2 = u("■", "x");
655
- var B = u("▲", "x");
656
- var S2 = u("◇", "o");
657
- var te = u("┌", "T");
658
- var a = u("│", "|");
659
- var m2 = u("└", "—");
660
- var j2 = u("●", ">");
661
- var R2 = u("○", " ");
662
- var V2 = u("◻", "[•]");
663
- var M2 = u("◼", "[+]");
664
- var G2 = u("◻", "[ ]");
665
- var se = u("▪", "•");
666
- var N2 = u("─", "-");
667
- var re = u("╮", "+");
668
- var ie = u("├", "+");
669
- var ne = u("╯", "+");
670
- var ae = u("●", "•");
671
- var oe = u("◆", "*");
672
- var ce = u("▲", "!");
673
- var le = u("■", "x");
674
- var y2 = (s) => {
724
+ var import_picocolors2, import_sisteransi2, E, u = (s, n) => E ? s : n, ee, A2, B, S2, te, a, m2, j2, R2, V2, M2, G2, se, N2, re, ie, ne, ae, oe, ce, le, y2 = (s) => {
675
725
  switch (s) {
676
726
  case "initial":
677
727
  case "active":
678
- return import_picocolors.default.cyan(ee);
728
+ return import_picocolors2.default.cyan(ee);
679
729
  case "cancel":
680
- return import_picocolors.default.red(A2);
730
+ return import_picocolors2.default.red(A2);
681
731
  case "error":
682
- return import_picocolors.default.yellow(B);
732
+ return import_picocolors2.default.yellow(B);
683
733
  case "submit":
684
- return import_picocolors.default.green(S2);
734
+ return import_picocolors2.default.green(S2);
685
735
  }
686
- };
687
- var k2 = (s) => {
736
+ }, k2 = (s) => {
688
737
  const { cursor: n, options: t, style: i } = s, r2 = s.maxItems ?? Number.POSITIVE_INFINITY, c2 = Math.max(process.stdout.rows - 4, 0), o = Math.min(c2, Math.max(r2, 5));
689
738
  let l2 = 0;
690
739
  n >= l2 + o - 3 ? l2 = Math.max(Math.min(n - o + 3, t.length - o), 0) : n < l2 + 2 && (l2 = Math.max(n - 2, 0));
691
740
  const $2 = o < t.length && l2 > 0, d2 = o < t.length && l2 + o < t.length;
692
741
  return t.slice(l2, l2 + o).map((w2, b2, C) => {
693
742
  const I2 = b2 === 0 && $2, x2 = b2 === C.length - 1 && d2;
694
- return I2 || x2 ? import_picocolors.default.dim("...") : i(w2, b2 + l2 === n);
743
+ return I2 || x2 ? import_picocolors2.default.dim("...") : i(w2, b2 + l2 === n);
695
744
  });
696
- };
697
- var me = (s) => {
745
+ }, ue = (s) => new PD({ validate: s.validate, placeholder: s.placeholder, defaultValue: s.defaultValue, initialValue: s.initialValue, render() {
746
+ const n = `${import_picocolors2.default.gray(a)}
747
+ ${y2(this.state)} ${s.message}
748
+ `, t = s.placeholder ? import_picocolors2.default.inverse(s.placeholder[0]) + import_picocolors2.default.dim(s.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : t;
749
+ switch (this.state) {
750
+ case "error":
751
+ return `${n.trim()}
752
+ ${import_picocolors2.default.yellow(a)} ${i}
753
+ ${import_picocolors2.default.yellow(m2)} ${import_picocolors2.default.yellow(this.error)}
754
+ `;
755
+ case "submit":
756
+ return `${n}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.dim(this.value || s.placeholder)}`;
757
+ case "cancel":
758
+ return `${n}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
759
+ ${import_picocolors2.default.gray(a)}` : ""}`;
760
+ default:
761
+ return `${n}${import_picocolors2.default.cyan(a)} ${i}
762
+ ${import_picocolors2.default.cyan(m2)}
763
+ `;
764
+ }
765
+ } }).prompt(), $e = (s) => new kD({ validate: s.validate, mask: s.mask ?? se, render() {
766
+ const n = `${import_picocolors2.default.gray(a)}
767
+ ${y2(this.state)} ${s.message}
768
+ `, t = this.valueWithCursor, i = this.masked;
769
+ switch (this.state) {
770
+ case "error":
771
+ return `${n.trim()}
772
+ ${import_picocolors2.default.yellow(a)} ${i}
773
+ ${import_picocolors2.default.yellow(m2)} ${import_picocolors2.default.yellow(this.error)}
774
+ `;
775
+ case "submit":
776
+ return `${n}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.dim(i)}`;
777
+ case "cancel":
778
+ return `${n}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i ?? ""))}${i ? `
779
+ ${import_picocolors2.default.gray(a)}` : ""}`;
780
+ default:
781
+ return `${n}${import_picocolors2.default.cyan(a)} ${t}
782
+ ${import_picocolors2.default.cyan(m2)}
783
+ `;
784
+ }
785
+ } }).prompt(), me = (s) => {
698
786
  const n = s.active ?? "Yes", t = s.inactive ?? "No";
699
787
  return new fD({ active: n, inactive: t, initialValue: s.initialValue ?? true, render() {
700
- const i = `${import_picocolors.default.gray(a)}
788
+ const i = `${import_picocolors2.default.gray(a)}
701
789
  ${y2(this.state)} ${s.message}
702
790
  `, r2 = this.value ? n : t;
703
791
  switch (this.state) {
704
792
  case "submit":
705
- return `${i}${import_picocolors.default.gray(a)} ${import_picocolors.default.dim(r2)}`;
793
+ return `${i}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.dim(r2)}`;
706
794
  case "cancel":
707
- return `${i}${import_picocolors.default.gray(a)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(r2))}
708
- ${import_picocolors.default.gray(a)}`;
795
+ return `${i}${import_picocolors2.default.gray(a)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(r2))}
796
+ ${import_picocolors2.default.gray(a)}`;
709
797
  default:
710
- return `${i}${import_picocolors.default.cyan(a)} ${this.value ? `${import_picocolors.default.green(j2)} ${n}` : `${import_picocolors.default.dim(R2)} ${import_picocolors.default.dim(n)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(R2)} ${import_picocolors.default.dim(t)}` : `${import_picocolors.default.green(j2)} ${t}`}
711
- ${import_picocolors.default.cyan(m2)}
798
+ return `${i}${import_picocolors2.default.cyan(a)} ${this.value ? `${import_picocolors2.default.green(j2)} ${n}` : `${import_picocolors2.default.dim(R2)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(R2)} ${import_picocolors2.default.dim(t)}` : `${import_picocolors2.default.green(j2)} ${t}`}
799
+ ${import_picocolors2.default.cyan(m2)}
712
800
  `;
713
801
  }
714
802
  } }).prompt();
715
- };
716
- var de = (s) => {
803
+ }, de = (s) => {
717
804
  const n = (t, i) => {
718
805
  const r2 = t.label ?? String(t.value);
719
806
  switch (i) {
720
807
  case "selected":
721
- return `${import_picocolors.default.dim(r2)}`;
808
+ return `${import_picocolors2.default.dim(r2)}`;
722
809
  case "active":
723
- return `${import_picocolors.default.green(j2)} ${r2} ${t.hint ? import_picocolors.default.dim(`(${t.hint})`) : ""}`;
810
+ return `${import_picocolors2.default.green(j2)} ${r2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}`;
724
811
  case "cancelled":
725
- return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(r2))}`;
812
+ return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(r2))}`;
726
813
  default:
727
- return `${import_picocolors.default.dim(R2)} ${import_picocolors.default.dim(r2)}`;
814
+ return `${import_picocolors2.default.dim(R2)} ${import_picocolors2.default.dim(r2)}`;
728
815
  }
729
816
  };
730
817
  return new jD({ options: s.options, initialValue: s.initialValue, render() {
731
- const t = `${import_picocolors.default.gray(a)}
818
+ const t = `${import_picocolors2.default.gray(a)}
732
819
  ${y2(this.state)} ${s.message}
733
820
  `;
734
821
  switch (this.state) {
735
822
  case "submit":
736
- return `${t}${import_picocolors.default.gray(a)} ${n(this.options[this.cursor], "selected")}`;
823
+ return `${t}${import_picocolors2.default.gray(a)} ${n(this.options[this.cursor], "selected")}`;
737
824
  case "cancel":
738
- return `${t}${import_picocolors.default.gray(a)} ${n(this.options[this.cursor], "cancelled")}
739
- ${import_picocolors.default.gray(a)}`;
825
+ return `${t}${import_picocolors2.default.gray(a)} ${n(this.options[this.cursor], "cancelled")}
826
+ ${import_picocolors2.default.gray(a)}`;
740
827
  default:
741
- return `${t}${import_picocolors.default.cyan(a)} ${k2({ cursor: this.cursor, options: this.options, maxItems: s.maxItems, style: (i, r2) => n(i, r2 ? "active" : "inactive") }).join(`
742
- ${import_picocolors.default.cyan(a)} `)}
743
- ${import_picocolors.default.cyan(m2)}
828
+ return `${t}${import_picocolors2.default.cyan(a)} ${k2({ cursor: this.cursor, options: this.options, maxItems: s.maxItems, style: (i, r2) => n(i, r2 ? "active" : "inactive") }).join(`
829
+ ${import_picocolors2.default.cyan(a)} `)}
830
+ ${import_picocolors2.default.cyan(m2)}
744
831
  `;
745
832
  }
746
833
  } }).prompt();
747
- };
748
- var pe = (s) => {
749
- const n = (t, i) => {
834
+ }, he = (s) => {
835
+ const n = (t, i = "inactive") => {
750
836
  const r2 = t.label ?? String(t.value);
751
- return i === "active" ? `${import_picocolors.default.cyan(V2)} ${r2} ${t.hint ? import_picocolors.default.dim(`(${t.hint})`) : ""}` : i === "selected" ? `${import_picocolors.default.green(M2)} ${import_picocolors.default.dim(r2)}` : i === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(r2))}` : i === "active-selected" ? `${import_picocolors.default.green(M2)} ${r2} ${t.hint ? import_picocolors.default.dim(`(${t.hint})`) : ""}` : i === "submitted" ? `${import_picocolors.default.dim(r2)}` : `${import_picocolors.default.dim(G2)} ${import_picocolors.default.dim(r2)}`;
837
+ return i === "selected" ? `${import_picocolors2.default.dim(r2)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(r2))}` : i === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${t.value} `))} ${r2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${t.value} `)))} ${r2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}`;
752
838
  };
753
- return new wD({ options: s.options, initialValues: s.initialValues, required: s.required ?? true, cursorAt: s.cursorAt, validate(t) {
754
- if (this.required && t.length === 0)
755
- return `Please select at least one option.
756
- ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
757
- }, render() {
758
- const t = `${import_picocolors.default.gray(a)}
839
+ return new OD({ options: s.options, initialValue: s.initialValue, render() {
840
+ const t = `${import_picocolors2.default.gray(a)}
759
841
  ${y2(this.state)} ${s.message}
760
- `, i = (r2, c2) => {
842
+ `;
843
+ switch (this.state) {
844
+ case "submit":
845
+ return `${t}${import_picocolors2.default.gray(a)} ${n(this.options.find((i) => i.value === this.value) ?? s.options[0], "selected")}`;
846
+ case "cancel":
847
+ return `${t}${import_picocolors2.default.gray(a)} ${n(this.options[0], "cancelled")}
848
+ ${import_picocolors2.default.gray(a)}`;
849
+ default:
850
+ return `${t}${import_picocolors2.default.cyan(a)} ${this.options.map((i, r2) => n(i, r2 === this.cursor ? "active" : "inactive")).join(`
851
+ ${import_picocolors2.default.cyan(a)} `)}
852
+ ${import_picocolors2.default.cyan(m2)}
853
+ `;
854
+ }
855
+ } }).prompt();
856
+ }, pe = (s) => {
857
+ const n = (t, i) => {
858
+ const r2 = t.label ?? String(t.value);
859
+ return i === "active" ? `${import_picocolors2.default.cyan(V2)} ${r2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : i === "selected" ? `${import_picocolors2.default.green(M2)} ${import_picocolors2.default.dim(r2)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(r2))}` : i === "active-selected" ? `${import_picocolors2.default.green(M2)} ${r2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : i === "submitted" ? `${import_picocolors2.default.dim(r2)}` : `${import_picocolors2.default.dim(G2)} ${import_picocolors2.default.dim(r2)}`;
860
+ };
861
+ return new wD({ options: s.options, initialValues: s.initialValues, required: s.required ?? true, cursorAt: s.cursorAt, validate(t) {
862
+ if (this.required && t.length === 0)
863
+ return `Please select at least one option.
864
+ ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
865
+ }, render() {
866
+ const t = `${import_picocolors2.default.gray(a)}
867
+ ${y2(this.state)} ${s.message}
868
+ `, i = (r2, c2) => {
761
869
  const o = this.value.includes(r2.value);
762
870
  return c2 && o ? n(r2, "active-selected") : o ? n(r2, "selected") : n(r2, c2 ? "active" : "inactive");
763
871
  };
764
872
  switch (this.state) {
765
873
  case "submit":
766
- return `${t}${import_picocolors.default.gray(a)} ${this.options.filter(({ value: r2 }) => this.value.includes(r2)).map((r2) => n(r2, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
874
+ return `${t}${import_picocolors2.default.gray(a)} ${this.options.filter(({ value: r2 }) => this.value.includes(r2)).map((r2) => n(r2, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none")}`;
767
875
  case "cancel": {
768
- const r2 = this.options.filter(({ value: c2 }) => this.value.includes(c2)).map((c2) => n(c2, "cancelled")).join(import_picocolors.default.dim(", "));
769
- return `${t}${import_picocolors.default.gray(a)} ${r2.trim() ? `${r2}
770
- ${import_picocolors.default.gray(a)}` : ""}`;
876
+ const r2 = this.options.filter(({ value: c2 }) => this.value.includes(c2)).map((c2) => n(c2, "cancelled")).join(import_picocolors2.default.dim(", "));
877
+ return `${t}${import_picocolors2.default.gray(a)} ${r2.trim() ? `${r2}
878
+ ${import_picocolors2.default.gray(a)}` : ""}`;
771
879
  }
772
880
  case "error": {
773
881
  const r2 = this.error.split(`
774
- `).map((c2, o) => o === 0 ? `${import_picocolors.default.yellow(m2)} ${import_picocolors.default.yellow(c2)}` : ` ${c2}`).join(`
882
+ `).map((c2, o) => o === 0 ? `${import_picocolors2.default.yellow(m2)} ${import_picocolors2.default.yellow(c2)}` : ` ${c2}`).join(`
775
883
  `);
776
- return `${t + import_picocolors.default.yellow(a)} ${k2({ options: this.options, cursor: this.cursor, maxItems: s.maxItems, style: i }).join(`
777
- ${import_picocolors.default.yellow(a)} `)}
884
+ return `${t + import_picocolors2.default.yellow(a)} ${k2({ options: this.options, cursor: this.cursor, maxItems: s.maxItems, style: i }).join(`
885
+ ${import_picocolors2.default.yellow(a)} `)}
778
886
  ${r2}
779
887
  `;
780
888
  }
781
889
  default:
782
- return `${t}${import_picocolors.default.cyan(a)} ${k2({ options: this.options, cursor: this.cursor, maxItems: s.maxItems, style: i }).join(`
783
- ${import_picocolors.default.cyan(a)} `)}
784
- ${import_picocolors.default.cyan(m2)}
890
+ return `${t}${import_picocolors2.default.cyan(a)} ${k2({ options: this.options, cursor: this.cursor, maxItems: s.maxItems, style: i }).join(`
891
+ ${import_picocolors2.default.cyan(a)} `)}
892
+ ${import_picocolors2.default.cyan(m2)}
785
893
  `;
786
894
  }
787
895
  } }).prompt();
788
- };
789
- var ye = (s = "", n = "") => {
896
+ }, ge = (s) => {
897
+ const n = (t, i, r2 = []) => {
898
+ const c2 = t.label ?? String(t.value), o = typeof t.group == "string", l2 = o && (r2[r2.indexOf(t) + 1] ?? { group: true }), $2 = o && l2.group === true, d2 = o ? `${$2 ? m2 : a} ` : "";
899
+ return i === "active" ? `${import_picocolors2.default.dim(d2)}${import_picocolors2.default.cyan(V2)} ${c2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : i === "group-active" ? `${d2}${import_picocolors2.default.cyan(V2)} ${import_picocolors2.default.dim(c2)}` : i === "group-active-selected" ? `${d2}${import_picocolors2.default.green(M2)} ${import_picocolors2.default.dim(c2)}` : i === "selected" ? `${import_picocolors2.default.dim(d2)}${import_picocolors2.default.green(M2)} ${import_picocolors2.default.dim(c2)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(c2))}` : i === "active-selected" ? `${import_picocolors2.default.dim(d2)}${import_picocolors2.default.green(M2)} ${c2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : i === "submitted" ? `${import_picocolors2.default.dim(c2)}` : `${import_picocolors2.default.dim(d2)}${import_picocolors2.default.dim(G2)} ${import_picocolors2.default.dim(c2)}`;
900
+ };
901
+ return new dD({ options: s.options, initialValues: s.initialValues, required: s.required ?? true, cursorAt: s.cursorAt, validate(t) {
902
+ if (this.required && t.length === 0)
903
+ return `Please select at least one option.
904
+ ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
905
+ }, render() {
906
+ const t = `${import_picocolors2.default.gray(a)}
907
+ ${y2(this.state)} ${s.message}
908
+ `;
909
+ switch (this.state) {
910
+ case "submit":
911
+ return `${t}${import_picocolors2.default.gray(a)} ${this.options.filter(({ value: i }) => this.value.includes(i)).map((i) => n(i, "submitted")).join(import_picocolors2.default.dim(", "))}`;
912
+ case "cancel": {
913
+ const i = this.options.filter(({ value: r2 }) => this.value.includes(r2)).map((r2) => n(r2, "cancelled")).join(import_picocolors2.default.dim(", "));
914
+ return `${t}${import_picocolors2.default.gray(a)} ${i.trim() ? `${i}
915
+ ${import_picocolors2.default.gray(a)}` : ""}`;
916
+ }
917
+ case "error": {
918
+ const i = this.error.split(`
919
+ `).map((r2, c2) => c2 === 0 ? `${import_picocolors2.default.yellow(m2)} ${import_picocolors2.default.yellow(r2)}` : ` ${r2}`).join(`
920
+ `);
921
+ return `${t}${import_picocolors2.default.yellow(a)} ${this.options.map((r2, c2, o) => {
922
+ const l2 = this.value.includes(r2.value) || r2.group === true && this.isGroupSelected(`${r2.value}`), $2 = c2 === this.cursor;
923
+ return !$2 && typeof r2.group == "string" && this.options[this.cursor].value === r2.group ? n(r2, l2 ? "group-active-selected" : "group-active", o) : $2 && l2 ? n(r2, "active-selected", o) : l2 ? n(r2, "selected", o) : n(r2, $2 ? "active" : "inactive", o);
924
+ }).join(`
925
+ ${import_picocolors2.default.yellow(a)} `)}
926
+ ${i}
927
+ `;
928
+ }
929
+ default:
930
+ return `${t}${import_picocolors2.default.cyan(a)} ${this.options.map((i, r2, c2) => {
931
+ const o = this.value.includes(i.value) || i.group === true && this.isGroupSelected(`${i.value}`), l2 = r2 === this.cursor;
932
+ return !l2 && typeof i.group == "string" && this.options[this.cursor].value === i.group ? n(i, o ? "group-active-selected" : "group-active", c2) : l2 && o ? n(i, "active-selected", c2) : o ? n(i, "selected", c2) : n(i, l2 ? "active" : "inactive", c2);
933
+ }).join(`
934
+ ${import_picocolors2.default.cyan(a)} `)}
935
+ ${import_picocolors2.default.cyan(m2)}
936
+ `;
937
+ }
938
+ } }).prompt();
939
+ }, ye = (s = "", n = "") => {
790
940
  const t = `
791
941
  ${s}
792
942
  `.split(`
793
943
  `), i = T2(n).length, r2 = Math.max(t.reduce((o, l2) => {
794
944
  const $2 = T2(l2);
795
945
  return $2.length > o ? $2.length : o;
796
- }, 0), i) + 2, c2 = t.map((o) => `${import_picocolors.default.gray(a)} ${import_picocolors.default.dim(o)}${" ".repeat(r2 - T2(o).length)}${import_picocolors.default.gray(a)}`).join(`
946
+ }, 0), i) + 2, c2 = t.map((o) => `${import_picocolors2.default.gray(a)} ${import_picocolors2.default.dim(o)}${" ".repeat(r2 - T2(o).length)}${import_picocolors2.default.gray(a)}`).join(`
797
947
  `);
798
- process.stdout.write(`${import_picocolors.default.gray(a)}
799
- ${import_picocolors.default.green(S2)} ${import_picocolors.default.reset(n)} ${import_picocolors.default.gray(N2.repeat(Math.max(r2 - i - 1, 1)) + re)}
948
+ process.stdout.write(`${import_picocolors2.default.gray(a)}
949
+ ${import_picocolors2.default.green(S2)} ${import_picocolors2.default.reset(n)} ${import_picocolors2.default.gray(N2.repeat(Math.max(r2 - i - 1, 1)) + re)}
800
950
  ${c2}
801
- ${import_picocolors.default.gray(ie + N2.repeat(r2 + 2) + ne)}
951
+ ${import_picocolors2.default.gray(ie + N2.repeat(r2 + 2) + ne)}
802
952
  `);
803
- };
804
- var we = (s = "") => {
805
- process.stdout.write(`${import_picocolors.default.gray(te)} ${s}
806
- `);
807
- };
808
- var fe = (s = "") => {
809
- process.stdout.write(`${import_picocolors.default.gray(a)}
810
- ${import_picocolors.default.gray(m2)} ${s}
953
+ }, ve = (s = "") => {
954
+ process.stdout.write(`${import_picocolors2.default.gray(m2)} ${import_picocolors2.default.red(s)}
811
955
 
812
956
  `);
813
- };
814
- var v2 = { message: (s = "", { symbol: n = import_picocolors.default.gray(a) } = {}) => {
815
- const t = [`${import_picocolors.default.gray(a)}`];
816
- if (s) {
817
- const [i, ...r2] = s.split(`
957
+ }, we = (s = "") => {
958
+ process.stdout.write(`${import_picocolors2.default.gray(te)} ${s}
818
959
  `);
819
- t.push(`${n} ${i}`, ...r2.map((c2) => `${import_picocolors.default.gray(a)} ${c2}`));
820
- }
821
- process.stdout.write(`${t.join(`
822
- `)}
960
+ }, fe = (s = "") => {
961
+ process.stdout.write(`${import_picocolors2.default.gray(a)}
962
+ ${import_picocolors2.default.gray(m2)} ${s}
963
+
823
964
  `);
824
- }, info: (s) => {
825
- v2.message(s, { symbol: import_picocolors.default.blue(ae) });
826
- }, success: (s) => {
827
- v2.message(s, { symbol: import_picocolors.default.green(oe) });
828
- }, step: (s) => {
829
- v2.message(s, { symbol: import_picocolors.default.green(S2) });
830
- }, warn: (s) => {
831
- v2.message(s, { symbol: import_picocolors.default.yellow(ce) });
832
- }, warning: (s) => {
833
- v2.warn(s);
834
- }, error: (s) => {
835
- v2.message(s, { symbol: import_picocolors.default.red(le) });
836
- } };
837
- var L2 = () => {
965
+ }, v2, L2 = () => {
838
966
  const s = E ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], n = E ? 80 : 120, t = process.env.CI === "true";
839
967
  let i, r2, c2 = false, o = "", l2;
840
968
  const $2 = (h2) => {
841
- const g = h2 > 1 ? "Something went wrong" : "Canceled";
842
- c2 && P2(g, h2);
969
+ const g2 = h2 > 1 ? "Something went wrong" : "Canceled";
970
+ c2 && P2(g2, h2);
843
971
  }, d2 = () => $2(2), w2 = () => $2(1), b2 = () => {
844
972
  process.on("uncaughtExceptionMonitor", d2), process.on("unhandledRejection", d2), process.on("SIGINT", w2), process.on("SIGTERM", w2), process.on("exit", $2);
845
973
  }, C = () => {
@@ -853,181 +981,107 @@ var L2 = () => {
853
981
  `);
854
982
  process.stdout.write(import_sisteransi2.cursor.move(-999, h2.length - 1)), process.stdout.write(import_sisteransi2.erase.down(h2.length));
855
983
  }, x2 = (h2) => h2.replace(/\.+$/, ""), O2 = (h2 = "") => {
856
- c2 = true, i = cD(), o = x2(h2), process.stdout.write(`${import_picocolors.default.gray(a)}
984
+ c2 = true, i = cD(), o = x2(h2), process.stdout.write(`${import_picocolors2.default.gray(a)}
857
985
  `);
858
- let g = 0, f2 = 0;
986
+ let g2 = 0, f2 = 0;
859
987
  b2(), r2 = setInterval(() => {
860
988
  if (t && o === l2)
861
989
  return;
862
990
  I2(), l2 = o;
863
- const W2 = import_picocolors.default.magenta(s[g]), _2 = t ? "..." : ".".repeat(Math.floor(f2)).slice(0, 3);
864
- process.stdout.write(`${W2} ${o}${_2}`), g = g + 1 < s.length ? g + 1 : 0, f2 = f2 < s.length ? f2 + 0.125 : 0;
991
+ const W2 = import_picocolors2.default.magenta(s[g2]), _2 = t ? "..." : ".".repeat(Math.floor(f2)).slice(0, 3);
992
+ process.stdout.write(`${W2} ${o}${_2}`), g2 = g2 + 1 < s.length ? g2 + 1 : 0, f2 = f2 < s.length ? f2 + 0.125 : 0;
865
993
  }, n);
866
- }, P2 = (h2 = "", g = 0) => {
994
+ }, P2 = (h2 = "", g2 = 0) => {
867
995
  c2 = false, clearInterval(r2), I2();
868
- const f2 = g === 0 ? import_picocolors.default.green(S2) : g === 1 ? import_picocolors.default.red(A2) : import_picocolors.default.red(B);
996
+ const f2 = g2 === 0 ? import_picocolors2.default.green(S2) : g2 === 1 ? import_picocolors2.default.red(A2) : import_picocolors2.default.red(B);
869
997
  o = x2(h2 ?? o), process.stdout.write(`${f2} ${o}
870
998
  `), C(), i();
871
999
  };
872
1000
  return { start: O2, stop: P2, message: (h2 = "") => {
873
1001
  o = x2(h2 ?? o);
874
1002
  } };
875
- };
876
-
877
- // src/prompts.ts
878
- import { join as join5 } from "path";
879
- import { existsSync as existsSync4 } from "fs";
880
- // manifest.json
881
- var manifest_default = {
882
- version: "0.5.10",
883
- repo: "JaimeHoracio/Ostacky",
884
- tag: "v0.5.10",
885
- agents: [
886
- {
887
- name: "ostacky",
888
- file: "assets/agents/ostacky.md",
889
- description: "Orquestador principal con ruteo por nivel de impacto, máquina de estados persistida (controller MCP), edición segura con 3 outcomes, y delegación en OpenSpec + Superpowers",
890
- version: "0.5.10",
891
- sha256: "c624b9163a97fe0aa17a4688f59e2bcfa958c64fbde71c05c0c071911f62b7ad"
892
- }
893
- ],
894
- commands: [
895
- {
896
- name: "install-stack",
897
- file: "assets/commands/install-stack.md",
898
- description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, Context7, controller MCP)",
899
- version: "0.5.10",
900
- sha256: "61f18cb616bffe4a982d874ee9426011c203ab9c17efb88d44592e202c699330"
901
- },
902
- {
903
- name: "opsx-sync",
904
- file: "assets/commands/opsx-sync.md",
905
- description: "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
906
- version: "0.5.10",
907
- sha256: "ed9948f1910743b672e1dfad496bc96972a224a98b063232be39290d43068c50"
908
- }
909
- ],
910
- mcpServers: [
911
- {
912
- name: "ostacky-controller",
913
- file: "assets/mcp/ostacky-controller/",
914
- description: "Máquina de estados persistida para Ostacky: 13 tools MCP para ciclo completo de request (start_request → discovery → route → execution → sync → done), edición segura con validación de transiciones y persistencia atómica",
915
- version: "0.5.10",
916
- sha256: "4469b9e26910a5ba016a0fe7a2d77507d40715d95ce4cbb31c498bf7001b4d0d"
1003
+ }, be = async (s, n) => {
1004
+ const t = {}, i = Object.keys(s);
1005
+ for (const r2 of i) {
1006
+ const c2 = s[r2], o = await c2({ results: t })?.catch((l2) => {
1007
+ throw l2;
1008
+ });
1009
+ if (typeof n?.onCancel == "function" && BD(o)) {
1010
+ t[r2] = "canceled", n.onCancel({ results: t });
1011
+ continue;
917
1012
  }
918
- ],
919
- skills: [
920
- {
921
- name: "thinking",
922
- file: "assets/skills/thinking/SKILL.md",
923
- description: "Skill unificado de pensamiento con dos modos: creative-design (producción de diseño → transición a writing-plans o openspec-propose) y open-exploration (exploración libre)",
924
- version: "0.5.10",
925
- sha256: "6a1fdac86357f89e132013e56cb84c1920880c1c035a8dcf53f69e01824724bb"
926
- },
927
- {
928
- name: "execution-mode-evaluation",
929
- file: "assets/skills/execution-mode-evaluation/SKILL.md",
930
- description: "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
931
- version: "0.5.10",
932
- sha256: "048925aec576dff014eed0b44e2a553c635ae405f5a245773f480be9b84d18a7"
933
- },
934
- {
935
- name: "writing-plans",
936
- file: "assets/skills/writing-plans/SKILL.md",
937
- description: "Skill de planificación de implementación (Superpowers) — execution handoff removido, Ostacky decide modo de ejecución",
938
- version: "0.5.10",
939
- sha256: "13f6e43522567505da90793934d414d290d56f4ea587ac696f66416af9e7633f"
940
- },
941
- {
942
- name: "tdd",
943
- file: "assets/skills/tdd/SKILL.md",
944
- description: "Skill de test-driven development (Superpowers)",
945
- version: "0.5.10",
946
- sha256: "7eacd8ee81dc5c0b85065c0392e37ee10314661f7edb59dd8e70a9e0dae8f371"
947
- },
948
- {
949
- name: "subagent-driven-development",
950
- file: "assets/skills/subagent-driven-development/SKILL.md",
951
- description: "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
952
- version: "0.5.10",
953
- sha256: "cdacae2e5b86f6a642ad0316172cee7dc8d19e909ef4f9ab7fcf7e84a248dda3"
954
- },
955
- {
956
- name: "dispatching-parallel-agents",
957
- file: "assets/skills/dispatching-parallel-agents/SKILL.md",
958
- description: "Skill de dispatch paralelo de agentes (Superpowers)",
959
- version: "0.5.10",
960
- sha256: "281edf0c38f358497c7e2066fa8217a2ba3e2a39b4205c4af0c41d328fc035a1"
961
- },
962
- {
963
- name: "review",
964
- file: "assets/skills/review/SKILL.md",
965
- description: "Skill de revisión de código (Superpowers)",
966
- version: "0.5.10",
967
- sha256: "14831d9ef3746ef6e2e6047c868fe7aa296d01f0644227ce776fe99436357b1a"
968
- },
969
- {
970
- name: "receiving-code-review",
971
- file: "assets/skills/receiving-code-review/SKILL.md",
972
- description: "Skill de recibir y procesar feedback de code review",
973
- version: "0.5.10",
974
- sha256: "0a5780e8a41539d15428114b7c46f36670acc16aba0db3348d36be1175433872"
975
- },
976
- {
977
- name: "openspec-propose",
978
- file: "assets/skills/openspec-propose/SKILL.md",
979
- description: "Skill de generación de proposal (OpenSpec)",
980
- version: "0.5.10",
981
- sha256: "3306b21ba9cb8c1611e8ba335126982f3767f7d317b5ed506c57a14c5f88b263"
982
- },
983
- {
984
- name: "openspec-apply-change",
985
- file: "assets/skills/openspec-apply-change/SKILL.md",
986
- description: "Skill de aplicación de change (OpenSpec)",
987
- version: "0.5.10",
988
- sha256: "31c1313c3de4616a07efd89306c4c058175d018f42d4381cc7da7030fd03ba30"
989
- },
990
- {
991
- name: "openspec-archive-change",
992
- file: "assets/skills/openspec-archive-change/SKILL.md",
993
- description: "Skill de archivo de change (OpenSpec)",
994
- version: "0.5.10",
995
- sha256: "5bf65d1848457bd57be1d21707e55fe6746cdee33bce2f32f12d87661b6aa3a4"
996
- },
997
- {
998
- name: "using-git-worktrees",
999
- file: "assets/skills/using-git-worktrees/SKILL.md",
1000
- description: "Skill de uso de git worktrees para aislamiento de trabajo",
1001
- version: "0.5.10",
1002
- sha256: "33433c24f753d566cde16c0931f70d746b6b0cb4d1f3daaa619e928b009e4fc9"
1003
- },
1004
- {
1005
- name: "using-superpowers",
1006
- file: "assets/skills/using-superpowers/SKILL.md",
1007
- description: "Skill de orquestación de Superpowers skills",
1008
- version: "0.5.10",
1009
- sha256: "fba542003aa788b5edb4ae2d1135773a1dde8111d1dd60378e2f61b6695d46fc"
1010
- },
1011
- {
1012
- name: "writing-skills",
1013
- file: "assets/skills/writing-skills/SKILL.md",
1014
- description: "Skill de creación y edición de skills",
1015
- version: "0.5.10",
1016
- sha256: "7f74ffe049283803640d78f8c9ac1ea5f5e626dedb885ecff29a87c5b5d41598"
1017
- }
1018
- ]
1013
+ t[r2] = o;
1014
+ }
1015
+ return t;
1016
+ }, xe = async (s) => {
1017
+ for (const n of s) {
1018
+ if (n.enabled === false)
1019
+ continue;
1020
+ const t = L2();
1021
+ t.start(n.title);
1022
+ const i = await n.task(t.message);
1023
+ t.stop(i || n.title);
1024
+ }
1019
1025
  };
1020
-
1021
- // src/github.ts
1022
- import { fileURLToPath } from "url";
1023
- import { dirname as dirname2, join as join2 } from "path";
1024
-
1025
- // src/cache.ts
1026
- import { homedir } from "os";
1027
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
1028
- import { join, dirname } from "path";
1026
+ var init_dist2 = __esm(() => {
1027
+ init_dist();
1028
+ init_dist();
1029
+ import_picocolors2 = __toESM(require_picocolors(), 1);
1030
+ import_sisteransi2 = __toESM(require_src(), 1);
1031
+ E = X2();
1032
+ ee = u("◆", "*");
1033
+ A2 = u("■", "x");
1034
+ B = u("▲", "x");
1035
+ S2 = u("◇", "o");
1036
+ te = u("┌", "T");
1037
+ a = u("│", "|");
1038
+ m2 = u("└", "—");
1039
+ j2 = u("●", ">");
1040
+ R2 = u("○", " ");
1041
+ V2 = u("◻", "[•]");
1042
+ M2 = u("◼", "[+]");
1043
+ G2 = u("◻", "[ ]");
1044
+ se = u("▪", "•");
1045
+ N2 = u("─", "-");
1046
+ re = u("╮", "+");
1047
+ ie = u("├", "+");
1048
+ ne = u("╯", "+");
1049
+ ae = u("●", "•");
1050
+ oe = u("◆", "*");
1051
+ ce = u("▲", "!");
1052
+ le = u("■", "x");
1053
+ v2 = { message: (s = "", { symbol: n = import_picocolors2.default.gray(a) } = {}) => {
1054
+ const t = [`${import_picocolors2.default.gray(a)}`];
1055
+ if (s) {
1056
+ const [i, ...r2] = s.split(`
1057
+ `);
1058
+ t.push(`${n} ${i}`, ...r2.map((c2) => `${import_picocolors2.default.gray(a)} ${c2}`));
1059
+ }
1060
+ process.stdout.write(`${t.join(`
1061
+ `)}
1062
+ `);
1063
+ }, info: (s) => {
1064
+ v2.message(s, { symbol: import_picocolors2.default.blue(ae) });
1065
+ }, success: (s) => {
1066
+ v2.message(s, { symbol: import_picocolors2.default.green(oe) });
1067
+ }, step: (s) => {
1068
+ v2.message(s, { symbol: import_picocolors2.default.green(S2) });
1069
+ }, warn: (s) => {
1070
+ v2.message(s, { symbol: import_picocolors2.default.yellow(ce) });
1071
+ }, warning: (s) => {
1072
+ v2.warn(s);
1073
+ }, error: (s) => {
1074
+ v2.message(s, { symbol: import_picocolors2.default.red(le) });
1075
+ } };
1076
+ });
1029
1077
 
1030
1078
  // src/security.ts
1079
+ var exports_security = {};
1080
+ __export(exports_security, {
1081
+ verifyChecksum: () => verifyChecksum,
1082
+ validateFilePath: () => validateFilePath,
1083
+ sha256: () => sha256
1084
+ });
1031
1085
  import { createHash } from "crypto";
1032
1086
  function validateFilePath(filePath) {
1033
1087
  if (filePath.includes("..") || filePath.startsWith("/") || filePath.startsWith("\\") || /^[a-zA-Z]:/.test(filePath)) {
@@ -1047,193 +1101,32 @@ function verifyChecksum(content, expectedHash, label) {
1047
1101
  recibido: ${actual}`);
1048
1102
  }
1049
1103
  }
1104
+ var init_security = () => {};
1050
1105
 
1051
- // src/cache.ts
1052
- var CACHE_ROOT = join(homedir(), ".opencode", "cache");
1053
- function cacheKey(repo, tag, filePath) {
1054
- const repoSlug = repo.replace("/", "__");
1055
- return join(CACHE_ROOT, repoSlug, tag, filePath);
1056
- }
1057
- function getCached(repo, tag, filePath, expectedHash) {
1058
- const cachePath = cacheKey(repo, tag, filePath);
1059
- if (!existsSync(cachePath))
1060
- return null;
1061
- try {
1062
- const content = readFileSync(cachePath, "utf-8");
1063
- if (expectedHash && sha256(content) !== expectedHash)
1064
- return null;
1065
- return content;
1066
- } catch {
1067
- return null;
1068
- }
1069
- }
1070
- function putCache(repo, tag, filePath, content) {
1071
- const cachePath = cacheKey(repo, tag, filePath);
1072
- const dir = dirname(cachePath);
1073
- if (!existsSync(dir))
1074
- mkdirSync(dir, { recursive: true });
1075
- writeFileSync(cachePath, content, "utf-8");
1076
- }
1077
-
1078
- // src/github.ts
1079
- var GITHUB_RAW = "https://raw.githubusercontent.com";
1080
- var GITHUB_API = "https://api.github.com";
1081
- var __filename2 = fileURLToPath(import.meta.url);
1082
- var __dirname2 = dirname2(__filename2);
1083
- var PACKAGE_ROOT = join2(__dirname2, "..");
1084
- var BUNDLED_SKILLS_DIR = join2(PACKAGE_ROOT, "assets", "skills");
1085
- function getBundledSkillPath(name) {
1086
- validateFilePath(name);
1087
- return join2(BUNDLED_SKILLS_DIR, name);
1088
- }
1089
- var BUNDLED_MCP_DIR = join2(PACKAGE_ROOT, "assets", "mcp");
1090
- function getBundledMcpPath(name) {
1091
- validateFilePath(name);
1092
- return join2(BUNDLED_MCP_DIR, name);
1093
- }
1094
- function getRawUrl(repo, tag, path) {
1095
- return `${GITHUB_RAW}/${repo}/${tag}/${path}`;
1096
- }
1097
- async function fetchLatestTag(repo) {
1098
- try {
1099
- const url = `${GITHUB_API}/repos/${repo}/releases/latest`;
1100
- const response = await fetch(url, {
1101
- signal: AbortSignal.timeout(5000),
1102
- headers: { "User-Agent": "ostacky-installer" }
1103
- });
1104
- if (!response.ok)
1105
- return null;
1106
- const data = await response.json();
1107
- return data.tag_name ?? null;
1108
- } catch {
1109
- return null;
1110
- }
1111
- }
1112
- async function fetchManifest(tag) {
1113
- const resolvedTag = tag ?? manifest_default.tag;
1114
- try {
1115
- const url = getRawUrl(manifest_default.repo, resolvedTag, "manifest.json");
1116
- const response = await fetch(url, {
1117
- signal: AbortSignal.timeout(5000),
1118
- headers: { "User-Agent": "ostacky-installer" }
1119
- });
1120
- if (response.ok) {
1121
- return await response.json();
1122
- }
1123
- } catch {}
1124
- return manifest_default;
1125
- }
1126
- async function fetchLatestManifest() {
1127
- const latestTag = await fetchLatestTag(manifest_default.repo);
1128
- const currentTag = manifest_default.tag;
1129
- const isNew = latestTag !== null && latestTag !== currentTag;
1130
- const manifest = await fetchManifest(latestTag ?? currentTag);
1131
- return { manifest, isNew, latestTag };
1132
- }
1133
- async function downloadFile(manifest, filePath) {
1134
- validateFilePath(filePath);
1135
- const item = [...manifest.agents, ...manifest.commands, ...manifest.skills ?? [], ...manifest.mcpServers ?? []].find((i) => i.file === filePath);
1136
- const expectedHash = item?.sha256 ?? null;
1137
- const cached = getCached(manifest.repo, manifest.tag, filePath, expectedHash);
1138
- if (cached !== null)
1139
- return cached;
1140
- const url = getRawUrl(manifest.repo, manifest.tag, filePath);
1141
- const response = await fetch(url, {
1142
- headers: { "User-Agent": "ostacky-installer" }
1143
- });
1144
- if (!response.ok) {
1145
- throw new Error(`Error descargando ${url}: ${response.status} ${response.statusText}`);
1146
- }
1147
- const content = await response.text();
1148
- verifyChecksum(content, expectedHash, filePath);
1149
- putCache(manifest.repo, manifest.tag, filePath, content);
1150
- return content;
1151
- }
1152
-
1153
- // src/installer.ts
1106
+ // src/fs.ts
1154
1107
  import {
1155
- existsSync as existsSync3,
1156
- mkdirSync as mkdirSync2,
1157
- writeFileSync as writeFileSync3,
1108
+ existsSync,
1109
+ mkdirSync,
1158
1110
  unlinkSync,
1159
1111
  readdirSync,
1160
1112
  statSync,
1161
1113
  copyFileSync,
1162
- readFileSync as readFileSync3,
1114
+ readFileSync,
1163
1115
  rmSync,
1164
1116
  createWriteStream
1165
1117
  } from "fs";
1166
1118
  import { createHash as createHash2 } from "crypto";
1167
- import { join as join4, resolve, dirname as dirname3, relative } from "path";
1168
-
1169
- // src/lockfile.ts
1170
- import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1171
- import { join as join3 } from "path";
1172
- var LOCKFILE_NAME = "ostacky-lock.json";
1173
- function getLockfilePath(opencodeRoot) {
1174
- return join3(opencodeRoot, LOCKFILE_NAME);
1175
- }
1176
- function readLockfile(opencodeRoot) {
1177
- const lockPath = getLockfilePath(opencodeRoot);
1178
- if (!existsSync2(lockPath))
1179
- return null;
1180
- try {
1181
- return JSON.parse(readFileSync2(lockPath, "utf-8"));
1182
- } catch {
1183
- return null;
1184
- }
1185
- }
1186
- function writeLockfile(opencodeRoot, lockfile) {
1187
- writeFileSync2(getLockfilePath(opencodeRoot), JSON.stringify(lockfile, null, 2), "utf-8");
1188
- }
1189
- function getInstalledVersion(lockfile, type, name) {
1190
- return lockfile?.[type]?.[name]?.version ?? null;
1191
- }
1192
- function removeFromLockfile(opencodeRoot, type, name) {
1193
- const lockfile = readLockfile(opencodeRoot);
1194
- if (!lockfile)
1195
- return;
1196
- if (!lockfile[type])
1197
- return;
1198
- if (!(name in lockfile[type]))
1199
- return;
1200
- delete lockfile[type][name];
1201
- writeLockfile(opencodeRoot, lockfile);
1202
- }
1203
- function clearLockfile(opencodeRoot) {
1204
- const lockfile = readLockfile(opencodeRoot);
1205
- if (!lockfile) {
1206
- writeLockfile(opencodeRoot, {
1207
- version: "0.5.10",
1208
- lockedAt: new Date().toISOString(),
1209
- repo: "",
1210
- tag: "",
1211
- agents: {},
1212
- commands: {},
1213
- skills: {},
1214
- mcpServers: {}
1215
- });
1216
- return;
1217
- }
1218
- lockfile.agents = {};
1219
- lockfile.commands = {};
1220
- lockfile.skills = {};
1221
- lockfile.mcpServers = {};
1222
- lockfile.lockedAt = new Date().toISOString();
1223
- writeLockfile(opencodeRoot, lockfile);
1224
- }
1225
-
1226
- // src/installer.ts
1119
+ import { join, resolve, dirname, relative } from "path";
1227
1120
  import { execSync } from "child_process";
1228
1121
  function findOpenCodeDir(startDir = process.cwd()) {
1229
1122
  let current = resolve(startDir);
1230
1123
  while (true) {
1231
- const opencodeDir = join4(current, ".opencode");
1232
- if (existsSync3(opencodeDir))
1124
+ const opencodeDir = join(current, ".opencode");
1125
+ if (existsSync(opencodeDir))
1233
1126
  return opencodeDir;
1234
- if (existsSync3(join4(current, ".git")))
1127
+ if (existsSync(join(current, ".git")))
1235
1128
  return null;
1236
- const parent = dirname3(current);
1129
+ const parent = dirname(current);
1237
1130
  if (parent === current)
1238
1131
  return null;
1239
1132
  current = parent;
@@ -1242,10 +1135,10 @@ function findOpenCodeDir(startDir = process.cwd()) {
1242
1135
  function findProjectRoot(startDir = process.cwd()) {
1243
1136
  let current = resolve(startDir);
1244
1137
  while (true) {
1245
- if (existsSync3(join4(current, ".opencode")) || existsSync3(join4(current, ".git"))) {
1138
+ if (existsSync(join(current, ".opencode")) || existsSync(join(current, ".git"))) {
1246
1139
  return current;
1247
1140
  }
1248
- const parent = dirname3(current);
1141
+ const parent = dirname(current);
1249
1142
  if (parent === current)
1250
1143
  return resolve(startDir);
1251
1144
  current = parent;
@@ -1254,36 +1147,37 @@ function findProjectRoot(startDir = process.cwd()) {
1254
1147
  function ensureOpenCodePaths(opencodeDir) {
1255
1148
  const paths = {
1256
1149
  root: opencodeDir,
1257
- agents: join4(opencodeDir, "agents"),
1258
- commands: join4(opencodeDir, "commands"),
1259
- skills: join4(opencodeDir, "skills"),
1260
- mcp: join4(opencodeDir, "mcp"),
1261
- tools: join4(opencodeDir, "tools")
1150
+ agents: join(opencodeDir, "agents"),
1151
+ commands: join(opencodeDir, "commands"),
1152
+ plugins: join(opencodeDir, "plugins"),
1153
+ skills: join(opencodeDir, "skills"),
1154
+ mcp: join(opencodeDir, "mcp"),
1155
+ tools: join(opencodeDir, "tools")
1262
1156
  };
1263
- for (const dir of [paths.root, paths.agents, paths.commands, paths.skills, paths.mcp, paths.tools]) {
1264
- if (!existsSync3(dir))
1265
- mkdirSync2(dir, { recursive: true });
1157
+ for (const dir of [paths.root, paths.agents, paths.commands, paths.plugins, paths.skills, paths.mcp, paths.tools]) {
1158
+ if (!existsSync(dir))
1159
+ mkdirSync(dir, { recursive: true });
1266
1160
  }
1267
1161
  return paths;
1268
1162
  }
1269
1163
  function ensureToolDirs(toolsDir, toolNames) {
1270
1164
  for (const name of toolNames) {
1271
- const dir = join4(toolsDir, name);
1272
- if (!existsSync3(dir))
1273
- mkdirSync2(dir, { recursive: true });
1165
+ const dir = join(toolsDir, name);
1166
+ if (!existsSync(dir))
1167
+ mkdirSync(dir, { recursive: true });
1274
1168
  }
1275
1169
  }
1276
1170
  function createOpenCodeDir(baseDir) {
1277
- return ensureOpenCodePaths(join4(baseDir, ".opencode"));
1171
+ return ensureOpenCodePaths(join(baseDir, ".opencode"));
1278
1172
  }
1279
1173
  function copyDirRecursive(src, dest, skipGenerated = false) {
1280
- if (!existsSync3(dest))
1281
- mkdirSync2(dest, { recursive: true });
1174
+ if (!existsSync(dest))
1175
+ mkdirSync(dest, { recursive: true });
1282
1176
  for (const entry of readdirSync(src)) {
1283
1177
  if (skipGenerated && (entry === "node_modules" || entry === "package-lock.json"))
1284
1178
  continue;
1285
- const srcPath = join4(src, entry);
1286
- const destPath = join4(dest, entry);
1179
+ const srcPath = join(src, entry);
1180
+ const destPath = join(dest, entry);
1287
1181
  const stat = statSync(srcPath);
1288
1182
  if (stat.isDirectory()) {
1289
1183
  copyDirRecursive(srcPath, destPath, skipGenerated);
@@ -1303,349 +1197,74 @@ function walkForHash(root, current, lines) {
1303
1197
  for (const entry of readdirSync(current)) {
1304
1198
  if (entry === "node_modules" || entry === "package-lock.json")
1305
1199
  continue;
1306
- const full = join4(current, entry);
1200
+ const full = join(current, entry);
1307
1201
  const stat = statSync(full);
1308
1202
  if (stat.isDirectory()) {
1309
1203
  walkForHash(root, full, lines);
1310
1204
  } else {
1311
1205
  const rel = relative(root, full);
1312
- const content = readFileSync3(full, "utf-8");
1206
+ const content = readFileSync(full, "utf-8");
1313
1207
  lines.push(`${rel}:${sha256(content)}`);
1314
1208
  }
1315
1209
  }
1316
1210
  }
1317
- function stripJsoncComments(text) {
1318
- let result = "";
1319
- let i = 0;
1320
- let inString = false;
1321
- while (i < text.length) {
1322
- const char = text[i];
1323
- const next = text[i + 1];
1324
- if (inString) {
1325
- if (char === "\\") {
1326
- result += char + (next ?? "");
1327
- i += 2;
1328
- continue;
1329
- }
1330
- if (char === '"')
1331
- inString = false;
1332
- result += char;
1333
- i++;
1334
- continue;
1335
- }
1336
- if (char === '"') {
1337
- inString = true;
1338
- result += char;
1339
- i++;
1340
- continue;
1341
- }
1342
- if (char === "/" && next === "/") {
1343
- while (i < text.length && text[i] !== `
1344
- `)
1345
- i++;
1346
- continue;
1347
- }
1348
- if (char === "/" && next === "*") {
1349
- i += 2;
1350
- while (i < text.length && !(text[i] === "*" && text[i + 1] === "/"))
1351
- i++;
1352
- i += 2;
1353
- continue;
1211
+ function isCommandAvailable(cmd) {
1212
+ try {
1213
+ if (process.platform === "win32") {
1214
+ execSync(`where ${cmd} >nul 2>&1`);
1215
+ } else {
1216
+ execSync(`which ${cmd} >/dev/null 2>&1`);
1354
1217
  }
1355
- result += char;
1356
- i++;
1218
+ return true;
1219
+ } catch {
1220
+ return false;
1357
1221
  }
1358
- return result.replace(/,\s*([}\]])/g, "$1");
1359
1222
  }
1360
- function readOpenCodeConfig(configPath) {
1361
- const raw = readFileSync3(configPath, "utf-8");
1223
+ function findExecutablePath(cmd) {
1362
1224
  try {
1363
- return JSON.parse(stripJsoncComments(raw));
1225
+ const result = execSync(process.platform === "win32" ? `where ${cmd}` : `which ${cmd}`, { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim();
1226
+ return result || null;
1364
1227
  } catch {
1365
1228
  return null;
1366
1229
  }
1367
1230
  }
1368
- function writeOpenCodeConfig(configPath, config) {
1369
- writeFileSync3(configPath, JSON.stringify(config, null, 2) + `
1370
- `, "utf-8");
1371
- }
1372
- function ensureOpenCodeConfig(projectRoot) {
1373
- const existing = findOpenCodeConfig(projectRoot);
1374
- if (existing)
1375
- return existing;
1376
- const configPath = join4(projectRoot, "opencode.json");
1377
- writeOpenCodeConfig(configPath, {
1378
- $schema: "https://opencode.ai/config.json",
1379
- mcp: {}
1380
- });
1381
- return configPath;
1382
- }
1383
- function setMcpEntry(name, entry) {
1384
- const projectRoot = findProjectRoot();
1385
- const configPath = ensureOpenCodeConfig(projectRoot);
1386
- const config = readOpenCodeConfig(configPath);
1387
- if (!config)
1388
- return;
1389
- if (!config.mcp)
1390
- config.mcp = {};
1391
- config.mcp[name] = entry;
1392
- writeOpenCodeConfig(configPath, config);
1393
- }
1394
- function ensureMcpEntry(name, entry) {
1395
- const projectRoot = findProjectRoot();
1396
- const configPath = ensureOpenCodeConfig(projectRoot);
1397
- const config = readOpenCodeConfig(configPath);
1398
- if (!config)
1399
- return;
1400
- if (!config.mcp)
1401
- config.mcp = {};
1402
- const mcp = config.mcp;
1403
- if (!mcp[name]) {
1404
- mcp[name] = entry;
1405
- writeOpenCodeConfig(configPath, config);
1406
- }
1407
- }
1408
- function upsertLockfile(paths, type, item, manifest, contentHash) {
1409
- const existing = readLockfile(paths.root) ?? {
1410
- version: manifest.version,
1411
- lockedAt: new Date().toISOString(),
1412
- repo: manifest.repo,
1413
- tag: manifest.tag,
1414
- agents: {},
1415
- commands: {},
1416
- skills: {}
1417
- };
1418
- if (!existing.skills)
1419
- existing.skills = {};
1420
- if (!existing.mcpServers)
1421
- existing.mcpServers = {};
1422
- if (!existing[type])
1423
- existing[type] = {};
1424
- existing[type][item.name] = {
1425
- version: item.version,
1426
- installedAt: new Date().toISOString(),
1427
- sha256: contentHash
1428
- };
1429
- existing.tag = manifest.tag;
1430
- existing.version = manifest.version;
1431
- existing.lockedAt = new Date().toISOString();
1432
- writeLockfile(paths.root, existing);
1433
- }
1434
- function readBundledAsset(relativePath) {
1435
- const fullPath = join4(PACKAGE_ROOT, relativePath);
1436
- if (!existsSync3(fullPath))
1437
- return null;
1438
- return readFileSync3(fullPath, "utf-8");
1439
- }
1440
- async function installAgent(item, manifest, paths) {
1441
- let content;
1442
- try {
1443
- content = await downloadFile(manifest, item.file);
1444
- } catch (downloadErr) {
1445
- const bundled = readBundledAsset(item.file);
1446
- if (bundled === null) {
1447
- throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
1448
- }
1449
- content = bundled;
1450
- }
1451
- writeFileSync3(join4(paths.agents, `${item.name}.md`), content, "utf-8");
1452
- upsertLockfile(paths, "agents", item, manifest, sha256(content));
1453
- }
1454
- async function installCommand(item, manifest, paths) {
1455
- let content;
1456
- try {
1457
- content = await downloadFile(manifest, item.file);
1458
- } catch (downloadErr) {
1459
- const bundled = readBundledAsset(item.file);
1460
- if (bundled === null) {
1461
- throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
1462
- }
1463
- content = bundled;
1464
- }
1465
- writeFileSync3(join4(paths.commands, `${item.name}.md`), content, "utf-8");
1466
- upsertLockfile(paths, "commands", item, manifest, sha256(content));
1467
- }
1468
- async function installSkill(item, manifest, paths) {
1469
- const src = getBundledSkillPath(item.name);
1470
- if (!existsSync3(src)) {
1471
- throw new Error(`Skill bundleada no encontrada: ${src}. ¿Falta el directorio assets/skills/${item.name}/?`);
1472
- }
1473
- const treeHash = computeTreeHash(src);
1474
- if (item.sha256 && treeHash !== item.sha256) {
1475
- throw new Error(`Tree hash inválido para skill "${item.name}"
1476
- ` + ` esperado: ${item.sha256}
1477
- ` + ` recibido: ${treeHash}`);
1231
+ function getBunInstallCommand() {
1232
+ const platform = process.platform;
1233
+ if (platform === "darwin" || platform === "linux") {
1234
+ return {
1235
+ command: "curl -fsSL https://bun.com/install | bash",
1236
+ note: platform === "linux" ? "Requires 'unzip' package (sudo apt install unzip)" : undefined
1237
+ };
1478
1238
  }
1479
- const dest = join4(paths.skills, item.name);
1480
- if (existsSync3(dest)) {
1481
- rmSync(dest, { recursive: true, force: true });
1239
+ if (platform === "win32") {
1240
+ return {
1241
+ command: 'powershell -c "irm bun.sh/install.ps1|iex"',
1242
+ note: "Requires Windows 10 v1809 or later"
1243
+ };
1482
1244
  }
1483
- copyDirRecursive(src, dest);
1484
- upsertLockfile(paths, "skills", item, manifest, treeHash);
1245
+ return {
1246
+ command: "npm install -g bun",
1247
+ note: "Cross-platform fallback"
1248
+ };
1485
1249
  }
1486
- async function installMcpServer(item, manifest, paths) {
1487
- const src = getBundledMcpPath(item.name);
1488
- if (!existsSync3(src)) {
1489
- throw new Error(`MCP server bundleado no encontrado: ${src}. ` + `¿Falta el directorio assets/mcp/${item.name}/?`);
1490
- }
1491
- const treeHash = computeTreeHash(src);
1492
- if (item.sha256 && treeHash !== item.sha256) {
1493
- throw new Error(`Tree hash inválido para MCP server "${item.name}"
1494
- ` + ` esperado: ${item.sha256}
1495
- ` + ` recibido: ${treeHash}`);
1496
- }
1497
- const dest = join4(paths.mcp, item.name);
1498
- if (existsSync3(dest)) {
1499
- rmSync(dest, { recursive: true, force: true });
1500
- }
1501
- mkdirSync2(dest, { recursive: true });
1502
- const bundledPath = join4(PACKAGE_ROOT, "dist", "mcp", item.name, "index.js");
1503
- if (existsSync3(bundledPath)) {
1504
- copyFileSync(bundledPath, join4(dest, "index.js"));
1505
- } else {
1506
- copyDirRecursive(src, dest, true);
1507
- const installCmd = isCommandAvailable("bun") ? "bun install --no-save" : "npm install --no-audit --no-fund";
1250
+ function checkBunAvailability() {
1251
+ const bunPath = findExecutablePath("bun");
1252
+ if (bunPath) {
1253
+ let version;
1508
1254
  try {
1509
- const output = execSync(installCmd, {
1510
- cwd: dest,
1255
+ version = execSync("bun --version", {
1511
1256
  encoding: "utf-8",
1512
- timeout: 60000
1513
- });
1514
- if (output)
1515
- console.error(output);
1516
- } catch (e2) {
1517
- console.error(`[WARN] MCP server "${item.name}" copiado pero ${installCmd} falló: ${e2.message}.
1518
- ` + ` Resolvé las dependencias manualmente: cd .opencode/mcp/${item.name} && bun install`);
1519
- }
1520
- }
1521
- upsertLockfile(paths, "mcpServers", item, manifest, treeHash);
1522
- ensureMcpEntry(item.name, {
1523
- type: "local",
1524
- command: ["node", `.opencode/mcp/${item.name}/index.js`],
1525
- enabled: true
1526
- });
1527
- }
1528
- function findOpenCodeConfig(projectRoot) {
1529
- const candidates = ["opencode.json", "opencode.jsonc"];
1530
- for (const name of candidates) {
1531
- const full = join4(projectRoot, name);
1532
- if (existsSync3(full))
1533
- return full;
1534
- }
1535
- return null;
1536
- }
1537
- function isMcpServerInstalled(name, paths) {
1538
- return existsSync3(join4(paths.mcp, name, "index.js"));
1539
- }
1540
- function isAgentInstalled(name, paths) {
1541
- return existsSync3(join4(paths.agents, `${name}.md`));
1542
- }
1543
- function isCommandInstalled(name, paths) {
1544
- return existsSync3(join4(paths.commands, `${name}.md`));
1545
- }
1546
- function isSkillInstalled(name, paths) {
1547
- return existsSync3(join4(paths.skills, name, "SKILL.md"));
1548
- }
1549
- function uninstallAgent(name, paths) {
1550
- const filePath = join4(paths.agents, `${name}.md`);
1551
- try {
1552
- if (existsSync3(filePath)) {
1553
- unlinkSync(filePath);
1554
- }
1555
- } catch {
1556
- return false;
1557
- }
1558
- removeFromLockfile(paths.root, "agents", name);
1559
- return true;
1560
- }
1561
- function uninstallCommand(name, paths) {
1562
- const filePath = join4(paths.commands, `${name}.md`);
1563
- try {
1564
- if (existsSync3(filePath)) {
1565
- unlinkSync(filePath);
1566
- }
1567
- } catch {
1568
- return false;
1569
- }
1570
- removeFromLockfile(paths.root, "commands", name);
1571
- return true;
1572
- }
1573
- function uninstallSkill(name, paths) {
1574
- const dirPath = join4(paths.skills, name);
1575
- try {
1576
- if (existsSync3(dirPath)) {
1577
- rmSync(dirPath, { recursive: true, force: true });
1578
- }
1579
- } catch {
1580
- return false;
1581
- }
1582
- removeFromLockfile(paths.root, "skills", name);
1583
- return true;
1584
- }
1585
- function uninstallMcpServer(name, paths) {
1586
- const dirPath = join4(paths.mcp, name);
1587
- try {
1588
- if (existsSync3(dirPath)) {
1589
- rmSync(dirPath, { recursive: true, force: true });
1590
- }
1591
- } catch {
1592
- return false;
1593
- }
1594
- const projectRoot = findProjectRoot();
1595
- const configPath = findOpenCodeConfig(projectRoot);
1596
- if (configPath) {
1597
- const config = readOpenCodeConfig(configPath);
1598
- if (config) {
1599
- const mcp = config.mcp;
1600
- if (mcp && mcp[name]) {
1601
- delete mcp[name];
1602
- if (Object.keys(mcp).length === 0) {
1603
- delete config.mcp;
1604
- }
1605
- writeOpenCodeConfig(configPath, config);
1606
- }
1607
- }
1608
- }
1609
- removeFromLockfile(paths.root, "mcpServers", name);
1610
- return true;
1611
- }
1612
- function uninstallAll(paths) {
1613
- const lockfile = readLockfile(paths.root);
1614
- if (!lockfile)
1615
- return;
1616
- for (const name of Object.keys(lockfile.agents)) {
1617
- uninstallAgent(name, paths);
1618
- }
1619
- for (const name of Object.keys(lockfile.commands)) {
1620
- uninstallCommand(name, paths);
1621
- }
1622
- for (const name of Object.keys(lockfile.skills ?? {})) {
1623
- uninstallSkill(name, paths);
1624
- }
1625
- for (const name of Object.keys(lockfile.mcpServers ?? {})) {
1626
- uninstallMcpServer(name, paths);
1627
- }
1628
- if (existsSync3(paths.mcp)) {
1629
- for (const entry of readdirSync(paths.mcp)) {
1630
- const dirPath = join4(paths.mcp, entry);
1631
- if (statSync(dirPath).isDirectory()) {
1632
- uninstallMcpServer(entry, paths);
1633
- }
1634
- }
1635
- }
1636
- clearLockfile(paths.root);
1637
- }
1638
- function isCommandAvailable(cmd) {
1639
- try {
1640
- if (process.platform === "win32") {
1641
- execSync(`where ${cmd} >nul 2>&1`);
1642
- } else {
1643
- execSync(`which ${cmd} >/dev/null 2>&1`);
1644
- }
1645
- return true;
1646
- } catch {
1647
- return false;
1257
+ stdio: ["pipe", "pipe", "pipe"]
1258
+ }).trim();
1259
+ } catch {}
1260
+ return { available: true, path: bunPath, version };
1648
1261
  }
1262
+ const { command, note } = getBunInstallCommand();
1263
+ return {
1264
+ available: false,
1265
+ installCommand: command,
1266
+ installNote: note
1267
+ };
1649
1268
  }
1650
1269
  function detectPlatformTarget() {
1651
1270
  const platform = process.platform;
@@ -1671,25 +1290,26 @@ function detectPlatformTarget() {
1671
1290
  function downloadToFile(url, dest, timeoutMs = 180000) {
1672
1291
  return new Promise((resolve2, reject) => {
1673
1292
  const file = createWriteStream(dest);
1293
+ file.on("finish", () => resolve2());
1294
+ file.on("error", (err) => reject(err));
1674
1295
  const controller = new AbortController;
1675
1296
  const timer = setTimeout(() => controller.abort(), timeoutMs);
1676
- fetch(url, { signal: controller.signal, headers: { "User-Agent": "ostacky-installer" } }).then((res) => {
1297
+ fetch(url, { signal: controller.signal, headers: { "User-Agent": USER_AGENT } }).then((res) => {
1677
1298
  if (!res.ok || !res.body) {
1678
1299
  reject(new Error(`HTTP ${res.status} ${res.statusText} descargando ${url}`));
1679
1300
  return;
1680
1301
  }
1681
- const reader = res.body.getReader();
1682
- const pump = ({ done, value }) => {
1683
- if (done) {
1302
+ const writable = new WritableStream({
1303
+ write(chunk) {
1304
+ return new Promise((ok, fail) => file.write(Buffer.from(chunk), (err) => err ? fail(err) : ok()));
1305
+ },
1306
+ close() {
1684
1307
  file.end();
1685
- return Promise.resolve(undefined);
1686
1308
  }
1687
- return new Promise((ok) => file.write(Buffer.from(value), () => ok())).then(() => reader.read().then(pump));
1688
- };
1689
- return reader.read().then(pump);
1309
+ });
1310
+ return res.body.pipeTo(writable);
1690
1311
  }).then(() => {
1691
1312
  clearTimeout(timer);
1692
- file.on("finish", () => resolve2());
1693
1313
  }).catch((err) => {
1694
1314
  clearTimeout(timer);
1695
1315
  file.destroy();
@@ -1701,14 +1321,14 @@ function downloadToFile(url, dest, timeoutMs = 180000) {
1701
1321
  });
1702
1322
  }
1703
1323
  async function downloadAndExtract(url, destDir, stripComponents = 1, timeoutMs = 180000) {
1704
- const tmp = join4(destDir, `.download-${Date.now()}`);
1705
- if (!existsSync3(tmp))
1706
- mkdirSync2(tmp, { recursive: true });
1707
- const archivePath = join4(tmp, url.endsWith(".zip") ? "archive.zip" : "archive.tar.gz");
1324
+ const tmp = join(destDir, `.download-${Date.now()}`);
1325
+ if (!existsSync(tmp))
1326
+ mkdirSync(tmp, { recursive: true });
1327
+ const archivePath = join(tmp, url.endsWith(".zip") ? "archive.zip" : "archive.tar.gz");
1708
1328
  try {
1709
1329
  await downloadToFile(url, archivePath, timeoutMs);
1710
- if (!existsSync3(destDir))
1711
- mkdirSync2(destDir, { recursive: true });
1330
+ if (!existsSync(destDir))
1331
+ mkdirSync(destDir, { recursive: true });
1712
1332
  if (process.platform === "win32" && url.endsWith(".zip")) {
1713
1333
  execSync(`powershell -NoProfile -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`, { stdio: "pipe", timeout: 60000 });
1714
1334
  } else {
@@ -1724,22 +1344,272 @@ async function downloadAndExtract(url, destDir, stripComponents = 1, timeoutMs =
1724
1344
  } catch {}
1725
1345
  }
1726
1346
  }
1727
- async function fetchLatestReleaseTag(repo) {
1728
- try {
1729
- const res = await fetch(`https://api.github.com/repos/${repo}/releases/latest`, {
1730
- signal: AbortSignal.timeout(5000),
1731
- headers: { "User-Agent": "ostacky-installer" }
1732
- });
1733
- if (res.ok) {
1734
- const data = await res.json();
1735
- return data.tag_name ?? null;
1347
+ async function downloadAndExtractWithRetry(url, destDir, stripComponents = 1, timeoutMs = 180000, maxRetries = 2) {
1348
+ let lastError = null;
1349
+ for (let attempt = 0;attempt <= maxRetries; attempt++) {
1350
+ try {
1351
+ await downloadAndExtract(url, destDir, stripComponents, timeoutMs);
1352
+ return;
1353
+ } catch (err) {
1354
+ lastError = err;
1355
+ if (attempt < maxRetries) {
1356
+ const delay = 1000 * Math.pow(2, attempt);
1357
+ console.error(`[download] Intento ${attempt + 1} falló: ${lastError.message}. Reintentando en ${delay}ms...`);
1358
+ await new Promise((r2) => setTimeout(r2, delay));
1359
+ }
1736
1360
  }
1737
- } catch {}
1738
- try {
1361
+ }
1362
+ throw lastError;
1363
+ }
1364
+ function findBinaryInDir(dir, name) {
1365
+ const entries = readdirSync(dir);
1366
+ for (const entry of entries) {
1367
+ const full = join(dir, entry);
1368
+ const stat = statSync(full);
1369
+ if (stat.isDirectory()) {
1370
+ const found = findBinaryInDir(full, name);
1371
+ if (found)
1372
+ return found;
1373
+ } else if (entry === name || entry === name + ".exe") {
1374
+ return full;
1375
+ }
1376
+ }
1377
+ return null;
1378
+ }
1379
+ var USER_AGENT = "ostacky-installer";
1380
+ var init_fs = __esm(() => {
1381
+ init_security();
1382
+ });
1383
+
1384
+ // manifest.json
1385
+ var manifest_default;
1386
+ var init_manifest = __esm(() => {
1387
+ manifest_default = {
1388
+ version: "0.6.1",
1389
+ repo: "JaimeHoracio/Ostacky",
1390
+ tag: "v0.6.1",
1391
+ agents: [
1392
+ {
1393
+ name: "ostacky",
1394
+ file: "assets/agents/ostacky.md",
1395
+ description: "Orquestador con recuperación automática (nunca se congela), ruteo por nivel de impacto, controller MCP con SDK oficial, edición segura con fallback inline, y delegación en OpenSpec + Superpowers",
1396
+ version: "0.6.1",
1397
+ sha256: "206963fd98b0af4580338407d1df11c30ecd0c18b984f73eb4b624555c263f55"
1398
+ }
1399
+ ],
1400
+ commands: [
1401
+ {
1402
+ name: "install-stack",
1403
+ file: "assets/commands/install-stack.md",
1404
+ description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, Context7, controller MCP con SDK oficial)",
1405
+ version: "0.6.1",
1406
+ sha256: "6741c7e08a04a56b1857b76eabf0b3207911a255639ffc3ef329fb18229d8984"
1407
+ },
1408
+ {
1409
+ name: "opsx-sync",
1410
+ file: "assets/commands/opsx-sync.md",
1411
+ description: "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
1412
+ version: "0.6.1",
1413
+ sha256: "ed9948f1910743b672e1dfad496bc96972a224a98b063232be39290d43068c50"
1414
+ }
1415
+ ],
1416
+ mcpServers: [
1417
+ {
1418
+ name: "ostacky-controller",
1419
+ file: "assets/mcp/ostacky-controller/",
1420
+ description: "Máquina de estados persistida con @modelcontextprotocol/server SDK. 20 tools: start_request → discovery → route → execution → sync → done + validate_edit + complete_task + ping + proceed_to_route + abandon integrado",
1421
+ version: "0.6.1",
1422
+ sha256: "63c9dfe7af992dc21e097a6c9902c539827cbe563165731bc997f6b776cc9aaf"
1423
+ },
1424
+ {
1425
+ name: "openspec",
1426
+ file: "assets/mcp/openspec/",
1427
+ description: "MCP server local para OpenSpec - proposal, apply, archive, sync de cambios",
1428
+ version: "0.6.1",
1429
+ sha256: "fa4be28bfc1e75db8f1a037e2580f04a60066c80e8e5934e90e1041020d04609"
1430
+ }
1431
+ ],
1432
+ skills: [
1433
+ {
1434
+ name: "brainstorming",
1435
+ file: "assets/skills/brainstorming/SKILL.md",
1436
+ description: "Skill unificado de pensamiento con dos modos: creative-design (producción de diseño → transición a writing-plans o openspec-propose) y open-exploration (exploración libre)",
1437
+ version: "0.6.1",
1438
+ sha256: "d1051ded927d57dcf72c33fa0d6116c7d0103ef36f5a7f9e22f7b3da78f9c74e"
1439
+ },
1440
+ {
1441
+ name: "execution-mode-evaluation",
1442
+ file: "assets/skills/execution-mode-evaluation/SKILL.md",
1443
+ description: "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
1444
+ version: "0.6.1",
1445
+ sha256: "5c37f6f4132378f863c99102bbde8bab478160ced82a2ea1025f958275d8e881"
1446
+ },
1447
+ {
1448
+ name: "writing-plans",
1449
+ file: "assets/skills/writing-plans/SKILL.md",
1450
+ description: "Skill de planificación de implementación (Superpowers) — execution handoff removido, Ostacky decide modo de ejecución",
1451
+ version: "0.6.1",
1452
+ sha256: "e681af5e607e7ae4b6a1c0760a4f1d1d292a028d2b6989df3afb9be8dcc81c61"
1453
+ },
1454
+ {
1455
+ name: "tdd",
1456
+ file: "assets/skills/tdd/SKILL.md",
1457
+ description: "Skill de test-driven development (Superpowers)",
1458
+ version: "0.6.1",
1459
+ sha256: "9f5a25e61e049d473a854a5401cec947329e830aa902db7c31f91a160ac19890"
1460
+ },
1461
+ {
1462
+ name: "subagent-driven-development",
1463
+ file: "assets/skills/subagent-driven-development/SKILL.md",
1464
+ description: "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
1465
+ version: "0.6.1",
1466
+ sha256: "65d87f2b3ae1da5d08b6760938ab7009e0e226182ec1d88d322a230754ac9d8e"
1467
+ },
1468
+ {
1469
+ name: "dispatching-parallel-agents",
1470
+ file: "assets/skills/dispatching-parallel-agents/SKILL.md",
1471
+ description: "Skill de dispatch paralelo de agentes (Superpowers)",
1472
+ version: "0.6.1",
1473
+ sha256: "2d93480e4b9c0f516861a765977ae08b6e02dc113dc456068ef8026bcb950fcb"
1474
+ },
1475
+ {
1476
+ name: "review",
1477
+ file: "assets/skills/review/SKILL.md",
1478
+ description: "Skill de revisión de código (Superpowers)",
1479
+ version: "0.6.1",
1480
+ sha256: "14831d9ef3746ef6e2e6047c868fe7aa296d01f0644227ce776fe99436357b1a"
1481
+ },
1482
+ {
1483
+ name: "receiving-code-review",
1484
+ file: "assets/skills/receiving-code-review/SKILL.md",
1485
+ description: "Skill de recibir y procesar feedback de code review",
1486
+ version: "0.6.1",
1487
+ sha256: "0a5780e8a41539d15428114b7c46f36670acc16aba0db3348d36be1175433872"
1488
+ },
1489
+ {
1490
+ name: "openspec-propose",
1491
+ file: "assets/skills/openspec-propose/SKILL.md",
1492
+ description: "Skill de generación de proposal (OpenSpec)",
1493
+ version: "0.6.1",
1494
+ sha256: "c50d478fd96ec5a60080012d5d87a09b54787884b4b0fa7d8631e7bee6c8c80d"
1495
+ },
1496
+ {
1497
+ name: "openspec-apply-change",
1498
+ file: "assets/skills/openspec-apply-change/SKILL.md",
1499
+ description: "Skill de aplicación de change (OpenSpec)",
1500
+ version: "0.6.1",
1501
+ sha256: "723a492f2ef2df3337e8e841ae84f4f5d0f8621e534c8ea76540ee3a796ff527"
1502
+ },
1503
+ {
1504
+ name: "openspec-archive-change",
1505
+ file: "assets/skills/openspec-archive-change/SKILL.md",
1506
+ description: "Skill de archivo de change (OpenSpec)",
1507
+ version: "0.6.1",
1508
+ sha256: "dc2422d0ff9a54e3ed9b016df2bad0dfa6cca9adaee02bb4563ce7525cc56f40"
1509
+ },
1510
+ {
1511
+ name: "openspec-explore",
1512
+ file: "assets/skills/openspec-explore/SKILL.md",
1513
+ description: "Modo explore para OpenSpec — thinking partner para explorar ideas, investigar problemas y clarificar requisitos antes/durante un cambio",
1514
+ version: "0.6.1",
1515
+ sha256: "6e162c0b38dedd2ee70d0be9179af1a9716e78ac786511d5b49ebeb0fffc14a0"
1516
+ },
1517
+ {
1518
+ name: "using-git-worktrees",
1519
+ file: "assets/skills/using-git-worktrees/SKILL.md",
1520
+ description: "Skill de uso de git worktrees para aislamiento de trabajo",
1521
+ version: "0.6.1",
1522
+ sha256: "3829b79c1d36b1bc9d148153b07f66265599a19494f648731273e3e6d1a0d65c"
1523
+ },
1524
+ {
1525
+ name: "using-superpowers",
1526
+ file: "assets/skills/using-superpowers/SKILL.md",
1527
+ description: "Skill de orquestación de Superpowers skills",
1528
+ version: "0.6.1",
1529
+ sha256: "d0153c2bdac88c5a409d439d137b8f04fecda005cc7722f1ca83b2211bfda115"
1530
+ },
1531
+ {
1532
+ name: "writing-skills",
1533
+ file: "assets/skills/writing-skills/SKILL.md",
1534
+ description: "Skill de creación y edición de skills",
1535
+ version: "0.6.1",
1536
+ sha256: "371da06aad8a546389785140248698b6401730f34c2ab00b4b9304e5a51e1eb4"
1537
+ },
1538
+ {
1539
+ name: "graceful-degradation",
1540
+ file: "assets/skills/graceful-degradation/SKILL.md",
1541
+ description: "Skill de degradación graceful cuando múltiples tools están indisponibles",
1542
+ version: "0.6.1",
1543
+ sha256: "92ea3381b5610d9041797868a5887fb358d185d80ebb753bdae3f9f9abb4d790"
1544
+ }
1545
+ ]
1546
+ };
1547
+ });
1548
+
1549
+ // src/cache.ts
1550
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1551
+ import { join as join2, dirname as dirname2 } from "path";
1552
+ function getCacheRoot(projectRoot) {
1553
+ return join2(projectRoot, ".opencode", "cache");
1554
+ }
1555
+ function cacheKey(projectRoot, repo, tag, filePath) {
1556
+ const repoSlug = repo.replace("/", "__");
1557
+ return join2(getCacheRoot(projectRoot), repoSlug, tag, filePath);
1558
+ }
1559
+ function getCached(projectRoot, repo, tag, filePath, expectedHash) {
1560
+ const cachePath = cacheKey(projectRoot, repo, tag, filePath);
1561
+ if (!existsSync2(cachePath))
1562
+ return null;
1563
+ try {
1564
+ const content = readFileSync2(cachePath, "utf-8");
1565
+ if (expectedHash && sha256(content) !== expectedHash)
1566
+ return null;
1567
+ return content;
1568
+ } catch {
1569
+ return null;
1570
+ }
1571
+ }
1572
+ function putCache(projectRoot, repo, tag, filePath, content) {
1573
+ const cachePath = cacheKey(projectRoot, repo, tag, filePath);
1574
+ const dir = dirname2(cachePath);
1575
+ if (!existsSync2(dir))
1576
+ mkdirSync2(dir, { recursive: true });
1577
+ writeFileSync2(cachePath, content, "utf-8");
1578
+ }
1579
+ var init_cache = __esm(() => {
1580
+ init_security();
1581
+ });
1582
+
1583
+ // src/github.ts
1584
+ import { fileURLToPath } from "url";
1585
+ import { dirname as dirname3, join as join3 } from "path";
1586
+ function getBundledSkillPath(name) {
1587
+ validateFilePath(name);
1588
+ return join3(BUNDLED_SKILLS_DIR, name);
1589
+ }
1590
+ function getBundledMcpPath(name) {
1591
+ validateFilePath(name);
1592
+ return join3(BUNDLED_MCP_DIR, name);
1593
+ }
1594
+ function getRawUrl(repo, tag, path) {
1595
+ return `${GITHUB_RAW}/${repo}/${tag}/${path}`;
1596
+ }
1597
+ async function fetchLatestReleaseTag(repo) {
1598
+ try {
1599
+ const res = await fetch(`https://api.github.com/repos/${repo}/releases/latest`, {
1600
+ signal: AbortSignal.timeout(5000),
1601
+ headers: { "User-Agent": USER_AGENT }
1602
+ });
1603
+ if (res.ok) {
1604
+ const data = await res.json();
1605
+ return data.tag_name ?? null;
1606
+ }
1607
+ } catch {}
1608
+ try {
1739
1609
  const res = await fetch(`https://github.com/${repo}/releases/latest`, {
1740
1610
  redirect: "manual",
1741
1611
  signal: AbortSignal.timeout(5000),
1742
- headers: { "User-Agent": "ostacky-installer" }
1612
+ headers: { "User-Agent": USER_AGENT }
1743
1613
  });
1744
1614
  const loc = res.headers.get("location") ?? "";
1745
1615
  const m3 = loc.match(/releases\/tag\/(v[^/]+)$/);
@@ -1748,11 +1618,301 @@ async function fetchLatestReleaseTag(repo) {
1748
1618
  } catch {}
1749
1619
  return null;
1750
1620
  }
1621
+ async function fetchManifest(tag) {
1622
+ const resolvedTag = tag ?? manifest_default.tag;
1623
+ try {
1624
+ const url = getRawUrl(manifest_default.repo, resolvedTag, "manifest.json");
1625
+ const response = await fetch(url, {
1626
+ signal: AbortSignal.timeout(5000),
1627
+ headers: { "User-Agent": USER_AGENT }
1628
+ });
1629
+ if (response.ok) {
1630
+ return await response.json();
1631
+ }
1632
+ } catch {}
1633
+ return manifest_default;
1634
+ }
1635
+ async function fetchLatestManifest() {
1636
+ const latestTag = await fetchLatestReleaseTag(manifest_default.repo);
1637
+ const currentTag = manifest_default.tag;
1638
+ const isNew = latestTag !== null && latestTag !== currentTag;
1639
+ const manifest = await fetchManifest(latestTag ?? currentTag);
1640
+ return { manifest, isNew, latestTag };
1641
+ }
1642
+ async function downloadFile(manifest, filePath) {
1643
+ validateFilePath(filePath);
1644
+ const item = [
1645
+ ...manifest.agents,
1646
+ ...manifest.commands,
1647
+ ...manifest.skills ?? [],
1648
+ ...manifest.mcpServers ?? []
1649
+ ].find((i) => i.file === filePath);
1650
+ const expectedHash = item?.sha256 ?? null;
1651
+ const projectRoot = findProjectRoot();
1652
+ const cached = getCached(projectRoot, manifest.repo, manifest.tag, filePath, expectedHash);
1653
+ if (cached !== null)
1654
+ return cached;
1655
+ const url = getRawUrl(manifest.repo, manifest.tag, filePath);
1656
+ const response = await fetch(url, {
1657
+ headers: { "User-Agent": USER_AGENT },
1658
+ signal: AbortSignal.timeout(30000)
1659
+ });
1660
+ if (!response.ok) {
1661
+ throw new Error(`Error descargando ${url}: ${response.status} ${response.statusText}`);
1662
+ }
1663
+ const content = await response.text();
1664
+ verifyChecksum(content, expectedHash, filePath);
1665
+ putCache(projectRoot, manifest.repo, manifest.tag, filePath, content);
1666
+ return content;
1667
+ }
1668
+ var GITHUB_RAW = "https://raw.githubusercontent.com", __filename2, __dirname2, PACKAGE_ROOT, BUNDLED_SKILLS_DIR, BUNDLED_MCP_DIR;
1669
+ var init_github = __esm(() => {
1670
+ init_manifest();
1671
+ init_cache();
1672
+ init_security();
1673
+ init_fs();
1674
+ __filename2 = fileURLToPath(import.meta.url);
1675
+ __dirname2 = dirname3(__filename2);
1676
+ PACKAGE_ROOT = join3(__dirname2, "..");
1677
+ BUNDLED_SKILLS_DIR = join3(PACKAGE_ROOT, "assets", "skills");
1678
+ BUNDLED_MCP_DIR = join3(PACKAGE_ROOT, "assets", "mcp");
1679
+ });
1680
+
1681
+ // src/lockfile.ts
1682
+ var exports_lockfile = {};
1683
+ __export(exports_lockfile, {
1684
+ writeLockfile: () => writeLockfile,
1685
+ removeFromLockfile: () => removeFromLockfile,
1686
+ readLockfile: () => readLockfile,
1687
+ getLockfilePath: () => getLockfilePath,
1688
+ getInstalledVersion: () => getInstalledVersion,
1689
+ clearLockfile: () => clearLockfile
1690
+ });
1691
+ import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
1692
+ import { join as join4 } from "path";
1693
+ function getLockfilePath(opencodeRoot) {
1694
+ return join4(opencodeRoot, LOCKFILE_NAME);
1695
+ }
1696
+ function readLockfile(opencodeRoot) {
1697
+ const lockPath = getLockfilePath(opencodeRoot);
1698
+ if (!existsSync3(lockPath))
1699
+ return null;
1700
+ try {
1701
+ return JSON.parse(readFileSync3(lockPath, "utf-8"));
1702
+ } catch {
1703
+ return null;
1704
+ }
1705
+ }
1706
+ function writeLockfile(opencodeRoot, lockfile) {
1707
+ writeFileSync3(getLockfilePath(opencodeRoot), JSON.stringify(lockfile, null, 2), "utf-8");
1708
+ }
1709
+ function getInstalledVersion(lockfile, type, name) {
1710
+ return lockfile?.[type]?.[name]?.version ?? null;
1711
+ }
1712
+ function removeFromLockfile(opencodeRoot, type, name) {
1713
+ const lockfile = readLockfile(opencodeRoot);
1714
+ if (!lockfile)
1715
+ return;
1716
+ if (!lockfile[type])
1717
+ return;
1718
+ if (!(name in lockfile[type]))
1719
+ return;
1720
+ delete lockfile[type][name];
1721
+ writeLockfile(opencodeRoot, lockfile);
1722
+ }
1723
+ function clearLockfile(opencodeRoot) {
1724
+ const lockfile = readLockfile(opencodeRoot);
1725
+ if (!lockfile) {
1726
+ writeLockfile(opencodeRoot, {
1727
+ version: LOCKFILE_VERSION,
1728
+ lockedAt: new Date().toISOString(),
1729
+ repo: "",
1730
+ tag: "",
1731
+ agents: {},
1732
+ commands: {},
1733
+ skills: {},
1734
+ mcpServers: {}
1735
+ });
1736
+ return;
1737
+ }
1738
+ lockfile.agents = {};
1739
+ lockfile.commands = {};
1740
+ lockfile.skills = {};
1741
+ lockfile.mcpServers = {};
1742
+ lockfile.lockedAt = new Date().toISOString();
1743
+ writeLockfile(opencodeRoot, lockfile);
1744
+ }
1745
+ var LOCKFILE_NAME = "ostacky-lock.json", LOCKFILE_VERSION;
1746
+ var init_lockfile = __esm(() => {
1747
+ init_manifest();
1748
+ LOCKFILE_VERSION = manifest_default.version;
1749
+ });
1750
+
1751
+ // src/config.ts
1752
+ var exports_config = {};
1753
+ __export(exports_config, {
1754
+ writeOpenCodeConfig: () => writeOpenCodeConfig,
1755
+ stripJsoncComments: () => stripJsoncComments,
1756
+ setMcpEntry: () => setMcpEntry,
1757
+ readOpenCodeConfig: () => readOpenCodeConfig,
1758
+ patchOpenCodeConfig: () => patchOpenCodeConfig,
1759
+ findOpenCodeConfig: () => findOpenCodeConfig,
1760
+ ensureOpenCodeConfig: () => ensureOpenCodeConfig,
1761
+ ensureMcpEntry: () => ensureMcpEntry
1762
+ });
1763
+ import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "fs";
1764
+ import { join as join5 } from "path";
1765
+ function stripJsoncComments(text) {
1766
+ let result = "";
1767
+ let i = 0;
1768
+ let inString = false;
1769
+ while (i < text.length) {
1770
+ const char = text[i];
1771
+ const next = text[i + 1];
1772
+ if (inString) {
1773
+ if (char === "\\") {
1774
+ result += char + (next ?? "");
1775
+ i += 2;
1776
+ continue;
1777
+ }
1778
+ if (char === '"')
1779
+ inString = false;
1780
+ result += char;
1781
+ i++;
1782
+ continue;
1783
+ }
1784
+ if (char === '"') {
1785
+ inString = true;
1786
+ result += char;
1787
+ i++;
1788
+ continue;
1789
+ }
1790
+ if (char === "/" && next === "/") {
1791
+ while (i < text.length && text[i] !== `
1792
+ `)
1793
+ i++;
1794
+ continue;
1795
+ }
1796
+ if (char === "/" && next === "*") {
1797
+ i += 2;
1798
+ while (i < text.length && !(text[i] === "*" && text[i + 1] === "/"))
1799
+ i++;
1800
+ i += 2;
1801
+ continue;
1802
+ }
1803
+ result += char;
1804
+ i++;
1805
+ }
1806
+ return result.replace(/,\s*([}\]])/g, "$1");
1807
+ }
1808
+ function readOpenCodeConfig(configPath) {
1809
+ const raw = readFileSync4(configPath, "utf-8");
1810
+ try {
1811
+ return JSON.parse(stripJsoncComments(raw));
1812
+ } catch {
1813
+ return null;
1814
+ }
1815
+ }
1816
+ function writeOpenCodeConfig(configPath, config) {
1817
+ writeFileSync4(configPath, JSON.stringify(config, null, 2) + `
1818
+ `, "utf-8");
1819
+ }
1820
+ function ensureOpenCodeConfig(projectRoot) {
1821
+ const existing = findOpenCodeConfig(projectRoot);
1822
+ if (existing)
1823
+ return existing;
1824
+ const configPath = join5(projectRoot, "opencode.json");
1825
+ writeOpenCodeConfig(configPath, {
1826
+ $schema: "https://opencode.ai/config.json",
1827
+ mcp: {}
1828
+ });
1829
+ return configPath;
1830
+ }
1831
+ function findOpenCodeConfig(projectRoot) {
1832
+ const candidates = ["opencode.json", "opencode.jsonc"];
1833
+ for (const name of candidates) {
1834
+ const full = join5(projectRoot, name);
1835
+ if (existsSync4(full))
1836
+ return full;
1837
+ }
1838
+ return null;
1839
+ }
1840
+ function setMcpEntry(name, entry) {
1841
+ const projectRoot = findProjectRoot();
1842
+ const configPath = ensureOpenCodeConfig(projectRoot);
1843
+ const config = readOpenCodeConfig(configPath);
1844
+ if (!config)
1845
+ return;
1846
+ if (!config.mcp)
1847
+ config.mcp = {};
1848
+ config.mcp[name] = entry;
1849
+ writeOpenCodeConfig(configPath, config);
1850
+ }
1851
+ function ensureMcpEntry(name, entry) {
1852
+ const projectRoot = findProjectRoot();
1853
+ const configPath = ensureOpenCodeConfig(projectRoot);
1854
+ const config = readOpenCodeConfig(configPath);
1855
+ if (!config)
1856
+ return;
1857
+ if (!config.mcp)
1858
+ config.mcp = {};
1859
+ const mcp = config.mcp;
1860
+ if (!mcp[name]) {
1861
+ mcp[name] = entry;
1862
+ writeOpenCodeConfig(configPath, config);
1863
+ }
1864
+ }
1865
+ function patchOpenCodeConfig() {
1866
+ const projectRoot = findProjectRoot();
1867
+ const configPath = findOpenCodeConfig(projectRoot);
1868
+ if (!configPath) {
1869
+ return {
1870
+ success: false,
1871
+ message: "No se encontró opencode.json ni opencode.jsonc"
1872
+ };
1873
+ }
1874
+ const config = readOpenCodeConfig(configPath);
1875
+ if (!config) {
1876
+ return {
1877
+ success: false,
1878
+ message: `Error parseando ${configPath}`
1879
+ };
1880
+ }
1881
+ let changed = false;
1882
+ if ("plugin" in config) {
1883
+ delete config.plugin;
1884
+ changed = true;
1885
+ }
1886
+ if (changed) {
1887
+ writeOpenCodeConfig(configPath, config);
1888
+ return { success: true, message: "Config actualizada (plugin legacy eliminado)" };
1889
+ }
1890
+ return { success: true, message: "Config de OpenCode ya está limpia" };
1891
+ }
1892
+ var init_config = __esm(() => {
1893
+ init_fs();
1894
+ });
1895
+
1896
+ // src/stack.ts
1897
+ var exports_stack = {};
1898
+ __export(exports_stack, {
1899
+ verifyMcpServers: () => verifyMcpServers,
1900
+ uninstallStackConfig: () => uninstallStackConfig,
1901
+ uninstallEngramConfig: () => uninstallEngramConfig,
1902
+ setupOpenSpec: () => setupOpenSpec,
1903
+ setupContext7: () => setupContext7,
1904
+ installStack: () => installStack,
1905
+ installEngram: () => installEngram,
1906
+ installCodeGraph: () => installCodeGraph
1907
+ });
1908
+ import { existsSync as existsSync6, mkdirSync as mkdirSync4, copyFileSync as copyFileSync3, unlinkSync as unlinkSync3, rmSync as rmSync3 } from "fs";
1909
+ import { join as join7 } from "path";
1910
+ import { execSync as execSync3 } from "child_process";
1751
1911
  async function installCodeGraph(toolsDir) {
1752
1912
  const projectRoot = findProjectRoot();
1753
- const cgToolDir = join4(toolsDir ?? join4(projectRoot, ".opencode", "tools"), "codegraph");
1754
- if (!existsSync3(cgToolDir))
1755
- mkdirSync2(cgToolDir, { recursive: true });
1913
+ const cgToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "codegraph");
1914
+ if (!existsSync6(cgToolDir))
1915
+ mkdirSync4(cgToolDir, { recursive: true });
1756
1916
  const target = detectPlatformTarget();
1757
1917
  if (!target) {
1758
1918
  return {
@@ -1760,18 +1920,18 @@ async function installCodeGraph(toolsDir) {
1760
1920
  message: `Plataforma no soportada para descarga local: ${process.platform}/${process.arch}. Instalá CodeGraph manualmente.`
1761
1921
  };
1762
1922
  }
1763
- const localBin = join4(cgToolDir, "bin", "codegraph");
1923
+ const localBin = join7(cgToolDir, "bin", "codegraph");
1764
1924
  const localBinExe = localBin + (process.platform === "win32" ? ".exe" : "");
1765
- if (existsSync3(localBinExe)) {
1925
+ if (existsSync6(localBinExe)) {
1766
1926
  try {
1767
- execSync(`"${localBinExe}" --version`, { stdio: "pipe", timeout: 1e4 });
1927
+ execSync3(`"${localBinExe}" --version`, { stdio: "pipe", timeout: 1e4 });
1768
1928
  } catch {
1769
1929
  try {
1770
- rmSync(join4(cgToolDir, "bin"), { recursive: true, force: true });
1930
+ rmSync3(join7(cgToolDir, "bin"), { recursive: true, force: true });
1771
1931
  } catch {}
1772
1932
  }
1773
1933
  }
1774
- if (!existsSync3(localBinExe)) {
1934
+ if (!existsSync6(localBinExe)) {
1775
1935
  const tag = await fetchLatestReleaseTag("colbymchenry/codegraph");
1776
1936
  if (!tag) {
1777
1937
  return {
@@ -1782,14 +1942,14 @@ async function installCodeGraph(toolsDir) {
1782
1942
  const ext = process.platform === "win32" ? "zip" : "tar.gz";
1783
1943
  const url = `https://github.com/colbymchenry/codegraph/releases/download/${tag}/codegraph-${target}.${ext}`;
1784
1944
  try {
1785
- await downloadAndExtract(url, cgToolDir, 1, 180000);
1945
+ await downloadAndExtractWithRetry(url, cgToolDir, 1, 180000, 2);
1786
1946
  } catch (e2) {
1787
1947
  return {
1788
1948
  success: false,
1789
1949
  message: `Error descargando CodeGraph ${tag}: ${e2.message}`
1790
1950
  };
1791
1951
  }
1792
- if (!existsSync3(localBinExe)) {
1952
+ if (!existsSync6(localBinExe)) {
1793
1953
  return {
1794
1954
  success: false,
1795
1955
  message: `Descarga de CodeGraph ${tag} completada pero no se encontró el binario en ${localBinExe}.`
@@ -1797,26 +1957,26 @@ async function installCodeGraph(toolsDir) {
1797
1957
  }
1798
1958
  if (process.platform !== "win32") {
1799
1959
  try {
1800
- execSync(`chmod +x "${localBinExe}"`, { stdio: "pipe" });
1960
+ execSync3(`chmod +x "${localBinExe}"`, { stdio: "pipe" });
1801
1961
  } catch {}
1802
1962
  }
1803
1963
  }
1804
1964
  try {
1805
- execSync(`"${localBinExe}" init -i`, { stdio: "pipe", timeout: 120000, cwd: projectRoot });
1965
+ execSync3(`"${localBinExe}" init -i`, { stdio: "pipe", timeout: 120000, cwd: projectRoot });
1806
1966
  } catch {}
1807
1967
  try {
1808
- execSync(`"${localBinExe}" install --target opencode --location local --yes`, {
1968
+ execSync3(`"${localBinExe}" install --target opencode --location local --yes`, {
1809
1969
  stdio: "pipe",
1810
1970
  timeout: 30000,
1811
1971
  cwd: projectRoot
1812
1972
  });
1813
1973
  } catch {}
1814
- const rootAgentsMd = join4(projectRoot, "AGENTS.md");
1815
- if (existsSync3(rootAgentsMd)) {
1816
- const dest = join4(cgToolDir, "AGENTS.md");
1974
+ const rootAgentsMd = join7(projectRoot, "AGENTS.md");
1975
+ if (existsSync6(rootAgentsMd)) {
1976
+ const dest = join7(cgToolDir, "AGENTS.md");
1817
1977
  try {
1818
- copyFileSync(rootAgentsMd, dest);
1819
- unlinkSync(rootAgentsMd);
1978
+ copyFileSync3(rootAgentsMd, dest);
1979
+ unlinkSync3(rootAgentsMd);
1820
1980
  } catch {}
1821
1981
  }
1822
1982
  setMcpEntry("codegraph", {
@@ -1829,7 +1989,7 @@ async function installCodeGraph(toolsDir) {
1829
1989
  function setupOpenSpec() {
1830
1990
  const npxCmd = isCommandAvailable("bun") ? "bunx" : "npx --yes";
1831
1991
  try {
1832
- execSync(`${npxCmd} openspec init --tools opencode --force`, {
1992
+ execSync3(`${npxCmd} openspec init --tools opencode --force`, {
1833
1993
  stdio: "pipe",
1834
1994
  timeout: 120000
1835
1995
  });
@@ -1843,10 +2003,60 @@ function setupOpenSpec() {
1843
2003
  }
1844
2004
  async function installEngram(toolsDir) {
1845
2005
  const projectRoot = findProjectRoot();
1846
- const engramToolDir = join4(toolsDir ?? join4(projectRoot, ".opencode", "tools"), "engram");
1847
- const engramBinDir = join4(engramToolDir, "bin");
1848
- if (!existsSync3(engramBinDir))
1849
- mkdirSync2(engramBinDir, { recursive: true });
2006
+ const bunStatus = checkBunAvailability();
2007
+ if (!bunStatus.available) {
2008
+ console.log(`
2009
+ ⚠️ Bun no detectado en el sistema.`);
2010
+ console.log(` Para instalar Bun, ejecutá:
2011
+ `);
2012
+ console.log(` ${bunStatus.installCommand}`);
2013
+ if (bunStatus.installNote) {
2014
+ console.log(` Nota: ${bunStatus.installNote}`);
2015
+ }
2016
+ console.log(`
2017
+ Documentación: https://bun.com/docs/installation
2018
+ `);
2019
+ }
2020
+ const globalBin = findExecutablePath("engram");
2021
+ if (globalBin) {
2022
+ const engramToolDir2 = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "engram");
2023
+ const engramBinDir2 = join7(engramToolDir2, "bin");
2024
+ if (!existsSync6(engramBinDir2))
2025
+ mkdirSync4(engramBinDir2, { recursive: true });
2026
+ const localBin2 = join7(engramBinDir2, "engram" + (process.platform === "win32" ? ".exe" : ""));
2027
+ if (!existsSync6(localBin2)) {
2028
+ try {
2029
+ unlinkSync3(localBin2);
2030
+ } catch {}
2031
+ try {
2032
+ if (process.platform !== "win32") {
2033
+ execSync3(`ln -s "${globalBin}" "${localBin2}"`, { stdio: "pipe" });
2034
+ } else {
2035
+ copyFileSync3(globalBin, localBin2);
2036
+ }
2037
+ } catch {}
2038
+ }
2039
+ setMcpEntry("engram", {
2040
+ type: "local",
2041
+ command: [`.opencode/tools/engram/bin/engram`, "mcp"],
2042
+ enabled: true
2043
+ });
2044
+ const pluginSource2 = join7(projectRoot, "assets", "plugins", "engram.ts");
2045
+ const pluginsDir2 = join7(projectRoot, ".opencode", "plugins");
2046
+ const pluginTarget2 = join7(pluginsDir2, "engram.ts");
2047
+ if (existsSync6(pluginSource2)) {
2048
+ if (!existsSync6(pluginsDir2))
2049
+ mkdirSync4(pluginsDir2, { recursive: true });
2050
+ try {
2051
+ copyFileSync3(pluginSource2, pluginTarget2);
2052
+ } catch {}
2053
+ }
2054
+ return { success: true, message: `Engram global detectado en ${globalBin} — usando binario global. Plugin copiado a .opencode/plugins/` };
2055
+ }
2056
+ const engramToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "engram");
2057
+ const engramBinDir = join7(engramToolDir, "bin");
2058
+ if (!existsSync6(engramBinDir))
2059
+ mkdirSync4(engramBinDir, { recursive: true });
1850
2060
  const target = detectPlatformTarget();
1851
2061
  if (!target) {
1852
2062
  return {
@@ -1854,17 +2064,17 @@ async function installEngram(toolsDir) {
1854
2064
  message: `Plataforma no soportada para descarga local: ${process.platform}/${process.arch}. Instalá Engram manualmente.`
1855
2065
  };
1856
2066
  }
1857
- const localBin = join4(engramBinDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
1858
- if (existsSync3(localBin)) {
2067
+ const localBin = join7(engramBinDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
2068
+ if (existsSync6(localBin)) {
1859
2069
  try {
1860
- execSync(`"${localBin}" --version`, { stdio: "pipe", timeout: 1e4 });
2070
+ execSync3(`"${localBin}" --version`, { stdio: "pipe", timeout: 1e4 });
1861
2071
  } catch {
1862
2072
  try {
1863
- unlinkSync(localBin);
2073
+ unlinkSync3(localBin);
1864
2074
  } catch {}
1865
2075
  }
1866
2076
  }
1867
- if (!existsSync3(localBin)) {
2077
+ if (!existsSync6(localBin)) {
1868
2078
  const tag = await fetchLatestReleaseTag("Gentleman-Programming/engram");
1869
2079
  if (!tag) {
1870
2080
  return {
@@ -1878,31 +2088,31 @@ async function installEngram(toolsDir) {
1878
2088
  const ext = process.platform === "win32" ? "zip" : "tar.gz";
1879
2089
  const url = `https://github.com/Gentleman-Programming/engram/releases/download/${tag}/engram_${versionNum}_${os}_${engramCpu}.${ext}`;
1880
2090
  try {
1881
- await downloadAndExtract(url, engramToolDir, 0, 120000);
2091
+ await downloadAndExtractWithRetry(url, engramToolDir, 0, 120000, 2);
1882
2092
  } catch (e2) {
1883
2093
  return {
1884
2094
  success: false,
1885
2095
  message: `Error descargando Engram ${tag}: ${e2.message}`
1886
2096
  };
1887
2097
  }
1888
- const extractedBin = join4(engramToolDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
1889
- if (existsSync3(extractedBin) && extractedBin !== localBin) {
2098
+ const extractedBin = join7(engramToolDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
2099
+ if (existsSync6(extractedBin) && extractedBin !== localBin) {
1890
2100
  try {
1891
- copyFileSync(extractedBin, localBin);
1892
- unlinkSync(extractedBin);
2101
+ copyFileSync3(extractedBin, localBin);
2102
+ unlinkSync3(extractedBin);
1893
2103
  } catch {}
1894
2104
  }
1895
- if (!existsSync3(localBin)) {
2105
+ if (!existsSync6(localBin)) {
1896
2106
  const found = findBinaryInDir(engramToolDir, "engram");
1897
2107
  if (found && found !== localBin) {
1898
2108
  try {
1899
- copyFileSync(found, localBin);
2109
+ copyFileSync3(found, localBin);
1900
2110
  if (process.platform !== "win32")
1901
- execSync(`chmod +x "${localBin}"`, { stdio: "pipe" });
2111
+ execSync3(`chmod +x "${localBin}"`, { stdio: "pipe" });
1902
2112
  } catch {}
1903
2113
  }
1904
2114
  }
1905
- if (!existsSync3(localBin)) {
2115
+ if (!existsSync6(localBin)) {
1906
2116
  return {
1907
2117
  success: false,
1908
2118
  message: `Descarga de Engram ${tag} completada pero no se encontró el binario en ${localBin}.`
@@ -1910,7 +2120,7 @@ async function installEngram(toolsDir) {
1910
2120
  }
1911
2121
  if (process.platform !== "win32") {
1912
2122
  try {
1913
- execSync(`chmod +x "${localBin}"`, { stdio: "pipe" });
2123
+ execSync3(`chmod +x "${localBin}"`, { stdio: "pipe" });
1914
2124
  } catch {}
1915
2125
  }
1916
2126
  }
@@ -1919,76 +2129,50 @@ async function installEngram(toolsDir) {
1919
2129
  command: [`.opencode/tools/engram/bin/engram`, "mcp"],
1920
2130
  enabled: true
1921
2131
  });
1922
- try {
1923
- execSync(`"${localBin}" setup opencode`, { stdio: "pipe", timeout: 30000 });
1924
- } catch {}
1925
- return { success: true, message: "Engram instalado localmente en .opencode/tools/engram/bin/ y configurado para OpenCode (MCP + plugin)" };
1926
- }
1927
- function findBinaryInDir(dir, name) {
1928
- const entries = readdirSync(dir);
1929
- for (const entry of entries) {
1930
- const full = join4(dir, entry);
1931
- const stat = statSync(full);
1932
- if (stat.isDirectory()) {
1933
- const found = findBinaryInDir(full, name);
1934
- if (found)
1935
- return found;
1936
- } else if (entry === name || entry === name + ".exe") {
1937
- return full;
1938
- }
2132
+ const pluginSource = join7(projectRoot, "assets", "plugins", "engram.ts");
2133
+ const pluginsDir = join7(projectRoot, ".opencode", "plugins");
2134
+ const pluginTarget = join7(pluginsDir, "engram.ts");
2135
+ if (existsSync6(pluginSource)) {
2136
+ if (!existsSync6(pluginsDir))
2137
+ mkdirSync4(pluginsDir, { recursive: true });
2138
+ try {
2139
+ copyFileSync3(pluginSource, pluginTarget);
2140
+ } catch {}
1939
2141
  }
1940
- return null;
2142
+ return { success: true, message: "Engram instalado localmente en .opencode/tools/engram/bin/ y configurado para OpenCode (MCP + plugin)" };
1941
2143
  }
1942
2144
  function setupContext7(toolsDir) {
1943
2145
  const projectRoot = findProjectRoot();
1944
- const ctx7ToolDir = join4(toolsDir ?? join4(projectRoot, ".opencode", "tools"), "context7");
1945
- if (!existsSync3(ctx7ToolDir))
1946
- mkdirSync2(ctx7ToolDir, { recursive: true });
2146
+ const ctx7ToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "context7");
2147
+ if (!existsSync6(ctx7ToolDir))
2148
+ mkdirSync4(ctx7ToolDir, { recursive: true });
1947
2149
  ensureMcpEntry("context7", {
1948
2150
  type: "remote",
1949
2151
  url: "https://mcp.context7.com/mcp",
1950
2152
  enabled: true
1951
2153
  });
1952
2154
  const npxCmd = isCommandAvailable("bun") ? "bunx" : "npx --yes";
1953
- try {
1954
- execSync(`${npxCmd} ctx7 setup --opencode`, {
1955
- stdio: "pipe",
1956
- timeout: 60000
1957
- });
1958
- return { success: true, message: "Context7 configurado (MCP + skill instalado)" };
1959
- } catch {
1960
- return {
1961
- success: true,
1962
- message: "Context7 MCP registrado (skill opcional no instalada — corrí `npx ctx7 setup --opencode` manualmente si la querés)"
1963
- };
1964
- }
1965
- }
1966
- function patchOpenCodeConfig() {
1967
- const projectRoot = findProjectRoot();
1968
- const configPath = findOpenCodeConfig(projectRoot);
1969
- if (!configPath) {
1970
- return {
1971
- success: false,
1972
- message: "No se encontró opencode.json ni opencode.jsonc"
1973
- };
1974
- }
1975
- const config = readOpenCodeConfig(configPath);
1976
- if (!config) {
2155
+ try {
2156
+ execSync3(`${npxCmd} ctx7 setup --opencode`, {
2157
+ stdio: "pipe",
2158
+ timeout: 60000
2159
+ });
2160
+ return { success: true, message: "Context7 configurado (MCP + skill instalado)" };
2161
+ } catch {
1977
2162
  return {
1978
- success: false,
1979
- message: `Error parseando ${configPath}`
2163
+ success: true,
2164
+ message: "Context7 MCP registrado (skill opcional no instalada — corrí `npx ctx7 setup --opencode` manualmente si la querés)"
1980
2165
  };
1981
2166
  }
1982
- let changed = false;
1983
- if ("plugin" in config) {
1984
- delete config.plugin;
1985
- changed = true;
1986
- }
1987
- if (changed) {
1988
- writeOpenCodeConfig(configPath, config);
1989
- return { success: true, message: "Config actualizada (plugin legacy eliminado)" };
1990
- }
1991
- return { success: true, message: "Config de OpenCode ya está limpia" };
2167
+ }
2168
+ async function installStack(toolsDir) {
2169
+ return {
2170
+ codegraph: await installCodeGraph(toolsDir),
2171
+ openspec: setupOpenSpec(),
2172
+ engram: await installEngram(toolsDir),
2173
+ context7: setupContext7(toolsDir),
2174
+ config: patchOpenCodeConfig()
2175
+ };
1992
2176
  }
1993
2177
  function uninstallEngramConfig() {
1994
2178
  const projectRoot = findProjectRoot();
@@ -2038,16 +2222,16 @@ function uninstallStackConfig(paths) {
2038
2222
  }
2039
2223
  }
2040
2224
  }
2041
- const codegraphDir = join4(projectRoot, ".codegraph");
2042
- if (existsSync3(codegraphDir)) {
2225
+ const codegraphDir = join7(projectRoot, ".codegraph");
2226
+ if (existsSync6(codegraphDir)) {
2043
2227
  try {
2044
- rmSync(codegraphDir, { recursive: true, force: true });
2228
+ rmSync3(codegraphDir, { recursive: true, force: true });
2045
2229
  removed.push(".codegraph/");
2046
2230
  } catch {}
2047
2231
  }
2048
- if (existsSync3(paths.tools)) {
2232
+ if (existsSync6(paths.tools)) {
2049
2233
  try {
2050
- rmSync(paths.tools, { recursive: true, force: true });
2234
+ rmSync3(paths.tools, { recursive: true, force: true });
2051
2235
  removed.push(".opencode/tools/");
2052
2236
  } catch {}
2053
2237
  }
@@ -2059,8 +2243,335 @@ function uninstallStackConfig(paths) {
2059
2243
  message: `Removido: ${removed.join(", ")}. Los binarios globales (codegraph, engram) no se tocaron.`
2060
2244
  };
2061
2245
  }
2246
+ function verifyMcpServers(projectRoot) {
2247
+ const opencodeDir = findOpenCodeDir(projectRoot);
2248
+ const mcpBase = opencodeDir ? join7(opencodeDir, "mcp") : join7(projectRoot, ".opencode", "mcp");
2249
+ const controllerPath = join7(mcpBase, "ostacky-controller", "index.js");
2250
+ const openspecPath = join7(mcpBase, "openspec", "index.js");
2251
+ const result = {
2252
+ ostackyController: {
2253
+ exists: existsSync6(controllerPath),
2254
+ path: controllerPath
2255
+ },
2256
+ openspec: {
2257
+ exists: existsSync6(openspecPath),
2258
+ path: openspecPath
2259
+ }
2260
+ };
2261
+ if (!result.ostackyController.exists) {
2262
+ result.ostackyController.error = "ostacky-controller MCP server not found";
2263
+ }
2264
+ if (!result.openspec.exists) {
2265
+ result.openspec.error = "openspec MCP server not found";
2266
+ }
2267
+ return result;
2268
+ }
2269
+ var init_stack = __esm(() => {
2270
+ init_fs();
2271
+ init_config();
2272
+ init_github();
2273
+ });
2274
+ // package.json
2275
+ var package_default = {
2276
+ name: "ostacky",
2277
+ version: "0.6.1",
2278
+ description: "Instalador interactivo de agentes y comandos para OpenCode",
2279
+ type: "module",
2280
+ bin: {
2281
+ ostacky: "./dist/cli.js"
2282
+ },
2283
+ scripts: {
2284
+ prebuild: "bun run scripts/sync-version.ts",
2285
+ dev: "bun run src/cli.ts",
2286
+ build: "bun build src/cli.ts --target=node --format=esm --outfile dist/cli.js && bun scripts/add-shebang.ts",
2287
+ start: "node dist/cli.js",
2288
+ test: "bun test",
2289
+ "check:skills": "bun run scripts/check-skill-sync.ts",
2290
+ "check:skills:fix": "bun run scripts/check-skill-sync.ts --fix",
2291
+ "hash:check": "bun run scripts/update-manifest-hashes.ts --check",
2292
+ "hash:update": "bun run scripts/update-manifest-hashes.ts",
2293
+ prepublishOnly: "bun run build"
2294
+ },
2295
+ files: [
2296
+ "dist/",
2297
+ "assets/",
2298
+ "manifest.json",
2299
+ "LICENSE"
2300
+ ],
2301
+ keywords: [
2302
+ "opencode",
2303
+ "installer",
2304
+ "cli",
2305
+ "agent"
2306
+ ],
2307
+ license: "MIT",
2308
+ dependencies: {
2309
+ "@clack/prompts": "^0.9.0"
2310
+ },
2311
+ devDependencies: {
2312
+ "@types/bun": "latest",
2313
+ typescript: "^5.0.0"
2314
+ },
2315
+ publishConfig: {
2316
+ access: "public"
2317
+ },
2318
+ engines: {
2319
+ node: ">=20.0.0"
2320
+ }
2321
+ };
2322
+
2323
+ // src/prompts/index.ts
2324
+ init_dist2();
2325
+ init_fs();
2326
+
2327
+ // src/prompts/helpers.ts
2328
+ init_dist2();
2329
+ init_github();
2330
+ init_fs();
2331
+ init_lockfile();
2332
+
2333
+ // src/installer.ts
2334
+ init_github();
2335
+ init_lockfile();
2336
+ init_security();
2337
+ init_fs();
2338
+ init_config();
2339
+ import {
2340
+ existsSync as existsSync5,
2341
+ mkdirSync as mkdirSync3,
2342
+ writeFileSync as writeFileSync5,
2343
+ unlinkSync as unlinkSync2,
2344
+ readdirSync as readdirSync2,
2345
+ statSync as statSync2,
2346
+ copyFileSync as copyFileSync2,
2347
+ readFileSync as readFileSync5,
2348
+ rmSync as rmSync2
2349
+ } from "fs";
2350
+ import { execSync as execSync2 } from "child_process";
2351
+ import { join as join6 } from "path";
2352
+ function upsertLockfile(paths, type, item, manifest, contentHash) {
2353
+ const existing = readLockfile(paths.root) ?? {
2354
+ version: manifest.version,
2355
+ lockedAt: new Date().toISOString(),
2356
+ repo: manifest.repo,
2357
+ tag: manifest.tag,
2358
+ agents: {},
2359
+ commands: {},
2360
+ skills: {}
2361
+ };
2362
+ if (!existing.skills)
2363
+ existing.skills = {};
2364
+ if (!existing.mcpServers)
2365
+ existing.mcpServers = {};
2366
+ if (!existing[type])
2367
+ existing[type] = {};
2368
+ existing[type][item.name] = {
2369
+ version: item.version,
2370
+ installedAt: new Date().toISOString(),
2371
+ sha256: contentHash
2372
+ };
2373
+ existing.tag = manifest.tag;
2374
+ existing.version = manifest.version;
2375
+ existing.lockedAt = new Date().toISOString();
2376
+ writeLockfile(paths.root, existing);
2377
+ }
2378
+ function readBundledAsset(relativePath) {
2379
+ const fullPath = join6(PACKAGE_ROOT, relativePath);
2380
+ if (!existsSync5(fullPath))
2381
+ return null;
2382
+ return readFileSync5(fullPath, "utf-8");
2383
+ }
2384
+ async function installAgent(item, manifest, paths) {
2385
+ let content;
2386
+ try {
2387
+ content = await downloadFile(manifest, item.file);
2388
+ } catch (downloadErr) {
2389
+ const bundled = readBundledAsset(item.file);
2390
+ if (bundled === null) {
2391
+ throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
2392
+ }
2393
+ content = bundled;
2394
+ }
2395
+ writeFileSync5(join6(paths.agents, `${item.name}.md`), content, "utf-8");
2396
+ upsertLockfile(paths, "agents", item, manifest, sha256(content));
2397
+ }
2398
+ async function installCommand(item, manifest, paths) {
2399
+ let content;
2400
+ try {
2401
+ content = await downloadFile(manifest, item.file);
2402
+ } catch (downloadErr) {
2403
+ const bundled = readBundledAsset(item.file);
2404
+ if (bundled === null) {
2405
+ throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
2406
+ }
2407
+ content = bundled;
2408
+ }
2409
+ writeFileSync5(join6(paths.commands, `${item.name}.md`), content, "utf-8");
2410
+ upsertLockfile(paths, "commands", item, manifest, sha256(content));
2411
+ }
2412
+ async function installSkill(item, manifest, paths) {
2413
+ const src = getBundledSkillPath(item.name);
2414
+ if (!existsSync5(src)) {
2415
+ throw new Error(`Skill bundleada no encontrada: ${src}. ¿Falta el directorio assets/skills/${item.name}/?`);
2416
+ }
2417
+ const treeHash = computeTreeHash(src);
2418
+ if (item.sha256 && treeHash !== item.sha256) {
2419
+ throw new Error(`Tree hash inválido para skill "${item.name}"
2420
+ ` + ` esperado: ${item.sha256}
2421
+ ` + ` recibido: ${treeHash}`);
2422
+ }
2423
+ const dest = join6(paths.skills, item.name);
2424
+ if (existsSync5(dest)) {
2425
+ rmSync2(dest, { recursive: true, force: true });
2426
+ }
2427
+ copyDirRecursive(src, dest);
2428
+ upsertLockfile(paths, "skills", item, manifest, treeHash);
2429
+ }
2430
+ async function installMcpServer(item, manifest, paths) {
2431
+ const src = getBundledMcpPath(item.name);
2432
+ if (!existsSync5(src)) {
2433
+ throw new Error(`MCP server bundleado no encontrado: ${src}. ` + `¿Falta el directorio assets/mcp/${item.name}/?`);
2434
+ }
2435
+ const treeHash = computeTreeHash(src);
2436
+ if (item.sha256 && treeHash !== item.sha256) {
2437
+ throw new Error(`Tree hash inválido para MCP server "${item.name}"
2438
+ ` + ` esperado: ${item.sha256}
2439
+ ` + ` recibido: ${treeHash}`);
2440
+ }
2441
+ const dest = join6(paths.mcp, item.name);
2442
+ if (existsSync5(dest)) {
2443
+ rmSync2(dest, { recursive: true, force: true });
2444
+ }
2445
+ mkdirSync3(dest, { recursive: true });
2446
+ const bundledPath = join6(PACKAGE_ROOT, "dist", "mcp", item.name, "index.js");
2447
+ if (existsSync5(bundledPath)) {
2448
+ copyFileSync2(bundledPath, join6(dest, "index.js"));
2449
+ } else {
2450
+ copyDirRecursive(src, dest, true);
2451
+ const installCmd = isCommandAvailable("bun") ? "bun install --no-save" : "npm install --no-audit --no-fund";
2452
+ try {
2453
+ const output = execSync2(installCmd, {
2454
+ cwd: dest,
2455
+ encoding: "utf-8",
2456
+ timeout: 60000
2457
+ });
2458
+ if (output)
2459
+ console.error(output);
2460
+ } catch (e2) {
2461
+ console.error(`[WARN] MCP server "${item.name}" copiado pero ${installCmd} falló: ${e2.message}.
2462
+ ` + ` Resolvé las dependencias manualmente: cd .opencode/mcp/${item.name} && bun install`);
2463
+ }
2464
+ }
2465
+ upsertLockfile(paths, "mcpServers", item, manifest, treeHash);
2466
+ ensureMcpEntry(item.name, {
2467
+ type: "local",
2468
+ command: ["node", `.opencode/mcp/${item.name}/index.js`],
2469
+ enabled: true
2470
+ });
2471
+ }
2472
+ function isMcpServerInstalled(name, paths) {
2473
+ return existsSync5(join6(paths.mcp, name, "index.js"));
2474
+ }
2475
+ function isAgentInstalled(name, paths) {
2476
+ return existsSync5(join6(paths.agents, `${name}.md`));
2477
+ }
2478
+ function isCommandInstalled(name, paths) {
2479
+ return existsSync5(join6(paths.commands, `${name}.md`));
2480
+ }
2481
+ function isSkillInstalled(name, paths) {
2482
+ return existsSync5(join6(paths.skills, name, "SKILL.md"));
2483
+ }
2484
+ function uninstallAgent(name, paths) {
2485
+ const filePath = join6(paths.agents, `${name}.md`);
2486
+ try {
2487
+ if (existsSync5(filePath)) {
2488
+ unlinkSync2(filePath);
2489
+ }
2490
+ } catch {
2491
+ return false;
2492
+ }
2493
+ removeFromLockfile(paths.root, "agents", name);
2494
+ return true;
2495
+ }
2496
+ function uninstallCommand(name, paths) {
2497
+ const filePath = join6(paths.commands, `${name}.md`);
2498
+ try {
2499
+ if (existsSync5(filePath)) {
2500
+ unlinkSync2(filePath);
2501
+ }
2502
+ } catch {
2503
+ return false;
2504
+ }
2505
+ removeFromLockfile(paths.root, "commands", name);
2506
+ return true;
2507
+ }
2508
+ function uninstallSkill(name, paths) {
2509
+ const dirPath = join6(paths.skills, name);
2510
+ try {
2511
+ if (existsSync5(dirPath)) {
2512
+ rmSync2(dirPath, { recursive: true, force: true });
2513
+ }
2514
+ } catch {
2515
+ return false;
2516
+ }
2517
+ removeFromLockfile(paths.root, "skills", name);
2518
+ return true;
2519
+ }
2520
+ function uninstallMcpServer(name, paths) {
2521
+ const dirPath = join6(paths.mcp, name);
2522
+ try {
2523
+ if (existsSync5(dirPath)) {
2524
+ rmSync2(dirPath, { recursive: true, force: true });
2525
+ }
2526
+ } catch {
2527
+ return false;
2528
+ }
2529
+ const projectRoot = findProjectRoot();
2530
+ const configPath = findOpenCodeConfig(projectRoot);
2531
+ if (configPath) {
2532
+ const config = readOpenCodeConfig(configPath);
2533
+ if (config) {
2534
+ const mcp = config.mcp;
2535
+ if (mcp && mcp[name]) {
2536
+ delete mcp[name];
2537
+ if (Object.keys(mcp).length === 0) {
2538
+ delete config.mcp;
2539
+ }
2540
+ writeOpenCodeConfig(configPath, config);
2541
+ }
2542
+ }
2543
+ }
2544
+ removeFromLockfile(paths.root, "mcpServers", name);
2545
+ return true;
2546
+ }
2547
+ function uninstallAll(paths) {
2548
+ const lockfile = readLockfile(paths.root);
2549
+ if (!lockfile)
2550
+ return;
2551
+ for (const name of Object.keys(lockfile.agents)) {
2552
+ uninstallAgent(name, paths);
2553
+ }
2554
+ for (const name of Object.keys(lockfile.commands)) {
2555
+ uninstallCommand(name, paths);
2556
+ }
2557
+ for (const name of Object.keys(lockfile.skills ?? {})) {
2558
+ uninstallSkill(name, paths);
2559
+ }
2560
+ for (const name of Object.keys(lockfile.mcpServers ?? {})) {
2561
+ uninstallMcpServer(name, paths);
2562
+ }
2563
+ if (existsSync5(paths.mcp)) {
2564
+ for (const entry of readdirSync2(paths.mcp)) {
2565
+ const dirPath = join6(paths.mcp, entry);
2566
+ if (statSync2(dirPath).isDirectory()) {
2567
+ uninstallMcpServer(entry, paths);
2568
+ }
2569
+ }
2570
+ }
2571
+ clearLockfile(paths.root);
2572
+ }
2062
2573
 
2063
- // src/prompts.ts
2574
+ // src/prompts/helpers.ts
2064
2575
  function onCancel(value) {
2065
2576
  if (BD(value)) {
2066
2577
  fe("Operación cancelada.");
@@ -2096,38 +2607,6 @@ function printPostInstallSteps() {
2096
2607
  ].join(`
2097
2608
  `), "Próximos pasos");
2098
2609
  }
2099
- async function doInstallStack(toolsDir) {
2100
- const spin = L2();
2101
- let allOk = true;
2102
- spin.start("Instalando CodeGraph...");
2103
- const cg = await installCodeGraph(toolsDir);
2104
- spin.stop(cg.success ? `✓ ${cg.message}` : `✗ ${cg.message}`);
2105
- if (!cg.success)
2106
- allOk = false;
2107
- spin.start("Configurando OpenSpec...");
2108
- const os = setupOpenSpec();
2109
- spin.stop(os.success ? `✓ ${os.message}` : `✗ ${os.message}`);
2110
- if (!os.success)
2111
- allOk = false;
2112
- spin.start("Instalando Engram...");
2113
- const eng = await installEngram(toolsDir);
2114
- spin.stop(eng.success ? `✓ ${eng.message}` : `✗ ${eng.message}`);
2115
- if (!eng.success)
2116
- allOk = false;
2117
- spin.start("Configurando Context7...");
2118
- const ctx = setupContext7(toolsDir);
2119
- spin.stop(ctx.success ? `✓ ${ctx.message}` : `✗ ${ctx.message}`);
2120
- if (!ctx.success)
2121
- allOk = false;
2122
- spin.start("Verificando configuración...");
2123
- const cfg = patchOpenCodeConfig();
2124
- spin.stop(cfg.success ? `✓ ${cfg.message}` : `✗ ${cfg.message}`);
2125
- if (!cfg.success)
2126
- allOk = false;
2127
- if (!allOk) {
2128
- v2.warn("Algunos componentes requieren atención. Revisá los mensajes de error arriba.");
2129
- }
2130
- }
2131
2610
  async function resolveOpenCodePaths() {
2132
2611
  const existing = findOpenCodeDir();
2133
2612
  if (existing) {
@@ -2148,6 +2627,26 @@ Raíz detectada: ${projectRoot}`, "Aviso");
2148
2627
  v2.success(`Estructura creada en ${paths.root}`);
2149
2628
  return paths;
2150
2629
  }
2630
+ function getOrphanedItems(manifest, paths) {
2631
+ const lockfile = readLockfile(paths.root);
2632
+ if (!lockfile)
2633
+ return [];
2634
+ const manifestNames = {
2635
+ agents: new Set(manifest.agents.map((a2) => a2.name)),
2636
+ commands: new Set(manifest.commands.map((c2) => c2.name)),
2637
+ skills: new Set((manifest.skills ?? []).map((s) => s.name)),
2638
+ mcpServers: new Set((manifest.mcpServers ?? []).map((m3) => m3.name))
2639
+ };
2640
+ const orphans = [];
2641
+ for (const type of ["agents", "commands", "skills", "mcpServers"]) {
2642
+ for (const [name, data] of Object.entries(lockfile[type] ?? {})) {
2643
+ if (!manifestNames[type].has(name)) {
2644
+ orphans.push({ type, name, version: data.version });
2645
+ }
2646
+ }
2647
+ }
2648
+ return orphans;
2649
+ }
2151
2650
  function getUpdateCandidates(manifest, paths) {
2152
2651
  const lockfile = readLockfile(paths.root);
2153
2652
  const candidates = [];
@@ -2200,6 +2699,46 @@ function kindLabel(type) {
2200
2699
  return "MCP";
2201
2700
  }
2202
2701
  }
2702
+
2703
+ // src/prompts/install.ts
2704
+ init_dist2();
2705
+ import { join as join8 } from "path";
2706
+ import { existsSync as existsSync7 } from "fs";
2707
+ init_stack();
2708
+ init_fs();
2709
+ async function doInstallStack(toolsDir) {
2710
+ const spin = L2();
2711
+ let allOk = true;
2712
+ spin.start("Instalando CodeGraph...");
2713
+ const cg = await installCodeGraph(toolsDir);
2714
+ spin.stop(cg.success ? `✓ ${cg.message}` : `✗ ${cg.message}`);
2715
+ if (!cg.success)
2716
+ allOk = false;
2717
+ spin.start("Configurando OpenSpec...");
2718
+ const os = setupOpenSpec();
2719
+ spin.stop(os.success ? `✓ ${os.message}` : `✗ ${os.message}`);
2720
+ if (!os.success)
2721
+ allOk = false;
2722
+ spin.start("Instalando Engram...");
2723
+ const eng = await installEngram(toolsDir);
2724
+ spin.stop(eng.success ? `✓ ${eng.message}` : `✗ ${eng.message}`);
2725
+ if (!eng.success)
2726
+ allOk = false;
2727
+ spin.start("Configurando Context7...");
2728
+ const ctx = setupContext7(toolsDir);
2729
+ spin.stop(ctx.success ? `✓ ${ctx.message}` : `✗ ${ctx.message}`);
2730
+ if (!ctx.success)
2731
+ allOk = false;
2732
+ spin.start("Verificando configuración...");
2733
+ const { patchOpenCodeConfig: patchOpenCodeConfig2 } = await Promise.resolve().then(() => (init_config(), exports_config));
2734
+ const cfg = patchOpenCodeConfig2();
2735
+ spin.stop(cfg.success ? `✓ ${cfg.message}` : `✗ ${cfg.message}`);
2736
+ if (!cfg.success)
2737
+ allOk = false;
2738
+ if (!allOk) {
2739
+ v2.warn("Algunos componentes requieren atención. Revisá los mensajes de error arriba.");
2740
+ }
2741
+ }
2203
2742
  async function doInstallAll(manifest, paths) {
2204
2743
  const spin = L2();
2205
2744
  let errors = 0;
@@ -2230,191 +2769,541 @@ async function doInstallAll(manifest, paths) {
2230
2769
  await installSkill(skill, manifest, paths);
2231
2770
  spin.stop(`Skill instalada: ${skill.name} (${skill.version})`);
2232
2771
  } catch (e2) {
2233
- spin.stop(`Error en ${skill.name}: ${e2.message}`);
2234
- errors++;
2772
+ spin.stop(`Error en ${skill.name}: ${e2.message}`);
2773
+ errors++;
2774
+ }
2775
+ }
2776
+ for (const mcp of manifest.mcpServers ?? []) {
2777
+ spin.start(`Instalando MCP server: ${mcp.name} (${mcp.version})`);
2778
+ try {
2779
+ await installMcpServer(mcp, manifest, paths);
2780
+ spin.stop(`MCP server instalado: ${mcp.name} (${mcp.version})`);
2781
+ } catch (e2) {
2782
+ spin.stop(`Error en ${mcp.name}: ${e2.message}`);
2783
+ errors++;
2784
+ }
2785
+ }
2786
+ v2.info("Instalando stack de herramientas...");
2787
+ await doInstallStack(paths.tools);
2788
+ const missingTools = [];
2789
+ const codegraphBin = join8(paths.tools, "codegraph", "bin", "codegraph");
2790
+ const engramBin = join8(paths.tools, "engram", "bin", "engram");
2791
+ if (!existsSync7(codegraphBin))
2792
+ missingTools.push("CodeGraph");
2793
+ if (!existsSync7(engramBin))
2794
+ missingTools.push("Engram");
2795
+ if (missingTools.length > 0) {
2796
+ v2.warn(`Faltan herramientas del stack: ${missingTools.join(", ")}.
2797
+ ` + "Ejecutá `/install-stack` desde el agente para instalarlas manualmente.");
2798
+ }
2799
+ if (errors === 0) {
2800
+ v2.success("Todo instalado correctamente.");
2801
+ } else {
2802
+ v2.warn(`Completado con ${errors} error(es).`);
2803
+ }
2804
+ }
2805
+
2806
+ // src/prompts/add.ts
2807
+ init_dist2();
2808
+ init_lockfile();
2809
+ async function doAddAgent(manifest, paths) {
2810
+ const lockfile = readLockfile(paths.root);
2811
+ const options = manifest.agents.map((a2) => {
2812
+ const installed = getInstalledVersion(lockfile, "agents", a2.name);
2813
+ const hint = installed ? `v${installed} instalado — ${a2.description}` : a2.description;
2814
+ return { value: a2.name, label: `${a2.name} (v${a2.version})`, hint };
2815
+ });
2816
+ const selected = await pe({
2817
+ message: "¿Qué agentes deseas instalar?",
2818
+ options,
2819
+ required: true
2820
+ });
2821
+ onCancel(selected);
2822
+ const spin = L2();
2823
+ for (const name of selected) {
2824
+ const item = manifest.agents.find((a2) => a2.name === name);
2825
+ spin.start(`Descargando agente: ${name} (${item.version})`);
2826
+ try {
2827
+ await installAgent(item, manifest, paths);
2828
+ spin.stop(`Agente instalado: ${name} (${item.version})`);
2829
+ } catch (e2) {
2830
+ spin.stop(`Error: ${e2.message}`);
2831
+ }
2832
+ }
2833
+ }
2834
+ async function doAddCommand(manifest, paths) {
2835
+ const lockfile = readLockfile(paths.root);
2836
+ const options = manifest.commands.map((c2) => {
2837
+ const installed = getInstalledVersion(lockfile, "commands", c2.name);
2838
+ const hint = installed ? `v${installed} instalado — ${c2.description}` : c2.description;
2839
+ return { value: c2.name, label: `${c2.name} (v${c2.version})`, hint };
2840
+ });
2841
+ const selected = await pe({
2842
+ message: "¿Qué commands deseas instalar?",
2843
+ options,
2844
+ required: true
2845
+ });
2846
+ onCancel(selected);
2847
+ const spin = L2();
2848
+ for (const name of selected) {
2849
+ const item = manifest.commands.find((c2) => c2.name === name);
2850
+ spin.start(`Descargando command: ${name} (${item.version})`);
2851
+ try {
2852
+ await installCommand(item, manifest, paths);
2853
+ spin.stop(`Command instalado: ${name} (${item.version})`);
2854
+ } catch (e2) {
2855
+ spin.stop(`Error: ${e2.message}`);
2856
+ }
2857
+ }
2858
+ }
2859
+ async function doAddSkill(manifest, paths) {
2860
+ const lockfile = readLockfile(paths.root);
2861
+ const options = (manifest.skills ?? []).map((s) => {
2862
+ const installed = getInstalledVersion(lockfile, "skills", s.name);
2863
+ const hint = installed ? `v${installed} instalado — ${s.description}` : s.description;
2864
+ return { value: s.name, label: `${s.name} (v${s.version})`, hint };
2865
+ });
2866
+ if (options.length === 0) {
2867
+ v2.info("No hay skills disponibles en el manifest.");
2868
+ return;
2869
+ }
2870
+ const selected = await pe({
2871
+ message: "¿Qué skills deseas instalar?",
2872
+ options,
2873
+ required: true
2874
+ });
2875
+ onCancel(selected);
2876
+ const spin = L2();
2877
+ for (const name of selected) {
2878
+ const item = manifest.skills.find((s) => s.name === name);
2879
+ spin.start(`Instalando skill: ${name} (${item.version})`);
2880
+ try {
2881
+ await installSkill(item, manifest, paths);
2882
+ spin.stop(`Skill instalada: ${name} (${item.version})`);
2883
+ } catch (e2) {
2884
+ spin.stop(`Error: ${e2.message}`);
2885
+ }
2886
+ }
2887
+ }
2888
+ async function doAddMcp(manifest, paths) {
2889
+ const lockfile = readLockfile(paths.root);
2890
+ const options = (manifest.mcpServers ?? []).map((m3) => {
2891
+ const installed = getInstalledVersion(lockfile, "mcpServers", m3.name);
2892
+ const hint = installed ? `v${installed} instalado — ${m3.description}` : m3.description;
2893
+ return { value: m3.name, label: `${m3.name} (v${m3.version})`, hint };
2894
+ });
2895
+ if (options.length === 0) {
2896
+ v2.info("No hay MCP servers disponibles en el manifest.");
2897
+ return;
2898
+ }
2899
+ const selected = await pe({
2900
+ message: "¿Qué MCP servers deseas instalar?",
2901
+ options,
2902
+ required: true
2903
+ });
2904
+ onCancel(selected);
2905
+ const spin = L2();
2906
+ for (const name of selected) {
2907
+ const item = manifest.mcpServers?.find((m3) => m3.name === name);
2908
+ if (!item)
2909
+ continue;
2910
+ spin.start(`Instalando MCP server: ${name} (${item.version})`);
2911
+ try {
2912
+ await installMcpServer(item, manifest, paths);
2913
+ spin.stop(`MCP server instalado: ${name} (${item.version})`);
2914
+ } catch (e2) {
2915
+ spin.stop(`Error: ${e2.message}`);
2916
+ }
2917
+ }
2918
+ }
2919
+
2920
+ // src/prompts/update.ts
2921
+ init_dist2();
2922
+ init_lockfile();
2923
+ async function doUpdate(manifest, paths) {
2924
+ const candidates = getUpdateCandidates(manifest, paths);
2925
+ const orphans = getOrphanedItems(manifest, paths);
2926
+ if (orphans.length > 0) {
2927
+ const orphanLines = orphans.map((o) => {
2928
+ const kind = kindLabel(o.type);
2929
+ return ` ${kind.padEnd(8)} ${o.name.padEnd(24)} v${o.version} (ya no existe en el manifest)`;
2930
+ });
2931
+ v2.warn(`Items huérfanos detectados (ya no en manifest):`);
2932
+ ye(orphanLines.join(`
2933
+ `), "Items huérfanos");
2934
+ const shouldClean = await me({
2935
+ message: `¿Eliminar ${orphans.length} item(s) huérfano(s) del lockfile? No se borran archivos, solo el registro.`
2936
+ });
2937
+ onCancel(shouldClean);
2938
+ if (shouldClean) {
2939
+ for (const o of orphans) {
2940
+ removeFromLockfile(paths.root, o.type, o.name);
2941
+ }
2942
+ v2.success(`${orphans.length} item(s) huérfano(s) limpiados del lockfile.`);
2943
+ }
2944
+ }
2945
+ if (candidates.length === 0) {
2946
+ if (orphans.length > 0) {
2947
+ v2.info("Lockfile limpiado. No hay actualizaciones disponibles.");
2948
+ } else {
2949
+ v2.info("Todo está al día. No hay actualizaciones disponibles.");
2950
+ }
2951
+ return;
2952
+ }
2953
+ const diffLines = candidates.map(({ type, item, installedVersion }) => {
2954
+ const kind = kindLabel(type);
2955
+ return ` ${kind.padEnd(8)} ${item.name.padEnd(24)} ${formatVersionDiff(installedVersion, item.version)}`;
2956
+ });
2957
+ ye(diffLines.join(`
2958
+ `), "Actualizaciones disponibles");
2959
+ const confirm = await me({
2960
+ message: `¿Aplicar ${candidates.length} actualización(es)?`
2961
+ });
2962
+ onCancel(confirm);
2963
+ if (!confirm) {
2964
+ v2.info("Actualización cancelada.");
2965
+ return;
2966
+ }
2967
+ const spin = L2();
2968
+ let updated = 0;
2969
+ for (const { type, item } of candidates) {
2970
+ spin.start(`Actualizando: ${item.name} → ${item.version}`);
2971
+ try {
2972
+ if (type === "agents") {
2973
+ await installAgent(item, manifest, paths);
2974
+ } else if (type === "commands") {
2975
+ await installCommand(item, manifest, paths);
2976
+ } else if (type === "skills") {
2977
+ await installSkill(item, manifest, paths);
2978
+ } else {
2979
+ await installMcpServer(item, manifest, paths);
2980
+ }
2981
+ spin.stop(`Actualizado: ${item.name} (${item.version})`);
2982
+ updated++;
2983
+ } catch (e2) {
2984
+ spin.stop(`Error en ${item.name}: ${e2.message}`);
2235
2985
  }
2236
2986
  }
2237
- for (const mcp of manifest.mcpServers ?? []) {
2238
- spin.start(`Instalando MCP server: ${mcp.name} (${mcp.version})`);
2239
- try {
2240
- await installMcpServer(mcp, manifest, paths);
2241
- spin.stop(`MCP server instalado: ${mcp.name} (${mcp.version})`);
2242
- } catch (e2) {
2243
- spin.stop(`Error en ${mcp.name}: ${e2.message}`);
2244
- errors++;
2245
- }
2987
+ v2.success(`${updated} recurso(s) actualizado(s).`);
2988
+ }
2989
+
2990
+ // src/prompts/uninstall.ts
2991
+ init_dist2();
2992
+ import { join as join9 } from "path";
2993
+ init_stack();
2994
+ init_lockfile();
2995
+ async function doUninstallTotal(paths) {
2996
+ const lockfile = readLockfile(paths.root);
2997
+ if (!lockfile || Object.keys(lockfile.agents).length === 0 && Object.keys(lockfile.commands).length === 0 && Object.keys(lockfile.skills ?? {}).length === 0 && Object.keys(lockfile.mcpServers ?? {}).length === 0) {
2998
+ v2.info("No hay nada instalado.");
2999
+ return;
2246
3000
  }
2247
- v2.info("Instalando stack de herramientas...");
2248
- await doInstallStack(paths.tools);
2249
- const missingTools = [];
2250
- const codegraphBin = join5(paths.tools, "codegraph", "bin", "codegraph");
2251
- const engramBin = join5(paths.tools, "engram", "bin", "engram");
2252
- if (!existsSync4(codegraphBin))
2253
- missingTools.push("CodeGraph");
2254
- if (!existsSync4(engramBin))
2255
- missingTools.push("Engram");
2256
- if (missingTools.length > 0) {
2257
- v2.warn(`Faltan herramientas del stack: ${missingTools.join(", ")}.
2258
- ` + "Ejecutá `/install-stack` desde el agente para instalarlas manualmente.");
3001
+ const pathsToDelete = [];
3002
+ for (const name of Object.keys(lockfile.agents)) {
3003
+ pathsToDelete.push(join9(paths.agents, `${name}.md`));
2259
3004
  }
2260
- if (errors === 0) {
2261
- v2.success("Todo instalado correctamente.");
2262
- } else {
2263
- v2.warn(`Completado con ${errors} error(es).`);
3005
+ for (const name of Object.keys(lockfile.commands)) {
3006
+ pathsToDelete.push(join9(paths.commands, `${name}.md`));
3007
+ }
3008
+ for (const name of Object.keys(lockfile.skills ?? {})) {
3009
+ pathsToDelete.push(join9(paths.skills, name));
3010
+ }
3011
+ for (const name of Object.keys(lockfile.mcpServers ?? {})) {
3012
+ pathsToDelete.push(join9(paths.mcp, name));
3013
+ }
3014
+ ye(pathsToDelete.join(`
3015
+ `), `Se eliminarán ${pathsToDelete.length} archivo(s) / directorio(s)`);
3016
+ const confirm = await me({
3017
+ message: `¿Confirmar desinstalación de ${pathsToDelete.length} item(s)?`
3018
+ });
3019
+ onCancel(confirm);
3020
+ if (!confirm) {
3021
+ v2.info("Desinstalación cancelada.");
3022
+ return;
3023
+ }
3024
+ uninstallAll(paths);
3025
+ v2.success(`${pathsToDelete.length} item(s) eliminado(s).`);
3026
+ const cleanEngram = await me({
3027
+ message: "¿Deseas remover la configuración de Engram del proyecto (mcp.engram)?"
3028
+ });
3029
+ onCancel(cleanEngram);
3030
+ if (cleanEngram) {
3031
+ const result = uninstallEngramConfig();
3032
+ if (result.success) {
3033
+ v2.success(result.message);
3034
+ } else {
3035
+ v2.warn(result.message);
3036
+ }
2264
3037
  }
2265
3038
  }
2266
- async function doAddAgent(manifest, paths) {
3039
+ async function doUninstallAgent(paths) {
2267
3040
  const lockfile = readLockfile(paths.root);
2268
- const options = manifest.agents.map((a2) => {
2269
- const installed = getInstalledVersion(lockfile, "agents", a2.name);
2270
- const hint = installed ? `v${installed} instalado — ${a2.description}` : a2.description;
2271
- return { value: a2.name, label: `${a2.name} (v${a2.version})`, hint };
2272
- });
3041
+ if (!lockfile) {
3042
+ v2.warn("No hay instalación registrada.");
3043
+ return;
3044
+ }
3045
+ const installed = Object.keys(lockfile.agents);
3046
+ if (installed.length === 0) {
3047
+ v2.info("No hay agentes instalados.");
3048
+ return;
3049
+ }
3050
+ const options = installed.map((name) => ({
3051
+ value: name,
3052
+ label: name,
3053
+ hint: `v${lockfile.agents[name].version}`
3054
+ }));
2273
3055
  const selected = await pe({
2274
- message: "¿Qué agentes deseas instalar?",
3056
+ message: "¿Qué agentes querés desinstalar?",
2275
3057
  options,
2276
3058
  required: true
2277
3059
  });
2278
3060
  onCancel(selected);
2279
- const spin = L2();
2280
3061
  for (const name of selected) {
2281
- const item = manifest.agents.find((a2) => a2.name === name);
2282
- spin.start(`Descargando agente: ${name} (${item.version})`);
2283
- try {
2284
- await installAgent(item, manifest, paths);
2285
- spin.stop(`Agente instalado: ${name} (${item.version})`);
2286
- } catch (e2) {
2287
- spin.stop(`Error: ${e2.message}`);
3062
+ const ok = uninstallAgent(name, paths);
3063
+ if (ok) {
3064
+ v2.success(`Agente eliminado: ${name}`);
3065
+ } else {
3066
+ v2.warn(`No se pudo eliminar el agente: ${name}`);
2288
3067
  }
2289
3068
  }
2290
3069
  }
2291
- async function doAddCommand(manifest, paths) {
3070
+ async function doUninstallCommand(paths) {
2292
3071
  const lockfile = readLockfile(paths.root);
2293
- const options = manifest.commands.map((c2) => {
2294
- const installed = getInstalledVersion(lockfile, "commands", c2.name);
2295
- const hint = installed ? `v${installed} instalado — ${c2.description}` : c2.description;
2296
- return { value: c2.name, label: `${c2.name} (v${c2.version})`, hint };
2297
- });
3072
+ if (!lockfile) {
3073
+ v2.warn("No hay instalación registrada.");
3074
+ return;
3075
+ }
3076
+ const installed = Object.keys(lockfile.commands);
3077
+ if (installed.length === 0) {
3078
+ v2.info("No hay commands instalados.");
3079
+ return;
3080
+ }
3081
+ const options = installed.map((name) => ({
3082
+ value: name,
3083
+ label: name,
3084
+ hint: `v${lockfile.commands[name].version}`
3085
+ }));
2298
3086
  const selected = await pe({
2299
- message: "¿Qué commands deseas instalar?",
3087
+ message: "¿Qué commands querés desinstalar?",
2300
3088
  options,
2301
3089
  required: true
2302
3090
  });
2303
3091
  onCancel(selected);
2304
- const spin = L2();
2305
3092
  for (const name of selected) {
2306
- const item = manifest.commands.find((c2) => c2.name === name);
2307
- spin.start(`Descargando command: ${name} (${item.version})`);
2308
- try {
2309
- await installCommand(item, manifest, paths);
2310
- spin.stop(`Command instalado: ${name} (${item.version})`);
2311
- } catch (e2) {
2312
- spin.stop(`Error: ${e2.message}`);
3093
+ const ok = uninstallCommand(name, paths);
3094
+ if (ok) {
3095
+ v2.success(`Command eliminado: ${name}`);
3096
+ } else {
3097
+ v2.warn(`No se pudo eliminar el command: ${name}`);
2313
3098
  }
2314
3099
  }
2315
3100
  }
2316
- async function doAddSkill(manifest, paths) {
3101
+ async function doUninstallSkill(paths) {
2317
3102
  const lockfile = readLockfile(paths.root);
2318
- const options = (manifest.skills ?? []).map((s) => {
2319
- const installed = getInstalledVersion(lockfile, "skills", s.name);
2320
- const hint = installed ? `v${installed} instalado — ${s.description}` : s.description;
2321
- return { value: s.name, label: `${s.name} (v${s.version})`, hint };
3103
+ if (!lockfile) {
3104
+ v2.warn("No hay instalación registrada.");
3105
+ return;
3106
+ }
3107
+ const installed = Object.keys(lockfile.skills ?? {});
3108
+ if (installed.length === 0) {
3109
+ v2.info("No hay skills instaladas.");
3110
+ return;
3111
+ }
3112
+ const options = installed.map((name) => ({
3113
+ value: name,
3114
+ label: name,
3115
+ hint: `v${lockfile.skills[name].version}`
3116
+ }));
3117
+ const selected = await pe({
3118
+ message: "¿Qué skills querés desinstalar?",
3119
+ options,
3120
+ required: true
2322
3121
  });
2323
- if (options.length === 0) {
2324
- v2.info("No hay skills disponibles en el manifest.");
3122
+ onCancel(selected);
3123
+ for (const name of selected) {
3124
+ const ok = uninstallSkill(name, paths);
3125
+ if (ok) {
3126
+ v2.success(`Skill eliminada: ${name}`);
3127
+ } else {
3128
+ v2.warn(`No se pudo eliminar la skill: ${name}`);
3129
+ }
3130
+ }
3131
+ }
3132
+ async function doUninstallMcp(paths) {
3133
+ const lockfile = readLockfile(paths.root);
3134
+ if (!lockfile) {
3135
+ v2.warn("No hay instalación registrada.");
2325
3136
  return;
2326
3137
  }
3138
+ const installed = Object.keys(lockfile.mcpServers ?? {});
3139
+ if (installed.length === 0) {
3140
+ v2.info("No hay MCP servers instalados.");
3141
+ return;
3142
+ }
3143
+ const options = installed.map((name) => ({
3144
+ value: name,
3145
+ label: name,
3146
+ hint: `v${lockfile.mcpServers?.[name]?.version ?? "?"}`
3147
+ }));
2327
3148
  const selected = await pe({
2328
- message: "¿Qué skills deseas instalar?",
3149
+ message: "¿Qué MCP servers querés desinstalar?",
2329
3150
  options,
2330
3151
  required: true
2331
3152
  });
2332
3153
  onCancel(selected);
2333
- const spin = L2();
2334
3154
  for (const name of selected) {
2335
- const item = manifest.skills.find((s) => s.name === name);
2336
- spin.start(`Instalando skill: ${name} (${item.version})`);
2337
- try {
2338
- await installSkill(item, manifest, paths);
2339
- spin.stop(`Skill instalada: ${name} (${item.version})`);
2340
- } catch (e2) {
2341
- spin.stop(`Error: ${e2.message}`);
3155
+ const ok = uninstallMcpServer(name, paths);
3156
+ if (ok) {
3157
+ v2.success(`MCP server eliminado: ${name}`);
3158
+ } else {
3159
+ v2.warn(`No se pudo eliminar el MCP server: ${name}`);
2342
3160
  }
2343
3161
  }
2344
3162
  }
2345
- async function doAddMcp(manifest, paths) {
3163
+ async function doUninstall(paths) {
3164
+ const scope = await de({
3165
+ message: "¿Qué querés desinstalar?",
3166
+ options: [
3167
+ { value: "all", label: "Todo (agentes + commands + skills + MCPs)" },
3168
+ { value: "agent", label: "Solo un agente" },
3169
+ { value: "command", label: "Solo un command" },
3170
+ { value: "skill", label: "Solo una skill" },
3171
+ { value: "mcp", label: "Solo un MCP server" }
3172
+ ]
3173
+ });
3174
+ onCancel(scope);
3175
+ switch (scope) {
3176
+ case "all":
3177
+ await doUninstallTotal(paths);
3178
+ break;
3179
+ case "agent":
3180
+ await doUninstallAgent(paths);
3181
+ break;
3182
+ case "command":
3183
+ await doUninstallCommand(paths);
3184
+ break;
3185
+ case "skill":
3186
+ await doUninstallSkill(paths);
3187
+ break;
3188
+ case "mcp":
3189
+ await doUninstallMcp(paths);
3190
+ break;
3191
+ }
3192
+ }
3193
+ async function doUninstallAgentByName(name, paths) {
3194
+ try {
3195
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3196
+ validateFilePath2(`${name}.md`);
3197
+ } catch (e2) {
3198
+ v2.warn(`Nombre inválido: ${e2.message}`);
3199
+ return;
3200
+ }
3201
+ const lockfile = readLockfile(paths.root);
3202
+ if (!lockfile || !(name in lockfile.agents)) {
3203
+ v2.warn(`${name} no está instalado.`);
3204
+ return;
3205
+ }
3206
+ const filePath = join9(paths.agents, `${name}.md`);
3207
+ ye(filePath, `Se eliminará`);
3208
+ const confirm = await me({ message: `¿Borrar ${name}.md?` });
3209
+ onCancel(confirm);
3210
+ if (!confirm) {
3211
+ v2.info("Cancelado.");
3212
+ return;
3213
+ }
3214
+ const ok = uninstallAgent(name, paths);
3215
+ if (ok) {
3216
+ v2.success(`Agente eliminado: ${name}`);
3217
+ } else {
3218
+ v2.warn(`No se pudo eliminar el agente: ${name}`);
3219
+ }
3220
+ }
3221
+ async function doUninstallCommandByName(name, paths) {
3222
+ try {
3223
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3224
+ validateFilePath2(`${name}.md`);
3225
+ } catch (e2) {
3226
+ v2.warn(`Nombre inválido: ${e2.message}`);
3227
+ return;
3228
+ }
3229
+ const lockfile = readLockfile(paths.root);
3230
+ if (!lockfile || !(name in lockfile.commands)) {
3231
+ v2.warn(`${name} no está instalado.`);
3232
+ return;
3233
+ }
3234
+ const filePath = join9(paths.commands, `${name}.md`);
3235
+ ye(filePath, `Se eliminará`);
3236
+ const confirm = await me({ message: `¿Borrar ${name}.md?` });
3237
+ onCancel(confirm);
3238
+ if (!confirm) {
3239
+ v2.info("Cancelado.");
3240
+ return;
3241
+ }
3242
+ const ok = uninstallCommand(name, paths);
3243
+ if (ok) {
3244
+ v2.success(`Command eliminado: ${name}`);
3245
+ } else {
3246
+ v2.warn(`No se pudo eliminar el command: ${name}`);
3247
+ }
3248
+ }
3249
+ async function doUninstallSkillByName(name, paths) {
3250
+ try {
3251
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3252
+ validateFilePath2(name);
3253
+ } catch (e2) {
3254
+ v2.warn(`Nombre inválido: ${e2.message}`);
3255
+ return;
3256
+ }
2346
3257
  const lockfile = readLockfile(paths.root);
2347
- const options = (manifest.mcpServers ?? []).map((m3) => {
2348
- const installed = getInstalledVersion(lockfile, "mcpServers", m3.name);
2349
- const hint = installed ? `v${installed} instalado — ${m3.description}` : m3.description;
2350
- return { value: m3.name, label: `${m3.name} (v${m3.version})`, hint };
2351
- });
2352
- if (options.length === 0) {
2353
- v2.info("No hay MCP servers disponibles en el manifest.");
3258
+ if (!lockfile || !lockfile.skills || !(name in lockfile.skills)) {
3259
+ v2.warn(`${name} no está instalado.`);
2354
3260
  return;
2355
3261
  }
2356
- const selected = await pe({
2357
- message: "¿Qué MCP servers deseas instalar?",
2358
- options,
2359
- required: true
2360
- });
2361
- onCancel(selected);
2362
- const spin = L2();
2363
- for (const name of selected) {
2364
- const item = manifest.mcpServers?.find((m3) => m3.name === name);
2365
- if (!item)
2366
- continue;
2367
- spin.start(`Instalando MCP server: ${name} (${item.version})`);
2368
- try {
2369
- await installMcpServer(item, manifest, paths);
2370
- spin.stop(`MCP server instalado: ${name} (${item.version})`);
2371
- } catch (e2) {
2372
- spin.stop(`Error: ${e2.message}`);
2373
- }
3262
+ const dirPath = join9(paths.skills, name);
3263
+ ye(dirPath, `Se eliminará`);
3264
+ const confirm = await me({ message: `¿Borrar la skill "${name}"?` });
3265
+ onCancel(confirm);
3266
+ if (!confirm) {
3267
+ v2.info("Cancelado.");
3268
+ return;
3269
+ }
3270
+ const ok = uninstallSkill(name, paths);
3271
+ if (ok) {
3272
+ v2.success(`Skill eliminada: ${name}`);
3273
+ } else {
3274
+ v2.warn(`No se pudo eliminar la skill: ${name}`);
2374
3275
  }
2375
3276
  }
2376
- async function doUpdate(manifest, paths) {
2377
- const candidates = getUpdateCandidates(manifest, paths);
2378
- if (candidates.length === 0) {
2379
- v2.info("Todo está al día. No hay actualizaciones disponibles.");
3277
+ async function doUninstallMcpByName(name, paths) {
3278
+ try {
3279
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3280
+ validateFilePath2(name);
3281
+ } catch (e2) {
3282
+ v2.warn(`Nombre inválido: ${e2.message}`);
2380
3283
  return;
2381
3284
  }
2382
- const diffLines = candidates.map(({ type, item, installedVersion }) => {
2383
- const kind = kindLabel(type);
2384
- return ` ${kind.padEnd(8)} ${item.name.padEnd(24)} ${formatVersionDiff(installedVersion, item.version)}`;
2385
- });
2386
- ye(diffLines.join(`
2387
- `), "Actualizaciones disponibles");
2388
- const confirm = await me({
2389
- message: `¿Aplicar ${candidates.length} actualización(es)?`
2390
- });
3285
+ const lockfile = readLockfile(paths.root);
3286
+ if (!lockfile || !lockfile.mcpServers || !(name in lockfile.mcpServers)) {
3287
+ v2.warn(`${name} no está instalado.`);
3288
+ return;
3289
+ }
3290
+ const dirPath = join9(paths.mcp, name);
3291
+ ye(dirPath, `Se eliminará`);
3292
+ const confirm = await me({ message: `¿Borrar el MCP server "${name}"?` });
2391
3293
  onCancel(confirm);
2392
3294
  if (!confirm) {
2393
- v2.info("Actualización cancelada.");
3295
+ v2.info("Cancelado.");
2394
3296
  return;
2395
3297
  }
2396
- const spin = L2();
2397
- let updated = 0;
2398
- for (const { type, item } of candidates) {
2399
- spin.start(`Actualizando: ${item.name} → ${item.version}`);
2400
- try {
2401
- if (type === "agents") {
2402
- await installAgent(item, manifest, paths);
2403
- } else if (type === "commands") {
2404
- await installCommand(item, manifest, paths);
2405
- } else if (type === "skills") {
2406
- await installSkill(item, manifest, paths);
2407
- } else {
2408
- await installMcpServer(item, manifest, paths);
2409
- }
2410
- spin.stop(`Actualizado: ${item.name} (${item.version})`);
2411
- updated++;
2412
- } catch (e2) {
2413
- spin.stop(`Error en ${item.name}: ${e2.message}`);
2414
- }
3298
+ const ok = uninstallMcpServer(name, paths);
3299
+ if (ok) {
3300
+ v2.success(`MCP server eliminado: ${name}`);
3301
+ } else {
3302
+ v2.warn(`No se pudo eliminar el MCP server: ${name}`);
2415
3303
  }
2416
- v2.success(`${updated} recurso(s) actualizado(s).`);
2417
3304
  }
3305
+
3306
+ // src/prompts/index.ts
2418
3307
  async function runInteractiveMenu() {
2419
3308
  we(" OpenCode Installer ");
2420
3309
  const manifest = await loadManifest();
@@ -2480,313 +3369,116 @@ async function runInteractiveMenu() {
2480
3369
  await doUninstall(paths);
2481
3370
  fe("Listo.");
2482
3371
  break;
2483
- case "exit":
2484
- fe("Hasta luego.");
2485
- break;
2486
- }
2487
- }
2488
- async function runInstallCommand() {
2489
- we(" OpenCode Installer ");
2490
- const manifest = await loadManifest();
2491
- const paths = await resolveOpenCodePaths();
2492
- if (!paths) {
2493
- fe("Cancelado.");
2494
- return;
2495
- }
2496
- await doInstallAll(manifest, paths);
2497
- printPostInstallSteps();
2498
- fe("Instalación completada.");
2499
- }
2500
- async function runAddAgentCommand() {
2501
- we(" OpenCode Installer ");
2502
- const manifest = await loadManifest();
2503
- const paths = await resolveOpenCodePaths();
2504
- if (!paths) {
2505
- fe("Cancelado.");
2506
- return;
2507
- }
2508
- await doAddAgent(manifest, paths);
2509
- printPostInstallSteps();
2510
- fe("Listo.");
2511
- }
2512
- async function runAddCommandCommand() {
2513
- we(" OpenCode Installer ");
2514
- const manifest = await loadManifest();
2515
- const paths = await resolveOpenCodePaths();
2516
- if (!paths) {
2517
- fe("Cancelado.");
2518
- return;
2519
- }
2520
- await doAddCommand(manifest, paths);
2521
- printPostInstallSteps();
2522
- fe("Listo.");
2523
- }
2524
- async function runAddSkillCommand() {
2525
- we(" OpenCode Installer ");
2526
- const manifest = await loadManifest();
2527
- const paths = await resolveOpenCodePaths();
2528
- if (!paths) {
2529
- fe("Cancelado.");
2530
- return;
2531
- }
2532
- await doAddSkill(manifest, paths);
2533
- printPostInstallSteps();
2534
- fe("Listo.");
2535
- }
2536
- async function runAddMcpCommand() {
2537
- we(" OpenCode Installer ");
2538
- const manifest = await loadManifest();
2539
- const paths = await resolveOpenCodePaths();
2540
- if (!paths) {
2541
- fe("Cancelado.");
2542
- return;
2543
- }
2544
- await doAddMcp(manifest, paths);
2545
- printPostInstallSteps();
2546
- fe("Listo.");
2547
- }
2548
- async function runInstallStackCommand() {
2549
- we(" OpenCode Installer — Stack ");
2550
- const paths = await resolveOpenCodePaths();
2551
- if (!paths) {
2552
- fe("Cancelado.");
2553
- return;
2554
- }
2555
- ensureToolDirs(paths.tools, ["codegraph", "engram", "context7"]);
2556
- await doInstallStack(paths.tools);
2557
- fe("Stack instalado.");
2558
- }
2559
- async function runUninstallStackCommand() {
2560
- we(" OpenCode Installer — Stack ");
2561
- const paths = await resolveOpenCodePaths();
2562
- if (!paths) {
2563
- fe("Cancelado.");
2564
- return;
2565
- }
2566
- const confirm = await me({
2567
- message: "¿Remover la configuración del stack (CodeGraph, Engram, Context7) del proyecto? Los binarios globales no se tocan."
2568
- });
2569
- onCancel(confirm);
2570
- if (!confirm) {
2571
- fe("Cancelado.");
2572
- return;
2573
- }
2574
- const result = uninstallStackConfig(paths);
2575
- if (result.success) {
2576
- v2.success(result.message);
2577
- } else {
2578
- v2.warn(result.message);
2579
- }
2580
- fe("Stack desinstalado.");
2581
- }
2582
- async function runUpdateCommand() {
2583
- we(" OpenCode Installer ");
2584
- const manifest = await loadLatestManifest();
2585
- const paths = await resolveOpenCodePaths();
2586
- if (!paths) {
2587
- fe("Cancelado.");
2588
- return;
2589
- }
2590
- await doUpdate(manifest, paths);
2591
- fe("Actualización completada.");
2592
- }
2593
- async function doUninstallTotal(paths) {
2594
- const lockfile = readLockfile(paths.root);
2595
- if (!lockfile || Object.keys(lockfile.agents).length === 0 && Object.keys(lockfile.commands).length === 0 && Object.keys(lockfile.skills ?? {}).length === 0 && Object.keys(lockfile.mcpServers ?? {}).length === 0) {
2596
- v2.info("No hay nada instalado.");
2597
- return;
2598
- }
2599
- const pathsToDelete = [];
2600
- for (const name of Object.keys(lockfile.agents)) {
2601
- pathsToDelete.push(join5(paths.agents, `${name}.md`));
2602
- }
2603
- for (const name of Object.keys(lockfile.commands)) {
2604
- pathsToDelete.push(join5(paths.commands, `${name}.md`));
2605
- }
2606
- for (const name of Object.keys(lockfile.skills ?? {})) {
2607
- pathsToDelete.push(join5(paths.skills, name));
2608
- }
2609
- for (const name of Object.keys(lockfile.mcpServers ?? {})) {
2610
- pathsToDelete.push(join5(paths.mcp, name));
2611
- }
2612
- ye(pathsToDelete.join(`
2613
- `), `Se eliminarán ${pathsToDelete.length} archivo(s) / directorio(s)`);
2614
- const confirm = await me({
2615
- message: `¿Confirmar desinstalación de ${pathsToDelete.length} item(s)?`
2616
- });
2617
- onCancel(confirm);
2618
- if (!confirm) {
2619
- v2.info("Desinstalación cancelada.");
2620
- return;
2621
- }
2622
- uninstallAll(paths);
2623
- v2.success(`${pathsToDelete.length} item(s) eliminado(s).`);
2624
- const cleanEngram = await me({
2625
- message: "¿Deseas remover la configuración de Engram del proyecto (mcp.engram)?"
2626
- });
2627
- onCancel(cleanEngram);
2628
- if (cleanEngram) {
2629
- const result = uninstallEngramConfig();
2630
- if (result.success) {
2631
- v2.success(result.message);
2632
- } else {
2633
- v2.warn(result.message);
2634
- }
2635
- }
2636
- }
2637
- async function doUninstallAgent(paths) {
2638
- const lockfile = readLockfile(paths.root);
2639
- if (!lockfile) {
2640
- v2.warn("No hay instalación registrada.");
2641
- return;
2642
- }
2643
- const installed = Object.keys(lockfile.agents);
2644
- if (installed.length === 0) {
2645
- v2.info("No hay agentes instalados.");
2646
- return;
2647
- }
2648
- const options = installed.map((name) => ({
2649
- value: name,
2650
- label: name,
2651
- hint: `v${lockfile.agents[name].version}`
2652
- }));
2653
- const selected = await pe({
2654
- message: "¿Qué agentes querés desinstalar?",
2655
- options,
2656
- required: true
2657
- });
2658
- onCancel(selected);
2659
- for (const name of selected) {
2660
- const ok = uninstallAgent(name, paths);
2661
- if (ok) {
2662
- v2.success(`Agente eliminado: ${name}`);
2663
- } else {
2664
- v2.warn(`No se pudo eliminar el agente: ${name}`);
2665
- }
3372
+ case "exit":
3373
+ fe("Hasta luego.");
3374
+ break;
2666
3375
  }
2667
3376
  }
2668
- async function doUninstallCommand(paths) {
2669
- const lockfile = readLockfile(paths.root);
2670
- if (!lockfile) {
2671
- v2.warn("No hay instalación registrada.");
3377
+ async function runInstallCommand() {
3378
+ we(" OpenCode Installer ");
3379
+ const manifest = await loadManifest();
3380
+ const paths = await resolveOpenCodePaths();
3381
+ if (!paths) {
3382
+ fe("Cancelado.");
2672
3383
  return;
2673
3384
  }
2674
- const installed = Object.keys(lockfile.commands);
2675
- if (installed.length === 0) {
2676
- v2.info("No hay commands instalados.");
3385
+ await doInstallAll(manifest, paths);
3386
+ printPostInstallSteps();
3387
+ fe("Instalación completada.");
3388
+ }
3389
+ async function runAddAgentCommand() {
3390
+ we(" OpenCode Installer ");
3391
+ const manifest = await loadManifest();
3392
+ const paths = await resolveOpenCodePaths();
3393
+ if (!paths) {
3394
+ fe("Cancelado.");
2677
3395
  return;
2678
3396
  }
2679
- const options = installed.map((name) => ({
2680
- value: name,
2681
- label: name,
2682
- hint: `v${lockfile.commands[name].version}`
2683
- }));
2684
- const selected = await pe({
2685
- message: "¿Qué commands querés desinstalar?",
2686
- options,
2687
- required: true
2688
- });
2689
- onCancel(selected);
2690
- for (const name of selected) {
2691
- const ok = uninstallCommand(name, paths);
2692
- if (ok) {
2693
- v2.success(`Command eliminado: ${name}`);
2694
- } else {
2695
- v2.warn(`No se pudo eliminar el command: ${name}`);
2696
- }
2697
- }
3397
+ await doAddAgent(manifest, paths);
3398
+ printPostInstallSteps();
3399
+ fe("Listo.");
2698
3400
  }
2699
- async function doUninstallSkill(paths) {
2700
- const lockfile = readLockfile(paths.root);
2701
- if (!lockfile) {
2702
- v2.warn("No hay instalación registrada.");
3401
+ async function runAddCommandCommand() {
3402
+ we(" OpenCode Installer ");
3403
+ const manifest = await loadManifest();
3404
+ const paths = await resolveOpenCodePaths();
3405
+ if (!paths) {
3406
+ fe("Cancelado.");
2703
3407
  return;
2704
3408
  }
2705
- const installed = Object.keys(lockfile.skills ?? {});
2706
- if (installed.length === 0) {
2707
- v2.info("No hay skills instaladas.");
3409
+ await doAddCommand(manifest, paths);
3410
+ printPostInstallSteps();
3411
+ fe("Listo.");
3412
+ }
3413
+ async function runAddSkillCommand() {
3414
+ we(" OpenCode Installer ");
3415
+ const manifest = await loadManifest();
3416
+ const paths = await resolveOpenCodePaths();
3417
+ if (!paths) {
3418
+ fe("Cancelado.");
2708
3419
  return;
2709
3420
  }
2710
- const options = installed.map((name) => ({
2711
- value: name,
2712
- label: name,
2713
- hint: `v${lockfile.skills[name].version}`
2714
- }));
2715
- const selected = await pe({
2716
- message: "¿Qué skills querés desinstalar?",
2717
- options,
2718
- required: true
2719
- });
2720
- onCancel(selected);
2721
- for (const name of selected) {
2722
- const ok = uninstallSkill(name, paths);
2723
- if (ok) {
2724
- v2.success(`Skill eliminada: ${name}`);
2725
- } else {
2726
- v2.warn(`No se pudo eliminar la skill: ${name}`);
2727
- }
3421
+ await doAddSkill(manifest, paths);
3422
+ printPostInstallSteps();
3423
+ fe("Listo.");
3424
+ }
3425
+ async function runAddMcpCommand() {
3426
+ we(" OpenCode Installer ");
3427
+ const manifest = await loadManifest();
3428
+ const paths = await resolveOpenCodePaths();
3429
+ if (!paths) {
3430
+ fe("Cancelado.");
3431
+ return;
2728
3432
  }
3433
+ await doAddMcp(manifest, paths);
3434
+ printPostInstallSteps();
3435
+ fe("Listo.");
2729
3436
  }
2730
- async function doUninstallMcp(paths) {
2731
- const lockfile = readLockfile(paths.root);
2732
- if (!lockfile) {
2733
- v2.warn("No hay instalación registrada.");
3437
+ async function runInstallStackCommand() {
3438
+ we(" OpenCode Installer — Stack ");
3439
+ const paths = await resolveOpenCodePaths();
3440
+ if (!paths) {
3441
+ fe("Cancelado.");
2734
3442
  return;
2735
3443
  }
2736
- const installed = Object.keys(lockfile.mcpServers ?? {});
2737
- if (installed.length === 0) {
2738
- v2.info("No hay MCP servers instalados.");
3444
+ ensureToolDirs(paths.tools, ["codegraph", "engram", "context7"]);
3445
+ await doInstallStack(paths.tools);
3446
+ fe("Stack instalado.");
3447
+ }
3448
+ async function runUninstallStackCommand() {
3449
+ we(" OpenCode Installer — Stack ");
3450
+ const paths = await resolveOpenCodePaths();
3451
+ if (!paths) {
3452
+ fe("Cancelado.");
2739
3453
  return;
2740
3454
  }
2741
- const options = installed.map((name) => ({
2742
- value: name,
2743
- label: name,
2744
- hint: `v${lockfile.mcpServers?.[name]?.version ?? "?"}`
2745
- }));
2746
- const selected = await pe({
2747
- message: "¿Qué MCP servers querés desinstalar?",
2748
- options,
2749
- required: true
3455
+ const confirm = await me({
3456
+ message: "¿Remover la configuración del stack (CodeGraph, Engram, Context7) del proyecto? Los binarios globales no se tocan."
2750
3457
  });
2751
- onCancel(selected);
2752
- for (const name of selected) {
2753
- const ok = uninstallMcpServer(name, paths);
2754
- if (ok) {
2755
- v2.success(`MCP server eliminado: ${name}`);
2756
- } else {
2757
- v2.warn(`No se pudo eliminar el MCP server: ${name}`);
2758
- }
3458
+ onCancel(confirm);
3459
+ if (!confirm) {
3460
+ fe("Cancelado.");
3461
+ return;
3462
+ }
3463
+ const { uninstallStackConfig: uninstallStackConfig2 } = await Promise.resolve().then(() => (init_stack(), exports_stack));
3464
+ const result = uninstallStackConfig2(paths);
3465
+ if (result.success) {
3466
+ v2.success(result.message);
3467
+ } else {
3468
+ v2.warn(result.message);
2759
3469
  }
3470
+ fe("Stack desinstalado.");
2760
3471
  }
2761
- async function doUninstall(paths) {
2762
- const scope = await de({
2763
- message: "¿Qué querés desinstalar?",
2764
- options: [
2765
- { value: "all", label: "Todo (agentes + commands + skills + MCPs)" },
2766
- { value: "agent", label: "Solo un agente" },
2767
- { value: "command", label: "Solo un command" },
2768
- { value: "skill", label: "Solo una skill" },
2769
- { value: "mcp", label: "Solo un MCP server" }
2770
- ]
2771
- });
2772
- onCancel(scope);
2773
- switch (scope) {
2774
- case "all":
2775
- await doUninstallTotal(paths);
2776
- break;
2777
- case "agent":
2778
- await doUninstallAgent(paths);
2779
- break;
2780
- case "command":
2781
- await doUninstallCommand(paths);
2782
- break;
2783
- case "skill":
2784
- await doUninstallSkill(paths);
2785
- break;
2786
- case "mcp":
2787
- await doUninstallMcp(paths);
2788
- break;
3472
+ async function runUpdateCommand() {
3473
+ we(" OpenCode Installer ");
3474
+ const manifest = await loadLatestManifest();
3475
+ const paths = await resolveOpenCodePaths();
3476
+ if (!paths) {
3477
+ fe("Cancelado.");
3478
+ return;
2789
3479
  }
3480
+ await doUpdate(manifest, paths);
3481
+ fe("Actualización completada.");
2790
3482
  }
2791
3483
  async function runUninstallCommand() {
2792
3484
  we(" OpenCode Installer ");
@@ -2795,7 +3487,7 @@ async function runUninstallCommand() {
2795
3487
  fe("Cancelado.");
2796
3488
  return;
2797
3489
  }
2798
- await doUninstallTotal(paths);
3490
+ await doUninstall(paths);
2799
3491
  fe("Desinstalación completada.");
2800
3492
  }
2801
3493
  async function runUninstallAgentCommand(name) {
@@ -2806,33 +3498,30 @@ async function runUninstallAgentCommand(name) {
2806
3498
  return;
2807
3499
  }
2808
3500
  if (name) {
2809
- try {
2810
- validateFilePath(`${name}.md`);
2811
- } catch (e2) {
2812
- v2.warn(`Nombre inválido: ${e2.message}`);
2813
- return;
2814
- }
2815
- const lockfile = readLockfile(paths.root);
2816
- if (!lockfile || !(name in lockfile.agents)) {
2817
- v2.warn(`${name} no está instalado.`);
2818
- return;
2819
- }
2820
- const filePath = join5(paths.agents, `${name}.md`);
2821
- ye(filePath, `Se eliminará`);
2822
- const confirm = await me({ message: `¿Borrar ${name}.md?` });
2823
- onCancel(confirm);
2824
- if (!confirm) {
2825
- v2.info("Cancelado.");
2826
- return;
2827
- }
2828
- const ok = uninstallAgent(name, paths);
2829
- if (ok) {
2830
- v2.success(`Agente eliminado: ${name}`);
3501
+ await doUninstallAgentByName(name, paths);
3502
+ } else {
3503
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3504
+ const lockfile = readLockfile2(paths.root);
3505
+ if (lockfile && Object.keys(lockfile.agents).length > 0) {
3506
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3507
+ const installed = Object.keys(lockfile.agents);
3508
+ const options = installed.map((n) => ({
3509
+ value: n,
3510
+ label: n,
3511
+ hint: `v${lockfile.agents[n].version}`
3512
+ }));
3513
+ const selected = await prompts.multiselect({
3514
+ message: "¿Qué agentes querés desinstalar?",
3515
+ options,
3516
+ required: true
3517
+ });
3518
+ onCancel(selected);
3519
+ for (const n of selected) {
3520
+ await doUninstallAgentByName(n, paths);
3521
+ }
2831
3522
  } else {
2832
- v2.warn(`No se pudo eliminar el agente: ${name}`);
3523
+ v2.info("No hay agentes instalados.");
2833
3524
  }
2834
- } else {
2835
- await doUninstallAgent(paths);
2836
3525
  }
2837
3526
  fe("Listo.");
2838
3527
  }
@@ -2844,33 +3533,30 @@ async function runUninstallCommandCommand(name) {
2844
3533
  return;
2845
3534
  }
2846
3535
  if (name) {
2847
- try {
2848
- validateFilePath(`${name}.md`);
2849
- } catch (e2) {
2850
- v2.warn(`Nombre inválido: ${e2.message}`);
2851
- return;
2852
- }
2853
- const lockfile = readLockfile(paths.root);
2854
- if (!lockfile || !(name in lockfile.commands)) {
2855
- v2.warn(`${name} no está instalado.`);
2856
- return;
2857
- }
2858
- const filePath = join5(paths.commands, `${name}.md`);
2859
- ye(filePath, `Se eliminará`);
2860
- const confirm = await me({ message: `¿Borrar ${name}.md?` });
2861
- onCancel(confirm);
2862
- if (!confirm) {
2863
- v2.info("Cancelado.");
2864
- return;
2865
- }
2866
- const ok = uninstallCommand(name, paths);
2867
- if (ok) {
2868
- v2.success(`Command eliminado: ${name}`);
3536
+ await doUninstallCommandByName(name, paths);
3537
+ } else {
3538
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3539
+ const lockfile = readLockfile2(paths.root);
3540
+ if (lockfile && Object.keys(lockfile.commands).length > 0) {
3541
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3542
+ const installed = Object.keys(lockfile.commands);
3543
+ const options = installed.map((n) => ({
3544
+ value: n,
3545
+ label: n,
3546
+ hint: `v${lockfile.commands[n].version}`
3547
+ }));
3548
+ const selected = await prompts.multiselect({
3549
+ message: "¿Qué commands querés desinstalar?",
3550
+ options,
3551
+ required: true
3552
+ });
3553
+ onCancel(selected);
3554
+ for (const n of selected) {
3555
+ await doUninstallCommandByName(n, paths);
3556
+ }
2869
3557
  } else {
2870
- v2.warn(`No se pudo eliminar el command: ${name}`);
3558
+ v2.info("No hay commands instalados.");
2871
3559
  }
2872
- } else {
2873
- await doUninstallCommand(paths);
2874
3560
  }
2875
3561
  fe("Listo.");
2876
3562
  }
@@ -2882,33 +3568,30 @@ async function runUninstallSkillCommand(name) {
2882
3568
  return;
2883
3569
  }
2884
3570
  if (name) {
2885
- try {
2886
- validateFilePath(name);
2887
- } catch (e2) {
2888
- v2.warn(`Nombre inválido: ${e2.message}`);
2889
- return;
2890
- }
2891
- const lockfile = readLockfile(paths.root);
2892
- if (!lockfile || !lockfile.skills || !(name in lockfile.skills)) {
2893
- v2.warn(`${name} no está instalado.`);
2894
- return;
2895
- }
2896
- const dirPath = join5(paths.skills, name);
2897
- ye(dirPath, `Se eliminará`);
2898
- const confirm = await me({ message: `¿Borrar la skill "${name}"?` });
2899
- onCancel(confirm);
2900
- if (!confirm) {
2901
- v2.info("Cancelado.");
2902
- return;
2903
- }
2904
- const ok = uninstallSkill(name, paths);
2905
- if (ok) {
2906
- v2.success(`Skill eliminada: ${name}`);
3571
+ await doUninstallSkillByName(name, paths);
3572
+ } else {
3573
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3574
+ const lockfile = readLockfile2(paths.root);
3575
+ if (lockfile && lockfile.skills && Object.keys(lockfile.skills).length > 0) {
3576
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3577
+ const installed = Object.keys(lockfile.skills);
3578
+ const options = installed.map((n) => ({
3579
+ value: n,
3580
+ label: n,
3581
+ hint: `v${lockfile.skills[n].version}`
3582
+ }));
3583
+ const selected = await prompts.multiselect({
3584
+ message: "¿Qué skills querés desinstalar?",
3585
+ options,
3586
+ required: true
3587
+ });
3588
+ onCancel(selected);
3589
+ for (const n of selected) {
3590
+ await doUninstallSkillByName(n, paths);
3591
+ }
2907
3592
  } else {
2908
- v2.warn(`No se pudo eliminar la skill: ${name}`);
3593
+ v2.info("No hay skills instaladas.");
2909
3594
  }
2910
- } else {
2911
- await doUninstallSkill(paths);
2912
3595
  }
2913
3596
  fe("Listo.");
2914
3597
  }
@@ -2920,33 +3603,30 @@ async function runUninstallMcpCommand(name) {
2920
3603
  return;
2921
3604
  }
2922
3605
  if (name) {
2923
- try {
2924
- validateFilePath(name);
2925
- } catch (e2) {
2926
- v2.warn(`Nombre inválido: ${e2.message}`);
2927
- return;
2928
- }
2929
- const lockfile = readLockfile(paths.root);
2930
- if (!lockfile || !lockfile.mcpServers || !(name in lockfile.mcpServers)) {
2931
- v2.warn(`${name} no está instalado.`);
2932
- return;
2933
- }
2934
- const dirPath = join5(paths.mcp, name);
2935
- ye(dirPath, `Se eliminará`);
2936
- const confirm = await me({ message: `¿Borrar el MCP server "${name}"?` });
2937
- onCancel(confirm);
2938
- if (!confirm) {
2939
- v2.info("Cancelado.");
2940
- return;
2941
- }
2942
- const ok = uninstallMcpServer(name, paths);
2943
- if (ok) {
2944
- v2.success(`MCP server eliminado: ${name}`);
3606
+ await doUninstallMcpByName(name, paths);
3607
+ } else {
3608
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3609
+ const lockfile = readLockfile2(paths.root);
3610
+ if (lockfile && lockfile.mcpServers && Object.keys(lockfile.mcpServers).length > 0) {
3611
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3612
+ const installed = Object.keys(lockfile.mcpServers);
3613
+ const options = installed.map((n) => ({
3614
+ value: n,
3615
+ label: n,
3616
+ hint: `v${lockfile.mcpServers?.[n]?.version ?? "?"}`
3617
+ }));
3618
+ const selected = await prompts.multiselect({
3619
+ message: "¿Qué MCP servers querés desinstalar?",
3620
+ options,
3621
+ required: true
3622
+ });
3623
+ onCancel(selected);
3624
+ for (const n of selected) {
3625
+ await doUninstallMcpByName(n, paths);
3626
+ }
2945
3627
  } else {
2946
- v2.warn(`No se pudo eliminar el MCP server: ${name}`);
3628
+ v2.info("No hay MCP servers instalados.");
2947
3629
  }
2948
- } else {
2949
- await doUninstallMcp(paths);
2950
3630
  }
2951
3631
  fe("Listo.");
2952
3632
  }
@@ -3031,6 +3711,10 @@ async function main() {
3031
3711
  console.log(package_default.version);
3032
3712
  break;
3033
3713
  default:
3714
+ if (cmd) {
3715
+ console.error(`Comando desconocido: "${cmd}". Usá --help para ver los comandos disponibles.`);
3716
+ process.exit(1);
3717
+ }
3034
3718
  await runInteractiveMenu();
3035
3719
  }
3036
3720
  }