chat-recall 0.5.31 → 0.6.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/README.md +17 -0
- package/dist/bulk-delete.d.ts +131 -0
- package/dist/bulk-delete.d.ts.map +1 -0
- package/dist/bulk-delete.js +211 -0
- package/dist/bulk-delete.js.map +1 -0
- package/dist/cli.js +756 -445
- package/dist/cli.js.map +1 -1
- package/dist/mcp-relay.d.ts +3 -0
- package/dist/mcp-relay.d.ts.map +1 -0
- package/dist/mcp-relay.js +229 -0
- package/dist/mcp-relay.js.map +1 -0
- package/dist/mcp-socket.d.ts +98 -0
- package/dist/mcp-socket.d.ts.map +1 -0
- package/dist/mcp-socket.js +249 -0
- package/dist/mcp-socket.js.map +1 -0
- package/dist/mcp.js +1012 -759
- package/dist/mcp.js.map +1 -1
- package/dist/scan-worker.js +59 -20
- package/dist/update-notice.d.ts +23 -2
- package/dist/update-notice.d.ts.map +1 -1
- package/dist/update-notice.js +50 -5
- package/dist/update-notice.js.map +1 -1
- package/dist/watch.js +194 -189
- package/package.json +4 -3
package/dist/watch.js
CHANGED
|
@@ -5917,6 +5917,64 @@ var init_chunker = __esm({
|
|
|
5917
5917
|
}
|
|
5918
5918
|
});
|
|
5919
5919
|
|
|
5920
|
+
// ../engine/dist/core/project-dir-name.js
|
|
5921
|
+
import { readdirSync as readdirSync4 } from "node:fs";
|
|
5922
|
+
function looksWindowsEncoded(dirName) {
|
|
5923
|
+
return /^[A-Za-z]--/.test(dirName);
|
|
5924
|
+
}
|
|
5925
|
+
function decodeProjectDirName(dirName) {
|
|
5926
|
+
if (!dirName)
|
|
5927
|
+
return "";
|
|
5928
|
+
if (looksWindowsEncoded(dirName)) {
|
|
5929
|
+
const drive = dirName[0].toUpperCase();
|
|
5930
|
+
const rest = dirName.slice(3).replace(/-/g, "\\");
|
|
5931
|
+
return `${drive}:\\${rest}`;
|
|
5932
|
+
}
|
|
5933
|
+
return "/" + dirName.replace(/^-/, "").replace(/-/g, "/");
|
|
5934
|
+
}
|
|
5935
|
+
function resolveProjectDirName(dirName, deps = {}) {
|
|
5936
|
+
const structural = decodeProjectDirName(dirName);
|
|
5937
|
+
if (!dirName)
|
|
5938
|
+
return structural;
|
|
5939
|
+
if (looksWindowsEncoded(dirName))
|
|
5940
|
+
return structural;
|
|
5941
|
+
const readdir3 = deps.readdir ?? ((p) => readdirSync4(p, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name));
|
|
5942
|
+
const encodeName = (name) => name.replace(/[-_.]/g, "-");
|
|
5943
|
+
let remaining = dirName.replace(/^-/, "");
|
|
5944
|
+
let current = "/";
|
|
5945
|
+
while (remaining) {
|
|
5946
|
+
let children;
|
|
5947
|
+
try {
|
|
5948
|
+
children = readdir3(current);
|
|
5949
|
+
} catch {
|
|
5950
|
+
break;
|
|
5951
|
+
}
|
|
5952
|
+
let best = "";
|
|
5953
|
+
for (const child of children) {
|
|
5954
|
+
const encoded = encodeName(child);
|
|
5955
|
+
if (!encoded || encoded.length < best.length)
|
|
5956
|
+
continue;
|
|
5957
|
+
if (!remaining.startsWith(encoded))
|
|
5958
|
+
continue;
|
|
5959
|
+
const next = remaining[encoded.length];
|
|
5960
|
+
if (next !== void 0 && next !== "-")
|
|
5961
|
+
continue;
|
|
5962
|
+
if (encoded.length > best.length)
|
|
5963
|
+
best = child;
|
|
5964
|
+
}
|
|
5965
|
+
if (!best)
|
|
5966
|
+
break;
|
|
5967
|
+
current = current === "/" ? `/${best}` : `${current}/${best}`;
|
|
5968
|
+
remaining = remaining.slice(encodeName(best).length).replace(/^-/, "");
|
|
5969
|
+
}
|
|
5970
|
+
return remaining ? structural : current;
|
|
5971
|
+
}
|
|
5972
|
+
var init_project_dir_name = __esm({
|
|
5973
|
+
"../engine/dist/core/project-dir-name.js"() {
|
|
5974
|
+
"use strict";
|
|
5975
|
+
}
|
|
5976
|
+
});
|
|
5977
|
+
|
|
5920
5978
|
// ../engine/dist/core/model-pricing.js
|
|
5921
5979
|
function pricingFor(modelId) {
|
|
5922
5980
|
if (!modelId)
|
|
@@ -6088,7 +6146,7 @@ var init_model_pricing = __esm({
|
|
|
6088
6146
|
});
|
|
6089
6147
|
|
|
6090
6148
|
// ../engine/dist/parsers/session.js
|
|
6091
|
-
import { createReadStream, existsSync as existsSync5, readdirSync as
|
|
6149
|
+
import { createReadStream, existsSync as existsSync5, readdirSync as readdirSync5, readFileSync as readFileSync2, statSync as statSync4, openSync, readSync, closeSync } from "fs";
|
|
6092
6150
|
import { createInterface } from "readline";
|
|
6093
6151
|
import { join as join5, basename as basename2 } from "path";
|
|
6094
6152
|
function removeCodeBlocks(text) {
|
|
@@ -6159,7 +6217,7 @@ function* iterAllSessionIndices(claudeDir) {
|
|
|
6159
6217
|
if (!existsSync5(dir)) {
|
|
6160
6218
|
return;
|
|
6161
6219
|
}
|
|
6162
|
-
const entries =
|
|
6220
|
+
const entries = readdirSync5(dir, { withFileTypes: true });
|
|
6163
6221
|
for (const entry of entries) {
|
|
6164
6222
|
if (!entry.isDirectory())
|
|
6165
6223
|
continue;
|
|
@@ -6181,7 +6239,7 @@ function getSubagentPaths(sessionPath) {
|
|
|
6181
6239
|
const subagentsDir = join5(sessionPath.slice(0, -6), "subagents");
|
|
6182
6240
|
if (!existsSync5(subagentsDir))
|
|
6183
6241
|
return [];
|
|
6184
|
-
return
|
|
6242
|
+
return readdirSync5(subagentsDir).filter((f) => f.endsWith(".jsonl")).sort().map((f) => join5(subagentsDir, f));
|
|
6185
6243
|
}
|
|
6186
6244
|
function getSubagentProjectPath(sessionPath, folderDerivedPath) {
|
|
6187
6245
|
const subagentPaths = getSubagentPaths(sessionPath);
|
|
@@ -6498,40 +6556,6 @@ ${resultText}` : resultText;
|
|
|
6498
6556
|
});
|
|
6499
6557
|
return content;
|
|
6500
6558
|
}
|
|
6501
|
-
function decodeDirName(dirName) {
|
|
6502
|
-
const segments = dirName.replace(/^-/, "").split("-");
|
|
6503
|
-
let currentPath = "/";
|
|
6504
|
-
let i = 0;
|
|
6505
|
-
while (i < segments.length) {
|
|
6506
|
-
let matched = false;
|
|
6507
|
-
const singleCandidate = join5(currentPath, segments[i]);
|
|
6508
|
-
if (existsSync5(singleCandidate)) {
|
|
6509
|
-
currentPath = singleCandidate;
|
|
6510
|
-
i++;
|
|
6511
|
-
matched = true;
|
|
6512
|
-
continue;
|
|
6513
|
-
}
|
|
6514
|
-
for (let len = 2; len <= segments.length - i; len++) {
|
|
6515
|
-
const joinedSegments = segments.slice(i, i + len);
|
|
6516
|
-
for (const sep5 of ["-", "_", "."]) {
|
|
6517
|
-
const candidate = join5(currentPath, joinedSegments.join(sep5));
|
|
6518
|
-
if (existsSync5(candidate)) {
|
|
6519
|
-
currentPath = candidate;
|
|
6520
|
-
i += len;
|
|
6521
|
-
matched = true;
|
|
6522
|
-
break;
|
|
6523
|
-
}
|
|
6524
|
-
}
|
|
6525
|
-
if (matched)
|
|
6526
|
-
break;
|
|
6527
|
-
}
|
|
6528
|
-
if (!matched) {
|
|
6529
|
-
currentPath = join5(currentPath, segments[i]);
|
|
6530
|
-
i++;
|
|
6531
|
-
}
|
|
6532
|
-
}
|
|
6533
|
-
return currentPath;
|
|
6534
|
-
}
|
|
6535
6559
|
function* getAllSessions(claudeDir) {
|
|
6536
6560
|
const seenSessionIds = /* @__PURE__ */ new Set();
|
|
6537
6561
|
const projectDirs = claudeDir ? [claudeDir] : claudeProjectDirs();
|
|
@@ -6546,12 +6570,12 @@ function* getAllSessions(claudeDir) {
|
|
|
6546
6570
|
}
|
|
6547
6571
|
if (!existsSync5(dir))
|
|
6548
6572
|
continue;
|
|
6549
|
-
const dirEntries =
|
|
6573
|
+
const dirEntries = readdirSync5(dir, { withFileTypes: true });
|
|
6550
6574
|
for (const projDirEntry of dirEntries) {
|
|
6551
6575
|
if (!projDirEntry.isDirectory())
|
|
6552
6576
|
continue;
|
|
6553
6577
|
const projectPath = join5(dir, projDirEntry.name);
|
|
6554
|
-
const files =
|
|
6578
|
+
const files = readdirSync5(projectPath);
|
|
6555
6579
|
for (const file of files) {
|
|
6556
6580
|
if (!file.endsWith(".jsonl"))
|
|
6557
6581
|
continue;
|
|
@@ -6565,7 +6589,7 @@ function* getAllSessions(claudeDir) {
|
|
|
6565
6589
|
const fullPath = join5(projectPath, file);
|
|
6566
6590
|
try {
|
|
6567
6591
|
const stat3 = statSync4(fullPath);
|
|
6568
|
-
const derivedProjectPath =
|
|
6592
|
+
const derivedProjectPath = resolveProjectDirName(projDirEntry.name);
|
|
6569
6593
|
const effectiveMtime = getSessionMtime(fullPath);
|
|
6570
6594
|
let projectPath2 = "";
|
|
6571
6595
|
if (hasSubagentsDir(fullPath)) {
|
|
@@ -6604,6 +6628,7 @@ var init_session = __esm({
|
|
|
6604
6628
|
init_chunker();
|
|
6605
6629
|
init_claude2();
|
|
6606
6630
|
init_tool_paths();
|
|
6631
|
+
init_project_dir_name();
|
|
6607
6632
|
init_model_pricing();
|
|
6608
6633
|
}
|
|
6609
6634
|
});
|
|
@@ -7265,7 +7290,7 @@ async function archiveRawSession(store, sessionId) {
|
|
|
7265
7290
|
return await store.putRawSession(sessionId, exp.tool, Math.floor(exp.mtime), gz, size);
|
|
7266
7291
|
}
|
|
7267
7292
|
function detectForkPredecessor(sessionPath) {
|
|
7268
|
-
const { readFileSync: readFileSync47, readdirSync:
|
|
7293
|
+
const { readFileSync: readFileSync47, readdirSync: readdirSync36 } = requireFs();
|
|
7269
7294
|
const { dirname: dirname26, join: join56, basename: basename28 } = requirePath();
|
|
7270
7295
|
let text;
|
|
7271
7296
|
try {
|
|
@@ -7295,7 +7320,7 @@ function detectForkPredecessor(sessionPath) {
|
|
|
7295
7320
|
const self = basename28(sessionPath);
|
|
7296
7321
|
let entries;
|
|
7297
7322
|
try {
|
|
7298
|
-
entries =
|
|
7323
|
+
entries = readdirSync36(dir);
|
|
7299
7324
|
} catch {
|
|
7300
7325
|
return null;
|
|
7301
7326
|
}
|
|
@@ -7574,28 +7599,8 @@ var init_shadow = __esm({
|
|
|
7574
7599
|
}
|
|
7575
7600
|
});
|
|
7576
7601
|
|
|
7577
|
-
// ../engine/dist/core/project-dir-name.js
|
|
7578
|
-
function looksWindowsEncoded(dirName) {
|
|
7579
|
-
return /^[A-Za-z]--/.test(dirName);
|
|
7580
|
-
}
|
|
7581
|
-
function decodeProjectDirName(dirName) {
|
|
7582
|
-
if (!dirName)
|
|
7583
|
-
return "";
|
|
7584
|
-
if (looksWindowsEncoded(dirName)) {
|
|
7585
|
-
const drive = dirName[0].toUpperCase();
|
|
7586
|
-
const rest = dirName.slice(3).replace(/-/g, "\\");
|
|
7587
|
-
return `${drive}:\\${rest}`;
|
|
7588
|
-
}
|
|
7589
|
-
return "/" + dirName.replace(/^-/, "").replace(/-/g, "/");
|
|
7590
|
-
}
|
|
7591
|
-
var init_project_dir_name = __esm({
|
|
7592
|
-
"../engine/dist/core/project-dir-name.js"() {
|
|
7593
|
-
"use strict";
|
|
7594
|
-
}
|
|
7595
|
-
});
|
|
7596
|
-
|
|
7597
7602
|
// ../engine/dist/core/live-session-scan.js
|
|
7598
|
-
import { existsSync as existsSync7, readdirSync as
|
|
7603
|
+
import { existsSync as existsSync7, readdirSync as readdirSync6, readFileSync as readFileSync4, statSync as statSync6, openSync as openSync2, readSync as readSync2, closeSync as closeSync2 } from "fs";
|
|
7599
7604
|
import { join as join9, basename as basename5 } from "path";
|
|
7600
7605
|
import { createHash as createHash3 } from "crypto";
|
|
7601
7606
|
function lazyGeminiProjectsJson() {
|
|
@@ -7632,7 +7637,7 @@ function sessionFileIndex() {
|
|
|
7632
7637
|
seenRoots.add(root);
|
|
7633
7638
|
let entries;
|
|
7634
7639
|
try {
|
|
7635
|
-
entries =
|
|
7640
|
+
entries = readdirSync6(root, { withFileTypes: true });
|
|
7636
7641
|
} catch {
|
|
7637
7642
|
continue;
|
|
7638
7643
|
}
|
|
@@ -7642,7 +7647,7 @@ function sessionFileIndex() {
|
|
|
7642
7647
|
const dir = join9(root, entry.name);
|
|
7643
7648
|
let names;
|
|
7644
7649
|
try {
|
|
7645
|
-
names =
|
|
7650
|
+
names = readdirSync6(dir);
|
|
7646
7651
|
} catch {
|
|
7647
7652
|
continue;
|
|
7648
7653
|
}
|
|
@@ -7653,7 +7658,7 @@ function sessionFileIndex() {
|
|
|
7653
7658
|
const located = {
|
|
7654
7659
|
path: join9(dir, name),
|
|
7655
7660
|
projectDir: entry.name,
|
|
7656
|
-
projectPath:
|
|
7661
|
+
projectPath: resolveProjectDirName(entry.name)
|
|
7657
7662
|
};
|
|
7658
7663
|
const prior = byId.get(id);
|
|
7659
7664
|
if (prior)
|
|
@@ -7740,7 +7745,7 @@ function resolveSessionContentPaths(sessionFile) {
|
|
|
7740
7745
|
const subDir = join9(sessionFile.slice(0, -6), "subagents");
|
|
7741
7746
|
if (!existsSync7(subDir))
|
|
7742
7747
|
return [sessionFile];
|
|
7743
|
-
const subPaths =
|
|
7748
|
+
const subPaths = readdirSync6(subDir).filter((f) => f.endsWith(".jsonl")).sort().map((f) => join9(subDir, f));
|
|
7744
7749
|
return [sessionFile, ...subPaths];
|
|
7745
7750
|
}
|
|
7746
7751
|
function loadGeminiProjectMap() {
|
|
@@ -7788,7 +7793,7 @@ function geminiIndex() {
|
|
|
7788
7793
|
continue;
|
|
7789
7794
|
let projs;
|
|
7790
7795
|
try {
|
|
7791
|
-
projs =
|
|
7796
|
+
projs = readdirSync6(tmpRoot, { withFileTypes: true });
|
|
7792
7797
|
} catch {
|
|
7793
7798
|
continue;
|
|
7794
7799
|
}
|
|
@@ -7800,7 +7805,7 @@ function geminiIndex() {
|
|
|
7800
7805
|
continue;
|
|
7801
7806
|
let files;
|
|
7802
7807
|
try {
|
|
7803
|
-
files =
|
|
7808
|
+
files = readdirSync6(chats);
|
|
7804
7809
|
} catch {
|
|
7805
7810
|
continue;
|
|
7806
7811
|
}
|
|
@@ -7919,21 +7924,21 @@ function findCodexSessionFile(sessionId) {
|
|
|
7919
7924
|
function findCodexSessionFileIn(root, sessionId) {
|
|
7920
7925
|
if (!existsSync7(root))
|
|
7921
7926
|
return null;
|
|
7922
|
-
for (const year of
|
|
7927
|
+
for (const year of readdirSync6(root, { withFileTypes: true })) {
|
|
7923
7928
|
if (!year.isDirectory())
|
|
7924
7929
|
continue;
|
|
7925
7930
|
const yearPath = join9(root, year.name);
|
|
7926
|
-
for (const month of
|
|
7931
|
+
for (const month of readdirSync6(yearPath, { withFileTypes: true })) {
|
|
7927
7932
|
if (!month.isDirectory())
|
|
7928
7933
|
continue;
|
|
7929
7934
|
const monthPath = join9(yearPath, month.name);
|
|
7930
|
-
for (const day of
|
|
7935
|
+
for (const day of readdirSync6(monthPath, { withFileTypes: true })) {
|
|
7931
7936
|
if (!day.isDirectory())
|
|
7932
7937
|
continue;
|
|
7933
7938
|
const dayPath = join9(monthPath, day.name);
|
|
7934
7939
|
let files;
|
|
7935
7940
|
try {
|
|
7936
|
-
files =
|
|
7941
|
+
files = readdirSync6(dayPath);
|
|
7937
7942
|
} catch {
|
|
7938
7943
|
continue;
|
|
7939
7944
|
}
|
|
@@ -7948,7 +7953,7 @@ function findCodexSessionFileIn(root, sessionId) {
|
|
|
7948
7953
|
}
|
|
7949
7954
|
}
|
|
7950
7955
|
function scanDir(dir) {
|
|
7951
|
-
for (const entry of
|
|
7956
|
+
for (const entry of readdirSync6(dir, { withFileTypes: true })) {
|
|
7952
7957
|
if (entry.isDirectory()) {
|
|
7953
7958
|
const found = scanDir(join9(dir, entry.name));
|
|
7954
7959
|
if (found)
|
|
@@ -8893,7 +8898,7 @@ var init_generic_engine = __esm({
|
|
|
8893
8898
|
});
|
|
8894
8899
|
|
|
8895
8900
|
// ../engine/dist/core/backends/claude.js
|
|
8896
|
-
import { existsSync as existsSync10, readdirSync as
|
|
8901
|
+
import { existsSync as existsSync10, readdirSync as readdirSync7, readFileSync as readFileSync5, statSync as statSync8, openSync as openSync5, readSync as readSync5, closeSync as closeSync5 } from "fs";
|
|
8897
8902
|
import { join as join10, basename as basename8 } from "path";
|
|
8898
8903
|
function stripReminders(text) {
|
|
8899
8904
|
return text.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, "").trim();
|
|
@@ -9048,13 +9053,13 @@ var init_claude2 = __esm({
|
|
|
9048
9053
|
collectSessionsFromRoot(root, cutoff, filter, seen, out) {
|
|
9049
9054
|
if (!existsSync10(root))
|
|
9050
9055
|
return;
|
|
9051
|
-
for (const proj of
|
|
9056
|
+
for (const proj of readdirSync7(root, { withFileTypes: true })) {
|
|
9052
9057
|
if (!proj.isDirectory())
|
|
9053
9058
|
continue;
|
|
9054
9059
|
if (filter && !proj.name.toLowerCase().includes(filter))
|
|
9055
9060
|
continue;
|
|
9056
9061
|
const projPath = join10(root, proj.name);
|
|
9057
|
-
const projectPath =
|
|
9062
|
+
const projectPath = resolveProjectDirName(proj.name);
|
|
9058
9063
|
const indexPath = join10(projPath, "sessions-index.json");
|
|
9059
9064
|
if (existsSync10(indexPath)) {
|
|
9060
9065
|
try {
|
|
@@ -9085,7 +9090,7 @@ var init_claude2 = __esm({
|
|
|
9085
9090
|
}
|
|
9086
9091
|
let files;
|
|
9087
9092
|
try {
|
|
9088
|
-
files =
|
|
9093
|
+
files = readdirSync7(projPath);
|
|
9089
9094
|
} catch {
|
|
9090
9095
|
continue;
|
|
9091
9096
|
}
|
|
@@ -9354,7 +9359,7 @@ var init_claude2 = __esm({
|
|
|
9354
9359
|
for (const root of claudeProjectDirs()) {
|
|
9355
9360
|
if (!existsSync10(root))
|
|
9356
9361
|
continue;
|
|
9357
|
-
for (const projEntry of
|
|
9362
|
+
for (const projEntry of readdirSync7(root, { withFileTypes: true })) {
|
|
9358
9363
|
if (!projEntry.isDirectory())
|
|
9359
9364
|
continue;
|
|
9360
9365
|
if (opts.projectFilter && !projEntry.name.toLowerCase().includes(opts.projectFilter.toLowerCase()))
|
|
@@ -9362,7 +9367,7 @@ var init_claude2 = __esm({
|
|
|
9362
9367
|
const projPath = join10(root, projEntry.name);
|
|
9363
9368
|
let files;
|
|
9364
9369
|
try {
|
|
9365
|
-
files =
|
|
9370
|
+
files = readdirSync7(projPath);
|
|
9366
9371
|
} catch {
|
|
9367
9372
|
continue;
|
|
9368
9373
|
}
|
|
@@ -9375,7 +9380,7 @@ var init_claude2 = __esm({
|
|
|
9375
9380
|
let mtime = st.mtimeMs;
|
|
9376
9381
|
const subDir = join10(projPath, f.slice(0, -6), "subagents");
|
|
9377
9382
|
if (existsSync10(subDir)) {
|
|
9378
|
-
for (const sub of
|
|
9383
|
+
for (const sub of readdirSync7(subDir)) {
|
|
9379
9384
|
try {
|
|
9380
9385
|
const subSt = statSync8(join10(subDir, sub));
|
|
9381
9386
|
if (subSt.mtimeMs > mtime)
|
|
@@ -9480,7 +9485,7 @@ var init_claude2 = __esm({
|
|
|
9480
9485
|
|
|
9481
9486
|
// ../engine/dist/core/backends/gemini.js
|
|
9482
9487
|
import { createHash as createHash4 } from "crypto";
|
|
9483
|
-
import { existsSync as existsSync11, readdirSync as
|
|
9488
|
+
import { existsSync as existsSync11, readdirSync as readdirSync8, readFileSync as readFileSync6, statSync as statSync9 } from "fs";
|
|
9484
9489
|
import { basename as basename9, join as join11 } from "path";
|
|
9485
9490
|
function readSessionId(path, format) {
|
|
9486
9491
|
try {
|
|
@@ -9594,7 +9599,7 @@ var init_gemini2 = __esm({
|
|
|
9594
9599
|
const out = [];
|
|
9595
9600
|
const seen = /* @__PURE__ */ new Map();
|
|
9596
9601
|
for (const root of geminiTmpDirs()) {
|
|
9597
|
-
for (const projDir of
|
|
9602
|
+
for (const projDir of readdirSync8(root, { withFileTypes: true })) {
|
|
9598
9603
|
if (!projDir.isDirectory())
|
|
9599
9604
|
continue;
|
|
9600
9605
|
const projectPath = projMap.get(projDir.name) || "";
|
|
@@ -9605,7 +9610,7 @@ var init_gemini2 = __esm({
|
|
|
9605
9610
|
continue;
|
|
9606
9611
|
let files;
|
|
9607
9612
|
try {
|
|
9608
|
-
files =
|
|
9613
|
+
files = readdirSync8(chatsDir);
|
|
9609
9614
|
} catch {
|
|
9610
9615
|
continue;
|
|
9611
9616
|
}
|
|
@@ -9828,7 +9833,7 @@ var init_gemini2 = __esm({
|
|
|
9828
9833
|
return [];
|
|
9829
9834
|
const projMap = this.loadProjectMap();
|
|
9830
9835
|
const candidates2 = [];
|
|
9831
|
-
for (const proj of
|
|
9836
|
+
for (const proj of readdirSync8(tmpRoot, { withFileTypes: true })) {
|
|
9832
9837
|
if (!proj.isDirectory())
|
|
9833
9838
|
continue;
|
|
9834
9839
|
const projectPath = projMap.get(proj.name) || "";
|
|
@@ -9842,7 +9847,7 @@ var init_gemini2 = __esm({
|
|
|
9842
9847
|
continue;
|
|
9843
9848
|
let files;
|
|
9844
9849
|
try {
|
|
9845
|
-
files =
|
|
9850
|
+
files = readdirSync8(chats);
|
|
9846
9851
|
} catch {
|
|
9847
9852
|
continue;
|
|
9848
9853
|
}
|
|
@@ -10508,7 +10513,7 @@ var init_opencode = __esm({
|
|
|
10508
10513
|
});
|
|
10509
10514
|
|
|
10510
10515
|
// ../engine/dist/core/backends/codex.js
|
|
10511
|
-
import { readdirSync as
|
|
10516
|
+
import { readdirSync as readdirSync9, readFileSync as readFileSync7, statSync as statSync10, openSync as openSync6, readSync as readSync6, closeSync as closeSync6 } from "fs";
|
|
10512
10517
|
import { basename as basename10, dirname as dirname10, join as join13 } from "path";
|
|
10513
10518
|
function parseShellWrites(cmd) {
|
|
10514
10519
|
const out = [];
|
|
@@ -10604,7 +10609,7 @@ function parseCodexPatch(input) {
|
|
|
10604
10609
|
function* walkRollouts(root) {
|
|
10605
10610
|
let entries;
|
|
10606
10611
|
try {
|
|
10607
|
-
entries =
|
|
10612
|
+
entries = readdirSync9(root, { withFileTypes: true });
|
|
10608
10613
|
} catch {
|
|
10609
10614
|
return;
|
|
10610
10615
|
}
|
|
@@ -10896,7 +10901,7 @@ var init_codex2 = __esm({
|
|
|
10896
10901
|
const dayDir = located.path.substring(0, located.path.lastIndexOf("/"));
|
|
10897
10902
|
let entries = [];
|
|
10898
10903
|
try {
|
|
10899
|
-
entries =
|
|
10904
|
+
entries = readdirSync9(dayDir);
|
|
10900
10905
|
} catch {
|
|
10901
10906
|
}
|
|
10902
10907
|
for (const entry of entries) {
|
|
@@ -11082,7 +11087,7 @@ var init_codex2 = __esm({
|
|
|
11082
11087
|
const scanDir = (dir) => {
|
|
11083
11088
|
let entries;
|
|
11084
11089
|
try {
|
|
11085
|
-
entries =
|
|
11090
|
+
entries = readdirSync9(dir, { withFileTypes: true });
|
|
11086
11091
|
} catch {
|
|
11087
11092
|
return;
|
|
11088
11093
|
}
|
|
@@ -11175,7 +11180,7 @@ var init_codex2 = __esm({
|
|
|
11175
11180
|
if (parentId) {
|
|
11176
11181
|
const dayDir = dirname10(loc.path);
|
|
11177
11182
|
try {
|
|
11178
|
-
for (const f of
|
|
11183
|
+
for (const f of readdirSync9(dayDir)) {
|
|
11179
11184
|
if (!f.endsWith(".jsonl") || !f.startsWith("rollout-"))
|
|
11180
11185
|
continue;
|
|
11181
11186
|
const p = join13(dayDir, f);
|
|
@@ -11222,7 +11227,7 @@ var init_codex2 = __esm({
|
|
|
11222
11227
|
});
|
|
11223
11228
|
|
|
11224
11229
|
// ../engine/dist/core/backends/agy.js
|
|
11225
|
-
import { existsSync as existsSync13, readdirSync as
|
|
11230
|
+
import { existsSync as existsSync13, readdirSync as readdirSync10, readFileSync as readFileSync8, statSync as statSync11 } from "fs";
|
|
11226
11231
|
import { basename as basename11, dirname as dirname11, join as join14 } from "path";
|
|
11227
11232
|
function agyTranscriptPath(logsDir) {
|
|
11228
11233
|
const full = join14(logsDir, "transcript_full.jsonl");
|
|
@@ -11391,7 +11396,7 @@ var init_agy = __esm({
|
|
|
11391
11396
|
for (const brainDir of agyBrainDirs()) {
|
|
11392
11397
|
let sessionDirs;
|
|
11393
11398
|
try {
|
|
11394
|
-
sessionDirs =
|
|
11399
|
+
sessionDirs = readdirSync10(brainDir);
|
|
11395
11400
|
} catch {
|
|
11396
11401
|
continue;
|
|
11397
11402
|
}
|
|
@@ -11666,7 +11671,7 @@ var init_agy = __esm({
|
|
|
11666
11671
|
const candidates2 = [];
|
|
11667
11672
|
let sessionDirs;
|
|
11668
11673
|
try {
|
|
11669
|
-
sessionDirs =
|
|
11674
|
+
sessionDirs = readdirSync10(brainDir);
|
|
11670
11675
|
} catch {
|
|
11671
11676
|
return [];
|
|
11672
11677
|
}
|
|
@@ -11742,7 +11747,7 @@ var init_agy = __esm({
|
|
|
11742
11747
|
});
|
|
11743
11748
|
|
|
11744
11749
|
// ../engine/dist/core/backends/cursor-store.js
|
|
11745
|
-
import { existsSync as existsSync14, readdirSync as
|
|
11750
|
+
import { existsSync as existsSync14, readdirSync as readdirSync11, readFileSync as readFileSync9, statSync as statSync12 } from "fs";
|
|
11746
11751
|
import { join as join15 } from "path";
|
|
11747
11752
|
function cursorProjectSlug(absPath) {
|
|
11748
11753
|
return absPath.replace(/[^a-zA-Z0-9]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
@@ -11751,7 +11756,7 @@ function listChatsIn(chatsRoot) {
|
|
|
11751
11756
|
const out = [];
|
|
11752
11757
|
let hashDirs;
|
|
11753
11758
|
try {
|
|
11754
|
-
hashDirs =
|
|
11759
|
+
hashDirs = readdirSync11(chatsRoot);
|
|
11755
11760
|
} catch {
|
|
11756
11761
|
return out;
|
|
11757
11762
|
}
|
|
@@ -11761,7 +11766,7 @@ function listChatsIn(chatsRoot) {
|
|
|
11761
11766
|
try {
|
|
11762
11767
|
if (!statSync12(hashPath3).isDirectory())
|
|
11763
11768
|
continue;
|
|
11764
|
-
chatIds =
|
|
11769
|
+
chatIds = readdirSync11(hashPath3);
|
|
11765
11770
|
} catch {
|
|
11766
11771
|
continue;
|
|
11767
11772
|
}
|
|
@@ -11806,7 +11811,7 @@ function findChat(chatsRoots, chatId) {
|
|
|
11806
11811
|
for (const root of chatsRoots) {
|
|
11807
11812
|
let hashDirs;
|
|
11808
11813
|
try {
|
|
11809
|
-
hashDirs =
|
|
11814
|
+
hashDirs = readdirSync11(root);
|
|
11810
11815
|
} catch {
|
|
11811
11816
|
continue;
|
|
11812
11817
|
}
|
|
@@ -12127,7 +12132,7 @@ var init_cursor_store = __esm({
|
|
|
12127
12132
|
});
|
|
12128
12133
|
|
|
12129
12134
|
// ../engine/dist/core/backends/cursor-ide.js
|
|
12130
|
-
import { existsSync as existsSync15, readFileSync as readFileSync10, readdirSync as
|
|
12135
|
+
import { existsSync as existsSync15, readFileSync as readFileSync10, readdirSync as readdirSync12, statSync as statSync13 } from "fs";
|
|
12131
12136
|
import { dirname as dirname12, join as join16 } from "path";
|
|
12132
12137
|
function jsonOf(value) {
|
|
12133
12138
|
if (value == null)
|
|
@@ -12190,7 +12195,7 @@ function workspaceIndex(workspaceRoots) {
|
|
|
12190
12195
|
for (const root of workspaceRoots) {
|
|
12191
12196
|
let entries;
|
|
12192
12197
|
try {
|
|
12193
|
-
entries =
|
|
12198
|
+
entries = readdirSync12(root);
|
|
12194
12199
|
} catch {
|
|
12195
12200
|
continue;
|
|
12196
12201
|
}
|
|
@@ -12277,7 +12282,7 @@ function listComposers(globalDbPath, workspaceRoots) {
|
|
|
12277
12282
|
for (const root of workspaceRoots) {
|
|
12278
12283
|
let entries;
|
|
12279
12284
|
try {
|
|
12280
|
-
entries =
|
|
12285
|
+
entries = readdirSync12(root);
|
|
12281
12286
|
} catch {
|
|
12282
12287
|
continue;
|
|
12283
12288
|
}
|
|
@@ -12951,7 +12956,7 @@ var init_credentials_env = __esm({
|
|
|
12951
12956
|
|
|
12952
12957
|
// ../engine/dist/core/source-discovery.js
|
|
12953
12958
|
import { createHash as createHash5 } from "crypto";
|
|
12954
|
-
import { existsSync as existsSync17, readdirSync as
|
|
12959
|
+
import { existsSync as existsSync17, readdirSync as readdirSync13, statSync as statSync15 } from "fs";
|
|
12955
12960
|
import { join as join18 } from "path";
|
|
12956
12961
|
function sourceId(path) {
|
|
12957
12962
|
return "src_" + createHash5("sha256").update(path).digest("hex").slice(0, 12);
|
|
@@ -12988,7 +12993,7 @@ function countTranscripts(root, tool) {
|
|
|
12988
12993
|
return;
|
|
12989
12994
|
let entries;
|
|
12990
12995
|
try {
|
|
12991
|
-
entries =
|
|
12996
|
+
entries = readdirSync13(dir, { withFileTypes: true });
|
|
12992
12997
|
} catch {
|
|
12993
12998
|
return;
|
|
12994
12999
|
}
|
|
@@ -13058,7 +13063,7 @@ var init_source_discovery = __esm({
|
|
|
13058
13063
|
|
|
13059
13064
|
// ../engine/dist/core/home-discovery.js
|
|
13060
13065
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
13061
|
-
import { existsSync as existsSync18, readdirSync as
|
|
13066
|
+
import { existsSync as existsSync18, readdirSync as readdirSync14, readFileSync as readFileSync12, realpathSync as realpathSync2, statSync as statSync16 } from "fs";
|
|
13062
13067
|
import { homedir as homedir5, platform as osPlatform } from "os";
|
|
13063
13068
|
import { join as join19 } from "path";
|
|
13064
13069
|
function candidateRoots(plat = osPlatform(), env = process.env) {
|
|
@@ -13102,7 +13107,7 @@ function dirHasTranscript(root, match, depth) {
|
|
|
13102
13107
|
return false;
|
|
13103
13108
|
let entries;
|
|
13104
13109
|
try {
|
|
13105
|
-
entries =
|
|
13110
|
+
entries = readdirSync14(root, { withFileTypes: true });
|
|
13106
13111
|
} catch {
|
|
13107
13112
|
return false;
|
|
13108
13113
|
}
|
|
@@ -13134,7 +13139,7 @@ function countSessions(dir, tool) {
|
|
|
13134
13139
|
return;
|
|
13135
13140
|
let entries;
|
|
13136
13141
|
try {
|
|
13137
|
-
entries =
|
|
13142
|
+
entries = readdirSync14(d, { withFileTypes: true });
|
|
13138
13143
|
} catch {
|
|
13139
13144
|
return;
|
|
13140
13145
|
}
|
|
@@ -13203,7 +13208,7 @@ function runningToolHomes(plat = osPlatform()) {
|
|
|
13203
13208
|
if (plat === "linux") {
|
|
13204
13209
|
let pids;
|
|
13205
13210
|
try {
|
|
13206
|
-
pids =
|
|
13211
|
+
pids = readdirSync14("/proc").filter((p) => /^\d+$/.test(p));
|
|
13207
13212
|
} catch {
|
|
13208
13213
|
return out;
|
|
13209
13214
|
}
|
|
@@ -13283,7 +13288,7 @@ function walkForHomes(dir, depth, visit) {
|
|
|
13283
13288
|
return;
|
|
13284
13289
|
let entries;
|
|
13285
13290
|
try {
|
|
13286
|
-
entries =
|
|
13291
|
+
entries = readdirSync14(dir, { withFileTypes: true });
|
|
13287
13292
|
} catch {
|
|
13288
13293
|
return;
|
|
13289
13294
|
}
|
|
@@ -14036,7 +14041,7 @@ var init_transcript = __esm({
|
|
|
14036
14041
|
// ../engine/dist/core/project-resolver.js
|
|
14037
14042
|
import { execSync } from "child_process";
|
|
14038
14043
|
import { createHash as createHash7 } from "crypto";
|
|
14039
|
-
import { existsSync as existsSync21, readFileSync as readFileSync15, realpathSync as realpathSync3, readdirSync as
|
|
14044
|
+
import { existsSync as existsSync21, readFileSync as readFileSync15, realpathSync as realpathSync3, readdirSync as readdirSync15, statSync as statSync19 } from "fs";
|
|
14040
14045
|
import { basename as basename12, dirname as dirname13, isAbsolute, join as join22, resolve, sep } from "path";
|
|
14041
14046
|
function getProjectsConfigPath() {
|
|
14042
14047
|
return join22(getDataDir(), "projects.json");
|
|
@@ -14276,7 +14281,7 @@ function countGitChildren(dir) {
|
|
|
14276
14281
|
let count = 0;
|
|
14277
14282
|
let entries;
|
|
14278
14283
|
try {
|
|
14279
|
-
entries =
|
|
14284
|
+
entries = readdirSync15(dir);
|
|
14280
14285
|
} catch {
|
|
14281
14286
|
return 0;
|
|
14282
14287
|
}
|
|
@@ -15099,7 +15104,7 @@ var init_session_source = __esm({
|
|
|
15099
15104
|
});
|
|
15100
15105
|
|
|
15101
15106
|
// ../engine/dist/core/utils.js
|
|
15102
|
-
import { existsSync as existsSync22, readdirSync as
|
|
15107
|
+
import { existsSync as existsSync22, readdirSync as readdirSync16 } from "fs";
|
|
15103
15108
|
import { homedir as homedir6 } from "os";
|
|
15104
15109
|
import { join as join23 } from "path";
|
|
15105
15110
|
function splitByHeaders(markdown) {
|
|
@@ -15150,7 +15155,7 @@ function getClaudeDirs() {
|
|
|
15150
15155
|
}
|
|
15151
15156
|
add(join23(home, ".claude"));
|
|
15152
15157
|
try {
|
|
15153
|
-
const entries =
|
|
15158
|
+
const entries = readdirSync16(home, { withFileTypes: true });
|
|
15154
15159
|
for (const entry of entries) {
|
|
15155
15160
|
if (entry.isDirectory() && entry.name.startsWith(".claude-") && entry.name !== ".claude-code") {
|
|
15156
15161
|
const candidate = join23(home, entry.name);
|
|
@@ -15180,7 +15185,7 @@ var init_utils = __esm({
|
|
|
15180
15185
|
});
|
|
15181
15186
|
|
|
15182
15187
|
// ../engine/dist/parsers/plan-source.js
|
|
15183
|
-
import { existsSync as existsSync23, readdirSync as
|
|
15188
|
+
import { existsSync as existsSync23, readdirSync as readdirSync17, readFileSync as readFileSync16, statSync as statSync21 } from "fs";
|
|
15184
15189
|
import { homedir as homedir7 } from "os";
|
|
15185
15190
|
import { join as join24, basename as basename13 } from "path";
|
|
15186
15191
|
import { createHash as createHash8 } from "crypto";
|
|
@@ -15207,7 +15212,7 @@ function parseFrontmatter(content) {
|
|
|
15207
15212
|
}
|
|
15208
15213
|
function safeReaddir(dir) {
|
|
15209
15214
|
try {
|
|
15210
|
-
return
|
|
15215
|
+
return readdirSync17(dir);
|
|
15211
15216
|
} catch {
|
|
15212
15217
|
return [];
|
|
15213
15218
|
}
|
|
@@ -15243,11 +15248,11 @@ var init_plan_source = __esm({
|
|
|
15243
15248
|
if (!existsSync23(projectsDir))
|
|
15244
15249
|
return this._knownProjectDirs;
|
|
15245
15250
|
try {
|
|
15246
|
-
const entries =
|
|
15251
|
+
const entries = readdirSync17(projectsDir, { withFileTypes: true });
|
|
15247
15252
|
for (const entry of entries) {
|
|
15248
15253
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
15249
15254
|
continue;
|
|
15250
|
-
const projectPath =
|
|
15255
|
+
const projectPath = resolveProjectDirName(entry.name);
|
|
15251
15256
|
if (existsSync23(projectPath)) {
|
|
15252
15257
|
this._knownProjectDirs.push(projectPath);
|
|
15253
15258
|
}
|
|
@@ -15275,7 +15280,7 @@ var init_plan_source = __esm({
|
|
|
15275
15280
|
for (const plansDir of this.plansDirs) {
|
|
15276
15281
|
if (!existsSync23(plansDir))
|
|
15277
15282
|
continue;
|
|
15278
|
-
const files =
|
|
15283
|
+
const files = readdirSync17(plansDir).filter((f) => f.endsWith(".md"));
|
|
15279
15284
|
for (const file of files) {
|
|
15280
15285
|
if (seenClaude.has(file))
|
|
15281
15286
|
continue;
|
|
@@ -15319,7 +15324,7 @@ var init_plan_source = __esm({
|
|
|
15319
15324
|
return;
|
|
15320
15325
|
let files;
|
|
15321
15326
|
try {
|
|
15322
|
-
files =
|
|
15327
|
+
files = readdirSync17(plansDir).filter((f) => f.endsWith(".md"));
|
|
15323
15328
|
} catch {
|
|
15324
15329
|
return;
|
|
15325
15330
|
}
|
|
@@ -15366,7 +15371,7 @@ var init_plan_source = __esm({
|
|
|
15366
15371
|
}
|
|
15367
15372
|
let projDirs;
|
|
15368
15373
|
try {
|
|
15369
|
-
projDirs =
|
|
15374
|
+
projDirs = readdirSync17(tmpRoot);
|
|
15370
15375
|
} catch {
|
|
15371
15376
|
return;
|
|
15372
15377
|
}
|
|
@@ -15375,7 +15380,7 @@ var init_plan_source = __esm({
|
|
|
15375
15380
|
const projRoot = join24(tmpRoot, projDir);
|
|
15376
15381
|
let sessions;
|
|
15377
15382
|
try {
|
|
15378
|
-
sessions =
|
|
15383
|
+
sessions = readdirSync17(projRoot);
|
|
15379
15384
|
} catch {
|
|
15380
15385
|
continue;
|
|
15381
15386
|
}
|
|
@@ -15385,7 +15390,7 @@ var init_plan_source = __esm({
|
|
|
15385
15390
|
continue;
|
|
15386
15391
|
let files;
|
|
15387
15392
|
try {
|
|
15388
|
-
files =
|
|
15393
|
+
files = readdirSync17(plansDir).filter((f) => f.endsWith(".md"));
|
|
15389
15394
|
} catch {
|
|
15390
15395
|
continue;
|
|
15391
15396
|
}
|
|
@@ -15594,7 +15599,7 @@ var init_plan_source = __esm({
|
|
|
15594
15599
|
return;
|
|
15595
15600
|
let sessionDirs;
|
|
15596
15601
|
try {
|
|
15597
|
-
sessionDirs =
|
|
15602
|
+
sessionDirs = readdirSync17(brainDir);
|
|
15598
15603
|
} catch {
|
|
15599
15604
|
return;
|
|
15600
15605
|
}
|
|
@@ -15608,7 +15613,7 @@ var init_plan_source = __esm({
|
|
|
15608
15613
|
}
|
|
15609
15614
|
let files;
|
|
15610
15615
|
try {
|
|
15611
|
-
files =
|
|
15616
|
+
files = readdirSync17(sessionPath).filter((f) => f.endsWith(".md"));
|
|
15612
15617
|
} catch {
|
|
15613
15618
|
continue;
|
|
15614
15619
|
}
|
|
@@ -15645,7 +15650,7 @@ var init_plan_source = __esm({
|
|
|
15645
15650
|
});
|
|
15646
15651
|
|
|
15647
15652
|
// ../engine/dist/parsers/task-source.js
|
|
15648
|
-
import { existsSync as existsSync24, readdirSync as
|
|
15653
|
+
import { existsSync as existsSync24, readdirSync as readdirSync18, readFileSync as readFileSync17, statSync as statSync22 } from "fs";
|
|
15649
15654
|
import { join as join25 } from "path";
|
|
15650
15655
|
var MAX_CHUNK_CHARS2, TaskSource;
|
|
15651
15656
|
var init_task_source = __esm({
|
|
@@ -15679,7 +15684,7 @@ var init_task_source = __esm({
|
|
|
15679
15684
|
return;
|
|
15680
15685
|
let files;
|
|
15681
15686
|
try {
|
|
15682
|
-
files =
|
|
15687
|
+
files = readdirSync18(todosDir).filter((f) => f.endsWith(".json"));
|
|
15683
15688
|
} catch {
|
|
15684
15689
|
return;
|
|
15685
15690
|
}
|
|
@@ -15728,7 +15733,7 @@ var init_task_source = __esm({
|
|
|
15728
15733
|
async *discoverInDir(tasksDir) {
|
|
15729
15734
|
if (!existsSync24(tasksDir))
|
|
15730
15735
|
return;
|
|
15731
|
-
const entries =
|
|
15736
|
+
const entries = readdirSync18(tasksDir, { withFileTypes: true });
|
|
15732
15737
|
for (const entry of entries) {
|
|
15733
15738
|
if (!entry.isDirectory())
|
|
15734
15739
|
continue;
|
|
@@ -15736,7 +15741,7 @@ var init_task_source = __esm({
|
|
|
15736
15741
|
const taskDir = join25(tasksDir, sessionUuid);
|
|
15737
15742
|
try {
|
|
15738
15743
|
const stat3 = statSync22(taskDir);
|
|
15739
|
-
const taskFiles =
|
|
15744
|
+
const taskFiles = readdirSync18(taskDir).filter((f) => f.endsWith(".json"));
|
|
15740
15745
|
if (taskFiles.length === 0)
|
|
15741
15746
|
continue;
|
|
15742
15747
|
const tasks = this.readTasks(taskDir, taskFiles);
|
|
@@ -15770,7 +15775,7 @@ var init_task_source = __esm({
|
|
|
15770
15775
|
const taskDir = item.filePath;
|
|
15771
15776
|
if (!existsSync24(taskDir))
|
|
15772
15777
|
return [];
|
|
15773
|
-
const taskFiles =
|
|
15778
|
+
const taskFiles = readdirSync18(taskDir).filter((f) => f.endsWith(".json"));
|
|
15774
15779
|
const tasks = this.readTasks(taskDir, taskFiles);
|
|
15775
15780
|
if (tasks.length === 0)
|
|
15776
15781
|
return [];
|
|
@@ -15881,7 +15886,7 @@ ${task.description}`.slice(0, MAX_CHUNK_CHARS2);
|
|
|
15881
15886
|
});
|
|
15882
15887
|
|
|
15883
15888
|
// ../engine/dist/parsers/claude-md-source.js
|
|
15884
|
-
import { existsSync as existsSync25, readFileSync as readFileSync18, readdirSync as
|
|
15889
|
+
import { existsSync as existsSync25, readFileSync as readFileSync18, readdirSync as readdirSync19, statSync as statSync23 } from "fs";
|
|
15885
15890
|
import { homedir as homedir8 } from "os";
|
|
15886
15891
|
import { join as join26, basename as basename14, dirname as dirname14 } from "path";
|
|
15887
15892
|
import { createHash as createHash9 } from "crypto";
|
|
@@ -15898,11 +15903,11 @@ function discoverProjectDirs(claudeDir) {
|
|
|
15898
15903
|
if (!existsSync25(projectsDir))
|
|
15899
15904
|
return;
|
|
15900
15905
|
try {
|
|
15901
|
-
const entries =
|
|
15906
|
+
const entries = readdirSync19(projectsDir, { withFileTypes: true });
|
|
15902
15907
|
for (const entry of entries) {
|
|
15903
15908
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
15904
15909
|
continue;
|
|
15905
|
-
const projectPath =
|
|
15910
|
+
const projectPath = resolveProjectDirName(entry.name);
|
|
15906
15911
|
addProject(projectPath);
|
|
15907
15912
|
}
|
|
15908
15913
|
} catch {
|
|
@@ -15915,7 +15920,7 @@ function discoverProjectDirs(claudeDir) {
|
|
|
15915
15920
|
const home = homedir8();
|
|
15916
15921
|
scanProjectsDir(claudeBackend.projectsDir());
|
|
15917
15922
|
try {
|
|
15918
|
-
for (const entry of
|
|
15923
|
+
for (const entry of readdirSync19(home, { withFileTypes: true })) {
|
|
15919
15924
|
if (entry.isDirectory() && entry.name.startsWith(".claude-") && entry.name !== ".claude-code") {
|
|
15920
15925
|
scanProjectsDir(join26(home, entry.name, "projects"));
|
|
15921
15926
|
}
|
|
@@ -16017,7 +16022,7 @@ var init_claude_md_source = __esm({
|
|
|
16017
16022
|
}
|
|
16018
16023
|
}
|
|
16019
16024
|
try {
|
|
16020
|
-
const entries =
|
|
16025
|
+
const entries = readdirSync19(searchDir, { withFileTypes: true });
|
|
16021
16026
|
for (const entry of entries) {
|
|
16022
16027
|
if (!entry.isDirectory())
|
|
16023
16028
|
continue;
|
|
@@ -16107,7 +16112,7 @@ var init_claude_md_source = __esm({
|
|
|
16107
16112
|
});
|
|
16108
16113
|
|
|
16109
16114
|
// ../engine/dist/parsers/agent-memory-source.js
|
|
16110
|
-
import { existsSync as existsSync26, readFileSync as readFileSync19, readdirSync as
|
|
16115
|
+
import { existsSync as existsSync26, readFileSync as readFileSync19, readdirSync as readdirSync20, statSync as statSync24 } from "fs";
|
|
16111
16116
|
import { homedir as homedir9 } from "os";
|
|
16112
16117
|
import { join as join27, basename as basename15 } from "path";
|
|
16113
16118
|
function parseFrontmatter2(content) {
|
|
@@ -16135,7 +16140,7 @@ function parseFrontmatter2(content) {
|
|
|
16135
16140
|
return { fm, body };
|
|
16136
16141
|
}
|
|
16137
16142
|
function projectHashToPath(hashDir) {
|
|
16138
|
-
return
|
|
16143
|
+
return resolveProjectDirName(hashDir);
|
|
16139
16144
|
}
|
|
16140
16145
|
function discoverMemoryDirs() {
|
|
16141
16146
|
const out = [];
|
|
@@ -16149,7 +16154,7 @@ function discoverMemoryDirs() {
|
|
|
16149
16154
|
const home = homedir9();
|
|
16150
16155
|
const claudeRoots = [claudeBackend.projectsDir()];
|
|
16151
16156
|
try {
|
|
16152
|
-
for (const entry of
|
|
16157
|
+
for (const entry of readdirSync20(home, { withFileTypes: true })) {
|
|
16153
16158
|
if (entry.isDirectory() && entry.name.startsWith(".claude-") && entry.name !== ".claude-code") {
|
|
16154
16159
|
claudeRoots.push(join27(home, entry.name, "projects"));
|
|
16155
16160
|
}
|
|
@@ -16160,7 +16165,7 @@ function discoverMemoryDirs() {
|
|
|
16160
16165
|
if (!existsSync26(projectsDir))
|
|
16161
16166
|
continue;
|
|
16162
16167
|
try {
|
|
16163
|
-
for (const entry of
|
|
16168
|
+
for (const entry of readdirSync20(projectsDir, { withFileTypes: true })) {
|
|
16164
16169
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
16165
16170
|
continue;
|
|
16166
16171
|
add(join27(projectsDir, entry.name, "memory"), entry.name);
|
|
@@ -16189,7 +16194,7 @@ var init_agent_memory_source = __esm({
|
|
|
16189
16194
|
for (const { memoryDir, projectHash } of discoverMemoryDirs()) {
|
|
16190
16195
|
const projectPath = projectHashToPath(projectHash);
|
|
16191
16196
|
try {
|
|
16192
|
-
for (const entry of
|
|
16197
|
+
for (const entry of readdirSync20(memoryDir, { withFileTypes: true })) {
|
|
16193
16198
|
if (!entry.isFile() || !entry.name.endsWith(".md"))
|
|
16194
16199
|
continue;
|
|
16195
16200
|
const filePath = join27(memoryDir, entry.name);
|
|
@@ -16292,7 +16297,7 @@ var init_agent_memory_source = __esm({
|
|
|
16292
16297
|
});
|
|
16293
16298
|
|
|
16294
16299
|
// ../engine/dist/parsers/history-source.js
|
|
16295
|
-
import { existsSync as existsSync27, readdirSync as
|
|
16300
|
+
import { existsSync as existsSync27, readdirSync as readdirSync21, statSync as statSync25 } from "fs";
|
|
16296
16301
|
import { createReadStream as createReadStream3 } from "fs";
|
|
16297
16302
|
import { createInterface as createInterface2 } from "readline";
|
|
16298
16303
|
import { homedir as homedir10 } from "os";
|
|
@@ -16319,7 +16324,7 @@ var init_history_source = __esm({
|
|
|
16319
16324
|
};
|
|
16320
16325
|
tryAdd(claudeBackend.historyFile());
|
|
16321
16326
|
try {
|
|
16322
|
-
for (const entry of
|
|
16327
|
+
for (const entry of readdirSync21(home, { withFileTypes: true })) {
|
|
16323
16328
|
if (entry.isDirectory() && entry.name.startsWith(".claude-") && entry.name !== ".claude-code") {
|
|
16324
16329
|
tryAdd(join28(home, entry.name, "history.jsonl"));
|
|
16325
16330
|
}
|
|
@@ -16476,7 +16481,7 @@ var init_history_source = __esm({
|
|
|
16476
16481
|
});
|
|
16477
16482
|
|
|
16478
16483
|
// ../engine/dist/parsers/paste-source.js
|
|
16479
|
-
import { existsSync as existsSync28, readdirSync as
|
|
16484
|
+
import { existsSync as existsSync28, readdirSync as readdirSync22, readFileSync as readFileSync20, statSync as statSync26 } from "fs";
|
|
16480
16485
|
import { homedir as homedir11 } from "os";
|
|
16481
16486
|
import { join as join29, basename as basename16 } from "path";
|
|
16482
16487
|
var MAX_CHUNK_CHARS6, MAX_FILE_SIZE, PasteSource;
|
|
@@ -16502,7 +16507,7 @@ var init_paste_source = __esm({
|
|
|
16502
16507
|
};
|
|
16503
16508
|
tryAdd(claudeBackend.pasteCacheDir());
|
|
16504
16509
|
try {
|
|
16505
|
-
for (const entry of
|
|
16510
|
+
for (const entry of readdirSync22(home, { withFileTypes: true })) {
|
|
16506
16511
|
if (entry.isDirectory() && entry.name.startsWith(".claude-") && entry.name !== ".claude-code") {
|
|
16507
16512
|
tryAdd(join29(home, entry.name, "paste-cache"));
|
|
16508
16513
|
}
|
|
@@ -16519,7 +16524,7 @@ var init_paste_source = __esm({
|
|
|
16519
16524
|
for (const cacheDir of this.cacheDirs) {
|
|
16520
16525
|
if (!existsSync28(cacheDir))
|
|
16521
16526
|
continue;
|
|
16522
|
-
const files =
|
|
16527
|
+
const files = readdirSync22(cacheDir).filter((f) => f.endsWith(".txt"));
|
|
16523
16528
|
for (const file of files) {
|
|
16524
16529
|
if (seen.has(file))
|
|
16525
16530
|
continue;
|
|
@@ -16576,7 +16581,7 @@ var init_paste_source = __esm({
|
|
|
16576
16581
|
});
|
|
16577
16582
|
|
|
16578
16583
|
// ../engine/dist/parsers/gemini-source.js
|
|
16579
|
-
import { existsSync as existsSync29, readdirSync as
|
|
16584
|
+
import { existsSync as existsSync29, readdirSync as readdirSync23, readFileSync as readFileSync21, statSync as statSync27 } from "fs";
|
|
16580
16585
|
import { join as join30, basename as basename17 } from "path";
|
|
16581
16586
|
import { createHash as createHash10 } from "crypto";
|
|
16582
16587
|
function loadGeminiProjectMap2() {
|
|
@@ -16618,13 +16623,13 @@ var init_gemini_source = __esm({
|
|
|
16618
16623
|
return;
|
|
16619
16624
|
const seen = /* @__PURE__ */ new Set();
|
|
16620
16625
|
try {
|
|
16621
|
-
for (const projectDirEntry of
|
|
16626
|
+
for (const projectDirEntry of readdirSync23(tmpDir, { withFileTypes: true })) {
|
|
16622
16627
|
if (!projectDirEntry.isDirectory())
|
|
16623
16628
|
continue;
|
|
16624
16629
|
const chatsDir = join30(tmpDir, projectDirEntry.name, "chats");
|
|
16625
16630
|
if (!existsSync29(chatsDir))
|
|
16626
16631
|
continue;
|
|
16627
|
-
for (const file of
|
|
16632
|
+
for (const file of readdirSync23(chatsDir)) {
|
|
16628
16633
|
if (!file.endsWith(".json") || !file.startsWith("session-"))
|
|
16629
16634
|
continue;
|
|
16630
16635
|
const filePath = join30(chatsDir, file);
|
|
@@ -16759,7 +16764,7 @@ var init_gemini_source = __esm({
|
|
|
16759
16764
|
});
|
|
16760
16765
|
|
|
16761
16766
|
// ../engine/dist/parsers/gemini-brain-source.js
|
|
16762
|
-
import { existsSync as existsSync30, readdirSync as
|
|
16767
|
+
import { existsSync as existsSync30, readdirSync as readdirSync24, readFileSync as readFileSync22, statSync as statSync28 } from "fs";
|
|
16763
16768
|
import { join as join31 } from "path";
|
|
16764
16769
|
var MAX_CHUNK_CHARS8, GeminiBrainSource;
|
|
16765
16770
|
var init_gemini_brain_source = __esm({
|
|
@@ -16780,12 +16785,12 @@ var init_gemini_brain_source = __esm({
|
|
|
16780
16785
|
return;
|
|
16781
16786
|
if (!existsSync30(this.brainDir))
|
|
16782
16787
|
return;
|
|
16783
|
-
const sessions =
|
|
16788
|
+
const sessions = readdirSync24(this.brainDir, { withFileTypes: true });
|
|
16784
16789
|
for (const entry of sessions) {
|
|
16785
16790
|
if (!entry.isDirectory())
|
|
16786
16791
|
continue;
|
|
16787
16792
|
const sessionDir = join31(this.brainDir, entry.name);
|
|
16788
|
-
const files =
|
|
16793
|
+
const files = readdirSync24(sessionDir).filter((f) => f.endsWith(".md") && !f.includes(".resolved") && !f.includes(".metadata"));
|
|
16789
16794
|
if (files.length === 0)
|
|
16790
16795
|
continue;
|
|
16791
16796
|
for (const file of files) {
|
|
@@ -17173,7 +17178,7 @@ var init_opencode_todo_source = __esm({
|
|
|
17173
17178
|
});
|
|
17174
17179
|
|
|
17175
17180
|
// ../engine/dist/parsers/codex-session-source.js
|
|
17176
|
-
import { existsSync as existsSync33, readdirSync as
|
|
17181
|
+
import { existsSync as existsSync33, readdirSync as readdirSync25, readFileSync as readFileSync23, statSync as statSync29 } from "fs";
|
|
17177
17182
|
import { join as join32, basename as basename18 } from "path";
|
|
17178
17183
|
function getCodexSessionsDir() {
|
|
17179
17184
|
return codexBackend.sessionsDir();
|
|
@@ -17394,7 +17399,7 @@ var init_codex_session_source = __esm({
|
|
|
17394
17399
|
const results = [];
|
|
17395
17400
|
if (!existsSync33(dir))
|
|
17396
17401
|
return results;
|
|
17397
|
-
for (const entry of
|
|
17402
|
+
for (const entry of readdirSync25(dir, { withFileTypes: true })) {
|
|
17398
17403
|
const fullPath = join32(dir, entry.name);
|
|
17399
17404
|
if (entry.isDirectory()) {
|
|
17400
17405
|
results.push(...this.collectJsonlFiles(fullPath));
|
|
@@ -17409,7 +17414,7 @@ var init_codex_session_source = __esm({
|
|
|
17409
17414
|
});
|
|
17410
17415
|
|
|
17411
17416
|
// ../engine/dist/parsers/diary-source.js
|
|
17412
|
-
import { existsSync as existsSync34, mkdirSync as mkdirSync5, readdirSync as
|
|
17417
|
+
import { existsSync as existsSync34, mkdirSync as mkdirSync5, readdirSync as readdirSync26, readFileSync as readFileSync24, writeFileSync as writeFileSync4, statSync as statSync30 } from "fs";
|
|
17413
17418
|
import { join as join33, basename as basename19 } from "path";
|
|
17414
17419
|
var MAX_CHUNK_CHARS11, DiarySource;
|
|
17415
17420
|
var init_diary_source = __esm({
|
|
@@ -17427,10 +17432,10 @@ var init_diary_source = __esm({
|
|
|
17427
17432
|
async *discover() {
|
|
17428
17433
|
if (!existsSync34(this.diaryDir))
|
|
17429
17434
|
return;
|
|
17430
|
-
const agents =
|
|
17435
|
+
const agents = readdirSync26(this.diaryDir, { withFileTypes: true }).filter((d) => d.isDirectory());
|
|
17431
17436
|
for (const agentDir of agents) {
|
|
17432
17437
|
const agentPath2 = join33(this.diaryDir, agentDir.name);
|
|
17433
|
-
const files =
|
|
17438
|
+
const files = readdirSync26(agentPath2).filter((f) => f.endsWith(".json"));
|
|
17434
17439
|
for (const file of files) {
|
|
17435
17440
|
const filePath = join33(agentPath2, file);
|
|
17436
17441
|
try {
|
|
@@ -17521,7 +17526,7 @@ var init_diary_source = __esm({
|
|
|
17521
17526
|
const agentDir = join33(dir, agentName.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));
|
|
17522
17527
|
if (!existsSync34(agentDir))
|
|
17523
17528
|
return [];
|
|
17524
|
-
const files =
|
|
17529
|
+
const files = readdirSync26(agentDir).filter((f) => f.endsWith(".json")).sort().reverse().slice(0, lastN);
|
|
17525
17530
|
const entries = [];
|
|
17526
17531
|
for (const file of files) {
|
|
17527
17532
|
try {
|
|
@@ -17570,7 +17575,7 @@ var init_redact_inline = __esm({
|
|
|
17570
17575
|
});
|
|
17571
17576
|
|
|
17572
17577
|
// ../engine/dist/parsers/skills-source.js
|
|
17573
|
-
import { existsSync as existsSync35, readdirSync as
|
|
17578
|
+
import { existsSync as existsSync35, readdirSync as readdirSync27, readFileSync as readFileSync25, statSync as statSync31 } from "fs";
|
|
17574
17579
|
import { homedir as homedir12 } from "os";
|
|
17575
17580
|
import { join as join34 } from "path";
|
|
17576
17581
|
function rebuildBody(content) {
|
|
@@ -17651,7 +17656,7 @@ var init_skills_source = __esm({
|
|
|
17651
17656
|
return;
|
|
17652
17657
|
const codexPluginsDir = codexBackend.pluginsDir();
|
|
17653
17658
|
if (existsSync35(codexPluginsDir)) {
|
|
17654
|
-
for (const pluginName of
|
|
17659
|
+
for (const pluginName of readdirSync27(codexPluginsDir)) {
|
|
17655
17660
|
const skillsDir = join34(codexPluginsDir, pluginName, "skills");
|
|
17656
17661
|
if (!existsSync35(skillsDir))
|
|
17657
17662
|
continue;
|
|
@@ -17662,7 +17667,7 @@ var init_skills_source = __esm({
|
|
|
17662
17667
|
async *fromSkillRoot(root, pluginName) {
|
|
17663
17668
|
let entries;
|
|
17664
17669
|
try {
|
|
17665
|
-
entries =
|
|
17670
|
+
entries = readdirSync27(root.path);
|
|
17666
17671
|
} catch {
|
|
17667
17672
|
return;
|
|
17668
17673
|
}
|
|
@@ -17696,14 +17701,14 @@ var init_skills_source = __esm({
|
|
|
17696
17701
|
}
|
|
17697
17702
|
const subdirs = {};
|
|
17698
17703
|
try {
|
|
17699
|
-
for (const sub of
|
|
17704
|
+
for (const sub of readdirSync27(skillDir)) {
|
|
17700
17705
|
const subPath = join34(skillDir, sub);
|
|
17701
17706
|
try {
|
|
17702
17707
|
const ss = statSync31(subPath);
|
|
17703
17708
|
if (ss.isDirectory()) {
|
|
17704
17709
|
let count = 0;
|
|
17705
17710
|
try {
|
|
17706
|
-
count =
|
|
17711
|
+
count = readdirSync27(subPath).length;
|
|
17707
17712
|
} catch {
|
|
17708
17713
|
}
|
|
17709
17714
|
subdirs[sub] = count;
|
|
@@ -17769,7 +17774,7 @@ var init_skills_source = __esm({
|
|
|
17769
17774
|
});
|
|
17770
17775
|
|
|
17771
17776
|
// ../engine/dist/parsers/mcps-source.js
|
|
17772
|
-
import { existsSync as existsSync36, readdirSync as
|
|
17777
|
+
import { existsSync as existsSync36, readdirSync as readdirSync28, readFileSync as readFileSync26, statSync as statSync32 } from "fs";
|
|
17773
17778
|
import { homedir as homedir13 } from "os";
|
|
17774
17779
|
import { join as join35 } from "path";
|
|
17775
17780
|
function readJson(path) {
|
|
@@ -17883,7 +17888,7 @@ var init_mcps_source = __esm({
|
|
|
17883
17888
|
yield* this.fromCodexToml(codexBackend.configToml());
|
|
17884
17889
|
const pluginsDir = codexBackend.pluginsDir();
|
|
17885
17890
|
if (existsSync36(pluginsDir)) {
|
|
17886
|
-
for (const plugin of
|
|
17891
|
+
for (const plugin of readdirSync28(pluginsDir)) {
|
|
17887
17892
|
const mcpPath = join35(pluginsDir, plugin, ".mcp.json");
|
|
17888
17893
|
yield* this.fromObject(readJson(mcpPath)?.mcpServers, {
|
|
17889
17894
|
tool: "codex",
|
|
@@ -18107,7 +18112,7 @@ var init_toolkit_format = __esm({
|
|
|
18107
18112
|
});
|
|
18108
18113
|
|
|
18109
18114
|
// ../engine/dist/parsers/slash-commands-source.js
|
|
18110
|
-
import { existsSync as existsSync37, readdirSync as
|
|
18115
|
+
import { existsSync as existsSync37, readdirSync as readdirSync29, readFileSync as readFileSync27, statSync as statSync33 } from "fs";
|
|
18111
18116
|
import { join as join36, basename as basename20 } from "path";
|
|
18112
18117
|
function rebuildBody2(content) {
|
|
18113
18118
|
const { text, redacted } = redactInlineSecrets(content);
|
|
@@ -18162,10 +18167,10 @@ var init_slash_commands_source = __esm({
|
|
|
18162
18167
|
const projectsRoot = claudeBackend.projectsDir();
|
|
18163
18168
|
if (existsSync37(projectsRoot)) {
|
|
18164
18169
|
try {
|
|
18165
|
-
for (const entry of
|
|
18170
|
+
for (const entry of readdirSync29(projectsRoot, { withFileTypes: true })) {
|
|
18166
18171
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
18167
18172
|
continue;
|
|
18168
|
-
const projectPath =
|
|
18173
|
+
const projectPath = resolveProjectDirName(entry.name);
|
|
18169
18174
|
const cmdDir = join36(projectPath, ".claude", "commands");
|
|
18170
18175
|
if (existsSync37(cmdDir))
|
|
18171
18176
|
roots.push({ path: cmdDir, tool: "claude", scope: "project", projectPath, format: "md" });
|
|
@@ -18193,7 +18198,7 @@ var init_slash_commands_source = __esm({
|
|
|
18193
18198
|
const ext = root.format === "toml" ? ".toml" : ".md";
|
|
18194
18199
|
let files;
|
|
18195
18200
|
try {
|
|
18196
|
-
files =
|
|
18201
|
+
files = readdirSync29(root.path).filter((f) => f.endsWith(ext));
|
|
18197
18202
|
} catch {
|
|
18198
18203
|
continue;
|
|
18199
18204
|
}
|
|
@@ -18253,7 +18258,7 @@ var init_slash_commands_source = __esm({
|
|
|
18253
18258
|
});
|
|
18254
18259
|
|
|
18255
18260
|
// ../engine/dist/parsers/subagents-source.js
|
|
18256
|
-
import { existsSync as existsSync38, readdirSync as
|
|
18261
|
+
import { existsSync as existsSync38, readdirSync as readdirSync30, readFileSync as readFileSync28, statSync as statSync34 } from "fs";
|
|
18257
18262
|
import { join as join37, basename as basename21 } from "path";
|
|
18258
18263
|
function rebuildBody3(content) {
|
|
18259
18264
|
const { text, redacted } = redactInlineSecrets(content);
|
|
@@ -18310,10 +18315,10 @@ var init_subagents_source = __esm({
|
|
|
18310
18315
|
const projectsRoot = claudeBackend.projectsDir();
|
|
18311
18316
|
if (existsSync38(projectsRoot)) {
|
|
18312
18317
|
try {
|
|
18313
|
-
for (const entry of
|
|
18318
|
+
for (const entry of readdirSync30(projectsRoot, { withFileTypes: true })) {
|
|
18314
18319
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
18315
18320
|
continue;
|
|
18316
|
-
const projectPath =
|
|
18321
|
+
const projectPath = resolveProjectDirName(entry.name);
|
|
18317
18322
|
const agentDir = join37(projectPath, ".claude", "agents");
|
|
18318
18323
|
if (existsSync38(agentDir))
|
|
18319
18324
|
roots.push({ path: agentDir, tool: "claude", scope: "project", projectPath, format: "md" });
|
|
@@ -18341,7 +18346,7 @@ var init_subagents_source = __esm({
|
|
|
18341
18346
|
const ext = root.format === "toml" ? ".toml" : ".md";
|
|
18342
18347
|
let files;
|
|
18343
18348
|
try {
|
|
18344
|
-
files =
|
|
18349
|
+
files = readdirSync30(root.path).filter((f) => f.endsWith(ext));
|
|
18345
18350
|
} catch {
|
|
18346
18351
|
continue;
|
|
18347
18352
|
}
|
|
@@ -18402,7 +18407,7 @@ var init_subagents_source = __esm({
|
|
|
18402
18407
|
});
|
|
18403
18408
|
|
|
18404
18409
|
// ../engine/dist/parsers/hooks-source.js
|
|
18405
|
-
import { existsSync as existsSync39, readFileSync as readFileSync29, readdirSync as
|
|
18410
|
+
import { existsSync as existsSync39, readFileSync as readFileSync29, readdirSync as readdirSync31, statSync as statSync35 } from "fs";
|
|
18406
18411
|
import { join as join38 } from "path";
|
|
18407
18412
|
function readJson2(path) {
|
|
18408
18413
|
if (!existsSync39(path))
|
|
@@ -18429,10 +18434,10 @@ var init_hooks_source = __esm({
|
|
|
18429
18434
|
const projectsRoot = claudeBackend.projectsDir();
|
|
18430
18435
|
if (existsSync39(projectsRoot)) {
|
|
18431
18436
|
try {
|
|
18432
|
-
for (const entry of
|
|
18437
|
+
for (const entry of readdirSync31(projectsRoot, { withFileTypes: true })) {
|
|
18433
18438
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
18434
18439
|
continue;
|
|
18435
|
-
const projectPath =
|
|
18440
|
+
const projectPath = resolveProjectDirName(entry.name);
|
|
18436
18441
|
const settingsPath2 = join38(projectPath, ".claude", "settings.json");
|
|
18437
18442
|
if (existsSync39(settingsPath2)) {
|
|
18438
18443
|
yield* this.fromSettings(settingsPath2, "project", projectPath);
|
|
@@ -18525,7 +18530,7 @@ var init_hooks_source = __esm({
|
|
|
18525
18530
|
});
|
|
18526
18531
|
|
|
18527
18532
|
// ../engine/dist/parsers/plugins-source.js
|
|
18528
|
-
import { existsSync as existsSync40, readFileSync as readFileSync30, readdirSync as
|
|
18533
|
+
import { existsSync as existsSync40, readFileSync as readFileSync30, readdirSync as readdirSync32, statSync as statSync36 } from "fs";
|
|
18529
18534
|
import { homedir as homedir14 } from "os";
|
|
18530
18535
|
import { join as join39 } from "path";
|
|
18531
18536
|
function readJson3(path) {
|
|
@@ -18587,7 +18592,7 @@ var init_plugins_source = __esm({
|
|
|
18587
18592
|
if (isSourceEnabled("gemini", "extensions") && existsSync40(gemRoot)) {
|
|
18588
18593
|
let entries;
|
|
18589
18594
|
try {
|
|
18590
|
-
entries =
|
|
18595
|
+
entries = readdirSync32(gemRoot);
|
|
18591
18596
|
} catch {
|
|
18592
18597
|
entries = [];
|
|
18593
18598
|
}
|
|
@@ -18635,7 +18640,7 @@ var init_plugins_source = __esm({
|
|
|
18635
18640
|
if (isSourceEnabled("codex", "plugins") && existsSync40(codexPluginsRoot)) {
|
|
18636
18641
|
let entries;
|
|
18637
18642
|
try {
|
|
18638
|
-
entries =
|
|
18643
|
+
entries = readdirSync32(codexPluginsRoot);
|
|
18639
18644
|
} catch {
|
|
18640
18645
|
entries = [];
|
|
18641
18646
|
}
|
|
@@ -19220,7 +19225,7 @@ var init_http = __esm({
|
|
|
19220
19225
|
CLI_VERSION = JSON.parse(readFileSync33(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
|
|
19221
19226
|
} catch {
|
|
19222
19227
|
try {
|
|
19223
|
-
if (true) CLI_VERSION = "0.
|
|
19228
|
+
if (true) CLI_VERSION = "0.6.0";
|
|
19224
19229
|
} catch {
|
|
19225
19230
|
}
|
|
19226
19231
|
}
|
|
@@ -19736,7 +19741,7 @@ var init_telemetry = __esm({
|
|
|
19736
19741
|
init_sync_client();
|
|
19737
19742
|
cliVersion = () => {
|
|
19738
19743
|
try {
|
|
19739
|
-
return true ? "0.
|
|
19744
|
+
return true ? "0.6.0" : "dev";
|
|
19740
19745
|
} catch {
|
|
19741
19746
|
return "dev";
|
|
19742
19747
|
}
|
|
@@ -20019,7 +20024,7 @@ __export(auto_update_exports, {
|
|
|
20019
20024
|
import { execSync as execSync2 } from "node:child_process";
|
|
20020
20025
|
import { readFileSync as readFileSync36 } from "node:fs";
|
|
20021
20026
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
20022
|
-
import { writeFileSync as writeFileSync8, mkdtempSync as mkdtempSync3, rmSync as rmSync5, readdirSync as
|
|
20027
|
+
import { writeFileSync as writeFileSync8, mkdtempSync as mkdtempSync3, rmSync as rmSync5, readdirSync as readdirSync33, statSync as statSync38 } from "node:fs";
|
|
20023
20028
|
import { join as join43, dirname as dirname18, sep as sep2 } from "node:path";
|
|
20024
20029
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
20025
20030
|
import { createHash as createHash11 } from "node:crypto";
|
|
@@ -20064,7 +20069,7 @@ function sweepStaleStaging(root = tmpdir2(), now = Date.now()) {
|
|
|
20064
20069
|
let removed = 0;
|
|
20065
20070
|
let entries;
|
|
20066
20071
|
try {
|
|
20067
|
-
entries =
|
|
20072
|
+
entries = readdirSync33(root);
|
|
20068
20073
|
} catch {
|
|
20069
20074
|
return 0;
|
|
20070
20075
|
}
|
|
@@ -20074,7 +20079,7 @@ function sweepStaleStaging(root = tmpdir2(), now = Date.now()) {
|
|
|
20074
20079
|
try {
|
|
20075
20080
|
const st = statSync38(dir);
|
|
20076
20081
|
if (!st.isDirectory() || now - st.mtimeMs < COLD_MS) continue;
|
|
20077
|
-
const inside =
|
|
20082
|
+
const inside = readdirSync33(dir);
|
|
20078
20083
|
if (inside.length > 1 || inside.length === 1 && inside[0] !== "chat-recall.tgz") continue;
|
|
20079
20084
|
rmSync5(dir, { recursive: true, force: true });
|
|
20080
20085
|
removed++;
|
|
@@ -20201,7 +20206,7 @@ var init_auto_update = __esm({
|
|
|
20201
20206
|
|
|
20202
20207
|
// src/sync-client.ts
|
|
20203
20208
|
import { join as join44, dirname as dirname19, basename as basename22 } from "node:path";
|
|
20204
|
-
import { readFileSync as readFileSync37, writeFileSync as writeFileSync9, mkdirSync as mkdirSync9, mkdtempSync as mkdtempSync4, rmSync as rmSync6, chmodSync as chmodSync3, unlinkSync as unlinkSync2, readdirSync as
|
|
20209
|
+
import { readFileSync as readFileSync37, writeFileSync as writeFileSync9, mkdirSync as mkdirSync9, mkdtempSync as mkdtempSync4, rmSync as rmSync6, chmodSync as chmodSync3, unlinkSync as unlinkSync2, readdirSync as readdirSync34, statSync as statSync39 } from "node:fs";
|
|
20205
20210
|
import { tmpdir as tmpdir3, hostname as hostname2 } from "node:os";
|
|
20206
20211
|
import { createHash as createHash12 } from "node:crypto";
|
|
20207
20212
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
@@ -20547,7 +20552,7 @@ function reapStaleScanDirs(dir = tmpdir3(), maxAgeMs = 6 * 36e5, now = Date.now(
|
|
|
20547
20552
|
let reaped = 0;
|
|
20548
20553
|
let names;
|
|
20549
20554
|
try {
|
|
20550
|
-
names =
|
|
20555
|
+
names = readdirSync34(dir);
|
|
20551
20556
|
} catch {
|
|
20552
20557
|
return 0;
|
|
20553
20558
|
}
|
|
@@ -21680,7 +21685,7 @@ var init_sync_client = __esm({
|
|
|
21680
21685
|
ownVersion = JSON.parse(readFileSync37(join44(dir, "../package.json"), "utf-8")).version || ownVersion;
|
|
21681
21686
|
} catch {
|
|
21682
21687
|
try {
|
|
21683
|
-
if (true) ownVersion = "0.
|
|
21688
|
+
if (true) ownVersion = "0.6.0";
|
|
21684
21689
|
} catch {
|
|
21685
21690
|
}
|
|
21686
21691
|
}
|
|
@@ -22849,14 +22854,14 @@ __export(shadow_prune_exports, {
|
|
|
22849
22854
|
DEFAULT_MAX_TOTAL_BYTES: () => DEFAULT_MAX_TOTAL_BYTES,
|
|
22850
22855
|
pruneShadow: () => pruneShadow
|
|
22851
22856
|
});
|
|
22852
|
-
import { readdirSync as
|
|
22857
|
+
import { readdirSync as readdirSync35, statSync as statSync44, unlinkSync as unlinkSync3 } from "fs";
|
|
22853
22858
|
import { join as join52 } from "path";
|
|
22854
22859
|
function listShadows(isFullyAcked) {
|
|
22855
22860
|
const out = [];
|
|
22856
22861
|
const root = shadowRoot();
|
|
22857
22862
|
let tools;
|
|
22858
22863
|
try {
|
|
22859
|
-
tools =
|
|
22864
|
+
tools = readdirSync35(root);
|
|
22860
22865
|
} catch {
|
|
22861
22866
|
return out;
|
|
22862
22867
|
}
|
|
@@ -22864,7 +22869,7 @@ function listShadows(isFullyAcked) {
|
|
|
22864
22869
|
const dir = join52(root, tool);
|
|
22865
22870
|
let names;
|
|
22866
22871
|
try {
|
|
22867
|
-
names =
|
|
22872
|
+
names = readdirSync35(dir);
|
|
22868
22873
|
} catch {
|
|
22869
22874
|
continue;
|
|
22870
22875
|
}
|
|
@@ -24474,7 +24479,7 @@ try {
|
|
|
24474
24479
|
ownVersion2 = JSON.parse(readFileSync41(join50(dir, "../package.json"), "utf-8")).version || ownVersion2;
|
|
24475
24480
|
} catch {
|
|
24476
24481
|
try {
|
|
24477
|
-
if (true) ownVersion2 = "0.
|
|
24482
|
+
if (true) ownVersion2 = "0.6.0";
|
|
24478
24483
|
} catch {
|
|
24479
24484
|
}
|
|
24480
24485
|
}
|
|
@@ -24819,7 +24824,7 @@ async function runCollectorMigration(opts) {
|
|
|
24819
24824
|
init_sync_ledger();
|
|
24820
24825
|
init_collector_health();
|
|
24821
24826
|
import { existsSync as existsSync50, readFileSync as readFileSync46 } from "fs";
|
|
24822
|
-
var CLI_VERSION3 = true ? "0.
|
|
24827
|
+
var CLI_VERSION3 = true ? "0.6.0" : "0.0.0";
|
|
24823
24828
|
var DEBOUNCE_MS = 5e3;
|
|
24824
24829
|
var CLAUDE_DIR = claudeBackend.projectsDir();
|
|
24825
24830
|
var PLANS_DIR = claudeBackend.plansDir();
|