@chiendt/ack-cli 1.2.0-dev.1 → 1.2.0-dev.2
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/cli-manifest.json +2 -2
- package/dist/index.js +30 -26
- package/package.json +1 -1
package/cli-manifest.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -63710,7 +63710,7 @@ var package_default;
|
|
|
63710
63710
|
var init_package = __esm(() => {
|
|
63711
63711
|
package_default = {
|
|
63712
63712
|
name: "@chiendt/ack-cli",
|
|
63713
|
-
version: "1.2.0-dev.
|
|
63713
|
+
version: "1.2.0-dev.2",
|
|
63714
63714
|
description: "ACK CLI - tool for bootstrapping and updating ACK kits (Claude Code agent kits)",
|
|
63715
63715
|
type: "module",
|
|
63716
63716
|
repository: {
|
|
@@ -77044,7 +77044,7 @@ import { createHash as createHash10 } from "node:crypto";
|
|
|
77044
77044
|
import { existsSync as existsSync84, mkdirSync as mkdirSync5, readFileSync as readFileSync21, readdirSync as readdirSync12, statSync as statSync15 } from "node:fs";
|
|
77045
77045
|
import { rename as rename17, writeFile as writeFile42 } from "node:fs/promises";
|
|
77046
77046
|
import { homedir as homedir54 } from "node:os";
|
|
77047
|
-
import { basename as
|
|
77047
|
+
import { basename as basename34, join as join166 } from "node:path";
|
|
77048
77048
|
function getCachedContext(repoPath) {
|
|
77049
77049
|
const cachePath = getCacheFilePath(repoPath);
|
|
77050
77050
|
if (!existsSync84(cachePath))
|
|
@@ -77112,7 +77112,7 @@ function getDocSourcePaths(repoPath) {
|
|
|
77112
77112
|
return paths.sort();
|
|
77113
77113
|
}
|
|
77114
77114
|
function getCacheFilePath(repoPath) {
|
|
77115
|
-
const repoName =
|
|
77115
|
+
const repoName = basename34(repoPath).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
77116
77116
|
const pathHash = createHash10("sha256").update(repoPath).digest("hex").slice(0, 8);
|
|
77117
77117
|
return join166(CACHE_DIR, `${repoName}-${pathHash}-context-cache.json`);
|
|
77118
77118
|
}
|
|
@@ -90777,9 +90777,10 @@ function mcpEntryTemplate(skillName, skillsRelToProject) {
|
|
|
90777
90777
|
const env3 = ENV_FOR.get(skillName);
|
|
90778
90778
|
if (!env3)
|
|
90779
90779
|
return null;
|
|
90780
|
+
const relPosix = skillsRelToProject.replace(/\\/g, "/");
|
|
90780
90781
|
return {
|
|
90781
90782
|
command: "node",
|
|
90782
|
-
args: TSX_ARGS(skillName).map((a3) => a3.replace("<SKILLS_REL>",
|
|
90783
|
+
args: TSX_ARGS(skillName).map((a3) => a3.replace("<SKILLS_REL>", relPosix)),
|
|
90783
90784
|
env: env3
|
|
90784
90785
|
};
|
|
90785
90786
|
}
|
|
@@ -90964,9 +90965,12 @@ function defaultMcpJsonPath(projectRoot) {
|
|
|
90964
90965
|
// src/commands/fqc-qa/skill-discovery.ts
|
|
90965
90966
|
var import_gray_matter12 = __toESM(require_gray_matter(), 1);
|
|
90966
90967
|
import { existsSync as existsSync63, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync11 } from "node:fs";
|
|
90967
|
-
import { join as join92, resolve as resolve36 } from "node:path";
|
|
90968
|
+
import { basename as basename26, join as join92, resolve as resolve36 } from "node:path";
|
|
90968
90969
|
var FQC_QA_PREFIX = "fqc-qa-";
|
|
90969
90970
|
var VALID_KINDS = new Set(["mcp", "lib", "gate"]);
|
|
90971
|
+
function deriveDirName(skillDir) {
|
|
90972
|
+
return basename26(skillDir.replace(/\\/g, "/"));
|
|
90973
|
+
}
|
|
90970
90974
|
function resolveSkillsRoot(opts = {}) {
|
|
90971
90975
|
if (opts.source)
|
|
90972
90976
|
return resolve36(opts.source);
|
|
@@ -91024,7 +91028,7 @@ function discoverSkills2(opts = {}) {
|
|
|
91024
91028
|
if (!kindRaw || !VALID_KINDS.has(kindRaw)) {
|
|
91025
91029
|
throw new Error(`SKILL.md missing or invalid metadata.kind (got ${JSON.stringify(kindRaw)}) at ${skillMdPath}. Expected one of: mcp, lib, gate.`);
|
|
91026
91030
|
}
|
|
91027
|
-
const dirName = skillDir
|
|
91031
|
+
const dirName = deriveDirName(skillDir);
|
|
91028
91032
|
const registeredName = String(fm.name ?? dirName);
|
|
91029
91033
|
const shortName = dirName.replace(FQC_QA_PREFIX, "");
|
|
91030
91034
|
const scriptsDir = join92(skillDir, "scripts");
|
|
@@ -103480,7 +103484,7 @@ init_logger();
|
|
|
103480
103484
|
init_types3();
|
|
103481
103485
|
var import_fs_extra28 = __toESM(require_lib(), 1);
|
|
103482
103486
|
import { copyFile as copyFile8, mkdir as mkdir34, readdir as readdir37, rm as rm16, stat as stat21 } from "node:fs/promises";
|
|
103483
|
-
import { basename as
|
|
103487
|
+
import { basename as basename27, join as join130, normalize as normalize9 } from "node:path";
|
|
103484
103488
|
function validatePath2(path9, paramName) {
|
|
103485
103489
|
if (!path9 || typeof path9 !== "string") {
|
|
103486
103490
|
throw new SkillsMigrationError(`${paramName} must be a non-empty string`);
|
|
@@ -103616,7 +103620,7 @@ class SkillsBackupManager {
|
|
|
103616
103620
|
return size;
|
|
103617
103621
|
}
|
|
103618
103622
|
static extractBackupTimestamp(backupPath) {
|
|
103619
|
-
const dirName =
|
|
103623
|
+
const dirName = basename27(backupPath);
|
|
103620
103624
|
if (!dirName.startsWith(SkillsBackupManager.BACKUP_PREFIX)) {
|
|
103621
103625
|
return null;
|
|
103622
103626
|
}
|
|
@@ -104481,7 +104485,7 @@ async function runPreflightChecks() {
|
|
|
104481
104485
|
// src/domains/installation/fresh-installer.ts
|
|
104482
104486
|
init_metadata_migration();
|
|
104483
104487
|
import { existsSync as existsSync72, readdirSync as readdirSync9, rmSync as rmSync3, rmdirSync as rmdirSync2, unlinkSync as unlinkSync5 } from "node:fs";
|
|
104484
|
-
import { basename as
|
|
104488
|
+
import { basename as basename28, dirname as dirname39, join as join138, resolve as resolve45 } from "node:path";
|
|
104485
104489
|
init_logger();
|
|
104486
104490
|
init_safe_spinner();
|
|
104487
104491
|
var import_fs_extra34 = __toESM(require_lib(), 1);
|
|
@@ -104692,7 +104696,7 @@ async function handleFreshInstallation(claudeDir3, prompts) {
|
|
|
104692
104696
|
mutatePaths: backupTargets.mutatePaths,
|
|
104693
104697
|
scope: "claude"
|
|
104694
104698
|
});
|
|
104695
|
-
await cleanupOldDestructiveOperationBackups(undefined,
|
|
104699
|
+
await cleanupOldDestructiveOperationBackups(undefined, basename28(backup.backupDir));
|
|
104696
104700
|
backupSpinner.succeed(`Recovery backup saved to ${backup.backupDir}`);
|
|
104697
104701
|
} catch (error) {
|
|
104698
104702
|
backupSpinner.fail("Failed to create recovery backup");
|
|
@@ -106029,8 +106033,8 @@ function transformContent(content, options2 = {}) {
|
|
|
106029
106033
|
}
|
|
106030
106034
|
function shouldTransformFile3(filename) {
|
|
106031
106035
|
const ext2 = extname6(filename).toLowerCase();
|
|
106032
|
-
const
|
|
106033
|
-
return TRANSFORMABLE_EXTENSIONS3.has(ext2) || ALWAYS_TRANSFORM_FILES.has(
|
|
106036
|
+
const basename29 = filename.split("/").pop() || filename;
|
|
106037
|
+
return TRANSFORMABLE_EXTENSIONS3.has(ext2) || ALWAYS_TRANSFORM_FILES.has(basename29);
|
|
106034
106038
|
}
|
|
106035
106039
|
async function transformPathsForGlobalInstall(directory, options2 = {}) {
|
|
106036
106040
|
let filesTransformed = 0;
|
|
@@ -106313,7 +106317,7 @@ var import_picocolors34 = __toESM(require_picocolors(), 1);
|
|
|
106313
106317
|
import { existsSync as existsSync73 } from "node:fs";
|
|
106314
106318
|
import { readFile as readFile68, rm as rm20, unlink as unlink15 } from "node:fs/promises";
|
|
106315
106319
|
import { homedir as homedir52 } from "node:os";
|
|
106316
|
-
import { basename as
|
|
106320
|
+
import { basename as basename30, join as join149, resolve as resolve50 } from "node:path";
|
|
106317
106321
|
init_logger();
|
|
106318
106322
|
|
|
106319
106323
|
// src/ui/ack-cli-design/tokens.ts
|
|
@@ -107190,7 +107194,7 @@ async function ensureOpenCodeModel(options2) {
|
|
|
107190
107194
|
|
|
107191
107195
|
// src/commands/portable/plan-display.ts
|
|
107192
107196
|
var import_picocolors32 = __toESM(require_picocolors(), 1);
|
|
107193
|
-
import { basename as
|
|
107197
|
+
import { basename as basename29, dirname as dirname43, extname as extname7 } from "node:path";
|
|
107194
107198
|
var DEFAULT_MAX_PLAN_GROUP_ITEMS = 20;
|
|
107195
107199
|
var TYPE_ORDER = [
|
|
107196
107200
|
"agent",
|
|
@@ -107426,7 +107430,7 @@ function normalizeWhereDestination(path9, portableType) {
|
|
|
107426
107430
|
return dirname43(path9);
|
|
107427
107431
|
}
|
|
107428
107432
|
if (portableType === "rules") {
|
|
107429
|
-
const fileName =
|
|
107433
|
+
const fileName = basename29(path9).toLowerCase();
|
|
107430
107434
|
if (fileName === "agents.md" || fileName === "gemini.md" || fileName === ".goosehints" || fileName === "custom_modes.yaml" || fileName === "custom_modes.yml") {
|
|
107431
107435
|
return path9;
|
|
107432
107436
|
}
|
|
@@ -108412,7 +108416,7 @@ async function migrateCommand(options2) {
|
|
|
108412
108416
|
files: [],
|
|
108413
108417
|
global: task.global
|
|
108414
108418
|
};
|
|
108415
|
-
existing.files.push(
|
|
108419
|
+
existing.files.push(basename30(result.path));
|
|
108416
108420
|
successfulHookFiles.set(task.provider, existing);
|
|
108417
108421
|
if (result.path.length > 0) {
|
|
108418
108422
|
const absExisting = successfulHookAbsPaths.get(task.provider) ?? [];
|
|
@@ -108550,7 +108554,7 @@ async function migrateCommand(options2) {
|
|
|
108550
108554
|
});
|
|
108551
108555
|
if (staleSlugs.length > 0) {
|
|
108552
108556
|
const staleSlugSet = new Set(staleSlugs.map((s3) => `${s3}.toml`));
|
|
108553
|
-
const removed = await removeInstallationsByFilter((i) => i.type === "agent" && i.provider === provider && i.global === scope2 && staleSlugSet.has(
|
|
108557
|
+
const removed = await removeInstallationsByFilter((i) => i.type === "agent" && i.provider === provider && i.global === scope2 && staleSlugSet.has(basename30(i.path)));
|
|
108554
108558
|
for (const entry of removed) {
|
|
108555
108559
|
logger.verbose(`[migrate] Cleaned stale registry entry: ${entry.item} (${provider})`);
|
|
108556
108560
|
}
|
|
@@ -109184,7 +109188,7 @@ init_logger();
|
|
|
109184
109188
|
init_output_manager();
|
|
109185
109189
|
var import_picocolors36 = __toESM(require_picocolors(), 1);
|
|
109186
109190
|
import { existsSync as existsSync75, statSync as statSync12 } from "node:fs";
|
|
109187
|
-
import { basename as
|
|
109191
|
+
import { basename as basename31, dirname as dirname45, join as join153, relative as relative32, resolve as resolve53 } from "node:path";
|
|
109188
109192
|
|
|
109189
109193
|
// src/commands/plan/plan-dependencies.ts
|
|
109190
109194
|
init_config();
|
|
@@ -109282,7 +109286,7 @@ async function handleParse(target, options2) {
|
|
|
109282
109286
|
console.log(JSON.stringify({ file: relative32(process.cwd(), planFile), frontmatter, phases }, null, 2));
|
|
109283
109287
|
return;
|
|
109284
109288
|
}
|
|
109285
|
-
const title = typeof frontmatter.title === "string" ? frontmatter.title :
|
|
109289
|
+
const title = typeof frontmatter.title === "string" ? frontmatter.title : basename31(dirname45(planFile));
|
|
109286
109290
|
console.log();
|
|
109287
109291
|
console.log(import_picocolors36.default.bold(` Plan: ${title}`));
|
|
109288
109292
|
console.log(` File: ${planFile}`);
|
|
@@ -109393,7 +109397,7 @@ async function handleStatus(target, options2) {
|
|
|
109393
109397
|
const blockedBy2 = await resolvePlanDependencies(s3.blockedBy, pf, { preloadedConfig });
|
|
109394
109398
|
const blocks2 = await resolvePlanDependencies(s3.blocks, pf, { preloadedConfig });
|
|
109395
109399
|
const bar = progressBar(s3.completed, s3.totalPhases);
|
|
109396
|
-
const title2 = s3.title ??
|
|
109400
|
+
const title2 = s3.title ?? basename31(dirname45(pf));
|
|
109397
109401
|
console.log(` ${import_picocolors36.default.bold(title2)}`);
|
|
109398
109402
|
console.log(` ${bar}`);
|
|
109399
109403
|
if (s3.inProgress > 0)
|
|
@@ -109412,7 +109416,7 @@ async function handleStatus(target, options2) {
|
|
|
109412
109416
|
}
|
|
109413
109417
|
console.log();
|
|
109414
109418
|
} catch {
|
|
109415
|
-
console.log(` [X] Failed to read: ${
|
|
109419
|
+
console.log(` [X] Failed to read: ${basename31(dirname45(pf))}`);
|
|
109416
109420
|
console.log();
|
|
109417
109421
|
}
|
|
109418
109422
|
}
|
|
@@ -109439,7 +109443,7 @@ async function handleStatus(target, options2) {
|
|
|
109439
109443
|
console.log(JSON.stringify({ ...summary, dependencyStatus: { blockedBy, blocks } }, null, 2));
|
|
109440
109444
|
return;
|
|
109441
109445
|
}
|
|
109442
|
-
const title = summary.title ??
|
|
109446
|
+
const title = summary.title ?? basename31(dirname45(planFile));
|
|
109443
109447
|
console.log();
|
|
109444
109448
|
console.log(import_picocolors36.default.bold(` ${title}`));
|
|
109445
109449
|
if (summary.status)
|
|
@@ -109537,7 +109541,7 @@ init_plan_parser();
|
|
|
109537
109541
|
init_plans_registry();
|
|
109538
109542
|
init_output_manager();
|
|
109539
109543
|
var import_picocolors37 = __toESM(require_picocolors(), 1);
|
|
109540
|
-
import { basename as
|
|
109544
|
+
import { basename as basename32, dirname as dirname46, relative as relative33, resolve as resolve54 } from "node:path";
|
|
109541
109545
|
async function handleCreate(target, options2) {
|
|
109542
109546
|
if (!options2.title) {
|
|
109543
109547
|
output.error("[X] --title is required for create");
|
|
@@ -109613,7 +109617,7 @@ async function handleCreate(target, options2) {
|
|
|
109613
109617
|
console.log(` Directory: ${safeResolvedDir}`);
|
|
109614
109618
|
console.log(` Phases: ${result.phaseFiles.length}`);
|
|
109615
109619
|
for (const f4 of result.phaseFiles) {
|
|
109616
|
-
console.log(` [ ] ${
|
|
109620
|
+
console.log(` [ ] ${basename32(f4)}`);
|
|
109617
109621
|
}
|
|
109618
109622
|
console.log();
|
|
109619
109623
|
}
|
|
@@ -111070,7 +111074,7 @@ async function detectInstallations() {
|
|
|
111070
111074
|
|
|
111071
111075
|
// src/commands/uninstall/removal-handler.ts
|
|
111072
111076
|
import { readdirSync as readdirSync11, rmSync as rmSync5 } from "node:fs";
|
|
111073
|
-
import { basename as
|
|
111077
|
+
import { basename as basename33, join as join158, resolve as resolve58, sep as sep13 } from "node:path";
|
|
111074
111078
|
init_logger();
|
|
111075
111079
|
init_safe_prompts();
|
|
111076
111080
|
init_safe_spinner();
|
|
@@ -111309,7 +111313,7 @@ async function removeInstallations(installations, options2) {
|
|
|
111309
111313
|
scope: installation.type,
|
|
111310
111314
|
kit: options2.kit
|
|
111311
111315
|
});
|
|
111312
|
-
await cleanupOldDestructiveOperationBackups(undefined,
|
|
111316
|
+
await cleanupOldDestructiveOperationBackups(undefined, basename33(backup.backupDir));
|
|
111313
111317
|
backupSpinner.succeed(`Recovery backup saved to ${backup.backupDir}`);
|
|
111314
111318
|
} catch (error) {
|
|
111315
111319
|
backupSpinner.fail("Failed to create recovery backup");
|