@sechroom/cli 2026.6.192-rc.f5192d37 → 2026.6.193-rc.b5fbbe27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +44 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1774,7 +1774,7 @@ Examples:
|
|
|
1774
1774
|
}
|
|
1775
1775
|
|
|
1776
1776
|
// src/commands/hook.ts
|
|
1777
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
1777
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync3, statSync, writeFileSync as writeFileSync3 } from "fs";
|
|
1778
1778
|
import { homedir as homedir3 } from "os";
|
|
1779
1779
|
import { delimiter, dirname as dirname4, join as join4 } from "path";
|
|
1780
1780
|
|
|
@@ -2090,8 +2090,46 @@ function resolveLane(flagLane, cwd) {
|
|
|
2090
2090
|
const env = process.env.SECHROOM_LANE;
|
|
2091
2091
|
if (env) return env;
|
|
2092
2092
|
const start = cwd ?? process.cwd();
|
|
2093
|
-
const
|
|
2094
|
-
return
|
|
2093
|
+
const base = readSem(resolveSemPathForRead(start))?.values["code-lane"];
|
|
2094
|
+
if (!base) return void 0;
|
|
2095
|
+
return applyWorktreeLaneSuffix(base, start);
|
|
2096
|
+
}
|
|
2097
|
+
function applyWorktreeLaneSuffix(lane, start) {
|
|
2098
|
+
try {
|
|
2099
|
+
let dir = start;
|
|
2100
|
+
let gitPath;
|
|
2101
|
+
for (; ; ) {
|
|
2102
|
+
const candidate = join4(dir, ".git");
|
|
2103
|
+
if (existsSync4(candidate)) {
|
|
2104
|
+
gitPath = candidate;
|
|
2105
|
+
break;
|
|
2106
|
+
}
|
|
2107
|
+
const parent = dirname4(dir);
|
|
2108
|
+
if (parent === dir) break;
|
|
2109
|
+
dir = parent;
|
|
2110
|
+
}
|
|
2111
|
+
if (!gitPath || statSync(gitPath).isDirectory()) return lane;
|
|
2112
|
+
const gitFile = readFileSync3(gitPath, "utf8");
|
|
2113
|
+
const common = gitFile.trim().match(/^gitdir:\s*(.+)\/worktrees\/[^/\s]+\s*$/);
|
|
2114
|
+
if (!common) return lane;
|
|
2115
|
+
const worktreesDir = join4(common[1], "worktrees");
|
|
2116
|
+
const siblings = readdirSync(worktreesDir).filter((n) => {
|
|
2117
|
+
try {
|
|
2118
|
+
return statSync(join4(worktreesDir, n)).isDirectory();
|
|
2119
|
+
} catch {
|
|
2120
|
+
return false;
|
|
2121
|
+
}
|
|
2122
|
+
});
|
|
2123
|
+
return laneWithWorktreeSuffix(lane, gitFile, siblings);
|
|
2124
|
+
} catch {
|
|
2125
|
+
return lane;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
function laneWithWorktreeSuffix(lane, gitFile, siblings) {
|
|
2129
|
+
const m = gitFile.trim().match(/\/worktrees\/([^/\s]+)\s*$/);
|
|
2130
|
+
if (!m) return lane;
|
|
2131
|
+
const idx = [...siblings].sort().indexOf(m[1]);
|
|
2132
|
+
return idx < 0 ? lane : `${lane}-${idx + 2}`;
|
|
2095
2133
|
}
|
|
2096
2134
|
var INTENT_FILE = join4(".sechroom", "continuity.json");
|
|
2097
2135
|
function resolveIntentPath(start) {
|
|
@@ -3248,7 +3286,7 @@ import { basename as basename3, join as join8 } from "path";
|
|
|
3248
3286
|
|
|
3249
3287
|
// src/commands/fanout.ts
|
|
3250
3288
|
import { spawnSync } from "child_process";
|
|
3251
|
-
import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync, statSync } from "fs";
|
|
3289
|
+
import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
3252
3290
|
import { isAbsolute, join as join7, resolve } from "path";
|
|
3253
3291
|
var ICON = {
|
|
3254
3292
|
refresh: "\u21BB",
|
|
@@ -3262,7 +3300,7 @@ function resolveChildDir(path, root) {
|
|
|
3262
3300
|
function discoverChildren(root) {
|
|
3263
3301
|
let names;
|
|
3264
3302
|
try {
|
|
3265
|
-
names =
|
|
3303
|
+
names = readdirSync2(root);
|
|
3266
3304
|
} catch {
|
|
3267
3305
|
return [];
|
|
3268
3306
|
}
|
|
@@ -3271,7 +3309,7 @@ function discoverChildren(root) {
|
|
|
3271
3309
|
if (name.startsWith(".") || name === "node_modules") continue;
|
|
3272
3310
|
const dir = join7(root, name);
|
|
3273
3311
|
try {
|
|
3274
|
-
if (!
|
|
3312
|
+
if (!statSync2(dir).isDirectory()) continue;
|
|
3275
3313
|
} catch {
|
|
3276
3314
|
continue;
|
|
3277
3315
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sechroom/cli",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.193-rc.b5fbbe27",
|
|
4
4
|
"description": "Sechroom CLI — a thin, generated client over the Sechroom HTTP API. An agent/human surface alongside MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|