@nalvietnam/avatar-cli 1.8.0 → 1.10.0
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/dist/index.js
CHANGED
|
@@ -2313,7 +2313,7 @@ function registerGitnexusCommand(program2) {
|
|
|
2313
2313
|
// src/commands/init.ts
|
|
2314
2314
|
import { basename, join as join24, relative as relative3, resolve } from "path";
|
|
2315
2315
|
import { confirm as confirm5, input as input5, select as select9 } from "@inquirer/prompts";
|
|
2316
|
-
import
|
|
2316
|
+
import boxen6 from "boxen";
|
|
2317
2317
|
|
|
2318
2318
|
// src/lib/add-team-pack-submodule-with-retry-on-network-fail.ts
|
|
2319
2319
|
import { spawnSync as spawnSync13 } from "child_process";
|
|
@@ -2482,7 +2482,8 @@ var TeamPackAccessAbortedError = class extends Error {
|
|
|
2482
2482
|
this.name = "TeamPackAccessAbortedError";
|
|
2483
2483
|
}
|
|
2484
2484
|
};
|
|
2485
|
-
|
|
2485
|
+
var DEFAULT_PACK_BRANCH = "main";
|
|
2486
|
+
async function addTeamPackSubmodule(projectRoot, tag, ssoEmail, latest = false) {
|
|
2486
2487
|
const url = resolveTeamPackRepoUrl();
|
|
2487
2488
|
const repoSlug = parseRepoSlugFromGitUrl(url);
|
|
2488
2489
|
if (repoSlug) {
|
|
@@ -2508,12 +2509,17 @@ async function addTeamPackSubmodule(projectRoot, tag, ssoEmail) {
|
|
|
2508
2509
|
}
|
|
2509
2510
|
throw err;
|
|
2510
2511
|
}
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
const allTags = await listTags(submoduleDir);
|
|
2515
|
-
target = pickLatestStableSemVerTag(allTags);
|
|
2512
|
+
if (tag) {
|
|
2513
|
+
await checkoutTagInSubmodule(TEAM_PACK_RELATIVE_PATH, tag, projectRoot);
|
|
2514
|
+
return { pinnedTag: tag };
|
|
2516
2515
|
}
|
|
2516
|
+
if (latest) {
|
|
2517
|
+
await checkoutBranchHeadInSubmodule(TEAM_PACK_RELATIVE_PATH, DEFAULT_PACK_BRANCH, projectRoot);
|
|
2518
|
+
return { pinnedTag: `${DEFAULT_PACK_BRANCH} (HEAD)` };
|
|
2519
|
+
}
|
|
2520
|
+
const submoduleDir = join16(projectRoot, TEAM_PACK_RELATIVE_PATH);
|
|
2521
|
+
const allTags = await listTags(submoduleDir);
|
|
2522
|
+
const target = pickLatestStableSemVerTag(allTags);
|
|
2517
2523
|
if (target) {
|
|
2518
2524
|
await checkoutTagInSubmodule(TEAM_PACK_RELATIVE_PATH, target, projectRoot);
|
|
2519
2525
|
}
|
|
@@ -2573,10 +2579,10 @@ async function handleSshPermissionError() {
|
|
|
2573
2579
|
]
|
|
2574
2580
|
});
|
|
2575
2581
|
}
|
|
2576
|
-
async function addTeamPackSubmoduleWithRetryOnNetworkFail(projectRoot, tag, ssoEmail) {
|
|
2582
|
+
async function addTeamPackSubmoduleWithRetryOnNetworkFail(projectRoot, tag, ssoEmail, latest = false) {
|
|
2577
2583
|
while (true) {
|
|
2578
2584
|
try {
|
|
2579
|
-
const result = await addTeamPackSubmodule(projectRoot, tag, ssoEmail);
|
|
2585
|
+
const result = await addTeamPackSubmodule(projectRoot, tag, ssoEmail, latest);
|
|
2580
2586
|
return { pinnedTag: result.pinnedTag, skipped: false };
|
|
2581
2587
|
} catch (err) {
|
|
2582
2588
|
if (err instanceof TeamPackAccessAbortedError) throw err;
|
|
@@ -3201,6 +3207,42 @@ function linkExistingRemoteToWorkspace(args) {
|
|
|
3201
3207
|
return { sshUrl, httpsUrl };
|
|
3202
3208
|
}
|
|
3203
3209
|
|
|
3210
|
+
// src/lib/format-pack-commands-cheatsheet-box.ts
|
|
3211
|
+
import boxen4 from "boxen";
|
|
3212
|
+
var PACK_COMMAND_CHEATSHEET = [
|
|
3213
|
+
{ cmd: "/avatar:help", desc: "H\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng Avatar \u2014 ch\u1EC9 c\u1EA7n g\xF5 t\u1EF1 nhi\xEAn" },
|
|
3214
|
+
{ cmd: "/avatar:brainstorm", desc: "Brainstorm \xFD t\u01B0\u1EDFng cho m\u1ED9t feature" },
|
|
3215
|
+
{ cmd: "/avatar:plan", desc: "T\u1EA1o plan th\xF4ng minh v\u1EDBi prompt enhancement" },
|
|
3216
|
+
{ cmd: "/avatar:scout", desc: "T\xECm file li\xEAn quan trong codebase, ti\u1EBFt ki\u1EC7m token" },
|
|
3217
|
+
{ cmd: "/avatar:implement", desc: "B\u1EAFt \u0111\u1EA7u code & test theo plan c\xF3 s\u1EB5n" },
|
|
3218
|
+
{ cmd: "/avatar:build-full-flow", desc: "Implement m\u1ED9t feature t\u1EEBng b\u01B0\u1EDBc (end-to-end)" },
|
|
3219
|
+
{ cmd: "/avatar:fix", desc: "Ph\xE2n t\xEDch v\xE0 fix v\u1EA5n \u0111\u1EC1 t\u1EF1 \u0111i\u1EC1u h\u01B0\u1EDBng" },
|
|
3220
|
+
{ cmd: "/avatar:debug", desc: "Debug v\u1EA5n \u0111\u1EC1 k\u1EF9 thu\u1EADt + \u0111\u01B0a ra gi\u1EA3i ph\xE1p" },
|
|
3221
|
+
{ cmd: "/avatar:test", desc: "Ch\u1EA1y test tr\xEAn m\xE1y + ph\xE2n t\xEDch b\xE1o c\xE1o t\u1ED5ng h\u1EE3p" },
|
|
3222
|
+
{ cmd: "/avatar:design:good", desc: "T\u1EA1o thi\u1EBFt k\u1EBF ch\u1EC9n chu, s\u1ED1ng \u0111\u1ED9ng" },
|
|
3223
|
+
{ cmd: "/avatar:docs:init", desc: "Ph\xE2n t\xEDch codebase + t\u1EA1o t\xE0i li\u1EC7u kh\u1EDFi \u0111\u1EA7u" },
|
|
3224
|
+
{ cmd: "/avatar:status", desc: "Xem l\u1EA1i thay \u0111\u1ED5i g\u1EA7n \u0111\xE2y + t\u1ED5ng k\u1EBFt c\xF4ng vi\u1EC7c" },
|
|
3225
|
+
{ cmd: "/avatar:journal", desc: "Ghi nh\u1EADt k\xFD session" }
|
|
3226
|
+
];
|
|
3227
|
+
function formatPackCommandsCheatsheetBox() {
|
|
3228
|
+
const maxCmdWidth = Math.max(...PACK_COMMAND_CHEATSHEET.map((e) => e.cmd.length));
|
|
3229
|
+
const header = chalk.bold("\u{1F3AF} Slash commands t\u1EEB team-ai-pack");
|
|
3230
|
+
const subheader = chalk.dim("G\xF5 trong Claude Code session \u0111\u1EC3 g\u1ECDi capability c\u1EE7a pack:");
|
|
3231
|
+
const lines = PACK_COMMAND_CHEATSHEET.map((e) => {
|
|
3232
|
+
const cmdPadded = chalk.cyan(e.cmd.padEnd(maxCmdWidth));
|
|
3233
|
+
return ` ${cmdPadded} ${chalk.dim(e.desc)}`;
|
|
3234
|
+
});
|
|
3235
|
+
const footer = chalk.dim(
|
|
3236
|
+
"Catalog \u0111\u1EA7y \u0111\u1EE7 46 commands: cat .claude/pack/scripts/commands_data.yaml"
|
|
3237
|
+
);
|
|
3238
|
+
const content = [header, subheader, "", ...lines, "", footer].join("\n");
|
|
3239
|
+
return boxen4(content, {
|
|
3240
|
+
padding: 1,
|
|
3241
|
+
borderStyle: "round",
|
|
3242
|
+
borderColor: "cyan"
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3204
3246
|
// src/lib/merge-pack-settings-into-project-settings.ts
|
|
3205
3247
|
import { promises as fs9 } from "fs";
|
|
3206
3248
|
import { join as join17 } from "path";
|
|
@@ -3761,7 +3803,7 @@ function buildScaffoldVariables(args) {
|
|
|
3761
3803
|
}
|
|
3762
3804
|
|
|
3763
3805
|
// src/commands/login.ts
|
|
3764
|
-
import
|
|
3806
|
+
import boxen5 from "boxen";
|
|
3765
3807
|
import open from "open";
|
|
3766
3808
|
|
|
3767
3809
|
// src/lib/google-oauth-device-flow.ts
|
|
@@ -3908,7 +3950,7 @@ async function runLogin(opts) {
|
|
|
3908
3950
|
"",
|
|
3909
3951
|
`Ho\u1EB7c Avatar t\u1EF1 m\u1EDF browser, click ${chalk.green("Allow")}...`
|
|
3910
3952
|
].join("\n");
|
|
3911
|
-
process.stdout.write(`${
|
|
3953
|
+
process.stdout.write(`${boxen5(instructions, { padding: 1, borderStyle: "round" })}
|
|
3912
3954
|
`);
|
|
3913
3955
|
void open(verificationUrl).catch(() => {
|
|
3914
3956
|
log.dim("(Kh\xF4ng m\u1EDF \u0111\u01B0\u1EE3c browser t\u1EF1 \u0111\u1ED9ng \u2014 copy URL \u1EDF tr\xEAn)");
|
|
@@ -3963,7 +4005,7 @@ function parseBootstrapStrategyOpts(opts) {
|
|
|
3963
4005
|
);
|
|
3964
4006
|
}
|
|
3965
4007
|
function registerInitCommand(program2) {
|
|
3966
|
-
program2.command("init").description("Kh\u1EDFi t\u1EA1o Avatar \u2014 3 flow t\u1EF1 nh\u1EADn di\u1EC7n (repo / folder / new)").option("--project-status <val>", "existing-remote | existing-folder | new-project").option("--folder-path <path>", "\u0110\u01B0\u1EDDng d\u1EABn folder hi\u1EC7n c\xF3 (flow existing-folder)").option("--create-remote", "Force t\u1EA1o remote qua gh (flow existing-folder ho\u1EB7c new-project)").option("--repo-visibility <val>", "private (m\u1EB7c \u0111\u1ECBnh) | public").option("--repo-org <name>", "GitHub org/owner cho repo m\u1EDBi").option("--client-repo <url>", "URL git remote (flow existing-remote)").option("--workspace-name <name>", "T\xEAn workspace").option("--workspace-parent <path>", "Th\u01B0 m\u1EE5c cha t\u1EA1o workspace (m\u1EB7c \u0111\u1ECBnh . \u2014 CWD)").option("--pack-version <tag>", "Pin team-ai-pack v\xE0o tag c\u1EE5 th\u1EC3").option("--team-owner <email>", "Email team owner (b\u1ECF qua prompt)").option("--description <text>", "M\xF4 t\u1EA3 1 d\xF2ng c\u1EE7a d\u1EF1 \xE1n").option("--skip-scan", "B\u1ECF qua project-scanner sau scaffold").option("--skip-team-pack", "B\u1ECF qua submodule team-ai-pack (test mode)").option("--force", "B\u1ECF qua prompt khi workspace path \u0111\xE3 t\u1ED3n t\u1EA1i").option("--yes", "Auto-confirm t\u1EA5t c\u1EA3 prompt").option("--no-commit", "Skip commit workspace initial state (m\u1EB7c \u0111\u1ECBnh LU\xD4N commit)").option("--workspace-remote", "T\u1EA1o GitHub remote cho workspace root (default: prompt)").option("--ai-skip", "B\u1ECF qua phase AI setup (CI/test mode \u2014 ch\u1EA1y `avatar ai setup` sau)").option(
|
|
4008
|
+
program2.command("init").description("Kh\u1EDFi t\u1EA1o Avatar \u2014 3 flow t\u1EF1 nh\u1EADn di\u1EC7n (repo / folder / new)").option("--project-status <val>", "existing-remote | existing-folder | new-project").option("--folder-path <path>", "\u0110\u01B0\u1EDDng d\u1EABn folder hi\u1EC7n c\xF3 (flow existing-folder)").option("--create-remote", "Force t\u1EA1o remote qua gh (flow existing-folder ho\u1EB7c new-project)").option("--repo-visibility <val>", "private (m\u1EB7c \u0111\u1ECBnh) | public").option("--repo-org <name>", "GitHub org/owner cho repo m\u1EDBi").option("--client-repo <url>", "URL git remote (flow existing-remote)").option("--workspace-name <name>", "T\xEAn workspace").option("--workspace-parent <path>", "Th\u01B0 m\u1EE5c cha t\u1EA1o workspace (m\u1EB7c \u0111\u1ECBnh . \u2014 CWD)").option("--pack-version <tag>", "Pin team-ai-pack v\xE0o tag c\u1EE5 th\u1EC3").option("--latest", "Pull HEAD c\u1EE7a team-ai-pack main branch (b\u1ECF qua tag SemVer, bleeding-edge)").option("--team-owner <email>", "Email team owner (b\u1ECF qua prompt)").option("--description <text>", "M\xF4 t\u1EA3 1 d\xF2ng c\u1EE7a d\u1EF1 \xE1n").option("--skip-scan", "B\u1ECF qua project-scanner sau scaffold").option("--skip-team-pack", "B\u1ECF qua submodule team-ai-pack (test mode)").option("--force", "B\u1ECF qua prompt khi workspace path \u0111\xE3 t\u1ED3n t\u1EA1i").option("--yes", "Auto-confirm t\u1EA5t c\u1EA3 prompt").option("--no-commit", "Skip commit workspace initial state (m\u1EB7c \u0111\u1ECBnh LU\xD4N commit)").option("--workspace-remote", "T\u1EA1o GitHub remote cho workspace root (default: prompt)").option("--ai-skip", "B\u1ECF qua phase AI setup (CI/test mode \u2014 ch\u1EA1y `avatar ai setup` sau)").option(
|
|
3967
4009
|
"--gitnexus-skip",
|
|
3968
4010
|
"B\u1ECF qua phase GitNexus setup (M10 \u2014 ch\u1EA1y `avatar gitnexus install` sau)"
|
|
3969
4011
|
).option(
|
|
@@ -4065,6 +4107,7 @@ async function runInitFromExistingRemote(opts, ownerEmail) {
|
|
|
4065
4107
|
skipTeamPack: opts.skipTeamPack,
|
|
4066
4108
|
description: opts.description ?? `Avatar workspace cho ${remoteUrl}`,
|
|
4067
4109
|
packVersion: opts.packVersion,
|
|
4110
|
+
packLatest: opts.latest,
|
|
4068
4111
|
autoYes: opts.yes,
|
|
4069
4112
|
skipCommit: opts.commit === false,
|
|
4070
4113
|
createWorkspaceRemote: opts.workspaceRemote,
|
|
@@ -4102,6 +4145,7 @@ async function runInitFromExistingFolder(opts, ownerEmail) {
|
|
|
4102
4145
|
skipTeamPack: opts.skipTeamPack,
|
|
4103
4146
|
description: opts.description ?? `Avatar workspace cho folder ${folderPath}`,
|
|
4104
4147
|
packVersion: opts.packVersion,
|
|
4148
|
+
packLatest: opts.latest,
|
|
4105
4149
|
autoYes: opts.yes,
|
|
4106
4150
|
skipCommit: opts.commit === false,
|
|
4107
4151
|
createWorkspaceRemote: opts.workspaceRemote,
|
|
@@ -4151,7 +4195,9 @@ async function runInitFromScratch(opts, ownerEmail) {
|
|
|
4151
4195
|
const result = await addTeamPackSubmoduleWithRetryOnNetworkFail(
|
|
4152
4196
|
workspacePath,
|
|
4153
4197
|
opts.packVersion,
|
|
4154
|
-
ownerEmail
|
|
4198
|
+
ownerEmail,
|
|
4199
|
+
opts.latest === true && !opts.packVersion
|
|
4200
|
+
// v1.10.0: latest mode khi flag set + không có explicit tag
|
|
4155
4201
|
);
|
|
4156
4202
|
pinnedTag = result.pinnedTag ?? "HEAD";
|
|
4157
4203
|
sp.succeed(`Pin team-ai-pack v\xE0o ${pinnedTag}`);
|
|
@@ -4227,7 +4273,9 @@ async function scaffoldWorkspaceWithSrcSubmodule(args) {
|
|
|
4227
4273
|
const result = await addTeamPackSubmoduleWithRetryOnNetworkFail(
|
|
4228
4274
|
args.workspacePath,
|
|
4229
4275
|
args.packVersion,
|
|
4230
|
-
args.ssoEmail
|
|
4276
|
+
args.ssoEmail,
|
|
4277
|
+
args.packLatest === true && !args.packVersion
|
|
4278
|
+
// v1.10.0
|
|
4231
4279
|
);
|
|
4232
4280
|
pinnedTag = result.pinnedTag ?? "HEAD";
|
|
4233
4281
|
sp.succeed(`Pin team-ai-pack v\xE0o ${pinnedTag}`);
|
|
@@ -4305,7 +4353,7 @@ async function finalizeWorkspaceScaffold(args) {
|
|
|
4305
4353
|
await writeRootClaudeMd(args.workspacePath, updatedVars);
|
|
4306
4354
|
log.dim("Updated CLAUDE.md v\u1EDBi GitNexus section");
|
|
4307
4355
|
}
|
|
4308
|
-
printInitSuccessBox(args.workspacePath, args.flow, aiResult, gitnexusResult);
|
|
4356
|
+
await printInitSuccessBox(args.workspacePath, args.flow, aiResult, gitnexusResult);
|
|
4309
4357
|
}
|
|
4310
4358
|
async function autoSyncPackOnInit(workspacePath) {
|
|
4311
4359
|
const packDir = join24(workspacePath, TEAM_PACK_RELATIVE_PATH);
|
|
@@ -4499,7 +4547,7 @@ function formatGitnexusStatusLine(result) {
|
|
|
4499
4547
|
}
|
|
4500
4548
|
return ` ${chalk.yellow("GitNexus:")} skipped (${(result.reason ?? "unknown").slice(0, 40)}) \xB7 th\u1EED ${chalk.cyan("avatar gitnexus install")}`;
|
|
4501
4549
|
}
|
|
4502
|
-
function printInitSuccessBox(rootPath, flow, aiResult = null, gitnexusResult = null) {
|
|
4550
|
+
async function printInitSuccessBox(rootPath, flow, aiResult = null, gitnexusResult = null) {
|
|
4503
4551
|
const lines = [
|
|
4504
4552
|
`${chalk.green("\u2713")} Workspace s\u1EB5n s\xE0ng: ${relative3(process.cwd(), rootPath) || rootPath}`,
|
|
4505
4553
|
` ${chalk.dim(`(flow: ${flow})`)}`,
|
|
@@ -4513,8 +4561,14 @@ function printInitSuccessBox(rootPath, flow, aiResult = null, gitnexusResult = n
|
|
|
4513
4561
|
` ${chalk.cyan("avatar sync")} Pull team-ai-pack m\u1EDBi`,
|
|
4514
4562
|
` ${chalk.cyan("avatar uninstall")} G\u1EE1 Avatar (gi\u1EEF code)`
|
|
4515
4563
|
];
|
|
4516
|
-
process.stdout.write(`${
|
|
4564
|
+
process.stdout.write(`${boxen6(lines.join("\n"), { padding: 1, borderStyle: "round" })}
|
|
4565
|
+
`);
|
|
4566
|
+
const packDir = join24(rootPath, TEAM_PACK_RELATIVE_PATH);
|
|
4567
|
+
if (await pathExists(packDir)) {
|
|
4568
|
+
process.stdout.write(`
|
|
4569
|
+
${formatPackCommandsCheatsheetBox()}
|
|
4517
4570
|
`);
|
|
4571
|
+
}
|
|
4518
4572
|
}
|
|
4519
4573
|
|
|
4520
4574
|
// src/lib/not-implemented-stub.ts
|
|
@@ -4566,7 +4620,7 @@ function registerSecretsCommand(program2) {
|
|
|
4566
4620
|
// src/commands/status.ts
|
|
4567
4621
|
import { promises as fs13 } from "fs";
|
|
4568
4622
|
import { join as join26 } from "path";
|
|
4569
|
-
import
|
|
4623
|
+
import boxen7 from "boxen";
|
|
4570
4624
|
|
|
4571
4625
|
// src/lib/pack-backup-manager.ts
|
|
4572
4626
|
import { promises as fs12 } from "fs";
|
|
@@ -4644,7 +4698,7 @@ function renderStatusBox(s) {
|
|
|
4644
4698
|
`${chalk.dim("Backups:")} ${s.backupCount}`,
|
|
4645
4699
|
`${chalk.dim("Tech stack:")} ${s.techStackSummary}`
|
|
4646
4700
|
];
|
|
4647
|
-
process.stdout.write(`${
|
|
4701
|
+
process.stdout.write(`${boxen7(lines.join("\n"), { padding: 1, borderStyle: "round" })}
|
|
4648
4702
|
`);
|
|
4649
4703
|
}
|
|
4650
4704
|
|
|
@@ -4694,7 +4748,7 @@ async function buildSyncPreview(packDir, claudeDir, targetVersion) {
|
|
|
4694
4748
|
}
|
|
4695
4749
|
|
|
4696
4750
|
// src/commands/sync.ts
|
|
4697
|
-
var
|
|
4751
|
+
var DEFAULT_PACK_BRANCH2 = "main";
|
|
4698
4752
|
async function syncAction(opts) {
|
|
4699
4753
|
const projectRoot = process.cwd();
|
|
4700
4754
|
const claudeDir = join28(projectRoot, ".claude");
|
|
@@ -4718,14 +4772,14 @@ async function syncAction(opts) {
|
|
|
4718
4772
|
const allTags = await listTags(packDir);
|
|
4719
4773
|
let targetVersion;
|
|
4720
4774
|
if (useLatestMode) {
|
|
4721
|
-
targetVersion = `${
|
|
4775
|
+
targetVersion = `${DEFAULT_PACK_BRANCH2} (HEAD)`;
|
|
4722
4776
|
} else {
|
|
4723
4777
|
const picked = opts.version ?? pickLatestStableSemVerTag(allTags);
|
|
4724
4778
|
if (!picked) {
|
|
4725
4779
|
log.error(
|
|
4726
4780
|
`Kh\xF4ng t\xECm th\u1EA5y stable SemVer tag (vMAJOR.MINOR.PATCH) trong team-ai-pack submodule.
|
|
4727
4781
|
Tags hi\u1EC7n c\xF3: ${allTags.length > 0 ? allTags.join(", ") : "(none)"}
|
|
4728
|
-
Pass --version <tag> r\xF5 r\xE0ng, ho\u1EB7c d\xF9ng --latest \u0111\u1EC3 pull HEAD branch ${
|
|
4782
|
+
Pass --version <tag> r\xF5 r\xE0ng, ho\u1EB7c d\xF9ng --latest \u0111\u1EC3 pull HEAD branch ${DEFAULT_PACK_BRANCH2}.`
|
|
4729
4783
|
);
|
|
4730
4784
|
process.exit(1);
|
|
4731
4785
|
return;
|
|
@@ -4755,8 +4809,8 @@ async function syncAction(opts) {
|
|
|
4755
4809
|
return;
|
|
4756
4810
|
}
|
|
4757
4811
|
if (useLatestMode) {
|
|
4758
|
-
log.info(`Pulling HEAD c\u1EE7a branch ${
|
|
4759
|
-
await checkoutBranchHeadInSubmodule(TEAM_PACK_RELATIVE_PATH,
|
|
4812
|
+
log.info(`Pulling HEAD c\u1EE7a branch ${DEFAULT_PACK_BRANCH2} (bleeding-edge mode)...`);
|
|
4813
|
+
await checkoutBranchHeadInSubmodule(TEAM_PACK_RELATIVE_PATH, DEFAULT_PACK_BRANCH2, projectRoot);
|
|
4760
4814
|
const sha = await currentCommitSha(packDir);
|
|
4761
4815
|
log.dim(` HEAD = ${sha.slice(0, 7)}`);
|
|
4762
4816
|
log.warn(
|
|
@@ -4836,7 +4890,7 @@ function registerToolsCommand(program2) {
|
|
|
4836
4890
|
// src/commands/uninstall.ts
|
|
4837
4891
|
import { relative as relative4 } from "path";
|
|
4838
4892
|
import { confirm as confirm6 } from "@inquirer/prompts";
|
|
4839
|
-
import
|
|
4893
|
+
import boxen8 from "boxen";
|
|
4840
4894
|
|
|
4841
4895
|
// src/lib/create-uninstall-backup-snapshot.ts
|
|
4842
4896
|
import { cp, mkdir, writeFile } from "fs/promises";
|
|
@@ -4990,7 +5044,7 @@ async function removeSubmoduleEntry(gitmodulesPath, submodulePath) {
|
|
|
4990
5044
|
}
|
|
4991
5045
|
|
|
4992
5046
|
// src/commands/uninstall.ts
|
|
4993
|
-
var CLI_VERSION = "1.
|
|
5047
|
+
var CLI_VERSION = "1.10.0";
|
|
4994
5048
|
function registerUninstallCommand(program2) {
|
|
4995
5049
|
program2.command("uninstall").description("G\u1EE1 Avatar kh\u1ECFi project \u2014 backup t\u1EF1 \u0111\u1ED9ng (M11)").option("--yes", "Skip confirm prompt").option("--no-backup", "Kh\xF4ng t\u1EA1o backup tr\u01B0\u1EDBc khi x\xF3a (nguy hi\u1EC3m)").option("--keep-submodule", "Gi\u1EEF submodule .claude/pack/").option("--keep-hooks", "Gi\u1EEF git hooks post-merge, pre-push").option("--dry-run", "Hi\u1EC3n th\u1ECB danh s\xE1ch s\u1EBD x\xF3a, kh\xF4ng th\u1EF1c thi").action(async (opts) => {
|
|
4996
5050
|
try {
|
|
@@ -5067,12 +5121,12 @@ function printUninstallSuccessBox(backupPath) {
|
|
|
5067
5121
|
lines.push(` ${chalk.dim("Backup:")} ${backupPath}`);
|
|
5068
5122
|
lines.push(` ${chalk.dim("Restore:")} ${chalk.cyan(`cp -r "${backupPath}"/* .`)}`);
|
|
5069
5123
|
}
|
|
5070
|
-
process.stdout.write(`${
|
|
5124
|
+
process.stdout.write(`${boxen8(lines.join("\n"), { padding: 1, borderStyle: "round" })}
|
|
5071
5125
|
`);
|
|
5072
5126
|
}
|
|
5073
5127
|
|
|
5074
5128
|
// src/index.ts
|
|
5075
|
-
var CLI_VERSION2 = "1.
|
|
5129
|
+
var CLI_VERSION2 = "1.10.0";
|
|
5076
5130
|
var program = new Command();
|
|
5077
5131
|
program.name("avatar").description("AI harness CLI for NAL Vietnam engineering").version(CLI_VERSION2, "-v, --version", "Hi\u1EC3n th\u1ECB phi\xEAn b\u1EA3n Avatar CLI").addHelpText(
|
|
5078
5132
|
"beforeAll",
|