@staff0rd/assist 0.775.1 → 0.775.3
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 -1
- package/claude/skills/review-ci/scripts/review.mjs +123 -123
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +60 -55
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.775.
|
|
9
|
+
version: "0.775.3",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -124,7 +124,7 @@ var package_default = {
|
|
|
124
124
|
|
|
125
125
|
// src/commands/new/registerNew/newCli.ts
|
|
126
126
|
import { execSync as execSync6 } from "child_process";
|
|
127
|
-
import { basename as
|
|
127
|
+
import { basename as basename3, resolve as resolve6 } from "path";
|
|
128
128
|
|
|
129
129
|
// src/commands/verify/init.ts
|
|
130
130
|
import chalk17 from "chalk";
|
|
@@ -1925,11 +1925,15 @@ import * as net from "net";
|
|
|
1925
1925
|
|
|
1926
1926
|
// src/commands/sessions/daemon/daemonPaths.ts
|
|
1927
1927
|
import { homedir as homedir2 } from "os";
|
|
1928
|
-
import { join as join9 } from "path";
|
|
1928
|
+
import { basename as basename2, join as join9 } from "path";
|
|
1929
1929
|
var DAEMON_DIR = join9(homedir2(), ".assist", "daemon");
|
|
1930
|
+
function perUserWindowsPipe() {
|
|
1931
|
+
const user = basename2(homedir2()).replace(/[^\w.-]/g, "_");
|
|
1932
|
+
return String.raw`\\.\pipe\assist-sessions-daemon-${user}`;
|
|
1933
|
+
}
|
|
1930
1934
|
var daemonPaths = {
|
|
1931
1935
|
dir: DAEMON_DIR,
|
|
1932
|
-
socket: process.platform === "win32" ?
|
|
1936
|
+
socket: process.platform === "win32" ? perUserWindowsPipe() : join9(DAEMON_DIR, "daemon.sock"),
|
|
1933
1937
|
log: join9(DAEMON_DIR, "daemon.log"),
|
|
1934
1938
|
pid: join9(DAEMON_DIR, "daemon.pid"),
|
|
1935
1939
|
spawnLock: join9(DAEMON_DIR, "spawn.lock"),
|
|
@@ -2406,7 +2410,7 @@ program.parse();
|
|
|
2406
2410
|
|
|
2407
2411
|
// src/commands/new/registerNew/newCli.ts
|
|
2408
2412
|
async function newCli() {
|
|
2409
|
-
const name =
|
|
2413
|
+
const name = basename3(resolve6("."));
|
|
2410
2414
|
initGit();
|
|
2411
2415
|
initPackageJson(name);
|
|
2412
2416
|
console.log("Installing dependencies...");
|
|
@@ -2768,7 +2772,7 @@ function adviceContextFor(cwd) {
|
|
|
2768
2772
|
|
|
2769
2773
|
// src/commands/advise/loadAdviceFragments.ts
|
|
2770
2774
|
import { readdirSync, readFileSync as readFileSync12 } from "fs";
|
|
2771
|
-
import { basename as
|
|
2775
|
+
import { basename as basename4, join as join13 } from "path";
|
|
2772
2776
|
|
|
2773
2777
|
// src/commands/advise/adviceDir.ts
|
|
2774
2778
|
import { existsSync as existsSync17 } from "fs";
|
|
@@ -2809,7 +2813,7 @@ function parseAdviceFragment(name, content) {
|
|
|
2809
2813
|
function loadAdviceFragments(dir = adviceDir()) {
|
|
2810
2814
|
return readdirSync(dir).filter((file) => file.endsWith(".md")).sort().map(
|
|
2811
2815
|
(file) => parseAdviceFragment(
|
|
2812
|
-
|
|
2816
|
+
basename4(file, ".md"),
|
|
2813
2817
|
readFileSync12(join13(dir, file), "utf8")
|
|
2814
2818
|
)
|
|
2815
2819
|
);
|
|
@@ -7217,9 +7221,10 @@ function pullIfConfigured() {
|
|
|
7217
7221
|
return;
|
|
7218
7222
|
}
|
|
7219
7223
|
try {
|
|
7220
|
-
execSync15("git
|
|
7224
|
+
execSync15("git fetch", { stdio: "inherit" });
|
|
7225
|
+
execSync15("git merge --ff-only @{u}", { stdio: "inherit" });
|
|
7221
7226
|
} catch {
|
|
7222
|
-
console.error(chalk59.red("git
|
|
7227
|
+
console.error(chalk59.red("git fast-forward to upstream failed; aborting."));
|
|
7223
7228
|
process.exit(1);
|
|
7224
7229
|
}
|
|
7225
7230
|
}
|
|
@@ -7416,7 +7421,7 @@ function buildArgs(prompt, options2) {
|
|
|
7416
7421
|
|
|
7417
7422
|
// src/commands/backlog/ensureStoryBranch.ts
|
|
7418
7423
|
import { execSync as execSync18 } from "child_process";
|
|
7419
|
-
import { basename as
|
|
7424
|
+
import { basename as basename6 } from "path";
|
|
7420
7425
|
|
|
7421
7426
|
// src/commands/branch/createBranch.ts
|
|
7422
7427
|
import { execSync as execSync17 } from "child_process";
|
|
@@ -7616,7 +7621,7 @@ function worktreeBranchInPlay() {
|
|
|
7616
7621
|
const tree = linkedWorktree(process.cwd());
|
|
7617
7622
|
if (!tree) return null;
|
|
7618
7623
|
const head = currentBranch();
|
|
7619
|
-
return head ===
|
|
7624
|
+
return head === basename6(tree.root) ? head : null;
|
|
7620
7625
|
}
|
|
7621
7626
|
function currentBranch() {
|
|
7622
7627
|
try {
|
|
@@ -13354,16 +13359,16 @@ function handleServerRuns(req, res) {
|
|
|
13354
13359
|
import { execFile as execFile5 } from "child_process";
|
|
13355
13360
|
import { readFileSync as readFileSync21 } from "fs";
|
|
13356
13361
|
import { homedir as homedir14 } from "os";
|
|
13357
|
-
import { basename as
|
|
13362
|
+
import { basename as basename12, join as join38 } from "path";
|
|
13358
13363
|
import { promisify as promisify5 } from "util";
|
|
13359
13364
|
|
|
13360
13365
|
// src/commands/sessions/web/findSynthesisForBranch.ts
|
|
13361
13366
|
import { existsSync as existsSync33, readdirSync as readdirSync5, statSync as statSync6 } from "fs";
|
|
13362
|
-
import { basename as
|
|
13367
|
+
import { basename as basename11, dirname as dirname22, join as join37 } from "path";
|
|
13363
13368
|
function findSynthesisForBranch(repoReviewsDir, branch2) {
|
|
13364
13369
|
const branchKeyPath = join37(repoReviewsDir, `${branch2}-`);
|
|
13365
13370
|
const parent = dirname22(branchKeyPath);
|
|
13366
|
-
const branchPrefix =
|
|
13371
|
+
const branchPrefix = basename11(branchKeyPath);
|
|
13367
13372
|
if (!existsSync33(parent)) return null;
|
|
13368
13373
|
const synthesisFiles = readdirSync5(parent).filter((name) => name.startsWith(branchPrefix)).map((name) => join37(parent, name, "synthesis.md")).filter((path106) => existsSync33(path106)).map((path106) => ({ path: path106, mtime: statSync6(path106).mtimeMs })).sort((a, b) => b.mtime - a.mtime);
|
|
13369
13374
|
return synthesisFiles[0]?.path ?? null;
|
|
@@ -13387,7 +13392,7 @@ async function resolveSynthesisPath(cwd) {
|
|
|
13387
13392
|
homedir14(),
|
|
13388
13393
|
".assist",
|
|
13389
13394
|
"reviews",
|
|
13390
|
-
|
|
13395
|
+
basename12(repoRoot2)
|
|
13391
13396
|
);
|
|
13392
13397
|
return findSynthesisForBranch(repoReviewsDir, branch2);
|
|
13393
13398
|
}
|
|
@@ -13746,8 +13751,8 @@ function subsequenceScore(text17, query) {
|
|
|
13746
13751
|
function scoreFilePath(path106, query) {
|
|
13747
13752
|
const needle = query.trim().toLowerCase();
|
|
13748
13753
|
if (!needle) return 0;
|
|
13749
|
-
const
|
|
13750
|
-
const inBasename = subsequenceScore(
|
|
13754
|
+
const basename34 = path106.slice(path106.lastIndexOf("/") + 1);
|
|
13755
|
+
const inBasename = subsequenceScore(basename34, needle);
|
|
13751
13756
|
if (inBasename !== null) return BASENAME_WEIGHT + inBasename;
|
|
13752
13757
|
return subsequenceScore(path106, needle);
|
|
13753
13758
|
}
|
|
@@ -17116,7 +17121,7 @@ function stripAnsi(text17) {
|
|
|
17116
17121
|
// src/commands/sessions/daemon/worktree/watcherLogPath.ts
|
|
17117
17122
|
import { createHash as createHash2 } from "crypto";
|
|
17118
17123
|
import { homedir as homedir16 } from "os";
|
|
17119
|
-
import { basename as
|
|
17124
|
+
import { basename as basename13, join as join42 } from "path";
|
|
17120
17125
|
|
|
17121
17126
|
// src/commands/sessions/daemon/worktree/canonicalTreePath.ts
|
|
17122
17127
|
import { realpathSync as realpathSync2 } from "fs";
|
|
@@ -17134,7 +17139,7 @@ function watcherLogPath(cwd) {
|
|
|
17134
17139
|
const clone = canonicalTreePath(cwd);
|
|
17135
17140
|
const key = createHash2("sha1").update(clone).digest("hex").slice(0, 8);
|
|
17136
17141
|
const dir = process.env.ASSIST_WATCHER_LOG_DIR ?? join42(homedir16(), ".assist", "watchers");
|
|
17137
|
-
return join42(dir, `${
|
|
17142
|
+
return join42(dir, `${basename13(clone) || "root"}-${key}.log`);
|
|
17138
17143
|
}
|
|
17139
17144
|
|
|
17140
17145
|
// src/commands/sessions/web/updates/readUpdateHistory.ts
|
|
@@ -18325,7 +18330,7 @@ function registerBranch(program2) {
|
|
|
18325
18330
|
}
|
|
18326
18331
|
|
|
18327
18332
|
// src/commands/cliHook.ts
|
|
18328
|
-
import { basename as
|
|
18333
|
+
import { basename as basename14 } from "path";
|
|
18329
18334
|
|
|
18330
18335
|
// src/shared/splitCompound.ts
|
|
18331
18336
|
import { parse } from "shell-quote";
|
|
@@ -19335,7 +19340,7 @@ async function cliHook() {
|
|
|
19335
19340
|
logDeniedToolCall({
|
|
19336
19341
|
tool: input.toolName,
|
|
19337
19342
|
command: input.command,
|
|
19338
|
-
repo:
|
|
19343
|
+
repo: basename14(process.cwd()),
|
|
19339
19344
|
sessionId: process.env.CLAUDE_SESSION_ID,
|
|
19340
19345
|
denyReason: decision.permissionDecisionReason
|
|
19341
19346
|
});
|
|
@@ -21631,7 +21636,7 @@ function signPreflightProblem(source) {
|
|
|
21631
21636
|
|
|
21632
21637
|
// src/commands/criteriaExtension/stageCriteriaExtension.ts
|
|
21633
21638
|
import { cp as cp3, mkdir as mkdir5, readFile as readFile5, rm, writeFile as writeFile4 } from "fs/promises";
|
|
21634
|
-
import { basename as
|
|
21639
|
+
import { basename as basename15, join as join55 } from "path";
|
|
21635
21640
|
|
|
21636
21641
|
// src/commands/criteriaExtension/stampManifestVersion.ts
|
|
21637
21642
|
function stampManifestVersion(manifest, version2) {
|
|
@@ -21646,7 +21651,7 @@ async function stageCriteriaExtension(source, staging, version2) {
|
|
|
21646
21651
|
await mkdir5(staging, { recursive: true });
|
|
21647
21652
|
await cp3(source, staging, {
|
|
21648
21653
|
recursive: true,
|
|
21649
|
-
filter: (path106) =>
|
|
21654
|
+
filter: (path106) => basename15(path106) !== "updates.json"
|
|
21650
21655
|
});
|
|
21651
21656
|
const manifest = join55(staging, "manifest.json");
|
|
21652
21657
|
const stamped = stampManifestVersion(
|
|
@@ -22020,7 +22025,7 @@ function registerDeploy(program2) {
|
|
|
22020
22025
|
|
|
22021
22026
|
// src/commands/devlog/list.ts
|
|
22022
22027
|
import { execFileSync as execFileSync6 } from "child_process";
|
|
22023
|
-
import { basename as
|
|
22028
|
+
import { basename as basename17 } from "path";
|
|
22024
22029
|
|
|
22025
22030
|
// src/commands/devlog/loadBlogSkipDays.ts
|
|
22026
22031
|
import { homedir as homedir22 } from "os";
|
|
@@ -22039,7 +22044,7 @@ import chalk146 from "chalk";
|
|
|
22039
22044
|
|
|
22040
22045
|
// src/shared/getRepoName.ts
|
|
22041
22046
|
import { existsSync as existsSync51, readFileSync as readFileSync33 } from "fs";
|
|
22042
|
-
import { basename as
|
|
22047
|
+
import { basename as basename16, join as join60 } from "path";
|
|
22043
22048
|
function getRepoName() {
|
|
22044
22049
|
const config = loadConfig();
|
|
22045
22050
|
if (config.devlog?.name) {
|
|
@@ -22056,7 +22061,7 @@ function getRepoName() {
|
|
|
22056
22061
|
} catch {
|
|
22057
22062
|
}
|
|
22058
22063
|
}
|
|
22059
|
-
return
|
|
22064
|
+
return basename16(process.cwd());
|
|
22060
22065
|
}
|
|
22061
22066
|
|
|
22062
22067
|
// src/commands/devlog/loadDevlogEntries.ts
|
|
@@ -22192,7 +22197,7 @@ function list2(options2) {
|
|
|
22192
22197
|
const config = loadConfig();
|
|
22193
22198
|
const days = options2.days ?? 30;
|
|
22194
22199
|
const ignore3 = options2.ignore ?? config.devlog?.ignore ?? [];
|
|
22195
|
-
const repoName =
|
|
22200
|
+
const repoName = basename17(process.cwd());
|
|
22196
22201
|
const skipDays = loadBlogSkipDays(repoName);
|
|
22197
22202
|
const devlogEntries = loadDevlogEntries(repoName);
|
|
22198
22203
|
const args = ["log"];
|
|
@@ -25114,7 +25119,7 @@ function attachArgs(attachments) {
|
|
|
25114
25119
|
|
|
25115
25120
|
// src/commands/prs/runGhWithAttachments.ts
|
|
25116
25121
|
import { execFileSync as execFileSync10 } from "child_process";
|
|
25117
|
-
import { basename as
|
|
25122
|
+
import { basename as basename18 } from "path";
|
|
25118
25123
|
|
|
25119
25124
|
// src/shared/removeStagedAttachments.ts
|
|
25120
25125
|
import { rmSync as rmSync4 } from "fs";
|
|
@@ -25131,7 +25136,7 @@ function removeStagedAttachments(attachments) {
|
|
|
25131
25136
|
var PLACED_URL = /https:\/\/\S+\/(pull|issues)\/\d+/;
|
|
25132
25137
|
function reportPartialFailure(attachments, stderr) {
|
|
25133
25138
|
const failed3 = attachments.filter(
|
|
25134
|
-
({ path: path106 }) => stderr.includes(path106) || stderr.includes(
|
|
25139
|
+
({ path: path106 }) => stderr.includes(path106) || stderr.includes(basename18(path106))
|
|
25135
25140
|
);
|
|
25136
25141
|
const named = failed3.length > 0 ? failed3 : attachments;
|
|
25137
25142
|
console.error(
|
|
@@ -25917,15 +25922,15 @@ function recentDaemonLogLines(includeRelayed = true) {
|
|
|
25917
25922
|
|
|
25918
25923
|
// src/commands/sessions/daemon/worktree/createWorktree.ts
|
|
25919
25924
|
import { existsSync as existsSync57 } from "fs";
|
|
25920
|
-
import { basename as
|
|
25925
|
+
import { basename as basename20, dirname as dirname29 } from "path";
|
|
25921
25926
|
|
|
25922
25927
|
// src/commands/sessions/daemon/worktree/planAllocation.ts
|
|
25923
|
-
import { basename as
|
|
25928
|
+
import { basename as basename19, join as join67 } from "path";
|
|
25924
25929
|
function planAllocation(clone, boundTreeRoots2) {
|
|
25925
25930
|
return boundTreeRoots2.has(clone) ? "spill" : "primary";
|
|
25926
25931
|
}
|
|
25927
25932
|
function nextWorktreePath(clone, base, isTaken) {
|
|
25928
|
-
const name =
|
|
25933
|
+
const name = basename19(clone);
|
|
25929
25934
|
for (let n = 2; n < 1e3; n++) {
|
|
25930
25935
|
const candidate = join67(base, `${name}-${n}`);
|
|
25931
25936
|
if (!isTaken(candidate)) return candidate;
|
|
@@ -25963,7 +25968,7 @@ function createWorktree(clone, strategy, boundTreeRoots2, preferredPath) {
|
|
|
25963
25968
|
const base = strategy.root ? expandTilde2(strategy.root) : dirname29(clone);
|
|
25964
25969
|
const registered = new Set(listWorktreePaths(clone));
|
|
25965
25970
|
const branches = new Set(listLocalBranches(clone));
|
|
25966
|
-
const isTaken = (candidate) => registered.has(candidate) || existsSync57(candidate) || boundTreeRoots2.has(candidate) || branches.has(
|
|
25971
|
+
const isTaken = (candidate) => registered.has(candidate) || existsSync57(candidate) || boundTreeRoots2.has(candidate) || branches.has(basename20(candidate));
|
|
25967
25972
|
const path106 = preferredPath && !isTaken(preferredPath) ? preferredPath : nextWorktreePath(clone, base, isTaken);
|
|
25968
25973
|
const start2 = worktreeStartPoint(clone, strategy.trunk);
|
|
25969
25974
|
gitSync(clone, [
|
|
@@ -25971,13 +25976,13 @@ function createWorktree(clone, strategy, boundTreeRoots2, preferredPath) {
|
|
|
25971
25976
|
"add",
|
|
25972
25977
|
start2.track ? "--track" : "--no-track",
|
|
25973
25978
|
"-b",
|
|
25974
|
-
|
|
25979
|
+
basename20(path106),
|
|
25975
25980
|
path106,
|
|
25976
25981
|
start2.ref
|
|
25977
25982
|
]);
|
|
25978
25983
|
recordWorktree(path106, clone, getCurrentOrigin(clone));
|
|
25979
25984
|
daemonLog(
|
|
25980
|
-
start2.track ? `worktree allocated ${path106} (branch ${
|
|
25985
|
+
start2.track ? `worktree allocated ${path106} (branch ${basename20(path106)} tracking ${start2.ref}) for clone ${clone}` : `worktree allocated ${path106} (branch ${basename20(path106)} off ${start2.ref}, no mainline tracking) for clone ${clone}`
|
|
25981
25986
|
);
|
|
25982
25987
|
return path106;
|
|
25983
25988
|
}
|
|
@@ -26765,7 +26770,7 @@ import chalk175 from "chalk";
|
|
|
26765
26770
|
|
|
26766
26771
|
// src/commands/mermaid/exportFile.ts
|
|
26767
26772
|
import { readFileSync as readFileSync39, writeFileSync as writeFileSync32 } from "fs";
|
|
26768
|
-
import { basename as
|
|
26773
|
+
import { basename as basename21, extname as extname3, resolve as resolve18 } from "path";
|
|
26769
26774
|
import chalk174 from "chalk";
|
|
26770
26775
|
|
|
26771
26776
|
// src/commands/mermaid/renderBlock.ts
|
|
@@ -26792,7 +26797,7 @@ async function renderBlock(krokiUrl, source) {
|
|
|
26792
26797
|
async function exportFile(file, outDir, krokiUrl, onlyIndex) {
|
|
26793
26798
|
const content = readFileSync39(file, "utf8");
|
|
26794
26799
|
const blocks = extractMermaidBlocks(content);
|
|
26795
|
-
const stem =
|
|
26800
|
+
const stem = basename21(file, extname3(file));
|
|
26796
26801
|
if (onlyIndex !== void 0) {
|
|
26797
26802
|
if (onlyIndex < 1 || onlyIndex > blocks.length) {
|
|
26798
26803
|
console.error(
|
|
@@ -34199,7 +34204,7 @@ function groupFilesByDirectory(files) {
|
|
|
34199
34204
|
}
|
|
34200
34205
|
|
|
34201
34206
|
// src/commands/review/highLevel/buildHighLevelTree.ts
|
|
34202
|
-
function
|
|
34207
|
+
function basename22(path106) {
|
|
34203
34208
|
return path106.slice(path106.lastIndexOf("/") + 1);
|
|
34204
34209
|
}
|
|
34205
34210
|
function sum(nodes, key) {
|
|
@@ -34215,7 +34220,7 @@ function nodesOf(at2, prefix2) {
|
|
|
34215
34220
|
const files = at2.files.map(
|
|
34216
34221
|
(file) => ({
|
|
34217
34222
|
kind: "file",
|
|
34218
|
-
name:
|
|
34223
|
+
name: basename22(file.path),
|
|
34219
34224
|
...file
|
|
34220
34225
|
})
|
|
34221
34226
|
);
|
|
@@ -36715,13 +36720,13 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
|
|
|
36715
36720
|
|
|
36716
36721
|
// src/commands/review/buildReviewPaths.ts
|
|
36717
36722
|
import { homedir as homedir25 } from "os";
|
|
36718
|
-
import { basename as
|
|
36723
|
+
import { basename as basename23, join as join83 } from "path";
|
|
36719
36724
|
function buildReviewPaths(repoRoot2, key) {
|
|
36720
36725
|
const reviewDir = join83(
|
|
36721
36726
|
homedir25(),
|
|
36722
36727
|
".assist",
|
|
36723
36728
|
"reviews",
|
|
36724
|
-
|
|
36729
|
+
basename23(repoRoot2),
|
|
36725
36730
|
key
|
|
36726
36731
|
);
|
|
36727
36732
|
return {
|
|
@@ -38908,7 +38913,7 @@ function list3() {
|
|
|
38908
38913
|
|
|
38909
38914
|
// src/commands/transcript/move.ts
|
|
38910
38915
|
import { existsSync as existsSync77, mkdirSync as mkdirSync32, renameSync as renameSync2, writeFileSync as writeFileSync50 } from "fs";
|
|
38911
|
-
import { basename as
|
|
38916
|
+
import { basename as basename27, join as join97 } from "path";
|
|
38912
38917
|
|
|
38913
38918
|
// src/commands/transcript/convertVttToMarkdown.ts
|
|
38914
38919
|
function convertVttToMarkdown(inputPath) {
|
|
@@ -38929,13 +38934,13 @@ function move(file, options2) {
|
|
|
38929
38934
|
process.exit(1);
|
|
38930
38935
|
}
|
|
38931
38936
|
const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
|
|
38932
|
-
const filename =
|
|
38937
|
+
const filename = basename27(file);
|
|
38933
38938
|
const sourcePath = join97(vttDir, filename);
|
|
38934
38939
|
if (!existsSync77(sourcePath)) {
|
|
38935
38940
|
console.error(`Error: VTT file not found: ${sourcePath}`);
|
|
38936
38941
|
process.exit(1);
|
|
38937
38942
|
}
|
|
38938
|
-
const base =
|
|
38943
|
+
const base = basename27(filename, ".vtt").replace(/ Transcription$/, "");
|
|
38939
38944
|
const outputName = `${date} ${base}.md`;
|
|
38940
38945
|
const formattedDir = join97(transcriptsDir, client);
|
|
38941
38946
|
mkdirSync32(formattedDir, { recursive: true });
|
|
@@ -38949,7 +38954,7 @@ function move(file, options2) {
|
|
|
38949
38954
|
|
|
38950
38955
|
// src/commands/transcript/merge.ts
|
|
38951
38956
|
import { existsSync as existsSync78, writeFileSync as writeFileSync51 } from "fs";
|
|
38952
|
-
import { basename as
|
|
38957
|
+
import { basename as basename28 } from "path";
|
|
38953
38958
|
|
|
38954
38959
|
// src/commands/transcript/failTranscript.ts
|
|
38955
38960
|
function failTranscript(message3) {
|
|
@@ -39095,7 +39100,7 @@ function readSource3(file) {
|
|
|
39095
39100
|
if (!existsSync78(file)) failTranscript(`VTT file not found: ${file}`);
|
|
39096
39101
|
const cues = readCleanedCues(file);
|
|
39097
39102
|
if (cues.length === 0) failTranscript(`no cues found in: ${file}`);
|
|
39098
|
-
return { path: file, name:
|
|
39103
|
+
return { path: file, name: basename28(file), cues };
|
|
39099
39104
|
}
|
|
39100
39105
|
function wholePassages(sources) {
|
|
39101
39106
|
return sources.map((source) => ({
|
|
@@ -39756,7 +39761,7 @@ function listMigrationFiles(dir) {
|
|
|
39756
39761
|
|
|
39757
39762
|
// src/commands/verify/migrations/readBaselineMigrations.ts
|
|
39758
39763
|
import { execSync as execSync63 } from "child_process";
|
|
39759
|
-
import { basename as
|
|
39764
|
+
import { basename as basename29 } from "path";
|
|
39760
39765
|
var MIGRATION_FILE3 = /^migration\d+[A-Za-z0-9]*\.ts$/;
|
|
39761
39766
|
function readBaselineMigrations(repoRelativeDir, ref) {
|
|
39762
39767
|
const baseline = /* @__PURE__ */ new Map();
|
|
@@ -39769,7 +39774,7 @@ function readBaselineMigrations(repoRelativeDir, ref) {
|
|
|
39769
39774
|
} catch {
|
|
39770
39775
|
return baseline;
|
|
39771
39776
|
}
|
|
39772
|
-
const paths = listing.split("\n").map((line) => line.trim()).filter(Boolean).filter((path106) => MIGRATION_FILE3.test(
|
|
39777
|
+
const paths = listing.split("\n").map((line) => line.trim()).filter(Boolean).filter((path106) => MIGRATION_FILE3.test(basename29(path106)));
|
|
39773
39778
|
for (const path106 of paths) {
|
|
39774
39779
|
try {
|
|
39775
39780
|
const content = execSync63(`git show "${ref}:${path106}"`, {
|
|
@@ -39777,7 +39782,7 @@ function readBaselineMigrations(repoRelativeDir, ref) {
|
|
|
39777
39782
|
maxBuffer: 16 * 1024 * 1024,
|
|
39778
39783
|
stdio: ["pipe", "pipe", "pipe"]
|
|
39779
39784
|
});
|
|
39780
|
-
baseline.set(
|
|
39785
|
+
baseline.set(basename29(path106), content);
|
|
39781
39786
|
} catch {
|
|
39782
39787
|
}
|
|
39783
39788
|
}
|
|
@@ -42508,7 +42513,7 @@ function setStatus2(session, newStatus) {
|
|
|
42508
42513
|
|
|
42509
42514
|
// src/commands/sessions/daemon/worktree/reapWorktree.ts
|
|
42510
42515
|
import { existsSync as existsSync87 } from "fs";
|
|
42511
|
-
import { basename as
|
|
42516
|
+
import { basename as basename30 } from "path";
|
|
42512
42517
|
|
|
42513
42518
|
// src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
|
|
42514
42519
|
import { existsSync as existsSync86 } from "fs";
|
|
@@ -42651,7 +42656,7 @@ async function reapWorktree(worktreePath, force = false) {
|
|
|
42651
42656
|
const clone = owningClone(worktreePath);
|
|
42652
42657
|
const removal = await removeTree(clone, worktreePath, force);
|
|
42653
42658
|
if (!removal.removed) return removal;
|
|
42654
|
-
await deleteWorktreeBranch(clone,
|
|
42659
|
+
await deleteWorktreeBranch(clone, basename30(worktreePath));
|
|
42655
42660
|
forgetWorktree(worktreePath);
|
|
42656
42661
|
daemonLog(`worktree ${worktreePath} reaped${force ? " (forced)" : ""}`);
|
|
42657
42662
|
return removal;
|
|
@@ -45556,7 +45561,7 @@ function rearmStoppedSessions(sessions, notify2) {
|
|
|
45556
45561
|
|
|
45557
45562
|
// src/commands/sessions/daemon/worktree/reconcileWorktreesOnRestore.ts
|
|
45558
45563
|
import { existsSync as existsSync93 } from "fs";
|
|
45559
|
-
import { basename as
|
|
45564
|
+
import { basename as basename32 } from "path";
|
|
45560
45565
|
|
|
45561
45566
|
// src/commands/sessions/daemon/worktree/accountedTrees.ts
|
|
45562
45567
|
function accountedTrees(sessions) {
|
|
@@ -45664,7 +45669,7 @@ function capped2(lines2) {
|
|
|
45664
45669
|
}
|
|
45665
45670
|
|
|
45666
45671
|
// src/commands/sessions/daemon/worktree/resurfaceOrphanedWorktree.ts
|
|
45667
|
-
import { basename as
|
|
45672
|
+
import { basename as basename31 } from "path";
|
|
45668
45673
|
function resurfaceOrphanedWorktree(sessions, spawnWith, recovered, notify2) {
|
|
45669
45674
|
const { orphan, reason: reason4, held } = recovered;
|
|
45670
45675
|
let id;
|
|
@@ -45687,7 +45692,7 @@ function orphanedSession(id, recovered) {
|
|
|
45687
45692
|
const { orphan, reason: reason4, held } = recovered;
|
|
45688
45693
|
return {
|
|
45689
45694
|
...sessionBase(id, "stopped"),
|
|
45690
|
-
name: `recovered ${
|
|
45695
|
+
name: `recovered ${basename31(orphan.path)}`,
|
|
45691
45696
|
subtitle: `${held.summary} in ${orphan.path}`,
|
|
45692
45697
|
commandType: "claude",
|
|
45693
45698
|
pty: null,
|
|
@@ -45748,7 +45753,7 @@ async function recoverOrphanedWorktrees(sessions, spawnWith, notify2) {
|
|
|
45748
45753
|
logVanishedTree(sessions, path106);
|
|
45749
45754
|
vanished.set(clone, [
|
|
45750
45755
|
...vanished.get(clone) ?? [],
|
|
45751
|
-
{ path: path106, branch:
|
|
45756
|
+
{ path: path106, branch: basename32(path106) }
|
|
45752
45757
|
]);
|
|
45753
45758
|
continue;
|
|
45754
45759
|
}
|