@makerbi/openclaude 0.14.7 → 0.14.8
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/cli.mjs +228 -157
- package/dist/sdk.mjs +15 -15
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -232303,7 +232303,7 @@ var init_metadata = __esm(() => {
|
|
|
232303
232303
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
232304
232304
|
version: "99.0.0",
|
|
232305
232305
|
versionBase: getVersionBase(),
|
|
232306
|
-
buildTime: "2026-05-26T10:
|
|
232306
|
+
buildTime: "2026-05-26T10:21:00.272Z",
|
|
232307
232307
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
232308
232308
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
232309
232309
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -366113,7 +366113,7 @@ var init_xdg = () => {};
|
|
|
366113
366113
|
|
|
366114
366114
|
// src/utils/nativeInstaller/download.ts
|
|
366115
366115
|
import { createHash as createHash12 } from "crypto";
|
|
366116
|
-
import { chmod as chmod4, writeFile as writeFile12 } from "fs/promises";
|
|
366116
|
+
import { chmod as chmod4, readFile as readFile14, writeFile as writeFile12 } from "fs/promises";
|
|
366117
366117
|
import { join as join60 } from "path";
|
|
366118
366118
|
function normalizeReleaseTag(version2) {
|
|
366119
366119
|
return version2.startsWith("v") ? version2 : `v${version2}`;
|
|
@@ -366124,6 +366124,61 @@ function normalizeReleaseVersion(tagName) {
|
|
|
366124
366124
|
function getGitHubReleaseAssetName(platform4) {
|
|
366125
366125
|
return platform4.startsWith("win32") ? `openclaude-${platform4}.exe` : `openclaude-${platform4}`;
|
|
366126
366126
|
}
|
|
366127
|
+
function getCurlExecutable() {
|
|
366128
|
+
return process.platform === "win32" ? "curl.exe" : "curl";
|
|
366129
|
+
}
|
|
366130
|
+
function shouldFallbackToCurl(error42) {
|
|
366131
|
+
const message = error42 instanceof Error ? error42.message : String(error42);
|
|
366132
|
+
if (axios_default.isAxiosError(error42)) {
|
|
366133
|
+
return !error42.response;
|
|
366134
|
+
}
|
|
366135
|
+
return /EAI_AGAIN|ECONNRESET|ETIMEDOUT|ENOTFOUND|network|timeout/i.test(message);
|
|
366136
|
+
}
|
|
366137
|
+
async function fetchJsonWithCurl(url3, timeoutMs) {
|
|
366138
|
+
const { stdout, stderr, code, error: error42 } = await execFileNoThrowWithCwd(getCurlExecutable(), [
|
|
366139
|
+
"-L",
|
|
366140
|
+
"--fail",
|
|
366141
|
+
"--silent",
|
|
366142
|
+
"--show-error",
|
|
366143
|
+
"--max-time",
|
|
366144
|
+
String(Math.ceil(timeoutMs / 1000)),
|
|
366145
|
+
url3
|
|
366146
|
+
], {
|
|
366147
|
+
timeout: timeoutMs + 5000,
|
|
366148
|
+
preserveOutputOnError: true
|
|
366149
|
+
});
|
|
366150
|
+
if (code !== 0) {
|
|
366151
|
+
throw new Error(`curl failed with code ${code}: ${error42 || stderr || "no error output"}`);
|
|
366152
|
+
}
|
|
366153
|
+
return JSON.parse(stdout);
|
|
366154
|
+
}
|
|
366155
|
+
async function downloadFileWithCurl(url3, outputPath, timeoutMs) {
|
|
366156
|
+
const { stderr, code, error: error42 } = await execFileNoThrowWithCwd(getCurlExecutable(), [
|
|
366157
|
+
"-L",
|
|
366158
|
+
"--fail",
|
|
366159
|
+
"--silent",
|
|
366160
|
+
"--show-error",
|
|
366161
|
+
"--max-time",
|
|
366162
|
+
String(Math.ceil(timeoutMs / 1000)),
|
|
366163
|
+
"--output",
|
|
366164
|
+
outputPath,
|
|
366165
|
+
url3
|
|
366166
|
+
], {
|
|
366167
|
+
timeout: timeoutMs + 5000,
|
|
366168
|
+
preserveOutputOnError: true
|
|
366169
|
+
});
|
|
366170
|
+
if (code !== 0) {
|
|
366171
|
+
throw new Error(`curl failed with code ${code}: ${error42 || stderr || "no error output"}`);
|
|
366172
|
+
}
|
|
366173
|
+
}
|
|
366174
|
+
function verifyChecksum(data, expectedChecksum) {
|
|
366175
|
+
const hash = createHash12("sha256");
|
|
366176
|
+
hash.update(data);
|
|
366177
|
+
const actualChecksum = hash.digest("hex");
|
|
366178
|
+
if (actualChecksum !== expectedChecksum) {
|
|
366179
|
+
throw new Error(`Checksum mismatch: expected ${expectedChecksum}, got ${actualChecksum}`);
|
|
366180
|
+
}
|
|
366181
|
+
}
|
|
366127
366182
|
function isReleaseVersion(value) {
|
|
366128
366183
|
return typeof value === "string" && /^v?\d+\.\d+\.\d+(-\S+)?$/.test(value);
|
|
366129
366184
|
}
|
|
@@ -366320,12 +366375,7 @@ async function downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath,
|
|
|
366320
366375
|
...requestConfig
|
|
366321
366376
|
});
|
|
366322
366377
|
clearStallTimer();
|
|
366323
|
-
|
|
366324
|
-
hash.update(response.data);
|
|
366325
|
-
const actualChecksum = hash.digest("hex");
|
|
366326
|
-
if (actualChecksum !== expectedChecksum) {
|
|
366327
|
-
throw new Error(`Checksum mismatch: expected ${expectedChecksum}, got ${actualChecksum}`);
|
|
366328
|
-
}
|
|
366378
|
+
verifyChecksum(Buffer.from(response.data), expectedChecksum);
|
|
366329
366379
|
await writeFile12(binaryPath, Buffer.from(response.data));
|
|
366330
366380
|
await chmod4(binaryPath, 493);
|
|
366331
366381
|
return;
|
|
@@ -366347,6 +366397,19 @@ async function downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath,
|
|
|
366347
366397
|
}
|
|
366348
366398
|
throw lastError ?? new Error("Download failed after all retries");
|
|
366349
366399
|
}
|
|
366400
|
+
async function downloadAndVerifyGitHubReleaseBinary(binaryUrl, expectedChecksum, binaryPath) {
|
|
366401
|
+
try {
|
|
366402
|
+
await downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath);
|
|
366403
|
+
} catch (error42) {
|
|
366404
|
+
if (!shouldFallbackToCurl(error42)) {
|
|
366405
|
+
throw error42;
|
|
366406
|
+
}
|
|
366407
|
+
logForDebugging(`GitHub Release binary download via axios failed (${error42 instanceof Error ? error42.message : String(error42)}); retrying with curl`, { level: "warn" });
|
|
366408
|
+
await downloadFileWithCurl(binaryUrl, binaryPath, 5 * 60000);
|
|
366409
|
+
verifyChecksum(await readFile14(binaryPath), expectedChecksum);
|
|
366410
|
+
await chmod4(binaryPath, 493);
|
|
366411
|
+
}
|
|
366412
|
+
}
|
|
366350
366413
|
async function downloadVersionFromGitHubRelease(version2, stagingPath) {
|
|
366351
366414
|
const fs2 = getFsImplementation();
|
|
366352
366415
|
await fs2.rm(stagingPath, { recursive: true, force: true });
|
|
@@ -366357,11 +366420,19 @@ async function downloadVersionFromGitHubRelease(version2, stagingPath) {
|
|
|
366357
366420
|
let manifest;
|
|
366358
366421
|
const manifestUrl = `${GITHUB_RELEASE_DOWNLOAD_BASE_URL}/${tag2}/manifest.json`;
|
|
366359
366422
|
try {
|
|
366360
|
-
|
|
366361
|
-
|
|
366362
|
-
|
|
366363
|
-
|
|
366364
|
-
|
|
366423
|
+
try {
|
|
366424
|
+
const manifestResponse = await axios_default.get(manifestUrl, {
|
|
366425
|
+
timeout: 30000,
|
|
366426
|
+
responseType: "json"
|
|
366427
|
+
});
|
|
366428
|
+
manifest = manifestResponse.data;
|
|
366429
|
+
} catch (error42) {
|
|
366430
|
+
if (!shouldFallbackToCurl(error42)) {
|
|
366431
|
+
throw error42;
|
|
366432
|
+
}
|
|
366433
|
+
logForDebugging(`GitHub Release manifest fetch via axios failed (${error42 instanceof Error ? error42.message : String(error42)}); retrying with curl`, { level: "warn" });
|
|
366434
|
+
manifest = await fetchJsonWithCurl(manifestUrl, 30000);
|
|
366435
|
+
}
|
|
366365
366436
|
} catch (error42) {
|
|
366366
366437
|
const latencyMs = Date.now() - startTime;
|
|
366367
366438
|
const errorMessage2 = error42 instanceof Error ? error42.message : String(error42);
|
|
@@ -366389,7 +366460,7 @@ async function downloadVersionFromGitHubRelease(version2, stagingPath) {
|
|
|
366389
366460
|
await fs2.mkdir(stagingPath);
|
|
366390
366461
|
const binaryPath = join60(stagingPath, binaryName);
|
|
366391
366462
|
try {
|
|
366392
|
-
await
|
|
366463
|
+
await downloadAndVerifyGitHubReleaseBinary(binaryUrl, expectedChecksum, binaryPath);
|
|
366393
366464
|
const latencyMs = Date.now() - startTime;
|
|
366394
366465
|
logEvent("tengu_binary_download_success", {
|
|
366395
366466
|
latency_ms: latencyMs
|
|
@@ -366676,7 +366747,7 @@ import {
|
|
|
366676
366747
|
access as access2,
|
|
366677
366748
|
chmod as chmod5,
|
|
366678
366749
|
copyFile as copyFile2,
|
|
366679
|
-
readFile as
|
|
366750
|
+
readFile as readFile15,
|
|
366680
366751
|
lstat as lstat5,
|
|
366681
366752
|
mkdir as mkdir12,
|
|
366682
366753
|
readdir as readdir8,
|
|
@@ -367058,8 +367129,8 @@ async function updateSymlink(symlinkPath, targetPath) {
|
|
|
367058
367129
|
const targetStats = await stat20(targetPath);
|
|
367059
367130
|
if (existingStats.size === targetStats.size) {
|
|
367060
367131
|
const [existingContent, targetContent] = await Promise.all([
|
|
367061
|
-
|
|
367062
|
-
|
|
367132
|
+
readFile15(symlinkPath),
|
|
367133
|
+
readFile15(targetPath)
|
|
367063
367134
|
]);
|
|
367064
367135
|
if (existingContent.equals(targetContent)) {
|
|
367065
367136
|
return false;
|
|
@@ -373070,7 +373141,7 @@ function appendCappedMessage(prev, item) {
|
|
|
373070
373141
|
var TEAMMATE_MESSAGES_UI_CAP = 50;
|
|
373071
373142
|
|
|
373072
373143
|
// src/utils/tasks.ts
|
|
373073
|
-
import { mkdir as mkdir13, readdir as readdir9, readFile as
|
|
373144
|
+
import { mkdir as mkdir13, readdir as readdir9, readFile as readFile16, unlink as unlink8, writeFile as writeFile14 } from "fs/promises";
|
|
373074
373145
|
import { join as join64 } from "path";
|
|
373075
373146
|
function setLeaderTeamName(teamName) {
|
|
373076
373147
|
if (leaderTeamName === teamName)
|
|
@@ -373095,7 +373166,7 @@ function getHighWaterMarkPath(taskListId) {
|
|
|
373095
373166
|
async function readHighWaterMark(taskListId) {
|
|
373096
373167
|
const path12 = getHighWaterMarkPath(taskListId);
|
|
373097
373168
|
try {
|
|
373098
|
-
const content = (await
|
|
373169
|
+
const content = (await readFile16(path12, "utf-8")).trim();
|
|
373099
373170
|
const value = parseInt(content, 10);
|
|
373100
373171
|
return isNaN(value) ? 0 : value;
|
|
373101
373172
|
} catch {
|
|
@@ -373219,7 +373290,7 @@ async function createTask(taskListId, taskData) {
|
|
|
373219
373290
|
async function getTask(taskListId, taskId) {
|
|
373220
373291
|
const path12 = getTaskPath(taskListId, taskId);
|
|
373221
373292
|
try {
|
|
373222
|
-
const content = await
|
|
373293
|
+
const content = await readFile16(path12, "utf-8");
|
|
373223
373294
|
const data = jsonParse(content);
|
|
373224
373295
|
if (process.env.USER_TYPE === "ant") {
|
|
373225
373296
|
if (data.status === "open")
|
|
@@ -376252,7 +376323,7 @@ __export(exports_teammateMailbox, {
|
|
|
376252
376323
|
PlanApprovalRequestMessageSchema: () => PlanApprovalRequestMessageSchema,
|
|
376253
376324
|
ModeSetRequestMessageSchema: () => ModeSetRequestMessageSchema
|
|
376254
376325
|
});
|
|
376255
|
-
import { mkdir as mkdir14, readFile as
|
|
376326
|
+
import { mkdir as mkdir14, readFile as readFile17, writeFile as writeFile15 } from "fs/promises";
|
|
376256
376327
|
import { join as join65 } from "path";
|
|
376257
376328
|
function getInboxPath(agentName, teamName) {
|
|
376258
376329
|
const team = teamName || getTeamName() || "default";
|
|
@@ -376274,7 +376345,7 @@ async function readMailbox(agentName, teamName) {
|
|
|
376274
376345
|
const inboxPath = getInboxPath(agentName, teamName);
|
|
376275
376346
|
logForDebugging(`[TeammateMailbox] readMailbox: path=${inboxPath}`);
|
|
376276
376347
|
try {
|
|
376277
|
-
const content = await
|
|
376348
|
+
const content = await readFile17(inboxPath, "utf-8");
|
|
376278
376349
|
const messages = jsonParse(content);
|
|
376279
376350
|
logForDebugging(`[TeammateMailbox] readMailbox: read ${messages.length} message(s)`);
|
|
376280
376351
|
return messages;
|
|
@@ -379450,7 +379521,7 @@ __export(exports_teamHelpers, {
|
|
|
379450
379521
|
addHiddenPaneId: () => addHiddenPaneId
|
|
379451
379522
|
});
|
|
379452
379523
|
import { mkdirSync as mkdirSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
379453
|
-
import { mkdir as mkdir15, readFile as
|
|
379524
|
+
import { mkdir as mkdir15, readFile as readFile18, rm as rm4, writeFile as writeFile16 } from "fs/promises";
|
|
379454
379525
|
import { join as join66 } from "path";
|
|
379455
379526
|
function sanitizeName(name) {
|
|
379456
379527
|
return name.replace(/[^a-zA-Z0-9]/g, "-").toLowerCase();
|
|
@@ -379477,7 +379548,7 @@ function readTeamFile(teamName) {
|
|
|
379477
379548
|
}
|
|
379478
379549
|
async function readTeamFileAsync(teamName) {
|
|
379479
379550
|
try {
|
|
379480
|
-
const content = await
|
|
379551
|
+
const content = await readFile18(getTeamFilePath(teamName), "utf-8");
|
|
379481
379552
|
return jsonParse(content);
|
|
379482
379553
|
} catch (e) {
|
|
379483
379554
|
if (getErrnoCode2(e) === "ENOENT")
|
|
@@ -379656,7 +379727,7 @@ async function destroyWorktree(worktreePath) {
|
|
|
379656
379727
|
const gitFilePath = join66(worktreePath, ".git");
|
|
379657
379728
|
let mainRepoPath = null;
|
|
379658
379729
|
try {
|
|
379659
|
-
const gitFileContent = (await
|
|
379730
|
+
const gitFileContent = (await readFile18(gitFilePath, "utf-8")).trim();
|
|
379660
379731
|
const match = gitFileContent.match(/^gitdir:\s*(.+)$/);
|
|
379661
379732
|
if (match && match[1]) {
|
|
379662
379733
|
const worktreeGitDir = match[1];
|
|
@@ -394866,7 +394937,7 @@ import {
|
|
|
394866
394937
|
copyFile as copyFile3,
|
|
394867
394938
|
link as link3,
|
|
394868
394939
|
mkdir as mkdir16,
|
|
394869
|
-
readFile as
|
|
394940
|
+
readFile as readFile19,
|
|
394870
394941
|
stat as stat21,
|
|
394871
394942
|
unlink as unlink9
|
|
394872
394943
|
} from "fs/promises";
|
|
@@ -395223,8 +395294,8 @@ async function checkOriginFileChanged(originalFile, backupFileName, originalStat
|
|
|
395223
395294
|
return compareStatsAndContent(originalStats, backupStats, async () => {
|
|
395224
395295
|
try {
|
|
395225
395296
|
const [originalContent, backupContent] = await Promise.all([
|
|
395226
|
-
|
|
395227
|
-
|
|
395297
|
+
readFile19(originalFile, "utf-8"),
|
|
395298
|
+
readFile19(backupPath, "utf-8")
|
|
395228
395299
|
]);
|
|
395229
395300
|
return originalContent !== backupContent;
|
|
395230
395301
|
} catch {
|
|
@@ -395495,7 +395566,7 @@ async function notifyVscodeSnapshotFilesUpdated(oldState, newState) {
|
|
|
395495
395566
|
}
|
|
395496
395567
|
async function readFileAsyncOrNull(path12) {
|
|
395497
395568
|
try {
|
|
395498
|
-
return await
|
|
395569
|
+
return await readFile19(path12, "utf-8");
|
|
395499
395570
|
} catch {
|
|
395500
395571
|
return null;
|
|
395501
395572
|
}
|
|
@@ -396538,7 +396609,7 @@ var init_plans = __esm(() => {
|
|
|
396538
396609
|
});
|
|
396539
396610
|
|
|
396540
396611
|
// src/utils/sessionEnvironment.ts
|
|
396541
|
-
import { mkdir as mkdir17, readdir as readdir10, readFile as
|
|
396612
|
+
import { mkdir as mkdir17, readdir as readdir10, readFile as readFile20, writeFile as writeFile18 } from "fs/promises";
|
|
396542
396613
|
import { join as join69 } from "path";
|
|
396543
396614
|
async function getSessionEnvDirPath() {
|
|
396544
396615
|
const sessionEnvDir = join69(getClaudeConfigHomeDir(), "session-env", getSessionId());
|
|
@@ -396577,7 +396648,7 @@ async function getSessionEnvironmentScript() {
|
|
|
396577
396648
|
const envFile = process.env.CLAUDE_ENV_FILE;
|
|
396578
396649
|
if (envFile) {
|
|
396579
396650
|
try {
|
|
396580
|
-
const envScript = (await
|
|
396651
|
+
const envScript = (await readFile20(envFile, "utf8")).trim();
|
|
396581
396652
|
if (envScript) {
|
|
396582
396653
|
scripts.push(envScript);
|
|
396583
396654
|
logForDebugging(`Session environment loaded from CLAUDE_ENV_FILE: ${envFile} (${envScript.length} chars)`);
|
|
@@ -396596,7 +396667,7 @@ async function getSessionEnvironmentScript() {
|
|
|
396596
396667
|
for (const file2 of hookFiles) {
|
|
396597
396668
|
const filePath = join69(sessionEnvDir, file2);
|
|
396598
396669
|
try {
|
|
396599
|
-
const content = (await
|
|
396670
|
+
const content = (await readFile20(filePath, "utf8")).trim();
|
|
396600
396671
|
if (content) {
|
|
396601
396672
|
scripts.push(content);
|
|
396602
396673
|
}
|
|
@@ -400179,7 +400250,7 @@ var init_LSPDiagnosticRegistry = __esm(() => {
|
|
|
400179
400250
|
});
|
|
400180
400251
|
|
|
400181
400252
|
// src/utils/plugins/lspPluginIntegration.ts
|
|
400182
|
-
import { readFile as
|
|
400253
|
+
import { readFile as readFile22 } from "fs/promises";
|
|
400183
400254
|
import { join as join72, relative as relative11, resolve as resolve22 } from "path";
|
|
400184
400255
|
function validatePathWithinPlugin(pluginPath, relativePath) {
|
|
400185
400256
|
const resolvedPluginPath = resolve22(pluginPath);
|
|
@@ -400194,7 +400265,7 @@ async function loadPluginLspServers(plugin, errors4 = []) {
|
|
|
400194
400265
|
const servers = {};
|
|
400195
400266
|
const lspJsonPath = join72(plugin.path, ".lsp.json");
|
|
400196
400267
|
try {
|
|
400197
|
-
const content = await
|
|
400268
|
+
const content = await readFile22(lspJsonPath, "utf-8");
|
|
400198
400269
|
const parsed = jsonParse(content);
|
|
400199
400270
|
const result = exports_external.record(exports_external.string(), LspServerConfigSchema()).safeParse(parsed);
|
|
400200
400271
|
if (result.success) {
|
|
@@ -400251,7 +400322,7 @@ async function loadLspServersFromManifest(declaration, pluginPath, pluginName, e
|
|
|
400251
400322
|
continue;
|
|
400252
400323
|
}
|
|
400253
400324
|
try {
|
|
400254
|
-
const content = await
|
|
400325
|
+
const content = await readFile22(validatedPath, "utf-8");
|
|
400255
400326
|
const parsed = jsonParse(content);
|
|
400256
400327
|
const result = exports_external.record(exports_external.string(), LspServerConfigSchema()).safeParse(parsed);
|
|
400257
400328
|
if (result.success) {
|
|
@@ -407275,7 +407346,7 @@ var init_UI6 = __esm(() => {
|
|
|
407275
407346
|
});
|
|
407276
407347
|
|
|
407277
407348
|
// src/tools/BashTool/utils.ts
|
|
407278
|
-
import { readFile as
|
|
407349
|
+
import { readFile as readFile23, stat as stat26 } from "fs/promises";
|
|
407279
407350
|
function stripEmptyLines(content) {
|
|
407280
407351
|
const lines = content.split(`
|
|
407281
407352
|
`);
|
|
@@ -407327,7 +407398,7 @@ async function resizeShellImageOutput(stdout, outputFilePath, outputFileSize) {
|
|
|
407327
407398
|
const size = outputFileSize ?? (await stat26(outputFilePath)).size;
|
|
407328
407399
|
if (size > MAX_IMAGE_FILE_SIZE)
|
|
407329
407400
|
return null;
|
|
407330
|
-
source = await
|
|
407401
|
+
source = await readFile23(outputFilePath, "utf8");
|
|
407331
407402
|
}
|
|
407332
407403
|
const parsed = parseDataUri(source);
|
|
407333
407404
|
if (!parsed)
|
|
@@ -414882,7 +414953,7 @@ var init_fileOperationAnalytics = __esm(() => {
|
|
|
414882
414953
|
});
|
|
414883
414954
|
|
|
414884
414955
|
// src/utils/gitDiff.ts
|
|
414885
|
-
import { access as access4, readFile as
|
|
414956
|
+
import { access as access4, readFile as readFile24 } from "fs/promises";
|
|
414886
414957
|
import { dirname as dirname31, join as join76, relative as relative13, sep as sep16 } from "path";
|
|
414887
414958
|
async function fetchGitDiff() {
|
|
414888
414959
|
const isGit = await getIsGit();
|
|
@@ -415133,7 +415204,7 @@ async function generateSyntheticDiff(gitPath, absoluteFilePath) {
|
|
|
415133
415204
|
if (!isFileWithinReadSizeLimit(absoluteFilePath, MAX_DIFF_SIZE_BYTES)) {
|
|
415134
415205
|
return null;
|
|
415135
415206
|
}
|
|
415136
|
-
const content = await
|
|
415207
|
+
const content = await readFile24(absoluteFilePath, "utf-8");
|
|
415137
415208
|
const lines = content.split(`
|
|
415138
415209
|
`);
|
|
415139
415210
|
if (lines.length > 0 && lines.at(-1) === "") {
|
|
@@ -442292,7 +442363,7 @@ var init_listSessionsImpl = __esm(() => {
|
|
|
442292
442363
|
});
|
|
442293
442364
|
|
|
442294
442365
|
// src/services/autoDream/consolidationLock.ts
|
|
442295
|
-
import { mkdir as mkdir21, readFile as
|
|
442366
|
+
import { mkdir as mkdir21, readFile as readFile25, stat as stat28, unlink as unlink12, utimes, writeFile as writeFile20 } from "fs/promises";
|
|
442296
442367
|
import { join as join80 } from "path";
|
|
442297
442368
|
function lockPath() {
|
|
442298
442369
|
return join80(getAutoMemPath(), LOCK_FILE);
|
|
@@ -442310,7 +442381,7 @@ async function tryAcquireConsolidationLock() {
|
|
|
442310
442381
|
let mtimeMs;
|
|
442311
442382
|
let holderPid;
|
|
442312
442383
|
try {
|
|
442313
|
-
const [s, raw] = await Promise.all([stat28(path15),
|
|
442384
|
+
const [s, raw] = await Promise.all([stat28(path15), readFile25(path15, "utf8")]);
|
|
442314
442385
|
mtimeMs = s.mtimeMs;
|
|
442315
442386
|
const parsed = parseInt(raw.trim(), 10);
|
|
442316
442387
|
holderPid = Number.isFinite(parsed) ? parsed : undefined;
|
|
@@ -442325,7 +442396,7 @@ async function tryAcquireConsolidationLock() {
|
|
|
442325
442396
|
await writeFile20(path15, String(process.pid));
|
|
442326
442397
|
let verify;
|
|
442327
442398
|
try {
|
|
442328
|
-
verify = await
|
|
442399
|
+
verify = await readFile25(path15, "utf8");
|
|
442329
442400
|
} catch {
|
|
442330
442401
|
return null;
|
|
442331
442402
|
}
|
|
@@ -444636,7 +444707,7 @@ var require_querystring = __commonJS((exports) => {
|
|
|
444636
444707
|
|
|
444637
444708
|
// node_modules/needle/lib/multipart.js
|
|
444638
444709
|
var require_multipart = __commonJS((exports) => {
|
|
444639
|
-
var
|
|
444710
|
+
var readFile26 = __require("fs").readFile;
|
|
444640
444711
|
var basename24 = __require("path").basename;
|
|
444641
444712
|
exports.build = function(data, boundary, callback) {
|
|
444642
444713
|
if (typeof data != "object" || typeof data.pipe == "function")
|
|
@@ -444688,7 +444759,7 @@ var require_multipart = __commonJS((exports) => {
|
|
|
444688
444759
|
var filename = part.filename ? part.filename : part.file ? basename24(part.file) : name;
|
|
444689
444760
|
if (part.buffer)
|
|
444690
444761
|
return append2(part.buffer, filename, true);
|
|
444691
|
-
|
|
444762
|
+
readFile26(part.file, function(err2, data) {
|
|
444692
444763
|
if (err2)
|
|
444693
444764
|
return callback(err2);
|
|
444694
444765
|
append2(data, filename, true);
|
|
@@ -457460,7 +457531,7 @@ var init_TeamDeleteTool = __esm(() => {
|
|
|
457460
457531
|
});
|
|
457461
457532
|
|
|
457462
457533
|
// src/utils/concurrentSessions.ts
|
|
457463
|
-
import { chmod as chmod7, mkdir as mkdir22, readdir as readdir12, readFile as
|
|
457534
|
+
import { chmod as chmod7, mkdir as mkdir22, readdir as readdir12, readFile as readFile26, unlink as unlink13, writeFile as writeFile22 } from "fs/promises";
|
|
457464
457535
|
import { join as join81 } from "path";
|
|
457465
457536
|
function getSessionsDir() {
|
|
457466
457537
|
return join81(getClaudeConfigHomeDir(), "sessions");
|
|
@@ -457505,7 +457576,7 @@ async function registerSession() {
|
|
|
457505
457576
|
async function updatePidFile(patch) {
|
|
457506
457577
|
const pidFile = join81(getSessionsDir(), `${process.pid}.json`);
|
|
457507
457578
|
try {
|
|
457508
|
-
const data = jsonParse(await
|
|
457579
|
+
const data = jsonParse(await readFile26(pidFile, "utf8"));
|
|
457509
457580
|
await writeFile22(pidFile, jsonStringify({ ...data, ...patch }));
|
|
457510
457581
|
} catch (e2) {
|
|
457511
457582
|
logForDebugging(`[concurrentSessions] updatePidFile failed: ${errorMessage(e2)}`);
|
|
@@ -462950,7 +463021,7 @@ var init_types10 = __esm(() => {
|
|
|
462950
463021
|
|
|
462951
463022
|
// src/services/teamMemorySync/index.ts
|
|
462952
463023
|
import { createHash as createHash17 } from "crypto";
|
|
462953
|
-
import { mkdir as mkdir23, readdir as readdir13, readFile as
|
|
463024
|
+
import { mkdir as mkdir23, readdir as readdir13, readFile as readFile27, stat as stat31, writeFile as writeFile23 } from "fs/promises";
|
|
462954
463025
|
import { join as join82, relative as relative19, sep as sep21 } from "path";
|
|
462955
463026
|
function createSyncState() {
|
|
462956
463027
|
return {
|
|
@@ -463266,7 +463337,7 @@ async function readLocalTeamMemory(maxEntries) {
|
|
|
463266
463337
|
logForDebugging(`team-memory-sync: skipping oversized file ${entry.name} (${stats.size} > ${MAX_FILE_SIZE_BYTES3} bytes)`, { level: "info" });
|
|
463267
463338
|
return;
|
|
463268
463339
|
}
|
|
463269
|
-
const content = await
|
|
463340
|
+
const content = await readFile27(fullPath, "utf8");
|
|
463270
463341
|
const relPath = relative19(teamDir, fullPath).replaceAll("\\", "/");
|
|
463271
463342
|
const secretMatches = scanForSecrets(content);
|
|
463272
463343
|
if (secretMatches.length > 0) {
|
|
@@ -463329,7 +463400,7 @@ async function writeRemoteEntriesToLocal(entries) {
|
|
|
463329
463400
|
return false;
|
|
463330
463401
|
}
|
|
463331
463402
|
try {
|
|
463332
|
-
const existing = await
|
|
463403
|
+
const existing = await readFile27(validatedPath, "utf8");
|
|
463333
463404
|
if (existing === content) {
|
|
463334
463405
|
return false;
|
|
463335
463406
|
}
|
|
@@ -469028,7 +469099,7 @@ var init_config3 = __esm(() => {
|
|
|
469028
469099
|
|
|
469029
469100
|
// src/utils/readFileInRange.ts
|
|
469030
469101
|
import { createReadStream as createReadStream2, fstat } from "fs";
|
|
469031
|
-
import { stat as fsStat3, readFile as
|
|
469102
|
+
import { stat as fsStat3, readFile as readFile28 } from "fs/promises";
|
|
469032
469103
|
async function readFileInRange(filePath, offset = 0, maxLines, maxBytes, signal, options2) {
|
|
469033
469104
|
signal?.throwIfAborted();
|
|
469034
469105
|
const truncateOnByteLimit = options2?.truncateOnByteLimit ?? false;
|
|
@@ -469040,7 +469111,7 @@ async function readFileInRange(filePath, offset = 0, maxLines, maxBytes, signal,
|
|
|
469040
469111
|
if (!truncateOnByteLimit && maxBytes !== undefined && stats.size > maxBytes) {
|
|
469041
469112
|
throw new FileTooLargeError(stats.size, maxBytes);
|
|
469042
469113
|
}
|
|
469043
|
-
const text = await
|
|
469114
|
+
const text = await readFile28(filePath, { encoding: "utf8", signal });
|
|
469044
469115
|
return readFileInRangeFast(text, stats.mtimeMs, offset, maxLines, truncateOnByteLimit ? maxBytes : undefined);
|
|
469045
469116
|
}
|
|
469046
469117
|
return readFileInRangeStreaming(filePath, offset, maxLines, maxBytes, truncateOnByteLimit, signal);
|
|
@@ -471691,7 +471762,7 @@ function getAnthropicEnvMetadata() {
|
|
|
471691
471762
|
function getBuildAgeMinutes() {
|
|
471692
471763
|
if (false)
|
|
471693
471764
|
;
|
|
471694
|
-
const buildTime = new Date("2026-05-26T10:
|
|
471765
|
+
const buildTime = new Date("2026-05-26T10:21:00.272Z").getTime();
|
|
471695
471766
|
if (isNaN(buildTime))
|
|
471696
471767
|
return;
|
|
471697
471768
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -473597,7 +473668,7 @@ var init_postCompactCleanup = __esm(() => {
|
|
|
473597
473668
|
});
|
|
473598
473669
|
|
|
473599
473670
|
// src/services/SessionMemory/prompts.ts
|
|
473600
|
-
import { readFile as
|
|
473671
|
+
import { readFile as readFile29 } from "fs/promises";
|
|
473601
473672
|
import { join as join85 } from "path";
|
|
473602
473673
|
function getDefaultUpdatePrompt() {
|
|
473603
473674
|
return `IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "note-taking", "session notes extraction", or these update instructions in the notes content.
|
|
@@ -473641,7 +473712,7 @@ REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edit
|
|
|
473641
473712
|
async function loadSessionMemoryTemplate() {
|
|
473642
473713
|
const templatePath = join85(getClaudeConfigHomeDir(), "session-memory", "config", "template.md");
|
|
473643
473714
|
try {
|
|
473644
|
-
return await
|
|
473715
|
+
return await readFile29(templatePath, { encoding: "utf-8" });
|
|
473645
473716
|
} catch (e2) {
|
|
473646
473717
|
const code = getErrnoCode2(e2);
|
|
473647
473718
|
if (code === "ENOENT") {
|
|
@@ -473654,7 +473725,7 @@ async function loadSessionMemoryTemplate() {
|
|
|
473654
473725
|
async function loadSessionMemoryPrompt() {
|
|
473655
473726
|
const promptPath = join85(getClaudeConfigHomeDir(), "session-memory", "config", "prompt.md");
|
|
473656
473727
|
try {
|
|
473657
|
-
return await
|
|
473728
|
+
return await readFile29(promptPath, { encoding: "utf-8" });
|
|
473658
473729
|
} catch (e2) {
|
|
473659
473730
|
const code = getErrnoCode2(e2);
|
|
473660
473731
|
if (code === "ENOENT") {
|
|
@@ -475315,7 +475386,7 @@ var init_toolSearch = __esm(() => {
|
|
|
475315
475386
|
|
|
475316
475387
|
// src/services/vcr.ts
|
|
475317
475388
|
import { createHash as createHash18, randomUUID as randomUUID20 } from "crypto";
|
|
475318
|
-
import { mkdir as mkdir25, readFile as
|
|
475389
|
+
import { mkdir as mkdir25, readFile as readFile30, writeFile as writeFile24 } from "fs/promises";
|
|
475319
475390
|
import { dirname as dirname36, join as join86 } from "path";
|
|
475320
475391
|
function shouldUseVCR() {
|
|
475321
475392
|
if (false) {}
|
|
@@ -475331,7 +475402,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
475331
475402
|
const hash = createHash18("sha1").update(jsonStringify(input)).digest("hex").slice(0, 12);
|
|
475332
475403
|
const filename = join86(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${fixtureName}-${hash}.json`);
|
|
475333
475404
|
try {
|
|
475334
|
-
const cached3 = jsonParse(await
|
|
475405
|
+
const cached3 = jsonParse(await readFile30(filename, { encoding: "utf8" }));
|
|
475335
475406
|
return cached3;
|
|
475336
475407
|
} catch (e2) {
|
|
475337
475408
|
const code = getErrnoCode2(e2);
|
|
@@ -475365,7 +475436,7 @@ async function withVCR(messages, f) {
|
|
|
475365
475436
|
const dehydratedInput = mapMessages(messagesForAPI.map((_) => _.message.content), dehydrateValue);
|
|
475366
475437
|
const filename = join86(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_) => createHash18("sha1").update(jsonStringify(_)).digest("hex").slice(0, 6)).join("-")}.json`);
|
|
475367
475438
|
try {
|
|
475368
|
-
const cached3 = jsonParse(await
|
|
475439
|
+
const cached3 = jsonParse(await readFile30(filename, { encoding: "utf8" }));
|
|
475369
475440
|
cached3.output.forEach(addCachedCostToTotalSessionCost);
|
|
475370
475441
|
return cached3.output.map((message, index) => mapMessage(message, hydrateValue, index, randomUUID20()));
|
|
475371
475442
|
} catch (e2) {
|
|
@@ -475829,7 +475900,7 @@ var init_tokenEstimation = __esm(() => {
|
|
|
475829
475900
|
|
|
475830
475901
|
// src/utils/pdf.ts
|
|
475831
475902
|
import { randomUUID as randomUUID21 } from "crypto";
|
|
475832
|
-
import { mkdir as mkdir26, readdir as readdir15, readFile as
|
|
475903
|
+
import { mkdir as mkdir26, readdir as readdir15, readFile as readFile31 } from "fs/promises";
|
|
475833
475904
|
import { join as join87 } from "path";
|
|
475834
475905
|
async function readPDF(filePath) {
|
|
475835
475906
|
try {
|
|
@@ -475851,7 +475922,7 @@ async function readPDF(filePath) {
|
|
|
475851
475922
|
}
|
|
475852
475923
|
};
|
|
475853
475924
|
}
|
|
475854
|
-
const fileBuffer = await
|
|
475925
|
+
const fileBuffer = await readFile31(filePath);
|
|
475855
475926
|
const header = fileBuffer.subarray(0, 5).toString("ascii");
|
|
475856
475927
|
if (!header.startsWith("%PDF-")) {
|
|
475857
475928
|
return {
|
|
@@ -479714,7 +479785,7 @@ import {
|
|
|
479714
479785
|
chmod as chmod8,
|
|
479715
479786
|
lstat as lstat6,
|
|
479716
479787
|
readdir as readdir18,
|
|
479717
|
-
readFile as
|
|
479788
|
+
readFile as readFile32,
|
|
479718
479789
|
rename as rename3,
|
|
479719
479790
|
rm as rm5,
|
|
479720
479791
|
stat as stat35,
|
|
@@ -479859,7 +479930,7 @@ async function collectFilesForZip(baseDir, relativePath, files, visited) {
|
|
|
479859
479930
|
await collectFilesForZip(baseDir, relPath, files, visited);
|
|
479860
479931
|
} else if (fileStat.isFile()) {
|
|
479861
479932
|
try {
|
|
479862
|
-
const content = await
|
|
479933
|
+
const content = await readFile32(fullPath);
|
|
479863
479934
|
files[relPath] = [
|
|
479864
479935
|
new Uint8Array(content),
|
|
479865
479936
|
{ os: 3, attrs: (fileStat.mode & 65535) << 16 }
|
|
@@ -480379,7 +480450,7 @@ var init_officialMarketplace = __esm(() => {
|
|
|
480379
480450
|
});
|
|
480380
480451
|
|
|
480381
480452
|
// src/utils/plugins/officialMarketplaceGcs.ts
|
|
480382
|
-
import { chmod as chmod9, mkdir as mkdir27, readFile as
|
|
480453
|
+
import { chmod as chmod9, mkdir as mkdir27, readFile as readFile33, rename as rename4, rm as rm7, writeFile as writeFile27 } from "fs/promises";
|
|
480383
480454
|
import { dirname as dirname40, join as join92, resolve as resolve31, sep as sep22 } from "path";
|
|
480384
480455
|
async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCacheDir) {
|
|
480385
480456
|
const cacheDir = resolve31(marketplacesCacheDir);
|
|
@@ -480404,7 +480475,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
480404
480475
|
throw new Error("latest pointer returned empty body");
|
|
480405
480476
|
}
|
|
480406
480477
|
const sentinelPath = join92(installLocation, ".gcs-sha");
|
|
480407
|
-
const currentSha = await
|
|
480478
|
+
const currentSha = await readFile33(sentinelPath, "utf8").then((s) => s.trim(), () => null);
|
|
480408
480479
|
if (currentSha === sha) {
|
|
480409
480480
|
outcome = "noop";
|
|
480410
480481
|
return sha;
|
|
@@ -482507,7 +482578,7 @@ var init_pluginInstallationHelpers = __esm(() => {
|
|
|
482507
482578
|
import {
|
|
482508
482579
|
copyFile as copyFile7,
|
|
482509
482580
|
readdir as readdir20,
|
|
482510
|
-
readFile as
|
|
482581
|
+
readFile as readFile34,
|
|
482511
482582
|
readlink as readlink2,
|
|
482512
482583
|
realpath as realpath11,
|
|
482513
482584
|
rename as rename6,
|
|
@@ -482913,7 +482984,7 @@ async function cachePlugin(source, options2) {
|
|
|
482913
482984
|
let manifest;
|
|
482914
482985
|
if (await pathExists2(manifestPath)) {
|
|
482915
482986
|
try {
|
|
482916
|
-
const content = await
|
|
482987
|
+
const content = await readFile34(manifestPath, { encoding: "utf-8" });
|
|
482917
482988
|
const parsed = jsonParse(content);
|
|
482918
482989
|
const result = PluginManifestSchema().safeParse(parsed);
|
|
482919
482990
|
if (result.success) {
|
|
@@ -482937,7 +483008,7 @@ async function cachePlugin(source, options2) {
|
|
|
482937
483008
|
}
|
|
482938
483009
|
} else if (await pathExists2(legacyManifestPath)) {
|
|
482939
483010
|
try {
|
|
482940
|
-
const content = await
|
|
483011
|
+
const content = await readFile34(legacyManifestPath, {
|
|
482941
483012
|
encoding: "utf-8"
|
|
482942
483013
|
});
|
|
482943
483014
|
const parsed = jsonParse(content);
|
|
@@ -482987,7 +483058,7 @@ async function loadPluginManifest(manifestPath, pluginName, source) {
|
|
|
482987
483058
|
};
|
|
482988
483059
|
}
|
|
482989
483060
|
try {
|
|
482990
|
-
const content = await
|
|
483061
|
+
const content = await readFile34(manifestPath, { encoding: "utf-8" });
|
|
482991
483062
|
const parsedJson = jsonParse(content);
|
|
482992
483063
|
const result = PluginManifestSchema().safeParse(parsedJson);
|
|
482993
483064
|
if (result.success) {
|
|
@@ -483013,7 +483084,7 @@ async function loadPluginHooks2(hooksConfigPath, pluginName) {
|
|
|
483013
483084
|
if (!await pathExists2(hooksConfigPath)) {
|
|
483014
483085
|
throw new Error(`Hooks file not found at ${hooksConfigPath} for plugin ${pluginName}. If the manifest declares hooks, the file must exist.`);
|
|
483015
483086
|
}
|
|
483016
|
-
const content = await
|
|
483087
|
+
const content = await readFile34(hooksConfigPath, { encoding: "utf-8" });
|
|
483017
483088
|
const rawHooksConfig = jsonParse(content);
|
|
483018
483089
|
const validatedPluginHooks = PluginHooksSchema().parse(rawHooksConfig);
|
|
483019
483090
|
return validatedPluginHooks.hooks;
|
|
@@ -483410,7 +483481,7 @@ function parsePluginSettings(raw) {
|
|
|
483410
483481
|
async function loadPluginSettings(pluginPath, manifest) {
|
|
483411
483482
|
const settingsJsonPath = join96(pluginPath, "settings.json");
|
|
483412
483483
|
try {
|
|
483413
|
-
const content = await
|
|
483484
|
+
const content = await readFile34(settingsJsonPath, { encoding: "utf-8" });
|
|
483414
483485
|
const parsed = jsonParse(content);
|
|
483415
483486
|
if (isRecord3(parsed)) {
|
|
483416
483487
|
const filtered = parsePluginSettings(parsed);
|
|
@@ -491800,7 +491871,7 @@ __export(exports_terminalSetup, {
|
|
|
491800
491871
|
call: () => call5
|
|
491801
491872
|
});
|
|
491802
491873
|
import { randomBytes as randomBytes14 } from "crypto";
|
|
491803
|
-
import { copyFile as copyFile8, mkdir as mkdir28, readFile as
|
|
491874
|
+
import { copyFile as copyFile8, mkdir as mkdir28, readFile as readFile35, writeFile as writeFile29 } from "fs/promises";
|
|
491804
491875
|
import { homedir as homedir28, platform as platform4 } from "os";
|
|
491805
491876
|
import { dirname as dirname46, join as join99 } from "path";
|
|
491806
491877
|
import { pathToFileURL as pathToFileURL7 } from "url";
|
|
@@ -491947,7 +492018,7 @@ async function installBindingsForVSCodeTerminal(editor = "VSCode", theme) {
|
|
|
491947
492018
|
let keybindings = [];
|
|
491948
492019
|
let fileExists = false;
|
|
491949
492020
|
try {
|
|
491950
|
-
content = await
|
|
492021
|
+
content = await readFile35(keybindingsPath, {
|
|
491951
492022
|
encoding: "utf-8"
|
|
491952
492023
|
});
|
|
491953
492024
|
fileExists = true;
|
|
@@ -492094,7 +492165,7 @@ chars = "\\u001B\\r"`;
|
|
|
492094
492165
|
let configExists = false;
|
|
492095
492166
|
for (const path17 of configPaths) {
|
|
492096
492167
|
try {
|
|
492097
|
-
configContent = await
|
|
492168
|
+
configContent = await readFile35(path17, {
|
|
492098
492169
|
encoding: "utf-8"
|
|
492099
492170
|
});
|
|
492100
492171
|
configPath = path17;
|
|
@@ -492156,7 +492227,7 @@ async function installBindingsForZed(theme) {
|
|
|
492156
492227
|
let keymapContent = "[]";
|
|
492157
492228
|
let fileExists = false;
|
|
492158
492229
|
try {
|
|
492159
|
-
keymapContent = await
|
|
492230
|
+
keymapContent = await readFile35(keymapPath, {
|
|
492160
492231
|
encoding: "utf-8"
|
|
492161
492232
|
});
|
|
492162
492233
|
fileExists = true;
|
|
@@ -492229,7 +492300,7 @@ var init_terminalSetup = __esm(() => {
|
|
|
492229
492300
|
|
|
492230
492301
|
// src/utils/pasteStore.ts
|
|
492231
492302
|
import { createHash as createHash20 } from "crypto";
|
|
492232
|
-
import { mkdir as mkdir29, readdir as readdir21, readFile as
|
|
492303
|
+
import { mkdir as mkdir29, readdir as readdir21, readFile as readFile36, stat as stat39, unlink as unlink15, writeFile as writeFile30 } from "fs/promises";
|
|
492233
492304
|
import { join as join100 } from "path";
|
|
492234
492305
|
function getPasteStoreDir() {
|
|
492235
492306
|
return join100(getClaudeConfigHomeDir(), PASTE_STORE_DIR);
|
|
@@ -492254,7 +492325,7 @@ async function storePastedText(hash, content) {
|
|
|
492254
492325
|
async function retrievePastedText(hash) {
|
|
492255
492326
|
try {
|
|
492256
492327
|
const pastePath = getPastePath(hash);
|
|
492257
|
-
return await
|
|
492328
|
+
return await readFile36(pastePath, { encoding: "utf8" });
|
|
492258
492329
|
} catch (error42) {
|
|
492259
492330
|
if (!isENOENT(error42)) {
|
|
492260
492331
|
logForDebugging(`Failed to retrieve paste ${hash}: ${error42}`);
|
|
@@ -496107,7 +496178,7 @@ var init_issue = __esm(() => {
|
|
|
496107
496178
|
});
|
|
496108
496179
|
|
|
496109
496180
|
// src/components/Feedback.tsx
|
|
496110
|
-
import { readFile as
|
|
496181
|
+
import { readFile as readFile37, stat as stat40 } from "fs/promises";
|
|
496111
496182
|
function redactSensitiveInfo(text) {
|
|
496112
496183
|
let redacted = text;
|
|
496113
496184
|
redacted = redacted.replace(/"(sk-ant[^\s"']{24,})"/g, '"[REDACTED_API_KEY]"');
|
|
@@ -496146,7 +496217,7 @@ async function loadRawTranscriptJsonl() {
|
|
|
496146
496217
|
});
|
|
496147
496218
|
return null;
|
|
496148
496219
|
}
|
|
496149
|
-
return await
|
|
496220
|
+
return await readFile37(transcriptPath, "utf-8");
|
|
496150
496221
|
} catch {
|
|
496151
496222
|
return null;
|
|
496152
496223
|
}
|
|
@@ -499830,7 +499901,7 @@ function buildPrimarySection() {
|
|
|
499830
499901
|
}, undefined, false, undefined, this);
|
|
499831
499902
|
return [{
|
|
499832
499903
|
label: "Version",
|
|
499833
|
-
value: "0.14.
|
|
499904
|
+
value: "0.14.8"
|
|
499834
499905
|
}, {
|
|
499835
499906
|
label: "Session name",
|
|
499836
499907
|
value: nameValue
|
|
@@ -514725,7 +514796,7 @@ function getReleaseTagUrl(version2 = publicBuildVersion) {
|
|
|
514725
514796
|
return `${OPENCLAUDE_RELEASES_URL}/tag/v${normalizePublicVersion(version2)}`;
|
|
514726
514797
|
}
|
|
514727
514798
|
function getPublicBuildVersion() {
|
|
514728
|
-
return "0.14.
|
|
514799
|
+
return "0.14.8";
|
|
514729
514800
|
}
|
|
514730
514801
|
var import_semver9, OPENCLAUDE_RELEASES_URL = "https://github.com/AndersonBY/openclaude/releases", fallbackBuildVersion, publicBuildVersion;
|
|
514731
514802
|
var init_version = __esm(() => {
|
|
@@ -527513,7 +527584,7 @@ var init_AddMarketplace = __esm(() => {
|
|
|
527513
527584
|
|
|
527514
527585
|
// src/utils/plugins/installCounts.ts
|
|
527515
527586
|
import { randomBytes as randomBytes15 } from "crypto";
|
|
527516
|
-
import { readFile as
|
|
527587
|
+
import { readFile as readFile38, rename as rename7, unlink as unlink16, writeFile as writeFile35 } from "fs/promises";
|
|
527517
527588
|
import { join as join118 } from "path";
|
|
527518
527589
|
function getInstallCountsCachePath() {
|
|
527519
527590
|
return join118(getPluginsDirectory(), INSTALL_COUNTS_CACHE_FILENAME);
|
|
@@ -527521,7 +527592,7 @@ function getInstallCountsCachePath() {
|
|
|
527521
527592
|
async function loadInstallCountsCache() {
|
|
527522
527593
|
const cachePath = getInstallCountsCachePath();
|
|
527523
527594
|
try {
|
|
527524
|
-
const content = await
|
|
527595
|
+
const content = await readFile38(cachePath, { encoding: "utf-8" });
|
|
527525
527596
|
const parsed = jsonParse(content);
|
|
527526
527597
|
if (typeof parsed !== "object" || parsed === null || !("version" in parsed) || !("fetchedAt" in parsed) || !("counts" in parsed)) {
|
|
527527
527598
|
logForDebugging("Install counts cache has invalid structure");
|
|
@@ -531401,7 +531472,7 @@ var init_ManageMarketplaces = __esm(() => {
|
|
|
531401
531472
|
|
|
531402
531473
|
// src/utils/plugins/pluginFlagging.ts
|
|
531403
531474
|
import { randomBytes as randomBytes16 } from "crypto";
|
|
531404
|
-
import { readFile as
|
|
531475
|
+
import { readFile as readFile39, rename as rename8, unlink as unlink17, writeFile as writeFile36 } from "fs/promises";
|
|
531405
531476
|
import { join as join119 } from "path";
|
|
531406
531477
|
function getFlaggedPluginsPath() {
|
|
531407
531478
|
return join119(getPluginsDirectory(), FLAGGED_PLUGINS_FILENAME);
|
|
@@ -531428,7 +531499,7 @@ function parsePluginsData(content) {
|
|
|
531428
531499
|
}
|
|
531429
531500
|
async function readFromDisk() {
|
|
531430
531501
|
try {
|
|
531431
|
-
const content = await
|
|
531502
|
+
const content = await readFile39(getFlaggedPluginsPath(), {
|
|
531432
531503
|
encoding: "utf-8"
|
|
531433
531504
|
});
|
|
531434
531505
|
return parsePluginsData(content);
|
|
@@ -534697,7 +534768,7 @@ function parsePluginArgs(args) {
|
|
|
534697
534768
|
}
|
|
534698
534769
|
|
|
534699
534770
|
// src/utils/plugins/validatePlugin.ts
|
|
534700
|
-
import { readdir as readdir25, readFile as
|
|
534771
|
+
import { readdir as readdir25, readFile as readFile41, stat as stat43 } from "fs/promises";
|
|
534701
534772
|
import * as path20 from "path";
|
|
534702
534773
|
function detectManifestType(filePath) {
|
|
534703
534774
|
const fileName = path20.basename(filePath);
|
|
@@ -534737,7 +534808,7 @@ async function validatePluginManifest(filePath) {
|
|
|
534737
534808
|
const absolutePath = path20.resolve(filePath);
|
|
534738
534809
|
let content;
|
|
534739
534810
|
try {
|
|
534740
|
-
content = await
|
|
534811
|
+
content = await readFile41(absolutePath, { encoding: "utf-8" });
|
|
534741
534812
|
} catch (error42) {
|
|
534742
534813
|
const code = getErrnoCode2(error42);
|
|
534743
534814
|
let message;
|
|
@@ -534861,7 +534932,7 @@ async function validateMarketplaceManifest(filePath) {
|
|
|
534861
534932
|
const absolutePath = path20.resolve(filePath);
|
|
534862
534933
|
let content;
|
|
534863
534934
|
try {
|
|
534864
|
-
content = await
|
|
534935
|
+
content = await readFile41(absolutePath, { encoding: "utf-8" });
|
|
534865
534936
|
} catch (error42) {
|
|
534866
534937
|
const code = getErrnoCode2(error42);
|
|
534867
534938
|
let message;
|
|
@@ -534947,7 +535018,7 @@ async function validateMarketplaceManifest(filePath) {
|
|
|
534947
535018
|
const pluginJsonPath = path20.join(marketplaceRoot, entry.source, ".claude-plugin", "plugin.json");
|
|
534948
535019
|
let manifestVersion;
|
|
534949
535020
|
try {
|
|
534950
|
-
const raw = await
|
|
535021
|
+
const raw = await readFile41(pluginJsonPath, { encoding: "utf-8" });
|
|
534951
535022
|
const parsed2 = jsonParse(raw);
|
|
534952
535023
|
if (typeof parsed2.version === "string") {
|
|
534953
535024
|
manifestVersion = parsed2.version;
|
|
@@ -535064,7 +535135,7 @@ function validateComponentFile(filePath, content, fileType) {
|
|
|
535064
535135
|
async function validateHooksJson(filePath) {
|
|
535065
535136
|
let content;
|
|
535066
535137
|
try {
|
|
535067
|
-
content = await
|
|
535138
|
+
content = await readFile41(filePath, { encoding: "utf-8" });
|
|
535068
535139
|
} catch (e2) {
|
|
535069
535140
|
const code = getErrnoCode2(e2);
|
|
535070
535141
|
if (code === "ENOENT") {
|
|
@@ -535157,7 +535228,7 @@ async function validatePluginContents(pluginDir) {
|
|
|
535157
535228
|
for (const filePath of files) {
|
|
535158
535229
|
let content;
|
|
535159
535230
|
try {
|
|
535160
|
-
content = await
|
|
535231
|
+
content = await readFile41(filePath, { encoding: "utf-8" });
|
|
535161
535232
|
} catch (e2) {
|
|
535162
535233
|
if (isENOENT(e2))
|
|
535163
535234
|
continue;
|
|
@@ -535226,7 +535297,7 @@ async function validateManifest2(filePath) {
|
|
|
535226
535297
|
return validateMarketplaceManifest(filePath);
|
|
535227
535298
|
case "unknown": {
|
|
535228
535299
|
try {
|
|
535229
|
-
const content = await
|
|
535300
|
+
const content = await readFile41(absolutePath, { encoding: "utf-8" });
|
|
535230
535301
|
const parsed = jsonParse(content);
|
|
535231
535302
|
if (Array.isArray(parsed.plugins)) {
|
|
535232
535303
|
return validateMarketplaceManifest(filePath);
|
|
@@ -541502,7 +541573,7 @@ ${args ? "Additional user input: " + args : ""}
|
|
|
541502
541573
|
});
|
|
541503
541574
|
|
|
541504
541575
|
// src/utils/releaseNotes.ts
|
|
541505
|
-
import { mkdir as mkdir34, readFile as
|
|
541576
|
+
import { mkdir as mkdir34, readFile as readFile42, writeFile as writeFile37 } from "fs/promises";
|
|
541506
541577
|
import { dirname as dirname54, join as join122 } from "path";
|
|
541507
541578
|
function getChangelogCachePath() {
|
|
541508
541579
|
return join122(getClaudeConfigHomeDir(), "cache", "changelog.md");
|
|
@@ -541653,7 +541724,7 @@ async function getStoredChangelog() {
|
|
|
541653
541724
|
}
|
|
541654
541725
|
const cachePath = getChangelogCachePath();
|
|
541655
541726
|
try {
|
|
541656
|
-
const content = await
|
|
541727
|
+
const content = await readFile42(cachePath, "utf-8");
|
|
541657
541728
|
changelogMemoryCache = content;
|
|
541658
541729
|
return content;
|
|
541659
541730
|
} catch {
|
|
@@ -556498,7 +556569,7 @@ __export(exports_thinkback, {
|
|
|
556498
556569
|
playAnimation: () => playAnimation,
|
|
556499
556570
|
call: () => call49
|
|
556500
556571
|
});
|
|
556501
|
-
import { readFile as
|
|
556572
|
+
import { readFile as readFile43 } from "fs/promises";
|
|
556502
556573
|
import { join as join123 } from "path";
|
|
556503
556574
|
function getMarketplaceName() {
|
|
556504
556575
|
return OFFICIAL_MARKETPLACE_NAME;
|
|
@@ -556527,7 +556598,7 @@ async function playAnimation(skillDir) {
|
|
|
556527
556598
|
const dataPath = join123(skillDir, "year_in_review.js");
|
|
556528
556599
|
const playerPath = join123(skillDir, "player.js");
|
|
556529
556600
|
try {
|
|
556530
|
-
await
|
|
556601
|
+
await readFile43(dataPath);
|
|
556531
556602
|
} catch (e2) {
|
|
556532
556603
|
if (isENOENT(e2)) {
|
|
556533
556604
|
return {
|
|
@@ -556542,7 +556613,7 @@ async function playAnimation(skillDir) {
|
|
|
556542
556613
|
};
|
|
556543
556614
|
}
|
|
556544
556615
|
try {
|
|
556545
|
-
await
|
|
556616
|
+
await readFile43(playerPath);
|
|
556546
556617
|
} catch (e2) {
|
|
556547
556618
|
if (isENOENT(e2)) {
|
|
556548
556619
|
return {
|
|
@@ -564681,7 +564752,7 @@ __export(exports_branch, {
|
|
|
564681
564752
|
call: () => call59
|
|
564682
564753
|
});
|
|
564683
564754
|
import { randomUUID as randomUUID26 } from "crypto";
|
|
564684
|
-
import { mkdir as mkdir35, readFile as
|
|
564755
|
+
import { mkdir as mkdir35, readFile as readFile44, writeFile as writeFile38 } from "fs/promises";
|
|
564685
564756
|
function deriveFirstPrompt(firstUserMessage) {
|
|
564686
564757
|
const content = firstUserMessage?.message?.content;
|
|
564687
564758
|
if (!content)
|
|
@@ -564700,7 +564771,7 @@ async function createFork(customTitle) {
|
|
|
564700
564771
|
await mkdir35(projectDir, { recursive: true, mode: 448 });
|
|
564701
564772
|
let transcriptContent;
|
|
564702
564773
|
try {
|
|
564703
|
-
transcriptContent = await
|
|
564774
|
+
transcriptContent = await readFile44(currentTranscriptPath);
|
|
564704
564775
|
} catch {
|
|
564705
564776
|
throw new Error("No conversation to branch");
|
|
564706
564777
|
}
|
|
@@ -571062,7 +571133,7 @@ var init_rewind = __esm(() => {
|
|
|
571062
571133
|
|
|
571063
571134
|
// src/utils/heapDumpService.ts
|
|
571064
571135
|
import { createWriteStream as createWriteStream3, writeFileSync as writeFileSync6 } from "fs";
|
|
571065
|
-
import { readdir as readdir26, readFile as
|
|
571136
|
+
import { readdir as readdir26, readFile as readFile45, writeFile as writeFile39 } from "fs/promises";
|
|
571066
571137
|
import { join as join127 } from "path";
|
|
571067
571138
|
import { pipeline as pipeline2 } from "stream/promises";
|
|
571068
571139
|
import {
|
|
@@ -571087,7 +571158,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
571087
571158
|
} catch {}
|
|
571088
571159
|
let smapsRollup;
|
|
571089
571160
|
try {
|
|
571090
|
-
smapsRollup = await
|
|
571161
|
+
smapsRollup = await readFile45("/proc/self/smaps_rollup", "utf8");
|
|
571091
571162
|
} catch {}
|
|
571092
571163
|
const nativeMemory = usage.rss - usage.heapUsed;
|
|
571093
571164
|
const bytesPerSecond = uptimeSeconds > 0 ? usage.rss / uptimeSeconds : 0;
|
|
@@ -571738,7 +571809,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
571738
571809
|
var call66 = async () => {
|
|
571739
571810
|
return {
|
|
571740
571811
|
type: "text",
|
|
571741
|
-
value: `${"99.0.0"} (built ${"2026-05-26T10:
|
|
571812
|
+
value: `${"99.0.0"} (built ${"2026-05-26T10:21:00.272Z"})`
|
|
571742
571813
|
};
|
|
571743
571814
|
}, version2, version_default;
|
|
571744
571815
|
var init_version2 = __esm(() => {
|
|
@@ -571890,7 +571961,7 @@ var init_init2 = __esm(() => {
|
|
|
571890
571961
|
});
|
|
571891
571962
|
|
|
571892
571963
|
// src/services/wiki/indexBuilder.ts
|
|
571893
|
-
import { readdir as readdir27, readFile as
|
|
571964
|
+
import { readdir as readdir27, readFile as readFile46, writeFile as writeFile41 } from "fs/promises";
|
|
571894
571965
|
import { basename as basename42, relative as relative29 } from "path";
|
|
571895
571966
|
async function listMarkdownFiles(dir) {
|
|
571896
571967
|
const entries = await readdir27(dir, { withFileTypes: true });
|
|
@@ -571906,7 +571977,7 @@ async function listMarkdownFiles(dir) {
|
|
|
571906
571977
|
return files2.sort();
|
|
571907
571978
|
}
|
|
571908
571979
|
async function getPageTitle(path21) {
|
|
571909
|
-
const content = await
|
|
571980
|
+
const content = await readFile46(path21, "utf8");
|
|
571910
571981
|
const titleLine = content.split(`
|
|
571911
571982
|
`).map((line) => line.trim()).find((line) => line.startsWith("# "));
|
|
571912
571983
|
return titleLine ? titleLine.replace(/^#\s+/, "") : basename42(path21, ".md");
|
|
@@ -571973,7 +572044,7 @@ function extractTitleFromText(fallbackName, content) {
|
|
|
571973
572044
|
}
|
|
571974
572045
|
|
|
571975
572046
|
// src/services/wiki/ingest.ts
|
|
571976
|
-
import { appendFile as appendFile5, readFile as
|
|
572047
|
+
import { appendFile as appendFile5, readFile as readFile47, stat as stat44, writeFile as writeFile42 } from "fs/promises";
|
|
571977
572048
|
import { basename as basename43, extname as extname16, isAbsolute as isAbsolute24, relative as relative30, resolve as resolve40 } from "path";
|
|
571978
572049
|
function buildSourceNote(params) {
|
|
571979
572050
|
const { title, sourcePath, ingestedAt, summary, excerpt } = params;
|
|
@@ -572009,7 +572080,7 @@ async function ingestLocalWikiSource(cwd2, rawPath) {
|
|
|
572009
572080
|
if (!fileInfo.isFile()) {
|
|
572010
572081
|
throw new Error(`Not a file: ${resolvedPath}`);
|
|
572011
572082
|
}
|
|
572012
|
-
const content = await
|
|
572083
|
+
const content = await readFile47(resolvedPath, "utf8");
|
|
572013
572084
|
const relSourcePath = relative30(cwd2, resolvedPath).replace(/\\/g, "/");
|
|
572014
572085
|
const ingestedAt = new Date().toISOString();
|
|
572015
572086
|
const baseName = basename43(resolvedPath, extname16(resolvedPath));
|
|
@@ -573552,7 +573623,7 @@ var init_setupPortable = __esm(() => {
|
|
|
573552
573623
|
});
|
|
573553
573624
|
|
|
573554
573625
|
// src/utils/claudeInChrome/setup.ts
|
|
573555
|
-
import { chmod as chmod10, mkdir as mkdir38, readFile as
|
|
573626
|
+
import { chmod as chmod10, mkdir as mkdir38, readFile as readFile48, writeFile as writeFile43 } from "fs/promises";
|
|
573556
573627
|
import { homedir as homedir31 } from "os";
|
|
573557
573628
|
import { join as join130 } from "path";
|
|
573558
573629
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
@@ -573661,7 +573732,7 @@ async function installChromeNativeHostManifest(manifestBinaryPath) {
|
|
|
573661
573732
|
let anyManifestUpdated = false;
|
|
573662
573733
|
for (const manifestDir of manifestDirs) {
|
|
573663
573734
|
const manifestPath = join130(manifestDir, NATIVE_HOST_MANIFEST_NAME);
|
|
573664
|
-
const existingContent = await
|
|
573735
|
+
const existingContent = await readFile48(manifestPath, "utf-8").catch(() => null);
|
|
573665
573736
|
if (existingContent === manifestContent) {
|
|
573666
573737
|
continue;
|
|
573667
573738
|
}
|
|
@@ -573724,7 +573795,7 @@ ${command9}
|
|
|
573724
573795
|
# Generated by Claude Code - do not edit manually
|
|
573725
573796
|
exec ${command9}
|
|
573726
573797
|
`;
|
|
573727
|
-
const existingContent = await
|
|
573798
|
+
const existingContent = await readFile48(wrapperPath, "utf-8").catch(() => null);
|
|
573728
573799
|
if (existingContent === scriptContent) {
|
|
573729
573800
|
return wrapperPath;
|
|
573730
573801
|
}
|
|
@@ -581488,7 +581559,7 @@ __export(exports_insights, {
|
|
|
581488
581559
|
import {
|
|
581489
581560
|
mkdir as mkdir41,
|
|
581490
581561
|
readdir as readdir30,
|
|
581491
|
-
readFile as
|
|
581562
|
+
readFile as readFile49,
|
|
581492
581563
|
unlink as unlink20,
|
|
581493
581564
|
writeFile as writeFile45
|
|
581494
581565
|
} from "fs/promises";
|
|
@@ -581853,7 +581924,7 @@ async function formatTranscriptWithSummarization(log) {
|
|
|
581853
581924
|
async function loadCachedFacets(sessionId) {
|
|
581854
581925
|
const facetPath = join136(getFacetsDir(), `${sessionId}.json`);
|
|
581855
581926
|
try {
|
|
581856
|
-
const content = await
|
|
581927
|
+
const content = await readFile49(facetPath, { encoding: "utf-8" });
|
|
581857
581928
|
const parsed = jsonParse(content);
|
|
581858
581929
|
if (!isValidSessionFacets(parsed)) {
|
|
581859
581930
|
try {
|
|
@@ -581879,7 +581950,7 @@ async function saveFacets(facets) {
|
|
|
581879
581950
|
async function loadCachedSessionMeta(sessionId) {
|
|
581880
581951
|
const metaPath = join136(getSessionMetaDir(), `${sessionId}.json`);
|
|
581881
581952
|
try {
|
|
581882
|
-
const content = await
|
|
581953
|
+
const content = await readFile49(metaPath, { encoding: "utf-8" });
|
|
581883
581954
|
return jsonParse(content);
|
|
581884
581955
|
} catch {
|
|
581885
581956
|
return null;
|
|
@@ -584108,7 +584179,7 @@ import {
|
|
|
584108
584179
|
open as fsOpen2,
|
|
584109
584180
|
mkdir as mkdir42,
|
|
584110
584181
|
readdir as readdir31,
|
|
584111
|
-
readFile as
|
|
584182
|
+
readFile as readFile50,
|
|
584112
584183
|
stat as stat46,
|
|
584113
584184
|
unlink as unlink21,
|
|
584114
584185
|
writeFile as writeFile46
|
|
@@ -584161,7 +584232,7 @@ async function writeAgentMetadata(agentId, metadata) {
|
|
|
584161
584232
|
async function readAgentMetadata(agentId) {
|
|
584162
584233
|
const path21 = getAgentMetadataPath(agentId);
|
|
584163
584234
|
try {
|
|
584164
|
-
const raw = await
|
|
584235
|
+
const raw = await readFile50(path21, "utf-8");
|
|
584165
584236
|
return JSON.parse(raw);
|
|
584166
584237
|
} catch (e2) {
|
|
584167
584238
|
if (isFsInaccessible(e2))
|
|
@@ -584184,7 +584255,7 @@ async function writeRemoteAgentMetadata(taskId, metadata) {
|
|
|
584184
584255
|
async function readRemoteAgentMetadata(taskId) {
|
|
584185
584256
|
const path21 = getRemoteAgentMetadataPath(taskId);
|
|
584186
584257
|
try {
|
|
584187
|
-
const raw = await
|
|
584258
|
+
const raw = await readFile50(path21, "utf-8");
|
|
584188
584259
|
return JSON.parse(raw);
|
|
584189
584260
|
} catch (e2) {
|
|
584190
584261
|
if (isFsInaccessible(e2))
|
|
@@ -584217,7 +584288,7 @@ async function listRemoteAgentMetadata() {
|
|
|
584217
584288
|
if (!entry.isFile() || !entry.name.endsWith(".meta.json"))
|
|
584218
584289
|
continue;
|
|
584219
584290
|
try {
|
|
584220
|
-
const raw = await
|
|
584291
|
+
const raw = await readFile50(join137(dir, entry.name), "utf-8");
|
|
584221
584292
|
results.push(JSON.parse(raw));
|
|
584222
584293
|
} catch (e2) {
|
|
584223
584294
|
logForDebugging(`listRemoteAgentMetadata: skipping ${entry.name}: ${String(e2)}`);
|
|
@@ -584559,7 +584630,7 @@ class Project {
|
|
|
584559
584630
|
logForDebugging(`Skipping tombstone removal: session file too large (${formatFileSize(fileSize)})`, { level: "warn" });
|
|
584560
584631
|
return;
|
|
584561
584632
|
}
|
|
584562
|
-
const content = await
|
|
584633
|
+
const content = await readFile50(this.sessionFile, { encoding: "utf-8" });
|
|
584563
584634
|
const lines = content.split(`
|
|
584564
584635
|
`).filter((line) => {
|
|
584565
584636
|
if (!line.trim())
|
|
@@ -585580,7 +585651,7 @@ async function loadTranscriptFromFile(filePath) {
|
|
|
585580
585651
|
worktreeSession: worktreeStates.has(sessionId) ? worktreeStates.get(sessionId) : undefined
|
|
585581
585652
|
};
|
|
585582
585653
|
}
|
|
585583
|
-
const content = await
|
|
585654
|
+
const content = await readFile50(filePath, { encoding: "utf-8" });
|
|
585584
585655
|
let parsed;
|
|
585585
585656
|
try {
|
|
585586
585657
|
parsed = jsonParse(content);
|
|
@@ -586242,7 +586313,7 @@ async function loadTranscriptFile(filePath, opts) {
|
|
|
586242
586313
|
}
|
|
586243
586314
|
}
|
|
586244
586315
|
}
|
|
586245
|
-
buf ??= await
|
|
586316
|
+
buf ??= await readFile50(filePath);
|
|
586246
586317
|
if (!opts?.keepAllLeaves && !hasPreservedSegment && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP) && buf.length > SKIP_PRECOMPACT_THRESHOLD) {
|
|
586247
586318
|
buf = walkChainBeforeParse(buf);
|
|
586248
586319
|
}
|
|
@@ -593943,7 +594014,7 @@ import {
|
|
|
593943
594014
|
copyFile as copyFile9,
|
|
593944
594015
|
mkdir as mkdir44,
|
|
593945
594016
|
readdir as readdir32,
|
|
593946
|
-
readFile as
|
|
594017
|
+
readFile as readFile51,
|
|
593947
594018
|
stat as stat49,
|
|
593948
594019
|
symlink as symlink5,
|
|
593949
594020
|
utimes as utimes2
|
|
@@ -594123,7 +594194,7 @@ async function getOrCreateWorktree(repoRoot, slug, options2) {
|
|
|
594123
594194
|
async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
594124
594195
|
let includeContent;
|
|
594125
594196
|
try {
|
|
594126
|
-
includeContent = await
|
|
594197
|
+
includeContent = await readFile51(join142(repoRoot, ".worktreeinclude"), "utf-8");
|
|
594127
594198
|
} catch {
|
|
594128
594199
|
return [];
|
|
594129
594200
|
}
|
|
@@ -599693,7 +599764,7 @@ __export(exports_upstreamproxy, {
|
|
|
599693
599764
|
getUpstreamProxyEnv: () => getUpstreamProxyEnv,
|
|
599694
599765
|
SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
|
|
599695
599766
|
});
|
|
599696
|
-
import { mkdir as mkdir45, readFile as
|
|
599767
|
+
import { mkdir as mkdir45, readFile as readFile52, unlink as unlink23, writeFile as writeFile47 } from "fs/promises";
|
|
599697
599768
|
import { homedir as homedir33 } from "os";
|
|
599698
599769
|
import { join as join143 } from "path";
|
|
599699
599770
|
async function initUpstreamProxy(opts) {
|
|
@@ -599780,7 +599851,7 @@ function isValidPemContent(content) {
|
|
|
599780
599851
|
}
|
|
599781
599852
|
async function readToken(path21) {
|
|
599782
599853
|
try {
|
|
599783
|
-
const raw = await
|
|
599854
|
+
const raw = await readFile52(path21, "utf8");
|
|
599784
599855
|
return raw.trim() || null;
|
|
599785
599856
|
} catch (err2) {
|
|
599786
599857
|
if (isENOENT(err2))
|
|
@@ -599833,7 +599904,7 @@ async function downloadCaBundle(baseUrl, systemCaPath, outPath) {
|
|
|
599833
599904
|
logForDebugging(`[upstreamproxy] ca-cert response is not valid PEM; proxy disabled`, { level: "warn" });
|
|
599834
599905
|
return false;
|
|
599835
599906
|
}
|
|
599836
|
-
const systemCa = await
|
|
599907
|
+
const systemCa = await readFile52(systemCaPath, "utf8").catch(() => "");
|
|
599837
599908
|
await mkdir45(join143(outPath, ".."), { recursive: true });
|
|
599838
599909
|
await writeFile47(outPath, systemCa + `
|
|
599839
599910
|
` + ccrCa, "utf8");
|
|
@@ -604196,7 +604267,7 @@ function printStartupScreen(modelOverride) {
|
|
|
604196
604267
|
const sLen = ` ● ${sL} Ready — type /help to begin`.length;
|
|
604197
604268
|
out.push(boxRow(sRow, W2, sLen, BORDER));
|
|
604198
604269
|
out.push(`${ansiRgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET2}`);
|
|
604199
|
-
out.push(` ${DIM2}${ansiRgb(...DIMCOL)}openclaude ${RESET2}${ansiRgb(...ACCENT)}v${"0.14.
|
|
604270
|
+
out.push(` ${DIM2}${ansiRgb(...DIMCOL)}openclaude ${RESET2}${ansiRgb(...ACCENT)}v${"0.14.8"}${RESET2}`);
|
|
604200
604271
|
out.push("");
|
|
604201
604272
|
process.stdout.write(out.join(`
|
|
604202
604273
|
`) + `
|
|
@@ -650173,7 +650244,7 @@ var init_cronJitterConfig = __esm(() => {
|
|
|
650173
650244
|
});
|
|
650174
650245
|
|
|
650175
650246
|
// src/utils/cronTasksLock.ts
|
|
650176
|
-
import { mkdir as mkdir48, readFile as
|
|
650247
|
+
import { mkdir as mkdir48, readFile as readFile53, unlink as unlink26, writeFile as writeFile50 } from "fs/promises";
|
|
650177
650248
|
import { dirname as dirname64, join as join155 } from "path";
|
|
650178
650249
|
function getLockPath(dir) {
|
|
650179
650250
|
return join155(dir ?? getProjectRoot(), LOCK_FILE_REL);
|
|
@@ -650181,7 +650252,7 @@ function getLockPath(dir) {
|
|
|
650181
650252
|
async function readLock(dir) {
|
|
650182
650253
|
let raw;
|
|
650183
650254
|
try {
|
|
650184
|
-
raw = await
|
|
650255
|
+
raw = await readFile53(getLockPath(dir), "utf8");
|
|
650185
650256
|
} catch {
|
|
650186
650257
|
return;
|
|
650187
650258
|
}
|
|
@@ -655507,7 +655578,7 @@ function WelcomeV2() {
|
|
|
655507
655578
|
dimColor: true,
|
|
655508
655579
|
children: [
|
|
655509
655580
|
"v",
|
|
655510
|
-
"0.14.
|
|
655581
|
+
"0.14.8",
|
|
655511
655582
|
" "
|
|
655512
655583
|
]
|
|
655513
655584
|
}, undefined, true, undefined, this)
|
|
@@ -655707,7 +655778,7 @@ function WelcomeV2() {
|
|
|
655707
655778
|
dimColor: true,
|
|
655708
655779
|
children: [
|
|
655709
655780
|
"v",
|
|
655710
|
-
"0.14.
|
|
655781
|
+
"0.14.8",
|
|
655711
655782
|
" "
|
|
655712
655783
|
]
|
|
655713
655784
|
}, undefined, true, undefined, this)
|
|
@@ -655933,7 +656004,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
655933
656004
|
dimColor: true,
|
|
655934
656005
|
children: [
|
|
655935
656006
|
"v",
|
|
655936
|
-
"0.14.
|
|
656007
|
+
"0.14.8",
|
|
655937
656008
|
" "
|
|
655938
656009
|
]
|
|
655939
656010
|
}, undefined, true, undefined, this);
|
|
@@ -656187,7 +656258,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
656187
656258
|
dimColor: true,
|
|
656188
656259
|
children: [
|
|
656189
656260
|
"v",
|
|
656190
|
-
"0.14.
|
|
656261
|
+
"0.14.8",
|
|
656191
656262
|
" "
|
|
656192
656263
|
]
|
|
656193
656264
|
}, undefined, true, undefined, this);
|
|
@@ -663231,7 +663302,7 @@ __export(exports_claudeDesktop, {
|
|
|
663231
663302
|
readClaudeDesktopMcpServers: () => readClaudeDesktopMcpServers,
|
|
663232
663303
|
getClaudeDesktopConfigPath: () => getClaudeDesktopConfigPath
|
|
663233
663304
|
});
|
|
663234
|
-
import { readdir as readdir34, readFile as
|
|
663305
|
+
import { readdir as readdir34, readFile as readFile54, stat as stat55 } from "fs/promises";
|
|
663235
663306
|
import { homedir as homedir41 } from "os";
|
|
663236
663307
|
import { join as join159 } from "path";
|
|
663237
663308
|
async function getClaudeDesktopConfigPath() {
|
|
@@ -663279,7 +663350,7 @@ async function readClaudeDesktopMcpServers() {
|
|
|
663279
663350
|
const configPath = await getClaudeDesktopConfigPath();
|
|
663280
663351
|
let configContent;
|
|
663281
663352
|
try {
|
|
663282
|
-
configContent = await
|
|
663353
|
+
configContent = await readFile54(configPath, { encoding: "utf8" });
|
|
663283
663354
|
} catch (e2) {
|
|
663284
663355
|
const code = getErrnoCode2(e2);
|
|
663285
663356
|
if (code === "ENOENT") {
|
|
@@ -666629,11 +666700,11 @@ var init_sessionUrl = __esm(() => {
|
|
|
666629
666700
|
});
|
|
666630
666701
|
|
|
666631
666702
|
// src/utils/plugins/zipCacheAdapters.ts
|
|
666632
|
-
import { readFile as
|
|
666703
|
+
import { readFile as readFile55 } from "fs/promises";
|
|
666633
666704
|
import { join as join161 } from "path";
|
|
666634
666705
|
async function readZipCacheKnownMarketplaces() {
|
|
666635
666706
|
try {
|
|
666636
|
-
const content = await
|
|
666707
|
+
const content = await readFile55(getZipCacheKnownMarketplacesPath(), "utf-8");
|
|
666637
666708
|
const parsed = KnownMarketplacesFileSchema().safeParse(jsonParse(content));
|
|
666638
666709
|
if (!parsed.success) {
|
|
666639
666710
|
logForDebugging(`Invalid known_marketplaces.json in zip cache: ${parsed.error.message}`, { level: "error" });
|
|
@@ -666666,7 +666737,7 @@ async function readMarketplaceJsonContent(dir) {
|
|
|
666666
666737
|
];
|
|
666667
666738
|
for (const candidate of candidates) {
|
|
666668
666739
|
try {
|
|
666669
|
-
return await
|
|
666740
|
+
return await readFile55(candidate, "utf-8");
|
|
666670
666741
|
} catch {}
|
|
666671
666742
|
}
|
|
666672
666743
|
return null;
|
|
@@ -667119,7 +667190,7 @@ __export(exports_bridgePointer, {
|
|
|
667119
667190
|
clearBridgePointer: () => clearBridgePointer,
|
|
667120
667191
|
BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
|
|
667121
667192
|
});
|
|
667122
|
-
import { mkdir as mkdir50, readFile as
|
|
667193
|
+
import { mkdir as mkdir50, readFile as readFile56, stat as stat57, unlink as unlink27, writeFile as writeFile54 } from "fs/promises";
|
|
667123
667194
|
import { dirname as dirname68, join as join162 } from "path";
|
|
667124
667195
|
function getBridgePointerPath(dir) {
|
|
667125
667196
|
return join162(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
|
|
@@ -667140,7 +667211,7 @@ async function readBridgePointer(dir) {
|
|
|
667140
667211
|
let mtimeMs;
|
|
667141
667212
|
try {
|
|
667142
667213
|
mtimeMs = (await stat57(path24)).mtimeMs;
|
|
667143
|
-
raw = await
|
|
667214
|
+
raw = await readFile56(path24, "utf8");
|
|
667144
667215
|
} catch {
|
|
667145
667216
|
return null;
|
|
667146
667217
|
}
|
|
@@ -669150,7 +669221,7 @@ __export(exports_print, {
|
|
|
669150
669221
|
createCanUseToolWithPermissionPrompt: () => createCanUseToolWithPermissionPrompt,
|
|
669151
669222
|
canBatchWith: () => canBatchWith
|
|
669152
669223
|
});
|
|
669153
|
-
import { readFile as
|
|
669224
|
+
import { readFile as readFile57, stat as stat58 } from "fs/promises";
|
|
669154
669225
|
import { dirname as dirname69 } from "path";
|
|
669155
669226
|
import { cwd as cwd3 } from "process";
|
|
669156
669227
|
import { randomUUID as randomUUID54 } from "crypto";
|
|
@@ -670523,7 +670594,7 @@ ${m.text}
|
|
|
670523
670594
|
const normalizedPath = expandPath(message.request.path);
|
|
670524
670595
|
const diskMtime = Math.floor((await stat58(normalizedPath)).mtimeMs);
|
|
670525
670596
|
if (diskMtime <= message.request.mtime) {
|
|
670526
|
-
const raw = await
|
|
670597
|
+
const raw = await readFile57(normalizedPath, "utf-8");
|
|
670527
670598
|
const content = (raw.charCodeAt(0) === 65279 ? raw.slice(1) : raw).replaceAll(`\r
|
|
670528
670599
|
`, `
|
|
670529
670600
|
`);
|
|
@@ -673732,7 +673803,7 @@ __export(exports_update, {
|
|
|
673732
673803
|
async function update() {
|
|
673733
673804
|
if (getAPIProvider() !== "firstParty") {
|
|
673734
673805
|
writeToStdout(source_default.yellow(`Auto-update is not available for third-party provider builds.
|
|
673735
|
-
`) + `Current version: ${"0.14.
|
|
673806
|
+
`) + `Current version: ${"0.14.8"}
|
|
673736
673807
|
|
|
673737
673808
|
` + `To update, reinstall from npm:
|
|
673738
673809
|
` + source_default.bold(` npm install -g ${"@makerbi/openclaude"}@latest`) + `
|
|
@@ -673743,7 +673814,7 @@ async function update() {
|
|
|
673743
673814
|
await gracefulShutdown(0);
|
|
673744
673815
|
}
|
|
673745
673816
|
logEvent("tengu_update_check", {});
|
|
673746
|
-
writeToStdout(`Current version: ${"0.14.
|
|
673817
|
+
writeToStdout(`Current version: ${"0.14.8"}
|
|
673747
673818
|
`);
|
|
673748
673819
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
673749
673820
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -673828,8 +673899,8 @@ async function update() {
|
|
|
673828
673899
|
writeToStdout(`Claude is managed by Homebrew.
|
|
673829
673900
|
`);
|
|
673830
673901
|
const latest = await getLatestVersion(channel);
|
|
673831
|
-
if (latest && !gte("0.14.
|
|
673832
|
-
writeToStdout(`Update available: ${"0.14.
|
|
673902
|
+
if (latest && !gte("0.14.8", latest)) {
|
|
673903
|
+
writeToStdout(`Update available: ${"0.14.8"} → ${latest}
|
|
673833
673904
|
`);
|
|
673834
673905
|
writeToStdout(`
|
|
673835
673906
|
`);
|
|
@@ -673845,8 +673916,8 @@ async function update() {
|
|
|
673845
673916
|
writeToStdout(`Claude is managed by winget.
|
|
673846
673917
|
`);
|
|
673847
673918
|
const latest = await getLatestVersion(channel);
|
|
673848
|
-
if (latest && !gte("0.14.
|
|
673849
|
-
writeToStdout(`Update available: ${"0.14.
|
|
673919
|
+
if (latest && !gte("0.14.8", latest)) {
|
|
673920
|
+
writeToStdout(`Update available: ${"0.14.8"} → ${latest}
|
|
673850
673921
|
`);
|
|
673851
673922
|
writeToStdout(`
|
|
673852
673923
|
`);
|
|
@@ -673862,8 +673933,8 @@ async function update() {
|
|
|
673862
673933
|
writeToStdout(`Claude is managed by apk.
|
|
673863
673934
|
`);
|
|
673864
673935
|
const latest = await getLatestVersion(channel);
|
|
673865
|
-
if (latest && !gte("0.14.
|
|
673866
|
-
writeToStdout(`Update available: ${"0.14.
|
|
673936
|
+
if (latest && !gte("0.14.8", latest)) {
|
|
673937
|
+
writeToStdout(`Update available: ${"0.14.8"} → ${latest}
|
|
673867
673938
|
`);
|
|
673868
673939
|
writeToStdout(`
|
|
673869
673940
|
`);
|
|
@@ -673928,11 +673999,11 @@ async function update() {
|
|
|
673928
673999
|
`);
|
|
673929
674000
|
await gracefulShutdown(1);
|
|
673930
674001
|
}
|
|
673931
|
-
if (result.latestVersion === "0.14.
|
|
673932
|
-
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.
|
|
674002
|
+
if (result.latestVersion === "0.14.8") {
|
|
674003
|
+
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.8"})`) + `
|
|
673933
674004
|
`);
|
|
673934
674005
|
} else {
|
|
673935
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.14.
|
|
674006
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.14.8"} to version ${result.latestVersion}`) + `
|
|
673936
674007
|
`);
|
|
673937
674008
|
await regenerateCompletionCache();
|
|
673938
674009
|
}
|
|
@@ -673992,12 +674063,12 @@ async function update() {
|
|
|
673992
674063
|
`);
|
|
673993
674064
|
await gracefulShutdown(1);
|
|
673994
674065
|
}
|
|
673995
|
-
if (latestVersion === "0.14.
|
|
673996
|
-
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.
|
|
674066
|
+
if (latestVersion === "0.14.8") {
|
|
674067
|
+
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.8"})`) + `
|
|
673997
674068
|
`);
|
|
673998
674069
|
await gracefulShutdown(0);
|
|
673999
674070
|
}
|
|
674000
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.14.
|
|
674071
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.14.8"})
|
|
674001
674072
|
`);
|
|
674002
674073
|
writeToStdout(`Installing update...
|
|
674003
674074
|
`);
|
|
@@ -674042,7 +674113,7 @@ async function update() {
|
|
|
674042
674113
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
674043
674114
|
switch (status2) {
|
|
674044
674115
|
case "success":
|
|
674045
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.14.
|
|
674116
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.14.8"} to version ${latestVersion}`) + `
|
|
674046
674117
|
`);
|
|
674047
674118
|
await regenerateCompletionCache();
|
|
674048
674119
|
break;
|
|
@@ -676095,7 +676166,7 @@ Usage: openclaude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
676095
676166
|
pendingHookMessages
|
|
676096
676167
|
}, renderAndRun);
|
|
676097
676168
|
}
|
|
676098
|
-
}).version("0.14.
|
|
676169
|
+
}).version("0.14.8 (OpenClaude)", "-v, --version", "Output the version number");
|
|
676099
676170
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
676100
676171
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
676101
676172
|
if (canUserConfigureAdvisor()) {
|
|
@@ -676672,7 +676743,7 @@ if (false) {}
|
|
|
676672
676743
|
async function main2() {
|
|
676673
676744
|
const args = process.argv.slice(2);
|
|
676674
676745
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
676675
|
-
console.log(`${"0.14.
|
|
676746
|
+
console.log(`${"0.14.8"} (OpenClaude)`);
|
|
676676
676747
|
return;
|
|
676677
676748
|
}
|
|
676678
676749
|
if (args.includes("--provider")) {
|
|
@@ -676825,4 +676896,4 @@ async function main2() {
|
|
|
676825
676896
|
}
|
|
676826
676897
|
main2();
|
|
676827
676898
|
|
|
676828
|
-
//# debugId=
|
|
676899
|
+
//# debugId=0163E3661EF4533664756E2164756E21
|