@chiendt/ack-cli 1.2.0 → 1.3.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/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.
|
|
63713
|
+
version: "1.3.0",
|
|
63714
63714
|
description: "ACK CLI - tool for bootstrapping and updating ACK kits (Claude Code agent kits)",
|
|
63715
63715
|
type: "module",
|
|
63716
63716
|
repository: {
|
|
@@ -77114,7 +77114,7 @@ import { createHash as createHash10 } from "node:crypto";
|
|
|
77114
77114
|
import { existsSync as existsSync84, mkdirSync as mkdirSync5, readFileSync as readFileSync21, readdirSync as readdirSync12, statSync as statSync15 } from "node:fs";
|
|
77115
77115
|
import { rename as rename17, writeFile as writeFile42 } from "node:fs/promises";
|
|
77116
77116
|
import { homedir as homedir54 } from "node:os";
|
|
77117
|
-
import { basename as
|
|
77117
|
+
import { basename as basename34, join as join166 } from "node:path";
|
|
77118
77118
|
function getCachedContext(repoPath) {
|
|
77119
77119
|
const cachePath = getCacheFilePath(repoPath);
|
|
77120
77120
|
if (!existsSync84(cachePath))
|
|
@@ -77182,7 +77182,7 @@ function getDocSourcePaths(repoPath) {
|
|
|
77182
77182
|
return paths.sort();
|
|
77183
77183
|
}
|
|
77184
77184
|
function getCacheFilePath(repoPath) {
|
|
77185
|
-
const repoName =
|
|
77185
|
+
const repoName = basename34(repoPath).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
77186
77186
|
const pathHash = createHash10("sha256").update(repoPath).digest("hex").slice(0, 8);
|
|
77187
77187
|
return join166(CACHE_DIR, `${repoName}-${pathHash}-context-cache.json`);
|
|
77188
77188
|
}
|
|
@@ -78052,13 +78052,13 @@ function isNoiseCommit(title, author) {
|
|
|
78052
78052
|
}
|
|
78053
78053
|
|
|
78054
78054
|
// src/commands/content/phases/change-detector.ts
|
|
78055
|
-
import {
|
|
78055
|
+
import { execFileSync as execFileSync4, spawnSync as spawnSync9 } from "node:child_process";
|
|
78056
78056
|
import { existsSync as existsSync89, readFileSync as readFileSync23, readdirSync as readdirSync15, statSync as statSync17 } from "node:fs";
|
|
78057
78057
|
import { join as join170 } from "node:path";
|
|
78058
78058
|
function detectCommits(repo, since) {
|
|
78059
78059
|
try {
|
|
78060
78060
|
const fetchUrl = sshToHttps(repo.remoteUrl);
|
|
78061
|
-
|
|
78061
|
+
execFileSync4("git", ["-C", repo.path, "fetch", fetchUrl, repo.defaultBranch, "--quiet"], {
|
|
78062
78062
|
stdio: "pipe",
|
|
78063
78063
|
timeout: 30000
|
|
78064
78064
|
});
|
|
@@ -78070,11 +78070,22 @@ function detectCommits(repo, since) {
|
|
|
78070
78070
|
try {
|
|
78071
78071
|
let ref = `origin/${repo.defaultBranch}`;
|
|
78072
78072
|
try {
|
|
78073
|
-
|
|
78073
|
+
execFileSync4("git", ["-C", repo.path, "rev-parse", "--verify", ref], {
|
|
78074
|
+
stdio: "pipe",
|
|
78075
|
+
timeout: 5000
|
|
78076
|
+
});
|
|
78074
78077
|
} catch {
|
|
78075
78078
|
ref = repo.defaultBranch;
|
|
78076
78079
|
}
|
|
78077
|
-
const output2 =
|
|
78080
|
+
const output2 = execFileSync4("git", [
|
|
78081
|
+
"-C",
|
|
78082
|
+
repo.path,
|
|
78083
|
+
"log",
|
|
78084
|
+
ref,
|
|
78085
|
+
`--since=${since}`,
|
|
78086
|
+
"--format=%H%x00%s%x00%an%x00%aI",
|
|
78087
|
+
"--no-merges"
|
|
78088
|
+
], { stdio: "pipe", timeout: 15000 }).toString().trim();
|
|
78078
78089
|
if (!output2)
|
|
78079
78090
|
return [];
|
|
78080
78091
|
return output2.split(`
|
|
@@ -78110,7 +78121,18 @@ function detectMergedPRs(repo, since) {
|
|
|
78110
78121
|
if (!match2)
|
|
78111
78122
|
return [];
|
|
78112
78123
|
const [, owner, repoName] = match2;
|
|
78113
|
-
const output2 =
|
|
78124
|
+
const output2 = execFileSync4("gh", [
|
|
78125
|
+
"pr",
|
|
78126
|
+
"list",
|
|
78127
|
+
"--repo",
|
|
78128
|
+
`${owner}/${repoName}`,
|
|
78129
|
+
"--state",
|
|
78130
|
+
"merged",
|
|
78131
|
+
"--json",
|
|
78132
|
+
"number,title,body,author,mergedAt",
|
|
78133
|
+
"--limit",
|
|
78134
|
+
"20"
|
|
78135
|
+
], { stdio: "pipe", timeout: 15000 }).toString().trim();
|
|
78114
78136
|
if (!output2)
|
|
78115
78137
|
return [];
|
|
78116
78138
|
const prs = JSON.parse(output2);
|
|
@@ -78249,7 +78271,7 @@ function classifyCommit(event) {
|
|
|
78249
78271
|
}
|
|
78250
78272
|
|
|
78251
78273
|
// src/commands/content/phases/repo-discoverer.ts
|
|
78252
|
-
import { execSync as
|
|
78274
|
+
import { execSync as execSync9 } from "node:child_process";
|
|
78253
78275
|
import { readdirSync as readdirSync16 } from "node:fs";
|
|
78254
78276
|
import { join as join171 } from "node:path";
|
|
78255
78277
|
function discoverRepos2(cwd2) {
|
|
@@ -78276,7 +78298,7 @@ function discoverRepos2(cwd2) {
|
|
|
78276
78298
|
}
|
|
78277
78299
|
function isGitRepoRoot(dir) {
|
|
78278
78300
|
try {
|
|
78279
|
-
const toplevel =
|
|
78301
|
+
const toplevel = execSync9("git rev-parse --show-toplevel", {
|
|
78280
78302
|
cwd: dir,
|
|
78281
78303
|
stdio: "pipe",
|
|
78282
78304
|
timeout: 5000
|
|
@@ -78291,7 +78313,7 @@ function getRepoInfo(dir) {
|
|
|
78291
78313
|
const name = dir.split("/").pop() || dir;
|
|
78292
78314
|
let remoteUrl = "";
|
|
78293
78315
|
try {
|
|
78294
|
-
remoteUrl =
|
|
78316
|
+
remoteUrl = execSync9("git remote get-url origin", {
|
|
78295
78317
|
cwd: dir,
|
|
78296
78318
|
stdio: "pipe",
|
|
78297
78319
|
timeout: 5000
|
|
@@ -78299,7 +78321,7 @@ function getRepoInfo(dir) {
|
|
|
78299
78321
|
} catch {}
|
|
78300
78322
|
let defaultBranch = "main";
|
|
78301
78323
|
try {
|
|
78302
|
-
const ref =
|
|
78324
|
+
const ref = execSync9("git symbolic-ref refs/remotes/origin/HEAD", {
|
|
78303
78325
|
cwd: dir,
|
|
78304
78326
|
stdio: "pipe",
|
|
78305
78327
|
timeout: 5000
|
|
@@ -78307,7 +78329,7 @@ function getRepoInfo(dir) {
|
|
|
78307
78329
|
defaultBranch = ref.replace("refs/remotes/origin/", "");
|
|
78308
78330
|
} catch {
|
|
78309
78331
|
try {
|
|
78310
|
-
defaultBranch =
|
|
78332
|
+
defaultBranch = execSync9("git rev-parse --abbrev-ref HEAD", {
|
|
78311
78333
|
cwd: dir,
|
|
78312
78334
|
stdio: "pipe",
|
|
78313
78335
|
timeout: 5000
|
|
@@ -78384,9 +78406,9 @@ var init_git_scanner = __esm(() => {
|
|
|
78384
78406
|
});
|
|
78385
78407
|
|
|
78386
78408
|
// src/commands/content/phases/platform-adapters/facebook-adapter.ts
|
|
78387
|
-
import { execFileSync as
|
|
78409
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
78388
78410
|
function runFbcli(args, timeoutMs = 30000) {
|
|
78389
|
-
return
|
|
78411
|
+
return execFileSync5("fbcli", [...args, "--json"], {
|
|
78390
78412
|
stdio: "pipe",
|
|
78391
78413
|
timeout: timeoutMs
|
|
78392
78414
|
}).toString();
|
|
@@ -78426,7 +78448,7 @@ class FacebookAdapter {
|
|
|
78426
78448
|
if (options2?.dryRun)
|
|
78427
78449
|
return dryRunResult();
|
|
78428
78450
|
try {
|
|
78429
|
-
const raw =
|
|
78451
|
+
const raw = execFileSync5("fbcli", ["post", "--json"], {
|
|
78430
78452
|
input: text,
|
|
78431
78453
|
stdio: ["pipe", "pipe", "pipe"],
|
|
78432
78454
|
timeout: 30000
|
|
@@ -78451,7 +78473,7 @@ class FacebookAdapter {
|
|
|
78451
78473
|
if (options2?.dryRun)
|
|
78452
78474
|
return dryRunResult();
|
|
78453
78475
|
try {
|
|
78454
|
-
const raw =
|
|
78476
|
+
const raw = execFileSync5("fbcli", ["post", "-i", mediaPath, "--json"], {
|
|
78455
78477
|
input: text,
|
|
78456
78478
|
stdio: ["pipe", "pipe", "pipe"],
|
|
78457
78479
|
timeout: 60000
|
|
@@ -78490,16 +78512,11 @@ class FacebookAdapter {
|
|
|
78490
78512
|
var init_facebook_adapter = () => {};
|
|
78491
78513
|
|
|
78492
78514
|
// src/commands/content/phases/platform-adapters/x-adapter.ts
|
|
78493
|
-
import {
|
|
78494
|
-
function shellEscape(str2) {
|
|
78495
|
-
return str2.replace(/'/g, "'\\''");
|
|
78496
|
-
}
|
|
78515
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
78497
78516
|
function runXurl(args, timeoutMs = 30000) {
|
|
78498
|
-
|
|
78499
|
-
return execSync11(`xurl ${args}`, {
|
|
78517
|
+
return execFileSync6("xurl", args, {
|
|
78500
78518
|
stdio: "pipe",
|
|
78501
|
-
timeout: timeoutMs
|
|
78502
|
-
shell
|
|
78519
|
+
timeout: timeoutMs
|
|
78503
78520
|
}).toString();
|
|
78504
78521
|
}
|
|
78505
78522
|
|
|
@@ -78507,7 +78524,7 @@ class XAdapter {
|
|
|
78507
78524
|
platform = "x";
|
|
78508
78525
|
async verifyAuth() {
|
|
78509
78526
|
try {
|
|
78510
|
-
const raw = runXurl("GET /2/users/me", 1e4);
|
|
78527
|
+
const raw = runXurl(["GET", "/2/users/me"], 1e4);
|
|
78511
78528
|
const data = JSON.parse(raw);
|
|
78512
78529
|
if (data.data?.username) {
|
|
78513
78530
|
return { authenticated: true, username: data.data.username };
|
|
@@ -78530,7 +78547,7 @@ class XAdapter {
|
|
|
78530
78547
|
}
|
|
78531
78548
|
try {
|
|
78532
78549
|
const body = JSON.stringify({ text });
|
|
78533
|
-
const raw = runXurl(
|
|
78550
|
+
const raw = runXurl(["POST", "/2/tweets", "--data", body]);
|
|
78534
78551
|
const parsed = JSON.parse(raw);
|
|
78535
78552
|
const postId = parsed.data?.id ?? "";
|
|
78536
78553
|
return { success: true, postId, postUrl: `https://x.com/i/status/${postId}` };
|
|
@@ -78548,7 +78565,7 @@ class XAdapter {
|
|
|
78548
78565
|
return { success: true, postId: "dry-run", postUrl: "https://x.com/dry-run" };
|
|
78549
78566
|
}
|
|
78550
78567
|
try {
|
|
78551
|
-
const uploadRaw = runXurl(
|
|
78568
|
+
const uploadRaw = runXurl(["POST", "/1.1/media/upload.json", "-F", `media=@${mediaPath}`], 60000);
|
|
78552
78569
|
const uploadParsed = JSON.parse(uploadRaw);
|
|
78553
78570
|
const mediaId = uploadParsed.media_id_string;
|
|
78554
78571
|
if (!mediaId) {
|
|
@@ -78560,7 +78577,7 @@ class XAdapter {
|
|
|
78560
78577
|
};
|
|
78561
78578
|
}
|
|
78562
78579
|
const body = JSON.stringify({ text, media: { media_ids: [mediaId] } });
|
|
78563
|
-
const raw = runXurl(
|
|
78580
|
+
const raw = runXurl(["POST", "/2/tweets", "--data", body]);
|
|
78564
78581
|
const parsed = JSON.parse(raw);
|
|
78565
78582
|
const postId = parsed.data?.id ?? "";
|
|
78566
78583
|
return { success: true, postId, postUrl: `https://x.com/i/status/${postId}` };
|
|
@@ -78589,7 +78606,7 @@ class XAdapter {
|
|
|
78589
78606
|
if (previousId) {
|
|
78590
78607
|
payload.reply = { in_reply_to_tweet_id: previousId };
|
|
78591
78608
|
}
|
|
78592
|
-
const raw = runXurl(
|
|
78609
|
+
const raw = runXurl(["POST", "/2/tweets", "--data", JSON.stringify(payload)]);
|
|
78593
78610
|
const parsed = JSON.parse(raw);
|
|
78594
78611
|
previousId = parsed.data?.id;
|
|
78595
78612
|
if (previousId)
|
|
@@ -78610,7 +78627,7 @@ class XAdapter {
|
|
|
78610
78627
|
}
|
|
78611
78628
|
async getEngagement(postId) {
|
|
78612
78629
|
try {
|
|
78613
|
-
const raw = runXurl(
|
|
78630
|
+
const raw = runXurl(["GET", `/2/tweets/${postId}?tweet.fields=public_metrics`], 1e4);
|
|
78614
78631
|
const parsed = JSON.parse(raw);
|
|
78615
78632
|
const m3 = parsed.data?.public_metrics ?? {};
|
|
78616
78633
|
return {
|
|
@@ -78996,7 +79013,7 @@ var init_state_manager = __esm(() => {
|
|
|
78996
79013
|
});
|
|
78997
79014
|
|
|
78998
79015
|
// src/commands/content/phases/platform-setup-facebook.ts
|
|
78999
|
-
import { execSync as
|
|
79016
|
+
import { execFileSync as execFileSync7, execSync as execSync10 } from "node:child_process";
|
|
79000
79017
|
async function setupFacebookPlatform(contentLogger) {
|
|
79001
79018
|
oe("Facebook Pages Setup");
|
|
79002
79019
|
if (!isFbcliInstalled()) {
|
|
@@ -79036,7 +79053,7 @@ async function setupFacebookPlatform(contentLogger) {
|
|
|
79036
79053
|
return false;
|
|
79037
79054
|
}
|
|
79038
79055
|
try {
|
|
79039
|
-
|
|
79056
|
+
execFileSync7("fbcli", ["auth", "token", token.trim()], { stdio: "pipe", timeout: 15000 });
|
|
79040
79057
|
} catch (err) {
|
|
79041
79058
|
f2.error("Failed to set token via `fbcli auth token`. Check the token and try again.");
|
|
79042
79059
|
contentLogger.error("fbcli auth token command failed");
|
|
@@ -79054,7 +79071,7 @@ async function setupFacebookPlatform(contentLogger) {
|
|
|
79054
79071
|
}
|
|
79055
79072
|
function isFbcliInstalled() {
|
|
79056
79073
|
try {
|
|
79057
|
-
|
|
79074
|
+
execSync10("which fbcli", { stdio: "pipe" });
|
|
79058
79075
|
return true;
|
|
79059
79076
|
} catch {
|
|
79060
79077
|
return false;
|
|
@@ -79062,7 +79079,7 @@ function isFbcliInstalled() {
|
|
|
79062
79079
|
}
|
|
79063
79080
|
function isFbcliAuthenticated() {
|
|
79064
79081
|
try {
|
|
79065
|
-
const raw =
|
|
79082
|
+
const raw = execSync10("fbcli auth status --json", { stdio: "pipe", timeout: 1e4 }).toString();
|
|
79066
79083
|
const data = JSON.parse(raw);
|
|
79067
79084
|
return data.authenticated === true || Boolean(data.page_name);
|
|
79068
79085
|
} catch {
|
|
@@ -79071,7 +79088,7 @@ function isFbcliAuthenticated() {
|
|
|
79071
79088
|
}
|
|
79072
79089
|
function getFbcliPageName() {
|
|
79073
79090
|
try {
|
|
79074
|
-
const raw =
|
|
79091
|
+
const raw = execSync10("fbcli auth status --json", { stdio: "pipe", timeout: 1e4 }).toString();
|
|
79075
79092
|
const data = JSON.parse(raw);
|
|
79076
79093
|
return String(data.page_name ?? "");
|
|
79077
79094
|
} catch {
|
|
@@ -79080,9 +79097,9 @@ function getFbcliPageName() {
|
|
|
79080
79097
|
}
|
|
79081
79098
|
async function autoInstallFbcli(contentLogger) {
|
|
79082
79099
|
try {
|
|
79083
|
-
|
|
79100
|
+
execSync10("which go", { stdio: "pipe" });
|
|
79084
79101
|
f2.info("Installing fbcli via `go install`...");
|
|
79085
|
-
|
|
79102
|
+
execSync10("go install github.com/mrgoonie/fbcli/cmd/fbcli@latest", {
|
|
79086
79103
|
stdio: "inherit",
|
|
79087
79104
|
timeout: 120000
|
|
79088
79105
|
});
|
|
@@ -79111,7 +79128,7 @@ async function autoInstallFbcli(contentLogger) {
|
|
|
79111
79128
|
return false;
|
|
79112
79129
|
}
|
|
79113
79130
|
f2.info(`Downloading fbcli binary for ${os9}/${cpu}...`);
|
|
79114
|
-
|
|
79131
|
+
execSync10(`curl -fsSL "${url}" -o "${dest}" && chmod +x "${dest}"`, {
|
|
79115
79132
|
stdio: "inherit",
|
|
79116
79133
|
timeout: 60000
|
|
79117
79134
|
});
|
|
@@ -79133,7 +79150,7 @@ var init_platform_setup_facebook = __esm(() => {
|
|
|
79133
79150
|
});
|
|
79134
79151
|
|
|
79135
79152
|
// src/commands/content/phases/platform-setup-x.ts
|
|
79136
|
-
import { execFileSync as
|
|
79153
|
+
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
79137
79154
|
async function setupXPlatform(contentLogger) {
|
|
79138
79155
|
oe("X (Twitter) Setup");
|
|
79139
79156
|
if (!isXurlInstalled()) {
|
|
@@ -79164,7 +79181,7 @@ async function setupXPlatform(contentLogger) {
|
|
|
79164
79181
|
function isXurlInstalled() {
|
|
79165
79182
|
try {
|
|
79166
79183
|
const cmd = process.platform === "win32" ? "where" : "which";
|
|
79167
|
-
|
|
79184
|
+
execFileSync8(cmd, ["xurl"], { stdio: "pipe" });
|
|
79168
79185
|
return true;
|
|
79169
79186
|
} catch {
|
|
79170
79187
|
return false;
|
|
@@ -79187,7 +79204,7 @@ function printXurlInstallInstructions() {
|
|
|
79187
79204
|
}
|
|
79188
79205
|
function isXurlAuthenticated() {
|
|
79189
79206
|
try {
|
|
79190
|
-
const status =
|
|
79207
|
+
const status = execFileSync8("xurl", ["auth", "status"], {
|
|
79191
79208
|
stdio: "pipe",
|
|
79192
79209
|
timeout: 5000
|
|
79193
79210
|
}).toString();
|
|
@@ -90830,9 +90847,10 @@ function mcpEntryTemplate(skillName, skillsRelToProject) {
|
|
|
90830
90847
|
const env3 = ENV_FOR.get(skillName);
|
|
90831
90848
|
if (!env3)
|
|
90832
90849
|
return null;
|
|
90850
|
+
const relPosix = skillsRelToProject.replace(/\\/g, "/");
|
|
90833
90851
|
return {
|
|
90834
90852
|
command: "node",
|
|
90835
|
-
args: TSX_ARGS(skillName).map((a3) => a3.replace("<SKILLS_REL>",
|
|
90853
|
+
args: TSX_ARGS(skillName).map((a3) => a3.replace("<SKILLS_REL>", relPosix)),
|
|
90836
90854
|
env: env3
|
|
90837
90855
|
};
|
|
90838
90856
|
}
|
|
@@ -91017,9 +91035,12 @@ function defaultMcpJsonPath(projectRoot) {
|
|
|
91017
91035
|
// src/commands/fqc-qa/skill-discovery.ts
|
|
91018
91036
|
var import_gray_matter12 = __toESM(require_gray_matter(), 1);
|
|
91019
91037
|
import { existsSync as existsSync63, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync11 } from "node:fs";
|
|
91020
|
-
import { join as join92, resolve as resolve36 } from "node:path";
|
|
91038
|
+
import { basename as basename26, join as join92, resolve as resolve36 } from "node:path";
|
|
91021
91039
|
var FQC_QA_PREFIX = "fqc-qa-";
|
|
91022
91040
|
var VALID_KINDS = new Set(["mcp", "lib", "gate"]);
|
|
91041
|
+
function deriveDirName(skillDir) {
|
|
91042
|
+
return basename26(skillDir.replace(/\\/g, "/"));
|
|
91043
|
+
}
|
|
91023
91044
|
function resolveSkillsRoot(opts = {}) {
|
|
91024
91045
|
if (opts.source)
|
|
91025
91046
|
return resolve36(opts.source);
|
|
@@ -91077,7 +91098,7 @@ function discoverSkills2(opts = {}) {
|
|
|
91077
91098
|
if (!kindRaw || !VALID_KINDS.has(kindRaw)) {
|
|
91078
91099
|
throw new Error(`SKILL.md missing or invalid metadata.kind (got ${JSON.stringify(kindRaw)}) at ${skillMdPath}. Expected one of: mcp, lib, gate.`);
|
|
91079
91100
|
}
|
|
91080
|
-
const dirName = skillDir
|
|
91101
|
+
const dirName = deriveDirName(skillDir);
|
|
91081
91102
|
const registeredName = String(fm.name ?? dirName);
|
|
91082
91103
|
const shortName = dirName.replace(FQC_QA_PREFIX, "");
|
|
91083
91104
|
const scriptsDir = join92(skillDir, "scripts");
|
|
@@ -103533,7 +103554,7 @@ init_logger();
|
|
|
103533
103554
|
init_types3();
|
|
103534
103555
|
var import_fs_extra28 = __toESM(require_lib(), 1);
|
|
103535
103556
|
import { copyFile as copyFile8, mkdir as mkdir34, readdir as readdir37, rm as rm16, stat as stat21 } from "node:fs/promises";
|
|
103536
|
-
import { basename as
|
|
103557
|
+
import { basename as basename27, join as join130, normalize as normalize9 } from "node:path";
|
|
103537
103558
|
function validatePath2(path9, paramName) {
|
|
103538
103559
|
if (!path9 || typeof path9 !== "string") {
|
|
103539
103560
|
throw new SkillsMigrationError(`${paramName} must be a non-empty string`);
|
|
@@ -103669,7 +103690,7 @@ class SkillsBackupManager {
|
|
|
103669
103690
|
return size;
|
|
103670
103691
|
}
|
|
103671
103692
|
static extractBackupTimestamp(backupPath) {
|
|
103672
|
-
const dirName =
|
|
103693
|
+
const dirName = basename27(backupPath);
|
|
103673
103694
|
if (!dirName.startsWith(SkillsBackupManager.BACKUP_PREFIX)) {
|
|
103674
103695
|
return null;
|
|
103675
103696
|
}
|
|
@@ -104534,7 +104555,7 @@ async function runPreflightChecks() {
|
|
|
104534
104555
|
// src/domains/installation/fresh-installer.ts
|
|
104535
104556
|
init_metadata_migration();
|
|
104536
104557
|
import { existsSync as existsSync72, readdirSync as readdirSync9, rmSync as rmSync3, rmdirSync as rmdirSync2, unlinkSync as unlinkSync5 } from "node:fs";
|
|
104537
|
-
import { basename as
|
|
104558
|
+
import { basename as basename28, dirname as dirname39, join as join138, resolve as resolve45 } from "node:path";
|
|
104538
104559
|
init_logger();
|
|
104539
104560
|
init_safe_spinner();
|
|
104540
104561
|
var import_fs_extra34 = __toESM(require_lib(), 1);
|
|
@@ -104745,7 +104766,7 @@ async function handleFreshInstallation(claudeDir3, prompts) {
|
|
|
104745
104766
|
mutatePaths: backupTargets.mutatePaths,
|
|
104746
104767
|
scope: "claude"
|
|
104747
104768
|
});
|
|
104748
|
-
await cleanupOldDestructiveOperationBackups(undefined,
|
|
104769
|
+
await cleanupOldDestructiveOperationBackups(undefined, basename28(backup.backupDir));
|
|
104749
104770
|
backupSpinner.succeed(`Recovery backup saved to ${backup.backupDir}`);
|
|
104750
104771
|
} catch (error) {
|
|
104751
104772
|
backupSpinner.fail("Failed to create recovery backup");
|
|
@@ -106082,8 +106103,8 @@ function transformContent(content, options2 = {}) {
|
|
|
106082
106103
|
}
|
|
106083
106104
|
function shouldTransformFile3(filename) {
|
|
106084
106105
|
const ext2 = extname6(filename).toLowerCase();
|
|
106085
|
-
const
|
|
106086
|
-
return TRANSFORMABLE_EXTENSIONS3.has(ext2) || ALWAYS_TRANSFORM_FILES.has(
|
|
106106
|
+
const basename29 = filename.split("/").pop() || filename;
|
|
106107
|
+
return TRANSFORMABLE_EXTENSIONS3.has(ext2) || ALWAYS_TRANSFORM_FILES.has(basename29);
|
|
106087
106108
|
}
|
|
106088
106109
|
async function transformPathsForGlobalInstall(directory, options2 = {}) {
|
|
106089
106110
|
let filesTransformed = 0;
|
|
@@ -106366,7 +106387,7 @@ var import_picocolors34 = __toESM(require_picocolors(), 1);
|
|
|
106366
106387
|
import { existsSync as existsSync73 } from "node:fs";
|
|
106367
106388
|
import { readFile as readFile68, rm as rm20, unlink as unlink15 } from "node:fs/promises";
|
|
106368
106389
|
import { homedir as homedir52 } from "node:os";
|
|
106369
|
-
import { basename as
|
|
106390
|
+
import { basename as basename30, join as join149, resolve as resolve50 } from "node:path";
|
|
106370
106391
|
init_logger();
|
|
106371
106392
|
|
|
106372
106393
|
// src/ui/ack-cli-design/tokens.ts
|
|
@@ -107243,7 +107264,7 @@ async function ensureOpenCodeModel(options2) {
|
|
|
107243
107264
|
|
|
107244
107265
|
// src/commands/portable/plan-display.ts
|
|
107245
107266
|
var import_picocolors32 = __toESM(require_picocolors(), 1);
|
|
107246
|
-
import { basename as
|
|
107267
|
+
import { basename as basename29, dirname as dirname43, extname as extname7 } from "node:path";
|
|
107247
107268
|
var DEFAULT_MAX_PLAN_GROUP_ITEMS = 20;
|
|
107248
107269
|
var TYPE_ORDER = [
|
|
107249
107270
|
"agent",
|
|
@@ -107479,7 +107500,7 @@ function normalizeWhereDestination(path9, portableType) {
|
|
|
107479
107500
|
return dirname43(path9);
|
|
107480
107501
|
}
|
|
107481
107502
|
if (portableType === "rules") {
|
|
107482
|
-
const fileName =
|
|
107503
|
+
const fileName = basename29(path9).toLowerCase();
|
|
107483
107504
|
if (fileName === "agents.md" || fileName === "gemini.md" || fileName === ".goosehints" || fileName === "custom_modes.yaml" || fileName === "custom_modes.yml") {
|
|
107484
107505
|
return path9;
|
|
107485
107506
|
}
|
|
@@ -108465,7 +108486,7 @@ async function migrateCommand(options2) {
|
|
|
108465
108486
|
files: [],
|
|
108466
108487
|
global: task.global
|
|
108467
108488
|
};
|
|
108468
|
-
existing.files.push(
|
|
108489
|
+
existing.files.push(basename30(result.path));
|
|
108469
108490
|
successfulHookFiles.set(task.provider, existing);
|
|
108470
108491
|
if (result.path.length > 0) {
|
|
108471
108492
|
const absExisting = successfulHookAbsPaths.get(task.provider) ?? [];
|
|
@@ -108603,7 +108624,7 @@ async function migrateCommand(options2) {
|
|
|
108603
108624
|
});
|
|
108604
108625
|
if (staleSlugs.length > 0) {
|
|
108605
108626
|
const staleSlugSet = new Set(staleSlugs.map((s3) => `${s3}.toml`));
|
|
108606
|
-
const removed = await removeInstallationsByFilter((i) => i.type === "agent" && i.provider === provider && i.global === scope2 && staleSlugSet.has(
|
|
108627
|
+
const removed = await removeInstallationsByFilter((i) => i.type === "agent" && i.provider === provider && i.global === scope2 && staleSlugSet.has(basename30(i.path)));
|
|
108607
108628
|
for (const entry of removed) {
|
|
108608
108629
|
logger.verbose(`[migrate] Cleaned stale registry entry: ${entry.item} (${provider})`);
|
|
108609
108630
|
}
|
|
@@ -109237,7 +109258,7 @@ init_logger();
|
|
|
109237
109258
|
init_output_manager();
|
|
109238
109259
|
var import_picocolors36 = __toESM(require_picocolors(), 1);
|
|
109239
109260
|
import { existsSync as existsSync75, statSync as statSync12 } from "node:fs";
|
|
109240
|
-
import { basename as
|
|
109261
|
+
import { basename as basename31, dirname as dirname45, join as join153, relative as relative32, resolve as resolve53 } from "node:path";
|
|
109241
109262
|
|
|
109242
109263
|
// src/commands/plan/plan-dependencies.ts
|
|
109243
109264
|
init_config();
|
|
@@ -109335,7 +109356,7 @@ async function handleParse(target, options2) {
|
|
|
109335
109356
|
console.log(JSON.stringify({ file: relative32(process.cwd(), planFile), frontmatter, phases }, null, 2));
|
|
109336
109357
|
return;
|
|
109337
109358
|
}
|
|
109338
|
-
const title = typeof frontmatter.title === "string" ? frontmatter.title :
|
|
109359
|
+
const title = typeof frontmatter.title === "string" ? frontmatter.title : basename31(dirname45(planFile));
|
|
109339
109360
|
console.log();
|
|
109340
109361
|
console.log(import_picocolors36.default.bold(` Plan: ${title}`));
|
|
109341
109362
|
console.log(` File: ${planFile}`);
|
|
@@ -109446,7 +109467,7 @@ async function handleStatus(target, options2) {
|
|
|
109446
109467
|
const blockedBy2 = await resolvePlanDependencies(s3.blockedBy, pf, { preloadedConfig });
|
|
109447
109468
|
const blocks2 = await resolvePlanDependencies(s3.blocks, pf, { preloadedConfig });
|
|
109448
109469
|
const bar = progressBar(s3.completed, s3.totalPhases);
|
|
109449
|
-
const title2 = s3.title ??
|
|
109470
|
+
const title2 = s3.title ?? basename31(dirname45(pf));
|
|
109450
109471
|
console.log(` ${import_picocolors36.default.bold(title2)}`);
|
|
109451
109472
|
console.log(` ${bar}`);
|
|
109452
109473
|
if (s3.inProgress > 0)
|
|
@@ -109465,7 +109486,7 @@ async function handleStatus(target, options2) {
|
|
|
109465
109486
|
}
|
|
109466
109487
|
console.log();
|
|
109467
109488
|
} catch {
|
|
109468
|
-
console.log(` [X] Failed to read: ${
|
|
109489
|
+
console.log(` [X] Failed to read: ${basename31(dirname45(pf))}`);
|
|
109469
109490
|
console.log();
|
|
109470
109491
|
}
|
|
109471
109492
|
}
|
|
@@ -109492,7 +109513,7 @@ async function handleStatus(target, options2) {
|
|
|
109492
109513
|
console.log(JSON.stringify({ ...summary, dependencyStatus: { blockedBy, blocks } }, null, 2));
|
|
109493
109514
|
return;
|
|
109494
109515
|
}
|
|
109495
|
-
const title = summary.title ??
|
|
109516
|
+
const title = summary.title ?? basename31(dirname45(planFile));
|
|
109496
109517
|
console.log();
|
|
109497
109518
|
console.log(import_picocolors36.default.bold(` ${title}`));
|
|
109498
109519
|
if (summary.status)
|
|
@@ -109590,7 +109611,7 @@ init_plan_parser();
|
|
|
109590
109611
|
init_plans_registry();
|
|
109591
109612
|
init_output_manager();
|
|
109592
109613
|
var import_picocolors37 = __toESM(require_picocolors(), 1);
|
|
109593
|
-
import { basename as
|
|
109614
|
+
import { basename as basename32, dirname as dirname46, relative as relative33, resolve as resolve54 } from "node:path";
|
|
109594
109615
|
async function handleCreate(target, options2) {
|
|
109595
109616
|
if (!options2.title) {
|
|
109596
109617
|
output.error("[X] --title is required for create");
|
|
@@ -109666,7 +109687,7 @@ async function handleCreate(target, options2) {
|
|
|
109666
109687
|
console.log(` Directory: ${safeResolvedDir}`);
|
|
109667
109688
|
console.log(` Phases: ${result.phaseFiles.length}`);
|
|
109668
109689
|
for (const f4 of result.phaseFiles) {
|
|
109669
|
-
console.log(` [ ] ${
|
|
109690
|
+
console.log(` [ ] ${basename32(f4)}`);
|
|
109670
109691
|
}
|
|
109671
109692
|
console.log();
|
|
109672
109693
|
}
|
|
@@ -111123,7 +111144,7 @@ async function detectInstallations() {
|
|
|
111123
111144
|
|
|
111124
111145
|
// src/commands/uninstall/removal-handler.ts
|
|
111125
111146
|
import { readdirSync as readdirSync11, rmSync as rmSync5 } from "node:fs";
|
|
111126
|
-
import { basename as
|
|
111147
|
+
import { basename as basename33, join as join158, resolve as resolve58, sep as sep13 } from "node:path";
|
|
111127
111148
|
init_logger();
|
|
111128
111149
|
init_safe_prompts();
|
|
111129
111150
|
init_safe_spinner();
|
|
@@ -111362,7 +111383,7 @@ async function removeInstallations(installations, options2) {
|
|
|
111362
111383
|
scope: installation.type,
|
|
111363
111384
|
kit: options2.kit
|
|
111364
111385
|
});
|
|
111365
|
-
await cleanupOldDestructiveOperationBackups(undefined,
|
|
111386
|
+
await cleanupOldDestructiveOperationBackups(undefined, basename33(backup.backupDir));
|
|
111366
111387
|
backupSpinner.succeed(`Recovery backup saved to ${backup.backupDir}`);
|
|
111367
111388
|
} catch (error) {
|
|
111368
111389
|
backupSpinner.fail("Failed to create recovery backup");
|