autohand-cli 0.7.7 → 0.7.9

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 (175) hide show
  1. package/dist/CommunitySkillsCache-N2RWBCY2.cjs +7 -0
  2. package/dist/{CommunitySkillsCache-Q22FUAR5.js → CommunitySkillsCache-YWDFZBKP.js} +2 -2
  3. package/dist/MemoryManager-J7APSLZ7.js +7 -0
  4. package/dist/MemoryManager-RLLYVIDY.cjs +7 -0
  5. package/dist/PermissionManager-ISI5OAJK.cjs +10 -0
  6. package/dist/{PermissionManager-HATZKTRC.js → PermissionManager-WYP5JPCQ.js} +3 -3
  7. package/dist/SessionManager-7MF76Q3Q.cjs +9 -0
  8. package/dist/{SessionManager-S5R6O3NU.js → SessionManager-SFBDIBGA.js} +2 -2
  9. package/dist/{SkillsRegistry-R5WDM6T3.js → SkillsRegistry-E437FFJV.js} +2 -2
  10. package/dist/SkillsRegistry-UTK2YT4M.cjs +8 -0
  11. package/dist/{SyncApiClient-FAOMIZAP.js → SyncApiClient-AYXYSOJM.js} +1 -1
  12. package/dist/SyncApiClient-ID3KXEMA.cjs +10 -0
  13. package/dist/agents-N2ZB4O2A.cjs +9 -0
  14. package/dist/{agents-ICAC3KD3.js → agents-ZMT7HBRT.js} +2 -2
  15. package/dist/agents-new-3EWS2NR3.cjs +11 -0
  16. package/dist/agents-new-TCGUYK5I.js +11 -0
  17. package/dist/cc-2W6M7J45.cjs +8 -0
  18. package/dist/cc-UTTLESTY.js +8 -0
  19. package/dist/{chunk-XFPITUFJ.cjs → chunk-32R47CAQ.cjs} +50 -8
  20. package/dist/{chunk-2JPUEN44.cjs → chunk-3DGR4GNN.cjs} +57 -84
  21. package/dist/{chunk-WIUGUR5T.js → chunk-3DVEGFBZ.js} +8 -8
  22. package/dist/{chunk-YWKZF2SA.js → chunk-3SDEZTZD.js} +46 -46
  23. package/dist/{chunk-KH7BCZJN.js → chunk-4BZ65NIH.js} +1 -1
  24. package/dist/{chunk-52MLYK5P.js → chunk-4YQ2OJAL.js} +1 -1
  25. package/dist/{chunk-VDZJ3W4M.cjs → chunk-5UC3VAJ2.cjs} +2 -2
  26. package/dist/{chunk-NYQVQYIF.cjs → chunk-6DSJ7XST.cjs} +16 -11
  27. package/dist/chunk-6SM6N7DJ.js +2828 -0
  28. package/dist/{chunk-MDWULS57.js → chunk-6UJMCWRY.js} +56 -33
  29. package/dist/{chunk-Q3WCMY3Z.js → chunk-7GJR65DQ.js} +2 -2
  30. package/dist/{chunk-B5N5UAMO.cjs → chunk-7WKEDH3E.cjs} +5 -5
  31. package/dist/{chunk-B4ZPNXZE.cjs → chunk-A5KU3JZW.cjs} +1 -1
  32. package/dist/{chunk-PMMSDR44.cjs → chunk-AQNY2M6Q.cjs} +3 -1
  33. package/dist/{chunk-AVL4DKQO.js → chunk-BTVNRLSE.js} +1 -1
  34. package/dist/{chunk-PU534KPO.cjs → chunk-CHVXUA3O.cjs} +4 -4
  35. package/dist/{chunk-QXAPHGEW.js → chunk-CMNQAF6C.js} +7 -2
  36. package/dist/{chunk-7TOHYAUF.cjs → chunk-CPO5KEQS.cjs} +2 -2
  37. package/dist/{chunk-PR53E47T.cjs → chunk-DRXFJR7F.cjs} +22 -30
  38. package/dist/{chunk-JBKP2CLA.cjs → chunk-FN5S5OE7.cjs} +47 -47
  39. package/dist/{chunk-SFGJQPGC.cjs → chunk-FPHU2ES6.cjs} +56 -33
  40. package/dist/{chunk-3L76MLO5.cjs → chunk-FSTLJIR5.cjs} +21 -28
  41. package/dist/chunk-HF65HHDU.cjs +83 -0
  42. package/dist/{chunk-A552JHUJ.cjs → chunk-HUA44A35.cjs} +21 -18
  43. package/dist/{chunk-B7EUETGY.cjs → chunk-HWDP4HQO.cjs} +4 -4
  44. package/dist/{chunk-OC5YDNFC.js → chunk-IYZBLUEJ.js} +35 -52
  45. package/dist/chunk-J2RUI7GJ.js +83 -0
  46. package/dist/{chunk-WH3D42BQ.js → chunk-J7VV7JAB.js} +55 -82
  47. package/dist/{chunk-VEDIYPWY.cjs → chunk-JRV4SOJU.cjs} +9 -9
  48. package/dist/{chunk-GWIAMKKF.js → chunk-K6CZ2AGI.js} +6 -3
  49. package/dist/{chunk-SYJLMBLP.cjs → chunk-KJAZ4YAR.cjs} +17 -17
  50. package/dist/{chunk-BAFJQUWR.js → chunk-KS45GREN.js} +12 -19
  51. package/dist/chunk-KXNAGJE6.cjs +589 -0
  52. package/dist/chunk-L5QWMGLV.cjs +2828 -0
  53. package/dist/{chunk-U5WIP4HS.js → chunk-LCBOOA7S.js} +47 -5
  54. package/dist/chunk-LJCSSR5V.cjs +63 -0
  55. package/dist/chunk-LKIKNRUP.js +219 -0
  56. package/dist/{chunk-WQSWU2QA.cjs → chunk-LY5VN3B3.cjs} +9 -6
  57. package/dist/{chunk-YAGD43KA.cjs → chunk-LYMZDJX5.cjs} +36 -37
  58. package/dist/{chunk-SLISYSP4.cjs → chunk-MRDZHNCF.cjs} +4 -4
  59. package/dist/chunk-NCC6ETZS.js +362 -0
  60. package/dist/chunk-NCLCL7JK.js +63 -0
  61. package/dist/chunk-NTFNUTY2.js +589 -0
  62. package/dist/{chunk-GDTZQSJ6.cjs → chunk-O3EX3SAD.cjs} +2 -2
  63. package/dist/chunk-OO7EKEJH.cjs +219 -0
  64. package/dist/{chunk-P2Z6GDEN.js → chunk-OXJCLU3X.js} +1 -1
  65. package/dist/{chunk-23JQSCTO.js → chunk-P6EGMTK4.js} +1 -1
  66. package/dist/{chunk-VPAN5H7Q.js → chunk-PFS5ZOCO.js} +30 -31
  67. package/dist/{chunk-EKY5PKQI.js → chunk-PGH3MHPP.js} +3 -1
  68. package/dist/{chunk-GR7VWN63.js → chunk-PVSYZXS7.js} +18 -26
  69. package/dist/{chunk-NI3BQXKU.js → chunk-QAJM6VG5.js} +2 -2
  70. package/dist/{chunk-OBV3UUIL.js → chunk-R5PZPF55.js} +1 -1
  71. package/dist/{chunk-MJFBVQHB.js → chunk-RDGYHJ52.js} +5 -5
  72. package/dist/{chunk-YDH2BMEN.js → chunk-RX4KPL6H.js} +1 -1
  73. package/dist/{chunk-GFJ6AETU.cjs → chunk-T7HQBZZB.cjs} +6 -6
  74. package/dist/chunk-TSV4LVHK.js +35 -0
  75. package/dist/{chunk-7VW3A7DO.cjs → chunk-TUO5SZRD.cjs} +2 -2
  76. package/dist/{chunk-C3IFF3EH.cjs → chunk-UL5T2XIY.cjs} +36 -53
  77. package/dist/chunk-ULQ6MDSJ.cjs +362 -0
  78. package/dist/{chunk-UL7YPRCU.js → chunk-UP6YRP44.js} +1 -1
  79. package/dist/{chunk-G77ZY4QG.js → chunk-VQDWNDP5.js} +1 -1
  80. package/dist/chunk-VXCMGBXY.cjs +35 -0
  81. package/dist/{chunk-JHFH3N4U.cjs → chunk-WCN5WDOI.cjs} +2 -2
  82. package/dist/{chunk-53BR4MUW.cjs → chunk-WGO4ACS7.cjs} +3 -3
  83. package/dist/{chunk-4M2GX7RH.cjs → chunk-WJICM4SK.cjs} +2 -2
  84. package/dist/{chunk-4RWTUT2Z.js → chunk-WT367RVU.js} +19 -16
  85. package/dist/{chunk-A6QBABQ7.js → chunk-XOSFZHSS.js} +2 -2
  86. package/dist/{chunk-3YEDXG6S.js → chunk-YDJA5ETO.js} +1 -1
  87. package/dist/completion-NCSTSKTL.cjs +11 -0
  88. package/dist/{completion-Y42FKDT3.js → completion-NTZERPAZ.js} +2 -1
  89. package/dist/constants-B2X7KDIH.cjs +20 -0
  90. package/dist/{constants-ZLG6M5SI.js → constants-OFIAR4E5.js} +1 -1
  91. package/dist/export-5AJNVX4O.cjs +9 -0
  92. package/dist/{export-WJ5P6E5Z.js → export-ZQHTLV4W.js} +2 -1
  93. package/dist/feedback-F7BMGSV6.cjs +12 -0
  94. package/dist/feedback-NL7CWTRY.js +12 -0
  95. package/dist/hooks-AX5VPCZ3.cjs +10 -0
  96. package/dist/hooks-V22HVLQT.js +10 -0
  97. package/dist/index.cjs +5306 -3582
  98. package/dist/index.js +3780 -2056
  99. package/dist/language-IEKARNQH.js +13 -0
  100. package/dist/language-ULQCKXAD.cjs +13 -0
  101. package/dist/localProjectPermissions-7FI3XF4K.cjs +17 -0
  102. package/dist/{localProjectPermissions-YFFAKLUZ.js → localProjectPermissions-FD5AK5FB.js} +2 -2
  103. package/dist/login-PD3DFJLM.js +15 -0
  104. package/dist/login-VHGT4YKT.cjs +15 -0
  105. package/dist/logout-2QXNFGDT.js +13 -0
  106. package/dist/logout-A4SMKEFO.cjs +13 -0
  107. package/dist/permissions-S7433NQJ.js +10 -0
  108. package/dist/permissions-YZ6WCDBL.cjs +10 -0
  109. package/dist/plan-B3CW5DXJ.cjs +10 -0
  110. package/dist/plan-JFGNRL2S.js +10 -0
  111. package/dist/resume-54ERVSFM.cjs +10 -0
  112. package/dist/resume-YJ5CVKAP.js +10 -0
  113. package/dist/search-4TEQMUPU.js +11 -0
  114. package/dist/search-QGLS4SV7.cjs +11 -0
  115. package/dist/share-2B2T3AUU.cjs +11 -0
  116. package/dist/share-SZMXZIA3.js +11 -0
  117. package/dist/skills-HVQNCTGK.cjs +12 -0
  118. package/dist/{skills-3YEEODHK.js → skills-PB4HXV4R.js} +1 -1
  119. package/dist/{skills-install-FTGOHOZ4.cjs → skills-install-7SFS24HY.cjs} +10 -9
  120. package/dist/{skills-install-KAXAQSN6.js → skills-install-UBBNXWD5.js} +4 -3
  121. package/dist/skills-new-5FSDAJWE.js +12 -0
  122. package/dist/skills-new-IOTZYE6F.cjs +12 -0
  123. package/dist/{status-7LCXYYY4.js → status-AGPSKXSW.js} +2 -2
  124. package/dist/status-WOINF556.cjs +9 -0
  125. package/dist/{sync-3B7SNBYC.js → sync-64MZDWGG.js} +3 -3
  126. package/dist/sync-F5ECJW25.cjs +39 -0
  127. package/dist/{sync-H4UHHLKU.js → sync-LYKDHRFM.js} +3 -3
  128. package/dist/sync-W5UR7BEP.cjs +14 -0
  129. package/dist/theme-CWG3ZLHB.cjs +13 -0
  130. package/dist/theme-HQKV7YAP.js +13 -0
  131. package/package.json +2 -2
  132. package/dist/CommunitySkillsCache-2BITCEAA.cjs +0 -7
  133. package/dist/MemoryManager-2ATHG7BH.js +0 -7
  134. package/dist/MemoryManager-AENCGCEW.cjs +0 -7
  135. package/dist/PermissionManager-6HZGTK2N.cjs +0 -10
  136. package/dist/SessionManager-AG4WT3DP.cjs +0 -9
  137. package/dist/SkillsRegistry-ZXU6YDRP.cjs +0 -8
  138. package/dist/SyncApiClient-UOA4VLLD.cjs +0 -10
  139. package/dist/agents-YONWPKFS.cjs +0 -9
  140. package/dist/agents-new-NV557UVG.cjs +0 -10
  141. package/dist/agents-new-QHM3CO4B.js +0 -10
  142. package/dist/chunk-3HPUOQJN.cjs +0 -23
  143. package/dist/chunk-5DN5KNXU.js +0 -81
  144. package/dist/chunk-7BYSXAKS.js +0 -23
  145. package/dist/chunk-ARVFUZOB.js +0 -736
  146. package/dist/chunk-GWXXFQ3F.cjs +0 -81
  147. package/dist/chunk-XFQS2VGT.cjs +0 -736
  148. package/dist/completion-WVFWX7XQ.cjs +0 -10
  149. package/dist/constants-G2PLP5HH.cjs +0 -20
  150. package/dist/export-BKBJ7PB2.cjs +0 -8
  151. package/dist/feedback-HZBCTSFG.js +0 -10
  152. package/dist/feedback-JBQ3UPGZ.cjs +0 -10
  153. package/dist/hooks-G4VLYMLX.cjs +0 -9
  154. package/dist/hooks-LN4A6NQL.js +0 -9
  155. package/dist/language-KODBDE5R.js +0 -12
  156. package/dist/language-SJT475NW.cjs +0 -12
  157. package/dist/localProjectPermissions-AYQYGTOE.cjs +0 -17
  158. package/dist/login-TC2KROQI.js +0 -14
  159. package/dist/login-TYMR2ZD3.cjs +0 -14
  160. package/dist/logout-2ECV365P.js +0 -12
  161. package/dist/logout-CO3CPYZJ.cjs +0 -12
  162. package/dist/permissions-5MTH22EF.js +0 -9
  163. package/dist/permissions-IP5SITPI.cjs +0 -9
  164. package/dist/resume-EPOEF3WV.cjs +0 -9
  165. package/dist/resume-LOYD5MMP.js +0 -9
  166. package/dist/share-544SIZOY.js +0 -10
  167. package/dist/share-OETK2GUF.cjs +0 -10
  168. package/dist/skills-CRM55MKM.cjs +0 -12
  169. package/dist/skills-new-JF4FKNUT.cjs +0 -11
  170. package/dist/skills-new-JYX2GBKM.js +0 -11
  171. package/dist/status-E7MZEQ26.cjs +0 -9
  172. package/dist/sync-4RARBQIH.cjs +0 -39
  173. package/dist/sync-YZ6YZ42H.cjs +0 -14
  174. package/dist/theme-3XV5BWUB.js +0 -12
  175. package/dist/theme-Z2WS5XWZ.cjs +0 -12
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadConfig,
3
3
  saveConfig
4
- } from "./chunk-GWIAMKKF.js";
4
+ } from "./chunk-K6CZ2AGI.js";
5
5
 
6
6
  // src/commands/sync.ts
7
7
  import chalk from "chalk";
@@ -85,94 +85,67 @@ function renderSyncUI(data, ctx) {
85
85
  renderTabContent(tabs[currentTab], data);
86
86
  console.log(chalk.gray("\nEsc to exit | Tab to cycle | s: sync now | e: toggle enabled"));
87
87
  };
88
- let buffer = "";
89
- const handler = async (chunk) => {
90
- buffer += typeof chunk === "string" ? chunk : chunk.toString("utf8");
91
- const processNext = async () => {
92
- if (!buffer.length) return false;
93
- const first = buffer[0];
94
- if (first === "\x1B") {
95
- if (buffer.length === 1) return false;
96
- if (buffer[1] === "[") {
97
- if (buffer.length < 3) return false;
98
- const seq = buffer.slice(0, 3);
99
- buffer = buffer.slice(3);
100
- await handleSequence(seq);
101
- return true;
102
- }
103
- buffer = buffer.slice(1);
104
- await handleSequence("\x1B");
105
- return true;
106
- }
107
- buffer = buffer.slice(1);
108
- await handleSequence(first);
109
- return true;
110
- };
111
- while (await processNext()) {
88
+ const handler = async (_str, key) => {
89
+ const char = (_str || "").toLowerCase();
90
+ if (key.name === "escape" || key.name === "c" && key.ctrl) {
91
+ cleanup();
92
+ resolve();
93
+ return;
112
94
  }
113
- };
114
- const handleSequence = async (sequence) => {
115
- switch (sequence) {
116
- case "\x1B":
117
- // ESC
118
- case "":
119
- cleanup();
120
- resolve();
121
- return;
122
- case " ":
123
- // Tab
124
- case "\x1B[C":
125
- currentTab = (currentTab + 1) % tabs.length;
126
- render();
127
- return;
128
- case "\x1B[Z":
129
- // Shift+Tab
130
- case "\x1B[D":
131
- currentTab = (currentTab - 1 + tabs.length) % tabs.length;
132
- render();
133
- return;
134
- case "s":
135
- case "S":
136
- if (data.syncService) {
137
- console.log(chalk.cyan("\nSyncing..."));
138
- try {
139
- const result = await data.syncService.sync();
140
- if (result.success) {
141
- console.log(chalk.green(`Sync complete! Uploaded: ${result.uploaded}, Downloaded: ${result.downloaded}`));
142
- } else {
143
- console.log(chalk.red(`Sync failed: ${result.error}`));
144
- }
145
- const config = await loadConfig();
146
- Object.assign(data, await gatherSyncData(ctx, config));
147
- } catch (err) {
148
- console.log(chalk.red(`Sync error: ${err}`));
149
- }
150
- await sleep(1500);
151
- render();
152
- }
153
- return;
154
- case "e":
155
- case "E":
95
+ if (key.name === "tab" && key.shift) {
96
+ currentTab = (currentTab - 1 + tabs.length) % tabs.length;
97
+ render();
98
+ return;
99
+ }
100
+ if (key.name === "tab" || key.name === "right") {
101
+ currentTab = (currentTab + 1) % tabs.length;
102
+ render();
103
+ return;
104
+ }
105
+ if (key.name === "left") {
106
+ currentTab = (currentTab - 1 + tabs.length) % tabs.length;
107
+ render();
108
+ return;
109
+ }
110
+ if (char === "s") {
111
+ if (data.syncService) {
112
+ console.log(chalk.cyan("\nSyncing..."));
156
113
  try {
114
+ const result = await data.syncService.sync();
115
+ if (result.success) {
116
+ console.log(chalk.green(`Sync complete! Uploaded: ${result.uploaded}, Downloaded: ${result.downloaded}`));
117
+ } else {
118
+ console.log(chalk.red(`Sync failed: ${result.error}`));
119
+ }
157
120
  const config = await loadConfig();
158
- const newEnabled = config.sync?.enabled === false;
159
- config.sync = { ...config.sync, enabled: newEnabled };
160
- await saveConfig(config);
161
- data.enabled = newEnabled;
162
- console.log(chalk.cyan(`
163
- Sync ${newEnabled ? "enabled" : "disabled"}`));
164
- await sleep(1e3);
165
- render();
121
+ Object.assign(data, await gatherSyncData(ctx, config));
166
122
  } catch (err) {
167
- console.log(chalk.red(`Error toggling sync: ${err}`));
123
+ console.log(chalk.red(`Sync error: ${err}`));
168
124
  }
169
- return;
170
- default:
171
- return;
125
+ await sleep(1500);
126
+ render();
127
+ }
128
+ return;
129
+ }
130
+ if (char === "e") {
131
+ try {
132
+ const config = await loadConfig();
133
+ const newEnabled = config.sync?.enabled === false;
134
+ config.sync = { ...config.sync, enabled: newEnabled };
135
+ await saveConfig(config);
136
+ data.enabled = newEnabled;
137
+ console.log(chalk.cyan(`
138
+ Sync ${newEnabled ? "enabled" : "disabled"}`));
139
+ await sleep(1e3);
140
+ render();
141
+ } catch (err) {
142
+ console.log(chalk.red(`Error toggling sync: ${err}`));
143
+ }
144
+ return;
172
145
  }
173
146
  };
174
147
  const cleanup = () => {
175
- input.off("data", handler);
148
+ input.off("keypress", handler);
176
149
  if (isTTY && !wasRaw && typeof input.setRawMode === "function") {
177
150
  input.setRawMode(false);
178
151
  }
@@ -181,7 +154,7 @@ Sync ${newEnabled ? "enabled" : "disabled"}`));
181
154
  }
182
155
  process.stdout.write("\x1B[2J\x1B[H");
183
156
  };
184
- input.on("data", handler);
157
+ input.on("keypress", handler);
185
158
  render();
186
159
  });
187
160
  }
@@ -3,10 +3,10 @@
3
3
  var _chunkJHGIWNHLcjs = require('./chunk-JHGIWNHL.cjs');
4
4
 
5
5
 
6
- var _chunk3HPUOQJNcjs = require('./chunk-3HPUOQJN.cjs');
6
+ var _chunkLJCSSR5Vcjs = require('./chunk-LJCSSR5V.cjs');
7
7
 
8
8
 
9
- var _chunkPMMSDR44cjs = require('./chunk-PMMSDR44.cjs');
9
+ var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
10
10
 
11
11
  // src/commands/skills-new.ts
12
12
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -25,7 +25,7 @@ async function createSkill(ctx) {
25
25
  console.log(_chalk2.default.red("Skills registry not available."));
26
26
  return null;
27
27
  }
28
- const answers = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, [
28
+ const answers = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, [
29
29
  {
30
30
  type: "input",
31
31
  name: "name",
@@ -65,7 +65,7 @@ async function createSkill(ctx) {
65
65
  console.log(_chalk2.default.gray("Canceled: no name provided."));
66
66
  return null;
67
67
  }
68
- const storageResult = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
68
+ const storageResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
69
69
  type: "select",
70
70
  name: "level",
71
71
  message: "Where should this skill be saved?",
@@ -81,7 +81,7 @@ async function createSkill(ctx) {
81
81
  const storageLevel = storageResult.level;
82
82
  if (skillsRegistry.hasSkill(name)) {
83
83
  console.log(_chalk2.default.yellow(`A skill named "${name}" already exists.`));
84
- const result = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
84
+ const result = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
85
85
  type: "confirm",
86
86
  name: "overwrite",
87
87
  message: "Do you want to overwrite it?",
@@ -100,7 +100,7 @@ async function createSkill(ctx) {
100
100
  console.log(_chalk2.default.gray(` Similarity: ${(match.score * 100).toFixed(0)}%`));
101
101
  }
102
102
  console.log();
103
- const result = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
103
+ const result = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
104
104
  type: "select",
105
105
  name: "proceed",
106
106
  message: "How would you like to proceed?",
@@ -150,7 +150,7 @@ Output only the raw markdown content, no code fences.`
150
150
  console.log(content.length > 800 ? content.slice(0, 800) + "\n...(truncated)" : content);
151
151
  console.log(_chalk2.default.gray("\u2500".repeat(50)));
152
152
  console.log();
153
- const confirmResult = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
153
+ const confirmResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
154
154
  type: "confirm",
155
155
  name: "confirm",
156
156
  message: "Save this skill?",
@@ -160,7 +160,7 @@ Output only the raw markdown content, no code fences.`
160
160
  console.log(_chalk2.default.gray("Canceled."));
161
161
  return null;
162
162
  }
163
- const baseDir = storageLevel === "project" ? _path2.default.join(ctx.workspaceRoot, ".autohand", "skills") : _chunkPMMSDR44cjs.AUTOHAND_PATHS.skills;
163
+ const baseDir = storageLevel === "project" ? _path2.default.join(ctx.workspaceRoot, ".autohand", "skills") : _chunkAQNY2M6Qcjs.AUTOHAND_PATHS.skills;
164
164
  const skillDir = _path2.default.join(baseDir, name);
165
165
  const skillPath = _path2.default.join(skillDir, "SKILL.md");
166
166
  try {
@@ -169,7 +169,7 @@ Output only the raw markdown content, no code fences.`
169
169
  console.log(_chalk2.default.green(`\u2713 Saved new skill to ${skillPath}`));
170
170
  const success = await skillsRegistry.saveSkill(name, content);
171
171
  if (success) {
172
- const activateResult = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
172
+ const activateResult = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
173
173
  type: "confirm",
174
174
  name: "activate",
175
175
  message: "Activate this skill now?",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AUTOHAND_FILES
3
- } from "./chunk-EKY5PKQI.js";
3
+ } from "./chunk-PGH3MHPP.js";
4
4
 
5
5
  // src/ui/theme/Theme.ts
6
6
  var Theme = class {
@@ -889,6 +889,7 @@ var DEFAULT_OLLAMA_URL = "http://localhost:11434";
889
889
  var DEFAULT_LLAMACPP_URL = "http://localhost:8080";
890
890
  var DEFAULT_OPENAI_URL = "https://api.openai.com/v1";
891
891
  var DEFAULT_MLX_URL = "http://localhost:8080";
892
+ var DEFAULT_LLMGATEWAY_URL = "https://api.llmgateway.io/v1";
892
893
  async function detectConfigPath(customPath) {
893
894
  if (customPath) {
894
895
  return path.resolve(customPath);
@@ -1045,13 +1046,14 @@ function getProviderConfig(config, provider) {
1045
1046
  ollama: config.ollama,
1046
1047
  llamacpp: config.llamacpp,
1047
1048
  openai: config.openai,
1048
- mlx: config.mlx
1049
+ mlx: config.mlx,
1050
+ llmgateway: config.llmgateway
1049
1051
  };
1050
1052
  const entry = configByProvider[chosen];
1051
1053
  if (!entry) {
1052
1054
  return null;
1053
1055
  }
1054
- if (chosen === "openrouter") {
1056
+ if (chosen === "openrouter" || chosen === "llmgateway") {
1055
1057
  const { apiKey, model } = entry;
1056
1058
  if (!apiKey || apiKey === "replace-me" || !model) {
1057
1059
  return null;
@@ -1068,6 +1070,7 @@ function getProviderConfig(config, provider) {
1068
1070
  }
1069
1071
  function defaultBaseUrlFor(provider, port) {
1070
1072
  if (provider === "openrouter") return DEFAULT_BASE_URL;
1073
+ if (provider === "llmgateway") return DEFAULT_LLMGATEWAY_URL;
1071
1074
  const p = port ? port.toString() : void 0;
1072
1075
  switch (provider) {
1073
1076
  case "ollama":
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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
3
 
4
- var _chunkXFPITUFJcjs = require('./chunk-XFPITUFJ.cjs');
4
+ var _chunk32R47CAQcjs = require('./chunk-32R47CAQ.cjs');
5
5
 
6
6
 
7
- var _chunkJHFH3N4Ucjs = require('./chunk-JHFH3N4U.cjs');
7
+ var _chunkWCN5WDOIcjs = require('./chunk-WCN5WDOI.cjs');
8
8
 
9
9
 
10
- var _chunkWQSWU2QAcjs = require('./chunk-WQSWU2QA.cjs');
10
+ var _chunkLJCSSR5Vcjs = require('./chunk-LJCSSR5V.cjs');
11
11
 
12
12
 
13
- var _chunk3HPUOQJNcjs = require('./chunk-3HPUOQJN.cjs');
13
+ var _chunkLY5VN3B3cjs = require('./chunk-LY5VN3B3.cjs');
14
14
 
15
15
 
16
- var _chunkPMMSDR44cjs = require('./chunk-PMMSDR44.cjs');
16
+ var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
17
17
 
18
18
  // src/commands/login.ts
19
19
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
@@ -53,7 +53,7 @@ function sleep(ms) {
53
53
  async function login(ctx) {
54
54
  const config = ctx.config;
55
55
  if (_optionalChain([config, 'optionalAccess', _ => _.auth, 'optionalAccess', _2 => _2.token]) && _optionalChain([config, 'optionalAccess', _3 => _3.auth, 'optionalAccess', _4 => _4.user])) {
56
- const result = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
56
+ const result = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
57
57
  type: "confirm",
58
58
  name: "continueLogin",
59
59
  message: `Already logged in as ${_chalk2.default.cyan(config.auth.user.email)}. Log in with a different account?`,
@@ -64,7 +64,7 @@ async function login(ctx) {
64
64
  return null;
65
65
  }
66
66
  }
67
- const authClient = _chunkJHFH3N4Ucjs.getAuthClient.call(void 0, );
67
+ const authClient = _chunkWCN5WDOIcjs.getAuthClient.call(void 0, );
68
68
  console.log(_chalk2.default.gray("Initiating authentication..."));
69
69
  const initResult = await authClient.initiateDeviceAuth();
70
70
  if (!initResult.success || !initResult.deviceCode || !initResult.userCode) {
@@ -73,13 +73,13 @@ async function login(ctx) {
73
73
  }
74
74
  console.log();
75
75
  console.log(_chalk2.default.bold("To sign in, visit:"));
76
- console.log(_chalk2.default.cyan.underline(initResult.verificationUriComplete || `${_chunkPMMSDR44cjs.AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`));
76
+ console.log(_chalk2.default.cyan.underline(initResult.verificationUriComplete || `${_chunkAQNY2M6Qcjs.AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`));
77
77
  console.log();
78
78
  console.log(_chalk2.default.gray("Or enter this code manually:"));
79
79
  console.log(_chalk2.default.bold.yellow(` ${initResult.userCode}`));
80
80
  console.log();
81
81
  const browserOpened = await openBrowser(
82
- initResult.verificationUriComplete || `${_chunkPMMSDR44cjs.AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`
82
+ initResult.verificationUriComplete || `${_chunkAQNY2M6Qcjs.AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`
83
83
  );
84
84
  if (browserOpened) {
85
85
  console.log(_chalk2.default.gray("Browser opened. Complete the login in your browser."));
@@ -90,8 +90,8 @@ async function login(ctx) {
90
90
  console.log(_chalk2.default.gray("Waiting for authorization..."));
91
91
  console.log(_chalk2.default.gray("(Press Ctrl+C to cancel)"));
92
92
  const startTime = Date.now();
93
- const timeout = _chunkPMMSDR44cjs.AUTH_CONFIG.authTimeout;
94
- const pollInterval = initResult.interval ? initResult.interval * 1e3 : _chunkPMMSDR44cjs.AUTH_CONFIG.pollInterval;
93
+ const timeout = _chunkAQNY2M6Qcjs.AUTH_CONFIG.authTimeout;
94
+ const pollInterval = initResult.interval ? initResult.interval * 1e3 : _chunkAQNY2M6Qcjs.AUTH_CONFIG.pollInterval;
95
95
  let dots = 0;
96
96
  const maxDots = 3;
97
97
  while (Date.now() - startTime < timeout) {
@@ -101,7 +101,7 @@ async function login(ctx) {
101
101
  const pollResult = await authClient.pollDeviceAuth(initResult.deviceCode);
102
102
  if (pollResult.status === "authorized" && pollResult.token && pollResult.user) {
103
103
  process.stdout.write("\r" + " ".repeat(20) + "\r");
104
- const expiresAt = new Date(Date.now() + _chunkPMMSDR44cjs.AUTH_CONFIG.sessionExpiryDays * 24 * 60 * 60 * 1e3).toISOString();
104
+ const expiresAt = new Date(Date.now() + _chunkAQNY2M6Qcjs.AUTH_CONFIG.sessionExpiryDays * 24 * 60 * 60 * 1e3).toISOString();
105
105
  const updatedConfig = {
106
106
  ...config,
107
107
  auth: {
@@ -110,7 +110,7 @@ async function login(ctx) {
110
110
  expiresAt
111
111
  }
112
112
  };
113
- await _chunkWQSWU2QAcjs.saveConfig.call(void 0, updatedConfig);
113
+ await _chunkLY5VN3B3cjs.saveConfig.call(void 0, updatedConfig);
114
114
  console.log();
115
115
  console.log(_chalk2.default.green("Login successful!"));
116
116
  console.log(_chalk2.default.cyan(`Welcome, ${pollResult.user.name || pollResult.user.email}!`));
@@ -130,16 +130,16 @@ async function login(ctx) {
130
130
  }
131
131
  async function checkAndRestoreSyncData(token, userId, config) {
132
132
  try {
133
- const syncService = _chunkXFPITUFJcjs.createSyncService.call(void 0, {
133
+ const syncService = _chunk32R47CAQcjs.createSyncService.call(void 0, {
134
134
  authToken: token,
135
135
  userId,
136
136
  config: {
137
- ..._chunkXFPITUFJcjs.DEFAULT_SYNC_CONFIG,
137
+ ..._chunk32R47CAQcjs.DEFAULT_SYNC_CONFIG,
138
138
  ...config.sync,
139
139
  enabled: true
140
140
  }
141
141
  });
142
- const { getSyncApiClient } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SyncApiClient-UOA4VLLD.cjs")));
142
+ const { getSyncApiClient } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SyncApiClient-ID3KXEMA.cjs")));
143
143
  const apiClient = getSyncApiClient();
144
144
  const remoteManifest = await apiClient.getRemoteManifest(token);
145
145
  if (!remoteManifest || remoteManifest.files.length === 0) {
@@ -151,7 +151,7 @@ async function checkAndRestoreSyncData(token, userId, config) {
151
151
  console.log(_chalk2.default.cyan(`Found cloud sync data (${fileCount} files, ${sizeStr})`));
152
152
  console.log(_chalk2.default.gray("This includes your settings, agents, skills, and memory."));
153
153
  console.log();
154
- const result = await _chunk3HPUOQJNcjs.safePrompt.call(void 0, {
154
+ const result = await _chunkLJCSSR5Vcjs.safePrompt.call(void 0, {
155
155
  type: "confirm",
156
156
  name: "restore",
157
157
  message: "Would you like to restore your settings from the cloud?",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  safePrompt
3
- } from "./chunk-7BYSXAKS.js";
3
+ } from "./chunk-NCLCL7JK.js";
4
4
 
5
5
  // src/commands/hooks.ts
6
6
  import chalk from "chalk";
@@ -231,28 +231,21 @@ async function toggleHooksMulti(manager, allHooks) {
231
231
  };
232
232
  });
233
233
  const result = await safePrompt({
234
- type: "multiselect",
234
+ type: "select",
235
235
  name: "selected",
236
- message: "Toggle hooks (space to select, enter to confirm)",
236
+ message: "Toggle hooks (select to enable/disable)",
237
237
  choices,
238
- initial: choices.filter((c) => c.enabled).map((c) => c.name)
238
+ initial: 0
239
239
  });
240
240
  if (!result) return;
241
- const selectedSet = new Set(result.selected);
242
- let changed = 0;
243
- for (let i = 0; i < allHooks.length; i++) {
244
- const hook = allHooks[i];
245
- const shouldBeEnabled = selectedSet.has(String(i));
246
- const currentlyEnabled = hook.enabled !== false;
247
- if (shouldBeEnabled !== currentlyEnabled) {
248
- const eventHooks = allHooks.filter((h) => h.event === hook.event);
249
- const eventIndex = eventHooks.indexOf(hook);
250
- await manager.toggleHook(hook.event, eventIndex);
251
- changed++;
252
- }
253
- }
254
- if (changed > 0) {
255
- console.log(chalk.green(` \u2713 Updated ${changed} hook(s)`));
241
+ const selectedIndex = Number(result.selected);
242
+ const hook = allHooks[selectedIndex];
243
+ if (hook) {
244
+ const eventHooks = allHooks.filter((h) => h.event === hook.event);
245
+ const eventIndex = eventHooks.indexOf(hook);
246
+ await manager.toggleHook(hook.event, eventIndex);
247
+ const newState = hook.enabled === false ? "enabled" : "disabled";
248
+ console.log(chalk.green(` \u2713 Hook ${newState}: ${hook.event}`));
256
249
  } else {
257
250
  console.log(chalk.gray(" No changes made"));
258
251
  }