autohand-cli 0.6.2 → 0.6.4
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 +1 -0
- package/dist/agents-EHLYBJLK.cjs +10 -0
- package/dist/{agents-7GZ2VBYU.js → agents-OJWYZN6X.js} +1 -0
- package/dist/agents-new-7VPASCBV.cjs +10 -0
- package/dist/{agents-new-VALZG4B5.js → agents-new-WQLJOXSS.js} +1 -0
- package/dist/chunk-27JNK5TE.cjs +252 -0
- package/dist/{chunk-JUDX6E53.js → chunk-3Y6G5DUX.cjs} +21 -21
- package/dist/{chunk-QE5RKNVN.js → chunk-4AMTDSQ3.cjs} +9 -9
- package/dist/{chunk-KERHTHMK.js → chunk-6MCXWSR3.js} +10 -8
- package/dist/chunk-7RRX7H2X.cjs +104 -0
- package/dist/chunk-AD4O67ZA.cjs +93 -0
- package/dist/chunk-AL4Z4WKG.cjs +59 -0
- package/dist/chunk-BEIG7V7Q.cjs +51 -0
- package/dist/{chunk-2DEJU7WQ.js → chunk-C3IFF3EH.cjs} +33 -33
- package/dist/chunk-DD2YPHP5.cjs +133 -0
- package/dist/chunk-FFA4LDAO.cjs +55 -0
- package/dist/{chunk-UNS4S6J3.js → chunk-G7SYGATA.cjs} +38 -38
- package/dist/chunk-IHJDYAYJ.cjs +77 -0
- package/dist/chunk-JBKP2CLA.cjs +364 -0
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/chunk-KNLBEUAV.cjs +57 -0
- package/dist/chunk-KT55HW6V.js +168 -0
- package/dist/{chunk-7WBK33MM.js → chunk-KZ2UXXLH.js} +4 -2
- package/dist/chunk-M4LKQQHU.cjs +168 -0
- package/dist/chunk-M7RVTUWE.cjs +145 -0
- package/dist/chunk-MFK6HE47.cjs +33 -0
- package/dist/{chunk-RUQVXU6K.js → chunk-MRQV5HMC.js} +4 -2
- package/dist/chunk-N254NRHT.cjs +30 -0
- package/dist/chunk-NWXYG5PQ.js +93 -0
- package/dist/chunk-QCMC2WOC.cjs +1135 -0
- package/dist/chunk-RDEROLKA.cjs +79 -0
- package/dist/chunk-RYY5I7QN.cjs +49 -0
- package/dist/chunk-UBGEAEKS.js +1135 -0
- package/dist/chunk-V5MTBGM4.cjs +20 -0
- package/dist/chunk-VMMGT42E.cjs +60 -0
- package/dist/chunk-WBDPILKI.cjs +19 -0
- package/dist/chunk-XT4OSHSB.cjs +20 -0
- package/dist/{chunk-TVWTD63Y.js → chunk-Z3Q2AFDS.js} +1 -0
- package/dist/chunk-Z4J4W6YQ.cjs +339 -0
- package/dist/chunk-Z6SGIQWH.cjs +191 -0
- package/dist/{chunk-GX24PC3L.js → chunk-ZTA2ASFW.cjs} +64 -48
- package/dist/completion-AMEZDTFT.cjs +11 -0
- package/dist/{completion-Y42FKDT3.js → completion-HR3ZT55J.js} +1 -0
- package/dist/{export-WJ5P6E5Z.js → export-MYBJZD3H.js} +1 -0
- package/dist/export-ULYYSO5V.cjs +9 -0
- package/dist/{feedback-RJNBUBDQ.js → feedback-3THCLEBE.js} +1 -0
- package/dist/feedback-PATTKRH5.cjs +10 -0
- package/dist/{formatters-UG6VZJJ5.js → formatters-3POW3KMP.js} +1 -0
- package/dist/formatters-UMUJYWV5.cjs +9 -0
- package/dist/help-2PR7P4UJ.cjs +11 -0
- package/dist/{help-CNOV6OXY.js → help-AW4QPGIW.js} +2 -1
- package/dist/index.cjs +12594 -9303
- package/dist/index.js +9726 -2878
- package/dist/{init-DML7AOII.js → init-HAQKREMF.js} +1 -0
- package/dist/init-OLSCW7ZC.cjs +9 -0
- package/dist/lint-D5UOJWIK.cjs +9 -0
- package/dist/{lint-TA2ZHVLM.js → lint-NJPZWVN2.js} +1 -0
- package/dist/login-QJROML5I.js +12 -0
- package/dist/login-X66DSV75.cjs +12 -0
- package/dist/logout-3Z7R3F7J.cjs +12 -0
- package/dist/logout-RJ5OAXRI.js +12 -0
- package/dist/memory-77SWEZYB.cjs +9 -0
- package/dist/{memory-4GSP7NKV.js → memory-F3V5FW6W.js} +1 -0
- package/dist/model-B2PE6XFS.cjs +9 -0
- package/dist/{model-HKEFSH5E.js → model-JC53RT7A.js} +1 -0
- package/dist/{new-EEZC4XXV.js → new-356ITOM7.js} +1 -0
- package/dist/new-J3ABPMW4.cjs +9 -0
- package/dist/{permissions-XJKYKDBG.js → permissions-CYW62ZK3.js} +1 -0
- package/dist/permissions-NOC5DMOH.cjs +9 -0
- package/dist/{quit-RSYIERO5.js → quit-2QWJ75GZ.js} +1 -0
- package/dist/quit-DQ57J67A.cjs +9 -0
- package/dist/resume-43XMN4CL.cjs +9 -0
- package/dist/{resume-2NERFSTD.js → resume-GA7YZJSO.js} +1 -0
- package/dist/session-BSU2L5UI.cjs +9 -0
- package/dist/{session-H5QWKE5E.js → session-SZMRN5KG.js} +1 -0
- package/dist/sessions-CVOZGTKR.cjs +9 -0
- package/dist/{sessions-4KXIT76T.js → sessions-OJ4DRK3P.js} +1 -0
- package/dist/{skills-POKNCIQV.js → skills-HF4SAF5O.js} +1 -0
- package/dist/skills-U6J6DFLK.cjs +11 -0
- package/dist/{skills-new-5VCNKQDP.js → skills-new-QDTNEG3R.js} +1 -0
- package/dist/skills-new-UPVBHIF2.cjs +10 -0
- package/dist/status-GR73LEEN.cjs +9 -0
- package/dist/{status-DCVSUWZG.js → status-SLYYTKXD.js} +2 -1
- package/dist/theme-THMQ5AIN.js +13 -0
- package/dist/theme-YDANJLZR.cjs +13 -0
- package/dist/{undo-7QJBXARS.js → undo-3Q44LSVS.js} +1 -0
- package/dist/undo-WF5HB5VU.cjs +9 -0
- package/package.json +10 -8
- package/dist/agents-32JB7KMB.js +0 -9
- package/dist/agents-3K6PHXQ6.js +0 -9
- package/dist/agents-A7AUMVQD.js +0 -8
- package/dist/agents-AHFECO5Q.js +0 -9
- package/dist/agents-DQFYBMJG.js +0 -8
- package/dist/agents-GX6L7BXZ.js +0 -9
- package/dist/agents-IWJJ7YJM.js +0 -8
- package/dist/agents-J2QLDVOP.js +0 -9
- package/dist/agents-OWTSY74S.js +0 -9
- package/dist/agents-RB34F4XE.js +0 -9
- package/dist/agents-XL27P67O.js +0 -9
- package/dist/agents-new-5I3B2W2I.js +0 -9
- package/dist/agents-new-CHV2AV34.js +0 -9
- package/dist/agents-new-F6F2VMDB.js +0 -9
- package/dist/agents-new-FDMUH7NL.js +0 -9
- package/dist/agents-new-GBF6JJIA.js +0 -9
- package/dist/agents-new-GCZEY4TE.js +0 -8
- package/dist/agents-new-OCIB72NU.js +0 -9
- package/dist/agents-new-PQGD47BZ.js +0 -9
- package/dist/agents-new-V6BNVJAB.js +0 -9
- package/dist/agents-new-WQUEZ2XH.js +0 -8
- package/dist/chunk-2EPIFDFM.js +0 -68
- package/dist/chunk-2FUWKZFN.js +0 -68
- package/dist/chunk-2HIILNYH.js +0 -197
- package/dist/chunk-2QAL3HH4.js +0 -79
- package/dist/chunk-3FRM7HJY.js +0 -57
- package/dist/chunk-3OD5MR23.js +0 -384
- package/dist/chunk-4LDR3Y3A.js +0 -79
- package/dist/chunk-4LLTISFP.js +0 -288
- package/dist/chunk-4UISIRMD.js +0 -288
- package/dist/chunk-4VWPX2X3.js +0 -131
- package/dist/chunk-7FMMKTRG.js +0 -64
- package/dist/chunk-7MFSCH7E.js +0 -382
- package/dist/chunk-7TV5KURP.js +0 -79
- package/dist/chunk-7XN6PAKV.js +0 -79
- package/dist/chunk-A7HRTONQ.js +0 -382
- package/dist/chunk-ALMJANSA.js +0 -197
- package/dist/chunk-CD7GNBIE.js +0 -288
- package/dist/chunk-CV3LEQRD.js +0 -57
- package/dist/chunk-CYY7D5TQ.js +0 -57
- package/dist/chunk-DAHMHLM6.js +0 -102
- package/dist/chunk-DAMLAWGE.js +0 -68
- package/dist/chunk-F4YPGOQJ.js +0 -105
- package/dist/chunk-FQDXFNOI.js +0 -57
- package/dist/chunk-FQI7EJY2.js +0 -105
- package/dist/chunk-GAJCZDZ5.js +0 -286
- package/dist/chunk-GEOP77H3.js +0 -79
- package/dist/chunk-GRX3IQHC.js +0 -131
- package/dist/chunk-H53NQAC2.js +0 -131
- package/dist/chunk-HJYISR7Y.js +0 -382
- package/dist/chunk-HLSI4HQM.js +0 -105
- package/dist/chunk-IAOMCEYU.js +0 -68
- package/dist/chunk-J7RENRJG.js +0 -382
- package/dist/chunk-JZQKOM7X.js +0 -382
- package/dist/chunk-K75NWR5V.js +0 -108
- package/dist/chunk-KCMWJB53.js +0 -288
- package/dist/chunk-KJ4M6KAK.js +0 -57
- package/dist/chunk-L3JXU574.js +0 -77
- package/dist/chunk-LR2XPUPT.js +0 -236
- package/dist/chunk-MCWNGAZG.js +0 -198
- package/dist/chunk-MQTBFYEG.js +0 -288
- package/dist/chunk-NCUJWSGP.js +0 -287
- package/dist/chunk-NWEUBPSG.js +0 -79
- package/dist/chunk-OJ5EBWOQ.js +0 -232
- package/dist/chunk-PKQZWNS2.js +0 -131
- package/dist/chunk-PQJIQBQ5.js +0 -57
- package/dist/chunk-PX5AGAEX.js +0 -105
- package/dist/chunk-Q7HX4VZD.js +0 -197
- package/dist/chunk-QLVXFPE3.js +0 -145
- package/dist/chunk-QUC577LO.js +0 -79
- package/dist/chunk-RAL2W5UX.js +0 -55
- package/dist/chunk-RANNBYFJ.js +0 -105
- package/dist/chunk-RCSSFUGL.js +0 -131
- package/dist/chunk-RZ7TASUI.js +0 -57
- package/dist/chunk-SN7D2PJO.js +0 -68
- package/dist/chunk-T4WQUJAE.js +0 -79
- package/dist/chunk-U2Z5BABG.js +0 -57
- package/dist/chunk-UHC4DIK5.js +0 -105
- package/dist/chunk-UW2LYWIM.js +0 -131
- package/dist/chunk-VRCQBFSX.js +0 -102
- package/dist/chunk-W76N6IZV.js +0 -197
- package/dist/chunk-WMC556GK.js +0 -131
- package/dist/chunk-WTEZYXD2.js +0 -67
- package/dist/chunk-X7EWON4T.js +0 -105
- package/dist/chunk-XARAKKJ4.js +0 -197
- package/dist/chunk-Y6JDGDEE.js +0 -197
- package/dist/chunk-Y7FSNXMR.js +0 -382
- package/dist/chunk-YPZMUIB5.js +0 -50
- package/dist/chunk-ZMDUVLR4.js +0 -148
- package/dist/chunk-ZRFAICDG.js +0 -382
- package/dist/export-HEFUNSR4.js +0 -8
- package/dist/feedback-3U2WYQK6.js +0 -9
- package/dist/feedback-5IIX372K.js +0 -9
- package/dist/feedback-6S6DWGIU.js +0 -9
- package/dist/feedback-7DEOY2AP.js +0 -9
- package/dist/feedback-BBQT42R6.js +0 -9
- package/dist/feedback-CGCSAWQT.js +0 -9
- package/dist/feedback-NEDFOKMA.js +0 -9
- package/dist/feedback-OXGGJVNA.js +0 -9
- package/dist/feedback-ZJECE2FS.js +0 -8
- package/dist/help-NQUZ7TNJ.js +0 -10
- package/dist/login-D53NQ7UY.js +0 -10
- package/dist/login-GPXDNB2F.js +0 -10
- package/dist/login-HDF4GSTP.js +0 -10
- package/dist/login-HXQ3FDA7.js +0 -10
- package/dist/login-SDAZTJAK.js +0 -10
- package/dist/login-SM6LEDDA.js +0 -10
- package/dist/login-TDI7HBRZ.js +0 -10
- package/dist/login-Y7XXSNOZ.js +0 -10
- package/dist/logout-32RNT7G2.js +0 -10
- package/dist/logout-43W7N6JU.js +0 -10
- package/dist/logout-6KCD4WA3.js +0 -10
- package/dist/logout-BMHTSXIY.js +0 -10
- package/dist/logout-JNNJJYYL.js +0 -10
- package/dist/logout-LW42QASH.js +0 -10
- package/dist/logout-QLWM6P26.js +0 -10
- package/dist/logout-TL7GLGWU.js +0 -10
- package/dist/memory-GVYG653L.js +0 -8
- package/dist/new-MCN36AOD.js +0 -8
- package/dist/status-F6TQOCON.js +0 -8
- package/dist/status-IT5CYW37.js +0 -8
- package/dist/status-MRJOSVE3.js +0 -8
- package/dist/status-MWFV2DZG.js +0 -8
- package/dist/status-N3PMJRSB.js +0 -8
- package/dist/status-NK7YSBXZ.js +0 -8
- package/dist/status-QLQ5ZKJ3.js +0 -8
- package/dist/status-SQEFMII5.js +0 -8
- package/dist/status-U33PEUBO.js +0 -8
- package/dist/status-XAJH67SE.js +0 -8
package/dist/chunk-UHC4DIK5.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AUTOHAND_PATHS
|
|
3
|
-
} from "./chunk-DAMLAWGE.js";
|
|
4
|
-
|
|
5
|
-
// src/commands/agents-new.ts
|
|
6
|
-
import path from "path";
|
|
7
|
-
import fs from "fs-extra";
|
|
8
|
-
import chalk from "chalk";
|
|
9
|
-
import enquirer from "enquirer";
|
|
10
|
-
var metadata = {
|
|
11
|
-
command: "/agents new",
|
|
12
|
-
description: "create a new sub-agent from a description",
|
|
13
|
-
implemented: true,
|
|
14
|
-
prd: "prd/sub_agents_architecture.md"
|
|
15
|
-
};
|
|
16
|
-
async function createAgent(ctx) {
|
|
17
|
-
const answers = await enquirer.prompt([
|
|
18
|
-
{
|
|
19
|
-
type: "input",
|
|
20
|
-
name: "name",
|
|
21
|
-
message: "Agent name (e.g., Researcher, QA Tester)",
|
|
22
|
-
validate: (val) => typeof val === "string" && val.trim() ? true : "Name is required"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
type: "input",
|
|
26
|
-
name: "description",
|
|
27
|
-
message: "Briefly describe what the agent should do"
|
|
28
|
-
}
|
|
29
|
-
]);
|
|
30
|
-
const name = answers.name.trim();
|
|
31
|
-
const description = answers.description.trim();
|
|
32
|
-
if (!name) {
|
|
33
|
-
console.log(chalk.gray("Canceled: no name provided."));
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const filename = await ensureUniqueFilename(name);
|
|
37
|
-
const filePath = path.join(getAgentsDir(), filename);
|
|
38
|
-
const prompt = buildPrompt(name, description);
|
|
39
|
-
let content;
|
|
40
|
-
try {
|
|
41
|
-
const completion = await ctx.llm.complete({
|
|
42
|
-
messages: [
|
|
43
|
-
{
|
|
44
|
-
role: "system",
|
|
45
|
-
content: "You generate concise markdown definitions for sub-agents. Output only markdown with no code fences. Keep it short but complete."
|
|
46
|
-
},
|
|
47
|
-
{ role: "user", content: prompt }
|
|
48
|
-
],
|
|
49
|
-
maxTokens: 600
|
|
50
|
-
});
|
|
51
|
-
content = completion.content.trim();
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error(chalk.red(`Failed to generate agent: ${error.message}`));
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
await fs.ensureDir(getAgentsDir());
|
|
58
|
-
await fs.writeFile(filePath, content + "\n", "utf8");
|
|
59
|
-
console.log(chalk.green(`Saved new agent to ${filePath}`));
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error(chalk.red(`Failed to save agent: ${error.message}`));
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
function buildPrompt(name, description) {
|
|
67
|
-
return [
|
|
68
|
-
`Create a sub-agent markdown file for "${name}".`,
|
|
69
|
-
description ? `Agent description: ${description}` : "",
|
|
70
|
-
"Structure it as:",
|
|
71
|
-
"# <Name>",
|
|
72
|
-
"## Purpose",
|
|
73
|
-
"## Operating Mode (bullet list)",
|
|
74
|
-
"## Tools (bullet list; mention existing CLI tools and constraints briefly)",
|
|
75
|
-
"## Output Contract (what to return to main agent)",
|
|
76
|
-
"Be concise, 120-160 words total."
|
|
77
|
-
].filter(Boolean).join("\n");
|
|
78
|
-
}
|
|
79
|
-
function getAgentsDir() {
|
|
80
|
-
return AUTOHAND_PATHS.agents;
|
|
81
|
-
}
|
|
82
|
-
function slugify(input) {
|
|
83
|
-
return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "agent";
|
|
84
|
-
}
|
|
85
|
-
async function ensureUniqueFilename(name) {
|
|
86
|
-
const base = slugify(name);
|
|
87
|
-
const dir = getAgentsDir();
|
|
88
|
-
let candidate = `${base}.md`;
|
|
89
|
-
let counter = 1;
|
|
90
|
-
while (await fs.pathExists(path.join(dir, candidate))) {
|
|
91
|
-
candidate = `${base}-${counter}.md`;
|
|
92
|
-
counter += 1;
|
|
93
|
-
}
|
|
94
|
-
return candidate;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
metadata,
|
|
99
|
-
createAgent
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* @license
|
|
103
|
-
* Copyright 2025 Autohand AI LLC
|
|
104
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
105
|
-
*/
|
package/dist/chunk-UW2LYWIM.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getAuthClient,
|
|
3
|
-
saveConfig
|
|
4
|
-
} from "./chunk-A7HRTONQ.js";
|
|
5
|
-
import {
|
|
6
|
-
AUTH_CONFIG
|
|
7
|
-
} from "./chunk-2EPIFDFM.js";
|
|
8
|
-
|
|
9
|
-
// src/commands/login.ts
|
|
10
|
-
import chalk from "chalk";
|
|
11
|
-
import enquirer from "enquirer";
|
|
12
|
-
var metadata = {
|
|
13
|
-
command: "/login",
|
|
14
|
-
description: "sign in to your Autohand account",
|
|
15
|
-
implemented: true
|
|
16
|
-
};
|
|
17
|
-
async function openBrowser(url) {
|
|
18
|
-
try {
|
|
19
|
-
const open = await import("open").then((m) => m.default).catch(() => null);
|
|
20
|
-
if (open) {
|
|
21
|
-
await open(url);
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
const { exec } = await import("child_process");
|
|
25
|
-
const { promisify } = await import("util");
|
|
26
|
-
const execAsync = promisify(exec);
|
|
27
|
-
const platform = process.platform;
|
|
28
|
-
let command;
|
|
29
|
-
if (platform === "darwin") {
|
|
30
|
-
command = `open "${url}"`;
|
|
31
|
-
} else if (platform === "win32") {
|
|
32
|
-
command = `start "" "${url}"`;
|
|
33
|
-
} else {
|
|
34
|
-
command = `xdg-open "${url}"`;
|
|
35
|
-
}
|
|
36
|
-
await execAsync(command);
|
|
37
|
-
return true;
|
|
38
|
-
} catch {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function sleep(ms) {
|
|
43
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
44
|
-
}
|
|
45
|
-
async function login(ctx) {
|
|
46
|
-
const config = ctx.config;
|
|
47
|
-
if (config?.auth?.token && config?.auth?.user) {
|
|
48
|
-
const { continueLogin } = await enquirer.prompt({
|
|
49
|
-
type: "confirm",
|
|
50
|
-
name: "continueLogin",
|
|
51
|
-
message: `Already logged in as ${chalk.cyan(config.auth.user.email)}. Log in with a different account?`,
|
|
52
|
-
initial: false
|
|
53
|
-
});
|
|
54
|
-
if (!continueLogin) {
|
|
55
|
-
console.log(chalk.gray("Login cancelled."));
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const authClient = getAuthClient();
|
|
60
|
-
console.log(chalk.gray("Initiating authentication..."));
|
|
61
|
-
const initResult = await authClient.initiateDeviceAuth();
|
|
62
|
-
if (!initResult.success || !initResult.deviceCode || !initResult.userCode) {
|
|
63
|
-
console.log(chalk.red(`Failed to start login: ${initResult.error || "Unknown error"}`));
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
console.log();
|
|
67
|
-
console.log(chalk.bold("To sign in, visit:"));
|
|
68
|
-
console.log(chalk.cyan.underline(initResult.verificationUriComplete || `${AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`));
|
|
69
|
-
console.log();
|
|
70
|
-
console.log(chalk.gray("Or enter this code manually:"));
|
|
71
|
-
console.log(chalk.bold.yellow(` ${initResult.userCode}`));
|
|
72
|
-
console.log();
|
|
73
|
-
const browserOpened = await openBrowser(
|
|
74
|
-
initResult.verificationUriComplete || `${AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`
|
|
75
|
-
);
|
|
76
|
-
if (browserOpened) {
|
|
77
|
-
console.log(chalk.gray("Browser opened. Complete the login in your browser."));
|
|
78
|
-
} else {
|
|
79
|
-
console.log(chalk.yellow("Could not open browser automatically. Please visit the URL above."));
|
|
80
|
-
}
|
|
81
|
-
console.log();
|
|
82
|
-
console.log(chalk.gray("Waiting for authorization..."));
|
|
83
|
-
console.log(chalk.gray("(Press Ctrl+C to cancel)"));
|
|
84
|
-
const startTime = Date.now();
|
|
85
|
-
const timeout = AUTH_CONFIG.authTimeout;
|
|
86
|
-
const pollInterval = initResult.interval ? initResult.interval * 1e3 : AUTH_CONFIG.pollInterval;
|
|
87
|
-
let dots = 0;
|
|
88
|
-
const maxDots = 3;
|
|
89
|
-
while (Date.now() - startTime < timeout) {
|
|
90
|
-
process.stdout.write(`\r${chalk.gray("Waiting" + ".".repeat(dots + 1) + " ".repeat(maxDots - dots))}`);
|
|
91
|
-
dots = (dots + 1) % (maxDots + 1);
|
|
92
|
-
await sleep(pollInterval);
|
|
93
|
-
const pollResult = await authClient.pollDeviceAuth(initResult.deviceCode);
|
|
94
|
-
if (pollResult.status === "authorized" && pollResult.token && pollResult.user) {
|
|
95
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
96
|
-
const expiresAt = new Date(Date.now() + AUTH_CONFIG.sessionExpiryDays * 24 * 60 * 60 * 1e3).toISOString();
|
|
97
|
-
const updatedConfig = {
|
|
98
|
-
...config,
|
|
99
|
-
auth: {
|
|
100
|
-
token: pollResult.token,
|
|
101
|
-
user: pollResult.user,
|
|
102
|
-
expiresAt
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
await saveConfig(updatedConfig);
|
|
106
|
-
console.log();
|
|
107
|
-
console.log(chalk.green("Login successful!"));
|
|
108
|
-
console.log(chalk.cyan(`Welcome, ${pollResult.user.name || pollResult.user.email}!`));
|
|
109
|
-
console.log();
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
if (pollResult.status === "expired") {
|
|
113
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
114
|
-
console.log(chalk.red("Authorization code expired. Please try again."));
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
119
|
-
console.log(chalk.red("Authorization timed out. Please try again."));
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export {
|
|
124
|
-
metadata,
|
|
125
|
-
login
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* @license
|
|
129
|
-
* Copyright 2025 Autohand AI LLC
|
|
130
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
131
|
-
*/
|
package/dist/chunk-VRCQBFSX.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
// src/commands/agents-new.ts
|
|
2
|
-
import os from "os";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import fs from "fs-extra";
|
|
5
|
-
import chalk from "chalk";
|
|
6
|
-
import enquirer from "enquirer";
|
|
7
|
-
var metadata = {
|
|
8
|
-
command: "/agents new",
|
|
9
|
-
description: "create a new sub-agent from a description",
|
|
10
|
-
implemented: true,
|
|
11
|
-
prd: "prd/sub_agents_architecture.md"
|
|
12
|
-
};
|
|
13
|
-
async function createAgent(ctx) {
|
|
14
|
-
const answers = await enquirer.prompt([
|
|
15
|
-
{
|
|
16
|
-
type: "input",
|
|
17
|
-
name: "name",
|
|
18
|
-
message: "Agent name (e.g., Researcher, QA Tester)",
|
|
19
|
-
validate: (val) => !!val.trim() ? true : "Name is required"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: "input",
|
|
23
|
-
name: "description",
|
|
24
|
-
message: "Briefly describe what the agent should do"
|
|
25
|
-
}
|
|
26
|
-
]);
|
|
27
|
-
const name = answers.name.trim();
|
|
28
|
-
const description = answers.description.trim();
|
|
29
|
-
if (!name) {
|
|
30
|
-
console.log(chalk.gray("Canceled: no name provided."));
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const filename = await ensureUniqueFilename(name);
|
|
34
|
-
const filePath = path.join(getAgentsDir(), filename);
|
|
35
|
-
const prompt = buildPrompt(name, description);
|
|
36
|
-
let content;
|
|
37
|
-
try {
|
|
38
|
-
const completion = await ctx.llm.complete({
|
|
39
|
-
messages: [
|
|
40
|
-
{
|
|
41
|
-
role: "system",
|
|
42
|
-
content: "You generate concise markdown definitions for sub-agents. Output only markdown with no code fences. Keep it short but complete."
|
|
43
|
-
},
|
|
44
|
-
{ role: "user", content: prompt }
|
|
45
|
-
],
|
|
46
|
-
maxTokens: 600
|
|
47
|
-
});
|
|
48
|
-
content = completion.content.trim();
|
|
49
|
-
} catch (error) {
|
|
50
|
-
console.error(chalk.red(`Failed to generate agent: ${error.message}`));
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
await fs.ensureDir(getAgentsDir());
|
|
55
|
-
await fs.writeFile(filePath, content + "\n", "utf8");
|
|
56
|
-
console.log(chalk.green(`Saved new agent to ${filePath}`));
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error(chalk.red(`Failed to save agent: ${error.message}`));
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
function buildPrompt(name, description) {
|
|
64
|
-
return [
|
|
65
|
-
`Create a sub-agent markdown file for "${name}".`,
|
|
66
|
-
description ? `Agent description: ${description}` : "",
|
|
67
|
-
"Structure it as:",
|
|
68
|
-
"# <Name>",
|
|
69
|
-
"## Purpose",
|
|
70
|
-
"## Operating Mode (bullet list)",
|
|
71
|
-
"## Tools (bullet list; mention existing CLI tools and constraints briefly)",
|
|
72
|
-
"## Output Contract (what to return to main agent)",
|
|
73
|
-
"Be concise, 120-160 words total."
|
|
74
|
-
].filter(Boolean).join("\n");
|
|
75
|
-
}
|
|
76
|
-
function getAgentsDir() {
|
|
77
|
-
return path.join(os.homedir(), ".autohand-cli", "agents");
|
|
78
|
-
}
|
|
79
|
-
function slugify(input) {
|
|
80
|
-
return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "agent";
|
|
81
|
-
}
|
|
82
|
-
async function ensureUniqueFilename(name) {
|
|
83
|
-
const base = slugify(name);
|
|
84
|
-
const dir = getAgentsDir();
|
|
85
|
-
let candidate = `${base}.md`;
|
|
86
|
-
let counter = 1;
|
|
87
|
-
while (await fs.pathExists(path.join(dir, candidate))) {
|
|
88
|
-
candidate = `${base}-${counter}.md`;
|
|
89
|
-
counter += 1;
|
|
90
|
-
}
|
|
91
|
-
return candidate;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
metadata,
|
|
96
|
-
createAgent
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* @license
|
|
100
|
-
* Copyright 2025 Autohand AI LLC
|
|
101
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
102
|
-
*/
|
package/dist/chunk-W76N6IZV.js
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AUTOHAND_PATHS
|
|
3
|
-
} from "./chunk-SN7D2PJO.js";
|
|
4
|
-
|
|
5
|
-
// src/commands/agents.ts
|
|
6
|
-
import chalk from "chalk";
|
|
7
|
-
|
|
8
|
-
// src/core/agents/AgentRegistry.ts
|
|
9
|
-
import fs from "fs/promises";
|
|
10
|
-
import os from "os";
|
|
11
|
-
import path from "path";
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
var AgentConfigSchema = z.object({
|
|
14
|
-
description: z.string(),
|
|
15
|
-
systemPrompt: z.string(),
|
|
16
|
-
tools: z.array(z.string()),
|
|
17
|
-
model: z.string().optional()
|
|
18
|
-
});
|
|
19
|
-
var AgentRegistry = class _AgentRegistry {
|
|
20
|
-
constructor() {
|
|
21
|
-
this.agents = /* @__PURE__ */ new Map();
|
|
22
|
-
this.externalPaths = [];
|
|
23
|
-
this.agentsDir = AUTOHAND_PATHS.agents;
|
|
24
|
-
}
|
|
25
|
-
static getInstance() {
|
|
26
|
-
if (!_AgentRegistry.instance) {
|
|
27
|
-
_AgentRegistry.instance = new _AgentRegistry();
|
|
28
|
-
}
|
|
29
|
-
return _AgentRegistry.instance;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Set external agent paths from config
|
|
33
|
-
* Supports tilde (~) expansion for home directory
|
|
34
|
-
*/
|
|
35
|
-
setExternalPaths(paths) {
|
|
36
|
-
this.externalPaths = paths.map(
|
|
37
|
-
(p) => p.startsWith("~") ? path.join(os.homedir(), p.slice(1)) : p
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get configured external paths
|
|
42
|
-
*/
|
|
43
|
-
getExternalPaths() {
|
|
44
|
-
return [...this.externalPaths];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Scans the agents directory and all external paths for agent configurations.
|
|
48
|
-
*/
|
|
49
|
-
async loadAgents() {
|
|
50
|
-
this.agents.clear();
|
|
51
|
-
await this.loadAgentsFromDir(this.agentsDir, "user");
|
|
52
|
-
for (const extPath of this.externalPaths) {
|
|
53
|
-
await this.loadAgentsFromDir(extPath, "external");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Load agents from a specific directory
|
|
58
|
-
*/
|
|
59
|
-
async loadAgentsFromDir(dir, source) {
|
|
60
|
-
try {
|
|
61
|
-
if (source === "user") {
|
|
62
|
-
await fs.mkdir(dir, { recursive: true });
|
|
63
|
-
}
|
|
64
|
-
const exists = await fs.access(dir).then(() => true).catch(() => false);
|
|
65
|
-
if (!exists) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const files = await fs.readdir(dir);
|
|
69
|
-
for (const file of files) {
|
|
70
|
-
const filePath = path.join(dir, file);
|
|
71
|
-
const stat = await fs.stat(filePath).catch(() => null);
|
|
72
|
-
if (!stat?.isFile()) {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
if (file.endsWith(".json")) {
|
|
76
|
-
await this.loadJsonAgent(filePath, source);
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
if (file.endsWith(".md") || file.endsWith(".markdown")) {
|
|
80
|
-
await this.loadMarkdownAgent(filePath, source);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
} catch (error) {
|
|
84
|
-
if (source === "user") {
|
|
85
|
-
console.error(`Error loading agents from ${dir}:`, error);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
getAgent(name) {
|
|
90
|
-
return this.agents.get(name);
|
|
91
|
-
}
|
|
92
|
-
getAllAgents() {
|
|
93
|
-
return Array.from(this.agents.values());
|
|
94
|
-
}
|
|
95
|
-
getAgentsDirectory() {
|
|
96
|
-
return this.agentsDir;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Get agents filtered by source
|
|
100
|
-
*/
|
|
101
|
-
getAgentsBySource(source) {
|
|
102
|
-
return this.getAllAgents().filter((a) => a.source === source);
|
|
103
|
-
}
|
|
104
|
-
async loadJsonAgent(filePath, source) {
|
|
105
|
-
const name = path.basename(filePath, ".json");
|
|
106
|
-
try {
|
|
107
|
-
const content = await fs.readFile(filePath, "utf-8");
|
|
108
|
-
const json = JSON.parse(content);
|
|
109
|
-
const config = AgentConfigSchema.parse(json);
|
|
110
|
-
if (!this.agents.has(name)) {
|
|
111
|
-
this.agents.set(name, { name, path: filePath, source, ...config });
|
|
112
|
-
}
|
|
113
|
-
} catch (error) {
|
|
114
|
-
console.warn(`Failed to load agent '${name}': ${error.message}`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
async loadMarkdownAgent(filePath, source) {
|
|
118
|
-
const name = path.basename(filePath, path.extname(filePath));
|
|
119
|
-
try {
|
|
120
|
-
const content = await fs.readFile(filePath, "utf-8");
|
|
121
|
-
const description = extractMarkdownTitle(content) || `Agent ${name}`;
|
|
122
|
-
const definition = {
|
|
123
|
-
name,
|
|
124
|
-
path: filePath,
|
|
125
|
-
source,
|
|
126
|
-
description,
|
|
127
|
-
systemPrompt: content,
|
|
128
|
-
tools: [],
|
|
129
|
-
model: void 0
|
|
130
|
-
};
|
|
131
|
-
if (!this.agents.has(name)) {
|
|
132
|
-
this.agents.set(name, definition);
|
|
133
|
-
}
|
|
134
|
-
} catch (error) {
|
|
135
|
-
console.warn(`Failed to load agent '${name}': ${error.message}`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
function extractMarkdownTitle(content) {
|
|
140
|
-
const lines = content.split(/\r?\n/);
|
|
141
|
-
for (const line of lines) {
|
|
142
|
-
const trimmed = line.trim();
|
|
143
|
-
if (!trimmed) continue;
|
|
144
|
-
if (trimmed.startsWith("#")) {
|
|
145
|
-
return trimmed.replace(/^#+\s*/, "").trim() || null;
|
|
146
|
-
}
|
|
147
|
-
return trimmed;
|
|
148
|
-
}
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/commands/agents.ts
|
|
153
|
-
var metadata = {
|
|
154
|
-
command: "/agents",
|
|
155
|
-
description: "list available sub-agents (markdown or json)",
|
|
156
|
-
implemented: true,
|
|
157
|
-
prd: "prd/sub_agents_architecture.md"
|
|
158
|
-
};
|
|
159
|
-
async function handler() {
|
|
160
|
-
const registry = AgentRegistry.getInstance();
|
|
161
|
-
await registry.loadAgents();
|
|
162
|
-
const agents = registry.getAllAgents();
|
|
163
|
-
if (agents.length === 0) {
|
|
164
|
-
return `No agents found in ${chalk.cyan(registry.getAgentsDirectory())}.
|
|
165
|
-
Create a markdown file (e.g., helper.md) there to define a new sub-agent.`;
|
|
166
|
-
}
|
|
167
|
-
let output = chalk.bold("Available Agents:\n\n");
|
|
168
|
-
for (const agent of agents) {
|
|
169
|
-
output += `${chalk.green("\u{1F916} " + agent.name)}
|
|
170
|
-
`;
|
|
171
|
-
output += ` ${chalk.gray(agent.description)}
|
|
172
|
-
`;
|
|
173
|
-
output += ` ${chalk.blue("Path:")} ${agent.path}
|
|
174
|
-
`;
|
|
175
|
-
if (agent.model) {
|
|
176
|
-
output += ` ${chalk.yellow("Model:")} ${agent.model}
|
|
177
|
-
`;
|
|
178
|
-
}
|
|
179
|
-
if (agent.tools?.length) {
|
|
180
|
-
output += ` ${chalk.blue("Tools:")} ${agent.tools.join(", ")}
|
|
181
|
-
`;
|
|
182
|
-
}
|
|
183
|
-
output += "\n";
|
|
184
|
-
}
|
|
185
|
-
return output.trim();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export {
|
|
189
|
-
AgentRegistry,
|
|
190
|
-
metadata,
|
|
191
|
-
handler
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* @license
|
|
195
|
-
* Copyright 2025 Autohand AI LLC
|
|
196
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
197
|
-
*/
|
package/dist/chunk-WMC556GK.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getAuthClient,
|
|
3
|
-
saveConfig
|
|
4
|
-
} from "./chunk-3OD5MR23.js";
|
|
5
|
-
import {
|
|
6
|
-
AUTH_CONFIG
|
|
7
|
-
} from "./chunk-737A24RB.js";
|
|
8
|
-
|
|
9
|
-
// src/commands/login.ts
|
|
10
|
-
import chalk from "chalk";
|
|
11
|
-
import enquirer from "enquirer";
|
|
12
|
-
var metadata = {
|
|
13
|
-
command: "/login",
|
|
14
|
-
description: "sign in to your Autohand account",
|
|
15
|
-
implemented: true
|
|
16
|
-
};
|
|
17
|
-
async function openBrowser(url) {
|
|
18
|
-
try {
|
|
19
|
-
const open = await import("open").then((m) => m.default).catch(() => null);
|
|
20
|
-
if (open) {
|
|
21
|
-
await open(url);
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
const { exec } = await import("child_process");
|
|
25
|
-
const { promisify } = await import("util");
|
|
26
|
-
const execAsync = promisify(exec);
|
|
27
|
-
const platform = process.platform;
|
|
28
|
-
let command;
|
|
29
|
-
if (platform === "darwin") {
|
|
30
|
-
command = `open "${url}"`;
|
|
31
|
-
} else if (platform === "win32") {
|
|
32
|
-
command = `start "" "${url}"`;
|
|
33
|
-
} else {
|
|
34
|
-
command = `xdg-open "${url}"`;
|
|
35
|
-
}
|
|
36
|
-
await execAsync(command);
|
|
37
|
-
return true;
|
|
38
|
-
} catch {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function sleep(ms) {
|
|
43
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
44
|
-
}
|
|
45
|
-
async function login(ctx) {
|
|
46
|
-
const config = ctx.config;
|
|
47
|
-
if (config?.auth?.token && config?.auth?.user) {
|
|
48
|
-
const { continueLogin } = await enquirer.prompt({
|
|
49
|
-
type: "confirm",
|
|
50
|
-
name: "continueLogin",
|
|
51
|
-
message: `Already logged in as ${chalk.cyan(config.auth.user.email)}. Log in with a different account?`,
|
|
52
|
-
initial: false
|
|
53
|
-
});
|
|
54
|
-
if (!continueLogin) {
|
|
55
|
-
console.log(chalk.gray("Login cancelled."));
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const authClient = getAuthClient();
|
|
60
|
-
console.log(chalk.gray("Initiating authentication..."));
|
|
61
|
-
const initResult = await authClient.initiateDeviceAuth();
|
|
62
|
-
if (!initResult.success || !initResult.deviceCode || !initResult.userCode) {
|
|
63
|
-
console.log(chalk.red(`Failed to start login: ${initResult.error || "Unknown error"}`));
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
console.log();
|
|
67
|
-
console.log(chalk.bold("To sign in, visit:"));
|
|
68
|
-
console.log(chalk.cyan.underline(initResult.verificationUriComplete || `${AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`));
|
|
69
|
-
console.log();
|
|
70
|
-
console.log(chalk.gray("Or enter this code manually:"));
|
|
71
|
-
console.log(chalk.bold.yellow(` ${initResult.userCode}`));
|
|
72
|
-
console.log();
|
|
73
|
-
const browserOpened = await openBrowser(
|
|
74
|
-
initResult.verificationUriComplete || `${AUTH_CONFIG.authorizationUrl}?code=${initResult.userCode}`
|
|
75
|
-
);
|
|
76
|
-
if (browserOpened) {
|
|
77
|
-
console.log(chalk.gray("Browser opened. Complete the login in your browser."));
|
|
78
|
-
} else {
|
|
79
|
-
console.log(chalk.yellow("Could not open browser automatically. Please visit the URL above."));
|
|
80
|
-
}
|
|
81
|
-
console.log();
|
|
82
|
-
console.log(chalk.gray("Waiting for authorization..."));
|
|
83
|
-
console.log(chalk.gray("(Press Ctrl+C to cancel)"));
|
|
84
|
-
const startTime = Date.now();
|
|
85
|
-
const timeout = AUTH_CONFIG.authTimeout;
|
|
86
|
-
const pollInterval = initResult.interval ? initResult.interval * 1e3 : AUTH_CONFIG.pollInterval;
|
|
87
|
-
let dots = 0;
|
|
88
|
-
const maxDots = 3;
|
|
89
|
-
while (Date.now() - startTime < timeout) {
|
|
90
|
-
process.stdout.write(`\r${chalk.gray("Waiting" + ".".repeat(dots + 1) + " ".repeat(maxDots - dots))}`);
|
|
91
|
-
dots = (dots + 1) % (maxDots + 1);
|
|
92
|
-
await sleep(pollInterval);
|
|
93
|
-
const pollResult = await authClient.pollDeviceAuth(initResult.deviceCode);
|
|
94
|
-
if (pollResult.status === "authorized" && pollResult.token && pollResult.user) {
|
|
95
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
96
|
-
const expiresAt = new Date(Date.now() + AUTH_CONFIG.sessionExpiryDays * 24 * 60 * 60 * 1e3).toISOString();
|
|
97
|
-
const updatedConfig = {
|
|
98
|
-
...config,
|
|
99
|
-
auth: {
|
|
100
|
-
token: pollResult.token,
|
|
101
|
-
user: pollResult.user,
|
|
102
|
-
expiresAt
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
await saveConfig(updatedConfig);
|
|
106
|
-
console.log();
|
|
107
|
-
console.log(chalk.green("Login successful!"));
|
|
108
|
-
console.log(chalk.cyan(`Welcome, ${pollResult.user.name || pollResult.user.email}!`));
|
|
109
|
-
console.log();
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
if (pollResult.status === "expired") {
|
|
113
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
114
|
-
console.log(chalk.red("Authorization code expired. Please try again."));
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
process.stdout.write("\r" + " ".repeat(20) + "\r");
|
|
119
|
-
console.log(chalk.red("Authorization timed out. Please try again."));
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export {
|
|
124
|
-
metadata,
|
|
125
|
-
login
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* @license
|
|
129
|
-
* Copyright 2025 Autohand AI LLC
|
|
130
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
131
|
-
*/
|