autohand-cli 0.7.9 → 0.7.11
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.
- package/README.md +19 -0
- package/dist/{AutomodeManager-YVCJXOMQ.js → AutomodeManager-NGRAO2MH.js} +35 -8
- package/dist/{AutomodeManager-HV6M7EAX.cjs → AutomodeManager-ZKQMBM4T.cjs} +35 -8
- package/dist/{CommunitySkillsCache-YWDFZBKP.js → CommunitySkillsCache-ILWHWE5P.js} +2 -2
- package/dist/CommunitySkillsCache-KHC6RUJW.cjs +7 -0
- package/dist/MemoryManager-6ZT7IDO5.cjs +7 -0
- package/dist/MemoryManager-AJGS5AKB.js +7 -0
- package/dist/PermissionManager-HG6W2DGU.cjs +10 -0
- package/dist/{PermissionManager-WYP5JPCQ.js → PermissionManager-U5OMGR3L.js} +3 -3
- package/dist/SessionManager-BJ2G6VV4.cjs +9 -0
- package/dist/{SessionManager-SFBDIBGA.js → SessionManager-ENPGYK5J.js} +2 -2
- package/dist/SkillsRegistry-6ZFOCT25.cjs +8 -0
- package/dist/{SkillsRegistry-E437FFJV.js → SkillsRegistry-C2SHOZ5D.js} +2 -2
- package/dist/about-225R5LMN.cjs +11 -0
- package/dist/about-BCPUOQVH.js +11 -0
- package/dist/add-dir-3BMVJ5H3.cjs +9 -0
- package/dist/{add-dir-PNU7AGKO.js → add-dir-RP2BL3JW.js} +2 -1
- package/dist/agents-JQ2PHCQB.js +10 -0
- package/dist/agents-RGSZ2BM3.cjs +10 -0
- package/dist/agents-new-LSJN2L2T.cjs +13 -0
- package/dist/agents-new-MZUEVKSK.js +13 -0
- package/dist/automode-DP3BMYJB.cjs +9 -0
- package/dist/{automode-QCRJSBRT.js → automode-XOF3U3OB.js} +2 -1
- package/dist/{chunk-A5KU3JZW.cjs → chunk-34OGUMRO.cjs} +9 -5
- package/dist/{chunk-NTFNUTY2.js → chunk-3652ROFD.js} +2 -2
- package/dist/{chunk-KNLBEUAV.cjs → chunk-3DQSBW4B.cjs} +10 -6
- package/dist/{chunk-32R47CAQ.cjs → chunk-3S4DEIJP.cjs} +2 -2
- package/dist/chunk-46WX5IO2.cjs +499 -0
- package/dist/{chunk-IYZBLUEJ.js → chunk-4ULBAYME.js} +8 -6
- package/dist/{chunk-5UC3VAJ2.cjs → chunk-4XHHW7QX.cjs} +9 -8
- package/dist/{chunk-JRV4SOJU.cjs → chunk-5BQ57AZC.cjs} +9 -9
- package/dist/{chunk-7WKEDH3E.cjs → chunk-5FZM7KLB.cjs} +13 -10
- package/dist/{chunk-FN5S5OE7.cjs → chunk-5NZA4UB4.cjs} +3 -3
- package/dist/{chunk-PFS5ZOCO.js → chunk-5Q3W4DEU.js} +18 -10
- package/dist/{chunk-VMMGT42E.cjs → chunk-65GTO4QM.cjs} +7 -3
- package/dist/{chunk-CXZEPTRI.js → chunk-6P3K4YUW.js} +6 -2
- package/dist/chunk-73XIKTZL.js +124 -0
- package/dist/{chunk-P6EGMTK4.js → chunk-7QNW24ZT.js} +8 -4
- package/dist/{chunk-XT4OSHSB.cjs → chunk-AEYOIPHD.cjs} +6 -2
- package/dist/{chunk-KXNAGJE6.cjs → chunk-ANUQFV43.cjs} +6 -6
- package/dist/chunk-ATR3RORT.js +499 -0
- package/dist/{chunk-XOSFZHSS.js → chunk-B72CC4O6.js} +2 -2
- package/dist/{chunk-TAZJSKFD.js → chunk-BBIKQW66.js} +9 -5
- package/dist/{chunk-FFA4LDAO.cjs → chunk-BDIZGBDA.cjs} +8 -3
- package/dist/{chunk-YDJA5ETO.js → chunk-BG4OQUKP.js} +1 -1
- package/dist/chunk-BKGPWAEE.js +94 -0
- package/dist/{chunk-3DVEGFBZ.js → chunk-BODVOW7B.js} +64 -13
- package/dist/{chunk-7GJR65DQ.js → chunk-BXV5O6VU.js} +9 -8
- package/dist/{chunk-HUA44A35.cjs → chunk-BZ73ZQTE.cjs} +17 -11
- package/dist/{chunk-T7HQBZZB.cjs → chunk-C2E3GJEE.cjs} +12 -9
- package/dist/{chunk-UP6YRP44.js → chunk-C5SVIQG3.js} +10 -5
- package/dist/{chunk-4YQ2OJAL.js → chunk-D2XFTCRP.js} +1 -1
- package/dist/{chunk-R5PZPF55.js → chunk-DEAEO7RI.js} +1 -1
- package/dist/chunk-DMPVI3YK.cjs +400 -0
- package/dist/{chunk-DRXFJR7F.cjs → chunk-DMXN5LJB.cjs} +17 -16
- package/dist/{chunk-PVSYZXS7.js → chunk-DTXY7JDL.js} +11 -10
- package/dist/{chunk-C26EN22G.cjs → chunk-DUDDZRCS.cjs} +9 -5
- package/dist/{chunk-WT367RVU.js → chunk-E7YL3AHT.js} +15 -9
- package/dist/{chunk-CHVXUA3O.cjs → chunk-EV53SLSB.cjs} +4 -4
- package/dist/{chunk-VQDWNDP5.js → chunk-GD4AFYJ3.js} +1 -1
- package/dist/{chunk-AQNY2M6Q.cjs → chunk-GIZL57FE.cjs} +3 -1
- package/dist/{chunk-I4HVBWYF.js → chunk-GLAE5K5W.js} +7 -2
- package/dist/{chunk-4AMTDSQ3.cjs → chunk-HDSEJMWI.cjs} +6 -3
- package/dist/{chunk-ZWS3KSMK.js → chunk-HQQ4NKER.js} +5 -2
- package/dist/{chunk-WBDPILKI.cjs → chunk-HVOBMOZ2.cjs} +6 -2
- package/dist/{chunk-CMNQAF6C.js → chunk-IJFTBVSD.js} +12 -9
- package/dist/{chunk-RDGYHJ52.js → chunk-IPI3JXKP.js} +9 -6
- package/dist/chunk-JS7IPR7P.js +249 -0
- package/dist/{chunk-CPO5KEQS.cjs → chunk-KC5FPUOF.cjs} +2 -2
- package/dist/{chunk-TUO5SZRD.cjs → chunk-L42HTMMR.cjs} +2 -2
- package/dist/chunk-LOXOD4IS.cjs +8630 -0
- package/dist/{chunk-6DSJ7XST.cjs → chunk-LQ5V5YC7.cjs} +13 -10
- package/dist/chunk-M6N5HSY3.js +209 -0
- package/dist/{chunk-LJCSSR5V.cjs → chunk-MNCWB5F7.cjs} +5 -5
- package/dist/{chunk-BTVNRLSE.js → chunk-MYNHJHDZ.js} +1 -1
- package/dist/{chunk-O3EX3SAD.cjs → chunk-N4ZSG6JJ.cjs} +2 -2
- package/dist/{chunk-OO7EKEJH.cjs → chunk-NBD4PL2E.cjs} +17 -14
- package/dist/chunk-NF7RIHJK.js +45 -0
- package/dist/{chunk-KJAZ4YAR.cjs → chunk-NGBN2NGH.cjs} +76 -25
- package/dist/{chunk-MRDZHNCF.cjs → chunk-NRORJRD4.cjs} +4 -4
- package/dist/{chunk-OTS4YFSZ.cjs → chunk-OKABWSWA.cjs} +7 -3
- package/dist/{chunk-4BZ65NIH.js → chunk-OLG7LZBD.js} +1 -1
- package/dist/{chunk-KZ7VMQTC.js → chunk-OMEH2EVE.js} +5 -1
- package/dist/{chunk-LCBOOA7S.js → chunk-P5VDZ6PV.js} +1 -1
- package/dist/{chunk-V5MTBGM4.cjs → chunk-PA2H2263.cjs} +6 -2
- package/dist/chunk-PGRH5Q77.cjs +249 -0
- package/dist/chunk-PNSRJT46.js +380 -0
- package/dist/{chunk-UL5T2XIY.cjs → chunk-PSED4Z4X.cjs} +13 -11
- package/dist/{chunk-PGH3MHPP.js → chunk-PWLLLJHU.js} +3 -1
- package/dist/{chunk-DOTAX65F.js → chunk-PYLR4J2D.js} +8 -4
- package/dist/{chunk-3SDEZTZD.js → chunk-QC6IUDDJ.js} +1 -1
- package/dist/{chunk-WJICM4SK.cjs → chunk-QM7HZCQW.cjs} +11 -6
- package/dist/chunk-QRQ5EX7I.cjs +380 -0
- package/dist/{chunk-RX4KPL6H.js → chunk-QU64XI5X.js} +9 -6
- package/dist/{chunk-LKIKNRUP.js → chunk-R4OLUJV7.js} +8 -5
- package/dist/{chunk-FSTLJIR5.cjs → chunk-R7SDL3DJ.cjs} +16 -13
- package/dist/{chunk-LY5VN3B3.cjs → chunk-RJP3SZ7Q.cjs} +41 -253
- package/dist/{chunk-KS45GREN.js → chunk-RJXNNIFW.js} +7 -4
- package/dist/{chunk-LYMZDJX5.cjs → chunk-S5G7OEN2.cjs} +26 -18
- package/dist/{chunk-3DGR4GNN.cjs → chunk-SA4JOV4F.cjs} +10 -8
- package/dist/chunk-SAGM3TE3.cjs +94 -0
- package/dist/{chunk-WCN5WDOI.cjs → chunk-TSY7JHIV.cjs} +2 -2
- package/dist/chunk-U23U52ZN.cjs +124 -0
- package/dist/chunk-UET7BDX2.js +8630 -0
- package/dist/{chunk-J7VV7JAB.js → chunk-UM4QEO36.js} +6 -4
- package/dist/{chunk-NCLCL7JK.js → chunk-WD5ZF6HE.js} +1 -1
- package/dist/{chunk-HF65HHDU.cjs → chunk-WH5RW7DV.cjs} +24 -22
- package/dist/{chunk-GSOEIEOU.js → chunk-WJ276BIP.js} +5 -1
- package/dist/{chunk-OXJCLU3X.js → chunk-WLTVF77A.js} +1 -1
- package/dist/{chunk-WGO4ACS7.cjs → chunk-WOGJXDBU.cjs} +3 -3
- package/dist/{chunk-QJ53OSGF.js → chunk-WRJLBHWB.js} +6 -2
- package/dist/chunk-X4OLP5C5.cjs +209 -0
- package/dist/{chunk-HWDP4HQO.cjs → chunk-XL77XYI2.cjs} +4 -4
- package/dist/{chunk-QAJM6VG5.js → chunk-XLI7SHCH.js} +2 -2
- package/dist/chunk-Y27LG4BQ.cjs +45 -0
- package/dist/chunk-YKSSNFDZ.js +400 -0
- package/dist/{chunk-VRI7EXV6.js → chunk-YMDLUTF2.js} +5 -1
- package/dist/{chunk-J2RUI7GJ.js → chunk-YVY27BJT.js} +5 -3
- package/dist/{chunk-K6CZ2AGI.js → chunk-ZBIBLOZL.js} +35 -247
- package/dist/completion-HVSWU5GR.cjs +13 -0
- package/dist/completion-WJ2MVNDH.js +13 -0
- package/dist/constants-RBQTR32A.cjs +20 -0
- package/dist/{constants-OFIAR4E5.js → constants-V6J54N3X.js} +1 -1
- package/dist/export-NN7F5ANA.js +11 -0
- package/dist/export-UPS3AK2P.cjs +11 -0
- package/dist/feedback-KPNRMSP4.js +14 -0
- package/dist/feedback-OTXZVKE7.cjs +14 -0
- package/dist/help-M7NFPCM4.js +58 -0
- package/dist/help-UBHIUDQR.cjs +58 -0
- package/dist/history-2KUM6GN4.cjs +13 -0
- package/dist/history-RZFT34Q7.js +13 -0
- package/dist/hooks-7QSUBHBM.cjs +12 -0
- package/dist/hooks-S4MD4QSR.js +12 -0
- package/dist/i18n-6NKENUIV.js +32 -0
- package/dist/i18n-MXQXQOVE.cjs +32 -0
- package/dist/ide-5STDV43A.cjs +11 -0
- package/dist/ide-W2NYXOWQ.js +11 -0
- package/dist/index.cjs +15320 -12906
- package/dist/index.js +15465 -13051
- package/dist/init-FG5KEJCZ.cjs +9 -0
- package/dist/init-TV4MJDYK.js +9 -0
- package/dist/language-52Q7CSAY.cjs +16 -0
- package/dist/language-FXFDGOBF.js +16 -0
- package/dist/localProjectPermissions-2EATUDZM.cjs +17 -0
- package/dist/{localProjectPermissions-FD5AK5FB.js → localProjectPermissions-WQYMGI42.js} +2 -2
- package/dist/login-AN42IOBK.js +18 -0
- package/dist/login-I65V4TGU.cjs +18 -0
- package/dist/logout-KK5UWGNG.js +16 -0
- package/dist/logout-VYYNWBHZ.cjs +16 -0
- package/dist/mcp-4SKTDECJ.js +15 -0
- package/dist/mcp-AGWPTMAX.cjs +15 -0
- package/dist/mcp-install-3NN2HAYR.cjs +473 -0
- package/dist/mcp-install-KTV52DQK.js +473 -0
- package/dist/memory-LG4K6XV6.cjs +9 -0
- package/dist/{memory-4GSP7NKV.js → memory-LRDK2SYC.js} +2 -1
- package/dist/model-P5D7ATE7.cjs +9 -0
- package/dist/{model-HKEFSH5E.js → model-WBFJIGUN.js} +2 -1
- package/dist/{new-EEZC4XXV.js → new-5A7RQEKI.js} +2 -1
- package/dist/new-EAATWI2G.cjs +9 -0
- package/dist/permissions-5URK6C44.js +12 -0
- package/dist/permissions-CJUDVG63.cjs +12 -0
- package/dist/quit-A33JHDG7.cjs +9 -0
- package/dist/quit-IYBLN3DB.js +9 -0
- package/dist/resume-OPSJTCH7.cjs +12 -0
- package/dist/resume-TOWEEN5D.js +12 -0
- package/dist/search-GOLIE5BA.js +14 -0
- package/dist/search-H42HGUK5.cjs +14 -0
- package/dist/{sessions-4KXIT76T.js → sessions-B5NENDKY.js} +2 -1
- package/dist/sessions-YHAVEMWY.cjs +9 -0
- package/dist/share-3YWFZGNM.cjs +13 -0
- package/dist/share-T6I2LRGS.js +13 -0
- package/dist/{skills-PB4HXV4R.js → skills-ICEQ2TNC.js} +2 -1
- package/dist/skills-LFVNZOMF.cjs +13 -0
- package/dist/{skills-install-UBBNXWD5.js → skills-install-6RN7FVCP.js} +9 -8
- package/dist/{skills-install-7SFS24HY.cjs → skills-install-LU6GA2WF.cjs} +14 -13
- package/dist/skills-new-5BM5PDFX.cjs +14 -0
- package/dist/skills-new-KWBWOX74.js +14 -0
- package/dist/status-BAGXGSKE.js +10 -0
- package/dist/status-BMD2UFHC.cjs +10 -0
- package/dist/sync-6M3WRKMH.cjs +39 -0
- package/dist/sync-73D2MP65.cjs +16 -0
- package/dist/{sync-LYKDHRFM.js → sync-EXYX7HXW.js} +2 -2
- package/dist/sync-LL6M67CN.js +16 -0
- package/dist/theme-IFEI2IBJ.cjs +16 -0
- package/dist/theme-U3SKEULY.js +16 -0
- package/dist/ui/questionModal.cjs +28 -0
- package/dist/ui/questionModal.d.cts +11 -0
- package/dist/ui/questionModal.d.ts +11 -0
- package/dist/ui/questionModal.js +28 -0
- package/dist/undo-4DS67OAW.cjs +9 -0
- package/dist/undo-YMALVAPN.js +9 -0
- package/package.json +9 -8
- package/dist/CommunitySkillsCache-N2RWBCY2.cjs +0 -7
- package/dist/MemoryManager-J7APSLZ7.js +0 -7
- package/dist/MemoryManager-RLLYVIDY.cjs +0 -7
- package/dist/PermissionManager-ISI5OAJK.cjs +0 -10
- package/dist/SessionManager-7MF76Q3Q.cjs +0 -9
- package/dist/SkillsRegistry-UTK2YT4M.cjs +0 -8
- package/dist/add-dir-OMK3Y4DM.cjs +0 -8
- package/dist/agents-N2ZB4O2A.cjs +0 -9
- package/dist/agents-ZMT7HBRT.js +0 -9
- package/dist/agents-new-3EWS2NR3.cjs +0 -11
- package/dist/agents-new-TCGUYK5I.js +0 -11
- package/dist/automode-BRHUHGXU.cjs +0 -8
- package/dist/chunk-6SM6N7DJ.js +0 -2828
- package/dist/chunk-BEIG7V7Q.cjs +0 -51
- package/dist/chunk-L5QWMGLV.cjs +0 -2828
- package/dist/chunk-Z3Q2AFDS.js +0 -51
- package/dist/completion-NCSTSKTL.cjs +0 -11
- package/dist/completion-NTZERPAZ.js +0 -11
- package/dist/constants-B2X7KDIH.cjs +0 -20
- package/dist/export-5AJNVX4O.cjs +0 -9
- package/dist/export-ZQHTLV4W.js +0 -9
- package/dist/feedback-F7BMGSV6.cjs +0 -12
- package/dist/feedback-NL7CWTRY.js +0 -12
- package/dist/help-PKC6QCNG.js +0 -10
- package/dist/help-UEELQRHP.cjs +0 -10
- package/dist/hooks-AX5VPCZ3.cjs +0 -10
- package/dist/hooks-V22HVLQT.js +0 -10
- package/dist/init-DML7AOII.js +0 -8
- package/dist/init-SLLSDDJN.cjs +0 -8
- package/dist/language-IEKARNQH.js +0 -13
- package/dist/language-ULQCKXAD.cjs +0 -13
- package/dist/localProjectPermissions-7FI3XF4K.cjs +0 -17
- package/dist/login-PD3DFJLM.js +0 -15
- package/dist/login-VHGT4YKT.cjs +0 -15
- package/dist/logout-2QXNFGDT.js +0 -13
- package/dist/logout-A4SMKEFO.cjs +0 -13
- package/dist/memory-CFNC7RJH.cjs +0 -8
- package/dist/model-TKVEJ5BC.cjs +0 -8
- package/dist/new-EB2MBQXA.cjs +0 -8
- package/dist/permissions-S7433NQJ.js +0 -10
- package/dist/permissions-YZ6WCDBL.cjs +0 -10
- package/dist/quit-2RYFGIJP.cjs +0 -8
- package/dist/quit-RSYIERO5.js +0 -8
- package/dist/resume-54ERVSFM.cjs +0 -10
- package/dist/resume-YJ5CVKAP.js +0 -10
- package/dist/search-4TEQMUPU.js +0 -11
- package/dist/search-QGLS4SV7.cjs +0 -11
- package/dist/sessions-7RTCPVNE.cjs +0 -8
- package/dist/share-2B2T3AUU.cjs +0 -11
- package/dist/share-SZMXZIA3.js +0 -11
- package/dist/skills-HVQNCTGK.cjs +0 -12
- package/dist/skills-new-5FSDAJWE.js +0 -12
- package/dist/skills-new-IOTZYE6F.cjs +0 -12
- package/dist/status-AGPSKXSW.js +0 -9
- package/dist/status-WOINF556.cjs +0 -9
- package/dist/sync-64MZDWGG.js +0 -14
- package/dist/sync-F5ECJW25.cjs +0 -39
- package/dist/sync-W5UR7BEP.cjs +0 -14
- package/dist/theme-CWG3ZLHB.cjs +0 -13
- package/dist/theme-HQKV7YAP.js +0 -13
- package/dist/undo-2WR2ZIEC.cjs +0 -8
- package/dist/undo-7QJBXARS.js +0 -8
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_SYNC_CONFIG,
|
|
3
3
|
createSyncService
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P5VDZ6PV.js";
|
|
5
5
|
import {
|
|
6
6
|
getAuthClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D2XFTCRP.js";
|
|
8
8
|
import {
|
|
9
9
|
safePrompt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WD5ZF6HE.js";
|
|
11
11
|
import {
|
|
12
12
|
saveConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZBIBLOZL.js";
|
|
14
14
|
import {
|
|
15
15
|
AUTH_CONFIG
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PWLLLJHU.js";
|
|
17
|
+
import {
|
|
18
|
+
t
|
|
19
|
+
} from "./chunk-UET7BDX2.js";
|
|
17
20
|
|
|
18
21
|
// src/commands/login.ts
|
|
19
22
|
import chalk from "chalk";
|
|
20
23
|
var metadata = {
|
|
21
24
|
command: "/login",
|
|
22
|
-
description: "
|
|
25
|
+
description: t("commands.login.description"),
|
|
23
26
|
implemented: true
|
|
24
27
|
};
|
|
25
28
|
async function openBrowser(url) {
|
|
@@ -60,7 +63,7 @@ async function login(ctx) {
|
|
|
60
63
|
initial: false
|
|
61
64
|
});
|
|
62
65
|
if (!result || !result.continueLogin) {
|
|
63
|
-
console.log(chalk.gray("
|
|
66
|
+
console.log(chalk.gray(t("commands.login.cancelled")));
|
|
64
67
|
return null;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -68,7 +71,7 @@ async function login(ctx) {
|
|
|
68
71
|
console.log(chalk.gray("Initiating authentication..."));
|
|
69
72
|
const initResult = await authClient.initiateDeviceAuth();
|
|
70
73
|
if (!initResult.success || !initResult.deviceCode || !initResult.userCode) {
|
|
71
|
-
console.log(chalk.red(
|
|
74
|
+
console.log(chalk.red(t("commands.login.failed", { error: initResult.error || "Unknown error" })));
|
|
72
75
|
return null;
|
|
73
76
|
}
|
|
74
77
|
console.log();
|
|
@@ -112,8 +115,7 @@ async function login(ctx) {
|
|
|
112
115
|
};
|
|
113
116
|
await saveConfig(updatedConfig);
|
|
114
117
|
console.log();
|
|
115
|
-
console.log(chalk.green("
|
|
116
|
-
console.log(chalk.cyan(`Welcome, ${pollResult.user.name || pollResult.user.email}!`));
|
|
118
|
+
console.log(chalk.green(t("commands.login.success", { email: pollResult.user.name || pollResult.user.email })));
|
|
117
119
|
console.log();
|
|
118
120
|
await checkAndRestoreSyncData(pollResult.token, pollResult.user.id, updatedConfig);
|
|
119
121
|
return null;
|
|
@@ -162,17 +164,66 @@ async function checkAndRestoreSyncData(token, userId, config) {
|
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
166
|
console.log(chalk.gray("Restoring settings from cloud..."));
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
console.log(chalk.gray("(Press ESC or Ctrl+C to cancel)"));
|
|
168
|
+
const syncResult = await cancellableOperation(
|
|
169
|
+
() => syncService.forceDownload()
|
|
170
|
+
);
|
|
171
|
+
if (!syncResult) {
|
|
172
|
+
console.log(chalk.yellow("\nSync restore cancelled."));
|
|
173
|
+
console.log(chalk.gray("You can sync later with /sync."));
|
|
174
|
+
} else if (syncResult.success) {
|
|
167
175
|
console.log(chalk.green(`Restored ${syncResult.downloaded} files from cloud.`));
|
|
168
176
|
} else {
|
|
169
177
|
console.log(chalk.yellow(`Sync restore failed: ${syncResult.error}`));
|
|
170
178
|
console.log(chalk.gray("You can try again later with /sync."));
|
|
171
179
|
}
|
|
172
|
-
} catch
|
|
180
|
+
} catch {
|
|
173
181
|
console.log(chalk.gray("Could not check cloud sync data."));
|
|
174
182
|
}
|
|
175
183
|
}
|
|
184
|
+
async function cancellableOperation(fn) {
|
|
185
|
+
const stdin = process.stdin;
|
|
186
|
+
const wasRaw = stdin.isRaw;
|
|
187
|
+
return new Promise((resolve) => {
|
|
188
|
+
let settled = false;
|
|
189
|
+
const cleanup = () => {
|
|
190
|
+
stdin.removeListener("data", onData);
|
|
191
|
+
if (stdin.isTTY && stdin.setRawMode) {
|
|
192
|
+
try {
|
|
193
|
+
stdin.setRawMode(wasRaw ?? false);
|
|
194
|
+
} catch {
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
const onData = (data) => {
|
|
199
|
+
const s = data.toString();
|
|
200
|
+
if (s === "\x1B" || s === "") {
|
|
201
|
+
if (settled) return;
|
|
202
|
+
settled = true;
|
|
203
|
+
cleanup();
|
|
204
|
+
resolve(null);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
if (stdin.isTTY && stdin.setRawMode) {
|
|
208
|
+
try {
|
|
209
|
+
stdin.setRawMode(true);
|
|
210
|
+
} catch {
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
stdin.on("data", onData);
|
|
214
|
+
fn().then((result) => {
|
|
215
|
+
if (settled) return;
|
|
216
|
+
settled = true;
|
|
217
|
+
cleanup();
|
|
218
|
+
resolve(result);
|
|
219
|
+
}).catch(() => {
|
|
220
|
+
if (settled) return;
|
|
221
|
+
settled = true;
|
|
222
|
+
cleanup();
|
|
223
|
+
resolve(null);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
}
|
|
176
227
|
function formatSize(bytes) {
|
|
177
228
|
if (bytes === 0) return "0 B";
|
|
178
229
|
if (bytes < 1024) return `${bytes} B`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "autohand-cli",
|
|
4
|
-
version: "0.7.
|
|
4
|
+
version: "0.7.11",
|
|
5
5
|
license: "Apache-2.0",
|
|
6
6
|
description: "Autohand interactive coding agent CLI powered by LLMs.",
|
|
7
7
|
repository: {
|
|
@@ -21,7 +21,7 @@ var package_default = {
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
scripts: {
|
|
24
|
-
postinstall: "node scripts/fix-ansi-styles.js || true",
|
|
24
|
+
postinstall: "node scripts/fix-ansi-styles.js || true && node scripts/fix-ink-devtools.js || true",
|
|
25
25
|
go: 'bun run build && ./install-local.sh && echo "COMPLETED"',
|
|
26
26
|
build: "tsup",
|
|
27
27
|
dev: "bun src/index.ts",
|
|
@@ -29,11 +29,11 @@ var package_default = {
|
|
|
29
29
|
lint: "eslint .",
|
|
30
30
|
test: "vitest run",
|
|
31
31
|
start: "node dist/index.js",
|
|
32
|
-
"compile:macos-arm64": "bun build ./src/index.ts --compile --target=bun-darwin-arm64 --
|
|
33
|
-
"compile:macos-x64": "bun build ./src/index.ts --compile --target=bun-darwin-x64 --
|
|
34
|
-
"compile:linux-x64": "bun build ./src/index.ts --compile --target=bun-linux-x64 --
|
|
35
|
-
"compile:linux-arm64": "bun build ./src/index.ts --compile --target=bun-linux-arm64 --
|
|
36
|
-
"compile:windows-x64": "bun build ./src/index.ts --compile --target=bun-windows-x64 --
|
|
32
|
+
"compile:macos-arm64": "bun build ./src/index.ts --compile --target=bun-darwin-arm64 --outfile ./binaries/autohand-macos-arm64",
|
|
33
|
+
"compile:macos-x64": "bun build ./src/index.ts --compile --target=bun-darwin-x64 --outfile ./binaries/autohand-macos-x64",
|
|
34
|
+
"compile:linux-x64": "bun build ./src/index.ts --compile --target=bun-linux-x64 --outfile ./binaries/autohand-linux-x64",
|
|
35
|
+
"compile:linux-arm64": "bun build ./src/index.ts --compile --target=bun-linux-arm64 --outfile ./binaries/autohand-linux-arm64",
|
|
36
|
+
"compile:windows-x64": "bun build ./src/index.ts --compile --target=bun-windows-x64 --outfile ./binaries/autohand-windows-x64.exe",
|
|
37
37
|
"compile:all": "bun run compile:macos-arm64 && bun run compile:macos-x64 && bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64",
|
|
38
38
|
link: "bun link",
|
|
39
39
|
translate: "tsx scripts/generate-translations.ts"
|
|
@@ -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",
|
|
@@ -61,13 +62,13 @@ var package_default = {
|
|
|
61
62
|
open: "^10.1.0",
|
|
62
63
|
ora: "^9.0.0",
|
|
63
64
|
react: "^18.2.0",
|
|
64
|
-
"react-devtools-core": "^7.0.1",
|
|
65
65
|
"terminal-link": "^3.0.0",
|
|
66
66
|
yaml: "^2.8.2",
|
|
67
67
|
zod: "^4.1.12"
|
|
68
68
|
},
|
|
69
69
|
devDependencies: {
|
|
70
70
|
"@types/diff": "^8.0.0",
|
|
71
|
+
"react-devtools-core": "^7.0.1",
|
|
71
72
|
"@types/fs-extra": "^11.0.4",
|
|
72
73
|
"@types/minimatch": "^6.0.0",
|
|
73
74
|
"@types/node": "^24.10.1",
|
|
@@ -1,9 +1,12 @@
|
|
|
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
|
|
3
|
+
var _chunkQRQ5EX7Icjs = require('./chunk-QRQ5EX7I.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
7
10
|
|
|
8
11
|
// src/commands/resume.ts
|
|
9
12
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
@@ -11,7 +14,7 @@ var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsex
|
|
|
11
14
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
12
15
|
var metadata = {
|
|
13
16
|
command: "/resume",
|
|
14
|
-
description:
|
|
17
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.resume.description"),
|
|
15
18
|
implemented: true
|
|
16
19
|
};
|
|
17
20
|
async function getSessionTitle(sessionMeta) {
|
|
@@ -19,7 +22,7 @@ async function getSessionTitle(sessionMeta) {
|
|
|
19
22
|
return sessionMeta.summary.slice(0, 60);
|
|
20
23
|
}
|
|
21
24
|
try {
|
|
22
|
-
const conversationPath = _path2.default.join(
|
|
25
|
+
const conversationPath = _path2.default.join(_chunkGIZL57FEcjs.AUTOHAND_PATHS.sessions, sessionMeta.sessionId, "conversation.jsonl");
|
|
23
26
|
if (await _fsextra2.default.pathExists(conversationPath)) {
|
|
24
27
|
const content = await _fsextra2.default.readFile(conversationPath, "utf-8");
|
|
25
28
|
const lines = content.trim().split("\n").filter((line) => line);
|
|
@@ -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(_chalk2.default.gray(
|
|
74
|
+
console.log(_chalk2.default.gray(`
|
|
75
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.sessions.noSessions")}`));
|
|
72
76
|
console.log(_chalk2.default.gray("Start a new conversation to create a session.\n"));
|
|
73
77
|
return null;
|
|
74
78
|
}
|
|
75
|
-
console.log(_chalk2.default.cyan(
|
|
79
|
+
console.log(_chalk2.default.cyan(`
|
|
80
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.sessions.selectPrompt")}
|
|
81
|
+
`));
|
|
76
82
|
const choices = [];
|
|
77
83
|
const recentSessions = allSessions.slice(0, 20);
|
|
78
84
|
for (const session of recentSessions) {
|
|
@@ -91,7 +97,7 @@ async function resume(ctx) {
|
|
|
91
97
|
value: choice.name,
|
|
92
98
|
description: choice.hint
|
|
93
99
|
}));
|
|
94
|
-
const result = await
|
|
100
|
+
const result = await _chunkQRQ5EX7Icjs.showModal.call(void 0, {
|
|
95
101
|
title: "Choose a session",
|
|
96
102
|
options
|
|
97
103
|
});
|
|
@@ -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(_chalk2.default.red(
|
|
114
|
+
console.error(_chalk2.default.red(_chunkLOXOD4IScjs.t.call(void 0, "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 || _optionalChain([firstUserMessage, 'optionalAccess', _ => _.content, 'access', _2 => _2.slice, 'call', _3 => _3(0, 50)]) || "Untitled session";
|
|
118
124
|
console.log(_chalk2.default.cyan(`
|
|
119
|
-
|
|
125
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.resume.resuming", { id: title })}`));
|
|
120
126
|
console.log(_chalk2.default.gray(` Project: ${session.metadata.projectPath}`));
|
|
121
127
|
console.log(_chalk2.default.gray(` Started: ${new Date(session.metadata.createdAt).toLocaleString()}`));
|
|
122
128
|
console.log(_chalk2.default.gray(` Messages: ${messages.length}`));
|
|
@@ -136,9 +142,9 @@ Resuming: ${title}`));
|
|
|
136
142
|
console.log();
|
|
137
143
|
}
|
|
138
144
|
console.log(_chalk2.default.green("Session resumed. Continue typing to chat.\n"));
|
|
139
|
-
return
|
|
145
|
+
return null;
|
|
140
146
|
} catch (error) {
|
|
141
|
-
console.error(_chalk2.default.red(
|
|
147
|
+
console.error(_chalk2.default.red(_chunkLOXOD4IScjs.t.call(void 0, "commands.resume.failed", { error: error.message })));
|
|
142
148
|
return null;
|
|
143
149
|
}
|
|
144
150
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
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
|
|
3
|
+
var _chunkTSY7JHIVcjs = require('./chunk-TSY7JHIV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMNCWB5F7cjs = require('./chunk-MNCWB5F7.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkRJP3SZ7Qcjs = require('./chunk-RJP3SZ7Q.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
10
13
|
|
|
11
14
|
// src/commands/logout.ts
|
|
12
15
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
13
16
|
var metadata = {
|
|
14
17
|
command: "/logout",
|
|
15
|
-
description:
|
|
18
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.logout.description"),
|
|
16
19
|
implemented: true
|
|
17
20
|
};
|
|
18
21
|
async function logout(ctx) {
|
|
@@ -23,17 +26,17 @@ async function logout(ctx) {
|
|
|
23
26
|
return null;
|
|
24
27
|
}
|
|
25
28
|
const userName = _optionalChain([config, 'access', _3 => _3.auth, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.name]) || _optionalChain([config, 'access', _6 => _6.auth, 'access', _7 => _7.user, 'optionalAccess', _8 => _8.email]) || "user";
|
|
26
|
-
const result = await
|
|
29
|
+
const result = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, {
|
|
27
30
|
type: "confirm",
|
|
28
31
|
name: "confirm",
|
|
29
32
|
message: `Log out from ${_chalk2.default.cyan(userName)}?`,
|
|
30
33
|
initial: true
|
|
31
34
|
});
|
|
32
35
|
if (!result || !result.confirm) {
|
|
33
|
-
console.log(_chalk2.default.gray("
|
|
36
|
+
console.log(_chalk2.default.gray(_chunkLOXOD4IScjs.t.call(void 0, "commands.logout.cancelled")));
|
|
34
37
|
return null;
|
|
35
38
|
}
|
|
36
|
-
const authClient =
|
|
39
|
+
const authClient = _chunkTSY7JHIVcjs.getAuthClient.call(void 0, );
|
|
37
40
|
try {
|
|
38
41
|
await authClient.logout(config.auth.token);
|
|
39
42
|
} catch (e) {
|
|
@@ -42,9 +45,9 @@ async function logout(ctx) {
|
|
|
42
45
|
...config,
|
|
43
46
|
auth: void 0
|
|
44
47
|
};
|
|
45
|
-
await
|
|
48
|
+
await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, updatedConfig);
|
|
46
49
|
console.log();
|
|
47
|
-
console.log(_chalk2.default.green(
|
|
50
|
+
console.log(_chalk2.default.green(_chunkLOXOD4IScjs.t.call(void 0, "commands.logout.success")));
|
|
48
51
|
console.log(_chalk2.default.gray("Your local session has been cleared."));
|
|
49
52
|
console.log();
|
|
50
53
|
return null;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTOHAND_PATHS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PWLLLJHU.js";
|
|
4
|
+
import {
|
|
5
|
+
t
|
|
6
|
+
} from "./chunk-UET7BDX2.js";
|
|
4
7
|
|
|
5
8
|
// src/commands/agents.ts
|
|
6
9
|
import chalk from "chalk";
|
|
@@ -152,7 +155,7 @@ function extractMarkdownTitle(content) {
|
|
|
152
155
|
// src/commands/agents.ts
|
|
153
156
|
var metadata = {
|
|
154
157
|
command: "/agents",
|
|
155
|
-
description: "
|
|
158
|
+
description: t("commands.agents.description"),
|
|
156
159
|
implemented: true,
|
|
157
160
|
prd: "prd/sub_agents_architecture.md"
|
|
158
161
|
};
|
|
@@ -161,10 +164,12 @@ async function handler() {
|
|
|
161
164
|
await registry.loadAgents();
|
|
162
165
|
const agents = registry.getAllAgents();
|
|
163
166
|
if (agents.length === 0) {
|
|
164
|
-
return
|
|
165
|
-
|
|
167
|
+
return `${t("commands.agents.noAgents")}
|
|
168
|
+
${chalk.gray(`Path: ${chalk.cyan(registry.getAgentsDirectory())}`)}`;
|
|
166
169
|
}
|
|
167
|
-
let output = chalk.bold("
|
|
170
|
+
let output = chalk.bold(`${t("commands.agents.title")}:
|
|
171
|
+
|
|
172
|
+
`);
|
|
168
173
|
for (const agent of agents) {
|
|
169
174
|
output += `${chalk.green("\u{1F916} " + agent.name)}
|
|
170
175
|
`;
|