ostacky 0.5.10 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +2347 -1723
  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,348 +1197,27 @@ 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++;
1357
- }
1358
- return result.replace(/,\s*([}\]])/g, "$1");
1359
- }
1360
- function readOpenCodeConfig(configPath) {
1361
- const raw = readFileSync3(configPath, "utf-8");
1362
- try {
1363
- return JSON.parse(stripJsoncComments(raw));
1364
- } catch {
1365
- return null;
1366
- }
1367
- }
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}`);
1478
- }
1479
- const dest = join4(paths.skills, item.name);
1480
- if (existsSync3(dest)) {
1481
- rmSync(dest, { recursive: true, force: true });
1482
- }
1483
- copyDirRecursive(src, dest);
1484
- upsertLockfile(paths, "skills", item, manifest, treeHash);
1485
- }
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";
1508
- try {
1509
- const output = execSync(installCmd, {
1510
- cwd: dest,
1511
- 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;
1218
+ return true;
1219
+ } catch {
1220
+ return false;
1648
1221
  }
1649
1222
  }
1650
1223
  function detectPlatformTarget() {
@@ -1671,25 +1244,26 @@ function detectPlatformTarget() {
1671
1244
  function downloadToFile(url, dest, timeoutMs = 180000) {
1672
1245
  return new Promise((resolve2, reject) => {
1673
1246
  const file = createWriteStream(dest);
1247
+ file.on("finish", () => resolve2());
1248
+ file.on("error", (err) => reject(err));
1674
1249
  const controller = new AbortController;
1675
1250
  const timer = setTimeout(() => controller.abort(), timeoutMs);
1676
- fetch(url, { signal: controller.signal, headers: { "User-Agent": "ostacky-installer" } }).then((res) => {
1251
+ fetch(url, { signal: controller.signal, headers: { "User-Agent": USER_AGENT } }).then((res) => {
1677
1252
  if (!res.ok || !res.body) {
1678
1253
  reject(new Error(`HTTP ${res.status} ${res.statusText} descargando ${url}`));
1679
1254
  return;
1680
1255
  }
1681
- const reader = res.body.getReader();
1682
- const pump = ({ done, value }) => {
1683
- if (done) {
1256
+ const writable = new WritableStream({
1257
+ write(chunk) {
1258
+ return new Promise((ok, fail) => file.write(Buffer.from(chunk), (err) => err ? fail(err) : ok()));
1259
+ },
1260
+ close() {
1684
1261
  file.end();
1685
- return Promise.resolve(undefined);
1686
1262
  }
1687
- return new Promise((ok) => file.write(Buffer.from(value), () => ok())).then(() => reader.read().then(pump));
1688
- };
1689
- return reader.read().then(pump);
1263
+ });
1264
+ return res.body.pipeTo(writable);
1690
1265
  }).then(() => {
1691
1266
  clearTimeout(timer);
1692
- file.on("finish", () => resolve2());
1693
1267
  }).catch((err) => {
1694
1268
  clearTimeout(timer);
1695
1269
  file.destroy();
@@ -1701,14 +1275,14 @@ function downloadToFile(url, dest, timeoutMs = 180000) {
1701
1275
  });
1702
1276
  }
1703
1277
  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");
1278
+ const tmp = join(destDir, `.download-${Date.now()}`);
1279
+ if (!existsSync(tmp))
1280
+ mkdirSync(tmp, { recursive: true });
1281
+ const archivePath = join(tmp, url.endsWith(".zip") ? "archive.zip" : "archive.tar.gz");
1708
1282
  try {
1709
1283
  await downloadToFile(url, archivePath, timeoutMs);
1710
- if (!existsSync3(destDir))
1711
- mkdirSync2(destDir, { recursive: true });
1284
+ if (!existsSync(destDir))
1285
+ mkdirSync(destDir, { recursive: true });
1712
1286
  if (process.platform === "win32" && url.endsWith(".zip")) {
1713
1287
  execSync(`powershell -NoProfile -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`, { stdio: "pipe", timeout: 60000 });
1714
1288
  } else {
@@ -1724,22 +1298,272 @@ async function downloadAndExtract(url, destDir, stripComponents = 1, timeoutMs =
1724
1298
  } catch {}
1725
1299
  }
1726
1300
  }
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;
1301
+ async function downloadAndExtractWithRetry(url, destDir, stripComponents = 1, timeoutMs = 180000, maxRetries = 2) {
1302
+ let lastError = null;
1303
+ for (let attempt = 0;attempt <= maxRetries; attempt++) {
1304
+ try {
1305
+ await downloadAndExtract(url, destDir, stripComponents, timeoutMs);
1306
+ return;
1307
+ } catch (err) {
1308
+ lastError = err;
1309
+ if (attempt < maxRetries) {
1310
+ const delay = 1000 * Math.pow(2, attempt);
1311
+ console.error(`[download] Intento ${attempt + 1} falló: ${lastError.message}. Reintentando en ${delay}ms...`);
1312
+ await new Promise((r2) => setTimeout(r2, delay));
1313
+ }
1314
+ }
1315
+ }
1316
+ throw lastError;
1317
+ }
1318
+ function findBinaryInDir(dir, name) {
1319
+ const entries = readdirSync(dir);
1320
+ for (const entry of entries) {
1321
+ const full = join(dir, entry);
1322
+ const stat = statSync(full);
1323
+ if (stat.isDirectory()) {
1324
+ const found = findBinaryInDir(full, name);
1325
+ if (found)
1326
+ return found;
1327
+ } else if (entry === name || entry === name + ".exe") {
1328
+ return full;
1329
+ }
1330
+ }
1331
+ return null;
1332
+ }
1333
+ var USER_AGENT = "ostacky-installer";
1334
+ var init_fs = __esm(() => {
1335
+ init_security();
1336
+ });
1337
+
1338
+ // manifest.json
1339
+ var manifest_default;
1340
+ var init_manifest = __esm(() => {
1341
+ manifest_default = {
1342
+ version: "0.6.0",
1343
+ repo: "JaimeHoracio/Ostacky",
1344
+ tag: "v0.6.0",
1345
+ agents: [
1346
+ {
1347
+ name: "ostacky",
1348
+ file: "assets/agents/ostacky.md",
1349
+ 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",
1350
+ version: "0.6.0",
1351
+ sha256: "206963fd98b0af4580338407d1df11c30ecd0c18b984f73eb4b624555c263f55"
1352
+ }
1353
+ ],
1354
+ commands: [
1355
+ {
1356
+ name: "install-stack",
1357
+ file: "assets/commands/install-stack.md",
1358
+ description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, Context7, controller MCP con SDK oficial)",
1359
+ version: "0.6.0",
1360
+ sha256: "9fb5a6ab01506c62c3a844fdac3940773c4aa2c22aa4f1effcf9048dafa28673"
1361
+ },
1362
+ {
1363
+ name: "opsx-sync",
1364
+ file: "assets/commands/opsx-sync.md",
1365
+ description: "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
1366
+ version: "0.6.0",
1367
+ sha256: "ed9948f1910743b672e1dfad496bc96972a224a98b063232be39290d43068c50"
1368
+ }
1369
+ ],
1370
+ mcpServers: [
1371
+ {
1372
+ name: "ostacky-controller",
1373
+ file: "assets/mcp/ostacky-controller/",
1374
+ 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",
1375
+ version: "0.6.0",
1376
+ sha256: "b9637c3c78f4da059868e5af4d1e99af8280a9d3e3f1a6eafc6e74362c93a75b"
1377
+ },
1378
+ {
1379
+ name: "openspec",
1380
+ file: "assets/mcp/openspec/",
1381
+ description: "MCP server local para OpenSpec - proposal, apply, archive, sync de cambios",
1382
+ version: "0.6.0",
1383
+ sha256: "db49c5ddbf1c2b3a9b65598b9a0ac1409694cd54444d1d1bd74eb12e6b39be01"
1384
+ }
1385
+ ],
1386
+ skills: [
1387
+ {
1388
+ name: "brainstorming",
1389
+ file: "assets/skills/brainstorming/SKILL.md",
1390
+ 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)",
1391
+ version: "0.6.0",
1392
+ sha256: "d1051ded927d57dcf72c33fa0d6116c7d0103ef36f5a7f9e22f7b3da78f9c74e"
1393
+ },
1394
+ {
1395
+ name: "execution-mode-evaluation",
1396
+ file: "assets/skills/execution-mode-evaluation/SKILL.md",
1397
+ description: "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
1398
+ version: "0.6.0",
1399
+ sha256: "5c37f6f4132378f863c99102bbde8bab478160ced82a2ea1025f958275d8e881"
1400
+ },
1401
+ {
1402
+ name: "writing-plans",
1403
+ file: "assets/skills/writing-plans/SKILL.md",
1404
+ description: "Skill de planificación de implementación (Superpowers) — execution handoff removido, Ostacky decide modo de ejecución",
1405
+ version: "0.6.0",
1406
+ sha256: "e681af5e607e7ae4b6a1c0760a4f1d1d292a028d2b6989df3afb9be8dcc81c61"
1407
+ },
1408
+ {
1409
+ name: "tdd",
1410
+ file: "assets/skills/tdd/SKILL.md",
1411
+ description: "Skill de test-driven development (Superpowers)",
1412
+ version: "0.6.0",
1413
+ sha256: "9f5a25e61e049d473a854a5401cec947329e830aa902db7c31f91a160ac19890"
1414
+ },
1415
+ {
1416
+ name: "subagent-driven-development",
1417
+ file: "assets/skills/subagent-driven-development/SKILL.md",
1418
+ description: "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
1419
+ version: "0.6.0",
1420
+ sha256: "65d87f2b3ae1da5d08b6760938ab7009e0e226182ec1d88d322a230754ac9d8e"
1421
+ },
1422
+ {
1423
+ name: "dispatching-parallel-agents",
1424
+ file: "assets/skills/dispatching-parallel-agents/SKILL.md",
1425
+ description: "Skill de dispatch paralelo de agentes (Superpowers)",
1426
+ version: "0.6.0",
1427
+ sha256: "2d93480e4b9c0f516861a765977ae08b6e02dc113dc456068ef8026bcb950fcb"
1428
+ },
1429
+ {
1430
+ name: "review",
1431
+ file: "assets/skills/review/SKILL.md",
1432
+ description: "Skill de revisión de código (Superpowers)",
1433
+ version: "0.6.0",
1434
+ sha256: "14831d9ef3746ef6e2e6047c868fe7aa296d01f0644227ce776fe99436357b1a"
1435
+ },
1436
+ {
1437
+ name: "receiving-code-review",
1438
+ file: "assets/skills/receiving-code-review/SKILL.md",
1439
+ description: "Skill de recibir y procesar feedback de code review",
1440
+ version: "0.6.0",
1441
+ sha256: "0a5780e8a41539d15428114b7c46f36670acc16aba0db3348d36be1175433872"
1442
+ },
1443
+ {
1444
+ name: "openspec-propose",
1445
+ file: "assets/skills/openspec-propose/SKILL.md",
1446
+ description: "Skill de generación de proposal (OpenSpec)",
1447
+ version: "0.6.0",
1448
+ sha256: "c50d478fd96ec5a60080012d5d87a09b54787884b4b0fa7d8631e7bee6c8c80d"
1449
+ },
1450
+ {
1451
+ name: "openspec-apply-change",
1452
+ file: "assets/skills/openspec-apply-change/SKILL.md",
1453
+ description: "Skill de aplicación de change (OpenSpec)",
1454
+ version: "0.6.0",
1455
+ sha256: "723a492f2ef2df3337e8e841ae84f4f5d0f8621e534c8ea76540ee3a796ff527"
1456
+ },
1457
+ {
1458
+ name: "openspec-archive-change",
1459
+ file: "assets/skills/openspec-archive-change/SKILL.md",
1460
+ description: "Skill de archivo de change (OpenSpec)",
1461
+ version: "0.6.0",
1462
+ sha256: "dc2422d0ff9a54e3ed9b016df2bad0dfa6cca9adaee02bb4563ce7525cc56f40"
1463
+ },
1464
+ {
1465
+ name: "openspec-explore",
1466
+ file: "assets/skills/openspec-explore/SKILL.md",
1467
+ description: "Modo explore para OpenSpec — thinking partner para explorar ideas, investigar problemas y clarificar requisitos antes/durante un cambio",
1468
+ version: "0.6.0",
1469
+ sha256: "6e162c0b38dedd2ee70d0be9179af1a9716e78ac786511d5b49ebeb0fffc14a0"
1470
+ },
1471
+ {
1472
+ name: "using-git-worktrees",
1473
+ file: "assets/skills/using-git-worktrees/SKILL.md",
1474
+ description: "Skill de uso de git worktrees para aislamiento de trabajo",
1475
+ version: "0.6.0",
1476
+ sha256: "3829b79c1d36b1bc9d148153b07f66265599a19494f648731273e3e6d1a0d65c"
1477
+ },
1478
+ {
1479
+ name: "using-superpowers",
1480
+ file: "assets/skills/using-superpowers/SKILL.md",
1481
+ description: "Skill de orquestación de Superpowers skills",
1482
+ version: "0.6.0",
1483
+ sha256: "d0153c2bdac88c5a409d439d137b8f04fecda005cc7722f1ca83b2211bfda115"
1484
+ },
1485
+ {
1486
+ name: "writing-skills",
1487
+ file: "assets/skills/writing-skills/SKILL.md",
1488
+ description: "Skill de creación y edición de skills",
1489
+ version: "0.6.0",
1490
+ sha256: "371da06aad8a546389785140248698b6401730f34c2ab00b4b9304e5a51e1eb4"
1491
+ },
1492
+ {
1493
+ name: "graceful-degradation",
1494
+ file: "assets/skills/graceful-degradation/SKILL.md",
1495
+ description: "Skill de degradación graceful cuando múltiples tools están indisponibles",
1496
+ version: "0.6.0",
1497
+ sha256: "92ea3381b5610d9041797868a5887fb358d185d80ebb753bdae3f9f9abb4d790"
1498
+ }
1499
+ ]
1500
+ };
1501
+ });
1502
+
1503
+ // src/cache.ts
1504
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
1505
+ import { join as join2, dirname as dirname2 } from "path";
1506
+ function getCacheRoot(projectRoot) {
1507
+ return join2(projectRoot, ".opencode", "cache");
1508
+ }
1509
+ function cacheKey(projectRoot, repo, tag, filePath) {
1510
+ const repoSlug = repo.replace("/", "__");
1511
+ return join2(getCacheRoot(projectRoot), repoSlug, tag, filePath);
1512
+ }
1513
+ function getCached(projectRoot, repo, tag, filePath, expectedHash) {
1514
+ const cachePath = cacheKey(projectRoot, repo, tag, filePath);
1515
+ if (!existsSync2(cachePath))
1516
+ return null;
1517
+ try {
1518
+ const content = readFileSync2(cachePath, "utf-8");
1519
+ if (expectedHash && sha256(content) !== expectedHash)
1520
+ return null;
1521
+ return content;
1522
+ } catch {
1523
+ return null;
1524
+ }
1525
+ }
1526
+ function putCache(projectRoot, repo, tag, filePath, content) {
1527
+ const cachePath = cacheKey(projectRoot, repo, tag, filePath);
1528
+ const dir = dirname2(cachePath);
1529
+ if (!existsSync2(dir))
1530
+ mkdirSync2(dir, { recursive: true });
1531
+ writeFileSync2(cachePath, content, "utf-8");
1532
+ }
1533
+ var init_cache = __esm(() => {
1534
+ init_security();
1535
+ });
1536
+
1537
+ // src/github.ts
1538
+ import { fileURLToPath } from "url";
1539
+ import { dirname as dirname3, join as join3 } from "path";
1540
+ function getBundledSkillPath(name) {
1541
+ validateFilePath(name);
1542
+ return join3(BUNDLED_SKILLS_DIR, name);
1543
+ }
1544
+ function getBundledMcpPath(name) {
1545
+ validateFilePath(name);
1546
+ return join3(BUNDLED_MCP_DIR, name);
1547
+ }
1548
+ function getRawUrl(repo, tag, path) {
1549
+ return `${GITHUB_RAW}/${repo}/${tag}/${path}`;
1550
+ }
1551
+ async function fetchLatestReleaseTag(repo) {
1552
+ try {
1553
+ const res = await fetch(`https://api.github.com/repos/${repo}/releases/latest`, {
1554
+ signal: AbortSignal.timeout(5000),
1555
+ headers: { "User-Agent": USER_AGENT }
1556
+ });
1557
+ if (res.ok) {
1558
+ const data = await res.json();
1559
+ return data.tag_name ?? null;
1736
1560
  }
1737
1561
  } catch {}
1738
1562
  try {
1739
1563
  const res = await fetch(`https://github.com/${repo}/releases/latest`, {
1740
1564
  redirect: "manual",
1741
1565
  signal: AbortSignal.timeout(5000),
1742
- headers: { "User-Agent": "ostacky-installer" }
1566
+ headers: { "User-Agent": USER_AGENT }
1743
1567
  });
1744
1568
  const loc = res.headers.get("location") ?? "";
1745
1569
  const m3 = loc.match(/releases\/tag\/(v[^/]+)$/);
@@ -1748,11 +1572,301 @@ async function fetchLatestReleaseTag(repo) {
1748
1572
  } catch {}
1749
1573
  return null;
1750
1574
  }
1575
+ async function fetchManifest(tag) {
1576
+ const resolvedTag = tag ?? manifest_default.tag;
1577
+ try {
1578
+ const url = getRawUrl(manifest_default.repo, resolvedTag, "manifest.json");
1579
+ const response = await fetch(url, {
1580
+ signal: AbortSignal.timeout(5000),
1581
+ headers: { "User-Agent": USER_AGENT }
1582
+ });
1583
+ if (response.ok) {
1584
+ return await response.json();
1585
+ }
1586
+ } catch {}
1587
+ return manifest_default;
1588
+ }
1589
+ async function fetchLatestManifest() {
1590
+ const latestTag = await fetchLatestReleaseTag(manifest_default.repo);
1591
+ const currentTag = manifest_default.tag;
1592
+ const isNew = latestTag !== null && latestTag !== currentTag;
1593
+ const manifest = await fetchManifest(latestTag ?? currentTag);
1594
+ return { manifest, isNew, latestTag };
1595
+ }
1596
+ async function downloadFile(manifest, filePath) {
1597
+ validateFilePath(filePath);
1598
+ const item = [
1599
+ ...manifest.agents,
1600
+ ...manifest.commands,
1601
+ ...manifest.skills ?? [],
1602
+ ...manifest.mcpServers ?? []
1603
+ ].find((i) => i.file === filePath);
1604
+ const expectedHash = item?.sha256 ?? null;
1605
+ const projectRoot = findProjectRoot();
1606
+ const cached = getCached(projectRoot, manifest.repo, manifest.tag, filePath, expectedHash);
1607
+ if (cached !== null)
1608
+ return cached;
1609
+ const url = getRawUrl(manifest.repo, manifest.tag, filePath);
1610
+ const response = await fetch(url, {
1611
+ headers: { "User-Agent": USER_AGENT },
1612
+ signal: AbortSignal.timeout(30000)
1613
+ });
1614
+ if (!response.ok) {
1615
+ throw new Error(`Error descargando ${url}: ${response.status} ${response.statusText}`);
1616
+ }
1617
+ const content = await response.text();
1618
+ verifyChecksum(content, expectedHash, filePath);
1619
+ putCache(projectRoot, manifest.repo, manifest.tag, filePath, content);
1620
+ return content;
1621
+ }
1622
+ var GITHUB_RAW = "https://raw.githubusercontent.com", __filename2, __dirname2, PACKAGE_ROOT, BUNDLED_SKILLS_DIR, BUNDLED_MCP_DIR;
1623
+ var init_github = __esm(() => {
1624
+ init_manifest();
1625
+ init_cache();
1626
+ init_security();
1627
+ init_fs();
1628
+ __filename2 = fileURLToPath(import.meta.url);
1629
+ __dirname2 = dirname3(__filename2);
1630
+ PACKAGE_ROOT = join3(__dirname2, "..");
1631
+ BUNDLED_SKILLS_DIR = join3(PACKAGE_ROOT, "assets", "skills");
1632
+ BUNDLED_MCP_DIR = join3(PACKAGE_ROOT, "assets", "mcp");
1633
+ });
1634
+
1635
+ // src/lockfile.ts
1636
+ var exports_lockfile = {};
1637
+ __export(exports_lockfile, {
1638
+ writeLockfile: () => writeLockfile,
1639
+ removeFromLockfile: () => removeFromLockfile,
1640
+ readLockfile: () => readLockfile,
1641
+ getLockfilePath: () => getLockfilePath,
1642
+ getInstalledVersion: () => getInstalledVersion,
1643
+ clearLockfile: () => clearLockfile
1644
+ });
1645
+ import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
1646
+ import { join as join4 } from "path";
1647
+ function getLockfilePath(opencodeRoot) {
1648
+ return join4(opencodeRoot, LOCKFILE_NAME);
1649
+ }
1650
+ function readLockfile(opencodeRoot) {
1651
+ const lockPath = getLockfilePath(opencodeRoot);
1652
+ if (!existsSync3(lockPath))
1653
+ return null;
1654
+ try {
1655
+ return JSON.parse(readFileSync3(lockPath, "utf-8"));
1656
+ } catch {
1657
+ return null;
1658
+ }
1659
+ }
1660
+ function writeLockfile(opencodeRoot, lockfile) {
1661
+ writeFileSync3(getLockfilePath(opencodeRoot), JSON.stringify(lockfile, null, 2), "utf-8");
1662
+ }
1663
+ function getInstalledVersion(lockfile, type, name) {
1664
+ return lockfile?.[type]?.[name]?.version ?? null;
1665
+ }
1666
+ function removeFromLockfile(opencodeRoot, type, name) {
1667
+ const lockfile = readLockfile(opencodeRoot);
1668
+ if (!lockfile)
1669
+ return;
1670
+ if (!lockfile[type])
1671
+ return;
1672
+ if (!(name in lockfile[type]))
1673
+ return;
1674
+ delete lockfile[type][name];
1675
+ writeLockfile(opencodeRoot, lockfile);
1676
+ }
1677
+ function clearLockfile(opencodeRoot) {
1678
+ const lockfile = readLockfile(opencodeRoot);
1679
+ if (!lockfile) {
1680
+ writeLockfile(opencodeRoot, {
1681
+ version: LOCKFILE_VERSION,
1682
+ lockedAt: new Date().toISOString(),
1683
+ repo: "",
1684
+ tag: "",
1685
+ agents: {},
1686
+ commands: {},
1687
+ skills: {},
1688
+ mcpServers: {}
1689
+ });
1690
+ return;
1691
+ }
1692
+ lockfile.agents = {};
1693
+ lockfile.commands = {};
1694
+ lockfile.skills = {};
1695
+ lockfile.mcpServers = {};
1696
+ lockfile.lockedAt = new Date().toISOString();
1697
+ writeLockfile(opencodeRoot, lockfile);
1698
+ }
1699
+ var LOCKFILE_NAME = "ostacky-lock.json", LOCKFILE_VERSION;
1700
+ var init_lockfile = __esm(() => {
1701
+ init_manifest();
1702
+ LOCKFILE_VERSION = manifest_default.version;
1703
+ });
1704
+
1705
+ // src/config.ts
1706
+ var exports_config = {};
1707
+ __export(exports_config, {
1708
+ writeOpenCodeConfig: () => writeOpenCodeConfig,
1709
+ stripJsoncComments: () => stripJsoncComments,
1710
+ setMcpEntry: () => setMcpEntry,
1711
+ readOpenCodeConfig: () => readOpenCodeConfig,
1712
+ patchOpenCodeConfig: () => patchOpenCodeConfig,
1713
+ findOpenCodeConfig: () => findOpenCodeConfig,
1714
+ ensureOpenCodeConfig: () => ensureOpenCodeConfig,
1715
+ ensureMcpEntry: () => ensureMcpEntry
1716
+ });
1717
+ import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "fs";
1718
+ import { join as join5 } from "path";
1719
+ function stripJsoncComments(text) {
1720
+ let result = "";
1721
+ let i = 0;
1722
+ let inString = false;
1723
+ while (i < text.length) {
1724
+ const char = text[i];
1725
+ const next = text[i + 1];
1726
+ if (inString) {
1727
+ if (char === "\\") {
1728
+ result += char + (next ?? "");
1729
+ i += 2;
1730
+ continue;
1731
+ }
1732
+ if (char === '"')
1733
+ inString = false;
1734
+ result += char;
1735
+ i++;
1736
+ continue;
1737
+ }
1738
+ if (char === '"') {
1739
+ inString = true;
1740
+ result += char;
1741
+ i++;
1742
+ continue;
1743
+ }
1744
+ if (char === "/" && next === "/") {
1745
+ while (i < text.length && text[i] !== `
1746
+ `)
1747
+ i++;
1748
+ continue;
1749
+ }
1750
+ if (char === "/" && next === "*") {
1751
+ i += 2;
1752
+ while (i < text.length && !(text[i] === "*" && text[i + 1] === "/"))
1753
+ i++;
1754
+ i += 2;
1755
+ continue;
1756
+ }
1757
+ result += char;
1758
+ i++;
1759
+ }
1760
+ return result.replace(/,\s*([}\]])/g, "$1");
1761
+ }
1762
+ function readOpenCodeConfig(configPath) {
1763
+ const raw = readFileSync4(configPath, "utf-8");
1764
+ try {
1765
+ return JSON.parse(stripJsoncComments(raw));
1766
+ } catch {
1767
+ return null;
1768
+ }
1769
+ }
1770
+ function writeOpenCodeConfig(configPath, config) {
1771
+ writeFileSync4(configPath, JSON.stringify(config, null, 2) + `
1772
+ `, "utf-8");
1773
+ }
1774
+ function ensureOpenCodeConfig(projectRoot) {
1775
+ const existing = findOpenCodeConfig(projectRoot);
1776
+ if (existing)
1777
+ return existing;
1778
+ const configPath = join5(projectRoot, "opencode.json");
1779
+ writeOpenCodeConfig(configPath, {
1780
+ $schema: "https://opencode.ai/config.json",
1781
+ mcp: {}
1782
+ });
1783
+ return configPath;
1784
+ }
1785
+ function findOpenCodeConfig(projectRoot) {
1786
+ const candidates = ["opencode.json", "opencode.jsonc"];
1787
+ for (const name of candidates) {
1788
+ const full = join5(projectRoot, name);
1789
+ if (existsSync4(full))
1790
+ return full;
1791
+ }
1792
+ return null;
1793
+ }
1794
+ function setMcpEntry(name, entry) {
1795
+ const projectRoot = findProjectRoot();
1796
+ const configPath = ensureOpenCodeConfig(projectRoot);
1797
+ const config = readOpenCodeConfig(configPath);
1798
+ if (!config)
1799
+ return;
1800
+ if (!config.mcp)
1801
+ config.mcp = {};
1802
+ config.mcp[name] = entry;
1803
+ writeOpenCodeConfig(configPath, config);
1804
+ }
1805
+ function ensureMcpEntry(name, entry) {
1806
+ const projectRoot = findProjectRoot();
1807
+ const configPath = ensureOpenCodeConfig(projectRoot);
1808
+ const config = readOpenCodeConfig(configPath);
1809
+ if (!config)
1810
+ return;
1811
+ if (!config.mcp)
1812
+ config.mcp = {};
1813
+ const mcp = config.mcp;
1814
+ if (!mcp[name]) {
1815
+ mcp[name] = entry;
1816
+ writeOpenCodeConfig(configPath, config);
1817
+ }
1818
+ }
1819
+ function patchOpenCodeConfig() {
1820
+ const projectRoot = findProjectRoot();
1821
+ const configPath = findOpenCodeConfig(projectRoot);
1822
+ if (!configPath) {
1823
+ return {
1824
+ success: false,
1825
+ message: "No se encontró opencode.json ni opencode.jsonc"
1826
+ };
1827
+ }
1828
+ const config = readOpenCodeConfig(configPath);
1829
+ if (!config) {
1830
+ return {
1831
+ success: false,
1832
+ message: `Error parseando ${configPath}`
1833
+ };
1834
+ }
1835
+ let changed = false;
1836
+ if ("plugin" in config) {
1837
+ delete config.plugin;
1838
+ changed = true;
1839
+ }
1840
+ if (changed) {
1841
+ writeOpenCodeConfig(configPath, config);
1842
+ return { success: true, message: "Config actualizada (plugin legacy eliminado)" };
1843
+ }
1844
+ return { success: true, message: "Config de OpenCode ya está limpia" };
1845
+ }
1846
+ var init_config = __esm(() => {
1847
+ init_fs();
1848
+ });
1849
+
1850
+ // src/stack.ts
1851
+ var exports_stack = {};
1852
+ __export(exports_stack, {
1853
+ verifyMcpServers: () => verifyMcpServers,
1854
+ uninstallStackConfig: () => uninstallStackConfig,
1855
+ uninstallEngramConfig: () => uninstallEngramConfig,
1856
+ setupOpenSpec: () => setupOpenSpec,
1857
+ setupContext7: () => setupContext7,
1858
+ installStack: () => installStack,
1859
+ installEngram: () => installEngram,
1860
+ installCodeGraph: () => installCodeGraph
1861
+ });
1862
+ import { existsSync as existsSync6, mkdirSync as mkdirSync4, copyFileSync as copyFileSync3, unlinkSync as unlinkSync3, rmSync as rmSync3 } from "fs";
1863
+ import { join as join7 } from "path";
1864
+ import { execSync as execSync3 } from "child_process";
1751
1865
  async function installCodeGraph(toolsDir) {
1752
1866
  const projectRoot = findProjectRoot();
1753
- const cgToolDir = join4(toolsDir ?? join4(projectRoot, ".opencode", "tools"), "codegraph");
1754
- if (!existsSync3(cgToolDir))
1755
- mkdirSync2(cgToolDir, { recursive: true });
1867
+ const cgToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "codegraph");
1868
+ if (!existsSync6(cgToolDir))
1869
+ mkdirSync4(cgToolDir, { recursive: true });
1756
1870
  const target = detectPlatformTarget();
1757
1871
  if (!target) {
1758
1872
  return {
@@ -1760,18 +1874,18 @@ async function installCodeGraph(toolsDir) {
1760
1874
  message: `Plataforma no soportada para descarga local: ${process.platform}/${process.arch}. Instalá CodeGraph manualmente.`
1761
1875
  };
1762
1876
  }
1763
- const localBin = join4(cgToolDir, "bin", "codegraph");
1877
+ const localBin = join7(cgToolDir, "bin", "codegraph");
1764
1878
  const localBinExe = localBin + (process.platform === "win32" ? ".exe" : "");
1765
- if (existsSync3(localBinExe)) {
1879
+ if (existsSync6(localBinExe)) {
1766
1880
  try {
1767
- execSync(`"${localBinExe}" --version`, { stdio: "pipe", timeout: 1e4 });
1881
+ execSync3(`"${localBinExe}" --version`, { stdio: "pipe", timeout: 1e4 });
1768
1882
  } catch {
1769
1883
  try {
1770
- rmSync(join4(cgToolDir, "bin"), { recursive: true, force: true });
1884
+ rmSync3(join7(cgToolDir, "bin"), { recursive: true, force: true });
1771
1885
  } catch {}
1772
1886
  }
1773
1887
  }
1774
- if (!existsSync3(localBinExe)) {
1888
+ if (!existsSync6(localBinExe)) {
1775
1889
  const tag = await fetchLatestReleaseTag("colbymchenry/codegraph");
1776
1890
  if (!tag) {
1777
1891
  return {
@@ -1782,14 +1896,14 @@ async function installCodeGraph(toolsDir) {
1782
1896
  const ext = process.platform === "win32" ? "zip" : "tar.gz";
1783
1897
  const url = `https://github.com/colbymchenry/codegraph/releases/download/${tag}/codegraph-${target}.${ext}`;
1784
1898
  try {
1785
- await downloadAndExtract(url, cgToolDir, 1, 180000);
1899
+ await downloadAndExtractWithRetry(url, cgToolDir, 1, 180000, 2);
1786
1900
  } catch (e2) {
1787
1901
  return {
1788
1902
  success: false,
1789
1903
  message: `Error descargando CodeGraph ${tag}: ${e2.message}`
1790
1904
  };
1791
1905
  }
1792
- if (!existsSync3(localBinExe)) {
1906
+ if (!existsSync6(localBinExe)) {
1793
1907
  return {
1794
1908
  success: false,
1795
1909
  message: `Descarga de CodeGraph ${tag} completada pero no se encontró el binario en ${localBinExe}.`
@@ -1797,26 +1911,26 @@ async function installCodeGraph(toolsDir) {
1797
1911
  }
1798
1912
  if (process.platform !== "win32") {
1799
1913
  try {
1800
- execSync(`chmod +x "${localBinExe}"`, { stdio: "pipe" });
1914
+ execSync3(`chmod +x "${localBinExe}"`, { stdio: "pipe" });
1801
1915
  } catch {}
1802
1916
  }
1803
1917
  }
1804
1918
  try {
1805
- execSync(`"${localBinExe}" init -i`, { stdio: "pipe", timeout: 120000, cwd: projectRoot });
1919
+ execSync3(`"${localBinExe}" init -i`, { stdio: "pipe", timeout: 120000, cwd: projectRoot });
1806
1920
  } catch {}
1807
1921
  try {
1808
- execSync(`"${localBinExe}" install --target opencode --location local --yes`, {
1922
+ execSync3(`"${localBinExe}" install --target opencode --location local --yes`, {
1809
1923
  stdio: "pipe",
1810
1924
  timeout: 30000,
1811
1925
  cwd: projectRoot
1812
1926
  });
1813
1927
  } catch {}
1814
- const rootAgentsMd = join4(projectRoot, "AGENTS.md");
1815
- if (existsSync3(rootAgentsMd)) {
1816
- const dest = join4(cgToolDir, "AGENTS.md");
1928
+ const rootAgentsMd = join7(projectRoot, "AGENTS.md");
1929
+ if (existsSync6(rootAgentsMd)) {
1930
+ const dest = join7(cgToolDir, "AGENTS.md");
1817
1931
  try {
1818
- copyFileSync(rootAgentsMd, dest);
1819
- unlinkSync(rootAgentsMd);
1932
+ copyFileSync3(rootAgentsMd, dest);
1933
+ unlinkSync3(rootAgentsMd);
1820
1934
  } catch {}
1821
1935
  }
1822
1936
  setMcpEntry("codegraph", {
@@ -1829,7 +1943,7 @@ async function installCodeGraph(toolsDir) {
1829
1943
  function setupOpenSpec() {
1830
1944
  const npxCmd = isCommandAvailable("bun") ? "bunx" : "npx --yes";
1831
1945
  try {
1832
- execSync(`${npxCmd} openspec init --tools opencode --force`, {
1946
+ execSync3(`${npxCmd} openspec init --tools opencode --force`, {
1833
1947
  stdio: "pipe",
1834
1948
  timeout: 120000
1835
1949
  });
@@ -1843,10 +1957,46 @@ function setupOpenSpec() {
1843
1957
  }
1844
1958
  async function installEngram(toolsDir) {
1845
1959
  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 });
1960
+ const globalBin = Bun.which("engram");
1961
+ if (globalBin) {
1962
+ const engramToolDir2 = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "engram");
1963
+ const engramBinDir2 = join7(engramToolDir2, "bin");
1964
+ if (!existsSync6(engramBinDir2))
1965
+ mkdirSync4(engramBinDir2, { recursive: true });
1966
+ const localBin2 = join7(engramBinDir2, "engram" + (process.platform === "win32" ? ".exe" : ""));
1967
+ if (!existsSync6(localBin2)) {
1968
+ try {
1969
+ unlinkSync3(localBin2);
1970
+ } catch {}
1971
+ try {
1972
+ if (process.platform !== "win32") {
1973
+ execSync3(`ln -s "${globalBin}" "${localBin2}"`, { stdio: "pipe" });
1974
+ } else {
1975
+ copyFileSync3(globalBin, localBin2);
1976
+ }
1977
+ } catch {}
1978
+ }
1979
+ setMcpEntry("engram", {
1980
+ type: "local",
1981
+ command: [`.opencode/tools/engram/bin/engram`, "mcp"],
1982
+ enabled: true
1983
+ });
1984
+ const pluginSource2 = join7(projectRoot, "assets", "plugins", "engram.ts");
1985
+ const pluginsDir2 = join7(projectRoot, ".opencode", "plugins");
1986
+ const pluginTarget2 = join7(pluginsDir2, "engram.ts");
1987
+ if (existsSync6(pluginSource2)) {
1988
+ if (!existsSync6(pluginsDir2))
1989
+ mkdirSync4(pluginsDir2, { recursive: true });
1990
+ try {
1991
+ copyFileSync3(pluginSource2, pluginTarget2);
1992
+ } catch {}
1993
+ }
1994
+ return { success: true, message: `Engram global detectado en ${globalBin} — usando binario global. Plugin copiado a .opencode/plugins/` };
1995
+ }
1996
+ const engramToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "engram");
1997
+ const engramBinDir = join7(engramToolDir, "bin");
1998
+ if (!existsSync6(engramBinDir))
1999
+ mkdirSync4(engramBinDir, { recursive: true });
1850
2000
  const target = detectPlatformTarget();
1851
2001
  if (!target) {
1852
2002
  return {
@@ -1854,17 +2004,17 @@ async function installEngram(toolsDir) {
1854
2004
  message: `Plataforma no soportada para descarga local: ${process.platform}/${process.arch}. Instalá Engram manualmente.`
1855
2005
  };
1856
2006
  }
1857
- const localBin = join4(engramBinDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
1858
- if (existsSync3(localBin)) {
2007
+ const localBin = join7(engramBinDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
2008
+ if (existsSync6(localBin)) {
1859
2009
  try {
1860
- execSync(`"${localBin}" --version`, { stdio: "pipe", timeout: 1e4 });
2010
+ execSync3(`"${localBin}" --version`, { stdio: "pipe", timeout: 1e4 });
1861
2011
  } catch {
1862
2012
  try {
1863
- unlinkSync(localBin);
2013
+ unlinkSync3(localBin);
1864
2014
  } catch {}
1865
2015
  }
1866
2016
  }
1867
- if (!existsSync3(localBin)) {
2017
+ if (!existsSync6(localBin)) {
1868
2018
  const tag = await fetchLatestReleaseTag("Gentleman-Programming/engram");
1869
2019
  if (!tag) {
1870
2020
  return {
@@ -1878,31 +2028,31 @@ async function installEngram(toolsDir) {
1878
2028
  const ext = process.platform === "win32" ? "zip" : "tar.gz";
1879
2029
  const url = `https://github.com/Gentleman-Programming/engram/releases/download/${tag}/engram_${versionNum}_${os}_${engramCpu}.${ext}`;
1880
2030
  try {
1881
- await downloadAndExtract(url, engramToolDir, 0, 120000);
2031
+ await downloadAndExtractWithRetry(url, engramToolDir, 0, 120000, 2);
1882
2032
  } catch (e2) {
1883
2033
  return {
1884
2034
  success: false,
1885
2035
  message: `Error descargando Engram ${tag}: ${e2.message}`
1886
2036
  };
1887
2037
  }
1888
- const extractedBin = join4(engramToolDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
1889
- if (existsSync3(extractedBin) && extractedBin !== localBin) {
2038
+ const extractedBin = join7(engramToolDir, "engram" + (process.platform === "win32" ? ".exe" : ""));
2039
+ if (existsSync6(extractedBin) && extractedBin !== localBin) {
1890
2040
  try {
1891
- copyFileSync(extractedBin, localBin);
1892
- unlinkSync(extractedBin);
2041
+ copyFileSync3(extractedBin, localBin);
2042
+ unlinkSync3(extractedBin);
1893
2043
  } catch {}
1894
2044
  }
1895
- if (!existsSync3(localBin)) {
2045
+ if (!existsSync6(localBin)) {
1896
2046
  const found = findBinaryInDir(engramToolDir, "engram");
1897
2047
  if (found && found !== localBin) {
1898
2048
  try {
1899
- copyFileSync(found, localBin);
2049
+ copyFileSync3(found, localBin);
1900
2050
  if (process.platform !== "win32")
1901
- execSync(`chmod +x "${localBin}"`, { stdio: "pipe" });
2051
+ execSync3(`chmod +x "${localBin}"`, { stdio: "pipe" });
1902
2052
  } catch {}
1903
2053
  }
1904
2054
  }
1905
- if (!existsSync3(localBin)) {
2055
+ if (!existsSync6(localBin)) {
1906
2056
  return {
1907
2057
  success: false,
1908
2058
  message: `Descarga de Engram ${tag} completada pero no se encontró el binario en ${localBin}.`
@@ -1910,7 +2060,7 @@ async function installEngram(toolsDir) {
1910
2060
  }
1911
2061
  if (process.platform !== "win32") {
1912
2062
  try {
1913
- execSync(`chmod +x "${localBin}"`, { stdio: "pipe" });
2063
+ execSync3(`chmod +x "${localBin}"`, { stdio: "pipe" });
1914
2064
  } catch {}
1915
2065
  }
1916
2066
  }
@@ -1919,76 +2069,50 @@ async function installEngram(toolsDir) {
1919
2069
  command: [`.opencode/tools/engram/bin/engram`, "mcp"],
1920
2070
  enabled: true
1921
2071
  });
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
- }
2072
+ const pluginSource = join7(projectRoot, "assets", "plugins", "engram.ts");
2073
+ const pluginsDir = join7(projectRoot, ".opencode", "plugins");
2074
+ const pluginTarget = join7(pluginsDir, "engram.ts");
2075
+ if (existsSync6(pluginSource)) {
2076
+ if (!existsSync6(pluginsDir))
2077
+ mkdirSync4(pluginsDir, { recursive: true });
2078
+ try {
2079
+ copyFileSync3(pluginSource, pluginTarget);
2080
+ } catch {}
1939
2081
  }
1940
- return null;
2082
+ return { success: true, message: "Engram instalado localmente en .opencode/tools/engram/bin/ y configurado para OpenCode (MCP + plugin)" };
1941
2083
  }
1942
2084
  function setupContext7(toolsDir) {
1943
2085
  const projectRoot = findProjectRoot();
1944
- const ctx7ToolDir = join4(toolsDir ?? join4(projectRoot, ".opencode", "tools"), "context7");
1945
- if (!existsSync3(ctx7ToolDir))
1946
- mkdirSync2(ctx7ToolDir, { recursive: true });
2086
+ const ctx7ToolDir = join7(toolsDir ?? join7(projectRoot, ".opencode", "tools"), "context7");
2087
+ if (!existsSync6(ctx7ToolDir))
2088
+ mkdirSync4(ctx7ToolDir, { recursive: true });
1947
2089
  ensureMcpEntry("context7", {
1948
2090
  type: "remote",
1949
2091
  url: "https://mcp.context7.com/mcp",
1950
2092
  enabled: true
1951
2093
  });
1952
2094
  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) {
2095
+ try {
2096
+ execSync3(`${npxCmd} ctx7 setup --opencode`, {
2097
+ stdio: "pipe",
2098
+ timeout: 60000
2099
+ });
2100
+ return { success: true, message: "Context7 configurado (MCP + skill instalado)" };
2101
+ } catch {
1977
2102
  return {
1978
- success: false,
1979
- message: `Error parseando ${configPath}`
2103
+ success: true,
2104
+ message: "Context7 MCP registrado (skill opcional no instalada — corrí `npx ctx7 setup --opencode` manualmente si la querés)"
1980
2105
  };
1981
2106
  }
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" };
2107
+ }
2108
+ async function installStack(toolsDir) {
2109
+ return {
2110
+ codegraph: await installCodeGraph(toolsDir),
2111
+ openspec: setupOpenSpec(),
2112
+ engram: await installEngram(toolsDir),
2113
+ context7: setupContext7(toolsDir),
2114
+ config: patchOpenCodeConfig()
2115
+ };
1992
2116
  }
1993
2117
  function uninstallEngramConfig() {
1994
2118
  const projectRoot = findProjectRoot();
@@ -2038,16 +2162,16 @@ function uninstallStackConfig(paths) {
2038
2162
  }
2039
2163
  }
2040
2164
  }
2041
- const codegraphDir = join4(projectRoot, ".codegraph");
2042
- if (existsSync3(codegraphDir)) {
2165
+ const codegraphDir = join7(projectRoot, ".codegraph");
2166
+ if (existsSync6(codegraphDir)) {
2043
2167
  try {
2044
- rmSync(codegraphDir, { recursive: true, force: true });
2168
+ rmSync3(codegraphDir, { recursive: true, force: true });
2045
2169
  removed.push(".codegraph/");
2046
2170
  } catch {}
2047
2171
  }
2048
- if (existsSync3(paths.tools)) {
2172
+ if (existsSync6(paths.tools)) {
2049
2173
  try {
2050
- rmSync(paths.tools, { recursive: true, force: true });
2174
+ rmSync3(paths.tools, { recursive: true, force: true });
2051
2175
  removed.push(".opencode/tools/");
2052
2176
  } catch {}
2053
2177
  }
@@ -2059,8 +2183,335 @@ function uninstallStackConfig(paths) {
2059
2183
  message: `Removido: ${removed.join(", ")}. Los binarios globales (codegraph, engram) no se tocaron.`
2060
2184
  };
2061
2185
  }
2186
+ function verifyMcpServers(projectRoot) {
2187
+ const opencodeDir = findOpenCodeDir(projectRoot);
2188
+ const mcpBase = opencodeDir ? join7(opencodeDir, "mcp") : join7(projectRoot, ".opencode", "mcp");
2189
+ const controllerPath = join7(mcpBase, "ostacky-controller", "index.js");
2190
+ const openspecPath = join7(mcpBase, "openspec", "index.js");
2191
+ const result = {
2192
+ ostackyController: {
2193
+ exists: existsSync6(controllerPath),
2194
+ path: controllerPath
2195
+ },
2196
+ openspec: {
2197
+ exists: existsSync6(openspecPath),
2198
+ path: openspecPath
2199
+ }
2200
+ };
2201
+ if (!result.ostackyController.exists) {
2202
+ result.ostackyController.error = "ostacky-controller MCP server not found";
2203
+ }
2204
+ if (!result.openspec.exists) {
2205
+ result.openspec.error = "openspec MCP server not found";
2206
+ }
2207
+ return result;
2208
+ }
2209
+ var init_stack = __esm(() => {
2210
+ init_fs();
2211
+ init_config();
2212
+ init_github();
2213
+ });
2214
+ // package.json
2215
+ var package_default = {
2216
+ name: "ostacky",
2217
+ version: "0.6.0",
2218
+ description: "Instalador interactivo de agentes y comandos para OpenCode",
2219
+ type: "module",
2220
+ bin: {
2221
+ ostacky: "./dist/cli.js"
2222
+ },
2223
+ scripts: {
2224
+ prebuild: "bun run scripts/sync-version.ts",
2225
+ dev: "bun run src/cli.ts",
2226
+ build: "bun build src/cli.ts --target=node --format=esm --outfile dist/cli.js && bun scripts/add-shebang.ts",
2227
+ start: "node dist/cli.js",
2228
+ test: "bun test",
2229
+ "check:skills": "bun run scripts/check-skill-sync.ts",
2230
+ "check:skills:fix": "bun run scripts/check-skill-sync.ts --fix",
2231
+ "hash:check": "bun run scripts/update-manifest-hashes.ts --check",
2232
+ "hash:update": "bun run scripts/update-manifest-hashes.ts",
2233
+ prepublishOnly: "bun run build"
2234
+ },
2235
+ files: [
2236
+ "dist/",
2237
+ "assets/",
2238
+ "manifest.json",
2239
+ "LICENSE"
2240
+ ],
2241
+ keywords: [
2242
+ "opencode",
2243
+ "installer",
2244
+ "cli",
2245
+ "agent"
2246
+ ],
2247
+ license: "MIT",
2248
+ dependencies: {
2249
+ "@clack/prompts": "^0.9.0"
2250
+ },
2251
+ devDependencies: {
2252
+ "@types/bun": "latest",
2253
+ typescript: "^5.0.0"
2254
+ },
2255
+ publishConfig: {
2256
+ access: "public"
2257
+ },
2258
+ engines: {
2259
+ node: ">=20.0.0"
2260
+ }
2261
+ };
2262
+
2263
+ // src/prompts/index.ts
2264
+ init_dist2();
2265
+ init_fs();
2266
+
2267
+ // src/prompts/helpers.ts
2268
+ init_dist2();
2269
+ init_github();
2270
+ init_fs();
2271
+ init_lockfile();
2272
+
2273
+ // src/installer.ts
2274
+ init_github();
2275
+ init_lockfile();
2276
+ init_security();
2277
+ init_fs();
2278
+ init_config();
2279
+ import {
2280
+ existsSync as existsSync5,
2281
+ mkdirSync as mkdirSync3,
2282
+ writeFileSync as writeFileSync5,
2283
+ unlinkSync as unlinkSync2,
2284
+ readdirSync as readdirSync2,
2285
+ statSync as statSync2,
2286
+ copyFileSync as copyFileSync2,
2287
+ readFileSync as readFileSync5,
2288
+ rmSync as rmSync2
2289
+ } from "fs";
2290
+ import { execSync as execSync2 } from "child_process";
2291
+ import { join as join6 } from "path";
2292
+ function upsertLockfile(paths, type, item, manifest, contentHash) {
2293
+ const existing = readLockfile(paths.root) ?? {
2294
+ version: manifest.version,
2295
+ lockedAt: new Date().toISOString(),
2296
+ repo: manifest.repo,
2297
+ tag: manifest.tag,
2298
+ agents: {},
2299
+ commands: {},
2300
+ skills: {}
2301
+ };
2302
+ if (!existing.skills)
2303
+ existing.skills = {};
2304
+ if (!existing.mcpServers)
2305
+ existing.mcpServers = {};
2306
+ if (!existing[type])
2307
+ existing[type] = {};
2308
+ existing[type][item.name] = {
2309
+ version: item.version,
2310
+ installedAt: new Date().toISOString(),
2311
+ sha256: contentHash
2312
+ };
2313
+ existing.tag = manifest.tag;
2314
+ existing.version = manifest.version;
2315
+ existing.lockedAt = new Date().toISOString();
2316
+ writeLockfile(paths.root, existing);
2317
+ }
2318
+ function readBundledAsset(relativePath) {
2319
+ const fullPath = join6(PACKAGE_ROOT, relativePath);
2320
+ if (!existsSync5(fullPath))
2321
+ return null;
2322
+ return readFileSync5(fullPath, "utf-8");
2323
+ }
2324
+ async function installAgent(item, manifest, paths) {
2325
+ let content;
2326
+ try {
2327
+ content = await downloadFile(manifest, item.file);
2328
+ } catch (downloadErr) {
2329
+ const bundled = readBundledAsset(item.file);
2330
+ if (bundled === null) {
2331
+ throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
2332
+ }
2333
+ content = bundled;
2334
+ }
2335
+ writeFileSync5(join6(paths.agents, `${item.name}.md`), content, "utf-8");
2336
+ upsertLockfile(paths, "agents", item, manifest, sha256(content));
2337
+ }
2338
+ async function installCommand(item, manifest, paths) {
2339
+ let content;
2340
+ try {
2341
+ content = await downloadFile(manifest, item.file);
2342
+ } catch (downloadErr) {
2343
+ const bundled = readBundledAsset(item.file);
2344
+ if (bundled === null) {
2345
+ throw new Error(`Descarga falló (${downloadErr.message}) y el asset no está bundleado en ${item.file}`);
2346
+ }
2347
+ content = bundled;
2348
+ }
2349
+ writeFileSync5(join6(paths.commands, `${item.name}.md`), content, "utf-8");
2350
+ upsertLockfile(paths, "commands", item, manifest, sha256(content));
2351
+ }
2352
+ async function installSkill(item, manifest, paths) {
2353
+ const src = getBundledSkillPath(item.name);
2354
+ if (!existsSync5(src)) {
2355
+ throw new Error(`Skill bundleada no encontrada: ${src}. ¿Falta el directorio assets/skills/${item.name}/?`);
2356
+ }
2357
+ const treeHash = computeTreeHash(src);
2358
+ if (item.sha256 && treeHash !== item.sha256) {
2359
+ throw new Error(`Tree hash inválido para skill "${item.name}"
2360
+ ` + ` esperado: ${item.sha256}
2361
+ ` + ` recibido: ${treeHash}`);
2362
+ }
2363
+ const dest = join6(paths.skills, item.name);
2364
+ if (existsSync5(dest)) {
2365
+ rmSync2(dest, { recursive: true, force: true });
2366
+ }
2367
+ copyDirRecursive(src, dest);
2368
+ upsertLockfile(paths, "skills", item, manifest, treeHash);
2369
+ }
2370
+ async function installMcpServer(item, manifest, paths) {
2371
+ const src = getBundledMcpPath(item.name);
2372
+ if (!existsSync5(src)) {
2373
+ throw new Error(`MCP server bundleado no encontrado: ${src}. ` + `¿Falta el directorio assets/mcp/${item.name}/?`);
2374
+ }
2375
+ const treeHash = computeTreeHash(src);
2376
+ if (item.sha256 && treeHash !== item.sha256) {
2377
+ throw new Error(`Tree hash inválido para MCP server "${item.name}"
2378
+ ` + ` esperado: ${item.sha256}
2379
+ ` + ` recibido: ${treeHash}`);
2380
+ }
2381
+ const dest = join6(paths.mcp, item.name);
2382
+ if (existsSync5(dest)) {
2383
+ rmSync2(dest, { recursive: true, force: true });
2384
+ }
2385
+ mkdirSync3(dest, { recursive: true });
2386
+ const bundledPath = join6(PACKAGE_ROOT, "dist", "mcp", item.name, "index.js");
2387
+ if (existsSync5(bundledPath)) {
2388
+ copyFileSync2(bundledPath, join6(dest, "index.js"));
2389
+ } else {
2390
+ copyDirRecursive(src, dest, true);
2391
+ const installCmd = isCommandAvailable("bun") ? "bun install --no-save" : "npm install --no-audit --no-fund";
2392
+ try {
2393
+ const output = execSync2(installCmd, {
2394
+ cwd: dest,
2395
+ encoding: "utf-8",
2396
+ timeout: 60000
2397
+ });
2398
+ if (output)
2399
+ console.error(output);
2400
+ } catch (e2) {
2401
+ console.error(`[WARN] MCP server "${item.name}" copiado pero ${installCmd} falló: ${e2.message}.
2402
+ ` + ` Resolvé las dependencias manualmente: cd .opencode/mcp/${item.name} && bun install`);
2403
+ }
2404
+ }
2405
+ upsertLockfile(paths, "mcpServers", item, manifest, treeHash);
2406
+ ensureMcpEntry(item.name, {
2407
+ type: "local",
2408
+ command: ["node", `.opencode/mcp/${item.name}/index.js`],
2409
+ enabled: true
2410
+ });
2411
+ }
2412
+ function isMcpServerInstalled(name, paths) {
2413
+ return existsSync5(join6(paths.mcp, name, "index.js"));
2414
+ }
2415
+ function isAgentInstalled(name, paths) {
2416
+ return existsSync5(join6(paths.agents, `${name}.md`));
2417
+ }
2418
+ function isCommandInstalled(name, paths) {
2419
+ return existsSync5(join6(paths.commands, `${name}.md`));
2420
+ }
2421
+ function isSkillInstalled(name, paths) {
2422
+ return existsSync5(join6(paths.skills, name, "SKILL.md"));
2423
+ }
2424
+ function uninstallAgent(name, paths) {
2425
+ const filePath = join6(paths.agents, `${name}.md`);
2426
+ try {
2427
+ if (existsSync5(filePath)) {
2428
+ unlinkSync2(filePath);
2429
+ }
2430
+ } catch {
2431
+ return false;
2432
+ }
2433
+ removeFromLockfile(paths.root, "agents", name);
2434
+ return true;
2435
+ }
2436
+ function uninstallCommand(name, paths) {
2437
+ const filePath = join6(paths.commands, `${name}.md`);
2438
+ try {
2439
+ if (existsSync5(filePath)) {
2440
+ unlinkSync2(filePath);
2441
+ }
2442
+ } catch {
2443
+ return false;
2444
+ }
2445
+ removeFromLockfile(paths.root, "commands", name);
2446
+ return true;
2447
+ }
2448
+ function uninstallSkill(name, paths) {
2449
+ const dirPath = join6(paths.skills, name);
2450
+ try {
2451
+ if (existsSync5(dirPath)) {
2452
+ rmSync2(dirPath, { recursive: true, force: true });
2453
+ }
2454
+ } catch {
2455
+ return false;
2456
+ }
2457
+ removeFromLockfile(paths.root, "skills", name);
2458
+ return true;
2459
+ }
2460
+ function uninstallMcpServer(name, paths) {
2461
+ const dirPath = join6(paths.mcp, name);
2462
+ try {
2463
+ if (existsSync5(dirPath)) {
2464
+ rmSync2(dirPath, { recursive: true, force: true });
2465
+ }
2466
+ } catch {
2467
+ return false;
2468
+ }
2469
+ const projectRoot = findProjectRoot();
2470
+ const configPath = findOpenCodeConfig(projectRoot);
2471
+ if (configPath) {
2472
+ const config = readOpenCodeConfig(configPath);
2473
+ if (config) {
2474
+ const mcp = config.mcp;
2475
+ if (mcp && mcp[name]) {
2476
+ delete mcp[name];
2477
+ if (Object.keys(mcp).length === 0) {
2478
+ delete config.mcp;
2479
+ }
2480
+ writeOpenCodeConfig(configPath, config);
2481
+ }
2482
+ }
2483
+ }
2484
+ removeFromLockfile(paths.root, "mcpServers", name);
2485
+ return true;
2486
+ }
2487
+ function uninstallAll(paths) {
2488
+ const lockfile = readLockfile(paths.root);
2489
+ if (!lockfile)
2490
+ return;
2491
+ for (const name of Object.keys(lockfile.agents)) {
2492
+ uninstallAgent(name, paths);
2493
+ }
2494
+ for (const name of Object.keys(lockfile.commands)) {
2495
+ uninstallCommand(name, paths);
2496
+ }
2497
+ for (const name of Object.keys(lockfile.skills ?? {})) {
2498
+ uninstallSkill(name, paths);
2499
+ }
2500
+ for (const name of Object.keys(lockfile.mcpServers ?? {})) {
2501
+ uninstallMcpServer(name, paths);
2502
+ }
2503
+ if (existsSync5(paths.mcp)) {
2504
+ for (const entry of readdirSync2(paths.mcp)) {
2505
+ const dirPath = join6(paths.mcp, entry);
2506
+ if (statSync2(dirPath).isDirectory()) {
2507
+ uninstallMcpServer(entry, paths);
2508
+ }
2509
+ }
2510
+ }
2511
+ clearLockfile(paths.root);
2512
+ }
2062
2513
 
2063
- // src/prompts.ts
2514
+ // src/prompts/helpers.ts
2064
2515
  function onCancel(value) {
2065
2516
  if (BD(value)) {
2066
2517
  fe("Operación cancelada.");
@@ -2096,38 +2547,6 @@ function printPostInstallSteps() {
2096
2547
  ].join(`
2097
2548
  `), "Próximos pasos");
2098
2549
  }
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
2550
  async function resolveOpenCodePaths() {
2132
2551
  const existing = findOpenCodeDir();
2133
2552
  if (existing) {
@@ -2148,6 +2567,26 @@ Raíz detectada: ${projectRoot}`, "Aviso");
2148
2567
  v2.success(`Estructura creada en ${paths.root}`);
2149
2568
  return paths;
2150
2569
  }
2570
+ function getOrphanedItems(manifest, paths) {
2571
+ const lockfile = readLockfile(paths.root);
2572
+ if (!lockfile)
2573
+ return [];
2574
+ const manifestNames = {
2575
+ agents: new Set(manifest.agents.map((a2) => a2.name)),
2576
+ commands: new Set(manifest.commands.map((c2) => c2.name)),
2577
+ skills: new Set((manifest.skills ?? []).map((s) => s.name)),
2578
+ mcpServers: new Set((manifest.mcpServers ?? []).map((m3) => m3.name))
2579
+ };
2580
+ const orphans = [];
2581
+ for (const type of ["agents", "commands", "skills", "mcpServers"]) {
2582
+ for (const [name, data] of Object.entries(lockfile[type] ?? {})) {
2583
+ if (!manifestNames[type].has(name)) {
2584
+ orphans.push({ type, name, version: data.version });
2585
+ }
2586
+ }
2587
+ }
2588
+ return orphans;
2589
+ }
2151
2590
  function getUpdateCandidates(manifest, paths) {
2152
2591
  const lockfile = readLockfile(paths.root);
2153
2592
  const candidates = [];
@@ -2200,6 +2639,46 @@ function kindLabel(type) {
2200
2639
  return "MCP";
2201
2640
  }
2202
2641
  }
2642
+
2643
+ // src/prompts/install.ts
2644
+ init_dist2();
2645
+ import { join as join8 } from "path";
2646
+ import { existsSync as existsSync7 } from "fs";
2647
+ init_stack();
2648
+ init_fs();
2649
+ async function doInstallStack(toolsDir) {
2650
+ const spin = L2();
2651
+ let allOk = true;
2652
+ spin.start("Instalando CodeGraph...");
2653
+ const cg = await installCodeGraph(toolsDir);
2654
+ spin.stop(cg.success ? `✓ ${cg.message}` : `✗ ${cg.message}`);
2655
+ if (!cg.success)
2656
+ allOk = false;
2657
+ spin.start("Configurando OpenSpec...");
2658
+ const os = setupOpenSpec();
2659
+ spin.stop(os.success ? `✓ ${os.message}` : `✗ ${os.message}`);
2660
+ if (!os.success)
2661
+ allOk = false;
2662
+ spin.start("Instalando Engram...");
2663
+ const eng = await installEngram(toolsDir);
2664
+ spin.stop(eng.success ? `✓ ${eng.message}` : `✗ ${eng.message}`);
2665
+ if (!eng.success)
2666
+ allOk = false;
2667
+ spin.start("Configurando Context7...");
2668
+ const ctx = setupContext7(toolsDir);
2669
+ spin.stop(ctx.success ? `✓ ${ctx.message}` : `✗ ${ctx.message}`);
2670
+ if (!ctx.success)
2671
+ allOk = false;
2672
+ spin.start("Verificando configuración...");
2673
+ const { patchOpenCodeConfig: patchOpenCodeConfig2 } = await Promise.resolve().then(() => (init_config(), exports_config));
2674
+ const cfg = patchOpenCodeConfig2();
2675
+ spin.stop(cfg.success ? `✓ ${cfg.message}` : `✗ ${cfg.message}`);
2676
+ if (!cfg.success)
2677
+ allOk = false;
2678
+ if (!allOk) {
2679
+ v2.warn("Algunos componentes requieren atención. Revisá los mensajes de error arriba.");
2680
+ }
2681
+ }
2203
2682
  async function doInstallAll(manifest, paths) {
2204
2683
  const spin = L2();
2205
2684
  let errors = 0;
@@ -2230,191 +2709,541 @@ async function doInstallAll(manifest, paths) {
2230
2709
  await installSkill(skill, manifest, paths);
2231
2710
  spin.stop(`Skill instalada: ${skill.name} (${skill.version})`);
2232
2711
  } catch (e2) {
2233
- spin.stop(`Error en ${skill.name}: ${e2.message}`);
2234
- errors++;
2712
+ spin.stop(`Error en ${skill.name}: ${e2.message}`);
2713
+ errors++;
2714
+ }
2715
+ }
2716
+ for (const mcp of manifest.mcpServers ?? []) {
2717
+ spin.start(`Instalando MCP server: ${mcp.name} (${mcp.version})`);
2718
+ try {
2719
+ await installMcpServer(mcp, manifest, paths);
2720
+ spin.stop(`MCP server instalado: ${mcp.name} (${mcp.version})`);
2721
+ } catch (e2) {
2722
+ spin.stop(`Error en ${mcp.name}: ${e2.message}`);
2723
+ errors++;
2724
+ }
2725
+ }
2726
+ v2.info("Instalando stack de herramientas...");
2727
+ await doInstallStack(paths.tools);
2728
+ const missingTools = [];
2729
+ const codegraphBin = join8(paths.tools, "codegraph", "bin", "codegraph");
2730
+ const engramBin = join8(paths.tools, "engram", "bin", "engram");
2731
+ if (!existsSync7(codegraphBin))
2732
+ missingTools.push("CodeGraph");
2733
+ if (!existsSync7(engramBin))
2734
+ missingTools.push("Engram");
2735
+ if (missingTools.length > 0) {
2736
+ v2.warn(`Faltan herramientas del stack: ${missingTools.join(", ")}.
2737
+ ` + "Ejecutá `/install-stack` desde el agente para instalarlas manualmente.");
2738
+ }
2739
+ if (errors === 0) {
2740
+ v2.success("Todo instalado correctamente.");
2741
+ } else {
2742
+ v2.warn(`Completado con ${errors} error(es).`);
2743
+ }
2744
+ }
2745
+
2746
+ // src/prompts/add.ts
2747
+ init_dist2();
2748
+ init_lockfile();
2749
+ async function doAddAgent(manifest, paths) {
2750
+ const lockfile = readLockfile(paths.root);
2751
+ const options = manifest.agents.map((a2) => {
2752
+ const installed = getInstalledVersion(lockfile, "agents", a2.name);
2753
+ const hint = installed ? `v${installed} instalado — ${a2.description}` : a2.description;
2754
+ return { value: a2.name, label: `${a2.name} (v${a2.version})`, hint };
2755
+ });
2756
+ const selected = await pe({
2757
+ message: "¿Qué agentes deseas instalar?",
2758
+ options,
2759
+ required: true
2760
+ });
2761
+ onCancel(selected);
2762
+ const spin = L2();
2763
+ for (const name of selected) {
2764
+ const item = manifest.agents.find((a2) => a2.name === name);
2765
+ spin.start(`Descargando agente: ${name} (${item.version})`);
2766
+ try {
2767
+ await installAgent(item, manifest, paths);
2768
+ spin.stop(`Agente instalado: ${name} (${item.version})`);
2769
+ } catch (e2) {
2770
+ spin.stop(`Error: ${e2.message}`);
2771
+ }
2772
+ }
2773
+ }
2774
+ async function doAddCommand(manifest, paths) {
2775
+ const lockfile = readLockfile(paths.root);
2776
+ const options = manifest.commands.map((c2) => {
2777
+ const installed = getInstalledVersion(lockfile, "commands", c2.name);
2778
+ const hint = installed ? `v${installed} instalado — ${c2.description}` : c2.description;
2779
+ return { value: c2.name, label: `${c2.name} (v${c2.version})`, hint };
2780
+ });
2781
+ const selected = await pe({
2782
+ message: "¿Qué commands deseas instalar?",
2783
+ options,
2784
+ required: true
2785
+ });
2786
+ onCancel(selected);
2787
+ const spin = L2();
2788
+ for (const name of selected) {
2789
+ const item = manifest.commands.find((c2) => c2.name === name);
2790
+ spin.start(`Descargando command: ${name} (${item.version})`);
2791
+ try {
2792
+ await installCommand(item, manifest, paths);
2793
+ spin.stop(`Command instalado: ${name} (${item.version})`);
2794
+ } catch (e2) {
2795
+ spin.stop(`Error: ${e2.message}`);
2796
+ }
2797
+ }
2798
+ }
2799
+ async function doAddSkill(manifest, paths) {
2800
+ const lockfile = readLockfile(paths.root);
2801
+ const options = (manifest.skills ?? []).map((s) => {
2802
+ const installed = getInstalledVersion(lockfile, "skills", s.name);
2803
+ const hint = installed ? `v${installed} instalado — ${s.description}` : s.description;
2804
+ return { value: s.name, label: `${s.name} (v${s.version})`, hint };
2805
+ });
2806
+ if (options.length === 0) {
2807
+ v2.info("No hay skills disponibles en el manifest.");
2808
+ return;
2809
+ }
2810
+ const selected = await pe({
2811
+ message: "¿Qué skills deseas instalar?",
2812
+ options,
2813
+ required: true
2814
+ });
2815
+ onCancel(selected);
2816
+ const spin = L2();
2817
+ for (const name of selected) {
2818
+ const item = manifest.skills.find((s) => s.name === name);
2819
+ spin.start(`Instalando skill: ${name} (${item.version})`);
2820
+ try {
2821
+ await installSkill(item, manifest, paths);
2822
+ spin.stop(`Skill instalada: ${name} (${item.version})`);
2823
+ } catch (e2) {
2824
+ spin.stop(`Error: ${e2.message}`);
2825
+ }
2826
+ }
2827
+ }
2828
+ async function doAddMcp(manifest, paths) {
2829
+ const lockfile = readLockfile(paths.root);
2830
+ const options = (manifest.mcpServers ?? []).map((m3) => {
2831
+ const installed = getInstalledVersion(lockfile, "mcpServers", m3.name);
2832
+ const hint = installed ? `v${installed} instalado — ${m3.description}` : m3.description;
2833
+ return { value: m3.name, label: `${m3.name} (v${m3.version})`, hint };
2834
+ });
2835
+ if (options.length === 0) {
2836
+ v2.info("No hay MCP servers disponibles en el manifest.");
2837
+ return;
2838
+ }
2839
+ const selected = await pe({
2840
+ message: "¿Qué MCP servers deseas instalar?",
2841
+ options,
2842
+ required: true
2843
+ });
2844
+ onCancel(selected);
2845
+ const spin = L2();
2846
+ for (const name of selected) {
2847
+ const item = manifest.mcpServers?.find((m3) => m3.name === name);
2848
+ if (!item)
2849
+ continue;
2850
+ spin.start(`Instalando MCP server: ${name} (${item.version})`);
2851
+ try {
2852
+ await installMcpServer(item, manifest, paths);
2853
+ spin.stop(`MCP server instalado: ${name} (${item.version})`);
2854
+ } catch (e2) {
2855
+ spin.stop(`Error: ${e2.message}`);
2856
+ }
2857
+ }
2858
+ }
2859
+
2860
+ // src/prompts/update.ts
2861
+ init_dist2();
2862
+ init_lockfile();
2863
+ async function doUpdate(manifest, paths) {
2864
+ const candidates = getUpdateCandidates(manifest, paths);
2865
+ const orphans = getOrphanedItems(manifest, paths);
2866
+ if (orphans.length > 0) {
2867
+ const orphanLines = orphans.map((o) => {
2868
+ const kind = kindLabel(o.type);
2869
+ return ` ${kind.padEnd(8)} ${o.name.padEnd(24)} v${o.version} (ya no existe en el manifest)`;
2870
+ });
2871
+ v2.warn(`Items huérfanos detectados (ya no en manifest):`);
2872
+ ye(orphanLines.join(`
2873
+ `), "Items huérfanos");
2874
+ const shouldClean = await me({
2875
+ message: `¿Eliminar ${orphans.length} item(s) huérfano(s) del lockfile? No se borran archivos, solo el registro.`
2876
+ });
2877
+ onCancel(shouldClean);
2878
+ if (shouldClean) {
2879
+ for (const o of orphans) {
2880
+ removeFromLockfile(paths.root, o.type, o.name);
2881
+ }
2882
+ v2.success(`${orphans.length} item(s) huérfano(s) limpiados del lockfile.`);
2883
+ }
2884
+ }
2885
+ if (candidates.length === 0) {
2886
+ if (orphans.length > 0) {
2887
+ v2.info("Lockfile limpiado. No hay actualizaciones disponibles.");
2888
+ } else {
2889
+ v2.info("Todo está al día. No hay actualizaciones disponibles.");
2890
+ }
2891
+ return;
2892
+ }
2893
+ const diffLines = candidates.map(({ type, item, installedVersion }) => {
2894
+ const kind = kindLabel(type);
2895
+ return ` ${kind.padEnd(8)} ${item.name.padEnd(24)} ${formatVersionDiff(installedVersion, item.version)}`;
2896
+ });
2897
+ ye(diffLines.join(`
2898
+ `), "Actualizaciones disponibles");
2899
+ const confirm = await me({
2900
+ message: `¿Aplicar ${candidates.length} actualización(es)?`
2901
+ });
2902
+ onCancel(confirm);
2903
+ if (!confirm) {
2904
+ v2.info("Actualización cancelada.");
2905
+ return;
2906
+ }
2907
+ const spin = L2();
2908
+ let updated = 0;
2909
+ for (const { type, item } of candidates) {
2910
+ spin.start(`Actualizando: ${item.name} → ${item.version}`);
2911
+ try {
2912
+ if (type === "agents") {
2913
+ await installAgent(item, manifest, paths);
2914
+ } else if (type === "commands") {
2915
+ await installCommand(item, manifest, paths);
2916
+ } else if (type === "skills") {
2917
+ await installSkill(item, manifest, paths);
2918
+ } else {
2919
+ await installMcpServer(item, manifest, paths);
2920
+ }
2921
+ spin.stop(`Actualizado: ${item.name} (${item.version})`);
2922
+ updated++;
2923
+ } catch (e2) {
2924
+ spin.stop(`Error en ${item.name}: ${e2.message}`);
2235
2925
  }
2236
2926
  }
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
- }
2927
+ v2.success(`${updated} recurso(s) actualizado(s).`);
2928
+ }
2929
+
2930
+ // src/prompts/uninstall.ts
2931
+ init_dist2();
2932
+ import { join as join9 } from "path";
2933
+ init_stack();
2934
+ init_lockfile();
2935
+ async function doUninstallTotal(paths) {
2936
+ const lockfile = readLockfile(paths.root);
2937
+ 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) {
2938
+ v2.info("No hay nada instalado.");
2939
+ return;
2246
2940
  }
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.");
2941
+ const pathsToDelete = [];
2942
+ for (const name of Object.keys(lockfile.agents)) {
2943
+ pathsToDelete.push(join9(paths.agents, `${name}.md`));
2259
2944
  }
2260
- if (errors === 0) {
2261
- v2.success("Todo instalado correctamente.");
2262
- } else {
2263
- v2.warn(`Completado con ${errors} error(es).`);
2945
+ for (const name of Object.keys(lockfile.commands)) {
2946
+ pathsToDelete.push(join9(paths.commands, `${name}.md`));
2947
+ }
2948
+ for (const name of Object.keys(lockfile.skills ?? {})) {
2949
+ pathsToDelete.push(join9(paths.skills, name));
2950
+ }
2951
+ for (const name of Object.keys(lockfile.mcpServers ?? {})) {
2952
+ pathsToDelete.push(join9(paths.mcp, name));
2953
+ }
2954
+ ye(pathsToDelete.join(`
2955
+ `), `Se eliminarán ${pathsToDelete.length} archivo(s) / directorio(s)`);
2956
+ const confirm = await me({
2957
+ message: `¿Confirmar desinstalación de ${pathsToDelete.length} item(s)?`
2958
+ });
2959
+ onCancel(confirm);
2960
+ if (!confirm) {
2961
+ v2.info("Desinstalación cancelada.");
2962
+ return;
2963
+ }
2964
+ uninstallAll(paths);
2965
+ v2.success(`${pathsToDelete.length} item(s) eliminado(s).`);
2966
+ const cleanEngram = await me({
2967
+ message: "¿Deseas remover la configuración de Engram del proyecto (mcp.engram)?"
2968
+ });
2969
+ onCancel(cleanEngram);
2970
+ if (cleanEngram) {
2971
+ const result = uninstallEngramConfig();
2972
+ if (result.success) {
2973
+ v2.success(result.message);
2974
+ } else {
2975
+ v2.warn(result.message);
2976
+ }
2264
2977
  }
2265
2978
  }
2266
- async function doAddAgent(manifest, paths) {
2979
+ async function doUninstallAgent(paths) {
2267
2980
  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
- });
2981
+ if (!lockfile) {
2982
+ v2.warn("No hay instalación registrada.");
2983
+ return;
2984
+ }
2985
+ const installed = Object.keys(lockfile.agents);
2986
+ if (installed.length === 0) {
2987
+ v2.info("No hay agentes instalados.");
2988
+ return;
2989
+ }
2990
+ const options = installed.map((name) => ({
2991
+ value: name,
2992
+ label: name,
2993
+ hint: `v${lockfile.agents[name].version}`
2994
+ }));
2273
2995
  const selected = await pe({
2274
- message: "¿Qué agentes deseas instalar?",
2996
+ message: "¿Qué agentes querés desinstalar?",
2275
2997
  options,
2276
2998
  required: true
2277
2999
  });
2278
3000
  onCancel(selected);
2279
- const spin = L2();
2280
3001
  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}`);
3002
+ const ok = uninstallAgent(name, paths);
3003
+ if (ok) {
3004
+ v2.success(`Agente eliminado: ${name}`);
3005
+ } else {
3006
+ v2.warn(`No se pudo eliminar el agente: ${name}`);
2288
3007
  }
2289
3008
  }
2290
3009
  }
2291
- async function doAddCommand(manifest, paths) {
3010
+ async function doUninstallCommand(paths) {
2292
3011
  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
- });
3012
+ if (!lockfile) {
3013
+ v2.warn("No hay instalación registrada.");
3014
+ return;
3015
+ }
3016
+ const installed = Object.keys(lockfile.commands);
3017
+ if (installed.length === 0) {
3018
+ v2.info("No hay commands instalados.");
3019
+ return;
3020
+ }
3021
+ const options = installed.map((name) => ({
3022
+ value: name,
3023
+ label: name,
3024
+ hint: `v${lockfile.commands[name].version}`
3025
+ }));
2298
3026
  const selected = await pe({
2299
- message: "¿Qué commands deseas instalar?",
3027
+ message: "¿Qué commands querés desinstalar?",
2300
3028
  options,
2301
3029
  required: true
2302
3030
  });
2303
3031
  onCancel(selected);
2304
- const spin = L2();
2305
3032
  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}`);
3033
+ const ok = uninstallCommand(name, paths);
3034
+ if (ok) {
3035
+ v2.success(`Command eliminado: ${name}`);
3036
+ } else {
3037
+ v2.warn(`No se pudo eliminar el command: ${name}`);
2313
3038
  }
2314
3039
  }
2315
3040
  }
2316
- async function doAddSkill(manifest, paths) {
3041
+ async function doUninstallSkill(paths) {
2317
3042
  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 };
3043
+ if (!lockfile) {
3044
+ v2.warn("No hay instalación registrada.");
3045
+ return;
3046
+ }
3047
+ const installed = Object.keys(lockfile.skills ?? {});
3048
+ if (installed.length === 0) {
3049
+ v2.info("No hay skills instaladas.");
3050
+ return;
3051
+ }
3052
+ const options = installed.map((name) => ({
3053
+ value: name,
3054
+ label: name,
3055
+ hint: `v${lockfile.skills[name].version}`
3056
+ }));
3057
+ const selected = await pe({
3058
+ message: "¿Qué skills querés desinstalar?",
3059
+ options,
3060
+ required: true
2322
3061
  });
2323
- if (options.length === 0) {
2324
- v2.info("No hay skills disponibles en el manifest.");
3062
+ onCancel(selected);
3063
+ for (const name of selected) {
3064
+ const ok = uninstallSkill(name, paths);
3065
+ if (ok) {
3066
+ v2.success(`Skill eliminada: ${name}`);
3067
+ } else {
3068
+ v2.warn(`No se pudo eliminar la skill: ${name}`);
3069
+ }
3070
+ }
3071
+ }
3072
+ async function doUninstallMcp(paths) {
3073
+ const lockfile = readLockfile(paths.root);
3074
+ if (!lockfile) {
3075
+ v2.warn("No hay instalación registrada.");
2325
3076
  return;
2326
3077
  }
3078
+ const installed = Object.keys(lockfile.mcpServers ?? {});
3079
+ if (installed.length === 0) {
3080
+ v2.info("No hay MCP servers instalados.");
3081
+ return;
3082
+ }
3083
+ const options = installed.map((name) => ({
3084
+ value: name,
3085
+ label: name,
3086
+ hint: `v${lockfile.mcpServers?.[name]?.version ?? "?"}`
3087
+ }));
2327
3088
  const selected = await pe({
2328
- message: "¿Qué skills deseas instalar?",
3089
+ message: "¿Qué MCP servers querés desinstalar?",
2329
3090
  options,
2330
3091
  required: true
2331
3092
  });
2332
3093
  onCancel(selected);
2333
- const spin = L2();
2334
3094
  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}`);
3095
+ const ok = uninstallMcpServer(name, paths);
3096
+ if (ok) {
3097
+ v2.success(`MCP server eliminado: ${name}`);
3098
+ } else {
3099
+ v2.warn(`No se pudo eliminar el MCP server: ${name}`);
2342
3100
  }
2343
3101
  }
2344
3102
  }
2345
- async function doAddMcp(manifest, paths) {
3103
+ async function doUninstall(paths) {
3104
+ const scope = await de({
3105
+ message: "¿Qué querés desinstalar?",
3106
+ options: [
3107
+ { value: "all", label: "Todo (agentes + commands + skills + MCPs)" },
3108
+ { value: "agent", label: "Solo un agente" },
3109
+ { value: "command", label: "Solo un command" },
3110
+ { value: "skill", label: "Solo una skill" },
3111
+ { value: "mcp", label: "Solo un MCP server" }
3112
+ ]
3113
+ });
3114
+ onCancel(scope);
3115
+ switch (scope) {
3116
+ case "all":
3117
+ await doUninstallTotal(paths);
3118
+ break;
3119
+ case "agent":
3120
+ await doUninstallAgent(paths);
3121
+ break;
3122
+ case "command":
3123
+ await doUninstallCommand(paths);
3124
+ break;
3125
+ case "skill":
3126
+ await doUninstallSkill(paths);
3127
+ break;
3128
+ case "mcp":
3129
+ await doUninstallMcp(paths);
3130
+ break;
3131
+ }
3132
+ }
3133
+ async function doUninstallAgentByName(name, paths) {
3134
+ try {
3135
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3136
+ validateFilePath2(`${name}.md`);
3137
+ } catch (e2) {
3138
+ v2.warn(`Nombre inválido: ${e2.message}`);
3139
+ return;
3140
+ }
3141
+ const lockfile = readLockfile(paths.root);
3142
+ if (!lockfile || !(name in lockfile.agents)) {
3143
+ v2.warn(`${name} no está instalado.`);
3144
+ return;
3145
+ }
3146
+ const filePath = join9(paths.agents, `${name}.md`);
3147
+ ye(filePath, `Se eliminará`);
3148
+ const confirm = await me({ message: `¿Borrar ${name}.md?` });
3149
+ onCancel(confirm);
3150
+ if (!confirm) {
3151
+ v2.info("Cancelado.");
3152
+ return;
3153
+ }
3154
+ const ok = uninstallAgent(name, paths);
3155
+ if (ok) {
3156
+ v2.success(`Agente eliminado: ${name}`);
3157
+ } else {
3158
+ v2.warn(`No se pudo eliminar el agente: ${name}`);
3159
+ }
3160
+ }
3161
+ async function doUninstallCommandByName(name, paths) {
3162
+ try {
3163
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3164
+ validateFilePath2(`${name}.md`);
3165
+ } catch (e2) {
3166
+ v2.warn(`Nombre inválido: ${e2.message}`);
3167
+ return;
3168
+ }
3169
+ const lockfile = readLockfile(paths.root);
3170
+ if (!lockfile || !(name in lockfile.commands)) {
3171
+ v2.warn(`${name} no está instalado.`);
3172
+ return;
3173
+ }
3174
+ const filePath = join9(paths.commands, `${name}.md`);
3175
+ ye(filePath, `Se eliminará`);
3176
+ const confirm = await me({ message: `¿Borrar ${name}.md?` });
3177
+ onCancel(confirm);
3178
+ if (!confirm) {
3179
+ v2.info("Cancelado.");
3180
+ return;
3181
+ }
3182
+ const ok = uninstallCommand(name, paths);
3183
+ if (ok) {
3184
+ v2.success(`Command eliminado: ${name}`);
3185
+ } else {
3186
+ v2.warn(`No se pudo eliminar el command: ${name}`);
3187
+ }
3188
+ }
3189
+ async function doUninstallSkillByName(name, paths) {
3190
+ try {
3191
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3192
+ validateFilePath2(name);
3193
+ } catch (e2) {
3194
+ v2.warn(`Nombre inválido: ${e2.message}`);
3195
+ return;
3196
+ }
2346
3197
  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.");
3198
+ if (!lockfile || !lockfile.skills || !(name in lockfile.skills)) {
3199
+ v2.warn(`${name} no está instalado.`);
2354
3200
  return;
2355
3201
  }
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
- }
3202
+ const dirPath = join9(paths.skills, name);
3203
+ ye(dirPath, `Se eliminará`);
3204
+ const confirm = await me({ message: `¿Borrar la skill "${name}"?` });
3205
+ onCancel(confirm);
3206
+ if (!confirm) {
3207
+ v2.info("Cancelado.");
3208
+ return;
3209
+ }
3210
+ const ok = uninstallSkill(name, paths);
3211
+ if (ok) {
3212
+ v2.success(`Skill eliminada: ${name}`);
3213
+ } else {
3214
+ v2.warn(`No se pudo eliminar la skill: ${name}`);
2374
3215
  }
2375
3216
  }
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.");
3217
+ async function doUninstallMcpByName(name, paths) {
3218
+ try {
3219
+ const { validateFilePath: validateFilePath2 } = await Promise.resolve().then(() => (init_security(), exports_security));
3220
+ validateFilePath2(name);
3221
+ } catch (e2) {
3222
+ v2.warn(`Nombre inválido: ${e2.message}`);
2380
3223
  return;
2381
3224
  }
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
- });
3225
+ const lockfile = readLockfile(paths.root);
3226
+ if (!lockfile || !lockfile.mcpServers || !(name in lockfile.mcpServers)) {
3227
+ v2.warn(`${name} no está instalado.`);
3228
+ return;
3229
+ }
3230
+ const dirPath = join9(paths.mcp, name);
3231
+ ye(dirPath, `Se eliminará`);
3232
+ const confirm = await me({ message: `¿Borrar el MCP server "${name}"?` });
2391
3233
  onCancel(confirm);
2392
3234
  if (!confirm) {
2393
- v2.info("Actualización cancelada.");
3235
+ v2.info("Cancelado.");
2394
3236
  return;
2395
3237
  }
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
- }
3238
+ const ok = uninstallMcpServer(name, paths);
3239
+ if (ok) {
3240
+ v2.success(`MCP server eliminado: ${name}`);
3241
+ } else {
3242
+ v2.warn(`No se pudo eliminar el MCP server: ${name}`);
2415
3243
  }
2416
- v2.success(`${updated} recurso(s) actualizado(s).`);
2417
3244
  }
3245
+
3246
+ // src/prompts/index.ts
2418
3247
  async function runInteractiveMenu() {
2419
3248
  we(" OpenCode Installer ");
2420
3249
  const manifest = await loadManifest();
@@ -2480,313 +3309,116 @@ async function runInteractiveMenu() {
2480
3309
  await doUninstall(paths);
2481
3310
  fe("Listo.");
2482
3311
  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
- }
3312
+ case "exit":
3313
+ fe("Hasta luego.");
3314
+ break;
2666
3315
  }
2667
3316
  }
2668
- async function doUninstallCommand(paths) {
2669
- const lockfile = readLockfile(paths.root);
2670
- if (!lockfile) {
2671
- v2.warn("No hay instalación registrada.");
3317
+ async function runInstallCommand() {
3318
+ we(" OpenCode Installer ");
3319
+ const manifest = await loadManifest();
3320
+ const paths = await resolveOpenCodePaths();
3321
+ if (!paths) {
3322
+ fe("Cancelado.");
2672
3323
  return;
2673
3324
  }
2674
- const installed = Object.keys(lockfile.commands);
2675
- if (installed.length === 0) {
2676
- v2.info("No hay commands instalados.");
3325
+ await doInstallAll(manifest, paths);
3326
+ printPostInstallSteps();
3327
+ fe("Instalación completada.");
3328
+ }
3329
+ async function runAddAgentCommand() {
3330
+ we(" OpenCode Installer ");
3331
+ const manifest = await loadManifest();
3332
+ const paths = await resolveOpenCodePaths();
3333
+ if (!paths) {
3334
+ fe("Cancelado.");
2677
3335
  return;
2678
3336
  }
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
- }
3337
+ await doAddAgent(manifest, paths);
3338
+ printPostInstallSteps();
3339
+ fe("Listo.");
2698
3340
  }
2699
- async function doUninstallSkill(paths) {
2700
- const lockfile = readLockfile(paths.root);
2701
- if (!lockfile) {
2702
- v2.warn("No hay instalación registrada.");
3341
+ async function runAddCommandCommand() {
3342
+ we(" OpenCode Installer ");
3343
+ const manifest = await loadManifest();
3344
+ const paths = await resolveOpenCodePaths();
3345
+ if (!paths) {
3346
+ fe("Cancelado.");
2703
3347
  return;
2704
3348
  }
2705
- const installed = Object.keys(lockfile.skills ?? {});
2706
- if (installed.length === 0) {
2707
- v2.info("No hay skills instaladas.");
3349
+ await doAddCommand(manifest, paths);
3350
+ printPostInstallSteps();
3351
+ fe("Listo.");
3352
+ }
3353
+ async function runAddSkillCommand() {
3354
+ we(" OpenCode Installer ");
3355
+ const manifest = await loadManifest();
3356
+ const paths = await resolveOpenCodePaths();
3357
+ if (!paths) {
3358
+ fe("Cancelado.");
2708
3359
  return;
2709
3360
  }
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
- }
3361
+ await doAddSkill(manifest, paths);
3362
+ printPostInstallSteps();
3363
+ fe("Listo.");
3364
+ }
3365
+ async function runAddMcpCommand() {
3366
+ we(" OpenCode Installer ");
3367
+ const manifest = await loadManifest();
3368
+ const paths = await resolveOpenCodePaths();
3369
+ if (!paths) {
3370
+ fe("Cancelado.");
3371
+ return;
2728
3372
  }
3373
+ await doAddMcp(manifest, paths);
3374
+ printPostInstallSteps();
3375
+ fe("Listo.");
2729
3376
  }
2730
- async function doUninstallMcp(paths) {
2731
- const lockfile = readLockfile(paths.root);
2732
- if (!lockfile) {
2733
- v2.warn("No hay instalación registrada.");
3377
+ async function runInstallStackCommand() {
3378
+ we(" OpenCode Installer — Stack ");
3379
+ const paths = await resolveOpenCodePaths();
3380
+ if (!paths) {
3381
+ fe("Cancelado.");
2734
3382
  return;
2735
3383
  }
2736
- const installed = Object.keys(lockfile.mcpServers ?? {});
2737
- if (installed.length === 0) {
2738
- v2.info("No hay MCP servers instalados.");
3384
+ ensureToolDirs(paths.tools, ["codegraph", "engram", "context7"]);
3385
+ await doInstallStack(paths.tools);
3386
+ fe("Stack instalado.");
3387
+ }
3388
+ async function runUninstallStackCommand() {
3389
+ we(" OpenCode Installer — Stack ");
3390
+ const paths = await resolveOpenCodePaths();
3391
+ if (!paths) {
3392
+ fe("Cancelado.");
2739
3393
  return;
2740
3394
  }
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
3395
+ const confirm = await me({
3396
+ message: "¿Remover la configuración del stack (CodeGraph, Engram, Context7) del proyecto? Los binarios globales no se tocan."
2750
3397
  });
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
- }
3398
+ onCancel(confirm);
3399
+ if (!confirm) {
3400
+ fe("Cancelado.");
3401
+ return;
3402
+ }
3403
+ const { uninstallStackConfig: uninstallStackConfig2 } = await Promise.resolve().then(() => (init_stack(), exports_stack));
3404
+ const result = uninstallStackConfig2(paths);
3405
+ if (result.success) {
3406
+ v2.success(result.message);
3407
+ } else {
3408
+ v2.warn(result.message);
2759
3409
  }
3410
+ fe("Stack desinstalado.");
2760
3411
  }
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;
3412
+ async function runUpdateCommand() {
3413
+ we(" OpenCode Installer ");
3414
+ const manifest = await loadLatestManifest();
3415
+ const paths = await resolveOpenCodePaths();
3416
+ if (!paths) {
3417
+ fe("Cancelado.");
3418
+ return;
2789
3419
  }
3420
+ await doUpdate(manifest, paths);
3421
+ fe("Actualización completada.");
2790
3422
  }
2791
3423
  async function runUninstallCommand() {
2792
3424
  we(" OpenCode Installer ");
@@ -2795,7 +3427,7 @@ async function runUninstallCommand() {
2795
3427
  fe("Cancelado.");
2796
3428
  return;
2797
3429
  }
2798
- await doUninstallTotal(paths);
3430
+ await doUninstall(paths);
2799
3431
  fe("Desinstalación completada.");
2800
3432
  }
2801
3433
  async function runUninstallAgentCommand(name) {
@@ -2806,33 +3438,30 @@ async function runUninstallAgentCommand(name) {
2806
3438
  return;
2807
3439
  }
2808
3440
  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}`);
3441
+ await doUninstallAgentByName(name, paths);
3442
+ } else {
3443
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3444
+ const lockfile = readLockfile2(paths.root);
3445
+ if (lockfile && Object.keys(lockfile.agents).length > 0) {
3446
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3447
+ const installed = Object.keys(lockfile.agents);
3448
+ const options = installed.map((n) => ({
3449
+ value: n,
3450
+ label: n,
3451
+ hint: `v${lockfile.agents[n].version}`
3452
+ }));
3453
+ const selected = await prompts.multiselect({
3454
+ message: "¿Qué agentes querés desinstalar?",
3455
+ options,
3456
+ required: true
3457
+ });
3458
+ onCancel(selected);
3459
+ for (const n of selected) {
3460
+ await doUninstallAgentByName(n, paths);
3461
+ }
2831
3462
  } else {
2832
- v2.warn(`No se pudo eliminar el agente: ${name}`);
3463
+ v2.info("No hay agentes instalados.");
2833
3464
  }
2834
- } else {
2835
- await doUninstallAgent(paths);
2836
3465
  }
2837
3466
  fe("Listo.");
2838
3467
  }
@@ -2844,33 +3473,30 @@ async function runUninstallCommandCommand(name) {
2844
3473
  return;
2845
3474
  }
2846
3475
  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}`);
3476
+ await doUninstallCommandByName(name, paths);
3477
+ } else {
3478
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3479
+ const lockfile = readLockfile2(paths.root);
3480
+ if (lockfile && Object.keys(lockfile.commands).length > 0) {
3481
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3482
+ const installed = Object.keys(lockfile.commands);
3483
+ const options = installed.map((n) => ({
3484
+ value: n,
3485
+ label: n,
3486
+ hint: `v${lockfile.commands[n].version}`
3487
+ }));
3488
+ const selected = await prompts.multiselect({
3489
+ message: "¿Qué commands querés desinstalar?",
3490
+ options,
3491
+ required: true
3492
+ });
3493
+ onCancel(selected);
3494
+ for (const n of selected) {
3495
+ await doUninstallCommandByName(n, paths);
3496
+ }
2869
3497
  } else {
2870
- v2.warn(`No se pudo eliminar el command: ${name}`);
3498
+ v2.info("No hay commands instalados.");
2871
3499
  }
2872
- } else {
2873
- await doUninstallCommand(paths);
2874
3500
  }
2875
3501
  fe("Listo.");
2876
3502
  }
@@ -2882,33 +3508,30 @@ async function runUninstallSkillCommand(name) {
2882
3508
  return;
2883
3509
  }
2884
3510
  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}`);
3511
+ await doUninstallSkillByName(name, paths);
3512
+ } else {
3513
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3514
+ const lockfile = readLockfile2(paths.root);
3515
+ if (lockfile && lockfile.skills && Object.keys(lockfile.skills).length > 0) {
3516
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3517
+ const installed = Object.keys(lockfile.skills);
3518
+ const options = installed.map((n) => ({
3519
+ value: n,
3520
+ label: n,
3521
+ hint: `v${lockfile.skills[n].version}`
3522
+ }));
3523
+ const selected = await prompts.multiselect({
3524
+ message: "¿Qué skills querés desinstalar?",
3525
+ options,
3526
+ required: true
3527
+ });
3528
+ onCancel(selected);
3529
+ for (const n of selected) {
3530
+ await doUninstallSkillByName(n, paths);
3531
+ }
2907
3532
  } else {
2908
- v2.warn(`No se pudo eliminar la skill: ${name}`);
3533
+ v2.info("No hay skills instaladas.");
2909
3534
  }
2910
- } else {
2911
- await doUninstallSkill(paths);
2912
3535
  }
2913
3536
  fe("Listo.");
2914
3537
  }
@@ -2920,33 +3543,30 @@ async function runUninstallMcpCommand(name) {
2920
3543
  return;
2921
3544
  }
2922
3545
  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}`);
3546
+ await doUninstallMcpByName(name, paths);
3547
+ } else {
3548
+ const { readLockfile: readLockfile2 } = await Promise.resolve().then(() => (init_lockfile(), exports_lockfile));
3549
+ const lockfile = readLockfile2(paths.root);
3550
+ if (lockfile && lockfile.mcpServers && Object.keys(lockfile.mcpServers).length > 0) {
3551
+ const { default: prompts } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
3552
+ const installed = Object.keys(lockfile.mcpServers);
3553
+ const options = installed.map((n) => ({
3554
+ value: n,
3555
+ label: n,
3556
+ hint: `v${lockfile.mcpServers?.[n]?.version ?? "?"}`
3557
+ }));
3558
+ const selected = await prompts.multiselect({
3559
+ message: "¿Qué MCP servers querés desinstalar?",
3560
+ options,
3561
+ required: true
3562
+ });
3563
+ onCancel(selected);
3564
+ for (const n of selected) {
3565
+ await doUninstallMcpByName(n, paths);
3566
+ }
2945
3567
  } else {
2946
- v2.warn(`No se pudo eliminar el MCP server: ${name}`);
3568
+ v2.info("No hay MCP servers instalados.");
2947
3569
  }
2948
- } else {
2949
- await doUninstallMcp(paths);
2950
3570
  }
2951
3571
  fe("Listo.");
2952
3572
  }
@@ -3031,6 +3651,10 @@ async function main() {
3031
3651
  console.log(package_default.version);
3032
3652
  break;
3033
3653
  default:
3654
+ if (cmd) {
3655
+ console.error(`Comando desconocido: "${cmd}". Usá --help para ver los comandos disponibles.`);
3656
+ process.exit(1);
3657
+ }
3034
3658
  await runInteractiveMenu();
3035
3659
  }
3036
3660
  }