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,400 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
+ var _chunkRJP3SZ7Qcjs = require('./chunk-RJP3SZ7Q.cjs');
4
+
5
+
6
+ var _chunkY27LG4BQcjs = require('./chunk-Y27LG4BQ.cjs');
7
+
8
+
9
+ var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
10
+
11
+ // src/commands/mcp.ts
12
+ var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
13
+
14
+ // src/ui/ink/components/McpServerList.tsx
15
+ var _react = require('react');
16
+ var _ink = require('ink');
17
+ var _jsxruntime = require('react/jsx-runtime');
18
+ function McpServerList({ servers, onToggle, onDone }) {
19
+ const [cursor, setCursor] = _react.useState.call(void 0, 0);
20
+ const [toggling, setToggling] = _react.useState.call(void 0, null);
21
+ const handleToggle = _react.useCallback.call(void 0, async () => {
22
+ const server = servers[cursor];
23
+ if (!server || toggling) return;
24
+ setToggling(server.name);
25
+ onToggle(server.name, server.status);
26
+ setToggling(null);
27
+ }, [cursor, servers, toggling, onToggle]);
28
+ _ink.useInput.call(void 0, (char, key) => {
29
+ if (key.escape || char === "q" && !key.ctrl) {
30
+ onDone();
31
+ return;
32
+ }
33
+ if (key.upArrow) {
34
+ setCursor((prev) => prev > 0 ? prev - 1 : servers.length - 1);
35
+ return;
36
+ }
37
+ if (key.downArrow) {
38
+ setCursor((prev) => prev < servers.length - 1 ? prev + 1 : 0);
39
+ return;
40
+ }
41
+ if (char === " " || key.return) {
42
+ handleToggle();
43
+ return;
44
+ }
45
+ });
46
+ if (servers.length === 0) {
47
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", paddingX: 1, children: [
48
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "cyan", bold: true, children: "MCP Servers" }),
49
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
50
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "No MCP servers configured." }),
51
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
52
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: "gray", children: [
53
+ "Add a server: /mcp add ",
54
+ "<name>",
55
+ " ",
56
+ "<command>",
57
+ " [args...]"
58
+ ] }),
59
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "Browse: /mcp install" }),
60
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
61
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "Press ESC or q to close" })
62
+ ] });
63
+ }
64
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", paddingX: 1, children: [
65
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "cyan", bold: true, children: "MCP Servers" }),
66
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Box, { marginBottom: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "\u2500".repeat(56) }) }),
67
+ servers.map((server, i) => {
68
+ const isSelected = i === cursor;
69
+ const isToggling = toggling === server.name;
70
+ const statusIcon = server.status === "connected" ? "\u25CF" : server.status === "error" ? "\u25CF" : "\u25CB";
71
+ const statusColor = server.status === "connected" ? "green" : server.status === "error" ? "red" : "gray";
72
+ const statusLabel = server.status === "connected" ? "enabled" : server.status === "error" ? "error" : "disabled";
73
+ const toolsInfo = server.status === "connected" && server.toolCount > 0 ? ` (${server.toolCount} tools)` : "";
74
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", children: [
75
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { children: [
76
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: isSelected ? "yellow" : void 0, children: isSelected ? "\u25B8 " : " " }),
77
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: statusColor, children: [
78
+ statusIcon,
79
+ " "
80
+ ] }),
81
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { bold: isSelected, children: server.name.padEnd(24) }),
82
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: statusColor, children: isToggling ? "toggling..." : statusLabel }),
83
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: toolsInfo })
84
+ ] }),
85
+ isSelected && server.status === "error" && server.error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Box, { marginLeft: 4, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: "red", dimColor: true, children: [
86
+ " ",
87
+ server.error
88
+ ] }) })
89
+ ] }, server.name);
90
+ }),
91
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { children: " " }),
92
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Box, { flexDirection: "column", children: [
93
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ink.Text, { color: "gray", children: [
94
+ "\u2191\u2193",
95
+ " navigate ",
96
+ "\u23CE/space",
97
+ " toggle ",
98
+ "q/esc",
99
+ " close"
100
+ ] }),
101
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ink.Text, { color: "gray", children: "Connected servers provide tools to the agent" })
102
+ ] })
103
+ ] });
104
+ }
105
+ async function showMcpServerList(options) {
106
+ if (!process.stdout.isTTY) {
107
+ return;
108
+ }
109
+ let currentServers = [...options.servers];
110
+ return new Promise((resolve) => {
111
+ let completed = false;
112
+ let instance;
113
+ const renderList = () => {
114
+ const element = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
115
+ McpServerList,
116
+ {
117
+ servers: currentServers,
118
+ onToggle: async (name, status) => {
119
+ currentServers = await options.onToggle(name, status);
120
+ instance.rerender(
121
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY27LG4BQcjs.I18nProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
122
+ McpServerList,
123
+ {
124
+ servers: currentServers,
125
+ onToggle: async (n, s) => {
126
+ currentServers = await options.onToggle(n, s);
127
+ renderList();
128
+ },
129
+ onDone: () => {
130
+ if (completed) return;
131
+ completed = true;
132
+ instance.unmount();
133
+ resolve();
134
+ }
135
+ }
136
+ ) })
137
+ );
138
+ },
139
+ onDone: () => {
140
+ if (completed) return;
141
+ completed = true;
142
+ instance.unmount();
143
+ resolve();
144
+ }
145
+ }
146
+ ) });
147
+ if (instance) {
148
+ instance.rerender(element);
149
+ } else {
150
+ instance = _ink.render.call(void 0, element, { exitOnCtrlC: false });
151
+ }
152
+ };
153
+ renderList();
154
+ });
155
+ }
156
+
157
+ // src/commands/mcp.ts
158
+ async function mcp(ctx, args = []) {
159
+ const { mcpManager, config } = ctx;
160
+ if (!mcpManager) {
161
+ return "MCP manager not available.";
162
+ }
163
+ const subcommand = _optionalChain([args, 'access', _ => _[0], 'optionalAccess', _2 => _2.toLowerCase, 'call', _3 => _3()]);
164
+ switch (subcommand) {
165
+ case "connect":
166
+ return handleConnect(mcpManager, config, args.slice(1));
167
+ case "disconnect":
168
+ return handleDisconnect(mcpManager, args.slice(1));
169
+ case "list":
170
+ case "tools":
171
+ return handleListTools(mcpManager);
172
+ case "add":
173
+ return handleAdd(mcpManager, config, args.slice(1));
174
+ case "remove":
175
+ case "rm":
176
+ return handleRemove(mcpManager, config, args.slice(1));
177
+ default:
178
+ return showInteractiveList(mcpManager, config);
179
+ }
180
+ }
181
+ function buildServerItems(manager, config) {
182
+ const runtimeServers = manager.listServers();
183
+ const items = runtimeServers.map((s) => ({
184
+ name: s.name,
185
+ status: s.status,
186
+ toolCount: s.toolCount
187
+ }));
188
+ const runtimeNames = new Set(runtimeServers.map((s) => s.name));
189
+ const configServers = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _4 => _4.mcp, 'optionalAccess', _5 => _5.servers]), () => ( []));
190
+ for (const cs of configServers) {
191
+ if (!runtimeNames.has(cs.name)) {
192
+ items.push({
193
+ name: cs.name,
194
+ status: "disconnected",
195
+ toolCount: 0
196
+ });
197
+ }
198
+ }
199
+ return items;
200
+ }
201
+ async function showInteractiveList(manager, config) {
202
+ const items = buildServerItems(manager, config);
203
+ if (items.length === 0) {
204
+ const lines = [];
205
+ lines.push("");
206
+ lines.push(_chalk2.default.bold.cyan(_chunkLOXOD4IScjs.t.call(void 0, "commands.mcp.title")));
207
+ lines.push(_chalk2.default.gray("\u2500".repeat(50)));
208
+ lines.push("");
209
+ lines.push(_chunkLOXOD4IScjs.t.call(void 0, "commands.mcp.noServers"));
210
+ lines.push("");
211
+ lines.push(_chalk2.default.gray("Add a server:"));
212
+ lines.push(_chalk2.default.gray(" /mcp add <name> <command> [args...]"));
213
+ lines.push("");
214
+ lines.push(_chalk2.default.gray("Browse community servers:"));
215
+ lines.push(_chalk2.default.gray(" /mcp install"));
216
+ return lines.join("\n");
217
+ }
218
+ await showMcpServerList({
219
+ servers: items,
220
+ onToggle: async (serverName, currentStatus) => {
221
+ if (currentStatus === "connected") {
222
+ try {
223
+ await manager.disconnect(serverName);
224
+ } catch (e) {
225
+ }
226
+ } else {
227
+ const serverConfig = _optionalChain([config, 'optionalAccess', _6 => _6.mcp, 'optionalAccess', _7 => _7.servers, 'optionalAccess', _8 => _8.find, 'call', _9 => _9((s) => s.name === serverName)]);
228
+ if (serverConfig) {
229
+ try {
230
+ await manager.connect(serverConfig);
231
+ } catch (e2) {
232
+ }
233
+ }
234
+ }
235
+ return buildServerItems(manager, config);
236
+ }
237
+ });
238
+ const updatedServers = manager.listServers();
239
+ const connectedCount = updatedServers.filter((s) => s.status === "connected").length;
240
+ const totalTools = updatedServers.reduce(
241
+ (sum, s) => sum + (s.status === "connected" ? s.toolCount : 0),
242
+ 0
243
+ );
244
+ if (connectedCount > 0) {
245
+ return `${connectedCount} server${connectedCount > 1 ? "s" : ""} connected (${totalTools} tools available)`;
246
+ }
247
+ return null;
248
+ }
249
+ async function handleConnect(manager, config, args) {
250
+ const serverName = args[0];
251
+ if (!serverName) {
252
+ return "Usage: /mcp connect <server-name>";
253
+ }
254
+ const serverConfig = _optionalChain([config, 'optionalAccess', _10 => _10.mcp, 'optionalAccess', _11 => _11.servers, 'optionalAccess', _12 => _12.find, 'call', _13 => _13((s) => s.name === serverName)]);
255
+ if (!serverConfig) {
256
+ return `Server "${serverName}" not found in config. Use /mcp add to add it first.`;
257
+ }
258
+ try {
259
+ console.log(_chalk2.default.cyan(_chunkLOXOD4IScjs.t.call(void 0, "commands.mcp.connecting")));
260
+ await manager.connect(serverConfig);
261
+ const tools = manager.getToolsForServer(serverName);
262
+ return `Connected to ${serverName} (${tools.length} tools available)`;
263
+ } catch (error) {
264
+ return `Failed to connect to ${serverName}: ${error instanceof Error ? error.message : "Unknown error"}`;
265
+ }
266
+ }
267
+ async function handleDisconnect(manager, args) {
268
+ const serverName = args[0];
269
+ if (!serverName) {
270
+ return "Usage: /mcp disconnect <server-name>";
271
+ }
272
+ try {
273
+ await manager.disconnect(serverName);
274
+ return `Disconnected from ${serverName}`;
275
+ } catch (error) {
276
+ return `Failed to disconnect from ${serverName}: ${error instanceof Error ? error.message : "Unknown error"}`;
277
+ }
278
+ }
279
+ function handleListTools(manager) {
280
+ const tools = manager.getAllTools();
281
+ const lines = [];
282
+ lines.push("");
283
+ lines.push(_chalk2.default.bold.cyan("MCP Tools"));
284
+ lines.push(_chalk2.default.gray("\u2500".repeat(50)));
285
+ if (tools.length === 0) {
286
+ lines.push("");
287
+ lines.push("No tools available. Connect to an MCP server first.");
288
+ return lines.join("\n");
289
+ }
290
+ const byServer = /* @__PURE__ */ new Map();
291
+ for (const tool of tools) {
292
+ const existing = _nullishCoalesce(byServer.get(tool.serverName), () => ( []));
293
+ existing.push(tool);
294
+ byServer.set(tool.serverName, existing);
295
+ }
296
+ for (const [serverName, serverTools] of byServer) {
297
+ lines.push("");
298
+ lines.push(_chalk2.default.bold(`${serverName} (${serverTools.length} tools):`));
299
+ for (const tool of serverTools) {
300
+ const shortName = tool.name.replace(`mcp__${serverName}__`, "");
301
+ lines.push(` ${_chalk2.default.yellow(shortName)} ${_chalk2.default.gray(tool.description.slice(0, 60))}`);
302
+ }
303
+ }
304
+ lines.push("");
305
+ lines.push(_chalk2.default.gray(`Total: ${tools.length} tools from ${byServer.size} servers`));
306
+ return lines.join("\n");
307
+ }
308
+ async function handleAdd(manager, config, args) {
309
+ if (args.length < 2) {
310
+ return "Usage: /mcp add <name> <command> [args...]";
311
+ }
312
+ if (!config) {
313
+ return "Config not available.";
314
+ }
315
+ const [name, command, ...serverArgs] = args;
316
+ if (_optionalChain([config, 'access', _14 => _14.mcp, 'optionalAccess', _15 => _15.servers, 'optionalAccess', _16 => _16.some, 'call', _17 => _17((s) => s.name === name)])) {
317
+ return `Server "${name}" already exists in config. Use /mcp remove first.`;
318
+ }
319
+ if (!config.mcp) {
320
+ config.mcp = {};
321
+ }
322
+ if (!config.mcp.servers) {
323
+ config.mcp.servers = [];
324
+ }
325
+ const newServer = {
326
+ name,
327
+ transport: "stdio",
328
+ command,
329
+ args: serverArgs.length > 0 ? serverArgs : void 0,
330
+ autoConnect: true
331
+ };
332
+ config.mcp.servers.push(newServer);
333
+ try {
334
+ await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, config);
335
+ try {
336
+ await manager.connect(newServer);
337
+ const tools = manager.getToolsForServer(name);
338
+ return `Added and connected to "${name}" (${tools.length} tools available)`;
339
+ } catch (connectError) {
340
+ return `Added "${name}" to config but failed to connect: ${connectError instanceof Error ? connectError.message : "Unknown error"}`;
341
+ }
342
+ } catch (error) {
343
+ return `Failed to save config: ${error instanceof Error ? error.message : "Unknown error"}`;
344
+ }
345
+ }
346
+ async function handleRemove(manager, config, args) {
347
+ const serverName = args[0];
348
+ if (!serverName) {
349
+ return "Usage: /mcp remove <server-name>";
350
+ }
351
+ if (!config) {
352
+ return "Config not available.";
353
+ }
354
+ const serverIndex = _optionalChain([config, 'access', _18 => _18.mcp, 'optionalAccess', _19 => _19.servers, 'optionalAccess', _20 => _20.findIndex, 'call', _21 => _21((s) => s.name === serverName)]);
355
+ if (serverIndex === void 0 || serverIndex < 0) {
356
+ return `Server "${serverName}" not found in config.`;
357
+ }
358
+ try {
359
+ await manager.disconnect(serverName);
360
+ } catch (e3) {
361
+ }
362
+ config.mcp.servers.splice(serverIndex, 1);
363
+ try {
364
+ await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, config);
365
+ return `Removed "${serverName}" from config`;
366
+ } catch (error) {
367
+ return `Failed to save config: ${error instanceof Error ? error.message : "Unknown error"}`;
368
+ }
369
+ }
370
+ var metadata = {
371
+ command: "/mcp",
372
+ description: _chunkLOXOD4IScjs.t.call(void 0, "commands.mcp.description"),
373
+ implemented: true
374
+ };
375
+ var installMetadata = {
376
+ command: "/mcp install",
377
+ description: _chunkLOXOD4IScjs.t.call(void 0, "commands.mcp.installDescription"),
378
+ implemented: true
379
+ };
380
+
381
+
382
+
383
+
384
+
385
+ exports.mcp = mcp; exports.metadata = metadata; exports.installMetadata = installMetadata;
386
+ /**
387
+ * @license
388
+ * Copyright 2025 Autohand AI LLC
389
+ * SPDX-License-Identifier: Apache-2.0
390
+ *
391
+ * Interactive MCP Server toggle list - Ink component
392
+ * Allows users to enable/disable MCP servers with arrow keys + space
393
+ */
394
+ /**
395
+ * @license
396
+ * Copyright 2025 Autohand AI LLC
397
+ * SPDX-License-Identifier: Apache-2.0
398
+ *
399
+ * MCP command - List and manage MCP (Model Context Protocol) servers
400
+ */
@@ -1,4 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/commands/add-dir.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
4
+
5
+ // src/commands/add-dir.ts
2
6
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
3
7
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
4
8
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -282,7 +286,7 @@ async function addDir(ctx, args) {
282
286
  }
283
287
  const resolvedPath = _path2.default.resolve(dirPath);
284
288
  if (!await _fsextra2.default.pathExists(resolvedPath)) {
285
- console.log(_chalk2.default.red(`Error: Directory does not exist: ${dirPath}`));
289
+ console.log(_chalk2.default.red(_chunkLOXOD4IScjs.t.call(void 0, "commands.addDir.notFound", { path: dirPath })));
286
290
  return null;
287
291
  }
288
292
  const stats = await _fsextra2.default.stat(resolvedPath);
@@ -301,17 +305,17 @@ async function addDir(ctx, args) {
301
305
  return null;
302
306
  }
303
307
  if (ctx.additionalDirs.includes(resolvedPath)) {
304
- console.log(_chalk2.default.yellow(`Directory already added: ${resolvedPath}`));
308
+ console.log(_chalk2.default.yellow(_chunkLOXOD4IScjs.t.call(void 0, "commands.addDir.alreadyAdded", { path: resolvedPath })));
305
309
  return null;
306
310
  }
307
311
  ctx.addAdditionalDir(resolvedPath);
308
- console.log(_chalk2.default.green(`Added directory: ${resolvedPath}`));
312
+ console.log(_chalk2.default.green(_chunkLOXOD4IScjs.t.call(void 0, "commands.addDir.added", { path: resolvedPath })));
309
313
  console.log(_chalk2.default.gray("You can now read, write, and modify files in this directory."));
310
314
  return null;
311
315
  }
312
316
  var metadata = {
313
317
  command: "/add-dir",
314
- description: "add additional directories to workspace scope",
318
+ description: _chunkLOXOD4IScjs.t.call(void 0, "commands.addDir.description"),
315
319
  implemented: true
316
320
  };
317
321
 
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  showModal
3
- } from "./chunk-6SM6N7DJ.js";
3
+ } from "./chunk-PNSRJT46.js";
4
4
  import {
5
5
  AUTOHAND_PATHS
6
- } from "./chunk-PGH3MHPP.js";
6
+ } from "./chunk-PWLLLJHU.js";
7
+ import {
8
+ t
9
+ } from "./chunk-UET7BDX2.js";
7
10
 
8
11
  // src/commands/resume.ts
9
12
  import chalk from "chalk";
@@ -11,7 +14,7 @@ import fs from "fs-extra";
11
14
  import path from "path";
12
15
  var metadata = {
13
16
  command: "/resume",
14
- description: "resume a previous session",
17
+ description: t("commands.resume.description"),
15
18
  implemented: true
16
19
  };
17
20
  async function getSessionTitle(sessionMeta) {
@@ -68,11 +71,14 @@ async function resume(ctx) {
68
71
  try {
69
72
  const allSessions = await ctx.sessionManager.listSessions();
70
73
  if (allSessions.length === 0) {
71
- console.log(chalk.gray("\nNo sessions found."));
74
+ console.log(chalk.gray(`
75
+ ${t("commands.sessions.noSessions")}`));
72
76
  console.log(chalk.gray("Start a new conversation to create a session.\n"));
73
77
  return null;
74
78
  }
75
- console.log(chalk.cyan("\nSelect a session to resume:\n"));
79
+ console.log(chalk.cyan(`
80
+ ${t("commands.sessions.selectPrompt")}
81
+ `));
76
82
  const choices = [];
77
83
  const recentSessions = allSessions.slice(0, 20);
78
84
  for (const session of recentSessions) {
@@ -105,7 +111,7 @@ async function resume(ctx) {
105
111
  }
106
112
  return resumeSession(ctx.sessionManager, result.value);
107
113
  } catch (error) {
108
- console.error(chalk.red(`Failed to list sessions: ${error.message}`));
114
+ console.error(chalk.red(t("commands.resume.failed", { error: error.message })));
109
115
  return null;
110
116
  }
111
117
  }
@@ -116,7 +122,7 @@ async function resumeSession(sessionManager, sessionId) {
116
122
  const firstUserMessage = messages.find((m) => m.role === "user");
117
123
  const title = session.metadata.summary || firstUserMessage?.content.slice(0, 50) || "Untitled session";
118
124
  console.log(chalk.cyan(`
119
- Resuming: ${title}`));
125
+ ${t("commands.resume.resuming", { id: title })}`));
120
126
  console.log(chalk.gray(` Project: ${session.metadata.projectPath}`));
121
127
  console.log(chalk.gray(` Started: ${new Date(session.metadata.createdAt).toLocaleString()}`));
122
128
  console.log(chalk.gray(` Messages: ${messages.length}`));
@@ -136,9 +142,9 @@ Resuming: ${title}`));
136
142
  console.log();
137
143
  }
138
144
  console.log(chalk.green("Session resumed. Continue typing to chat.\n"));
139
- return "SESSION_RESUMED";
145
+ return null;
140
146
  } catch (error) {
141
- console.error(chalk.red(`Failed to resume session: ${error.message}`));
147
+ console.error(chalk.red(t("commands.resume.failed", { error: error.message })));
142
148
  return null;
143
149
  }
144
150
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
2
2
  var package_default = {
3
3
  name: "autohand-cli",
4
- version: "0.7.9",
4
+ version: "0.7.10",
5
5
  license: "Apache-2.0",
6
6
  description: "Autohand interactive coding agent CLI powered by LLMs.",
7
7
  repository: {
@@ -48,6 +48,7 @@ var package_default = {
48
48
  node: ">=18.17.0"
49
49
  },
50
50
  dependencies: {
51
+ "@agentclientprotocol/sdk": "0.12.0",
51
52
  chalk: "^5.6.2",
52
53
  commander: "^14.0.2",
53
54
  diff: "^8.0.2",
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
2
 
3
3
 
4
- var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
4
+ var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
5
5
 
6
6
  // src/memory/MemoryManager.ts
7
7
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
@@ -11,13 +11,13 @@ var SIMILARITY_THRESHOLD = 0.6;
11
11
  var MemoryManager = class {
12
12
  constructor(workspaceRoot) {
13
13
  this.projectMemoryDir = null;
14
- this.userMemoryDir = _chunkAQNY2M6Qcjs.AUTOHAND_PATHS.memory;
14
+ this.userMemoryDir = _chunkGIZL57FEcjs.AUTOHAND_PATHS.memory;
15
15
  if (workspaceRoot) {
16
- this.projectMemoryDir = _path2.default.join(workspaceRoot, _chunkAQNY2M6Qcjs.PROJECT_DIR_NAME, "memory");
16
+ this.projectMemoryDir = _path2.default.join(workspaceRoot, _chunkGIZL57FEcjs.PROJECT_DIR_NAME, "memory");
17
17
  }
18
18
  }
19
19
  setWorkspace(workspaceRoot) {
20
- this.projectMemoryDir = _path2.default.join(workspaceRoot, _chunkAQNY2M6Qcjs.PROJECT_DIR_NAME, "memory");
20
+ this.projectMemoryDir = _path2.default.join(workspaceRoot, _chunkGIZL57FEcjs.PROJECT_DIR_NAME, "memory");
21
21
  }
22
22
  async initialize() {
23
23
  await _fsextra2.default.ensureDir(this.userMemoryDir);
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-7GJR65DQ.js";
3
+ } from "./chunk-CUBYCLNL.js";
4
4
  import {
5
5
  showConfirm,
6
6
  showModal
7
- } from "./chunk-6SM6N7DJ.js";
7
+ } from "./chunk-PNSRJT46.js";
8
8
  import {
9
9
  AUTOHAND_PATHS
10
- } from "./chunk-PGH3MHPP.js";
10
+ } from "./chunk-PWLLLJHU.js";
11
+ import {
12
+ t
13
+ } from "./chunk-UET7BDX2.js";
11
14
 
12
15
  // src/commands/share.ts
13
16
  import chalk from "chalk";
@@ -451,7 +454,7 @@ function terminalLink(url, text) {
451
454
  }
452
455
  var metadata = {
453
456
  command: "/share",
454
- description: "Share current session via public URL",
457
+ description: t("commands.share.description"),
455
458
  implemented: true
456
459
  };
457
460
  async function execute(_args, context) {
@@ -513,7 +516,7 @@ async function execute(_args, context) {
513
516
  return;
514
517
  }
515
518
  console.log();
516
- const spinner = ora("Uploading session...").start();
519
+ const spinner = ora(t("commands.share.generating")).start();
517
520
  try {
518
521
  const payload = serializeSession(session, {
519
522
  model: context.model,
@@ -526,9 +529,7 @@ async function execute(_args, context) {
526
529
  spinner.stop();
527
530
  if (response.success && response.url) {
528
531
  console.log();
529
- console.log(chalk.green.bold("Session shared successfully!"));
530
- console.log();
531
- console.log(`${chalk.bold("URL:")} ${terminalLink(response.url)}`);
532
+ console.log(chalk.green.bold(t("commands.share.success", { url: terminalLink(response.url) })));
532
533
  if (visibility === "private" && response.passcode) {
533
534
  console.log();
534
535
  console.log(`${chalk.bold("Passcode:")} ${chalk.yellow.bold(response.passcode)}`);
@@ -542,14 +543,14 @@ async function execute(_args, context) {
542
543
  } else {
543
544
  console.log();
544
545
  console.log(
545
- chalk.red(`Failed to share: ${response.error || "Unknown error"}`)
546
+ chalk.red(t("commands.share.failed", { error: response.error || "Unknown error" }))
546
547
  );
547
548
  console.log();
548
549
  }
549
550
  } catch (error) {
550
551
  spinner.stop();
551
552
  console.log();
552
- console.log(chalk.red(`Failed to share: ${error.message}`));
553
+ console.log(chalk.red(t("commands.share.failed", { error: error.message })));
553
554
  console.log();
554
555
  }
555
556
  }
@@ -2,7 +2,7 @@ import {
2
2
  addToLocalWhitelist,
3
3
  loadLocalProjectSettings,
4
4
  mergePermissions
5
- } from "./chunk-OXJCLU3X.js";
5
+ } from "./chunk-WLTVF77A.js";
6
6
 
7
7
  // src/permissions/PermissionManager.ts
8
8
  var DEFAULT_SECURITY_BLACKLIST = [
@@ -24,7 +24,9 @@ var AUTOHAND_PATHS = {
24
24
  /** Skills (instruction packages) */
25
25
  skills: _path2.default.join(AUTOHAND_HOME, "skills"),
26
26
  /** Plan files for plan mode */
27
- plans: _path2.default.join(AUTOHAND_HOME, "plans")
27
+ plans: _path2.default.join(AUTOHAND_HOME, "plans"),
28
+ /** MCP community registry cache */
29
+ mcpCache: _path2.default.join(AUTOHAND_HOME, "community-mcp", "cache")
28
30
  };
29
31
  var AUTOHAND_FILES = {
30
32
  /** Main config file */
@@ -1,3 +1,7 @@
1
+ import {
2
+ t
3
+ } from "./chunk-UET7BDX2.js";
4
+
1
5
  // src/commands/undo.ts
2
6
  import chalk from "chalk";
3
7
  import { spawnSync } from "child_process";
@@ -25,12 +29,13 @@ async function undo(ctx) {
25
29
  console.log(chalk.green(" Removed untracked files"));
26
30
  }
27
31
  } else {
28
- console.log(chalk.gray(" No git changes to revert"));
32
+ console.log(chalk.gray(" " + t("commands.undo.noChanges")));
29
33
  }
30
34
  try {
31
35
  await ctx.undoFileMutation();
32
- console.log(chalk.green(" Reverted last file mutation from undo stack"));
36
+ console.log(chalk.green(" " + t("commands.undo.success", { file: "last mutation" })));
33
37
  } catch {
38
+ console.log(chalk.gray(" " + t("commands.undo.noChanges")));
34
39
  }
35
40
  ctx.removeLastTurn();
36
41
  console.log(chalk.green(" Removed last conversation turn"));