autohand-cli 0.7.9 → 0.7.10

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 (254) hide show
  1. package/README.md +19 -0
  2. package/dist/{AutomodeManager-YVCJXOMQ.js → AutomodeManager-NGRAO2MH.js} +35 -8
  3. package/dist/{AutomodeManager-HV6M7EAX.cjs → AutomodeManager-ZKQMBM4T.cjs} +35 -8
  4. package/dist/{CommunitySkillsCache-YWDFZBKP.js → CommunitySkillsCache-ILWHWE5P.js} +2 -2
  5. package/dist/CommunitySkillsCache-KHC6RUJW.cjs +7 -0
  6. package/dist/MemoryManager-6ZT7IDO5.cjs +7 -0
  7. package/dist/MemoryManager-AJGS5AKB.js +7 -0
  8. package/dist/PermissionManager-HG6W2DGU.cjs +10 -0
  9. package/dist/{PermissionManager-WYP5JPCQ.js → PermissionManager-U5OMGR3L.js} +3 -3
  10. package/dist/SessionManager-BJ2G6VV4.cjs +9 -0
  11. package/dist/{SessionManager-SFBDIBGA.js → SessionManager-ENPGYK5J.js} +2 -2
  12. package/dist/SkillsRegistry-6ZFOCT25.cjs +8 -0
  13. package/dist/{SkillsRegistry-E437FFJV.js → SkillsRegistry-C2SHOZ5D.js} +2 -2
  14. package/dist/about-RGUM5QQ4.cjs +11 -0
  15. package/dist/about-VDR3SIHS.js +11 -0
  16. package/dist/add-dir-3BMVJ5H3.cjs +9 -0
  17. package/dist/{add-dir-PNU7AGKO.js → add-dir-RP2BL3JW.js} +2 -1
  18. package/dist/agents-JQ2PHCQB.js +10 -0
  19. package/dist/agents-RGSZ2BM3.cjs +10 -0
  20. package/dist/agents-new-LSJN2L2T.cjs +13 -0
  21. package/dist/agents-new-MZUEVKSK.js +13 -0
  22. package/dist/automode-DP3BMYJB.cjs +9 -0
  23. package/dist/{automode-QCRJSBRT.js → automode-XOF3U3OB.js} +2 -1
  24. package/dist/{chunk-A5KU3JZW.cjs → chunk-34OGUMRO.cjs} +9 -5
  25. package/dist/{chunk-NTFNUTY2.js → chunk-3652ROFD.js} +2 -2
  26. package/dist/{chunk-KNLBEUAV.cjs → chunk-3DQSBW4B.cjs} +10 -6
  27. package/dist/{chunk-32R47CAQ.cjs → chunk-3S4DEIJP.cjs} +2 -2
  28. package/dist/{chunk-DRXFJR7F.cjs → chunk-3UNX56GC.cjs} +17 -16
  29. package/dist/chunk-46WX5IO2.cjs +499 -0
  30. package/dist/{chunk-IYZBLUEJ.js → chunk-4ULBAYME.js} +8 -6
  31. package/dist/{chunk-JRV4SOJU.cjs → chunk-5BQ57AZC.cjs} +9 -9
  32. package/dist/{chunk-7WKEDH3E.cjs → chunk-5FZM7KLB.cjs} +13 -10
  33. package/dist/{chunk-FN5S5OE7.cjs → chunk-5NZA4UB4.cjs} +3 -3
  34. package/dist/{chunk-PFS5ZOCO.js → chunk-5Q3W4DEU.js} +18 -10
  35. package/dist/{chunk-VMMGT42E.cjs → chunk-65GTO4QM.cjs} +7 -3
  36. package/dist/{chunk-CXZEPTRI.js → chunk-6P3K4YUW.js} +6 -2
  37. package/dist/chunk-73XIKTZL.js +124 -0
  38. package/dist/{chunk-P6EGMTK4.js → chunk-7QNW24ZT.js} +8 -4
  39. package/dist/{chunk-XT4OSHSB.cjs → chunk-AEYOIPHD.cjs} +6 -2
  40. package/dist/{chunk-KXNAGJE6.cjs → chunk-ANUQFV43.cjs} +6 -6
  41. package/dist/chunk-ATR3RORT.js +499 -0
  42. package/dist/{chunk-XOSFZHSS.js → chunk-B72CC4O6.js} +2 -2
  43. package/dist/{chunk-TAZJSKFD.js → chunk-BBIKQW66.js} +9 -5
  44. package/dist/{chunk-FFA4LDAO.cjs → chunk-BDIZGBDA.cjs} +8 -3
  45. package/dist/{chunk-YDJA5ETO.js → chunk-BG4OQUKP.js} +1 -1
  46. package/dist/{chunk-3DVEGFBZ.js → chunk-BODVOW7B.js} +64 -13
  47. package/dist/{chunk-HUA44A35.cjs → chunk-BZ73ZQTE.cjs} +17 -11
  48. package/dist/{chunk-6DSJ7XST.cjs → chunk-C22G4UE4.cjs} +13 -10
  49. package/dist/{chunk-T7HQBZZB.cjs → chunk-C2E3GJEE.cjs} +12 -9
  50. package/dist/{chunk-UP6YRP44.js → chunk-C5SVIQG3.js} +10 -5
  51. package/dist/{chunk-7GJR65DQ.js → chunk-CUBYCLNL.js} +2 -1
  52. package/dist/{chunk-4YQ2OJAL.js → chunk-D2XFTCRP.js} +1 -1
  53. package/dist/{chunk-R5PZPF55.js → chunk-DEAEO7RI.js} +1 -1
  54. package/dist/chunk-DMPVI3YK.cjs +400 -0
  55. package/dist/{chunk-C26EN22G.cjs → chunk-DUDDZRCS.cjs} +9 -5
  56. package/dist/{chunk-WT367RVU.js → chunk-E7YL3AHT.js} +15 -9
  57. package/dist/{chunk-5UC3VAJ2.cjs → chunk-EAOEAQGF.cjs} +2 -1
  58. package/dist/{chunk-CHVXUA3O.cjs → chunk-EV53SLSB.cjs} +4 -4
  59. package/dist/{chunk-PVSYZXS7.js → chunk-F3EIOVSQ.js} +11 -10
  60. package/dist/{chunk-VQDWNDP5.js → chunk-GD4AFYJ3.js} +1 -1
  61. package/dist/{chunk-AQNY2M6Q.cjs → chunk-GIZL57FE.cjs} +3 -1
  62. package/dist/{chunk-I4HVBWYF.js → chunk-GLAE5K5W.js} +7 -2
  63. package/dist/{chunk-4AMTDSQ3.cjs → chunk-HDSEJMWI.cjs} +6 -3
  64. package/dist/chunk-HLFZPN65.js +94 -0
  65. package/dist/{chunk-ZWS3KSMK.js → chunk-HQQ4NKER.js} +5 -2
  66. package/dist/{chunk-WBDPILKI.cjs → chunk-HVOBMOZ2.cjs} +6 -2
  67. package/dist/{chunk-RDGYHJ52.js → chunk-IPI3JXKP.js} +9 -6
  68. package/dist/{chunk-OO7EKEJH.cjs → chunk-IXFOH4OC.cjs} +17 -14
  69. package/dist/chunk-JS7IPR7P.js +249 -0
  70. package/dist/{chunk-CPO5KEQS.cjs → chunk-KC5FPUOF.cjs} +2 -2
  71. package/dist/{chunk-TUO5SZRD.cjs → chunk-L42HTMMR.cjs} +2 -2
  72. package/dist/chunk-LGGZQTLM.cjs +209 -0
  73. package/dist/chunk-LOXOD4IS.cjs +8630 -0
  74. package/dist/{chunk-LJCSSR5V.cjs → chunk-MNCWB5F7.cjs} +5 -5
  75. package/dist/{chunk-BTVNRLSE.js → chunk-MYNHJHDZ.js} +1 -1
  76. package/dist/{chunk-O3EX3SAD.cjs → chunk-N4ZSG6JJ.cjs} +2 -2
  77. package/dist/chunk-NF7RIHJK.js +45 -0
  78. package/dist/{chunk-KJAZ4YAR.cjs → chunk-NGBN2NGH.cjs} +76 -25
  79. package/dist/{chunk-MRDZHNCF.cjs → chunk-NRORJRD4.cjs} +4 -4
  80. package/dist/{chunk-OTS4YFSZ.cjs → chunk-OKABWSWA.cjs} +7 -3
  81. package/dist/{chunk-4BZ65NIH.js → chunk-OLG7LZBD.js} +1 -1
  82. package/dist/{chunk-KZ7VMQTC.js → chunk-OMEH2EVE.js} +5 -1
  83. package/dist/{chunk-LCBOOA7S.js → chunk-P5VDZ6PV.js} +1 -1
  84. package/dist/{chunk-V5MTBGM4.cjs → chunk-PA2H2263.cjs} +6 -2
  85. package/dist/chunk-PGRH5Q77.cjs +249 -0
  86. package/dist/{chunk-CMNQAF6C.js → chunk-PM62ZYXA.js} +12 -9
  87. package/dist/chunk-PNSRJT46.js +380 -0
  88. package/dist/{chunk-UL5T2XIY.cjs → chunk-PSED4Z4X.cjs} +13 -11
  89. package/dist/{chunk-PGH3MHPP.js → chunk-PWLLLJHU.js} +3 -1
  90. package/dist/{chunk-DOTAX65F.js → chunk-PYLR4J2D.js} +8 -4
  91. package/dist/{chunk-3SDEZTZD.js → chunk-QC6IUDDJ.js} +1 -1
  92. package/dist/{chunk-WJICM4SK.cjs → chunk-QM7HZCQW.cjs} +11 -6
  93. package/dist/chunk-QRQ5EX7I.cjs +380 -0
  94. package/dist/{chunk-RX4KPL6H.js → chunk-QU64XI5X.js} +9 -6
  95. package/dist/{chunk-FSTLJIR5.cjs → chunk-R7SDL3DJ.cjs} +16 -13
  96. package/dist/{chunk-LY5VN3B3.cjs → chunk-RJP3SZ7Q.cjs} +41 -253
  97. package/dist/{chunk-KS45GREN.js → chunk-RJXNNIFW.js} +7 -4
  98. package/dist/{chunk-LYMZDJX5.cjs → chunk-S5G7OEN2.cjs} +26 -18
  99. package/dist/{chunk-3DGR4GNN.cjs → chunk-SA4JOV4F.cjs} +10 -8
  100. package/dist/chunk-SAG6IY5Z.cjs +94 -0
  101. package/dist/{chunk-WCN5WDOI.cjs → chunk-TSY7JHIV.cjs} +2 -2
  102. package/dist/chunk-U23U52ZN.cjs +124 -0
  103. package/dist/chunk-UET7BDX2.js +8630 -0
  104. package/dist/{chunk-J7VV7JAB.js → chunk-UM4QEO36.js} +6 -4
  105. package/dist/{chunk-NCLCL7JK.js → chunk-WD5ZF6HE.js} +1 -1
  106. package/dist/{chunk-HF65HHDU.cjs → chunk-WH5RW7DV.cjs} +24 -22
  107. package/dist/{chunk-GSOEIEOU.js → chunk-WJ276BIP.js} +5 -1
  108. package/dist/{chunk-OXJCLU3X.js → chunk-WLTVF77A.js} +1 -1
  109. package/dist/{chunk-WGO4ACS7.cjs → chunk-WOGJXDBU.cjs} +3 -3
  110. package/dist/{chunk-QJ53OSGF.js → chunk-WRJLBHWB.js} +6 -2
  111. package/dist/{chunk-LKIKNRUP.js → chunk-WYLFLZ42.js} +8 -5
  112. package/dist/{chunk-HWDP4HQO.cjs → chunk-XL77XYI2.cjs} +4 -4
  113. package/dist/{chunk-QAJM6VG5.js → chunk-XLI7SHCH.js} +2 -2
  114. package/dist/chunk-Y27LG4BQ.cjs +45 -0
  115. package/dist/chunk-Y6OWFIUF.js +209 -0
  116. package/dist/chunk-YKSSNFDZ.js +400 -0
  117. package/dist/{chunk-VRI7EXV6.js → chunk-YMDLUTF2.js} +5 -1
  118. package/dist/{chunk-J2RUI7GJ.js → chunk-YVY27BJT.js} +5 -3
  119. package/dist/{chunk-K6CZ2AGI.js → chunk-ZBIBLOZL.js} +35 -247
  120. package/dist/completion-HVSWU5GR.cjs +13 -0
  121. package/dist/completion-WJ2MVNDH.js +13 -0
  122. package/dist/constants-RBQTR32A.cjs +20 -0
  123. package/dist/{constants-OFIAR4E5.js → constants-V6J54N3X.js} +1 -1
  124. package/dist/export-NN7F5ANA.js +11 -0
  125. package/dist/export-UPS3AK2P.cjs +11 -0
  126. package/dist/feedback-ARI7CLVQ.js +14 -0
  127. package/dist/feedback-OZTPYHKJ.cjs +14 -0
  128. package/dist/help-4674IV4D.cjs +58 -0
  129. package/dist/help-ENG5KV2M.js +58 -0
  130. package/dist/history-2KUM6GN4.cjs +13 -0
  131. package/dist/history-RZFT34Q7.js +13 -0
  132. package/dist/hooks-7QSUBHBM.cjs +12 -0
  133. package/dist/hooks-S4MD4QSR.js +12 -0
  134. package/dist/i18n-6NKENUIV.js +32 -0
  135. package/dist/i18n-MXQXQOVE.cjs +32 -0
  136. package/dist/ide-5STDV43A.cjs +11 -0
  137. package/dist/ide-W2NYXOWQ.js +11 -0
  138. package/dist/index.cjs +15320 -12906
  139. package/dist/index.js +15465 -13051
  140. package/dist/init-FG5KEJCZ.cjs +9 -0
  141. package/dist/init-TV4MJDYK.js +9 -0
  142. package/dist/language-52Q7CSAY.cjs +16 -0
  143. package/dist/language-FXFDGOBF.js +16 -0
  144. package/dist/localProjectPermissions-2EATUDZM.cjs +17 -0
  145. package/dist/{localProjectPermissions-FD5AK5FB.js → localProjectPermissions-WQYMGI42.js} +2 -2
  146. package/dist/login-AN42IOBK.js +18 -0
  147. package/dist/login-I65V4TGU.cjs +18 -0
  148. package/dist/logout-KK5UWGNG.js +16 -0
  149. package/dist/logout-VYYNWBHZ.cjs +16 -0
  150. package/dist/mcp-4SKTDECJ.js +15 -0
  151. package/dist/mcp-AGWPTMAX.cjs +15 -0
  152. package/dist/mcp-install-3NN2HAYR.cjs +473 -0
  153. package/dist/mcp-install-KTV52DQK.js +473 -0
  154. package/dist/memory-LG4K6XV6.cjs +9 -0
  155. package/dist/{memory-4GSP7NKV.js → memory-LRDK2SYC.js} +2 -1
  156. package/dist/model-P5D7ATE7.cjs +9 -0
  157. package/dist/{model-HKEFSH5E.js → model-WBFJIGUN.js} +2 -1
  158. package/dist/{new-EEZC4XXV.js → new-5A7RQEKI.js} +2 -1
  159. package/dist/new-EAATWI2G.cjs +9 -0
  160. package/dist/permissions-5URK6C44.js +12 -0
  161. package/dist/permissions-CJUDVG63.cjs +12 -0
  162. package/dist/quit-A33JHDG7.cjs +9 -0
  163. package/dist/quit-IYBLN3DB.js +9 -0
  164. package/dist/resume-OPSJTCH7.cjs +12 -0
  165. package/dist/resume-TOWEEN5D.js +12 -0
  166. package/dist/search-GOLIE5BA.js +14 -0
  167. package/dist/search-H42HGUK5.cjs +14 -0
  168. package/dist/{sessions-4KXIT76T.js → sessions-B5NENDKY.js} +2 -1
  169. package/dist/sessions-YHAVEMWY.cjs +9 -0
  170. package/dist/share-2JD2AKKX.cjs +13 -0
  171. package/dist/share-MYGDOTQE.js +13 -0
  172. package/dist/{skills-PB4HXV4R.js → skills-ICEQ2TNC.js} +2 -1
  173. package/dist/skills-LFVNZOMF.cjs +13 -0
  174. package/dist/{skills-install-UBBNXWD5.js → skills-install-6RN7FVCP.js} +9 -8
  175. package/dist/{skills-install-7SFS24HY.cjs → skills-install-LU6GA2WF.cjs} +14 -13
  176. package/dist/skills-new-5BM5PDFX.cjs +14 -0
  177. package/dist/skills-new-KWBWOX74.js +14 -0
  178. package/dist/status-M3XHJELG.cjs +10 -0
  179. package/dist/status-ZQDUYMKQ.js +10 -0
  180. package/dist/sync-6M3WRKMH.cjs +39 -0
  181. package/dist/sync-73D2MP65.cjs +16 -0
  182. package/dist/{sync-LYKDHRFM.js → sync-EXYX7HXW.js} +2 -2
  183. package/dist/sync-LL6M67CN.js +16 -0
  184. package/dist/theme-IFEI2IBJ.cjs +16 -0
  185. package/dist/theme-U3SKEULY.js +16 -0
  186. package/dist/ui/questionModal.cjs +28 -0
  187. package/dist/ui/questionModal.d.cts +11 -0
  188. package/dist/ui/questionModal.d.ts +11 -0
  189. package/dist/ui/questionModal.js +28 -0
  190. package/dist/undo-4DS67OAW.cjs +9 -0
  191. package/dist/undo-YMALVAPN.js +9 -0
  192. package/package.json +2 -1
  193. package/dist/CommunitySkillsCache-N2RWBCY2.cjs +0 -7
  194. package/dist/MemoryManager-J7APSLZ7.js +0 -7
  195. package/dist/MemoryManager-RLLYVIDY.cjs +0 -7
  196. package/dist/PermissionManager-ISI5OAJK.cjs +0 -10
  197. package/dist/SessionManager-7MF76Q3Q.cjs +0 -9
  198. package/dist/SkillsRegistry-UTK2YT4M.cjs +0 -8
  199. package/dist/add-dir-OMK3Y4DM.cjs +0 -8
  200. package/dist/agents-N2ZB4O2A.cjs +0 -9
  201. package/dist/agents-ZMT7HBRT.js +0 -9
  202. package/dist/agents-new-3EWS2NR3.cjs +0 -11
  203. package/dist/agents-new-TCGUYK5I.js +0 -11
  204. package/dist/automode-BRHUHGXU.cjs +0 -8
  205. package/dist/chunk-6SM6N7DJ.js +0 -2828
  206. package/dist/chunk-BEIG7V7Q.cjs +0 -51
  207. package/dist/chunk-L5QWMGLV.cjs +0 -2828
  208. package/dist/chunk-Z3Q2AFDS.js +0 -51
  209. package/dist/completion-NCSTSKTL.cjs +0 -11
  210. package/dist/completion-NTZERPAZ.js +0 -11
  211. package/dist/constants-B2X7KDIH.cjs +0 -20
  212. package/dist/export-5AJNVX4O.cjs +0 -9
  213. package/dist/export-ZQHTLV4W.js +0 -9
  214. package/dist/feedback-F7BMGSV6.cjs +0 -12
  215. package/dist/feedback-NL7CWTRY.js +0 -12
  216. package/dist/help-PKC6QCNG.js +0 -10
  217. package/dist/help-UEELQRHP.cjs +0 -10
  218. package/dist/hooks-AX5VPCZ3.cjs +0 -10
  219. package/dist/hooks-V22HVLQT.js +0 -10
  220. package/dist/init-DML7AOII.js +0 -8
  221. package/dist/init-SLLSDDJN.cjs +0 -8
  222. package/dist/language-IEKARNQH.js +0 -13
  223. package/dist/language-ULQCKXAD.cjs +0 -13
  224. package/dist/localProjectPermissions-7FI3XF4K.cjs +0 -17
  225. package/dist/login-PD3DFJLM.js +0 -15
  226. package/dist/login-VHGT4YKT.cjs +0 -15
  227. package/dist/logout-2QXNFGDT.js +0 -13
  228. package/dist/logout-A4SMKEFO.cjs +0 -13
  229. package/dist/memory-CFNC7RJH.cjs +0 -8
  230. package/dist/model-TKVEJ5BC.cjs +0 -8
  231. package/dist/new-EB2MBQXA.cjs +0 -8
  232. package/dist/permissions-S7433NQJ.js +0 -10
  233. package/dist/permissions-YZ6WCDBL.cjs +0 -10
  234. package/dist/quit-2RYFGIJP.cjs +0 -8
  235. package/dist/quit-RSYIERO5.js +0 -8
  236. package/dist/resume-54ERVSFM.cjs +0 -10
  237. package/dist/resume-YJ5CVKAP.js +0 -10
  238. package/dist/search-4TEQMUPU.js +0 -11
  239. package/dist/search-QGLS4SV7.cjs +0 -11
  240. package/dist/sessions-7RTCPVNE.cjs +0 -8
  241. package/dist/share-2B2T3AUU.cjs +0 -11
  242. package/dist/share-SZMXZIA3.js +0 -11
  243. package/dist/skills-HVQNCTGK.cjs +0 -12
  244. package/dist/skills-new-5FSDAJWE.js +0 -12
  245. package/dist/skills-new-IOTZYE6F.cjs +0 -12
  246. package/dist/status-AGPSKXSW.js +0 -9
  247. package/dist/status-WOINF556.cjs +0 -9
  248. package/dist/sync-64MZDWGG.js +0 -14
  249. package/dist/sync-F5ECJW25.cjs +0 -39
  250. package/dist/sync-W5UR7BEP.cjs +0 -14
  251. package/dist/theme-CWG3ZLHB.cjs +0 -13
  252. package/dist/theme-HQKV7YAP.js +0 -13
  253. package/dist/undo-2WR2ZIEC.cjs +0 -8
  254. package/dist/undo-7QJBXARS.js +0 -8
@@ -0,0 +1,380 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunkY27LG4BQcjs = require('./chunk-Y27LG4BQ.cjs');
5
+
6
+ // src/ui/ink/components/Modal.tsx
7
+ var _react = require('react');
8
+ var _ink = require('ink');
9
+ var _jsxruntime = require('react/jsx-runtime');
10
+ var OTHER_VALUE = "__other__";
11
+ function Modal(props) {
12
+ const { t } = _chunkY27LG4BQcjs.useTranslation.call(void 0, );
13
+ const { title, onCancel } = props;
14
+ const mode = "mode" in props ? props.mode : "select";
15
+ const [cursor, setCursor] = _react.useState.call(void 0, 0);
16
+ const [customInput, setCustomInput] = _react.useState.call(void 0, "");
17
+ const [isCustomMode, setIsCustomMode] = _react.useState.call(void 0, false);
18
+ const [inputValue, setInputValue] = _react.useState.call(void 0, () => {
19
+ if (mode === "input" && "defaultValue" in props && typeof props.defaultValue === "string") {
20
+ return props.defaultValue;
21
+ }
22
+ return "";
23
+ });
24
+ const [validationError, setValidationError] = _react.useState.call(void 0, null);
25
+ const choices = _react.useMemo.call(void 0, () => {
26
+ if (mode === "select" && "options" in props) {
27
+ const items = [...props.options];
28
+ if ("allowCustomInput" in props && props.allowCustomInput) {
29
+ items.push({
30
+ label: t("ui.questionOther"),
31
+ value: OTHER_VALUE,
32
+ disabled: false
33
+ });
34
+ }
35
+ return items;
36
+ }
37
+ if (mode === "confirm" && "confirmText" in props) {
38
+ const confirmText = _nullishCoalesce(props.confirmText, () => ( t("ui.confirmYes")));
39
+ const cancelText = _nullishCoalesce(props.cancelText, () => ( t("ui.confirmNo")));
40
+ return [
41
+ { label: confirmText, value: "yes", disabled: false },
42
+ { label: cancelText, value: "no", disabled: false }
43
+ ];
44
+ }
45
+ return [];
46
+ }, [mode, props, t]);
47
+ _react.useState.call(void 0, () => {
48
+ if (mode === "confirm" && "defaultValue" in props) {
49
+ const defaultIdx = props.defaultValue === false ? 1 : 0;
50
+ setCursor(defaultIdx);
51
+ }
52
+ });
53
+ const hasNoChoices = mode === "select" && choices.length === 0;
54
+ const findNextEnabled = _react.useCallback.call(void 0,
55
+ (from, direction) => {
56
+ const len = choices.length;
57
+ if (len === 0) return 0;
58
+ let next = (from + direction + len) % len;
59
+ let attempts = 0;
60
+ while (_optionalChain([choices, 'access', _ => _[next], 'optionalAccess', _2 => _2.disabled]) && attempts < len) {
61
+ next = (next + direction + len) % len;
62
+ attempts++;
63
+ }
64
+ return next;
65
+ },
66
+ [choices]
67
+ );
68
+ _ink.useInput.call(void 0, (char, key) => {
69
+ if (key.escape) {
70
+ if (mode === "select" && isCustomMode) {
71
+ setIsCustomMode(false);
72
+ setCustomInput("");
73
+ } else {
74
+ _optionalChain([onCancel, 'optionalCall', _3 => _3()]);
75
+ }
76
+ return;
77
+ }
78
+ if (mode === "input" || mode === "password") {
79
+ if (key.return && "onSubmit" in props) {
80
+ if ("validate" in props && props.validate) {
81
+ const result = props.validate(inputValue);
82
+ if (result === true) {
83
+ props.onSubmit(inputValue);
84
+ } else if (typeof result === "string") {
85
+ setValidationError(result);
86
+ } else {
87
+ setValidationError(t("ui.validationError"));
88
+ }
89
+ } else {
90
+ props.onSubmit(inputValue);
91
+ }
92
+ return;
93
+ }
94
+ if (key.backspace || key.delete) {
95
+ setInputValue((prev) => prev.slice(0, -1));
96
+ setValidationError(null);
97
+ return;
98
+ }
99
+ if (char && !key.ctrl && !key.meta) {
100
+ setInputValue((prev) => prev + char);
101
+ setValidationError(null);
102
+ }
103
+ return;
104
+ }
105
+ if (mode === "select" && isCustomMode && "onSelect" in props) {
106
+ if (key.return) {
107
+ if (customInput.trim()) {
108
+ props.onSelect({
109
+ label: customInput,
110
+ value: customInput
111
+ });
112
+ }
113
+ return;
114
+ }
115
+ if (key.backspace || key.delete) {
116
+ setCustomInput((prev) => prev.slice(0, -1));
117
+ return;
118
+ }
119
+ if (char && !key.ctrl && !key.meta) {
120
+ setCustomInput((prev) => prev + char);
121
+ }
122
+ return;
123
+ }
124
+ if (key.return) {
125
+ const selected = choices[cursor];
126
+ if (_optionalChain([selected, 'optionalAccess', _4 => _4.disabled])) {
127
+ return;
128
+ }
129
+ if (mode === "select" && "onSelect" in props) {
130
+ if (_optionalChain([selected, 'optionalAccess', _5 => _5.value]) === OTHER_VALUE) {
131
+ setIsCustomMode(true);
132
+ } else if (selected) {
133
+ props.onSelect(selected);
134
+ }
135
+ } else if (mode === "confirm" && "onConfirm" in props) {
136
+ props.onConfirm(_optionalChain([selected, 'optionalAccess', _6 => _6.value]) === "yes");
137
+ }
138
+ return;
139
+ }
140
+ if (key.upArrow) {
141
+ setCursor((prev) => findNextEnabled(prev, -1));
142
+ return;
143
+ }
144
+ if (key.downArrow) {
145
+ setCursor((prev) => findNextEnabled(prev, 1));
146
+ return;
147
+ }
148
+ if (char && char >= "1" && char <= "9") {
149
+ const index = parseInt(char, 10) - 1;
150
+ if (index < choices.length) {
151
+ const selected = choices[index];
152
+ if (_optionalChain([selected, 'optionalAccess', _7 => _7.disabled])) {
153
+ return;
154
+ }
155
+ if (mode === "select" && "onSelect" in props) {
156
+ if (_optionalChain([selected, 'optionalAccess', _8 => _8.value]) === OTHER_VALUE) {
157
+ setIsCustomMode(true);
158
+ } else if (selected) {
159
+ props.onSelect(selected);
160
+ }
161
+ } else if (mode === "confirm" && "onConfirm" in props) {
162
+ props.onConfirm(_optionalChain([selected, 'optionalAccess', _9 => _9.value]) === "yes");
163
+ }
164
+ }
165
+ return;
166
+ }
167
+ });
168
+ const renderContent = () => {
169
+ if (mode === "input" || mode === "password") {
170
+ const displayValue = mode === "password" ? "\u2022".repeat(inputValue.length) : inputValue;
171
+ const placeholderText = "placeholder" in props && props.placeholder || (mode === "password" ? t("ui.passwordPlaceholder") : t("ui.inputPlaceholder"));
172
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
173
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { children: [
174
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "yellow", children: "> " }),
175
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: displayValue || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: placeholderText }) }),
176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "\u2588" })
177
+ ] }),
178
+ validationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Box, { marginTop: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "red", children: validationError }) })
179
+ ] });
180
+ }
181
+ if (mode === "select" && isCustomMode) {
182
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { children: [
183
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: "yellow", children: [
184
+ t("ui.questionYourAnswer"),
185
+ ": "
186
+ ] }),
187
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: customInput }),
188
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "\u2588" })
189
+ ] });
190
+ }
191
+ if (hasNoChoices) {
192
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Box, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: t("ui.noOptionsAvailable") }) });
193
+ }
194
+ return choices.map((choice, i) => {
195
+ const isSelected = i === cursor;
196
+ const isDisabled = choice.disabled;
197
+ let color;
198
+ if (isDisabled) {
199
+ color = "gray";
200
+ } else if (isSelected) {
201
+ color = "green";
202
+ }
203
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", children: [
204
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color, children: [
205
+ isSelected ? "\u25B8 " : " ",
206
+ i + 1,
207
+ ". ",
208
+ choice.label,
209
+ isDisabled ? " (disabled)" : ""
210
+ ] }),
211
+ choice.description && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: "gray", children: [
212
+ " ",
213
+ choice.description
214
+ ] })
215
+ ] }, `${choice.value}-${i}`);
216
+ });
217
+ };
218
+ const renderHint = () => {
219
+ if (mode === "input" || mode === "password") {
220
+ return t("ui.inputHint");
221
+ }
222
+ if (mode === "select" && hasNoChoices) {
223
+ return t("common.pressEscToCancel");
224
+ }
225
+ if (mode === "select" && isCustomMode) {
226
+ return t("ui.questionCustomHint");
227
+ }
228
+ return t("ui.questionSelectHint");
229
+ };
230
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", paddingX: 1, children: [
231
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "cyan", children: title }),
232
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
233
+ renderContent(),
234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
235
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: renderHint() })
236
+ ] });
237
+ }
238
+ async function showModal(options) {
239
+ const { title, options: modalOptions, allowCustomInput, multiSelect } = options;
240
+ if (!process.stdout.isTTY) {
241
+ return null;
242
+ }
243
+ return new Promise((resolve) => {
244
+ let completed = false;
245
+ const instance = _ink.render.call(void 0,
246
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
247
+ Modal,
248
+ {
249
+ title,
250
+ options: modalOptions,
251
+ allowCustomInput,
252
+ multiSelect,
253
+ onSelect: (option) => {
254
+ if (completed) return;
255
+ completed = true;
256
+ instance.unmount();
257
+ resolve(option);
258
+ },
259
+ onCancel: () => {
260
+ if (completed) return;
261
+ completed = true;
262
+ instance.unmount();
263
+ resolve(null);
264
+ }
265
+ }
266
+ ) }),
267
+ { exitOnCtrlC: false }
268
+ );
269
+ });
270
+ }
271
+ async function showConfirm(options) {
272
+ if (!process.stdout.isTTY) {
273
+ return false;
274
+ }
275
+ return new Promise((resolve) => {
276
+ let completed = false;
277
+ const instance = _ink.render.call(void 0,
278
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
279
+ Modal,
280
+ {
281
+ mode: "confirm",
282
+ title: options.title,
283
+ confirmText: options.confirmText,
284
+ cancelText: options.cancelText,
285
+ defaultValue: options.defaultValue,
286
+ onConfirm: (confirmed) => {
287
+ if (completed) return;
288
+ completed = true;
289
+ instance.unmount();
290
+ resolve(confirmed);
291
+ },
292
+ onCancel: () => {
293
+ if (completed) return;
294
+ completed = true;
295
+ instance.unmount();
296
+ resolve(false);
297
+ }
298
+ }
299
+ ) }),
300
+ { exitOnCtrlC: false }
301
+ );
302
+ });
303
+ }
304
+ async function showInput(options) {
305
+ if (!process.stdout.isTTY) {
306
+ return null;
307
+ }
308
+ return new Promise((resolve) => {
309
+ let completed = false;
310
+ const instance = _ink.render.call(void 0,
311
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
312
+ Modal,
313
+ {
314
+ mode: "input",
315
+ title: options.title,
316
+ placeholder: options.placeholder,
317
+ defaultValue: options.defaultValue,
318
+ validate: options.validate,
319
+ onSubmit: (value) => {
320
+ if (completed) return;
321
+ completed = true;
322
+ instance.unmount();
323
+ resolve(value);
324
+ },
325
+ onCancel: () => {
326
+ if (completed) return;
327
+ completed = true;
328
+ instance.unmount();
329
+ resolve(null);
330
+ }
331
+ }
332
+ ) }),
333
+ { exitOnCtrlC: false }
334
+ );
335
+ });
336
+ }
337
+ async function showPassword(options) {
338
+ if (!process.stdout.isTTY) {
339
+ return null;
340
+ }
341
+ return new Promise((resolve) => {
342
+ let completed = false;
343
+ const instance = _ink.render.call(void 0,
344
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
345
+ Modal,
346
+ {
347
+ mode: "password",
348
+ title: options.title,
349
+ placeholder: options.placeholder,
350
+ validate: options.validate,
351
+ onSubmit: (value) => {
352
+ if (completed) return;
353
+ completed = true;
354
+ instance.unmount();
355
+ resolve(value);
356
+ },
357
+ onCancel: () => {
358
+ if (completed) return;
359
+ completed = true;
360
+ instance.unmount();
361
+ resolve(null);
362
+ }
363
+ }
364
+ ) }),
365
+ { exitOnCtrlC: false }
366
+ );
367
+ });
368
+ }
369
+
370
+
371
+
372
+
373
+
374
+
375
+ exports.showModal = showModal; exports.showConfirm = showConfirm; exports.showInput = showInput; exports.showPassword = showPassword;
376
+ /**
377
+ * @license
378
+ * Copyright 2025 Autohand AI LLC
379
+ * SPDX-License-Identifier: Apache-2.0
380
+ */
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  safePrompt
3
- } from "./chunk-NCLCL7JK.js";
3
+ } from "./chunk-WD5ZF6HE.js";
4
+ import {
5
+ t
6
+ } from "./chunk-UET7BDX2.js";
4
7
 
5
8
  // src/commands/permissions.ts
6
9
  import chalk from "chalk";
@@ -9,9 +12,9 @@ async function permissions(ctx) {
9
12
  const blacklist = ctx.permissionManager.getBlacklist();
10
13
  const settings = ctx.permissionManager.getSettings();
11
14
  console.log();
12
- console.log(chalk.bold.cyan("Permissions"));
15
+ console.log(chalk.bold.cyan(t("commands.permissions.title")));
13
16
  console.log(chalk.gray("\u2500".repeat(50)));
14
- console.log(chalk.gray(`Mode: ${settings.mode || "interactive"}`));
17
+ console.log(chalk.gray(t("commands.permissions.mode", { mode: settings.mode || "interactive" })));
15
18
  console.log();
16
19
  if (whitelist.length === 0 && blacklist.length === 0) {
17
20
  console.log(chalk.gray("No saved permissions yet."));
@@ -21,7 +24,7 @@ async function permissions(ctx) {
21
24
  return null;
22
25
  }
23
26
  if (whitelist.length > 0) {
24
- console.log(chalk.bold.green("Approved (Whitelist)"));
27
+ console.log(chalk.bold.green(t("commands.permissions.allowed")));
25
28
  console.log();
26
29
  whitelist.forEach((pattern, index) => {
27
30
  console.log(chalk.green(` ${index + 1}. ${pattern}`));
@@ -29,7 +32,7 @@ async function permissions(ctx) {
29
32
  console.log();
30
33
  }
31
34
  if (blacklist.length > 0) {
32
- console.log(chalk.bold.red("Denied (Blacklist)"));
35
+ console.log(chalk.bold.red(t("commands.permissions.denied")));
33
36
  console.log();
34
37
  blacklist.forEach((pattern, index) => {
35
38
  console.log(chalk.red(` ${index + 1}. ${pattern}`));
@@ -97,7 +100,7 @@ async function permissions(ctx) {
97
100
  }
98
101
  var metadata = {
99
102
  command: "/permissions",
100
- description: "view and manage tool/command approvals",
103
+ description: t("commands.permissions.description"),
101
104
  implemented: true
102
105
  };
103
106
 
@@ -1,6 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkLJCSSR5Vcjs = require('./chunk-LJCSSR5V.cjs');
3
+ var _chunkMNCWB5F7cjs = require('./chunk-MNCWB5F7.cjs');
4
+
5
+
6
+ var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
4
7
 
5
8
  // src/commands/hooks.ts
6
9
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
@@ -116,11 +119,11 @@ function getShortCommand(command) {
116
119
  }
117
120
  function displayHooksList(allHooks) {
118
121
  console.log();
119
- console.log(_chalk2.default.bold.cyan("\u26A1 Hooks"));
122
+ console.log(_chalk2.default.bold.cyan(_chunkLOXOD4IScjs.t.call(void 0, "commands.hooks.title")));
120
123
  console.log(_chalk2.default.gray(" Lifecycle hooks run shell commands on events"));
121
124
  console.log();
122
125
  if (allHooks.length === 0) {
123
- console.log(_chalk2.default.gray(" No hooks configured."));
126
+ console.log(_chalk2.default.gray(` ${_chunkLOXOD4IScjs.t.call(void 0, "commands.hooks.noHooks")}`));
124
127
  console.log();
125
128
  return;
126
129
  }
@@ -194,7 +197,7 @@ async function hooks(ctx) {
194
197
  const toggleLabel = settings.enabled !== false ? "\u25EF Disable all hooks" : "\u25CF Enable all hooks";
195
198
  choices.push({ name: "toggle_global", message: toggleLabel });
196
199
  }
197
- const actionResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
200
+ const actionResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
198
201
  type: "select",
199
202
  name: "action",
200
203
  message: "Action",
@@ -230,7 +233,7 @@ async function toggleHooksMulti(manager, allHooks) {
230
233
  enabled: h.enabled !== false
231
234
  };
232
235
  });
233
- const result = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
236
+ const result = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
234
237
  type: "select",
235
238
  name: "selected",
236
239
  message: "Toggle hooks (select to enable/disable)",
@@ -256,26 +259,26 @@ async function addHook(manager) {
256
259
  name: e,
257
260
  message: `${e} ${_chalk2.default.dim(`- ${EVENT_DESCRIPTIONS[e]}`)}`
258
261
  }));
259
- const eventResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
262
+ const eventResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
260
263
  type: "select",
261
264
  name: "event",
262
265
  message: "Event to hook into",
263
266
  choices: eventChoices
264
267
  });
265
268
  if (!eventResult) return;
266
- const commandResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
269
+ const commandResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
267
270
  type: "input",
268
271
  name: "command",
269
272
  message: "Shell command to execute",
270
273
  validate: (val) => typeof val === "string" && val.trim().length > 0 || "Command is required"
271
274
  });
272
275
  if (!commandResult || !commandResult.command) return;
273
- const descResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
276
+ const descResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
274
277
  type: "input",
275
278
  name: "description",
276
279
  message: "Description (optional)"
277
280
  });
278
- const asyncResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
281
+ const asyncResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
279
282
  type: "confirm",
280
283
  name: "async",
281
284
  message: "Run asynchronously (non-blocking)?",
@@ -300,7 +303,7 @@ async function removeHook(manager, allHooks) {
300
303
  message: `${eventTag} ${desc2}`
301
304
  };
302
305
  });
303
- const selectResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
306
+ const selectResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
304
307
  type: "select",
305
308
  name: "hookIndex",
306
309
  message: "Select hook to remove",
@@ -312,7 +315,7 @@ async function removeHook(manager, allHooks) {
312
315
  const eventHooks = allHooks.filter((h) => h.event === hook.event);
313
316
  const eventIndex = eventHooks.indexOf(hook);
314
317
  const desc = hook.description || getShortCommand(hook.command);
315
- const confirmResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
318
+ const confirmResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
316
319
  type: "confirm",
317
320
  name: "confirm",
318
321
  message: `Remove "${desc}"?`,
@@ -335,7 +338,7 @@ async function testHook(manager, allHooks) {
335
338
  message: `${eventTag} ${desc}`
336
339
  };
337
340
  });
338
- const selectResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
341
+ const selectResult = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
339
342
  type: "select",
340
343
  name: "hookIndex",
341
344
  message: "Select hook to test",
@@ -366,7 +369,7 @@ async function testHook(manager, allHooks) {
366
369
  }
367
370
  var metadata = {
368
371
  command: "/hooks",
369
- description: "view and manage lifecycle hooks",
372
+ description: _chunkLOXOD4IScjs.t.call(void 0, "commands.hooks.description"),
370
373
  implemented: true
371
374
  };
372
375