@costrict/csc 4.2.22 → 4.2.24
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.js +307 -112
- package/dist/services/rawDump/batchWorker.js +24 -16
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -66713,8 +66713,8 @@ function getClientVersion() {
|
|
|
66713
66713
|
if (cached)
|
|
66714
66714
|
return cached;
|
|
66715
66715
|
try {
|
|
66716
|
-
if ("4.2.
|
|
66717
|
-
cached = "4.2.
|
|
66716
|
+
if ("4.2.24") {
|
|
66717
|
+
cached = "4.2.24";
|
|
66718
66718
|
return cached;
|
|
66719
66719
|
}
|
|
66720
66720
|
} catch {}
|
|
@@ -90538,17 +90538,20 @@ __export(exports_windowsPaths, {
|
|
|
90538
90538
|
});
|
|
90539
90539
|
import { existsSync as existsSync4 } from "fs";
|
|
90540
90540
|
import * as pathWin32 from "path/win32";
|
|
90541
|
-
function
|
|
90541
|
+
function isNonGitBash(candidatePath) {
|
|
90542
90542
|
const lower = candidatePath.toLowerCase();
|
|
90543
|
-
|
|
90543
|
+
if (!lower.endsWith("\\bash.exe")) {
|
|
90544
|
+
return false;
|
|
90545
|
+
}
|
|
90546
|
+
return lower.includes("\\windows\\system32\\") || lower.includes("\\windows\\syswow64\\") || lower.includes("\\windowsapps\\") || lower.includes("\\cygwin\\") || lower.includes("\\cygwin64\\");
|
|
90544
90547
|
}
|
|
90545
90548
|
function findExecutableWithDeps(executable, deps) {
|
|
90546
90549
|
try {
|
|
90547
90550
|
const paths2 = deps.execCommand(`where.exe ${executable}`).split(/\r?\n/u).map((candidate) => candidate.trim()).filter(Boolean);
|
|
90548
90551
|
const cwd2 = pathWin32.resolve(deps.cwdFn()).toLowerCase();
|
|
90549
90552
|
for (const candidatePath of paths2) {
|
|
90550
|
-
if (executable === "bash" &&
|
|
90551
|
-
logForDebugging(`Skipping
|
|
90553
|
+
if (executable === "bash" && isNonGitBash(candidatePath)) {
|
|
90554
|
+
logForDebugging(`Skipping non-Git bash launcher (incompatible with Windows paths): ${candidatePath}`);
|
|
90552
90555
|
continue;
|
|
90553
90556
|
}
|
|
90554
90557
|
const candidateDirectory = pathWin32.dirname(pathWin32.resolve(candidatePath)).toLowerCase();
|
|
@@ -90580,10 +90583,6 @@ function findGitBashPathOrNullWithDeps(deps = DEFAULT_DEPS) {
|
|
|
90580
90583
|
if (envOverride) {
|
|
90581
90584
|
return deps.checkExists(envOverride) ? envOverride : null;
|
|
90582
90585
|
}
|
|
90583
|
-
const bashPath = findExecutableWithDeps("bash", deps);
|
|
90584
|
-
if (bashPath && deps.checkExists(bashPath)) {
|
|
90585
|
-
return bashPath;
|
|
90586
|
-
}
|
|
90587
90586
|
const gitPath = findExecutableWithDeps("git", deps);
|
|
90588
90587
|
if (gitPath) {
|
|
90589
90588
|
const candidates = [
|
|
@@ -90591,11 +90590,20 @@ function findGitBashPathOrNullWithDeps(deps = DEFAULT_DEPS) {
|
|
|
90591
90590
|
pathWin32.join(gitPath, "..", "..", "usr", "bin", "bash.exe"),
|
|
90592
90591
|
pathWin32.join(gitPath, "..", "bash.exe")
|
|
90593
90592
|
];
|
|
90594
|
-
const derivedPath = candidates.find(
|
|
90593
|
+
const derivedPath = candidates.find((candidate) => {
|
|
90594
|
+
if (isNonGitBash(candidate)) {
|
|
90595
|
+
return false;
|
|
90596
|
+
}
|
|
90597
|
+
return deps.checkExists(candidate);
|
|
90598
|
+
});
|
|
90595
90599
|
if (derivedPath) {
|
|
90596
90600
|
return derivedPath;
|
|
90597
90601
|
}
|
|
90598
90602
|
}
|
|
90603
|
+
const bashPath = findExecutableWithDeps("bash", deps);
|
|
90604
|
+
if (bashPath && deps.checkExists(bashPath)) {
|
|
90605
|
+
return bashPath;
|
|
90606
|
+
}
|
|
90599
90607
|
return findCommonGitBashPath(deps.checkExists, deps.userProfile);
|
|
90600
90608
|
}
|
|
90601
90609
|
function setShellIfWindows() {
|
|
@@ -220495,7 +220503,7 @@ async function fetchCoStrictModels(baseUrl, accessToken) {
|
|
|
220495
220503
|
headers: {
|
|
220496
220504
|
Authorization: `Bearer ${accessToken}`,
|
|
220497
220505
|
Accept: "application/json",
|
|
220498
|
-
"User-Agent": `csc/${"4.2.
|
|
220506
|
+
"User-Agent": `csc/${"4.2.24"}`
|
|
220499
220507
|
},
|
|
220500
220508
|
signal: controller.signal
|
|
220501
220509
|
});
|
|
@@ -222532,7 +222540,7 @@ var init_auth7 = __esm(() => {
|
|
|
222532
222540
|
|
|
222533
222541
|
// src/utils/userAgent.ts
|
|
222534
222542
|
function getClaudeCodeUserAgent() {
|
|
222535
|
-
return `costrict/${"4.2.
|
|
222543
|
+
return `costrict/${"4.2.24"}`;
|
|
222536
222544
|
}
|
|
222537
222545
|
|
|
222538
222546
|
// src/utils/workloadContext.ts
|
|
@@ -222554,7 +222562,7 @@ function getUserAgent() {
|
|
|
222554
222562
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
222555
222563
|
const workload = getWorkload();
|
|
222556
222564
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
222557
|
-
return `csc/${"4.2.
|
|
222565
|
+
return `csc/${"4.2.24"}`;
|
|
222558
222566
|
}
|
|
222559
222567
|
function getMCPUserAgent() {
|
|
222560
222568
|
const parts = [];
|
|
@@ -222568,7 +222576,7 @@ function getMCPUserAgent() {
|
|
|
222568
222576
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
222569
222577
|
}
|
|
222570
222578
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
222571
|
-
return `csc/${"4.2.
|
|
222579
|
+
return `csc/${"4.2.24"}${suffix}`;
|
|
222572
222580
|
}
|
|
222573
222581
|
function getWebFetchUserAgent() {
|
|
222574
222582
|
return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
|
|
@@ -222688,7 +222696,7 @@ var init_user = __esm(() => {
|
|
|
222688
222696
|
deviceId,
|
|
222689
222697
|
sessionId: getSessionId(),
|
|
222690
222698
|
email: getEmail(),
|
|
222691
|
-
appVersion: "4.2.
|
|
222699
|
+
appVersion: "4.2.24",
|
|
222692
222700
|
platform: getHostPlatformForAnalytics(),
|
|
222693
222701
|
organizationUuid,
|
|
222694
222702
|
accountUuid,
|
|
@@ -233736,7 +233744,7 @@ var init_metadata = __esm(() => {
|
|
|
233736
233744
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
233737
233745
|
WHITESPACE_REGEX = /\s+/;
|
|
233738
233746
|
getVersionBase = memoize_default(() => {
|
|
233739
|
-
const match = "4.2.
|
|
233747
|
+
const match = "4.2.24".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
233740
233748
|
return match ? match[0] : undefined;
|
|
233741
233749
|
});
|
|
233742
233750
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -233776,9 +233784,9 @@ var init_metadata = __esm(() => {
|
|
|
233776
233784
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
233777
233785
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
233778
233786
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
233779
|
-
version: "4.2.
|
|
233787
|
+
version: "4.2.24",
|
|
233780
233788
|
versionBase: getVersionBase(),
|
|
233781
|
-
buildTime: "2026-08-
|
|
233789
|
+
buildTime: "2026-08-04T09:20:56.936Z",
|
|
233782
233790
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
233783
233791
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
233784
233792
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -234449,7 +234457,7 @@ function initialize1PEventLogging() {
|
|
|
234449
234457
|
const platform3 = getPlatform();
|
|
234450
234458
|
const attributes = {
|
|
234451
234459
|
[import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
|
|
234452
|
-
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.
|
|
234460
|
+
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.24"
|
|
234453
234461
|
};
|
|
234454
234462
|
if (platform3 === "wsl") {
|
|
234455
234463
|
const wslVersion = getWslVersion();
|
|
@@ -234476,7 +234484,7 @@ function initialize1PEventLogging() {
|
|
|
234476
234484
|
})
|
|
234477
234485
|
]
|
|
234478
234486
|
});
|
|
234479
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.
|
|
234487
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.24");
|
|
234480
234488
|
}
|
|
234481
234489
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
234482
234490
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -434494,7 +434502,7 @@ function getTelemetryAttributes() {
|
|
|
434494
434502
|
attributes["session.id"] = sessionId;
|
|
434495
434503
|
}
|
|
434496
434504
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
434497
|
-
attributes["app.version"] = "4.2.
|
|
434505
|
+
attributes["app.version"] = "4.2.24";
|
|
434498
434506
|
}
|
|
434499
434507
|
const oauthAccount = getOauthAccountInfo();
|
|
434500
434508
|
if (oauthAccount) {
|
|
@@ -468014,7 +468022,7 @@ function initLangfuse() {
|
|
|
468014
468022
|
flushInterval: parseInt(process.env.LANGFUSE_FLUSH_INTERVAL ?? "10", 10),
|
|
468015
468023
|
mask: maskFn,
|
|
468016
468024
|
environment: process.env.LANGFUSE_TRACING_ENVIRONMENT ?? "development",
|
|
468017
|
-
release: "4.2.
|
|
468025
|
+
release: "4.2.24",
|
|
468018
468026
|
exportMode: process.env.LANGFUSE_EXPORT_MODE ?? "batched",
|
|
468019
468027
|
timeout: parseInt(process.env.LANGFUSE_TIMEOUT ?? "5", 10)
|
|
468020
468028
|
});
|
|
@@ -499914,7 +499922,7 @@ function initSentry() {
|
|
|
499914
499922
|
}
|
|
499915
499923
|
init3({
|
|
499916
499924
|
dsn,
|
|
499917
|
-
release: typeof MACRO !== "undefined" ? "4.2.
|
|
499925
|
+
release: typeof MACRO !== "undefined" ? "4.2.24" : undefined,
|
|
499918
499926
|
environment: typeof BUILD_ENV !== "undefined" ? BUILD_ENV : "production",
|
|
499919
499927
|
maxBreadcrumbs: 20,
|
|
499920
499928
|
sampleRate: 1,
|
|
@@ -527811,7 +527819,7 @@ async function initializeBetaTracing(resource) {
|
|
|
527811
527819
|
});
|
|
527812
527820
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
527813
527821
|
setLoggerProvider(loggerProvider);
|
|
527814
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.
|
|
527822
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.24");
|
|
527815
527823
|
setEventLogger(eventLogger);
|
|
527816
527824
|
process.on("beforeExit", async () => {
|
|
527817
527825
|
await loggerProvider?.forceFlush();
|
|
@@ -527851,7 +527859,7 @@ async function initializeTelemetry() {
|
|
|
527851
527859
|
const platform5 = getPlatform();
|
|
527852
527860
|
const baseAttributes = {
|
|
527853
527861
|
[import_semantic_conventions29.ATTR_SERVICE_NAME]: "claude-code",
|
|
527854
|
-
[import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.
|
|
527862
|
+
[import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.24"
|
|
527855
527863
|
};
|
|
527856
527864
|
if (platform5 === "wsl") {
|
|
527857
527865
|
const wslVersion = getWslVersion();
|
|
@@ -527896,7 +527904,7 @@ async function initializeTelemetry() {
|
|
|
527896
527904
|
} catch {}
|
|
527897
527905
|
};
|
|
527898
527906
|
registerCleanup(shutdownTelemetry2);
|
|
527899
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.
|
|
527907
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.24");
|
|
527900
527908
|
}
|
|
527901
527909
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
527902
527910
|
resource,
|
|
@@ -527916,7 +527924,7 @@ async function initializeTelemetry() {
|
|
|
527916
527924
|
});
|
|
527917
527925
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
527918
527926
|
setLoggerProvider(loggerProvider);
|
|
527919
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.
|
|
527927
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.24");
|
|
527920
527928
|
setEventLogger(eventLogger);
|
|
527921
527929
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
527922
527930
|
process.on("beforeExit", async () => {
|
|
@@ -527978,7 +527986,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
527978
527986
|
}
|
|
527979
527987
|
};
|
|
527980
527988
|
registerCleanup(shutdownTelemetry);
|
|
527981
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "4.2.
|
|
527989
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "4.2.24");
|
|
527982
527990
|
}
|
|
527983
527991
|
async function flushTelemetry() {
|
|
527984
527992
|
const meterProvider = getMeterProvider();
|
|
@@ -529037,7 +529045,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
529037
529045
|
logError3(new AutoUpdaterError("Another process is currently installing an update"));
|
|
529038
529046
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
529039
529047
|
pid: process.pid,
|
|
529040
|
-
currentVersion: "4.2.
|
|
529048
|
+
currentVersion: "4.2.24"
|
|
529041
529049
|
});
|
|
529042
529050
|
return { status: "in_progress" };
|
|
529043
529051
|
}
|
|
@@ -529046,7 +529054,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
529046
529054
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
529047
529055
|
logError3(new Error("Windows NPM detected in WSL environment"));
|
|
529048
529056
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
529049
|
-
currentVersion: "4.2.
|
|
529057
|
+
currentVersion: "4.2.24"
|
|
529050
529058
|
});
|
|
529051
529059
|
return {
|
|
529052
529060
|
status: "install_failed",
|
|
@@ -529592,7 +529600,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
529592
529600
|
}
|
|
529593
529601
|
async function getDoctorDiagnostic() {
|
|
529594
529602
|
const installationType = await getCurrentInstallationType();
|
|
529595
|
-
const version9 = typeof MACRO !== "undefined" ? "4.2.
|
|
529603
|
+
const version9 = typeof MACRO !== "undefined" ? "4.2.24" : "unknown";
|
|
529596
529604
|
const installationPath = await getInstallationPath();
|
|
529597
529605
|
const invokedBinary = getInvokedBinary();
|
|
529598
529606
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -567779,7 +567787,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
567779
567787
|
const client10 = new Client3({
|
|
567780
567788
|
name: "claude-code",
|
|
567781
567789
|
title: "CoStrict",
|
|
567782
|
-
version: "4.2.
|
|
567790
|
+
version: "4.2.24",
|
|
567783
567791
|
description: "CoStrict agentic coding tool",
|
|
567784
567792
|
websiteUrl: PRODUCT_URL
|
|
567785
567793
|
}, {
|
|
@@ -568150,7 +568158,7 @@ var init_client18 = __esm(() => {
|
|
|
568150
568158
|
const client10 = new Client3({
|
|
568151
568159
|
name: "claude-code",
|
|
568152
568160
|
title: "CoStrict",
|
|
568153
|
-
version: "4.2.
|
|
568161
|
+
version: "4.2.24",
|
|
568154
568162
|
description: "CoStrict agentic coding tool",
|
|
568155
568163
|
websiteUrl: PRODUCT_URL
|
|
568156
568164
|
}, {
|
|
@@ -569540,7 +569548,7 @@ function getInstallationEnv() {
|
|
|
569540
569548
|
return;
|
|
569541
569549
|
}
|
|
569542
569550
|
function getClaudeCodeVersion() {
|
|
569543
|
-
return "4.2.
|
|
569551
|
+
return "4.2.24";
|
|
569544
569552
|
}
|
|
569545
569553
|
async function getInstalledVSCodeExtensionVersion(command4) {
|
|
569546
569554
|
const { stdout } = await execFileNoThrow2(command4, ["--list-extensions", "--show-versions"], {
|
|
@@ -570904,8 +570912,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
570904
570912
|
const maxVersion = await getMaxVersion();
|
|
570905
570913
|
if (maxVersion && gt(version10, maxVersion)) {
|
|
570906
570914
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version10} to ${maxVersion}`);
|
|
570907
|
-
if (gte2("4.2.
|
|
570908
|
-
logForDebugging(`Native installer: current version ${"4.2.
|
|
570915
|
+
if (gte2("4.2.24", maxVersion)) {
|
|
570916
|
+
logForDebugging(`Native installer: current version ${"4.2.24"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
570909
570917
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
570910
570918
|
latency_ms: Date.now() - startTime2,
|
|
570911
570919
|
max_version: maxVersion,
|
|
@@ -570916,7 +570924,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
570916
570924
|
version10 = maxVersion;
|
|
570917
570925
|
}
|
|
570918
570926
|
}
|
|
570919
|
-
if (!forceReinstall && version10 === "4.2.
|
|
570927
|
+
if (!forceReinstall && version10 === "4.2.24" && await versionIsAvailable(version10) && await isPossibleClaudeBinary(executablePath)) {
|
|
570920
570928
|
logForDebugging(`Found ${version10} at ${executablePath}, skipping install`);
|
|
570921
570929
|
logEvent("tengu_native_update_complete", {
|
|
570922
570930
|
latency_ms: Date.now() - startTime2,
|
|
@@ -708984,7 +708992,7 @@ function Feedback({
|
|
|
708984
708992
|
platform: env4.platform,
|
|
708985
708993
|
gitRepo: envInfo.isGit,
|
|
708986
708994
|
terminal: env4.terminal,
|
|
708987
|
-
version: "4.2.
|
|
708995
|
+
version: "4.2.24",
|
|
708988
708996
|
transcript: normalizeMessagesForAPI(messages),
|
|
708989
708997
|
errors: sanitizedErrors,
|
|
708990
708998
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -709167,7 +709175,7 @@ function Feedback({
|
|
|
709167
709175
|
", ",
|
|
709168
709176
|
env4.terminal,
|
|
709169
709177
|
", v",
|
|
709170
|
-
"4.2.
|
|
709178
|
+
"4.2.24"
|
|
709171
709179
|
]
|
|
709172
709180
|
})
|
|
709173
709181
|
]
|
|
@@ -709264,7 +709272,7 @@ ${sanitizedDescription}
|
|
|
709264
709272
|
` + `**Environment Info**
|
|
709265
709273
|
` + `- Platform: ${env4.platform}
|
|
709266
709274
|
` + `- Terminal: ${env4.terminal}
|
|
709267
|
-
` + `- Version: ${"4.2.
|
|
709275
|
+
` + `- Version: ${"4.2.24"}
|
|
709268
709276
|
` + `- Feedback ID: ${feedbackId}
|
|
709269
709277
|
` + `
|
|
709270
709278
|
**Errors**
|
|
@@ -711503,7 +711511,7 @@ function buildPrimarySection() {
|
|
|
711503
711511
|
children: t("settings.status.renameHint")
|
|
711504
711512
|
});
|
|
711505
711513
|
return [
|
|
711506
|
-
{ label: t("settings.status.version"), value: "4.2.
|
|
711514
|
+
{ label: t("settings.status.version"), value: "4.2.24" },
|
|
711507
711515
|
{ label: t("settings.status.sessionName"), value: nameValue },
|
|
711508
711516
|
{ label: t("settings.status.sessionId"), value: sessionId },
|
|
711509
711517
|
{ label: t("settings.status.cwd"), value: getCwd() },
|
|
@@ -714361,7 +714369,7 @@ function Config({
|
|
|
714361
714369
|
}
|
|
714362
714370
|
})
|
|
714363
714371
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime191.jsx(ChannelDowngradeDialog, {
|
|
714364
|
-
currentVersion: "4.2.
|
|
714372
|
+
currentVersion: "4.2.24",
|
|
714365
714373
|
onChoice: (choice) => {
|
|
714366
714374
|
setShowSubmenu(null);
|
|
714367
714375
|
setTabsHidden(false);
|
|
@@ -714373,7 +714381,7 @@ function Config({
|
|
|
714373
714381
|
autoUpdatesChannel: "stable"
|
|
714374
714382
|
};
|
|
714375
714383
|
if (choice === "stay") {
|
|
714376
|
-
newSettings.minimumVersion = "4.2.
|
|
714384
|
+
newSettings.minimumVersion = "4.2.24";
|
|
714377
714385
|
}
|
|
714378
714386
|
updateSettingsForSource("userSettings", newSettings);
|
|
714379
714387
|
setSettingsData((prev) => ({
|
|
@@ -719842,7 +719850,7 @@ function HelpV2({ onClose, commands: commands11 }) {
|
|
|
719842
719850
|
color: "professionalBlue",
|
|
719843
719851
|
children: [
|
|
719844
719852
|
/* @__PURE__ */ jsx_runtime218.jsx(Tabs, {
|
|
719845
|
-
title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.
|
|
719853
|
+
title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.24"}`,
|
|
719846
719854
|
color: "professionalBlue",
|
|
719847
719855
|
defaultTab: "general",
|
|
719848
719856
|
children: tabs
|
|
@@ -742843,7 +742851,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
742843
742851
|
return [];
|
|
742844
742852
|
}
|
|
742845
742853
|
}
|
|
742846
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.
|
|
742854
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.24") {
|
|
742847
742855
|
if (process.env.USER_TYPE === "sf") {
|
|
742848
742856
|
const changelog = "";
|
|
742849
742857
|
if (changelog) {
|
|
@@ -742870,7 +742878,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.22")
|
|
|
742870
742878
|
releaseNotes
|
|
742871
742879
|
};
|
|
742872
742880
|
}
|
|
742873
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.
|
|
742881
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.24") {
|
|
742874
742882
|
if (process.env.USER_TYPE === "sf") {
|
|
742875
742883
|
const changelog = "";
|
|
742876
742884
|
if (changelog) {
|
|
@@ -745383,7 +745391,7 @@ function isNotLoggedIn() {
|
|
|
745383
745391
|
return true;
|
|
745384
745392
|
}
|
|
745385
745393
|
function getLogoDisplayData() {
|
|
745386
|
-
const version10 = process.env.DEMO_VERSION ?? "4.2.
|
|
745394
|
+
const version10 = process.env.DEMO_VERSION ?? "4.2.24";
|
|
745387
745395
|
const serverUrl = getDirectConnectServerUrl();
|
|
745388
745396
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
745389
745397
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -745961,7 +745969,7 @@ var init_MatrixMessageLine = __esm(() => {
|
|
|
745961
745969
|
// src/components/matrix-tactical/MatrixWelcome.tsx
|
|
745962
745970
|
import { basename as basename47 } from "path";
|
|
745963
745971
|
function MatrixWelcome({
|
|
745964
|
-
version: version10 = "4.2.
|
|
745972
|
+
version: version10 = "4.2.24",
|
|
745965
745973
|
projectName,
|
|
745966
745974
|
cwd: cwd2,
|
|
745967
745975
|
modelDisplayName,
|
|
@@ -746596,13 +746604,13 @@ function LogoV2() {
|
|
|
746596
746604
|
const { hasReleaseNotes } = checkForReleaseNotesSync(config13.lastReleaseNotesSeen);
|
|
746597
746605
|
import_react167.useEffect(() => {
|
|
746598
746606
|
const currentConfig = getGlobalConfig();
|
|
746599
|
-
if (currentConfig.lastReleaseNotesSeen === "4.2.
|
|
746607
|
+
if (currentConfig.lastReleaseNotesSeen === "4.2.24") {
|
|
746600
746608
|
return;
|
|
746601
746609
|
}
|
|
746602
746610
|
saveGlobalConfig((current2) => {
|
|
746603
|
-
if (current2.lastReleaseNotesSeen === "4.2.
|
|
746611
|
+
if (current2.lastReleaseNotesSeen === "4.2.24")
|
|
746604
746612
|
return current2;
|
|
746605
|
-
return { ...current2, lastReleaseNotesSeen: "4.2.
|
|
746613
|
+
return { ...current2, lastReleaseNotesSeen: "4.2.24" };
|
|
746606
746614
|
});
|
|
746607
746615
|
if (showOnboarding) {
|
|
746608
746616
|
incrementProjectOnboardingSeenCount();
|
|
@@ -769132,7 +769140,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
769132
769140
|
smapsRollup,
|
|
769133
769141
|
platform: process.platform,
|
|
769134
769142
|
nodeVersion: process.version,
|
|
769135
|
-
ccVersion: "4.2.
|
|
769143
|
+
ccVersion: "4.2.24"
|
|
769136
769144
|
};
|
|
769137
769145
|
}
|
|
769138
769146
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -769248,7 +769256,7 @@ var init_mock_limits = __esm(() => {
|
|
|
769248
769256
|
var call55 = async () => {
|
|
769249
769257
|
return {
|
|
769250
769258
|
type: "text",
|
|
769251
|
-
value: `${"4.2.
|
|
769259
|
+
value: `${"4.2.24"} (built ${"2026-08-04T09:20:56.936Z"})`
|
|
769252
769260
|
};
|
|
769253
769261
|
}, version10, version_default;
|
|
769254
769262
|
var init_version2 = __esm(() => {
|
|
@@ -776495,6 +776503,34 @@ function agentsDir() {
|
|
|
776495
776503
|
function commandsDir() {
|
|
776496
776504
|
return path54.join(getClaudeConfigHomeDir(), "commands");
|
|
776497
776505
|
}
|
|
776506
|
+
function assertSafeSlug(slug) {
|
|
776507
|
+
if (!slug || typeof slug !== "string") {
|
|
776508
|
+
throw new Error("Invalid favorite slug: empty or non-string");
|
|
776509
|
+
}
|
|
776510
|
+
if (slug.includes("/") || slug.includes("\\") || slug.includes("\x00") || slug === "." || slug === ".." || slug.startsWith(".") || slug.startsWith(" ") || slug.endsWith(" ") || !SAFE_SLUG_RE.test(slug)) {
|
|
776511
|
+
throw new Error(`Invalid favorite slug: ${slug}`);
|
|
776512
|
+
}
|
|
776513
|
+
}
|
|
776514
|
+
function resolveFavoritePath(baseDir, slug) {
|
|
776515
|
+
assertSafeSlug(slug);
|
|
776516
|
+
const resolvedBase = path54.resolve(baseDir);
|
|
776517
|
+
const resolvedTarget = path54.resolve(path54.join(resolvedBase, slug));
|
|
776518
|
+
const rel = path54.relative(resolvedBase, resolvedTarget);
|
|
776519
|
+
if (rel === "" || rel.startsWith("..") || path54.isAbsolute(rel)) {
|
|
776520
|
+
throw new Error(`Path traversal detected for favorite slug: ${slug}`);
|
|
776521
|
+
}
|
|
776522
|
+
return resolvedTarget;
|
|
776523
|
+
}
|
|
776524
|
+
function resolveFavoriteFilePath(baseDir, slug, suffix) {
|
|
776525
|
+
assertSafeSlug(slug);
|
|
776526
|
+
const resolvedBase = path54.resolve(baseDir);
|
|
776527
|
+
const resolvedTarget = path54.resolve(path54.join(resolvedBase, `${slug}${suffix}`));
|
|
776528
|
+
const rel = path54.relative(resolvedBase, resolvedTarget);
|
|
776529
|
+
if (rel.startsWith("..") || path54.isAbsolute(rel)) {
|
|
776530
|
+
throw new Error(`Path traversal detected for favorite slug: ${slug}`);
|
|
776531
|
+
}
|
|
776532
|
+
return resolvedTarget;
|
|
776533
|
+
}
|
|
776498
776534
|
async function readState() {
|
|
776499
776535
|
try {
|
|
776500
776536
|
const text2 = await readFile76(favoriteStatePath(), "utf-8");
|
|
@@ -776589,11 +776625,18 @@ function parseFavoriteListItem(data) {
|
|
|
776589
776625
|
const localType = STORE_TYPE_MAP[storeType];
|
|
776590
776626
|
if (!localType)
|
|
776591
776627
|
return;
|
|
776628
|
+
const slug = String(data.slug ?? data.id);
|
|
776629
|
+
try {
|
|
776630
|
+
assertSafeSlug(slug);
|
|
776631
|
+
} catch {
|
|
776632
|
+
logForDebugging(`[favorite] skipping candidate with unsafe slug: ${slug}`);
|
|
776633
|
+
return;
|
|
776634
|
+
}
|
|
776592
776635
|
const favorited = typeof data.favorited === "boolean" ? data.favorited : data.favorited === "true" || data.favorited === 1;
|
|
776593
776636
|
logForDebugging(`[favorite] name=${data.name} score=${data.score} experienceScore=${data.experienceScore} favoriteCount=${data.favoriteCount} createdBy=${data.createdBy} fields=[${Object.keys(data).join(",")}]`);
|
|
776594
776637
|
return {
|
|
776595
776638
|
id: String(data.id),
|
|
776596
|
-
slug
|
|
776639
|
+
slug,
|
|
776597
776640
|
name: String(data.name ?? data.slug ?? data.id),
|
|
776598
776641
|
description: String(data.description ?? ""),
|
|
776599
776642
|
itemType: localType,
|
|
@@ -776623,9 +776666,11 @@ async function getRemoteItem(id) {
|
|
|
776623
776666
|
if (!localType) {
|
|
776624
776667
|
throw new Error(`Unsupported item type: ${storeType} (${String(data.slug ?? id)})`);
|
|
776625
776668
|
}
|
|
776669
|
+
const slug = String(data.slug);
|
|
776670
|
+
assertSafeSlug(slug);
|
|
776626
776671
|
return {
|
|
776627
776672
|
id: String(data.id),
|
|
776628
|
-
slug
|
|
776673
|
+
slug,
|
|
776629
776674
|
name: String(data.name),
|
|
776630
776675
|
description: String(data.description ?? ""),
|
|
776631
776676
|
itemType: localType,
|
|
@@ -776693,7 +776738,7 @@ function deriveStatus(state3, activeSkillSlugs, activeAgentNames, activeCommandN
|
|
|
776693
776738
|
}
|
|
776694
776739
|
async function persistInstalledItem(item) {
|
|
776695
776740
|
const typeRoot = favoriteTypeRoot(item.itemType);
|
|
776696
|
-
const dir =
|
|
776741
|
+
const dir = resolveFavoritePath(typeRoot, item.slug);
|
|
776697
776742
|
const itemJson = JSON.stringify({
|
|
776698
776743
|
id: item.id,
|
|
776699
776744
|
slug: item.slug,
|
|
@@ -776871,7 +776916,7 @@ async function copyDir2(src, dest) {
|
|
|
776871
776916
|
async function addItemToConfig(item, localPath) {
|
|
776872
776917
|
switch (item.itemType) {
|
|
776873
776918
|
case "skill": {
|
|
776874
|
-
const destDir =
|
|
776919
|
+
const destDir = resolveFavoritePath(skillsDir(), item.slug);
|
|
776875
776920
|
const fingerprint = await readBundleFingerprint(localPath);
|
|
776876
776921
|
await replaceDirectoryAtomically(destDir, (stagingDir) => copyDir2(localPath, stagingDir), fingerprint === null ? {} : { fingerprint });
|
|
776877
776922
|
clearCommandsCache();
|
|
@@ -776894,7 +776939,7 @@ async function addItemToConfig(item, localPath) {
|
|
|
776894
776939
|
}));
|
|
776895
776940
|
const agentDestDir = agentsDir();
|
|
776896
776941
|
await mkdir62(agentDestDir, { recursive: true });
|
|
776897
|
-
await copyFile10(mdPath,
|
|
776942
|
+
await copyFile10(mdPath, resolveFavoriteFilePath(agentDestDir, item.slug, ".md"));
|
|
776898
776943
|
clearAgentDefinitionsCache();
|
|
776899
776944
|
break;
|
|
776900
776945
|
}
|
|
@@ -776914,7 +776959,7 @@ async function addItemToConfig(item, localPath) {
|
|
|
776914
776959
|
}));
|
|
776915
776960
|
const commandDestDir = commandsDir();
|
|
776916
776961
|
await mkdir62(commandDestDir, { recursive: true });
|
|
776917
|
-
await copyFile10(mdPath,
|
|
776962
|
+
await copyFile10(mdPath, resolveFavoriteFilePath(commandDestDir, item.slug, ".md"));
|
|
776918
776963
|
clearCommandsCache();
|
|
776919
776964
|
skillChangeDetector.notify();
|
|
776920
776965
|
break;
|
|
@@ -776943,7 +776988,7 @@ Supported formats: opencode native, VS Code / Claude Desktop style, or simplifie
|
|
|
776943
776988
|
async function removeItemFromConfig(itemType, slug, _localPath) {
|
|
776944
776989
|
switch (itemType) {
|
|
776945
776990
|
case "skill": {
|
|
776946
|
-
const destDir =
|
|
776991
|
+
const destDir = resolveFavoritePath(skillsDir(), slug);
|
|
776947
776992
|
await withTargetDirLock(destDir, () => rm16(destDir, { recursive: true, force: true }));
|
|
776948
776993
|
clearCommandsCache();
|
|
776949
776994
|
skillChangeDetector.notify();
|
|
@@ -776955,7 +777000,9 @@ async function removeItemFromConfig(itemType, slug, _localPath) {
|
|
|
776955
777000
|
delete agents2[slug];
|
|
776956
777001
|
return { ...cfg, agents: agents2 };
|
|
776957
777002
|
});
|
|
776958
|
-
await rm16(
|
|
777003
|
+
await rm16(resolveFavoriteFilePath(agentsDir(), slug, ".md"), {
|
|
777004
|
+
force: true
|
|
777005
|
+
});
|
|
776959
777006
|
clearAgentDefinitionsCache();
|
|
776960
777007
|
break;
|
|
776961
777008
|
}
|
|
@@ -776965,7 +777012,9 @@ async function removeItemFromConfig(itemType, slug, _localPath) {
|
|
|
776965
777012
|
delete commands11[slug];
|
|
776966
777013
|
return { ...cfg, commands: commands11 };
|
|
776967
777014
|
});
|
|
776968
|
-
await rm16(
|
|
777015
|
+
await rm16(resolveFavoriteFilePath(commandsDir(), slug, ".md"), {
|
|
777016
|
+
force: true
|
|
777017
|
+
});
|
|
776969
777018
|
clearCommandsCache();
|
|
776970
777019
|
skillChangeDetector.notify();
|
|
776971
777020
|
break;
|
|
@@ -777227,7 +777276,8 @@ function hasUpdate(item, localVersion) {
|
|
|
777227
777276
|
async function updateFavoriteItem(slugOrId) {
|
|
777228
777277
|
const installed = await ensureInstalled(slugOrId);
|
|
777229
777278
|
const remote = await getRemoteItem(installed.id);
|
|
777230
|
-
const
|
|
777279
|
+
const backupBase = path54.join(path54.dirname(installed.localPath), ".backup");
|
|
777280
|
+
const backupDir = path54.join(resolveFavoritePath(backupBase, installed.slug), new Date().toISOString().replace(/[:.]/gu, "-"));
|
|
777231
777281
|
await copyDir2(installed.localPath, backupDir);
|
|
777232
777282
|
await persistInstalledItem(remote);
|
|
777233
777283
|
if (installed.lifecycle === "active") {
|
|
@@ -777311,7 +777361,7 @@ async function batchUpdateFavoriteItems(slugs) {
|
|
|
777311
777361
|
}
|
|
777312
777362
|
return { updated, errors: errors14 };
|
|
777313
777363
|
}
|
|
777314
|
-
var FAVORITE_PAGE_SIZE = 20, FAVORITE_MAX_PAGES = 20, FAVORITE_LIST_CACHE_TTL_MS = 30000, _listFavoriteItemsCache = null, STORE_TYPE_MAP, LOCAL_TO_STORE_TYPE, FETCH_TIMEOUT_MS7 = 15000, RemoteListHttpError, _untypedListUnsupported = false, SUPPORTED_MCP_TYPES;
|
|
777364
|
+
var FAVORITE_PAGE_SIZE = 20, FAVORITE_MAX_PAGES = 20, FAVORITE_LIST_CACHE_TTL_MS = 30000, _listFavoriteItemsCache = null, STORE_TYPE_MAP, LOCAL_TO_STORE_TYPE, SAFE_SLUG_RE, FETCH_TIMEOUT_MS7 = 15000, RemoteListHttpError, _untypedListUnsupported = false, SUPPORTED_MCP_TYPES;
|
|
777315
777365
|
var init_favorite = __esm(() => {
|
|
777316
777366
|
init_fetch2();
|
|
777317
777367
|
init_auth();
|
|
@@ -777337,6 +777387,7 @@ var init_favorite = __esm(() => {
|
|
|
777337
777387
|
command: "command",
|
|
777338
777388
|
mcp: "mcp"
|
|
777339
777389
|
};
|
|
777390
|
+
SAFE_SLUG_RE = /^[a-zA-Z0-9._-]+$/u;
|
|
777340
777391
|
RemoteListHttpError = class RemoteListHttpError extends Error {
|
|
777341
777392
|
status;
|
|
777342
777393
|
constructor(status2, message2) {
|
|
@@ -783838,7 +783889,8 @@ async function generateUltracodeWorkflow(request3, context41) {
|
|
|
783838
783889
|
maxRetries: 1,
|
|
783839
783890
|
thinking: false,
|
|
783840
783891
|
querySource: "workflow",
|
|
783841
|
-
signal: context41.abortController.signal
|
|
783892
|
+
signal: context41.abortController.signal,
|
|
783893
|
+
stream: true
|
|
783842
783894
|
});
|
|
783843
783895
|
const workflow = prepareGeneratedUltracodeWorkflow(extractGeneratedWorkflow(response3), request3);
|
|
783844
783896
|
validateGeneratedUltracodeWorkflow(workflow, request3);
|
|
@@ -787171,7 +787223,7 @@ function generateHtmlReport(data, insights) {
|
|
|
787171
787223
|
</html>`;
|
|
787172
787224
|
}
|
|
787173
787225
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
787174
|
-
const version11 = typeof MACRO !== "undefined" ? "4.2.
|
|
787226
|
+
const version11 = typeof MACRO !== "undefined" ? "4.2.24" : "unknown";
|
|
787175
787227
|
const remote_hosts_collected = remoteStats?.hosts.filter((h8) => h8.sessionCount > 0).map((h8) => h8.name);
|
|
787176
787228
|
const facets_summary = {
|
|
787177
787229
|
total: facets.size,
|
|
@@ -791621,7 +791673,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
791621
791673
|
init_settings2();
|
|
791622
791674
|
init_slowOperations();
|
|
791623
791675
|
init_uuid();
|
|
791624
|
-
VERSION11 = typeof MACRO !== "undefined" ? "4.2.
|
|
791676
|
+
VERSION11 = typeof MACRO !== "undefined" ? "4.2.24" : "unknown";
|
|
791625
791677
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
791626
791678
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
791627
791679
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -792962,7 +793014,7 @@ var init_filesystem = __esm(() => {
|
|
|
792962
793014
|
});
|
|
792963
793015
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
792964
793016
|
const nonce = randomBytes24(16).toString("hex");
|
|
792965
|
-
return join204(getCostrictTempDir(), "bundled-skills", "4.2.
|
|
793017
|
+
return join204(getCostrictTempDir(), "bundled-skills", "4.2.24", nonce);
|
|
792966
793018
|
});
|
|
792967
793019
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
792968
793020
|
});
|
|
@@ -799232,7 +799284,7 @@ function computeFingerprint(messageText, version11) {
|
|
|
799232
799284
|
}
|
|
799233
799285
|
function computeFingerprintFromMessages(messages) {
|
|
799234
799286
|
const firstMessageText = extractFirstMessageText(messages);
|
|
799235
|
-
return computeFingerprint(firstMessageText, "4.2.
|
|
799287
|
+
return computeFingerprint(firstMessageText, "4.2.24");
|
|
799236
799288
|
}
|
|
799237
799289
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
799238
799290
|
var init_fingerprint = () => {};
|
|
@@ -799642,7 +799694,7 @@ function getAnthropicEnvMetadata() {
|
|
|
799642
799694
|
function getBuildAgeMinutes() {
|
|
799643
799695
|
if (false)
|
|
799644
799696
|
;
|
|
799645
|
-
const buildTime = new Date("2026-08-
|
|
799697
|
+
const buildTime = new Date("2026-08-04T09:20:56.936Z").getTime();
|
|
799646
799698
|
if (isNaN(buildTime))
|
|
799647
799699
|
return;
|
|
799648
799700
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -804898,7 +804950,10 @@ function buildMessages(system, messages) {
|
|
|
804898
804950
|
}
|
|
804899
804951
|
for (const msg of messages) {
|
|
804900
804952
|
if (typeof msg.content === "string") {
|
|
804901
|
-
result.push({
|
|
804953
|
+
result.push({
|
|
804954
|
+
role: msg.role,
|
|
804955
|
+
content: msg.content
|
|
804956
|
+
});
|
|
804902
804957
|
} else {
|
|
804903
804958
|
const text2 = msg.content.filter((b9) => b9.type === "text").map((b9) => b9.text).join(`
|
|
804904
804959
|
`);
|
|
@@ -804908,9 +804963,21 @@ function buildMessages(system, messages) {
|
|
|
804908
804963
|
return result;
|
|
804909
804964
|
}
|
|
804910
804965
|
async function sideQueryOpenAICompat(opts, client10, resolvedModel, providerTag) {
|
|
804911
|
-
const {
|
|
804912
|
-
|
|
804966
|
+
const {
|
|
804967
|
+
system,
|
|
804968
|
+
messages,
|
|
804969
|
+
max_tokens = 1024,
|
|
804970
|
+
signal,
|
|
804971
|
+
temperature,
|
|
804972
|
+
stop_sequences,
|
|
804973
|
+
querySource,
|
|
804974
|
+
stream: stream6
|
|
804975
|
+
} = opts;
|
|
804976
|
+
logForDebugging(`[${providerTag} sideQuery] querySource=${querySource}, model=${resolvedModel}, stream=${stream6 ?? false}`);
|
|
804913
804977
|
const start = Date.now();
|
|
804978
|
+
if (stream6) {
|
|
804979
|
+
return streamOpenAICompat(client10, resolvedModel, opts, providerTag);
|
|
804980
|
+
}
|
|
804914
804981
|
const response3 = await client10.chat.completions.create({
|
|
804915
804982
|
model: resolvedModel,
|
|
804916
804983
|
messages: buildMessages(system, messages),
|
|
@@ -804938,7 +805005,11 @@ async function sideQueryOpenAICompat(opts, client10, resolvedModel, providerTag)
|
|
|
804938
805005
|
const choice = response3.choices[0];
|
|
804939
805006
|
const content = [];
|
|
804940
805007
|
if (choice?.message?.content) {
|
|
804941
|
-
content.push({
|
|
805008
|
+
content.push({
|
|
805009
|
+
type: "text",
|
|
805010
|
+
text: choice.message.content,
|
|
805011
|
+
citations: null
|
|
805012
|
+
});
|
|
804942
805013
|
}
|
|
804943
805014
|
if (choice?.message?.tool_calls) {
|
|
804944
805015
|
for (const tc of choice.message.tool_calls) {
|
|
@@ -804947,7 +805018,12 @@ async function sideQueryOpenAICompat(opts, client10, resolvedModel, providerTag)
|
|
|
804947
805018
|
try {
|
|
804948
805019
|
input4 = JSON.parse(funcTc.function.arguments);
|
|
804949
805020
|
} catch {}
|
|
804950
|
-
content.push({
|
|
805021
|
+
content.push({
|
|
805022
|
+
type: "tool_use",
|
|
805023
|
+
id: tc.id,
|
|
805024
|
+
name: funcTc.function.name,
|
|
805025
|
+
input: input4
|
|
805026
|
+
});
|
|
804951
805027
|
}
|
|
804952
805028
|
}
|
|
804953
805029
|
return {
|
|
@@ -804967,6 +805043,107 @@ async function sideQueryOpenAICompat(opts, client10, resolvedModel, providerTag)
|
|
|
804967
805043
|
}
|
|
804968
805044
|
};
|
|
804969
805045
|
}
|
|
805046
|
+
async function streamOpenAICompat(client10, resolvedModel, opts, providerTag) {
|
|
805047
|
+
const {
|
|
805048
|
+
system,
|
|
805049
|
+
messages,
|
|
805050
|
+
max_tokens = 1024,
|
|
805051
|
+
signal,
|
|
805052
|
+
temperature,
|
|
805053
|
+
stop_sequences,
|
|
805054
|
+
querySource
|
|
805055
|
+
} = opts;
|
|
805056
|
+
logForDebugging(`[${providerTag} sideQuery:stream] querySource=${querySource}, model=${resolvedModel}`);
|
|
805057
|
+
const start = Date.now();
|
|
805058
|
+
const stream6 = await client10.chat.completions.create({
|
|
805059
|
+
model: resolvedModel,
|
|
805060
|
+
messages: buildMessages(system, messages),
|
|
805061
|
+
max_tokens,
|
|
805062
|
+
stream: true,
|
|
805063
|
+
stream_options: { include_usage: true },
|
|
805064
|
+
...temperature !== undefined && { temperature },
|
|
805065
|
+
...stop_sequences && { stop: stop_sequences }
|
|
805066
|
+
}, { signal });
|
|
805067
|
+
let responseId = "";
|
|
805068
|
+
let contentText = "";
|
|
805069
|
+
let finishReason;
|
|
805070
|
+
const toolCalls = new Map;
|
|
805071
|
+
let inputTokens = 0;
|
|
805072
|
+
let outputTokens = 0;
|
|
805073
|
+
for await (const chunk2 of stream6) {
|
|
805074
|
+
if (chunk2.id)
|
|
805075
|
+
responseId = chunk2.id;
|
|
805076
|
+
const choice = chunk2.choices?.[0];
|
|
805077
|
+
if (choice) {
|
|
805078
|
+
if (choice.delta?.content)
|
|
805079
|
+
contentText += choice.delta.content;
|
|
805080
|
+
if (choice.delta?.tool_calls) {
|
|
805081
|
+
for (const tc of choice.delta.tool_calls) {
|
|
805082
|
+
const idx = tc.index ?? 0;
|
|
805083
|
+
const existing = toolCalls.get(idx) ?? {
|
|
805084
|
+
id: "",
|
|
805085
|
+
name: "",
|
|
805086
|
+
arguments: ""
|
|
805087
|
+
};
|
|
805088
|
+
if (tc.id)
|
|
805089
|
+
existing.id = tc.id;
|
|
805090
|
+
if (tc.function?.name)
|
|
805091
|
+
existing.name = tc.function.name;
|
|
805092
|
+
if (tc.function?.arguments)
|
|
805093
|
+
existing.arguments += tc.function.arguments;
|
|
805094
|
+
toolCalls.set(idx, existing);
|
|
805095
|
+
}
|
|
805096
|
+
}
|
|
805097
|
+
if (choice.finish_reason)
|
|
805098
|
+
finishReason = choice.finish_reason;
|
|
805099
|
+
}
|
|
805100
|
+
if (chunk2.usage) {
|
|
805101
|
+
inputTokens = chunk2.usage.prompt_tokens ?? 0;
|
|
805102
|
+
outputTokens = chunk2.usage.completion_tokens ?? 0;
|
|
805103
|
+
}
|
|
805104
|
+
}
|
|
805105
|
+
const now2 = Date.now();
|
|
805106
|
+
const lastCompletion = getLastApiCompletionTimestamp();
|
|
805107
|
+
logEvent("tengu_api_success", {
|
|
805108
|
+
requestId: responseId,
|
|
805109
|
+
querySource,
|
|
805110
|
+
model: resolvedModel,
|
|
805111
|
+
inputTokens,
|
|
805112
|
+
outputTokens,
|
|
805113
|
+
cachedInputTokens: 0,
|
|
805114
|
+
uncachedInputTokens: 0,
|
|
805115
|
+
durationMsIncludingRetries: now2 - start,
|
|
805116
|
+
timeSinceLastApiCallMs: lastCompletion !== null ? now2 - lastCompletion : undefined
|
|
805117
|
+
});
|
|
805118
|
+
setLastApiCompletionTimestamp(now2);
|
|
805119
|
+
const content = [];
|
|
805120
|
+
if (contentText) {
|
|
805121
|
+
content.push({ type: "text", text: contentText, citations: null });
|
|
805122
|
+
}
|
|
805123
|
+
for (const [, tc] of [...toolCalls.entries()].sort((a8, b9) => a8[0] - b9[0])) {
|
|
805124
|
+
let input4 = {};
|
|
805125
|
+
try {
|
|
805126
|
+
input4 = JSON.parse(tc.arguments);
|
|
805127
|
+
} catch {}
|
|
805128
|
+
content.push({ type: "tool_use", id: tc.id, name: tc.name, input: input4 });
|
|
805129
|
+
}
|
|
805130
|
+
return {
|
|
805131
|
+
id: responseId,
|
|
805132
|
+
type: "message",
|
|
805133
|
+
role: "assistant",
|
|
805134
|
+
content,
|
|
805135
|
+
model: resolvedModel,
|
|
805136
|
+
stop_reason: STOP_REASON_MAP[finishReason ?? "stop"] ?? "end_turn",
|
|
805137
|
+
stop_sequence: null,
|
|
805138
|
+
usage: {
|
|
805139
|
+
input_tokens: inputTokens,
|
|
805140
|
+
output_tokens: outputTokens,
|
|
805141
|
+
cache_creation_input_tokens: null,
|
|
805142
|
+
cache_read_input_tokens: null,
|
|
805143
|
+
server_tool_use: null
|
|
805144
|
+
}
|
|
805145
|
+
};
|
|
805146
|
+
}
|
|
804970
805147
|
var STOP_REASON_MAP;
|
|
804971
805148
|
var init_sideQueryOpenAICompat = __esm(() => {
|
|
804972
805149
|
init_analytics();
|
|
@@ -805041,7 +805218,7 @@ async function sideQuery(opts) {
|
|
|
805041
805218
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
805042
805219
|
}
|
|
805043
805220
|
const messageText = extractFirstUserMessageText(messages);
|
|
805044
|
-
const fingerprint = computeFingerprint(messageText, "4.2.
|
|
805221
|
+
const fingerprint = computeFingerprint(messageText, "4.2.24");
|
|
805045
805222
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
805046
805223
|
const systemBlocks = [
|
|
805047
805224
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -808437,7 +808614,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
808437
808614
|
slash_commands: inputs.commands.filter((c10) => c10.userInvocable !== false).map((c10) => c10.name),
|
|
808438
808615
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
808439
808616
|
betas: getSdkBetas(),
|
|
808440
|
-
claude_code_version: "4.2.
|
|
808617
|
+
claude_code_version: "4.2.24",
|
|
808441
808618
|
output_style: outputStyle2,
|
|
808442
808619
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
808443
808620
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -811981,7 +812158,7 @@ function appendToLog(path57, message2) {
|
|
|
811981
812158
|
cwd: getFsImplementation().cwd(),
|
|
811982
812159
|
userType: process.env.USER_TYPE,
|
|
811983
812160
|
sessionId: getSessionId(),
|
|
811984
|
-
version: "4.2.
|
|
812161
|
+
version: "4.2.24"
|
|
811985
812162
|
};
|
|
811986
812163
|
getLogWriter(path57).write(messageWithTimestamp);
|
|
811987
812164
|
}
|
|
@@ -828450,7 +828627,7 @@ function getCommandFuse(commands11) {
|
|
|
828450
828627
|
if (fuseCache?.commands === commands11) {
|
|
828451
828628
|
return fuseCache.fuse;
|
|
828452
828629
|
}
|
|
828453
|
-
const commandData = commands11.filter((cmd) => !cmd.isHidden).map((cmd) => {
|
|
828630
|
+
const commandData = deduplicateCommands(commands11.filter((cmd) => !cmd.isHidden)).map((cmd) => {
|
|
828454
828631
|
const commandName = getCommandName(cmd);
|
|
828455
828632
|
const commandNameKey = getSearchAliases([commandName]);
|
|
828456
828633
|
const aliasKey = cmd.aliases ? getSearchAliases(cmd.aliases) : undefined;
|
|
@@ -828584,6 +828761,17 @@ function getCommandId2(cmd) {
|
|
|
828584
828761
|
}
|
|
828585
828762
|
return `${commandName}:${cmd.type}`;
|
|
828586
828763
|
}
|
|
828764
|
+
function deduplicateCommands(commands11) {
|
|
828765
|
+
const seenIds = new Set;
|
|
828766
|
+
return commands11.filter((cmd) => {
|
|
828767
|
+
const id = getCommandId2(cmd);
|
|
828768
|
+
if (seenIds.has(id)) {
|
|
828769
|
+
return false;
|
|
828770
|
+
}
|
|
828771
|
+
seenIds.add(id);
|
|
828772
|
+
return true;
|
|
828773
|
+
});
|
|
828774
|
+
}
|
|
828587
828775
|
function findMatchedAlias(query5, aliases) {
|
|
828588
828776
|
if (!aliases || aliases.length === 0 || query5 === "") {
|
|
828589
828777
|
return;
|
|
@@ -828614,7 +828802,7 @@ function generateCommandSuggestions(input4, commands11) {
|
|
|
828614
828802
|
}
|
|
828615
828803
|
const query5 = input4.slice(1).toLowerCase().trim();
|
|
828616
828804
|
if (query5 === "") {
|
|
828617
|
-
const visibleCommands = commands11.filter((cmd) => !cmd.isHidden);
|
|
828805
|
+
const visibleCommands = deduplicateCommands(commands11.filter((cmd) => !cmd.isHidden));
|
|
828618
828806
|
const recentlyUsed = [];
|
|
828619
828807
|
const commandsWithScores = visibleCommands.filter((cmd) => cmd.type === "prompt").map((cmd) => ({
|
|
828620
828808
|
cmd,
|
|
@@ -833026,7 +833214,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
833026
833214
|
project_dir: getOriginalCwd(),
|
|
833027
833215
|
added_dirs: addedDirs
|
|
833028
833216
|
},
|
|
833029
|
-
version: "4.2.
|
|
833217
|
+
version: "4.2.24",
|
|
833030
833218
|
output_style: {
|
|
833031
833219
|
name: outputStyleName
|
|
833032
833220
|
},
|
|
@@ -851651,7 +851839,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
851651
851839
|
} catch {}
|
|
851652
851840
|
const data = {
|
|
851653
851841
|
trigger,
|
|
851654
|
-
version: "4.2.
|
|
851842
|
+
version: "4.2.24",
|
|
851655
851843
|
platform: process.platform,
|
|
851656
851844
|
transcript,
|
|
851657
851845
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -852906,7 +853094,7 @@ function getReleaseType(current2, latest) {
|
|
|
852906
853094
|
return "patch";
|
|
852907
853095
|
}
|
|
852908
853096
|
async function checkNewAutoUpdate(callbacks) {
|
|
852909
|
-
const currentVersion = "4.2.
|
|
853097
|
+
const currentVersion = "4.2.24";
|
|
852910
853098
|
logForDebugging(`[newAutoUpdater] checking, current: ${currentVersion}`);
|
|
852911
853099
|
if (isNewAutoUpdaterDisabled()) {
|
|
852912
853100
|
return { action: "skip", currentVersion, latestVersion: null };
|
|
@@ -864129,7 +864317,7 @@ function WelcomeV2() {
|
|
|
864129
864317
|
dimColor: true,
|
|
864130
864318
|
children: [
|
|
864131
864319
|
"v",
|
|
864132
|
-
"4.2.
|
|
864320
|
+
"4.2.24",
|
|
864133
864321
|
" "
|
|
864134
864322
|
]
|
|
864135
864323
|
})
|
|
@@ -864195,7 +864383,7 @@ function WelcomeV2() {
|
|
|
864195
864383
|
dimColor: true,
|
|
864196
864384
|
children: [
|
|
864197
864385
|
"v",
|
|
864198
|
-
"4.2.
|
|
864386
|
+
"4.2.24",
|
|
864199
864387
|
" "
|
|
864200
864388
|
]
|
|
864201
864389
|
})
|
|
@@ -864297,7 +864485,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
|
|
|
864297
864485
|
dimColor: true,
|
|
864298
864486
|
children: [
|
|
864299
864487
|
"v",
|
|
864300
|
-
"4.2.
|
|
864488
|
+
"4.2.24",
|
|
864301
864489
|
" "
|
|
864302
864490
|
]
|
|
864303
864491
|
})
|
|
@@ -864363,7 +864551,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
|
|
|
864363
864551
|
dimColor: true,
|
|
864364
864552
|
children: [
|
|
864365
864553
|
"v",
|
|
864366
|
-
"4.2.
|
|
864554
|
+
"4.2.24",
|
|
864367
864555
|
" "
|
|
864368
864556
|
]
|
|
864369
864557
|
})
|
|
@@ -865303,7 +865491,7 @@ function completeOnboarding() {
|
|
|
865303
865491
|
saveGlobalConfig((current2) => ({
|
|
865304
865492
|
...current2,
|
|
865305
865493
|
hasCompletedOnboarding: true,
|
|
865306
|
-
lastOnboardingVersion: "4.2.
|
|
865494
|
+
lastOnboardingVersion: "4.2.24"
|
|
865307
865495
|
}));
|
|
865308
865496
|
}
|
|
865309
865497
|
function showDialog(root9, renderer) {
|
|
@@ -880385,7 +880573,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
|
|
|
880385
880573
|
setCwd(cwd3);
|
|
880386
880574
|
const server2 = new Server({
|
|
880387
880575
|
name: "claude/tengu",
|
|
880388
|
-
version: "4.2.
|
|
880576
|
+
version: "4.2.24"
|
|
880389
880577
|
}, {
|
|
880390
880578
|
capabilities: {
|
|
880391
880579
|
tools: {}
|
|
@@ -882670,7 +882858,7 @@ function createHealthRoutes(sessionManager) {
|
|
|
882670
882858
|
const uptime2 = process.uptime() * 1000;
|
|
882671
882859
|
return c10.json({
|
|
882672
882860
|
status: "ok",
|
|
882673
|
-
version: "4.2.
|
|
882861
|
+
version: "4.2.24",
|
|
882674
882862
|
uptime_ms: Math.round(uptime2),
|
|
882675
882863
|
active_sessions: sessionManager.getActiveCount()
|
|
882676
882864
|
});
|
|
@@ -882942,7 +883130,7 @@ function getMacroDefines() {
|
|
|
882942
883130
|
commit = execSync3("git rev-parse --short HEAD", { encoding: "utf-8", cwd: __dirname }).trim();
|
|
882943
883131
|
} catch {}
|
|
882944
883132
|
return {
|
|
882945
|
-
"MACRO.VERSION": JSON.stringify("4.2.
|
|
883133
|
+
"MACRO.VERSION": JSON.stringify("4.2.24"),
|
|
882946
883134
|
"MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()),
|
|
882947
883135
|
"MACRO.COMMIT": JSON.stringify(commit),
|
|
882948
883136
|
"MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),
|
|
@@ -886858,6 +887046,11 @@ var init_find = __esm(() => {
|
|
|
886858
887046
|
});
|
|
886859
887047
|
|
|
886860
887048
|
// src/server/routes/favorite.ts
|
|
887049
|
+
function validateRouteId(id) {
|
|
887050
|
+
if (id.includes("/") || id.includes("\\") || id.includes("\x00") || id === ".." || id === ".") {
|
|
887051
|
+
throw new Error(`Invalid favorite id: ${id}`);
|
|
887052
|
+
}
|
|
887053
|
+
}
|
|
886861
887054
|
function createFavoriteRoutes() {
|
|
886862
887055
|
return new Hono2().get("/global/favorite/skills", async (c10) => {
|
|
886863
887056
|
try {
|
|
@@ -886871,6 +887064,7 @@ function createFavoriteRoutes() {
|
|
|
886871
887064
|
}).post("/global/favorite/skills/:id/load", async (c10) => {
|
|
886872
887065
|
const id = c10.req.param("id");
|
|
886873
887066
|
try {
|
|
887067
|
+
validateRouteId(id);
|
|
886874
887068
|
const result = await loadFavoriteItem(id);
|
|
886875
887069
|
return c10.json({ success: true, item: result });
|
|
886876
887070
|
} catch (error100) {
|
|
@@ -886883,6 +887077,7 @@ function createFavoriteRoutes() {
|
|
|
886883
887077
|
}).post("/global/favorite/skills/:id/unload", async (c10) => {
|
|
886884
887078
|
const id = c10.req.param("id");
|
|
886885
887079
|
try {
|
|
887080
|
+
validateRouteId(id);
|
|
886886
887081
|
const result = await unloadFavoriteItem(id);
|
|
886887
887082
|
return c10.json({ success: true, item: result });
|
|
886888
887083
|
} catch (error100) {
|
|
@@ -889935,7 +890130,7 @@ __export(exports_update, {
|
|
|
889935
890130
|
});
|
|
889936
890131
|
async function update() {
|
|
889937
890132
|
logEvent("tengu_update_check", {});
|
|
889938
|
-
writeToStdout(`${t("cli.update.currentVersion", "Current version")}: ${"4.2.
|
|
890133
|
+
writeToStdout(`${t("cli.update.currentVersion", "Current version")}: ${"4.2.24"}
|
|
889939
890134
|
`);
|
|
889940
890135
|
const channel5 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
889941
890136
|
writeToStdout(`${t("cli.update.checkingUpdates", { channel: channel5 }, "Checking for updates to {channel} version...")}
|
|
@@ -890010,8 +890205,8 @@ async function update() {
|
|
|
890010
890205
|
writeToStdout(`${t("cli.update.managedByHomebrew", "CoStrict is managed by Homebrew.")}
|
|
890011
890206
|
`);
|
|
890012
890207
|
const latest = await getLatestVersion(channel5);
|
|
890013
|
-
if (latest && !gte2("4.2.
|
|
890014
|
-
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.
|
|
890208
|
+
if (latest && !gte2("4.2.24", latest)) {
|
|
890209
|
+
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.24", latest }, "Update available: {current} \u2192 {latest}")}
|
|
890015
890210
|
`);
|
|
890016
890211
|
writeToStdout(`
|
|
890017
890212
|
`);
|
|
@@ -890027,8 +890222,8 @@ async function update() {
|
|
|
890027
890222
|
writeToStdout(`${t("cli.update.managedByWinget", "CoStrict is managed by winget.")}
|
|
890028
890223
|
`);
|
|
890029
890224
|
const latest = await getLatestVersion(channel5);
|
|
890030
|
-
if (latest && !gte2("4.2.
|
|
890031
|
-
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.
|
|
890225
|
+
if (latest && !gte2("4.2.24", latest)) {
|
|
890226
|
+
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.24", latest }, "Update available: {current} \u2192 {latest}")}
|
|
890032
890227
|
`);
|
|
890033
890228
|
writeToStdout(`
|
|
890034
890229
|
`);
|
|
@@ -890044,8 +890239,8 @@ async function update() {
|
|
|
890044
890239
|
writeToStdout(`${t("cli.update.managedByApk", "CoStrict is managed by apk.")}
|
|
890045
890240
|
`);
|
|
890046
890241
|
const latest = await getLatestVersion(channel5);
|
|
890047
|
-
if (latest && !gte2("4.2.
|
|
890048
|
-
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.
|
|
890242
|
+
if (latest && !gte2("4.2.24", latest)) {
|
|
890243
|
+
writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.24", latest }, "Update available: {current} \u2192 {latest}")}
|
|
890049
890244
|
`);
|
|
890050
890245
|
writeToStdout(`
|
|
890051
890246
|
`);
|
|
@@ -890110,11 +890305,11 @@ async function update() {
|
|
|
890110
890305
|
`);
|
|
890111
890306
|
await gracefulShutdown(1);
|
|
890112
890307
|
}
|
|
890113
|
-
if (result2.latestVersion === "4.2.
|
|
890114
|
-
writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.
|
|
890308
|
+
if (result2.latestVersion === "4.2.24") {
|
|
890309
|
+
writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.24" }, "CoStrict is up to date ({version})")) + `
|
|
890115
890310
|
`);
|
|
890116
890311
|
} else {
|
|
890117
|
-
writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.
|
|
890312
|
+
writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.24", to: String(result2.latestVersion) }, "Successfully updated from {from} to version {to}")) + `
|
|
890118
890313
|
`);
|
|
890119
890314
|
regenerateCompletionCache();
|
|
890120
890315
|
}
|
|
@@ -890174,12 +890369,12 @@ async function update() {
|
|
|
890174
890369
|
`);
|
|
890175
890370
|
await gracefulShutdown(1);
|
|
890176
890371
|
}
|
|
890177
|
-
if (latestVersion === "4.2.
|
|
890178
|
-
writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.
|
|
890372
|
+
if (latestVersion === "4.2.24") {
|
|
890373
|
+
writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.24" }, "CoStrict is up to date ({version})")) + `
|
|
890179
890374
|
`);
|
|
890180
890375
|
await gracefulShutdown(0);
|
|
890181
890376
|
}
|
|
890182
|
-
writeToStdout(`${t("cli.update.newVersionAvailable", { latest: String(latestVersion), current: "4.2.
|
|
890377
|
+
writeToStdout(`${t("cli.update.newVersionAvailable", { latest: String(latestVersion), current: "4.2.24" }, "New version available: {latest} (current: {current})")}
|
|
890183
890378
|
`);
|
|
890184
890379
|
writeToStdout(`${t("cli.update.installing", "Installing update...")}
|
|
890185
890380
|
`);
|
|
@@ -890224,7 +890419,7 @@ async function update() {
|
|
|
890224
890419
|
logForDebugging(`update: Installation status: ${result.status}`);
|
|
890225
890420
|
switch (result.status) {
|
|
890226
890421
|
case "success":
|
|
890227
|
-
writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.
|
|
890422
|
+
writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.24", to: String(latestVersion) }, "Successfully updated from {from} to version {to}")) + `
|
|
890228
890423
|
`);
|
|
890229
890424
|
regenerateCompletionCache();
|
|
890230
890425
|
break;
|
|
@@ -892428,7 +892623,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
892428
892623
|
}
|
|
892429
892624
|
}
|
|
892430
892625
|
logForDiagnosticsNoPII("info", "started", {
|
|
892431
|
-
version: "4.2.
|
|
892626
|
+
version: "4.2.24",
|
|
892432
892627
|
is_native_binary: isInBundledMode()
|
|
892433
892628
|
});
|
|
892434
892629
|
registerCleanup(async () => {
|
|
@@ -892919,7 +893114,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
|
|
|
892919
893114
|
sshSession = await createSSHSession2({
|
|
892920
893115
|
host: _pendingSSH.host,
|
|
892921
893116
|
cwd: _pendingSSH.cwd,
|
|
892922
|
-
localVersion: "4.2.
|
|
893117
|
+
localVersion: "4.2.24",
|
|
892923
893118
|
permissionMode: _pendingSSH.permissionMode,
|
|
892924
893119
|
dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
|
|
892925
893120
|
extraCliArgs: _pendingSSH.extraCliArgs,
|
|
@@ -893388,7 +893583,7 @@ Usage: csc --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
893388
893583
|
pendingHookMessages
|
|
893389
893584
|
}, renderAndRun);
|
|
893390
893585
|
}
|
|
893391
|
-
}).version("4.2.
|
|
893586
|
+
}).version("4.2.24 (CoStrict)", "-v, --version", cliDesc("cli.option.version", "Output the version number"));
|
|
893392
893587
|
program2.addOption(new Option("-w, --worktree [name]", cliDesc("cli.option.worktree", "Create a new git worktree for this session (optionally specify a name)")).hideHelp());
|
|
893393
893588
|
program2.addOption(new Option("--tmux", cliDesc("cli.option.tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.")).hideHelp());
|
|
893394
893589
|
if (canUserConfigureAdvisor()) {
|
|
@@ -894131,10 +894326,10 @@ if (process.env.CLAUDE_CODE_REMOTE === "true") {
|
|
|
894131
894326
|
async function main2() {
|
|
894132
894327
|
const args = process.argv.slice(2);
|
|
894133
894328
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
894134
|
-
const d7 = new Date("2026-08-
|
|
894329
|
+
const d7 = new Date("2026-08-04T09:20:56.936Z");
|
|
894135
894330
|
const p2 = (n3) => String(n3).padStart(2, "0");
|
|
894136
894331
|
const buildTime = `${d7.getFullYear()}/${p2(d7.getMonth() + 1)}/${p2(d7.getDate())} ${p2(d7.getHours())}:${p2(d7.getMinutes())}:${p2(d7.getSeconds())}`;
|
|
894137
|
-
console.log(`${"4.2.
|
|
894332
|
+
console.log(`${"4.2.24"} (commit: ${"bf82163cc"}, built: ${buildTime})`);
|
|
894138
894333
|
return;
|
|
894139
894334
|
}
|
|
894140
894335
|
let stopServeParentWatchdog;
|
|
@@ -894310,5 +894505,5 @@ async function main2() {
|
|
|
894310
894505
|
}
|
|
894311
894506
|
main2();
|
|
894312
894507
|
|
|
894313
|
-
//# debugId=
|
|
894508
|
+
//# debugId=D85CD535754BCE3164756E2164756E21
|
|
894314
894509
|
|
|
@@ -736,8 +736,8 @@ function getClientVersion() {
|
|
|
736
736
|
if (cached)
|
|
737
737
|
return cached;
|
|
738
738
|
try {
|
|
739
|
-
if ("4.2.
|
|
740
|
-
cached = "4.2.
|
|
739
|
+
if ("4.2.24") {
|
|
740
|
+
cached = "4.2.24";
|
|
741
741
|
return cached;
|
|
742
742
|
}
|
|
743
743
|
} catch {}
|
|
@@ -61589,17 +61589,20 @@ var init_memoize2 = __esm(() => {
|
|
|
61589
61589
|
// src/utils/windowsPaths.ts
|
|
61590
61590
|
import { existsSync as existsSync3 } from "fs";
|
|
61591
61591
|
import * as pathWin32 from "path/win32";
|
|
61592
|
-
function
|
|
61592
|
+
function isNonGitBash(candidatePath) {
|
|
61593
61593
|
const lower = candidatePath.toLowerCase();
|
|
61594
|
-
|
|
61594
|
+
if (!lower.endsWith("\\bash.exe")) {
|
|
61595
|
+
return false;
|
|
61596
|
+
}
|
|
61597
|
+
return lower.includes("\\windows\\system32\\") || lower.includes("\\windows\\syswow64\\") || lower.includes("\\windowsapps\\") || lower.includes("\\cygwin\\") || lower.includes("\\cygwin64\\");
|
|
61595
61598
|
}
|
|
61596
61599
|
function findExecutableWithDeps(executable, deps) {
|
|
61597
61600
|
try {
|
|
61598
61601
|
const paths2 = deps.execCommand(`where.exe ${executable}`).split(/\r?\n/u).map((candidate) => candidate.trim()).filter(Boolean);
|
|
61599
61602
|
const cwd2 = pathWin32.resolve(deps.cwdFn()).toLowerCase();
|
|
61600
61603
|
for (const candidatePath of paths2) {
|
|
61601
|
-
if (executable === "bash" &&
|
|
61602
|
-
logForDebugging(`Skipping
|
|
61604
|
+
if (executable === "bash" && isNonGitBash(candidatePath)) {
|
|
61605
|
+
logForDebugging(`Skipping non-Git bash launcher (incompatible with Windows paths): ${candidatePath}`);
|
|
61603
61606
|
continue;
|
|
61604
61607
|
}
|
|
61605
61608
|
const candidateDirectory = pathWin32.dirname(pathWin32.resolve(candidatePath)).toLowerCase();
|
|
@@ -61631,10 +61634,6 @@ function findGitBashPathOrNullWithDeps(deps = DEFAULT_DEPS) {
|
|
|
61631
61634
|
if (envOverride) {
|
|
61632
61635
|
return deps.checkExists(envOverride) ? envOverride : null;
|
|
61633
61636
|
}
|
|
61634
|
-
const bashPath = findExecutableWithDeps("bash", deps);
|
|
61635
|
-
if (bashPath && deps.checkExists(bashPath)) {
|
|
61636
|
-
return bashPath;
|
|
61637
|
-
}
|
|
61638
61637
|
const gitPath = findExecutableWithDeps("git", deps);
|
|
61639
61638
|
if (gitPath) {
|
|
61640
61639
|
const candidates = [
|
|
@@ -61642,11 +61641,20 @@ function findGitBashPathOrNullWithDeps(deps = DEFAULT_DEPS) {
|
|
|
61642
61641
|
pathWin32.join(gitPath, "..", "..", "usr", "bin", "bash.exe"),
|
|
61643
61642
|
pathWin32.join(gitPath, "..", "bash.exe")
|
|
61644
61643
|
];
|
|
61645
|
-
const derivedPath = candidates.find(
|
|
61644
|
+
const derivedPath = candidates.find((candidate) => {
|
|
61645
|
+
if (isNonGitBash(candidate)) {
|
|
61646
|
+
return false;
|
|
61647
|
+
}
|
|
61648
|
+
return deps.checkExists(candidate);
|
|
61649
|
+
});
|
|
61646
61650
|
if (derivedPath) {
|
|
61647
61651
|
return derivedPath;
|
|
61648
61652
|
}
|
|
61649
61653
|
}
|
|
61654
|
+
const bashPath = findExecutableWithDeps("bash", deps);
|
|
61655
|
+
if (bashPath && deps.checkExists(bashPath)) {
|
|
61656
|
+
return bashPath;
|
|
61657
|
+
}
|
|
61650
61658
|
return findCommonGitBashPath(deps.checkExists, deps.userProfile);
|
|
61651
61659
|
}
|
|
61652
61660
|
var DEFAULT_DEPS, findGitBashPathOrNull, windowsPathToPosixPath, posixPathToWindowsPath;
|
|
@@ -138549,7 +138557,7 @@ var init_user = __esm(() => {
|
|
|
138549
138557
|
deviceId,
|
|
138550
138558
|
sessionId: getSessionId(),
|
|
138551
138559
|
email: getEmail(),
|
|
138552
|
-
appVersion: "4.2.
|
|
138560
|
+
appVersion: "4.2.24",
|
|
138553
138561
|
platform: getHostPlatformForAnalytics(),
|
|
138554
138562
|
organizationUuid,
|
|
138555
138563
|
accountUuid,
|
|
@@ -138836,7 +138844,7 @@ var init_metadata = __esm(() => {
|
|
|
138836
138844
|
"sed"
|
|
138837
138845
|
]);
|
|
138838
138846
|
getVersionBase = memoize_default(() => {
|
|
138839
|
-
const match = "4.2.
|
|
138847
|
+
const match = "4.2.24".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
138840
138848
|
return match ? match[0] : undefined;
|
|
138841
138849
|
});
|
|
138842
138850
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -138876,9 +138884,9 @@ var init_metadata = __esm(() => {
|
|
|
138876
138884
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
138877
138885
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
138878
138886
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
138879
|
-
version: "4.2.
|
|
138887
|
+
version: "4.2.24",
|
|
138880
138888
|
versionBase: getVersionBase(),
|
|
138881
|
-
buildTime: "2026-08-
|
|
138889
|
+
buildTime: "2026-08-04T09:20:59.781Z",
|
|
138882
138890
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
138883
138891
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
138884
138892
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -143216,5 +143224,5 @@ export {
|
|
|
143216
143224
|
isParentHeartbeatValid
|
|
143217
143225
|
};
|
|
143218
143226
|
|
|
143219
|
-
//# debugId=
|
|
143227
|
+
//# debugId=3B86544BA0122FB764756E2164756E21
|
|
143220
143228
|
|