@makerbi/openclaude 0.14.5 → 0.14.6
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 +149 -142
- package/dist/sdk.mjs +15 -15
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -149962,7 +149962,7 @@ var init_metadata = __esm(() => {
|
|
|
149962
149962
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
149963
149963
|
version: "99.0.0",
|
|
149964
149964
|
versionBase: getVersionBase(),
|
|
149965
|
-
buildTime: "2026-05-
|
|
149965
|
+
buildTime: "2026-05-26T08:05:18.634Z",
|
|
149966
149966
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
149967
149967
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
149968
149968
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -284335,6 +284335,7 @@ import {
|
|
|
284335
284335
|
access as access2,
|
|
284336
284336
|
chmod as chmod5,
|
|
284337
284337
|
copyFile as copyFile2,
|
|
284338
|
+
readFile as readFile14,
|
|
284338
284339
|
lstat as lstat5,
|
|
284339
284340
|
mkdir as mkdir12,
|
|
284340
284341
|
readdir as readdir8,
|
|
@@ -284715,7 +284716,13 @@ async function updateSymlink(symlinkPath, targetPath) {
|
|
|
284715
284716
|
try {
|
|
284716
284717
|
const targetStats = await stat20(targetPath);
|
|
284717
284718
|
if (existingStats.size === targetStats.size) {
|
|
284718
|
-
|
|
284719
|
+
const [existingContent, targetContent] = await Promise.all([
|
|
284720
|
+
readFile14(symlinkPath),
|
|
284721
|
+
readFile14(targetPath)
|
|
284722
|
+
]);
|
|
284723
|
+
if (existingContent.equals(targetContent)) {
|
|
284724
|
+
return false;
|
|
284725
|
+
}
|
|
284719
284726
|
}
|
|
284720
284727
|
} catch {}
|
|
284721
284728
|
const oldFileName = `${symlinkPath}.old.${Date.now()}`;
|
|
@@ -290722,7 +290729,7 @@ function appendCappedMessage(prev, item) {
|
|
|
290722
290729
|
var TEAMMATE_MESSAGES_UI_CAP = 50;
|
|
290723
290730
|
|
|
290724
290731
|
// src/utils/tasks.ts
|
|
290725
|
-
import { mkdir as mkdir13, readdir as readdir9, readFile as
|
|
290732
|
+
import { mkdir as mkdir13, readdir as readdir9, readFile as readFile15, unlink as unlink8, writeFile as writeFile14 } from "fs/promises";
|
|
290726
290733
|
import { join as join64 } from "path";
|
|
290727
290734
|
function setLeaderTeamName(teamName) {
|
|
290728
290735
|
if (leaderTeamName === teamName)
|
|
@@ -290747,7 +290754,7 @@ function getHighWaterMarkPath(taskListId) {
|
|
|
290747
290754
|
async function readHighWaterMark(taskListId) {
|
|
290748
290755
|
const path12 = getHighWaterMarkPath(taskListId);
|
|
290749
290756
|
try {
|
|
290750
|
-
const content = (await
|
|
290757
|
+
const content = (await readFile15(path12, "utf-8")).trim();
|
|
290751
290758
|
const value = parseInt(content, 10);
|
|
290752
290759
|
return isNaN(value) ? 0 : value;
|
|
290753
290760
|
} catch {
|
|
@@ -290871,7 +290878,7 @@ async function createTask(taskListId, taskData) {
|
|
|
290871
290878
|
async function getTask(taskListId, taskId) {
|
|
290872
290879
|
const path12 = getTaskPath(taskListId, taskId);
|
|
290873
290880
|
try {
|
|
290874
|
-
const content = await
|
|
290881
|
+
const content = await readFile15(path12, "utf-8");
|
|
290875
290882
|
const data = jsonParse(content);
|
|
290876
290883
|
if (process.env.USER_TYPE === "ant") {
|
|
290877
290884
|
if (data.status === "open")
|
|
@@ -293904,7 +293911,7 @@ __export(exports_teammateMailbox, {
|
|
|
293904
293911
|
PlanApprovalRequestMessageSchema: () => PlanApprovalRequestMessageSchema,
|
|
293905
293912
|
ModeSetRequestMessageSchema: () => ModeSetRequestMessageSchema
|
|
293906
293913
|
});
|
|
293907
|
-
import { mkdir as mkdir14, readFile as
|
|
293914
|
+
import { mkdir as mkdir14, readFile as readFile16, writeFile as writeFile15 } from "fs/promises";
|
|
293908
293915
|
import { join as join65 } from "path";
|
|
293909
293916
|
function getInboxPath(agentName, teamName) {
|
|
293910
293917
|
const team = teamName || getTeamName() || "default";
|
|
@@ -293926,7 +293933,7 @@ async function readMailbox(agentName, teamName) {
|
|
|
293926
293933
|
const inboxPath = getInboxPath(agentName, teamName);
|
|
293927
293934
|
logForDebugging(`[TeammateMailbox] readMailbox: path=${inboxPath}`);
|
|
293928
293935
|
try {
|
|
293929
|
-
const content = await
|
|
293936
|
+
const content = await readFile16(inboxPath, "utf-8");
|
|
293930
293937
|
const messages = jsonParse(content);
|
|
293931
293938
|
logForDebugging(`[TeammateMailbox] readMailbox: read ${messages.length} message(s)`);
|
|
293932
293939
|
return messages;
|
|
@@ -297102,7 +297109,7 @@ __export(exports_teamHelpers, {
|
|
|
297102
297109
|
addHiddenPaneId: () => addHiddenPaneId
|
|
297103
297110
|
});
|
|
297104
297111
|
import { mkdirSync as mkdirSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
297105
|
-
import { mkdir as mkdir15, readFile as
|
|
297112
|
+
import { mkdir as mkdir15, readFile as readFile17, rm as rm4, writeFile as writeFile16 } from "fs/promises";
|
|
297106
297113
|
import { join as join66 } from "path";
|
|
297107
297114
|
function sanitizeName(name) {
|
|
297108
297115
|
return name.replace(/[^a-zA-Z0-9]/g, "-").toLowerCase();
|
|
@@ -297129,7 +297136,7 @@ function readTeamFile(teamName) {
|
|
|
297129
297136
|
}
|
|
297130
297137
|
async function readTeamFileAsync(teamName) {
|
|
297131
297138
|
try {
|
|
297132
|
-
const content = await
|
|
297139
|
+
const content = await readFile17(getTeamFilePath(teamName), "utf-8");
|
|
297133
297140
|
return jsonParse(content);
|
|
297134
297141
|
} catch (e) {
|
|
297135
297142
|
if (getErrnoCode2(e) === "ENOENT")
|
|
@@ -297308,7 +297315,7 @@ async function destroyWorktree(worktreePath) {
|
|
|
297308
297315
|
const gitFilePath = join66(worktreePath, ".git");
|
|
297309
297316
|
let mainRepoPath = null;
|
|
297310
297317
|
try {
|
|
297311
|
-
const gitFileContent = (await
|
|
297318
|
+
const gitFileContent = (await readFile17(gitFilePath, "utf-8")).trim();
|
|
297312
297319
|
const match = gitFileContent.match(/^gitdir:\s*(.+)$/);
|
|
297313
297320
|
if (match && match[1]) {
|
|
297314
297321
|
const worktreeGitDir = match[1];
|
|
@@ -312518,7 +312525,7 @@ import {
|
|
|
312518
312525
|
copyFile as copyFile3,
|
|
312519
312526
|
link as link3,
|
|
312520
312527
|
mkdir as mkdir16,
|
|
312521
|
-
readFile as
|
|
312528
|
+
readFile as readFile18,
|
|
312522
312529
|
stat as stat21,
|
|
312523
312530
|
unlink as unlink9
|
|
312524
312531
|
} from "fs/promises";
|
|
@@ -312875,8 +312882,8 @@ async function checkOriginFileChanged(originalFile, backupFileName, originalStat
|
|
|
312875
312882
|
return compareStatsAndContent(originalStats, backupStats, async () => {
|
|
312876
312883
|
try {
|
|
312877
312884
|
const [originalContent, backupContent] = await Promise.all([
|
|
312878
|
-
|
|
312879
|
-
|
|
312885
|
+
readFile18(originalFile, "utf-8"),
|
|
312886
|
+
readFile18(backupPath, "utf-8")
|
|
312880
312887
|
]);
|
|
312881
312888
|
return originalContent !== backupContent;
|
|
312882
312889
|
} catch {
|
|
@@ -313147,7 +313154,7 @@ async function notifyVscodeSnapshotFilesUpdated(oldState, newState) {
|
|
|
313147
313154
|
}
|
|
313148
313155
|
async function readFileAsyncOrNull(path12) {
|
|
313149
313156
|
try {
|
|
313150
|
-
return await
|
|
313157
|
+
return await readFile18(path12, "utf-8");
|
|
313151
313158
|
} catch {
|
|
313152
313159
|
return null;
|
|
313153
313160
|
}
|
|
@@ -314190,7 +314197,7 @@ var init_plans = __esm(() => {
|
|
|
314190
314197
|
});
|
|
314191
314198
|
|
|
314192
314199
|
// src/utils/sessionEnvironment.ts
|
|
314193
|
-
import { mkdir as mkdir17, readdir as readdir10, readFile as
|
|
314200
|
+
import { mkdir as mkdir17, readdir as readdir10, readFile as readFile19, writeFile as writeFile18 } from "fs/promises";
|
|
314194
314201
|
import { join as join69 } from "path";
|
|
314195
314202
|
async function getSessionEnvDirPath() {
|
|
314196
314203
|
const sessionEnvDir = join69(getClaudeConfigHomeDir(), "session-env", getSessionId());
|
|
@@ -314229,7 +314236,7 @@ async function getSessionEnvironmentScript() {
|
|
|
314229
314236
|
const envFile = process.env.CLAUDE_ENV_FILE;
|
|
314230
314237
|
if (envFile) {
|
|
314231
314238
|
try {
|
|
314232
|
-
const envScript = (await
|
|
314239
|
+
const envScript = (await readFile19(envFile, "utf8")).trim();
|
|
314233
314240
|
if (envScript) {
|
|
314234
314241
|
scripts.push(envScript);
|
|
314235
314242
|
logForDebugging(`Session environment loaded from CLAUDE_ENV_FILE: ${envFile} (${envScript.length} chars)`);
|
|
@@ -314248,7 +314255,7 @@ async function getSessionEnvironmentScript() {
|
|
|
314248
314255
|
for (const file2 of hookFiles) {
|
|
314249
314256
|
const filePath = join69(sessionEnvDir, file2);
|
|
314250
314257
|
try {
|
|
314251
|
-
const content = (await
|
|
314258
|
+
const content = (await readFile19(filePath, "utf8")).trim();
|
|
314252
314259
|
if (content) {
|
|
314253
314260
|
scripts.push(content);
|
|
314254
314261
|
}
|
|
@@ -317831,7 +317838,7 @@ var init_LSPDiagnosticRegistry = __esm(() => {
|
|
|
317831
317838
|
});
|
|
317832
317839
|
|
|
317833
317840
|
// src/utils/plugins/lspPluginIntegration.ts
|
|
317834
|
-
import { readFile as
|
|
317841
|
+
import { readFile as readFile21 } from "fs/promises";
|
|
317835
317842
|
import { join as join72, relative as relative11, resolve as resolve22 } from "path";
|
|
317836
317843
|
function validatePathWithinPlugin(pluginPath, relativePath) {
|
|
317837
317844
|
const resolvedPluginPath = resolve22(pluginPath);
|
|
@@ -317846,7 +317853,7 @@ async function loadPluginLspServers(plugin, errors4 = []) {
|
|
|
317846
317853
|
const servers = {};
|
|
317847
317854
|
const lspJsonPath = join72(plugin.path, ".lsp.json");
|
|
317848
317855
|
try {
|
|
317849
|
-
const content = await
|
|
317856
|
+
const content = await readFile21(lspJsonPath, "utf-8");
|
|
317850
317857
|
const parsed = jsonParse(content);
|
|
317851
317858
|
const result = exports_external.record(exports_external.string(), LspServerConfigSchema()).safeParse(parsed);
|
|
317852
317859
|
if (result.success) {
|
|
@@ -317903,7 +317910,7 @@ async function loadLspServersFromManifest(declaration, pluginPath, pluginName, e
|
|
|
317903
317910
|
continue;
|
|
317904
317911
|
}
|
|
317905
317912
|
try {
|
|
317906
|
-
const content = await
|
|
317913
|
+
const content = await readFile21(validatedPath, "utf-8");
|
|
317907
317914
|
const parsed = jsonParse(content);
|
|
317908
317915
|
const result = exports_external.record(exports_external.string(), LspServerConfigSchema()).safeParse(parsed);
|
|
317909
317916
|
if (result.success) {
|
|
@@ -324927,7 +324934,7 @@ var init_UI6 = __esm(() => {
|
|
|
324927
324934
|
});
|
|
324928
324935
|
|
|
324929
324936
|
// src/tools/BashTool/utils.ts
|
|
324930
|
-
import { readFile as
|
|
324937
|
+
import { readFile as readFile22, stat as stat26 } from "fs/promises";
|
|
324931
324938
|
function stripEmptyLines(content) {
|
|
324932
324939
|
const lines = content.split(`
|
|
324933
324940
|
`);
|
|
@@ -324979,7 +324986,7 @@ async function resizeShellImageOutput(stdout, outputFilePath, outputFileSize) {
|
|
|
324979
324986
|
const size = outputFileSize ?? (await stat26(outputFilePath)).size;
|
|
324980
324987
|
if (size > MAX_IMAGE_FILE_SIZE)
|
|
324981
324988
|
return null;
|
|
324982
|
-
source = await
|
|
324989
|
+
source = await readFile22(outputFilePath, "utf8");
|
|
324983
324990
|
}
|
|
324984
324991
|
const parsed = parseDataUri(source);
|
|
324985
324992
|
if (!parsed)
|
|
@@ -332534,7 +332541,7 @@ var init_fileOperationAnalytics = __esm(() => {
|
|
|
332534
332541
|
});
|
|
332535
332542
|
|
|
332536
332543
|
// src/utils/gitDiff.ts
|
|
332537
|
-
import { access as access4, readFile as
|
|
332544
|
+
import { access as access4, readFile as readFile23 } from "fs/promises";
|
|
332538
332545
|
import { dirname as dirname31, join as join76, relative as relative13, sep as sep16 } from "path";
|
|
332539
332546
|
async function fetchGitDiff() {
|
|
332540
332547
|
const isGit = await getIsGit();
|
|
@@ -332785,7 +332792,7 @@ async function generateSyntheticDiff(gitPath, absoluteFilePath) {
|
|
|
332785
332792
|
if (!isFileWithinReadSizeLimit(absoluteFilePath, MAX_DIFF_SIZE_BYTES)) {
|
|
332786
332793
|
return null;
|
|
332787
332794
|
}
|
|
332788
|
-
const content = await
|
|
332795
|
+
const content = await readFile23(absoluteFilePath, "utf-8");
|
|
332789
332796
|
const lines = content.split(`
|
|
332790
332797
|
`);
|
|
332791
332798
|
if (lines.length > 0 && lines.at(-1) === "") {
|
|
@@ -359944,7 +359951,7 @@ var init_listSessionsImpl = __esm(() => {
|
|
|
359944
359951
|
});
|
|
359945
359952
|
|
|
359946
359953
|
// src/services/autoDream/consolidationLock.ts
|
|
359947
|
-
import { mkdir as mkdir21, readFile as
|
|
359954
|
+
import { mkdir as mkdir21, readFile as readFile24, stat as stat28, unlink as unlink12, utimes, writeFile as writeFile20 } from "fs/promises";
|
|
359948
359955
|
import { join as join80 } from "path";
|
|
359949
359956
|
function lockPath() {
|
|
359950
359957
|
return join80(getAutoMemPath(), LOCK_FILE);
|
|
@@ -359962,7 +359969,7 @@ async function tryAcquireConsolidationLock() {
|
|
|
359962
359969
|
let mtimeMs;
|
|
359963
359970
|
let holderPid;
|
|
359964
359971
|
try {
|
|
359965
|
-
const [s, raw] = await Promise.all([stat28(path15),
|
|
359972
|
+
const [s, raw] = await Promise.all([stat28(path15), readFile24(path15, "utf8")]);
|
|
359966
359973
|
mtimeMs = s.mtimeMs;
|
|
359967
359974
|
const parsed = parseInt(raw.trim(), 10);
|
|
359968
359975
|
holderPid = Number.isFinite(parsed) ? parsed : undefined;
|
|
@@ -359977,7 +359984,7 @@ async function tryAcquireConsolidationLock() {
|
|
|
359977
359984
|
await writeFile20(path15, String(process.pid));
|
|
359978
359985
|
let verify;
|
|
359979
359986
|
try {
|
|
359980
|
-
verify = await
|
|
359987
|
+
verify = await readFile24(path15, "utf8");
|
|
359981
359988
|
} catch {
|
|
359982
359989
|
return null;
|
|
359983
359990
|
}
|
|
@@ -362288,7 +362295,7 @@ var require_querystring = __commonJS((exports) => {
|
|
|
362288
362295
|
|
|
362289
362296
|
// node_modules/needle/lib/multipart.js
|
|
362290
362297
|
var require_multipart = __commonJS((exports) => {
|
|
362291
|
-
var
|
|
362298
|
+
var readFile25 = __require("fs").readFile;
|
|
362292
362299
|
var basename24 = __require("path").basename;
|
|
362293
362300
|
exports.build = function(data, boundary, callback) {
|
|
362294
362301
|
if (typeof data != "object" || typeof data.pipe == "function")
|
|
@@ -362340,7 +362347,7 @@ var require_multipart = __commonJS((exports) => {
|
|
|
362340
362347
|
var filename = part.filename ? part.filename : part.file ? basename24(part.file) : name;
|
|
362341
362348
|
if (part.buffer)
|
|
362342
362349
|
return append2(part.buffer, filename, true);
|
|
362343
|
-
|
|
362350
|
+
readFile25(part.file, function(err2, data) {
|
|
362344
362351
|
if (err2)
|
|
362345
362352
|
return callback(err2);
|
|
362346
362353
|
append2(data, filename, true);
|
|
@@ -375112,7 +375119,7 @@ var init_TeamDeleteTool = __esm(() => {
|
|
|
375112
375119
|
});
|
|
375113
375120
|
|
|
375114
375121
|
// src/utils/concurrentSessions.ts
|
|
375115
|
-
import { chmod as chmod7, mkdir as mkdir22, readdir as readdir12, readFile as
|
|
375122
|
+
import { chmod as chmod7, mkdir as mkdir22, readdir as readdir12, readFile as readFile25, unlink as unlink13, writeFile as writeFile22 } from "fs/promises";
|
|
375116
375123
|
import { join as join81 } from "path";
|
|
375117
375124
|
function getSessionsDir() {
|
|
375118
375125
|
return join81(getClaudeConfigHomeDir(), "sessions");
|
|
@@ -375157,7 +375164,7 @@ async function registerSession() {
|
|
|
375157
375164
|
async function updatePidFile(patch) {
|
|
375158
375165
|
const pidFile = join81(getSessionsDir(), `${process.pid}.json`);
|
|
375159
375166
|
try {
|
|
375160
|
-
const data = jsonParse(await
|
|
375167
|
+
const data = jsonParse(await readFile25(pidFile, "utf8"));
|
|
375161
375168
|
await writeFile22(pidFile, jsonStringify({ ...data, ...patch }));
|
|
375162
375169
|
} catch (e2) {
|
|
375163
375170
|
logForDebugging(`[concurrentSessions] updatePidFile failed: ${errorMessage(e2)}`);
|
|
@@ -380602,7 +380609,7 @@ var init_types10 = __esm(() => {
|
|
|
380602
380609
|
|
|
380603
380610
|
// src/services/teamMemorySync/index.ts
|
|
380604
380611
|
import { createHash as createHash17 } from "crypto";
|
|
380605
|
-
import { mkdir as mkdir23, readdir as readdir13, readFile as
|
|
380612
|
+
import { mkdir as mkdir23, readdir as readdir13, readFile as readFile26, stat as stat31, writeFile as writeFile23 } from "fs/promises";
|
|
380606
380613
|
import { join as join82, relative as relative19, sep as sep21 } from "path";
|
|
380607
380614
|
function createSyncState() {
|
|
380608
380615
|
return {
|
|
@@ -380918,7 +380925,7 @@ async function readLocalTeamMemory(maxEntries) {
|
|
|
380918
380925
|
logForDebugging(`team-memory-sync: skipping oversized file ${entry.name} (${stats.size} > ${MAX_FILE_SIZE_BYTES3} bytes)`, { level: "info" });
|
|
380919
380926
|
return;
|
|
380920
380927
|
}
|
|
380921
|
-
const content = await
|
|
380928
|
+
const content = await readFile26(fullPath, "utf8");
|
|
380922
380929
|
const relPath = relative19(teamDir, fullPath).replaceAll("\\", "/");
|
|
380923
380930
|
const secretMatches = scanForSecrets(content);
|
|
380924
380931
|
if (secretMatches.length > 0) {
|
|
@@ -380981,7 +380988,7 @@ async function writeRemoteEntriesToLocal(entries) {
|
|
|
380981
380988
|
return false;
|
|
380982
380989
|
}
|
|
380983
380990
|
try {
|
|
380984
|
-
const existing = await
|
|
380991
|
+
const existing = await readFile26(validatedPath, "utf8");
|
|
380985
380992
|
if (existing === content) {
|
|
380986
380993
|
return false;
|
|
380987
380994
|
}
|
|
@@ -386680,7 +386687,7 @@ var init_config3 = __esm(() => {
|
|
|
386680
386687
|
|
|
386681
386688
|
// src/utils/readFileInRange.ts
|
|
386682
386689
|
import { createReadStream as createReadStream2, fstat } from "fs";
|
|
386683
|
-
import { stat as fsStat3, readFile as
|
|
386690
|
+
import { stat as fsStat3, readFile as readFile27 } from "fs/promises";
|
|
386684
386691
|
async function readFileInRange(filePath, offset = 0, maxLines, maxBytes, signal, options2) {
|
|
386685
386692
|
signal?.throwIfAborted();
|
|
386686
386693
|
const truncateOnByteLimit = options2?.truncateOnByteLimit ?? false;
|
|
@@ -386692,7 +386699,7 @@ async function readFileInRange(filePath, offset = 0, maxLines, maxBytes, signal,
|
|
|
386692
386699
|
if (!truncateOnByteLimit && maxBytes !== undefined && stats.size > maxBytes) {
|
|
386693
386700
|
throw new FileTooLargeError(stats.size, maxBytes);
|
|
386694
386701
|
}
|
|
386695
|
-
const text = await
|
|
386702
|
+
const text = await readFile27(filePath, { encoding: "utf8", signal });
|
|
386696
386703
|
return readFileInRangeFast(text, stats.mtimeMs, offset, maxLines, truncateOnByteLimit ? maxBytes : undefined);
|
|
386697
386704
|
}
|
|
386698
386705
|
return readFileInRangeStreaming(filePath, offset, maxLines, maxBytes, truncateOnByteLimit, signal);
|
|
@@ -389343,7 +389350,7 @@ function getAnthropicEnvMetadata() {
|
|
|
389343
389350
|
function getBuildAgeMinutes() {
|
|
389344
389351
|
if (false)
|
|
389345
389352
|
;
|
|
389346
|
-
const buildTime = new Date("2026-05-
|
|
389353
|
+
const buildTime = new Date("2026-05-26T08:05:18.634Z").getTime();
|
|
389347
389354
|
if (isNaN(buildTime))
|
|
389348
389355
|
return;
|
|
389349
389356
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -391249,7 +391256,7 @@ var init_postCompactCleanup = __esm(() => {
|
|
|
391249
391256
|
});
|
|
391250
391257
|
|
|
391251
391258
|
// src/services/SessionMemory/prompts.ts
|
|
391252
|
-
import { readFile as
|
|
391259
|
+
import { readFile as readFile28 } from "fs/promises";
|
|
391253
391260
|
import { join as join85 } from "path";
|
|
391254
391261
|
function getDefaultUpdatePrompt() {
|
|
391255
391262
|
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.
|
|
@@ -391293,7 +391300,7 @@ REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edit
|
|
|
391293
391300
|
async function loadSessionMemoryTemplate() {
|
|
391294
391301
|
const templatePath = join85(getClaudeConfigHomeDir(), "session-memory", "config", "template.md");
|
|
391295
391302
|
try {
|
|
391296
|
-
return await
|
|
391303
|
+
return await readFile28(templatePath, { encoding: "utf-8" });
|
|
391297
391304
|
} catch (e2) {
|
|
391298
391305
|
const code = getErrnoCode2(e2);
|
|
391299
391306
|
if (code === "ENOENT") {
|
|
@@ -391306,7 +391313,7 @@ async function loadSessionMemoryTemplate() {
|
|
|
391306
391313
|
async function loadSessionMemoryPrompt() {
|
|
391307
391314
|
const promptPath = join85(getClaudeConfigHomeDir(), "session-memory", "config", "prompt.md");
|
|
391308
391315
|
try {
|
|
391309
|
-
return await
|
|
391316
|
+
return await readFile28(promptPath, { encoding: "utf-8" });
|
|
391310
391317
|
} catch (e2) {
|
|
391311
391318
|
const code = getErrnoCode2(e2);
|
|
391312
391319
|
if (code === "ENOENT") {
|
|
@@ -392967,7 +392974,7 @@ var init_toolSearch = __esm(() => {
|
|
|
392967
392974
|
|
|
392968
392975
|
// src/services/vcr.ts
|
|
392969
392976
|
import { createHash as createHash18, randomUUID as randomUUID20 } from "crypto";
|
|
392970
|
-
import { mkdir as mkdir25, readFile as
|
|
392977
|
+
import { mkdir as mkdir25, readFile as readFile29, writeFile as writeFile24 } from "fs/promises";
|
|
392971
392978
|
import { dirname as dirname36, join as join86 } from "path";
|
|
392972
392979
|
function shouldUseVCR() {
|
|
392973
392980
|
if (false) {}
|
|
@@ -392983,7 +392990,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
392983
392990
|
const hash = createHash18("sha1").update(jsonStringify(input)).digest("hex").slice(0, 12);
|
|
392984
392991
|
const filename = join86(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${fixtureName}-${hash}.json`);
|
|
392985
392992
|
try {
|
|
392986
|
-
const cached3 = jsonParse(await
|
|
392993
|
+
const cached3 = jsonParse(await readFile29(filename, { encoding: "utf8" }));
|
|
392987
392994
|
return cached3;
|
|
392988
392995
|
} catch (e2) {
|
|
392989
392996
|
const code = getErrnoCode2(e2);
|
|
@@ -393017,7 +393024,7 @@ async function withVCR(messages, f) {
|
|
|
393017
393024
|
const dehydratedInput = mapMessages(messagesForAPI.map((_) => _.message.content), dehydrateValue);
|
|
393018
393025
|
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`);
|
|
393019
393026
|
try {
|
|
393020
|
-
const cached3 = jsonParse(await
|
|
393027
|
+
const cached3 = jsonParse(await readFile29(filename, { encoding: "utf8" }));
|
|
393021
393028
|
cached3.output.forEach(addCachedCostToTotalSessionCost);
|
|
393022
393029
|
return cached3.output.map((message, index) => mapMessage(message, hydrateValue, index, randomUUID20()));
|
|
393023
393030
|
} catch (e2) {
|
|
@@ -393481,7 +393488,7 @@ var init_tokenEstimation = __esm(() => {
|
|
|
393481
393488
|
|
|
393482
393489
|
// src/utils/pdf.ts
|
|
393483
393490
|
import { randomUUID as randomUUID21 } from "crypto";
|
|
393484
|
-
import { mkdir as mkdir26, readdir as readdir15, readFile as
|
|
393491
|
+
import { mkdir as mkdir26, readdir as readdir15, readFile as readFile30 } from "fs/promises";
|
|
393485
393492
|
import { join as join87 } from "path";
|
|
393486
393493
|
async function readPDF(filePath) {
|
|
393487
393494
|
try {
|
|
@@ -393503,7 +393510,7 @@ async function readPDF(filePath) {
|
|
|
393503
393510
|
}
|
|
393504
393511
|
};
|
|
393505
393512
|
}
|
|
393506
|
-
const fileBuffer = await
|
|
393513
|
+
const fileBuffer = await readFile30(filePath);
|
|
393507
393514
|
const header = fileBuffer.subarray(0, 5).toString("ascii");
|
|
393508
393515
|
if (!header.startsWith("%PDF-")) {
|
|
393509
393516
|
return {
|
|
@@ -397366,7 +397373,7 @@ import {
|
|
|
397366
397373
|
chmod as chmod8,
|
|
397367
397374
|
lstat as lstat6,
|
|
397368
397375
|
readdir as readdir18,
|
|
397369
|
-
readFile as
|
|
397376
|
+
readFile as readFile31,
|
|
397370
397377
|
rename as rename3,
|
|
397371
397378
|
rm as rm5,
|
|
397372
397379
|
stat as stat35,
|
|
@@ -397511,7 +397518,7 @@ async function collectFilesForZip(baseDir, relativePath, files, visited) {
|
|
|
397511
397518
|
await collectFilesForZip(baseDir, relPath, files, visited);
|
|
397512
397519
|
} else if (fileStat.isFile()) {
|
|
397513
397520
|
try {
|
|
397514
|
-
const content = await
|
|
397521
|
+
const content = await readFile31(fullPath);
|
|
397515
397522
|
files[relPath] = [
|
|
397516
397523
|
new Uint8Array(content),
|
|
397517
397524
|
{ os: 3, attrs: (fileStat.mode & 65535) << 16 }
|
|
@@ -398031,7 +398038,7 @@ var init_officialMarketplace = __esm(() => {
|
|
|
398031
398038
|
});
|
|
398032
398039
|
|
|
398033
398040
|
// src/utils/plugins/officialMarketplaceGcs.ts
|
|
398034
|
-
import { chmod as chmod9, mkdir as mkdir27, readFile as
|
|
398041
|
+
import { chmod as chmod9, mkdir as mkdir27, readFile as readFile32, rename as rename4, rm as rm7, writeFile as writeFile27 } from "fs/promises";
|
|
398035
398042
|
import { dirname as dirname40, join as join92, resolve as resolve31, sep as sep22 } from "path";
|
|
398036
398043
|
async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCacheDir) {
|
|
398037
398044
|
const cacheDir = resolve31(marketplacesCacheDir);
|
|
@@ -398056,7 +398063,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
398056
398063
|
throw new Error("latest pointer returned empty body");
|
|
398057
398064
|
}
|
|
398058
398065
|
const sentinelPath = join92(installLocation, ".gcs-sha");
|
|
398059
|
-
const currentSha = await
|
|
398066
|
+
const currentSha = await readFile32(sentinelPath, "utf8").then((s) => s.trim(), () => null);
|
|
398060
398067
|
if (currentSha === sha) {
|
|
398061
398068
|
outcome = "noop";
|
|
398062
398069
|
return sha;
|
|
@@ -400159,7 +400166,7 @@ var init_pluginInstallationHelpers = __esm(() => {
|
|
|
400159
400166
|
import {
|
|
400160
400167
|
copyFile as copyFile7,
|
|
400161
400168
|
readdir as readdir20,
|
|
400162
|
-
readFile as
|
|
400169
|
+
readFile as readFile33,
|
|
400163
400170
|
readlink as readlink2,
|
|
400164
400171
|
realpath as realpath11,
|
|
400165
400172
|
rename as rename6,
|
|
@@ -400565,7 +400572,7 @@ async function cachePlugin(source, options2) {
|
|
|
400565
400572
|
let manifest;
|
|
400566
400573
|
if (await pathExists2(manifestPath)) {
|
|
400567
400574
|
try {
|
|
400568
|
-
const content = await
|
|
400575
|
+
const content = await readFile33(manifestPath, { encoding: "utf-8" });
|
|
400569
400576
|
const parsed = jsonParse(content);
|
|
400570
400577
|
const result = PluginManifestSchema().safeParse(parsed);
|
|
400571
400578
|
if (result.success) {
|
|
@@ -400589,7 +400596,7 @@ async function cachePlugin(source, options2) {
|
|
|
400589
400596
|
}
|
|
400590
400597
|
} else if (await pathExists2(legacyManifestPath)) {
|
|
400591
400598
|
try {
|
|
400592
|
-
const content = await
|
|
400599
|
+
const content = await readFile33(legacyManifestPath, {
|
|
400593
400600
|
encoding: "utf-8"
|
|
400594
400601
|
});
|
|
400595
400602
|
const parsed = jsonParse(content);
|
|
@@ -400639,7 +400646,7 @@ async function loadPluginManifest(manifestPath, pluginName, source) {
|
|
|
400639
400646
|
};
|
|
400640
400647
|
}
|
|
400641
400648
|
try {
|
|
400642
|
-
const content = await
|
|
400649
|
+
const content = await readFile33(manifestPath, { encoding: "utf-8" });
|
|
400643
400650
|
const parsedJson = jsonParse(content);
|
|
400644
400651
|
const result = PluginManifestSchema().safeParse(parsedJson);
|
|
400645
400652
|
if (result.success) {
|
|
@@ -400665,7 +400672,7 @@ async function loadPluginHooks2(hooksConfigPath, pluginName) {
|
|
|
400665
400672
|
if (!await pathExists2(hooksConfigPath)) {
|
|
400666
400673
|
throw new Error(`Hooks file not found at ${hooksConfigPath} for plugin ${pluginName}. If the manifest declares hooks, the file must exist.`);
|
|
400667
400674
|
}
|
|
400668
|
-
const content = await
|
|
400675
|
+
const content = await readFile33(hooksConfigPath, { encoding: "utf-8" });
|
|
400669
400676
|
const rawHooksConfig = jsonParse(content);
|
|
400670
400677
|
const validatedPluginHooks = PluginHooksSchema().parse(rawHooksConfig);
|
|
400671
400678
|
return validatedPluginHooks.hooks;
|
|
@@ -401062,7 +401069,7 @@ function parsePluginSettings(raw) {
|
|
|
401062
401069
|
async function loadPluginSettings(pluginPath, manifest) {
|
|
401063
401070
|
const settingsJsonPath = join96(pluginPath, "settings.json");
|
|
401064
401071
|
try {
|
|
401065
|
-
const content = await
|
|
401072
|
+
const content = await readFile33(settingsJsonPath, { encoding: "utf-8" });
|
|
401066
401073
|
const parsed = jsonParse(content);
|
|
401067
401074
|
if (isRecord3(parsed)) {
|
|
401068
401075
|
const filtered = parsePluginSettings(parsed);
|
|
@@ -409452,7 +409459,7 @@ __export(exports_terminalSetup, {
|
|
|
409452
409459
|
call: () => call5
|
|
409453
409460
|
});
|
|
409454
409461
|
import { randomBytes as randomBytes14 } from "crypto";
|
|
409455
|
-
import { copyFile as copyFile8, mkdir as mkdir28, readFile as
|
|
409462
|
+
import { copyFile as copyFile8, mkdir as mkdir28, readFile as readFile34, writeFile as writeFile29 } from "fs/promises";
|
|
409456
409463
|
import { homedir as homedir28, platform as platform4 } from "os";
|
|
409457
409464
|
import { dirname as dirname46, join as join99 } from "path";
|
|
409458
409465
|
import { pathToFileURL as pathToFileURL7 } from "url";
|
|
@@ -409599,7 +409606,7 @@ async function installBindingsForVSCodeTerminal(editor = "VSCode", theme) {
|
|
|
409599
409606
|
let keybindings = [];
|
|
409600
409607
|
let fileExists = false;
|
|
409601
409608
|
try {
|
|
409602
|
-
content = await
|
|
409609
|
+
content = await readFile34(keybindingsPath, {
|
|
409603
409610
|
encoding: "utf-8"
|
|
409604
409611
|
});
|
|
409605
409612
|
fileExists = true;
|
|
@@ -409746,7 +409753,7 @@ chars = "\\u001B\\r"`;
|
|
|
409746
409753
|
let configExists = false;
|
|
409747
409754
|
for (const path17 of configPaths) {
|
|
409748
409755
|
try {
|
|
409749
|
-
configContent = await
|
|
409756
|
+
configContent = await readFile34(path17, {
|
|
409750
409757
|
encoding: "utf-8"
|
|
409751
409758
|
});
|
|
409752
409759
|
configPath = path17;
|
|
@@ -409808,7 +409815,7 @@ async function installBindingsForZed(theme) {
|
|
|
409808
409815
|
let keymapContent = "[]";
|
|
409809
409816
|
let fileExists = false;
|
|
409810
409817
|
try {
|
|
409811
|
-
keymapContent = await
|
|
409818
|
+
keymapContent = await readFile34(keymapPath, {
|
|
409812
409819
|
encoding: "utf-8"
|
|
409813
409820
|
});
|
|
409814
409821
|
fileExists = true;
|
|
@@ -409881,7 +409888,7 @@ var init_terminalSetup = __esm(() => {
|
|
|
409881
409888
|
|
|
409882
409889
|
// src/utils/pasteStore.ts
|
|
409883
409890
|
import { createHash as createHash20 } from "crypto";
|
|
409884
|
-
import { mkdir as mkdir29, readdir as readdir21, readFile as
|
|
409891
|
+
import { mkdir as mkdir29, readdir as readdir21, readFile as readFile35, stat as stat39, unlink as unlink15, writeFile as writeFile30 } from "fs/promises";
|
|
409885
409892
|
import { join as join100 } from "path";
|
|
409886
409893
|
function getPasteStoreDir() {
|
|
409887
409894
|
return join100(getClaudeConfigHomeDir(), PASTE_STORE_DIR);
|
|
@@ -409906,7 +409913,7 @@ async function storePastedText(hash, content) {
|
|
|
409906
409913
|
async function retrievePastedText(hash) {
|
|
409907
409914
|
try {
|
|
409908
409915
|
const pastePath = getPastePath(hash);
|
|
409909
|
-
return await
|
|
409916
|
+
return await readFile35(pastePath, { encoding: "utf8" });
|
|
409910
409917
|
} catch (error42) {
|
|
409911
409918
|
if (!isENOENT(error42)) {
|
|
409912
409919
|
logForDebugging(`Failed to retrieve paste ${hash}: ${error42}`);
|
|
@@ -413759,7 +413766,7 @@ var init_issue = __esm(() => {
|
|
|
413759
413766
|
});
|
|
413760
413767
|
|
|
413761
413768
|
// src/components/Feedback.tsx
|
|
413762
|
-
import { readFile as
|
|
413769
|
+
import { readFile as readFile36, stat as stat40 } from "fs/promises";
|
|
413763
413770
|
function redactSensitiveInfo(text) {
|
|
413764
413771
|
let redacted = text;
|
|
413765
413772
|
redacted = redacted.replace(/"(sk-ant[^\s"']{24,})"/g, '"[REDACTED_API_KEY]"');
|
|
@@ -413798,7 +413805,7 @@ async function loadRawTranscriptJsonl() {
|
|
|
413798
413805
|
});
|
|
413799
413806
|
return null;
|
|
413800
413807
|
}
|
|
413801
|
-
return await
|
|
413808
|
+
return await readFile36(transcriptPath, "utf-8");
|
|
413802
413809
|
} catch {
|
|
413803
413810
|
return null;
|
|
413804
413811
|
}
|
|
@@ -417482,7 +417489,7 @@ function buildPrimarySection() {
|
|
|
417482
417489
|
}, undefined, false, undefined, this);
|
|
417483
417490
|
return [{
|
|
417484
417491
|
label: "Version",
|
|
417485
|
-
value: "0.14.
|
|
417492
|
+
value: "0.14.6"
|
|
417486
417493
|
}, {
|
|
417487
417494
|
label: "Session name",
|
|
417488
417495
|
value: nameValue
|
|
@@ -432377,7 +432384,7 @@ function getReleaseTagUrl(version2 = publicBuildVersion) {
|
|
|
432377
432384
|
return `${OPENCLAUDE_RELEASES_URL}/tag/v${normalizePublicVersion(version2)}`;
|
|
432378
432385
|
}
|
|
432379
432386
|
function getPublicBuildVersion() {
|
|
432380
|
-
return "0.14.
|
|
432387
|
+
return "0.14.6";
|
|
432381
432388
|
}
|
|
432382
432389
|
var import_semver9, OPENCLAUDE_RELEASES_URL = "https://github.com/AndersonBY/openclaude/releases", fallbackBuildVersion, publicBuildVersion;
|
|
432383
432390
|
var init_version = __esm(() => {
|
|
@@ -445165,7 +445172,7 @@ var init_AddMarketplace = __esm(() => {
|
|
|
445165
445172
|
|
|
445166
445173
|
// src/utils/plugins/installCounts.ts
|
|
445167
445174
|
import { randomBytes as randomBytes15 } from "crypto";
|
|
445168
|
-
import { readFile as
|
|
445175
|
+
import { readFile as readFile37, rename as rename7, unlink as unlink16, writeFile as writeFile35 } from "fs/promises";
|
|
445169
445176
|
import { join as join118 } from "path";
|
|
445170
445177
|
function getInstallCountsCachePath() {
|
|
445171
445178
|
return join118(getPluginsDirectory(), INSTALL_COUNTS_CACHE_FILENAME);
|
|
@@ -445173,7 +445180,7 @@ function getInstallCountsCachePath() {
|
|
|
445173
445180
|
async function loadInstallCountsCache() {
|
|
445174
445181
|
const cachePath = getInstallCountsCachePath();
|
|
445175
445182
|
try {
|
|
445176
|
-
const content = await
|
|
445183
|
+
const content = await readFile37(cachePath, { encoding: "utf-8" });
|
|
445177
445184
|
const parsed = jsonParse(content);
|
|
445178
445185
|
if (typeof parsed !== "object" || parsed === null || !("version" in parsed) || !("fetchedAt" in parsed) || !("counts" in parsed)) {
|
|
445179
445186
|
logForDebugging("Install counts cache has invalid structure");
|
|
@@ -449053,7 +449060,7 @@ var init_ManageMarketplaces = __esm(() => {
|
|
|
449053
449060
|
|
|
449054
449061
|
// src/utils/plugins/pluginFlagging.ts
|
|
449055
449062
|
import { randomBytes as randomBytes16 } from "crypto";
|
|
449056
|
-
import { readFile as
|
|
449063
|
+
import { readFile as readFile38, rename as rename8, unlink as unlink17, writeFile as writeFile36 } from "fs/promises";
|
|
449057
449064
|
import { join as join119 } from "path";
|
|
449058
449065
|
function getFlaggedPluginsPath() {
|
|
449059
449066
|
return join119(getPluginsDirectory(), FLAGGED_PLUGINS_FILENAME);
|
|
@@ -449080,7 +449087,7 @@ function parsePluginsData(content) {
|
|
|
449080
449087
|
}
|
|
449081
449088
|
async function readFromDisk() {
|
|
449082
449089
|
try {
|
|
449083
|
-
const content = await
|
|
449090
|
+
const content = await readFile38(getFlaggedPluginsPath(), {
|
|
449084
449091
|
encoding: "utf-8"
|
|
449085
449092
|
});
|
|
449086
449093
|
return parsePluginsData(content);
|
|
@@ -452349,7 +452356,7 @@ function parsePluginArgs(args) {
|
|
|
452349
452356
|
}
|
|
452350
452357
|
|
|
452351
452358
|
// src/utils/plugins/validatePlugin.ts
|
|
452352
|
-
import { readdir as readdir25, readFile as
|
|
452359
|
+
import { readdir as readdir25, readFile as readFile40, stat as stat43 } from "fs/promises";
|
|
452353
452360
|
import * as path20 from "path";
|
|
452354
452361
|
function detectManifestType(filePath) {
|
|
452355
452362
|
const fileName = path20.basename(filePath);
|
|
@@ -452389,7 +452396,7 @@ async function validatePluginManifest(filePath) {
|
|
|
452389
452396
|
const absolutePath = path20.resolve(filePath);
|
|
452390
452397
|
let content;
|
|
452391
452398
|
try {
|
|
452392
|
-
content = await
|
|
452399
|
+
content = await readFile40(absolutePath, { encoding: "utf-8" });
|
|
452393
452400
|
} catch (error42) {
|
|
452394
452401
|
const code = getErrnoCode2(error42);
|
|
452395
452402
|
let message;
|
|
@@ -452513,7 +452520,7 @@ async function validateMarketplaceManifest(filePath) {
|
|
|
452513
452520
|
const absolutePath = path20.resolve(filePath);
|
|
452514
452521
|
let content;
|
|
452515
452522
|
try {
|
|
452516
|
-
content = await
|
|
452523
|
+
content = await readFile40(absolutePath, { encoding: "utf-8" });
|
|
452517
452524
|
} catch (error42) {
|
|
452518
452525
|
const code = getErrnoCode2(error42);
|
|
452519
452526
|
let message;
|
|
@@ -452599,7 +452606,7 @@ async function validateMarketplaceManifest(filePath) {
|
|
|
452599
452606
|
const pluginJsonPath = path20.join(marketplaceRoot, entry.source, ".claude-plugin", "plugin.json");
|
|
452600
452607
|
let manifestVersion;
|
|
452601
452608
|
try {
|
|
452602
|
-
const raw = await
|
|
452609
|
+
const raw = await readFile40(pluginJsonPath, { encoding: "utf-8" });
|
|
452603
452610
|
const parsed2 = jsonParse(raw);
|
|
452604
452611
|
if (typeof parsed2.version === "string") {
|
|
452605
452612
|
manifestVersion = parsed2.version;
|
|
@@ -452716,7 +452723,7 @@ function validateComponentFile(filePath, content, fileType) {
|
|
|
452716
452723
|
async function validateHooksJson(filePath) {
|
|
452717
452724
|
let content;
|
|
452718
452725
|
try {
|
|
452719
|
-
content = await
|
|
452726
|
+
content = await readFile40(filePath, { encoding: "utf-8" });
|
|
452720
452727
|
} catch (e2) {
|
|
452721
452728
|
const code = getErrnoCode2(e2);
|
|
452722
452729
|
if (code === "ENOENT") {
|
|
@@ -452809,7 +452816,7 @@ async function validatePluginContents(pluginDir) {
|
|
|
452809
452816
|
for (const filePath of files) {
|
|
452810
452817
|
let content;
|
|
452811
452818
|
try {
|
|
452812
|
-
content = await
|
|
452819
|
+
content = await readFile40(filePath, { encoding: "utf-8" });
|
|
452813
452820
|
} catch (e2) {
|
|
452814
452821
|
if (isENOENT(e2))
|
|
452815
452822
|
continue;
|
|
@@ -452878,7 +452885,7 @@ async function validateManifest2(filePath) {
|
|
|
452878
452885
|
return validateMarketplaceManifest(filePath);
|
|
452879
452886
|
case "unknown": {
|
|
452880
452887
|
try {
|
|
452881
|
-
const content = await
|
|
452888
|
+
const content = await readFile40(absolutePath, { encoding: "utf-8" });
|
|
452882
452889
|
const parsed = jsonParse(content);
|
|
452883
452890
|
if (Array.isArray(parsed.plugins)) {
|
|
452884
452891
|
return validateMarketplaceManifest(filePath);
|
|
@@ -459154,7 +459161,7 @@ ${args ? "Additional user input: " + args : ""}
|
|
|
459154
459161
|
});
|
|
459155
459162
|
|
|
459156
459163
|
// src/utils/releaseNotes.ts
|
|
459157
|
-
import { mkdir as mkdir34, readFile as
|
|
459164
|
+
import { mkdir as mkdir34, readFile as readFile41, writeFile as writeFile37 } from "fs/promises";
|
|
459158
459165
|
import { dirname as dirname54, join as join122 } from "path";
|
|
459159
459166
|
function getChangelogCachePath() {
|
|
459160
459167
|
return join122(getClaudeConfigHomeDir(), "cache", "changelog.md");
|
|
@@ -459305,7 +459312,7 @@ async function getStoredChangelog() {
|
|
|
459305
459312
|
}
|
|
459306
459313
|
const cachePath = getChangelogCachePath();
|
|
459307
459314
|
try {
|
|
459308
|
-
const content = await
|
|
459315
|
+
const content = await readFile41(cachePath, "utf-8");
|
|
459309
459316
|
changelogMemoryCache = content;
|
|
459310
459317
|
return content;
|
|
459311
459318
|
} catch {
|
|
@@ -474150,7 +474157,7 @@ __export(exports_thinkback, {
|
|
|
474150
474157
|
playAnimation: () => playAnimation,
|
|
474151
474158
|
call: () => call49
|
|
474152
474159
|
});
|
|
474153
|
-
import { readFile as
|
|
474160
|
+
import { readFile as readFile42 } from "fs/promises";
|
|
474154
474161
|
import { join as join123 } from "path";
|
|
474155
474162
|
function getMarketplaceName() {
|
|
474156
474163
|
return OFFICIAL_MARKETPLACE_NAME;
|
|
@@ -474179,7 +474186,7 @@ async function playAnimation(skillDir) {
|
|
|
474179
474186
|
const dataPath = join123(skillDir, "year_in_review.js");
|
|
474180
474187
|
const playerPath = join123(skillDir, "player.js");
|
|
474181
474188
|
try {
|
|
474182
|
-
await
|
|
474189
|
+
await readFile42(dataPath);
|
|
474183
474190
|
} catch (e2) {
|
|
474184
474191
|
if (isENOENT(e2)) {
|
|
474185
474192
|
return {
|
|
@@ -474194,7 +474201,7 @@ async function playAnimation(skillDir) {
|
|
|
474194
474201
|
};
|
|
474195
474202
|
}
|
|
474196
474203
|
try {
|
|
474197
|
-
await
|
|
474204
|
+
await readFile42(playerPath);
|
|
474198
474205
|
} catch (e2) {
|
|
474199
474206
|
if (isENOENT(e2)) {
|
|
474200
474207
|
return {
|
|
@@ -482333,7 +482340,7 @@ __export(exports_branch, {
|
|
|
482333
482340
|
call: () => call59
|
|
482334
482341
|
});
|
|
482335
482342
|
import { randomUUID as randomUUID26 } from "crypto";
|
|
482336
|
-
import { mkdir as mkdir35, readFile as
|
|
482343
|
+
import { mkdir as mkdir35, readFile as readFile43, writeFile as writeFile38 } from "fs/promises";
|
|
482337
482344
|
function deriveFirstPrompt(firstUserMessage) {
|
|
482338
482345
|
const content = firstUserMessage?.message?.content;
|
|
482339
482346
|
if (!content)
|
|
@@ -482352,7 +482359,7 @@ async function createFork(customTitle) {
|
|
|
482352
482359
|
await mkdir35(projectDir, { recursive: true, mode: 448 });
|
|
482353
482360
|
let transcriptContent;
|
|
482354
482361
|
try {
|
|
482355
|
-
transcriptContent = await
|
|
482362
|
+
transcriptContent = await readFile43(currentTranscriptPath);
|
|
482356
482363
|
} catch {
|
|
482357
482364
|
throw new Error("No conversation to branch");
|
|
482358
482365
|
}
|
|
@@ -488714,7 +488721,7 @@ var init_rewind = __esm(() => {
|
|
|
488714
488721
|
|
|
488715
488722
|
// src/utils/heapDumpService.ts
|
|
488716
488723
|
import { createWriteStream as createWriteStream3, writeFileSync as writeFileSync6 } from "fs";
|
|
488717
|
-
import { readdir as readdir26, readFile as
|
|
488724
|
+
import { readdir as readdir26, readFile as readFile44, writeFile as writeFile39 } from "fs/promises";
|
|
488718
488725
|
import { join as join127 } from "path";
|
|
488719
488726
|
import { pipeline as pipeline2 } from "stream/promises";
|
|
488720
488727
|
import {
|
|
@@ -488739,7 +488746,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
488739
488746
|
} catch {}
|
|
488740
488747
|
let smapsRollup;
|
|
488741
488748
|
try {
|
|
488742
|
-
smapsRollup = await
|
|
488749
|
+
smapsRollup = await readFile44("/proc/self/smaps_rollup", "utf8");
|
|
488743
488750
|
} catch {}
|
|
488744
488751
|
const nativeMemory = usage.rss - usage.heapUsed;
|
|
488745
488752
|
const bytesPerSecond = uptimeSeconds > 0 ? usage.rss / uptimeSeconds : 0;
|
|
@@ -489390,7 +489397,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
489390
489397
|
var call66 = async () => {
|
|
489391
489398
|
return {
|
|
489392
489399
|
type: "text",
|
|
489393
|
-
value: `${"99.0.0"} (built ${"2026-05-
|
|
489400
|
+
value: `${"99.0.0"} (built ${"2026-05-26T08:05:18.634Z"})`
|
|
489394
489401
|
};
|
|
489395
489402
|
}, version2, version_default;
|
|
489396
489403
|
var init_version2 = __esm(() => {
|
|
@@ -489542,7 +489549,7 @@ var init_init2 = __esm(() => {
|
|
|
489542
489549
|
});
|
|
489543
489550
|
|
|
489544
489551
|
// src/services/wiki/indexBuilder.ts
|
|
489545
|
-
import { readdir as readdir27, readFile as
|
|
489552
|
+
import { readdir as readdir27, readFile as readFile45, writeFile as writeFile41 } from "fs/promises";
|
|
489546
489553
|
import { basename as basename42, relative as relative29 } from "path";
|
|
489547
489554
|
async function listMarkdownFiles(dir) {
|
|
489548
489555
|
const entries = await readdir27(dir, { withFileTypes: true });
|
|
@@ -489558,7 +489565,7 @@ async function listMarkdownFiles(dir) {
|
|
|
489558
489565
|
return files2.sort();
|
|
489559
489566
|
}
|
|
489560
489567
|
async function getPageTitle(path21) {
|
|
489561
|
-
const content = await
|
|
489568
|
+
const content = await readFile45(path21, "utf8");
|
|
489562
489569
|
const titleLine = content.split(`
|
|
489563
489570
|
`).map((line) => line.trim()).find((line) => line.startsWith("# "));
|
|
489564
489571
|
return titleLine ? titleLine.replace(/^#\s+/, "") : basename42(path21, ".md");
|
|
@@ -489625,7 +489632,7 @@ function extractTitleFromText(fallbackName, content) {
|
|
|
489625
489632
|
}
|
|
489626
489633
|
|
|
489627
489634
|
// src/services/wiki/ingest.ts
|
|
489628
|
-
import { appendFile as appendFile5, readFile as
|
|
489635
|
+
import { appendFile as appendFile5, readFile as readFile46, stat as stat44, writeFile as writeFile42 } from "fs/promises";
|
|
489629
489636
|
import { basename as basename43, extname as extname16, isAbsolute as isAbsolute24, relative as relative30, resolve as resolve40 } from "path";
|
|
489630
489637
|
function buildSourceNote(params) {
|
|
489631
489638
|
const { title, sourcePath, ingestedAt, summary, excerpt } = params;
|
|
@@ -489661,7 +489668,7 @@ async function ingestLocalWikiSource(cwd2, rawPath) {
|
|
|
489661
489668
|
if (!fileInfo.isFile()) {
|
|
489662
489669
|
throw new Error(`Not a file: ${resolvedPath}`);
|
|
489663
489670
|
}
|
|
489664
|
-
const content = await
|
|
489671
|
+
const content = await readFile46(resolvedPath, "utf8");
|
|
489665
489672
|
const relSourcePath = relative30(cwd2, resolvedPath).replace(/\\/g, "/");
|
|
489666
489673
|
const ingestedAt = new Date().toISOString();
|
|
489667
489674
|
const baseName = basename43(resolvedPath, extname16(resolvedPath));
|
|
@@ -491204,7 +491211,7 @@ var init_setupPortable = __esm(() => {
|
|
|
491204
491211
|
});
|
|
491205
491212
|
|
|
491206
491213
|
// src/utils/claudeInChrome/setup.ts
|
|
491207
|
-
import { chmod as chmod10, mkdir as mkdir38, readFile as
|
|
491214
|
+
import { chmod as chmod10, mkdir as mkdir38, readFile as readFile47, writeFile as writeFile43 } from "fs/promises";
|
|
491208
491215
|
import { homedir as homedir31 } from "os";
|
|
491209
491216
|
import { join as join130 } from "path";
|
|
491210
491217
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
@@ -491313,7 +491320,7 @@ async function installChromeNativeHostManifest(manifestBinaryPath) {
|
|
|
491313
491320
|
let anyManifestUpdated = false;
|
|
491314
491321
|
for (const manifestDir of manifestDirs) {
|
|
491315
491322
|
const manifestPath = join130(manifestDir, NATIVE_HOST_MANIFEST_NAME);
|
|
491316
|
-
const existingContent = await
|
|
491323
|
+
const existingContent = await readFile47(manifestPath, "utf-8").catch(() => null);
|
|
491317
491324
|
if (existingContent === manifestContent) {
|
|
491318
491325
|
continue;
|
|
491319
491326
|
}
|
|
@@ -491376,7 +491383,7 @@ ${command9}
|
|
|
491376
491383
|
# Generated by Claude Code - do not edit manually
|
|
491377
491384
|
exec ${command9}
|
|
491378
491385
|
`;
|
|
491379
|
-
const existingContent = await
|
|
491386
|
+
const existingContent = await readFile47(wrapperPath, "utf-8").catch(() => null);
|
|
491380
491387
|
if (existingContent === scriptContent) {
|
|
491381
491388
|
return wrapperPath;
|
|
491382
491389
|
}
|
|
@@ -499140,7 +499147,7 @@ __export(exports_insights, {
|
|
|
499140
499147
|
import {
|
|
499141
499148
|
mkdir as mkdir41,
|
|
499142
499149
|
readdir as readdir30,
|
|
499143
|
-
readFile as
|
|
499150
|
+
readFile as readFile48,
|
|
499144
499151
|
unlink as unlink20,
|
|
499145
499152
|
writeFile as writeFile45
|
|
499146
499153
|
} from "fs/promises";
|
|
@@ -499505,7 +499512,7 @@ async function formatTranscriptWithSummarization(log) {
|
|
|
499505
499512
|
async function loadCachedFacets(sessionId) {
|
|
499506
499513
|
const facetPath = join136(getFacetsDir(), `${sessionId}.json`);
|
|
499507
499514
|
try {
|
|
499508
|
-
const content = await
|
|
499515
|
+
const content = await readFile48(facetPath, { encoding: "utf-8" });
|
|
499509
499516
|
const parsed = jsonParse(content);
|
|
499510
499517
|
if (!isValidSessionFacets(parsed)) {
|
|
499511
499518
|
try {
|
|
@@ -499531,7 +499538,7 @@ async function saveFacets(facets) {
|
|
|
499531
499538
|
async function loadCachedSessionMeta(sessionId) {
|
|
499532
499539
|
const metaPath = join136(getSessionMetaDir(), `${sessionId}.json`);
|
|
499533
499540
|
try {
|
|
499534
|
-
const content = await
|
|
499541
|
+
const content = await readFile48(metaPath, { encoding: "utf-8" });
|
|
499535
499542
|
return jsonParse(content);
|
|
499536
499543
|
} catch {
|
|
499537
499544
|
return null;
|
|
@@ -501760,7 +501767,7 @@ import {
|
|
|
501760
501767
|
open as fsOpen2,
|
|
501761
501768
|
mkdir as mkdir42,
|
|
501762
501769
|
readdir as readdir31,
|
|
501763
|
-
readFile as
|
|
501770
|
+
readFile as readFile49,
|
|
501764
501771
|
stat as stat46,
|
|
501765
501772
|
unlink as unlink21,
|
|
501766
501773
|
writeFile as writeFile46
|
|
@@ -501813,7 +501820,7 @@ async function writeAgentMetadata(agentId, metadata) {
|
|
|
501813
501820
|
async function readAgentMetadata(agentId) {
|
|
501814
501821
|
const path21 = getAgentMetadataPath(agentId);
|
|
501815
501822
|
try {
|
|
501816
|
-
const raw = await
|
|
501823
|
+
const raw = await readFile49(path21, "utf-8");
|
|
501817
501824
|
return JSON.parse(raw);
|
|
501818
501825
|
} catch (e2) {
|
|
501819
501826
|
if (isFsInaccessible(e2))
|
|
@@ -501836,7 +501843,7 @@ async function writeRemoteAgentMetadata(taskId, metadata) {
|
|
|
501836
501843
|
async function readRemoteAgentMetadata(taskId) {
|
|
501837
501844
|
const path21 = getRemoteAgentMetadataPath(taskId);
|
|
501838
501845
|
try {
|
|
501839
|
-
const raw = await
|
|
501846
|
+
const raw = await readFile49(path21, "utf-8");
|
|
501840
501847
|
return JSON.parse(raw);
|
|
501841
501848
|
} catch (e2) {
|
|
501842
501849
|
if (isFsInaccessible(e2))
|
|
@@ -501869,7 +501876,7 @@ async function listRemoteAgentMetadata() {
|
|
|
501869
501876
|
if (!entry.isFile() || !entry.name.endsWith(".meta.json"))
|
|
501870
501877
|
continue;
|
|
501871
501878
|
try {
|
|
501872
|
-
const raw = await
|
|
501879
|
+
const raw = await readFile49(join137(dir, entry.name), "utf-8");
|
|
501873
501880
|
results.push(JSON.parse(raw));
|
|
501874
501881
|
} catch (e2) {
|
|
501875
501882
|
logForDebugging(`listRemoteAgentMetadata: skipping ${entry.name}: ${String(e2)}`);
|
|
@@ -502211,7 +502218,7 @@ class Project {
|
|
|
502211
502218
|
logForDebugging(`Skipping tombstone removal: session file too large (${formatFileSize(fileSize)})`, { level: "warn" });
|
|
502212
502219
|
return;
|
|
502213
502220
|
}
|
|
502214
|
-
const content = await
|
|
502221
|
+
const content = await readFile49(this.sessionFile, { encoding: "utf-8" });
|
|
502215
502222
|
const lines = content.split(`
|
|
502216
502223
|
`).filter((line) => {
|
|
502217
502224
|
if (!line.trim())
|
|
@@ -503232,7 +503239,7 @@ async function loadTranscriptFromFile(filePath) {
|
|
|
503232
503239
|
worktreeSession: worktreeStates.has(sessionId) ? worktreeStates.get(sessionId) : undefined
|
|
503233
503240
|
};
|
|
503234
503241
|
}
|
|
503235
|
-
const content = await
|
|
503242
|
+
const content = await readFile49(filePath, { encoding: "utf-8" });
|
|
503236
503243
|
let parsed;
|
|
503237
503244
|
try {
|
|
503238
503245
|
parsed = jsonParse(content);
|
|
@@ -503894,7 +503901,7 @@ async function loadTranscriptFile(filePath, opts) {
|
|
|
503894
503901
|
}
|
|
503895
503902
|
}
|
|
503896
503903
|
}
|
|
503897
|
-
buf ??= await
|
|
503904
|
+
buf ??= await readFile49(filePath);
|
|
503898
503905
|
if (!opts?.keepAllLeaves && !hasPreservedSegment && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP) && buf.length > SKIP_PRECOMPACT_THRESHOLD) {
|
|
503899
503906
|
buf = walkChainBeforeParse(buf);
|
|
503900
503907
|
}
|
|
@@ -511595,7 +511602,7 @@ import {
|
|
|
511595
511602
|
copyFile as copyFile9,
|
|
511596
511603
|
mkdir as mkdir44,
|
|
511597
511604
|
readdir as readdir32,
|
|
511598
|
-
readFile as
|
|
511605
|
+
readFile as readFile50,
|
|
511599
511606
|
stat as stat49,
|
|
511600
511607
|
symlink as symlink5,
|
|
511601
511608
|
utimes as utimes2
|
|
@@ -511775,7 +511782,7 @@ async function getOrCreateWorktree(repoRoot, slug, options2) {
|
|
|
511775
511782
|
async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
511776
511783
|
let includeContent;
|
|
511777
511784
|
try {
|
|
511778
|
-
includeContent = await
|
|
511785
|
+
includeContent = await readFile50(join142(repoRoot, ".worktreeinclude"), "utf-8");
|
|
511779
511786
|
} catch {
|
|
511780
511787
|
return [];
|
|
511781
511788
|
}
|
|
@@ -517345,7 +517352,7 @@ __export(exports_upstreamproxy, {
|
|
|
517345
517352
|
getUpstreamProxyEnv: () => getUpstreamProxyEnv,
|
|
517346
517353
|
SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
|
|
517347
517354
|
});
|
|
517348
|
-
import { mkdir as mkdir45, readFile as
|
|
517355
|
+
import { mkdir as mkdir45, readFile as readFile51, unlink as unlink23, writeFile as writeFile47 } from "fs/promises";
|
|
517349
517356
|
import { homedir as homedir33 } from "os";
|
|
517350
517357
|
import { join as join143 } from "path";
|
|
517351
517358
|
async function initUpstreamProxy(opts) {
|
|
@@ -517432,7 +517439,7 @@ function isValidPemContent(content) {
|
|
|
517432
517439
|
}
|
|
517433
517440
|
async function readToken(path21) {
|
|
517434
517441
|
try {
|
|
517435
|
-
const raw = await
|
|
517442
|
+
const raw = await readFile51(path21, "utf8");
|
|
517436
517443
|
return raw.trim() || null;
|
|
517437
517444
|
} catch (err2) {
|
|
517438
517445
|
if (isENOENT(err2))
|
|
@@ -517485,7 +517492,7 @@ async function downloadCaBundle(baseUrl, systemCaPath, outPath) {
|
|
|
517485
517492
|
logForDebugging(`[upstreamproxy] ca-cert response is not valid PEM; proxy disabled`, { level: "warn" });
|
|
517486
517493
|
return false;
|
|
517487
517494
|
}
|
|
517488
|
-
const systemCa = await
|
|
517495
|
+
const systemCa = await readFile51(systemCaPath, "utf8").catch(() => "");
|
|
517489
517496
|
await mkdir45(join143(outPath, ".."), { recursive: true });
|
|
517490
517497
|
await writeFile47(outPath, systemCa + `
|
|
517491
517498
|
` + ccrCa, "utf8");
|
|
@@ -521848,7 +521855,7 @@ function printStartupScreen(modelOverride) {
|
|
|
521848
521855
|
const sLen = ` ● ${sL} Ready — type /help to begin`.length;
|
|
521849
521856
|
out.push(boxRow(sRow, W2, sLen, BORDER));
|
|
521850
521857
|
out.push(`${ansiRgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET2}`);
|
|
521851
|
-
out.push(` ${DIM2}${ansiRgb(...DIMCOL)}openclaude ${RESET2}${ansiRgb(...ACCENT)}v${"0.14.
|
|
521858
|
+
out.push(` ${DIM2}${ansiRgb(...DIMCOL)}openclaude ${RESET2}${ansiRgb(...ACCENT)}v${"0.14.6"}${RESET2}`);
|
|
521852
521859
|
out.push("");
|
|
521853
521860
|
process.stdout.write(out.join(`
|
|
521854
521861
|
`) + `
|
|
@@ -567825,7 +567832,7 @@ var init_cronJitterConfig = __esm(() => {
|
|
|
567825
567832
|
});
|
|
567826
567833
|
|
|
567827
567834
|
// src/utils/cronTasksLock.ts
|
|
567828
|
-
import { mkdir as mkdir48, readFile as
|
|
567835
|
+
import { mkdir as mkdir48, readFile as readFile52, unlink as unlink26, writeFile as writeFile50 } from "fs/promises";
|
|
567829
567836
|
import { dirname as dirname64, join as join155 } from "path";
|
|
567830
567837
|
function getLockPath(dir) {
|
|
567831
567838
|
return join155(dir ?? getProjectRoot(), LOCK_FILE_REL);
|
|
@@ -567833,7 +567840,7 @@ function getLockPath(dir) {
|
|
|
567833
567840
|
async function readLock(dir) {
|
|
567834
567841
|
let raw;
|
|
567835
567842
|
try {
|
|
567836
|
-
raw = await
|
|
567843
|
+
raw = await readFile52(getLockPath(dir), "utf8");
|
|
567837
567844
|
} catch {
|
|
567838
567845
|
return;
|
|
567839
567846
|
}
|
|
@@ -573159,7 +573166,7 @@ function WelcomeV2() {
|
|
|
573159
573166
|
dimColor: true,
|
|
573160
573167
|
children: [
|
|
573161
573168
|
"v",
|
|
573162
|
-
"0.14.
|
|
573169
|
+
"0.14.6",
|
|
573163
573170
|
" "
|
|
573164
573171
|
]
|
|
573165
573172
|
}, undefined, true, undefined, this)
|
|
@@ -573359,7 +573366,7 @@ function WelcomeV2() {
|
|
|
573359
573366
|
dimColor: true,
|
|
573360
573367
|
children: [
|
|
573361
573368
|
"v",
|
|
573362
|
-
"0.14.
|
|
573369
|
+
"0.14.6",
|
|
573363
573370
|
" "
|
|
573364
573371
|
]
|
|
573365
573372
|
}, undefined, true, undefined, this)
|
|
@@ -573585,7 +573592,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
573585
573592
|
dimColor: true,
|
|
573586
573593
|
children: [
|
|
573587
573594
|
"v",
|
|
573588
|
-
"0.14.
|
|
573595
|
+
"0.14.6",
|
|
573589
573596
|
" "
|
|
573590
573597
|
]
|
|
573591
573598
|
}, undefined, true, undefined, this);
|
|
@@ -573839,7 +573846,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
573839
573846
|
dimColor: true,
|
|
573840
573847
|
children: [
|
|
573841
573848
|
"v",
|
|
573842
|
-
"0.14.
|
|
573849
|
+
"0.14.6",
|
|
573843
573850
|
" "
|
|
573844
573851
|
]
|
|
573845
573852
|
}, undefined, true, undefined, this);
|
|
@@ -580883,7 +580890,7 @@ __export(exports_claudeDesktop, {
|
|
|
580883
580890
|
readClaudeDesktopMcpServers: () => readClaudeDesktopMcpServers,
|
|
580884
580891
|
getClaudeDesktopConfigPath: () => getClaudeDesktopConfigPath
|
|
580885
580892
|
});
|
|
580886
|
-
import { readdir as readdir34, readFile as
|
|
580893
|
+
import { readdir as readdir34, readFile as readFile53, stat as stat55 } from "fs/promises";
|
|
580887
580894
|
import { homedir as homedir41 } from "os";
|
|
580888
580895
|
import { join as join159 } from "path";
|
|
580889
580896
|
async function getClaudeDesktopConfigPath() {
|
|
@@ -580931,7 +580938,7 @@ async function readClaudeDesktopMcpServers() {
|
|
|
580931
580938
|
const configPath = await getClaudeDesktopConfigPath();
|
|
580932
580939
|
let configContent;
|
|
580933
580940
|
try {
|
|
580934
|
-
configContent = await
|
|
580941
|
+
configContent = await readFile53(configPath, { encoding: "utf8" });
|
|
580935
580942
|
} catch (e2) {
|
|
580936
580943
|
const code = getErrnoCode2(e2);
|
|
580937
580944
|
if (code === "ENOENT") {
|
|
@@ -584281,11 +584288,11 @@ var init_sessionUrl = __esm(() => {
|
|
|
584281
584288
|
});
|
|
584282
584289
|
|
|
584283
584290
|
// src/utils/plugins/zipCacheAdapters.ts
|
|
584284
|
-
import { readFile as
|
|
584291
|
+
import { readFile as readFile54 } from "fs/promises";
|
|
584285
584292
|
import { join as join161 } from "path";
|
|
584286
584293
|
async function readZipCacheKnownMarketplaces() {
|
|
584287
584294
|
try {
|
|
584288
|
-
const content = await
|
|
584295
|
+
const content = await readFile54(getZipCacheKnownMarketplacesPath(), "utf-8");
|
|
584289
584296
|
const parsed = KnownMarketplacesFileSchema().safeParse(jsonParse(content));
|
|
584290
584297
|
if (!parsed.success) {
|
|
584291
584298
|
logForDebugging(`Invalid known_marketplaces.json in zip cache: ${parsed.error.message}`, { level: "error" });
|
|
@@ -584318,7 +584325,7 @@ async function readMarketplaceJsonContent(dir) {
|
|
|
584318
584325
|
];
|
|
584319
584326
|
for (const candidate of candidates) {
|
|
584320
584327
|
try {
|
|
584321
|
-
return await
|
|
584328
|
+
return await readFile54(candidate, "utf-8");
|
|
584322
584329
|
} catch {}
|
|
584323
584330
|
}
|
|
584324
584331
|
return null;
|
|
@@ -584771,7 +584778,7 @@ __export(exports_bridgePointer, {
|
|
|
584771
584778
|
clearBridgePointer: () => clearBridgePointer,
|
|
584772
584779
|
BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
|
|
584773
584780
|
});
|
|
584774
|
-
import { mkdir as mkdir50, readFile as
|
|
584781
|
+
import { mkdir as mkdir50, readFile as readFile55, stat as stat57, unlink as unlink27, writeFile as writeFile54 } from "fs/promises";
|
|
584775
584782
|
import { dirname as dirname68, join as join162 } from "path";
|
|
584776
584783
|
function getBridgePointerPath(dir) {
|
|
584777
584784
|
return join162(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
|
|
@@ -584792,7 +584799,7 @@ async function readBridgePointer(dir) {
|
|
|
584792
584799
|
let mtimeMs;
|
|
584793
584800
|
try {
|
|
584794
584801
|
mtimeMs = (await stat57(path24)).mtimeMs;
|
|
584795
|
-
raw = await
|
|
584802
|
+
raw = await readFile55(path24, "utf8");
|
|
584796
584803
|
} catch {
|
|
584797
584804
|
return null;
|
|
584798
584805
|
}
|
|
@@ -586802,7 +586809,7 @@ __export(exports_print, {
|
|
|
586802
586809
|
createCanUseToolWithPermissionPrompt: () => createCanUseToolWithPermissionPrompt,
|
|
586803
586810
|
canBatchWith: () => canBatchWith
|
|
586804
586811
|
});
|
|
586805
|
-
import { readFile as
|
|
586812
|
+
import { readFile as readFile56, stat as stat58 } from "fs/promises";
|
|
586806
586813
|
import { dirname as dirname69 } from "path";
|
|
586807
586814
|
import { cwd as cwd3 } from "process";
|
|
586808
586815
|
import { randomUUID as randomUUID54 } from "crypto";
|
|
@@ -588175,7 +588182,7 @@ ${m.text}
|
|
|
588175
588182
|
const normalizedPath = expandPath(message.request.path);
|
|
588176
588183
|
const diskMtime = Math.floor((await stat58(normalizedPath)).mtimeMs);
|
|
588177
588184
|
if (diskMtime <= message.request.mtime) {
|
|
588178
|
-
const raw = await
|
|
588185
|
+
const raw = await readFile56(normalizedPath, "utf-8");
|
|
588179
588186
|
const content = (raw.charCodeAt(0) === 65279 ? raw.slice(1) : raw).replaceAll(`\r
|
|
588180
588187
|
`, `
|
|
588181
588188
|
`);
|
|
@@ -591384,7 +591391,7 @@ __export(exports_update, {
|
|
|
591384
591391
|
async function update() {
|
|
591385
591392
|
if (getAPIProvider() !== "firstParty") {
|
|
591386
591393
|
writeToStdout(source_default.yellow(`Auto-update is not available for third-party provider builds.
|
|
591387
|
-
`) + `Current version: ${"0.14.
|
|
591394
|
+
`) + `Current version: ${"0.14.6"}
|
|
591388
591395
|
|
|
591389
591396
|
` + `To update, reinstall from npm:
|
|
591390
591397
|
` + source_default.bold(` npm install -g ${"@makerbi/openclaude"}@latest`) + `
|
|
@@ -591395,7 +591402,7 @@ async function update() {
|
|
|
591395
591402
|
await gracefulShutdown(0);
|
|
591396
591403
|
}
|
|
591397
591404
|
logEvent("tengu_update_check", {});
|
|
591398
|
-
writeToStdout(`Current version: ${"0.14.
|
|
591405
|
+
writeToStdout(`Current version: ${"0.14.6"}
|
|
591399
591406
|
`);
|
|
591400
591407
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
591401
591408
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -591480,8 +591487,8 @@ async function update() {
|
|
|
591480
591487
|
writeToStdout(`Claude is managed by Homebrew.
|
|
591481
591488
|
`);
|
|
591482
591489
|
const latest = await getLatestVersion(channel);
|
|
591483
|
-
if (latest && !gte("0.14.
|
|
591484
|
-
writeToStdout(`Update available: ${"0.14.
|
|
591490
|
+
if (latest && !gte("0.14.6", latest)) {
|
|
591491
|
+
writeToStdout(`Update available: ${"0.14.6"} → ${latest}
|
|
591485
591492
|
`);
|
|
591486
591493
|
writeToStdout(`
|
|
591487
591494
|
`);
|
|
@@ -591497,8 +591504,8 @@ async function update() {
|
|
|
591497
591504
|
writeToStdout(`Claude is managed by winget.
|
|
591498
591505
|
`);
|
|
591499
591506
|
const latest = await getLatestVersion(channel);
|
|
591500
|
-
if (latest && !gte("0.14.
|
|
591501
|
-
writeToStdout(`Update available: ${"0.14.
|
|
591507
|
+
if (latest && !gte("0.14.6", latest)) {
|
|
591508
|
+
writeToStdout(`Update available: ${"0.14.6"} → ${latest}
|
|
591502
591509
|
`);
|
|
591503
591510
|
writeToStdout(`
|
|
591504
591511
|
`);
|
|
@@ -591514,8 +591521,8 @@ async function update() {
|
|
|
591514
591521
|
writeToStdout(`Claude is managed by apk.
|
|
591515
591522
|
`);
|
|
591516
591523
|
const latest = await getLatestVersion(channel);
|
|
591517
|
-
if (latest && !gte("0.14.
|
|
591518
|
-
writeToStdout(`Update available: ${"0.14.
|
|
591524
|
+
if (latest && !gte("0.14.6", latest)) {
|
|
591525
|
+
writeToStdout(`Update available: ${"0.14.6"} → ${latest}
|
|
591519
591526
|
`);
|
|
591520
591527
|
writeToStdout(`
|
|
591521
591528
|
`);
|
|
@@ -591580,11 +591587,11 @@ async function update() {
|
|
|
591580
591587
|
`);
|
|
591581
591588
|
await gracefulShutdown(1);
|
|
591582
591589
|
}
|
|
591583
|
-
if (result.latestVersion === "0.14.
|
|
591584
|
-
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.
|
|
591590
|
+
if (result.latestVersion === "0.14.6") {
|
|
591591
|
+
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.6"})`) + `
|
|
591585
591592
|
`);
|
|
591586
591593
|
} else {
|
|
591587
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.14.
|
|
591594
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.14.6"} to version ${result.latestVersion}`) + `
|
|
591588
591595
|
`);
|
|
591589
591596
|
await regenerateCompletionCache();
|
|
591590
591597
|
}
|
|
@@ -591644,12 +591651,12 @@ async function update() {
|
|
|
591644
591651
|
`);
|
|
591645
591652
|
await gracefulShutdown(1);
|
|
591646
591653
|
}
|
|
591647
|
-
if (latestVersion === "0.14.
|
|
591648
|
-
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.
|
|
591654
|
+
if (latestVersion === "0.14.6") {
|
|
591655
|
+
writeToStdout(source_default.green(`OpenClaude is up to date (${"0.14.6"})`) + `
|
|
591649
591656
|
`);
|
|
591650
591657
|
await gracefulShutdown(0);
|
|
591651
591658
|
}
|
|
591652
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.14.
|
|
591659
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.14.6"})
|
|
591653
591660
|
`);
|
|
591654
591661
|
writeToStdout(`Installing update...
|
|
591655
591662
|
`);
|
|
@@ -591694,7 +591701,7 @@ async function update() {
|
|
|
591694
591701
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
591695
591702
|
switch (status2) {
|
|
591696
591703
|
case "success":
|
|
591697
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.14.
|
|
591704
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.14.6"} to version ${latestVersion}`) + `
|
|
591698
591705
|
`);
|
|
591699
591706
|
await regenerateCompletionCache();
|
|
591700
591707
|
break;
|
|
@@ -593747,7 +593754,7 @@ Usage: openclaude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
593747
593754
|
pendingHookMessages
|
|
593748
593755
|
}, renderAndRun);
|
|
593749
593756
|
}
|
|
593750
|
-
}).version("0.14.
|
|
593757
|
+
}).version("0.14.6 (OpenClaude)", "-v, --version", "Output the version number");
|
|
593751
593758
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
593752
593759
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
593753
593760
|
if (canUserConfigureAdvisor()) {
|
|
@@ -594324,7 +594331,7 @@ if (false) {}
|
|
|
594324
594331
|
async function main2() {
|
|
594325
594332
|
const args = process.argv.slice(2);
|
|
594326
594333
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
594327
|
-
console.log(`${"0.14.
|
|
594334
|
+
console.log(`${"0.14.6"} (OpenClaude)`);
|
|
594328
594335
|
return;
|
|
594329
594336
|
}
|
|
594330
594337
|
if (args.includes("--provider")) {
|
|
@@ -594477,4 +594484,4 @@ async function main2() {
|
|
|
594477
594484
|
}
|
|
594478
594485
|
main2();
|
|
594479
594486
|
|
|
594480
|
-
//# debugId=
|
|
594487
|
+
//# debugId=6B9F960D7519E6B964756E2164756E21
|
package/dist/sdk.mjs
CHANGED
|
@@ -35454,7 +35454,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
35454
35454
|
if (!isAttributionHeaderEnabled()) {
|
|
35455
35455
|
return "";
|
|
35456
35456
|
}
|
|
35457
|
-
const version = `${"0.14.
|
|
35457
|
+
const version = `${"0.14.6"}.${fingerprint}`;
|
|
35458
35458
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
35459
35459
|
const cch = "";
|
|
35460
35460
|
const workload = getWorkload();
|
|
@@ -110698,7 +110698,7 @@ var init_metadata = __esm(() => {
|
|
|
110698
110698
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
110699
110699
|
WHITESPACE_REGEX = /\s+/;
|
|
110700
110700
|
getVersionBase = memoize_default(() => {
|
|
110701
|
-
const match = "0.14.
|
|
110701
|
+
const match = "0.14.6".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
110702
110702
|
return match ? match[0] : undefined;
|
|
110703
110703
|
});
|
|
110704
110704
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -110738,9 +110738,9 @@ var init_metadata = __esm(() => {
|
|
|
110738
110738
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
110739
110739
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
110740
110740
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
110741
|
-
version: "0.14.
|
|
110741
|
+
version: "0.14.6",
|
|
110742
110742
|
versionBase: getVersionBase(),
|
|
110743
|
-
buildTime: "2026-05-
|
|
110743
|
+
buildTime: "2026-05-26T08:05:20.326Z",
|
|
110744
110744
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
110745
110745
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
110746
110746
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -118949,7 +118949,7 @@ var init_effort = __esm(() => {
|
|
|
118949
118949
|
|
|
118950
118950
|
// src/utils/userAgent.ts
|
|
118951
118951
|
function getClaudeCodeUserAgent() {
|
|
118952
|
-
return `claude-code/${"0.14.
|
|
118952
|
+
return `claude-code/${"0.14.6"}`;
|
|
118953
118953
|
}
|
|
118954
118954
|
|
|
118955
118955
|
// src/utils/http.ts
|
|
@@ -118958,7 +118958,7 @@ function getUserAgent() {
|
|
|
118958
118958
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
118959
118959
|
const workload = getWorkload();
|
|
118960
118960
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
118961
|
-
return `claude-cli/${"0.14.
|
|
118961
|
+
return `claude-cli/${"0.14.6"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
118962
118962
|
}
|
|
118963
118963
|
function getMCPUserAgent() {
|
|
118964
118964
|
const parts = [];
|
|
@@ -118972,7 +118972,7 @@ function getMCPUserAgent() {
|
|
|
118972
118972
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
118973
118973
|
}
|
|
118974
118974
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
118975
|
-
return `claude-code/${"0.14.
|
|
118975
|
+
return `claude-code/${"0.14.6"}${suffix}`;
|
|
118976
118976
|
}
|
|
118977
118977
|
function getWebFetchUserAgent() {
|
|
118978
118978
|
const supportUrl = getAPIProvider() === "firstParty" ? "https://support.anthropic.com/" : "https://github.com/AndersonBY/openclaude";
|
|
@@ -154378,7 +154378,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
154378
154378
|
}
|
|
154379
154379
|
function computeFingerprintFromMessages(messages) {
|
|
154380
154380
|
const firstMessageText = extractFirstMessageText(messages);
|
|
154381
|
-
return computeFingerprint(firstMessageText, "0.14.
|
|
154381
|
+
return computeFingerprint(firstMessageText, "0.14.6");
|
|
154382
154382
|
}
|
|
154383
154383
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
154384
154384
|
var init_fingerprint = () => {};
|
|
@@ -154420,7 +154420,7 @@ async function sideQuery(opts) {
|
|
|
154420
154420
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
154421
154421
|
}
|
|
154422
154422
|
const messageText = extractFirstUserMessageText(messages);
|
|
154423
|
-
const fingerprint = computeFingerprint(messageText, "0.14.
|
|
154423
|
+
const fingerprint = computeFingerprint(messageText, "0.14.6");
|
|
154424
154424
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
154425
154425
|
const systemBlocks = [
|
|
154426
154426
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -155665,7 +155665,7 @@ var init_client2 = __esm(() => {
|
|
|
155665
155665
|
const client = new Client({
|
|
155666
155666
|
name: "claude-code",
|
|
155667
155667
|
title: "OpenClaude",
|
|
155668
|
-
version: "0.14.
|
|
155668
|
+
version: "0.14.6",
|
|
155669
155669
|
description: "OpenClaude — coding-agent CLI for any LLM provider",
|
|
155670
155670
|
websiteUrl: PRODUCT_URL
|
|
155671
155671
|
}, {
|
|
@@ -230973,7 +230973,7 @@ function getAnthropicEnvMetadata() {
|
|
|
230973
230973
|
function getBuildAgeMinutes() {
|
|
230974
230974
|
if (false)
|
|
230975
230975
|
;
|
|
230976
|
-
const buildTime = new Date("2026-05-
|
|
230976
|
+
const buildTime = new Date("2026-05-26T08:05:20.326Z").getTime();
|
|
230977
230977
|
if (isNaN(buildTime))
|
|
230978
230978
|
return;
|
|
230979
230979
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -264876,7 +264876,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
264876
264876
|
init_settings2();
|
|
264877
264877
|
init_slowOperations();
|
|
264878
264878
|
init_uuid();
|
|
264879
|
-
VERSION3 = typeof MACRO !== "undefined" ? "0.14.
|
|
264879
|
+
VERSION3 = typeof MACRO !== "undefined" ? "0.14.6" : "unknown";
|
|
264880
264880
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
264881
264881
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
264882
264882
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -266178,7 +266178,7 @@ var init_filesystem = __esm(() => {
|
|
|
266178
266178
|
});
|
|
266179
266179
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
266180
266180
|
const nonce = randomBytes7(16).toString("hex");
|
|
266181
|
-
return join80(getClaudeTempDir(), "bundled-skills", "0.14.
|
|
266181
|
+
return join80(getClaudeTempDir(), "bundled-skills", "0.14.6", nonce);
|
|
266182
266182
|
});
|
|
266183
266183
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
266184
266184
|
});
|
|
@@ -281352,7 +281352,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
281352
281352
|
slash_commands: inputs.commands.filter((c7) => c7.userInvocable !== false).map((c7) => c7.name),
|
|
281353
281353
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
281354
281354
|
betas: getSdkBetas2(),
|
|
281355
|
-
claude_code_version: "0.14.
|
|
281355
|
+
claude_code_version: "0.14.6",
|
|
281356
281356
|
output_style: outputStyle,
|
|
281357
281357
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
281358
281358
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -285404,4 +285404,4 @@ export {
|
|
|
285404
285404
|
AbortError
|
|
285405
285405
|
};
|
|
285406
285406
|
|
|
285407
|
-
//# debugId=
|
|
285407
|
+
//# debugId=D3AA7C2C0BCBDD7064756E2164756E21
|