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,12 @@
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; }// src/commands/export.ts
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
+
3
+
4
+
5
+ var _chunkL5QWMGLVcjs = require('./chunk-L5QWMGLV.cjs');
6
+
7
+ // src/commands/export.ts
2
8
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
3
9
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
4
- var _enquirer = require('enquirer'); var _enquirer2 = _interopRequireDefault(_enquirer);
5
10
 
6
11
  // src/session/exportSession.ts
7
12
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
@@ -253,22 +258,19 @@ async function execute(args, context) {
253
258
  console.log(_chalk2.default.yellow("No sessions found to export."));
254
259
  return;
255
260
  }
256
- const { Select: Select2 } = _enquirer2.default;
257
- const sessionPrompt = new Select2({
258
- name: "session",
259
- message: "Select a session to export:",
260
- choices: sessions.slice(0, 10).map((s) => ({
261
- name: s.sessionId,
262
- message: `${s.projectName} - ${new Date(s.createdAt).toLocaleString()} (${s.messageCount} messages)`
263
- }))
261
+ const sessionOptions = sessions.slice(0, 10).map((s) => ({
262
+ label: `${s.projectName} - ${new Date(s.createdAt).toLocaleString()} (${s.messageCount} messages)`,
263
+ value: s.sessionId
264
+ }));
265
+ const sessionResult = await _chunkL5QWMGLVcjs.showModal.call(void 0, {
266
+ title: "Select a session to export:",
267
+ options: sessionOptions
264
268
  });
265
- try {
266
- const selectedId = await sessionPrompt.run();
267
- session = await sessionManager.loadSession(selectedId);
268
- } catch (e) {
269
+ if (!sessionResult) {
269
270
  console.log(_chalk2.default.gray("Cancelled."));
270
271
  return;
271
272
  }
273
+ session = await sessionManager.loadSession(sessionResult.value);
272
274
  }
273
275
  const metadata2 = session.metadata;
274
276
  const messages = session.getMessages();
@@ -276,56 +278,37 @@ async function execute(args, context) {
276
278
  console.log(_chalk2.default.yellow("No messages in session to export."));
277
279
  return;
278
280
  }
279
- const { Select, Confirm, Input } = _enquirer2.default;
280
- const formatPrompt = new Select({
281
- name: "format",
282
- message: "Export format:",
283
- choices: [
284
- { name: "md", message: "Markdown (.md)" },
285
- { name: "json", message: "JSON (.json)" },
286
- { name: "html", message: "HTML (.html)" }
287
- ]
281
+ const formatOptions = [
282
+ { label: "Markdown (.md)", value: "md" },
283
+ { label: "JSON (.json)", value: "json" },
284
+ { label: "HTML (.html)", value: "html" }
285
+ ];
286
+ const formatResult = await _chunkL5QWMGLVcjs.showModal.call(void 0, {
287
+ title: "Export format:",
288
+ options: formatOptions
288
289
  });
289
- let format;
290
- try {
291
- format = await formatPrompt.run();
292
- } catch (e2) {
290
+ if (!formatResult) {
293
291
  console.log(_chalk2.default.gray("Cancelled."));
294
292
  return;
295
293
  }
294
+ const format = formatResult.value;
296
295
  const options = {};
297
296
  if (format === "md" || format === "html") {
298
- const includeToolsPrompt = new Confirm({
299
- name: "includeTools",
300
- message: "Include tool outputs?",
301
- initial: true
297
+ options.includeToolOutputs = await _chunkL5QWMGLVcjs.showConfirm.call(void 0, {
298
+ title: "Include tool outputs?",
299
+ defaultValue: true
302
300
  });
303
- try {
304
- options.includeToolOutputs = await includeToolsPrompt.run();
305
- } catch (e3) {
306
- options.includeToolOutputs = true;
307
- }
308
- const includeTocPrompt = new Confirm({
309
- name: "includeToc",
310
- message: "Include table of contents?",
311
- initial: false
301
+ options.includeToc = await _chunkL5QWMGLVcjs.showConfirm.call(void 0, {
302
+ title: "Include table of contents?",
303
+ defaultValue: false
312
304
  });
313
- try {
314
- options.includeToc = await includeTocPrompt.run();
315
- } catch (e4) {
316
- options.includeToc = false;
317
- }
318
305
  }
319
306
  const suggestedFilename = getSuggestedFilename(metadata2, format);
320
- const filenamePrompt = new Input({
321
- name: "filename",
322
- message: "Save as:",
323
- initial: suggestedFilename
307
+ const filename = await _chunkL5QWMGLVcjs.showInput.call(void 0, {
308
+ title: "Save as:",
309
+ defaultValue: suggestedFilename
324
310
  });
325
- let filename;
326
- try {
327
- filename = await filenamePrompt.run();
328
- } catch (e5) {
311
+ if (!filename) {
329
312
  console.log(_chalk2.default.gray("Cancelled."));
330
313
  return;
331
314
  }
@@ -0,0 +1,362 @@
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; }// src/commands/plan.ts
2
+ var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
3
+
4
+ // src/modes/planMode/PlanModeManager.ts
5
+ var _events = require('events');
6
+ var READ_ONLY_TOOLS = [
7
+ // File reading
8
+ "read_file",
9
+ "search",
10
+ "search_with_context",
11
+ "semantic_search",
12
+ "list_tree",
13
+ "file_stats",
14
+ "checksum",
15
+ // Git read operations
16
+ "git_status",
17
+ "git_diff",
18
+ "git_diff_range",
19
+ "git_log",
20
+ "git_branch",
21
+ "git_stash_list",
22
+ "git_worktree_list",
23
+ "git_worktree_status_all",
24
+ // Web/Research
25
+ "web_search",
26
+ "fetch_url",
27
+ "package_info",
28
+ "web_repo",
29
+ // Memory
30
+ "recall_memory",
31
+ // Meta
32
+ "tools_registry",
33
+ "plan",
34
+ "ask_followup_question"
35
+ ];
36
+ var PlanModeManager = class extends _events.EventEmitter {
37
+ constructor() {
38
+ super();
39
+ this.state = {
40
+ enabled: false,
41
+ phase: "planning",
42
+ plan: null,
43
+ startedAt: 0
44
+ };
45
+ }
46
+ /**
47
+ * Check if plan mode is enabled
48
+ */
49
+ isEnabled() {
50
+ return this.state.enabled;
51
+ }
52
+ /**
53
+ * Get current phase
54
+ */
55
+ getPhase() {
56
+ return this.state.phase;
57
+ }
58
+ /**
59
+ * Get current plan
60
+ */
61
+ getPlan() {
62
+ return this.state.plan;
63
+ }
64
+ /**
65
+ * Enable plan mode
66
+ */
67
+ enable() {
68
+ if (this.state.enabled) return;
69
+ this.state.enabled = true;
70
+ this.state.phase = "planning";
71
+ this.state.startedAt = Date.now();
72
+ this.emit("enabled");
73
+ }
74
+ /**
75
+ * Disable plan mode
76
+ */
77
+ disable() {
78
+ if (!this.state.enabled) return;
79
+ this.state.enabled = false;
80
+ this.emit("disabled");
81
+ }
82
+ /**
83
+ * Toggle plan mode on/off
84
+ */
85
+ toggle() {
86
+ if (this.state.enabled) {
87
+ this.disable();
88
+ } else {
89
+ this.enable();
90
+ }
91
+ }
92
+ /**
93
+ * Handle Shift+Tab keypress - simple toggle on/off
94
+ */
95
+ handleShiftTab() {
96
+ this.toggle();
97
+ }
98
+ /**
99
+ * Get prompt indicator based on current state
100
+ */
101
+ getPromptIndicator() {
102
+ if (!this.state.enabled) {
103
+ return "";
104
+ }
105
+ if (this.state.phase === "executing") {
106
+ return "[EXEC]";
107
+ }
108
+ return "[PLAN]";
109
+ }
110
+ /**
111
+ * Get i18n key for status description based on current phase
112
+ */
113
+ getStatusDescriptionKey() {
114
+ if (!this.state.enabled) {
115
+ return "";
116
+ }
117
+ if (this.state.phase === "executing") {
118
+ return "ui.planModeExecuting";
119
+ }
120
+ return "ui.planModeActive";
121
+ }
122
+ /**
123
+ * Set the current plan
124
+ */
125
+ setPlan(plan2) {
126
+ this.state.plan = plan2;
127
+ this.emit("plan:set", plan2);
128
+ }
129
+ /**
130
+ * Start plan execution
131
+ * Transitions from planning to executing phase
132
+ */
133
+ startExecution() {
134
+ if (!this.state.plan) {
135
+ throw new Error("No plan to execute");
136
+ }
137
+ this.state.phase = "executing";
138
+ this.state.executionStartedAt = Date.now();
139
+ this.emit("execution:started", this.state.plan);
140
+ }
141
+ /**
142
+ * Get list of read-only tools allowed in plan mode
143
+ */
144
+ getReadOnlyTools() {
145
+ return [...READ_ONLY_TOOLS];
146
+ }
147
+ /**
148
+ * Get current state (for persistence/debugging)
149
+ */
150
+ getState() {
151
+ return { ...this.state };
152
+ }
153
+ /**
154
+ * Restore state from persistence
155
+ */
156
+ restore(state) {
157
+ this.state = {
158
+ ...this.state,
159
+ ...state
160
+ };
161
+ if (this.state.enabled) {
162
+ this.emit("restored", this.state);
163
+ }
164
+ }
165
+ /**
166
+ * Accept the plan with specified option
167
+ * This starts execution with the given configuration
168
+ *
169
+ * Options:
170
+ * - clear_context_auto_accept: Clear context and auto-accept edits (best for plan adherence)
171
+ * - manual_approve: Manually approve each edit
172
+ * - auto_accept: Auto-accept edits without clearing context
173
+ */
174
+ acceptPlan(option) {
175
+ if (!this.state.plan) {
176
+ throw new Error("No plan to accept");
177
+ }
178
+ const config = {
179
+ option,
180
+ clearContext: option === "clear_context_auto_accept",
181
+ autoAcceptEdits: option !== "manual_approve"
182
+ };
183
+ this.state.phase = "executing";
184
+ this.state.executionStartedAt = Date.now();
185
+ this.emit("plan:accepted", config);
186
+ this.emit("execution:started", this.state.plan);
187
+ return config;
188
+ }
189
+ /**
190
+ * Get available plan acceptance options for UI display
191
+ */
192
+ getAcceptOptions() {
193
+ return [
194
+ {
195
+ id: "clear_context_auto_accept",
196
+ label: "Yes, clear context and auto-accept edits",
197
+ description: "Clears context for fresh start, improves plan adherence. Auto-accepts all edits.",
198
+ shortcut: "shift+tab"
199
+ },
200
+ {
201
+ id: "manual_approve",
202
+ label: "Yes, and manually approve edits",
203
+ description: "Keep context, review and approve each edit individually."
204
+ },
205
+ {
206
+ id: "auto_accept",
207
+ label: "Yes, auto-accept edits",
208
+ description: "Keep context, auto-accept all edits without review."
209
+ }
210
+ ];
211
+ }
212
+ };
213
+
214
+ // src/commands/plan.ts
215
+ var metadata = {
216
+ command: "/plan",
217
+ description: "toggle plan mode for safe code exploration",
218
+ implemented: true
219
+ };
220
+ var planModeManager = null;
221
+ function getPlanModeManager() {
222
+ if (!planModeManager) {
223
+ planModeManager = new PlanModeManager();
224
+ }
225
+ return planModeManager;
226
+ }
227
+ async function plan(_ctx, args) {
228
+ const manager = getPlanModeManager();
229
+ const subcommand = _optionalChain([args, 'optionalAccess', _ => _.trim, 'call', _2 => _2(), 'access', _3 => _3.toLowerCase, 'call', _4 => _4()]);
230
+ switch (subcommand) {
231
+ case "on":
232
+ case "enable":
233
+ if (manager.isEnabled()) {
234
+ console.log(_chalk2.default.yellow("Plan mode is already enabled."));
235
+ return null;
236
+ }
237
+ manager.enable();
238
+ console.log(_chalk2.default.green("Plan mode enabled."));
239
+ console.log(_chalk2.default.gray("Tools are now read-only. Use /plan off to disable."));
240
+ console.log(_chalk2.default.gray("Tip: Press Shift+Tab twice to quickly toggle plan mode."));
241
+ return null;
242
+ case "off":
243
+ case "disable":
244
+ if (!manager.isEnabled()) {
245
+ console.log(_chalk2.default.yellow("Plan mode is not enabled."));
246
+ return null;
247
+ }
248
+ manager.disable();
249
+ console.log(_chalk2.default.green("Plan mode disabled."));
250
+ console.log(_chalk2.default.gray("Full tool access restored."));
251
+ return null;
252
+ case "status":
253
+ return showPlanStatus(manager);
254
+ case "":
255
+ case void 0:
256
+ if (manager.isEnabled()) {
257
+ manager.disable();
258
+ console.log(_chalk2.default.green("Plan mode disabled."));
259
+ console.log(_chalk2.default.gray("Full tool access restored."));
260
+ } else {
261
+ manager.enable();
262
+ console.log(_chalk2.default.green("Plan mode enabled."));
263
+ console.log(_chalk2.default.gray("Tools are now read-only."));
264
+ }
265
+ return null;
266
+ default:
267
+ console.log(_chalk2.default.yellow(`Unknown subcommand: ${subcommand}`));
268
+ console.log(_chalk2.default.gray(`
269
+ Usage:
270
+ /plan - Toggle plan mode
271
+ /plan on - Enable plan mode
272
+ /plan off - Disable plan mode
273
+ /plan status - Show current plan state
274
+
275
+ Keyboard shortcut:
276
+ Shift+Tab (twice) - Enter plan mode
277
+ Shift+Tab (once) - Exit plan mode (when in plan mode)
278
+ `));
279
+ return null;
280
+ }
281
+ }
282
+ function showPlanStatus(manager) {
283
+ const enabled = manager.isEnabled();
284
+ const phase = manager.getPhase();
285
+ const plan2 = manager.getPlan();
286
+ const indicator = manager.getPromptIndicator();
287
+ console.log("");
288
+ console.log(_chalk2.default.bold.cyan("Plan Mode Status"));
289
+ console.log(_chalk2.default.gray("\u2500".repeat(40)));
290
+ console.log(`Status: ${enabled ? _chalk2.default.green("ENABLED") : _chalk2.default.gray("DISABLED")}`);
291
+ console.log(`Phase: ${_chalk2.default.cyan(phase)}`);
292
+ console.log(`Indicator: ${indicator || _chalk2.default.gray("(none)")}`);
293
+ if (plan2) {
294
+ const completed = plan2.steps.filter((s) => s.status === "completed").length;
295
+ const inProgress = plan2.steps.find((s) => s.status === "in_progress");
296
+ console.log("");
297
+ console.log(_chalk2.default.bold(`Plan: ${plan2.id}`));
298
+ console.log(`Progress: ${completed}/${plan2.steps.length} steps`);
299
+ console.log("");
300
+ for (const step of plan2.steps) {
301
+ const icon = getStepIcon(step.status);
302
+ const color = getStepColor(step.status);
303
+ console.log(color(` ${icon} ${step.number}. ${step.description}`));
304
+ }
305
+ if (inProgress) {
306
+ console.log("");
307
+ console.log(_chalk2.default.yellow(`Currently working on: Step ${inProgress.number}`));
308
+ }
309
+ } else {
310
+ console.log("");
311
+ console.log(_chalk2.default.gray("No plan created yet."));
312
+ console.log(_chalk2.default.gray("Ask the agent to create a plan for your task."));
313
+ }
314
+ console.log("");
315
+ return null;
316
+ }
317
+ function getStepIcon(status) {
318
+ switch (status) {
319
+ case "completed":
320
+ return "\u2713";
321
+ case "in_progress":
322
+ return "\u2192";
323
+ case "skipped":
324
+ return "\u2298";
325
+ default:
326
+ return "\u25CB";
327
+ }
328
+ }
329
+ function getStepColor(status) {
330
+ switch (status) {
331
+ case "completed":
332
+ return _chalk2.default.green;
333
+ case "in_progress":
334
+ return _chalk2.default.yellow;
335
+ case "skipped":
336
+ return _chalk2.default.gray;
337
+ default:
338
+ return _chalk2.default.white;
339
+ }
340
+ }
341
+
342
+
343
+
344
+
345
+
346
+ exports.metadata = metadata; exports.getPlanModeManager = getPlanModeManager; exports.plan = plan;
347
+ /**
348
+ * @license
349
+ * Copyright 2025 Autohand AI LLC
350
+ * SPDX-License-Identifier: Apache-2.0
351
+ *
352
+ * Plan Mode Manager
353
+ * Central coordinator for plan mode state and operations
354
+ */
355
+ /**
356
+ * @license
357
+ * Copyright 2025 Autohand AI LLC
358
+ * SPDX-License-Identifier: Apache-2.0
359
+ *
360
+ * Plan Mode Command
361
+ * Toggle plan mode for safe code exploration before execution
362
+ */
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AUTOHAND_PATHS
3
- } from "./chunk-EKY5PKQI.js";
3
+ } from "./chunk-PGH3MHPP.js";
4
4
 
5
5
  // src/commands/agents.ts
6
6
  import chalk from "chalk";
@@ -2,7 +2,7 @@ import {
2
2
  addToLocalWhitelist,
3
3
  loadLocalProjectSettings,
4
4
  mergePermissions
5
- } from "./chunk-P2Z6GDEN.js";
5
+ } from "./chunk-OXJCLU3X.js";
6
6
 
7
7
  // src/permissions/PermissionManager.ts
8
8
  var DEFAULT_SECURITY_BLACKLIST = [
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/commands/cc.ts
2
+ var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
3
+ async function cc(ctx) {
4
+ if (!ctx.toggleContextCompaction || !ctx.isContextCompactionEnabled) {
5
+ console.log(_chalk2.default.yellow("Context compaction is not available in this mode."));
6
+ return null;
7
+ }
8
+ ctx.toggleContextCompaction();
9
+ const enabled = ctx.isContextCompactionEnabled();
10
+ const status = enabled ? "enabled" : "disabled";
11
+ const color = enabled ? _chalk2.default.green : _chalk2.default.yellow;
12
+ console.log(color(`Context compaction ${status}`));
13
+ if (!enabled) {
14
+ console.log(_chalk2.default.gray(' Note: Without compaction, you may see "context too long" errors.'));
15
+ console.log(_chalk2.default.gray(" Use /cc again to re-enable auto-compaction."));
16
+ } else {
17
+ console.log(_chalk2.default.gray(" Auto-compacting context at 70%/80%/90% thresholds."));
18
+ }
19
+ return null;
20
+ }
21
+ var metadata = {
22
+ command: "/cc",
23
+ description: "toggle context compaction on/off",
24
+ implemented: true
25
+ };
26
+
27
+
28
+
29
+
30
+ exports.cc = cc; exports.metadata = metadata;
31
+ /**
32
+ * @license
33
+ * Copyright 2025 Autohand AI LLC
34
+ * SPDX-License-Identifier: Apache-2.0
35
+ */
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPMMSDR44cjs = require('./chunk-PMMSDR44.cjs');
3
+ var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
4
4
 
5
5
  // src/auth/AuthClient.ts
6
6
  var DEFAULT_TIMEOUT = 1e4;
7
7
  var AuthClient = class {
8
8
  constructor(config = {}) {
9
- this.baseUrl = config.baseUrl || _chunkPMMSDR44cjs.AUTH_CONFIG.apiBaseUrl;
9
+ this.baseUrl = config.baseUrl || _chunkAQNY2M6Qcjs.AUTH_CONFIG.apiBaseUrl;
10
10
  this.timeout = config.timeout || DEFAULT_TIMEOUT;
11
11
  }
12
12
  /**
@@ -3,7 +3,7 @@
3
3
  var _chunkJHGIWNHLcjs = require('./chunk-JHGIWNHL.cjs');
4
4
 
5
5
 
6
- var _chunkPMMSDR44cjs = require('./chunk-PMMSDR44.cjs');
6
+ var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
7
7
 
8
8
  // src/skills/SkillsRegistry.ts
9
9
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
@@ -232,7 +232,7 @@ var SkillsRegistry = class {
232
232
  this.workspaceRoot = workspaceRoot;
233
233
  const claudeProjectSkillsDir = _path2.default.join(workspaceRoot, ".claude", "skills");
234
234
  await this.loadFromDirectory(claudeProjectSkillsDir, "claude-project", false);
235
- const autohandProjectSkillsDir = _path2.default.join(workspaceRoot, _chunkPMMSDR44cjs.PROJECT_DIR_NAME, "skills");
235
+ const autohandProjectSkillsDir = _path2.default.join(workspaceRoot, _chunkAQNY2M6Qcjs.PROJECT_DIR_NAME, "skills");
236
236
  await this.loadFromDirectory(autohandProjectSkillsDir, "autohand-project", true);
237
237
  }
238
238
  /**
@@ -291,7 +291,7 @@ var SkillsRegistry = class {
291
291
  async setWorkspaceWithAutoCopy(workspaceRoot) {
292
292
  this.workspaceRoot = workspaceRoot;
293
293
  const claudeProjectSkillsDir = _path2.default.join(workspaceRoot, ".claude", "skills");
294
- const autohandProjectSkillsDir = _path2.default.join(workspaceRoot, _chunkPMMSDR44cjs.PROJECT_DIR_NAME, "skills");
294
+ const autohandProjectSkillsDir = _path2.default.join(workspaceRoot, _chunkAQNY2M6Qcjs.PROJECT_DIR_NAME, "skills");
295
295
  await this.addLocationWithAutoCopy(
296
296
  claudeProjectSkillsDir,
297
297
  "claude-project",
@@ -1,6 +1,6 @@
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 _chunkPMMSDR44cjs = require('./chunk-PMMSDR44.cjs');
3
+ var _chunkAQNY2M6Qcjs = require('./chunk-AQNY2M6Q.cjs');
4
4
 
5
5
  // src/commands/agents.ts
6
6
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
@@ -20,7 +20,7 @@ var AgentRegistry = class _AgentRegistry {
20
20
  constructor() {
21
21
  this.agents = /* @__PURE__ */ new Map();
22
22
  this.externalPaths = [];
23
- this.agentsDir = _chunkPMMSDR44cjs.AUTOHAND_PATHS.agents;
23
+ this.agentsDir = _chunkAQNY2M6Qcjs.AUTOHAND_PATHS.agents;
24
24
  }
25
25
  static getInstance() {
26
26
  if (!_AgentRegistry.instance) {
@@ -1,10 +1,12 @@
1
+ import {
2
+ showModal
3
+ } from "./chunk-6SM6N7DJ.js";
1
4
  import {
2
5
  AUTOHAND_PATHS
3
- } from "./chunk-EKY5PKQI.js";
6
+ } from "./chunk-PGH3MHPP.js";
4
7
 
5
8
  // src/commands/resume.ts
6
9
  import chalk from "chalk";
7
- import enquirer from "enquirer";
8
10
  import fs from "fs-extra";
9
11
  import path from "path";
10
12
  var metadata = {
@@ -84,24 +86,25 @@ async function resume(ctx) {
84
86
  hint: "Use /sessions to see all"
85
87
  });
86
88
  }
87
- const { selected } = await enquirer.prompt([
88
- {
89
- type: "select",
90
- name: "selected",
91
- message: "Choose a session",
92
- choices
93
- }
94
- ]);
95
- if (selected === "__more__") {
96
- console.log(chalk.gray("\nUse /sessions to see all sessions, then /resume <id>"));
89
+ const options = choices.map((choice) => ({
90
+ label: choice.message,
91
+ value: choice.name,
92
+ description: choice.hint
93
+ }));
94
+ const result = await showModal({
95
+ title: "Choose a session",
96
+ options
97
+ });
98
+ if (!result) {
99
+ console.log(chalk.gray("\nResume cancelled."));
97
100
  return null;
98
101
  }
99
- return resumeSession(ctx.sessionManager, selected);
100
- } catch (error) {
101
- if (error.name === "ExitPromptError" || error.message?.includes("canceled")) {
102
- console.log(chalk.gray("\nResume cancelled."));
102
+ if (result.value === "__more__") {
103
+ console.log(chalk.gray("\nUse /sessions to see all sessions, then /resume <id>"));
103
104
  return null;
104
105
  }
106
+ return resumeSession(ctx.sessionManager, result.value);
107
+ } catch (error) {
105
108
  console.error(chalk.red(`Failed to list sessions: ${error.message}`));
106
109
  return null;
107
110
  }
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-QHPFA6OE.js";
4
4
  import {
5
5
  safePrompt
6
- } from "./chunk-7BYSXAKS.js";
6
+ } from "./chunk-NCLCL7JK.js";
7
7
  import {
8
8
  AUTOHAND_PATHS
9
- } from "./chunk-EKY5PKQI.js";
9
+ } from "./chunk-PGH3MHPP.js";
10
10
 
11
11
  // src/commands/skills-new.ts
12
12
  import path from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AUTOHAND_HOME
3
- } from "./chunk-EKY5PKQI.js";
3
+ } from "./chunk-PGH3MHPP.js";
4
4
 
5
5
  // src/skills/CommunitySkillsCache.ts
6
6
  import fs from "fs-extra";