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