localclawd 1.9.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +272 -208
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -87608,7 +87608,7 @@ var init_isEqual = __esm(() => {
|
|
|
87608
87608
|
|
|
87609
87609
|
// src/utils/userAgent.ts
|
|
87610
87610
|
function getClaudeCodeUserAgent() {
|
|
87611
|
-
return `claude-code/${"
|
|
87611
|
+
return `claude-code/${"2.0.0"}`;
|
|
87612
87612
|
}
|
|
87613
87613
|
|
|
87614
87614
|
// src/utils/workloadContext.ts
|
|
@@ -87630,7 +87630,7 @@ function getUserAgent() {
|
|
|
87630
87630
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
87631
87631
|
const workload = getWorkload();
|
|
87632
87632
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
87633
|
-
return `claude-cli/${"
|
|
87633
|
+
return `claude-cli/${"2.0.0"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
87634
87634
|
}
|
|
87635
87635
|
function getMCPUserAgent() {
|
|
87636
87636
|
const parts = [];
|
|
@@ -87644,7 +87644,7 @@ function getMCPUserAgent() {
|
|
|
87644
87644
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
87645
87645
|
}
|
|
87646
87646
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
87647
|
-
return `claude-code/${"
|
|
87647
|
+
return `claude-code/${"2.0.0"}${suffix}`;
|
|
87648
87648
|
}
|
|
87649
87649
|
function getWebFetchUserAgent() {
|
|
87650
87650
|
return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
|
|
@@ -130840,7 +130840,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
130840
130840
|
if (!isAttributionHeaderEnabled()) {
|
|
130841
130841
|
return "";
|
|
130842
130842
|
}
|
|
130843
|
-
const version = `${"
|
|
130843
|
+
const version = `${"2.0.0"}.${fingerprint}`;
|
|
130844
130844
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
130845
130845
|
const cch = "";
|
|
130846
130846
|
const workload = getWorkload();
|
|
@@ -147029,7 +147029,7 @@ var init_metadata = __esm(() => {
|
|
|
147029
147029
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
147030
147030
|
WHITESPACE_REGEX = /\s+/;
|
|
147031
147031
|
getVersionBase = memoize_default(() => {
|
|
147032
|
-
const match = "
|
|
147032
|
+
const match = "2.0.0".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
147033
147033
|
return match ? match[0] : undefined;
|
|
147034
147034
|
});
|
|
147035
147035
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -147069,9 +147069,9 @@ var init_metadata = __esm(() => {
|
|
|
147069
147069
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
147070
147070
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
147071
147071
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
147072
|
-
version: "
|
|
147072
|
+
version: "2.0.0",
|
|
147073
147073
|
versionBase: getVersionBase(),
|
|
147074
|
-
buildTime: "2026-05-
|
|
147074
|
+
buildTime: "2026-05-07T20:13:14.831Z",
|
|
147075
147075
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
147076
147076
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
147077
147077
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -179647,7 +179647,7 @@ function getTelemetryAttributes() {
|
|
|
179647
179647
|
attributes["session.id"] = sessionId;
|
|
179648
179648
|
}
|
|
179649
179649
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
179650
|
-
attributes["app.version"] = "
|
|
179650
|
+
attributes["app.version"] = "2.0.0";
|
|
179651
179651
|
}
|
|
179652
179652
|
const oauthAccount = getOauthAccountInfo();
|
|
179653
179653
|
if (oauthAccount) {
|
|
@@ -242451,7 +242451,7 @@ function getInstallationEnv() {
|
|
|
242451
242451
|
return;
|
|
242452
242452
|
}
|
|
242453
242453
|
function getClaudeCodeVersion() {
|
|
242454
|
-
return "
|
|
242454
|
+
return "2.0.0";
|
|
242455
242455
|
}
|
|
242456
242456
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
242457
242457
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -247725,7 +247725,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
247725
247725
|
const client4 = new Client({
|
|
247726
247726
|
name: "localclawd",
|
|
247727
247727
|
title: "localclawd",
|
|
247728
|
-
version: "
|
|
247728
|
+
version: "2.0.0",
|
|
247729
247729
|
description: "local-first AI coding tool",
|
|
247730
247730
|
websiteUrl: PRODUCT_URL
|
|
247731
247731
|
}, {
|
|
@@ -248067,7 +248067,7 @@ var init_client9 = __esm(() => {
|
|
|
248067
248067
|
const client4 = new Client({
|
|
248068
248068
|
name: "localclawd",
|
|
248069
248069
|
title: "localclawd",
|
|
248070
|
-
version: "
|
|
248070
|
+
version: "2.0.0",
|
|
248071
248071
|
description: "local-first AI coding tool",
|
|
248072
248072
|
websiteUrl: PRODUCT_URL
|
|
248073
248073
|
}, {
|
|
@@ -262469,7 +262469,7 @@ function computeFingerprint(messageText, version) {
|
|
|
262469
262469
|
}
|
|
262470
262470
|
function computeFingerprintFromMessages(messages) {
|
|
262471
262471
|
const firstMessageText = extractFirstMessageText(messages);
|
|
262472
|
-
return computeFingerprint(firstMessageText, "
|
|
262472
|
+
return computeFingerprint(firstMessageText, "2.0.0");
|
|
262473
262473
|
}
|
|
262474
262474
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
262475
262475
|
var init_fingerprint = () => {};
|
|
@@ -262511,7 +262511,7 @@ async function sideQuery(opts) {
|
|
|
262511
262511
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
262512
262512
|
}
|
|
262513
262513
|
const messageText = extractFirstUserMessageText(messages);
|
|
262514
|
-
const fingerprint = computeFingerprint(messageText, "
|
|
262514
|
+
const fingerprint = computeFingerprint(messageText, "2.0.0");
|
|
262515
262515
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
262516
262516
|
const systemBlocks = [
|
|
262517
262517
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -283259,7 +283259,7 @@ var init_user = __esm(() => {
|
|
|
283259
283259
|
deviceId,
|
|
283260
283260
|
sessionId: getSessionId(),
|
|
283261
283261
|
email: getEmail(),
|
|
283262
|
-
appVersion: "
|
|
283262
|
+
appVersion: "2.0.0",
|
|
283263
283263
|
platform: getHostPlatformForAnalytics(),
|
|
283264
283264
|
organizationUuid,
|
|
283265
283265
|
accountUuid,
|
|
@@ -284324,7 +284324,7 @@ async function initializeBetaTracing(resource) {
|
|
|
284324
284324
|
});
|
|
284325
284325
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
284326
284326
|
setLoggerProvider(loggerProvider);
|
|
284327
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "
|
|
284327
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "2.0.0");
|
|
284328
284328
|
setEventLogger(eventLogger);
|
|
284329
284329
|
process.on("beforeExit", async () => {
|
|
284330
284330
|
await loggerProvider?.forceFlush();
|
|
@@ -284364,7 +284364,7 @@ async function initializeTelemetry() {
|
|
|
284364
284364
|
const platform2 = getPlatform();
|
|
284365
284365
|
const baseAttributes = {
|
|
284366
284366
|
[ATTR_SERVICE_NAME4]: "claude-code",
|
|
284367
|
-
[ATTR_SERVICE_VERSION4]: "
|
|
284367
|
+
[ATTR_SERVICE_VERSION4]: "2.0.0"
|
|
284368
284368
|
};
|
|
284369
284369
|
if (platform2 === "wsl") {
|
|
284370
284370
|
const wslVersion = getWslVersion();
|
|
@@ -284409,7 +284409,7 @@ async function initializeTelemetry() {
|
|
|
284409
284409
|
} catch {}
|
|
284410
284410
|
};
|
|
284411
284411
|
registerCleanup(shutdownTelemetry2);
|
|
284412
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "
|
|
284412
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "2.0.0");
|
|
284413
284413
|
}
|
|
284414
284414
|
const meterProvider = new MeterProvider4({
|
|
284415
284415
|
resource,
|
|
@@ -284429,7 +284429,7 @@ async function initializeTelemetry() {
|
|
|
284429
284429
|
});
|
|
284430
284430
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
284431
284431
|
setLoggerProvider(loggerProvider);
|
|
284432
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "
|
|
284432
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "2.0.0");
|
|
284433
284433
|
setEventLogger(eventLogger);
|
|
284434
284434
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
284435
284435
|
process.on("beforeExit", async () => {
|
|
@@ -284491,7 +284491,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
284491
284491
|
}
|
|
284492
284492
|
};
|
|
284493
284493
|
registerCleanup(shutdownTelemetry);
|
|
284494
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "
|
|
284494
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "2.0.0");
|
|
284495
284495
|
}
|
|
284496
284496
|
async function flushTelemetry() {
|
|
284497
284497
|
const meterProvider = getMeterProvider();
|
|
@@ -285681,7 +285681,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
285681
285681
|
}
|
|
285682
285682
|
async function getDoctorDiagnostic() {
|
|
285683
285683
|
const installationType = await getCurrentInstallationType();
|
|
285684
|
-
const version = typeof MACRO !== "undefined" ? "
|
|
285684
|
+
const version = typeof MACRO !== "undefined" ? "2.0.0" : "unknown";
|
|
285685
285685
|
const installationPath = await getInstallationPath();
|
|
285686
285686
|
const invokedBinary = getInvokedBinary();
|
|
285687
285687
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -286622,8 +286622,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
286622
286622
|
const maxVersion = await getMaxVersion();
|
|
286623
286623
|
if (maxVersion && gt(version, maxVersion)) {
|
|
286624
286624
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version} to ${maxVersion}`);
|
|
286625
|
-
if (gte("
|
|
286626
|
-
logForDebugging(`Native installer: current version ${"
|
|
286625
|
+
if (gte("2.0.0", maxVersion)) {
|
|
286626
|
+
logForDebugging(`Native installer: current version ${"2.0.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
286627
286627
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
286628
286628
|
latency_ms: Date.now() - startTime,
|
|
286629
286629
|
max_version: maxVersion,
|
|
@@ -286634,7 +286634,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
286634
286634
|
version = maxVersion;
|
|
286635
286635
|
}
|
|
286636
286636
|
}
|
|
286637
|
-
if (!forceReinstall && version === "
|
|
286637
|
+
if (!forceReinstall && version === "2.0.0" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
|
|
286638
286638
|
logForDebugging(`Found ${version} at ${executablePath}, skipping install`);
|
|
286639
286639
|
logEvent("tengu_native_update_complete", {
|
|
286640
286640
|
latency_ms: Date.now() - startTime,
|
|
@@ -323152,9 +323152,10 @@ function renderToolUseMessage21(input) {
|
|
|
323152
323152
|
return input.prompt ?? null;
|
|
323153
323153
|
}
|
|
323154
323154
|
function renderToolUseErrorMessage11(error5) {
|
|
323155
|
+
const msg = error5 instanceof Error ? error5.message ?? "unknown error" : error5 != null ? String(error5) : "unknown error";
|
|
323155
323156
|
return /* @__PURE__ */ jsx_dev_runtime145.jsxDEV(ThemedText, {
|
|
323156
323157
|
color: "red",
|
|
323157
|
-
children: `GenerateImage error: ${
|
|
323158
|
+
children: `GenerateImage error: ${msg}`
|
|
323158
323159
|
}, undefined, false, undefined, this);
|
|
323159
323160
|
}
|
|
323160
323161
|
function renderToolResultMessage20(output) {
|
|
@@ -323181,6 +323182,117 @@ function timestamp() {
|
|
|
323181
323182
|
const pad = (n) => String(n).padStart(2, "0");
|
|
323182
323183
|
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}_${pad(d.getHours())}-${pad(d.getMinutes())}-${pad(d.getSeconds())}`;
|
|
323183
323184
|
}
|
|
323185
|
+
async function callInner(input, abortController) {
|
|
323186
|
+
const projectRoot = getCwd();
|
|
323187
|
+
const config = await loadConfig(projectRoot);
|
|
323188
|
+
const configuredUrl = config?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
323189
|
+
let backendUrl = DEFAULT_COMFYUI_URL;
|
|
323190
|
+
if (!await detectComfyUI(DEFAULT_COMFYUI_URL)) {
|
|
323191
|
+
if (configuredUrl !== DEFAULT_COMFYUI_URL && await detectComfyUI(configuredUrl)) {
|
|
323192
|
+
backendUrl = configuredUrl;
|
|
323193
|
+
} else {
|
|
323194
|
+
return {
|
|
323195
|
+
data: {
|
|
323196
|
+
path: "",
|
|
323197
|
+
filename: "",
|
|
323198
|
+
promptId: "",
|
|
323199
|
+
seed: 0,
|
|
323200
|
+
backend: configuredUrl,
|
|
323201
|
+
error: `ComfyUI not reachable at ${DEFAULT_COMFYUI_URL}${configuredUrl !== DEFAULT_COMFYUI_URL ? ` or ${configuredUrl}` : ""}. Start ComfyUI or run /image-pipeline config <url>.`
|
|
323202
|
+
}
|
|
323203
|
+
};
|
|
323204
|
+
}
|
|
323205
|
+
}
|
|
323206
|
+
if (abortController.signal.aborted) {
|
|
323207
|
+
return { data: { path: "", filename: "", promptId: "", seed: 0, backend: backendUrl, error: "Aborted" } };
|
|
323208
|
+
}
|
|
323209
|
+
const seed = input.seed ?? Math.floor(Math.random() * 2 ** 32);
|
|
323210
|
+
const negativePrompt = input.negative_prompt ?? "blurry, low quality, watermark, deformed";
|
|
323211
|
+
const workflowName = input.workflow ?? config?.defaultWorkflow;
|
|
323212
|
+
const workflowBase = workflowName ? await loadWorkflow(projectRoot, workflowName) : null;
|
|
323213
|
+
const usingBuiltIn = !workflowBase;
|
|
323214
|
+
const injectParams = usingBuiltIn ? {
|
|
323215
|
+
seed,
|
|
323216
|
+
model: input.model ?? config?.defaultModel ?? "v1-5-pruned-emaonly.safetensors",
|
|
323217
|
+
width: input.width ?? config?.defaultWidth ?? 512,
|
|
323218
|
+
height: input.height ?? config?.defaultHeight ?? 512,
|
|
323219
|
+
steps: input.steps ?? config?.defaultSteps ?? 20,
|
|
323220
|
+
cfg: input.cfg ?? config?.defaultCfg ?? 7
|
|
323221
|
+
} : {
|
|
323222
|
+
seed,
|
|
323223
|
+
...input.model && { model: input.model },
|
|
323224
|
+
...input.width && { width: input.width },
|
|
323225
|
+
...input.height && { height: input.height },
|
|
323226
|
+
...input.steps && { steps: input.steps },
|
|
323227
|
+
...input.cfg && { cfg: input.cfg }
|
|
323228
|
+
};
|
|
323229
|
+
const workflow = injectPrompt(workflowBase ?? DEFAULT_WORKFLOW, input.prompt, negativePrompt, injectParams);
|
|
323230
|
+
let queued;
|
|
323231
|
+
try {
|
|
323232
|
+
queued = await queuePrompt(backendUrl, workflow);
|
|
323233
|
+
} catch (e) {
|
|
323234
|
+
return {
|
|
323235
|
+
data: { path: "", filename: "", promptId: "", seed, backend: backendUrl, error: `Queue failed: ${String(e)}` }
|
|
323236
|
+
};
|
|
323237
|
+
}
|
|
323238
|
+
if (abortController.signal.aborted) {
|
|
323239
|
+
return { data: { path: "", filename: "", promptId: queued.prompt_id, seed, backend: backendUrl, error: "Aborted" } };
|
|
323240
|
+
}
|
|
323241
|
+
const result = await pollForCompletion(backendUrl, queued.prompt_id);
|
|
323242
|
+
if (!result) {
|
|
323243
|
+
return {
|
|
323244
|
+
data: {
|
|
323245
|
+
path: "",
|
|
323246
|
+
filename: "",
|
|
323247
|
+
promptId: queued.prompt_id,
|
|
323248
|
+
seed,
|
|
323249
|
+
backend: backendUrl,
|
|
323250
|
+
error: `Timed out. Check ComfyUI: ${backendUrl}/history/${queued.prompt_id}`
|
|
323251
|
+
}
|
|
323252
|
+
};
|
|
323253
|
+
}
|
|
323254
|
+
const comfyImages = extractOutputImages(result);
|
|
323255
|
+
const firstImage = comfyImages[0];
|
|
323256
|
+
if (!firstImage) {
|
|
323257
|
+
return {
|
|
323258
|
+
data: { path: "", filename: "", promptId: queued.prompt_id, seed, backend: backendUrl, error: "Job completed but no output images found" }
|
|
323259
|
+
};
|
|
323260
|
+
}
|
|
323261
|
+
const allImageMeta = Object.values(result.outputs).flatMap((o) => o.images ?? []);
|
|
323262
|
+
const imgMeta = allImageMeta.find((img) => img.filename === firstImage);
|
|
323263
|
+
const subfolder = imgMeta?.subfolder ?? "";
|
|
323264
|
+
const imgType = imgMeta?.type ?? "output";
|
|
323265
|
+
let rawBytes = null;
|
|
323266
|
+
try {
|
|
323267
|
+
const params = new URLSearchParams({ filename: firstImage, subfolder, type: imgType });
|
|
323268
|
+
const res = await fetch(`${backendUrl}/view?${params}`);
|
|
323269
|
+
if (res.ok) {
|
|
323270
|
+
rawBytes = Buffer.from(await res.arrayBuffer());
|
|
323271
|
+
}
|
|
323272
|
+
} catch {}
|
|
323273
|
+
const outputDir = join80(getCwd(), ".localclawd", "image-pipeline", "generated").replace(/\\/g, "/");
|
|
323274
|
+
await mkdir20(outputDir, { recursive: true });
|
|
323275
|
+
const outName = `${timestamp()}_${slugify(input.prompt)}.png`;
|
|
323276
|
+
const savedPath = join80(outputDir, outName).replace(/\\/g, "/");
|
|
323277
|
+
if (rawBytes) {
|
|
323278
|
+
await writeFile20(savedPath, rawBytes);
|
|
323279
|
+
}
|
|
323280
|
+
const data = {
|
|
323281
|
+
path: savedPath,
|
|
323282
|
+
filename: outName,
|
|
323283
|
+
promptId: queued.prompt_id,
|
|
323284
|
+
seed,
|
|
323285
|
+
backend: backendUrl
|
|
323286
|
+
};
|
|
323287
|
+
const imageBytes = rawBytes ?? await readFile27(savedPath).catch(() => null);
|
|
323288
|
+
if (imageBytes && imageBytes.length > 0) {
|
|
323289
|
+
imageDataCache.set(data, {
|
|
323290
|
+
base64: imageBytes.toString("base64"),
|
|
323291
|
+
mediaType: "image/png"
|
|
323292
|
+
});
|
|
323293
|
+
}
|
|
323294
|
+
return { data };
|
|
323295
|
+
}
|
|
323184
323296
|
var inputSchema27, outputSchema23, imageDataCache, GenerateImageTool;
|
|
323185
323297
|
var init_GenerateImageTool = __esm(() => {
|
|
323186
323298
|
init_Tool();
|
|
@@ -323238,7 +323350,7 @@ var init_GenerateImageTool = __esm(() => {
|
|
|
323238
323350
|
async checkPermissions(_input, _context) {
|
|
323239
323351
|
return {
|
|
323240
323352
|
behavior: "ask",
|
|
323241
|
-
message: "localclawd wants to generate an image via ComfyUI and save it to
|
|
323353
|
+
message: "localclawd wants to generate an image via ComfyUI and save it to .localclawd/image-pipeline/generated/."
|
|
323242
323354
|
};
|
|
323243
323355
|
},
|
|
323244
323356
|
async prompt() {
|
|
@@ -323248,115 +323360,14 @@ var init_GenerateImageTool = __esm(() => {
|
|
|
323248
323360
|
renderToolUseErrorMessage: renderToolUseErrorMessage11,
|
|
323249
323361
|
renderToolResultMessage: renderToolResultMessage20,
|
|
323250
323362
|
async call(input, { abortController }) {
|
|
323251
|
-
const projectRoot = getCwd();
|
|
323252
|
-
const config = await loadConfig(projectRoot);
|
|
323253
|
-
const configuredUrl = config?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
323254
|
-
let backendUrl = DEFAULT_COMFYUI_URL;
|
|
323255
|
-
if (!await detectComfyUI(DEFAULT_COMFYUI_URL)) {
|
|
323256
|
-
if (configuredUrl !== DEFAULT_COMFYUI_URL && await detectComfyUI(configuredUrl)) {
|
|
323257
|
-
backendUrl = configuredUrl;
|
|
323258
|
-
} else {
|
|
323259
|
-
return {
|
|
323260
|
-
data: {
|
|
323261
|
-
path: "",
|
|
323262
|
-
filename: "",
|
|
323263
|
-
promptId: "",
|
|
323264
|
-
seed: 0,
|
|
323265
|
-
backend: configuredUrl,
|
|
323266
|
-
error: `ComfyUI not reachable at ${DEFAULT_COMFYUI_URL}${configuredUrl !== DEFAULT_COMFYUI_URL ? ` or ${configuredUrl}` : ""}. Start ComfyUI or run /image-pipeline config <url>.`
|
|
323267
|
-
}
|
|
323268
|
-
};
|
|
323269
|
-
}
|
|
323270
|
-
}
|
|
323271
|
-
if (abortController.signal.aborted) {
|
|
323272
|
-
return { data: { path: "", filename: "", promptId: "", seed: 0, backend: backendUrl, error: "Aborted" } };
|
|
323273
|
-
}
|
|
323274
|
-
const seed = input.seed ?? Math.floor(Math.random() * 2 ** 32);
|
|
323275
|
-
const negativePrompt = input.negative_prompt ?? "blurry, low quality, watermark, deformed";
|
|
323276
|
-
const workflowName = input.workflow ?? config?.defaultWorkflow;
|
|
323277
|
-
const workflowBase = workflowName ? await loadWorkflow(projectRoot, workflowName) : null;
|
|
323278
|
-
const usingBuiltIn = !workflowBase;
|
|
323279
|
-
const injectParams = usingBuiltIn ? {
|
|
323280
|
-
seed,
|
|
323281
|
-
model: input.model ?? config?.defaultModel ?? "v1-5-pruned-emaonly.safetensors",
|
|
323282
|
-
width: input.width ?? config?.defaultWidth ?? 512,
|
|
323283
|
-
height: input.height ?? config?.defaultHeight ?? 512,
|
|
323284
|
-
steps: input.steps ?? config?.defaultSteps ?? 20,
|
|
323285
|
-
cfg: input.cfg ?? config?.defaultCfg ?? 7
|
|
323286
|
-
} : {
|
|
323287
|
-
seed,
|
|
323288
|
-
...input.model && { model: input.model },
|
|
323289
|
-
...input.width && { width: input.width },
|
|
323290
|
-
...input.height && { height: input.height },
|
|
323291
|
-
...input.steps && { steps: input.steps },
|
|
323292
|
-
...input.cfg && { cfg: input.cfg }
|
|
323293
|
-
};
|
|
323294
|
-
const workflow = injectPrompt(workflowBase ?? DEFAULT_WORKFLOW, input.prompt, negativePrompt, injectParams);
|
|
323295
|
-
let queued;
|
|
323296
323363
|
try {
|
|
323297
|
-
|
|
323364
|
+
return await callInner(input, abortController);
|
|
323298
323365
|
} catch (e) {
|
|
323366
|
+
const msg = e instanceof Error ? e.message || e.constructor.name : e != null ? String(e) : "unknown error";
|
|
323299
323367
|
return {
|
|
323300
|
-
data: { path: "", filename: "", promptId: "", seed, backend:
|
|
323301
|
-
};
|
|
323302
|
-
}
|
|
323303
|
-
if (abortController.signal.aborted) {
|
|
323304
|
-
return { data: { path: "", filename: "", promptId: queued.prompt_id, seed, backend: backendUrl, error: "Aborted" } };
|
|
323305
|
-
}
|
|
323306
|
-
const result = await pollForCompletion(backendUrl, queued.prompt_id);
|
|
323307
|
-
if (!result) {
|
|
323308
|
-
return {
|
|
323309
|
-
data: {
|
|
323310
|
-
path: "",
|
|
323311
|
-
filename: "",
|
|
323312
|
-
promptId: queued.prompt_id,
|
|
323313
|
-
seed,
|
|
323314
|
-
backend: backendUrl,
|
|
323315
|
-
error: `Timed out. Check ComfyUI: ${backendUrl}/history/${queued.prompt_id}`
|
|
323316
|
-
}
|
|
323317
|
-
};
|
|
323318
|
-
}
|
|
323319
|
-
const comfyImages = extractOutputImages(result);
|
|
323320
|
-
const firstImage = comfyImages[0];
|
|
323321
|
-
if (!firstImage) {
|
|
323322
|
-
return {
|
|
323323
|
-
data: { path: "", filename: "", promptId: queued.prompt_id, seed, backend: backendUrl, error: "Job completed but no output images found" }
|
|
323368
|
+
data: { path: "", filename: "", promptId: "", seed: 0, backend: DEFAULT_COMFYUI_URL, error: `GenerateImage failed: ${msg}` }
|
|
323324
323369
|
};
|
|
323325
323370
|
}
|
|
323326
|
-
const allImageMeta = Object.values(result.outputs).flatMap((o) => o.images ?? []);
|
|
323327
|
-
const imgMeta = allImageMeta.find((img) => img.filename === firstImage);
|
|
323328
|
-
const subfolder = imgMeta?.subfolder ?? "";
|
|
323329
|
-
const imgType = imgMeta?.type ?? "output";
|
|
323330
|
-
let rawBytes = null;
|
|
323331
|
-
try {
|
|
323332
|
-
const params = new URLSearchParams({ filename: firstImage, subfolder, type: imgType });
|
|
323333
|
-
const res = await fetch(`${backendUrl}/view?${params}`);
|
|
323334
|
-
if (res.ok) {
|
|
323335
|
-
rawBytes = Buffer.from(await res.arrayBuffer());
|
|
323336
|
-
}
|
|
323337
|
-
} catch {}
|
|
323338
|
-
const outputDir = join80(getCwd(), ".localclawd", "image-pipeline", "generated").replace(/\\/g, "/");
|
|
323339
|
-
await mkdir20(outputDir, { recursive: true });
|
|
323340
|
-
const outName = `${timestamp()}_${slugify(input.prompt)}.png`;
|
|
323341
|
-
const savedPath = join80(outputDir, outName).replace(/\\/g, "/");
|
|
323342
|
-
if (rawBytes) {
|
|
323343
|
-
await writeFile20(savedPath, rawBytes);
|
|
323344
|
-
}
|
|
323345
|
-
const data = {
|
|
323346
|
-
path: savedPath,
|
|
323347
|
-
filename: outName,
|
|
323348
|
-
promptId: queued.prompt_id,
|
|
323349
|
-
seed,
|
|
323350
|
-
backend: backendUrl
|
|
323351
|
-
};
|
|
323352
|
-
const imageBytes = rawBytes ?? await readFile27(savedPath).catch(() => null);
|
|
323353
|
-
if (imageBytes && imageBytes.length > 0) {
|
|
323354
|
-
imageDataCache.set(data, {
|
|
323355
|
-
base64: imageBytes.toString("base64"),
|
|
323356
|
-
mediaType: "image/png"
|
|
323357
|
-
});
|
|
323358
|
-
}
|
|
323359
|
-
return { data };
|
|
323360
323371
|
},
|
|
323361
323372
|
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
323362
323373
|
if (output.error) {
|
|
@@ -331835,7 +331846,7 @@ function getAnthropicEnvMetadata() {
|
|
|
331835
331846
|
function getBuildAgeMinutes() {
|
|
331836
331847
|
if (false)
|
|
331837
331848
|
;
|
|
331838
|
-
const buildTime = new Date("2026-05-
|
|
331849
|
+
const buildTime = new Date("2026-05-07T20:13:14.831Z").getTime();
|
|
331839
331850
|
if (isNaN(buildTime))
|
|
331840
331851
|
return;
|
|
331841
331852
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -342139,7 +342150,7 @@ function createImageResponse(buffer, mediaType, originalSize, dimensions) {
|
|
|
342139
342150
|
}
|
|
342140
342151
|
};
|
|
342141
342152
|
}
|
|
342142
|
-
async function
|
|
342153
|
+
async function callInner2(file_path, fullFilePath, resolvedFilePath, ext, offset, limit, pages, maxSizeBytes, maxTokens, readFileState, context5, messageId) {
|
|
342143
342154
|
if (ext === "ipynb") {
|
|
342144
342155
|
const cells = await readNotebook(resolvedFilePath);
|
|
342145
342156
|
const cellsJson = jsonStringify(cells);
|
|
@@ -342679,14 +342690,14 @@ var init_FileReadTool = __esm(() => {
|
|
|
342679
342690
|
activateConditionalSkillsForPaths([fullFilePath], cwd2);
|
|
342680
342691
|
}
|
|
342681
342692
|
try {
|
|
342682
|
-
return await
|
|
342693
|
+
return await callInner2(file_path, fullFilePath, fullFilePath, ext, offset, limit, pages, maxSizeBytes, maxTokens, readFileState, context5, parentMessage?.message.id);
|
|
342683
342694
|
} catch (error5) {
|
|
342684
342695
|
const code = getErrnoCode(error5);
|
|
342685
342696
|
if (code === "ENOENT") {
|
|
342686
342697
|
const altPath = getAlternateScreenshotPath(fullFilePath);
|
|
342687
342698
|
if (altPath) {
|
|
342688
342699
|
try {
|
|
342689
|
-
return await
|
|
342700
|
+
return await callInner2(file_path, fullFilePath, altPath, ext, offset, limit, pages, maxSizeBytes, maxTokens, readFileState, context5, parentMessage?.message.id);
|
|
342690
342701
|
} catch (altError) {
|
|
342691
342702
|
if (!isENOENT(altError)) {
|
|
342692
342703
|
throw altError;
|
|
@@ -360667,7 +360678,7 @@ function Feedback({
|
|
|
360667
360678
|
platform: env3.platform,
|
|
360668
360679
|
gitRepo: envInfo.isGit,
|
|
360669
360680
|
terminal: env3.terminal,
|
|
360670
|
-
version: "
|
|
360681
|
+
version: "2.0.0",
|
|
360671
360682
|
transcript: normalizeMessagesForAPI(messages),
|
|
360672
360683
|
errors: sanitizedErrors,
|
|
360673
360684
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -360859,7 +360870,7 @@ function Feedback({
|
|
|
360859
360870
|
", ",
|
|
360860
360871
|
env3.terminal,
|
|
360861
360872
|
", v",
|
|
360862
|
-
"
|
|
360873
|
+
"2.0.0"
|
|
360863
360874
|
]
|
|
360864
360875
|
}, undefined, true, undefined, this)
|
|
360865
360876
|
]
|
|
@@ -360965,7 +360976,7 @@ ${sanitizedDescription}
|
|
|
360965
360976
|
` + `**Environment Info**
|
|
360966
360977
|
` + `- Platform: ${env3.platform}
|
|
360967
360978
|
` + `- Terminal: ${env3.terminal}
|
|
360968
|
-
` + `- Version: ${"
|
|
360979
|
+
` + `- Version: ${"2.0.0"}
|
|
360969
360980
|
` + `- Feedback ID: ${feedbackId}
|
|
360970
360981
|
` + `
|
|
360971
360982
|
**Errors**
|
|
@@ -363593,7 +363604,7 @@ function buildPrimarySection() {
|
|
|
363593
363604
|
}, undefined, false, undefined, this);
|
|
363594
363605
|
return [{
|
|
363595
363606
|
label: "Version",
|
|
363596
|
-
value: "
|
|
363607
|
+
value: "2.0.0"
|
|
363597
363608
|
}, {
|
|
363598
363609
|
label: "Session name",
|
|
363599
363610
|
value: nameValue
|
|
@@ -368274,7 +368285,7 @@ function Config({
|
|
|
368274
368285
|
}
|
|
368275
368286
|
}, undefined, false, undefined, this)
|
|
368276
368287
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
|
|
368277
|
-
currentVersion: "
|
|
368288
|
+
currentVersion: "2.0.0",
|
|
368278
368289
|
onChoice: (choice) => {
|
|
368279
368290
|
setShowSubmenu(null);
|
|
368280
368291
|
setTabsHidden(false);
|
|
@@ -368286,7 +368297,7 @@ function Config({
|
|
|
368286
368297
|
autoUpdatesChannel: "stable"
|
|
368287
368298
|
};
|
|
368288
368299
|
if (choice === "stay") {
|
|
368289
|
-
newSettings.minimumVersion = "
|
|
368300
|
+
newSettings.minimumVersion = "2.0.0";
|
|
368290
368301
|
}
|
|
368291
368302
|
updateSettingsForSource("userSettings", newSettings);
|
|
368292
368303
|
setSettingsData((prev_27) => ({
|
|
@@ -377465,7 +377476,26 @@ function KeepGoingDone({
|
|
|
377465
377476
|
]
|
|
377466
377477
|
}, undefined, true, undefined, this);
|
|
377467
377478
|
}
|
|
377468
|
-
|
|
377479
|
+
function logKgCrash(error5, context7) {
|
|
377480
|
+
const msg = error5 instanceof Error ? error5.stack ?? error5.message : String(error5);
|
|
377481
|
+
try {
|
|
377482
|
+
const { appendFileSync: appendFileSync3, mkdirSync: mkdirSync6 } = __require("fs");
|
|
377483
|
+
const { homedir: homedir26 } = __require("os");
|
|
377484
|
+
const { join: join117 } = __require("path");
|
|
377485
|
+
const dir = join117(homedir26(), ".claude");
|
|
377486
|
+
mkdirSync6(dir, { recursive: true });
|
|
377487
|
+
appendFileSync3(join117(dir, "crash.log"), `[${new Date().toISOString()}] keepgoing ${context7}: ${msg}
|
|
377488
|
+
`);
|
|
377489
|
+
} catch {}
|
|
377490
|
+
}
|
|
377491
|
+
function safeSend(fn) {
|
|
377492
|
+
try {
|
|
377493
|
+
fn().catch((e) => logKgCrash(e, "send"));
|
|
377494
|
+
} catch (e) {
|
|
377495
|
+
logKgCrash(e, "send-sync");
|
|
377496
|
+
}
|
|
377497
|
+
}
|
|
377498
|
+
async function callInner3(onDone, context7, args) {
|
|
377469
377499
|
const rawArgs = args?.trim() ?? "";
|
|
377470
377500
|
const { extractChain: extractChain2 } = await Promise.resolve().then(() => (init_commandChaining(), exports_commandChaining));
|
|
377471
377501
|
const { ownArgs: chainedArgs } = extractChain2(rawArgs);
|
|
@@ -377490,10 +377520,14 @@ var React58, jsx_dev_runtime196, sessionRound = 0, sessionFocus = "", sessionOri
|
|
|
377490
377520
|
}
|
|
377491
377521
|
}));
|
|
377492
377522
|
let lastText = "";
|
|
377493
|
-
|
|
377494
|
-
|
|
377495
|
-
|
|
377496
|
-
|
|
377523
|
+
try {
|
|
377524
|
+
context7.setMessages((prev) => {
|
|
377525
|
+
lastText = extractLastAssistantText(prev);
|
|
377526
|
+
return prev;
|
|
377527
|
+
});
|
|
377528
|
+
} catch (e) {
|
|
377529
|
+
logKgCrash(e, "extractLastAssistantText");
|
|
377530
|
+
}
|
|
377497
377531
|
const contextCompacted = lastText === NO_CONTENT_MESSAGE || lastText.trim() === "";
|
|
377498
377532
|
if (!contextCompacted) {
|
|
377499
377533
|
const newDirective = extractSelfDirective(lastText);
|
|
@@ -377509,13 +377543,13 @@ var React58, jsx_dev_runtime196, sessionRound = 0, sessionFocus = "", sessionOri
|
|
|
377509
377543
|
const header = `\uD83E\uDD16 *Round ${sessionRound}*
|
|
377510
377544
|
${preview}${suffix}`;
|
|
377511
377545
|
if (isTelegramActive())
|
|
377512
|
-
sendTelegramMessage(header);
|
|
377546
|
+
safeSend(() => sendTelegramMessage(header));
|
|
377513
377547
|
if (isSlackActive())
|
|
377514
|
-
sendSlackMessage(header);
|
|
377548
|
+
safeSend(() => sendSlackMessage(header));
|
|
377515
377549
|
if (isDiscordActive())
|
|
377516
|
-
sendDiscordMessage(header);
|
|
377550
|
+
safeSend(() => sendDiscordMessage(header));
|
|
377517
377551
|
if (isSignalActive())
|
|
377518
|
-
sendSignalMessage(header);
|
|
377552
|
+
safeSend(() => sendSignalMessage(header));
|
|
377519
377553
|
}
|
|
377520
377554
|
if (globalStopSignal.get()) {
|
|
377521
377555
|
globalStopSignal.reset();
|
|
@@ -377529,13 +377563,13 @@ ${preview}${suffix}`;
|
|
|
377529
377563
|
const stopMsg = `✅ *keepgoing stopped*
|
|
377530
377564
|
Round ${finalRound} · stopped via /stop`;
|
|
377531
377565
|
if (isTelegramActive())
|
|
377532
|
-
sendTelegramMessage(stopMsg);
|
|
377566
|
+
safeSend(() => sendTelegramMessage(stopMsg));
|
|
377533
377567
|
if (isSlackActive())
|
|
377534
|
-
sendSlackMessage(stopMsg);
|
|
377568
|
+
safeSend(() => sendSlackMessage(stopMsg));
|
|
377535
377569
|
if (isDiscordActive())
|
|
377536
|
-
sendDiscordMessage(stopMsg);
|
|
377570
|
+
safeSend(() => sendDiscordMessage(stopMsg));
|
|
377537
377571
|
if (isSignalActive())
|
|
377538
|
-
sendSignalMessage(stopMsg);
|
|
377572
|
+
safeSend(() => sendSignalMessage(stopMsg));
|
|
377539
377573
|
return /* @__PURE__ */ jsx_dev_runtime196.jsxDEV(KeepGoingDone, {
|
|
377540
377574
|
round: finalRound,
|
|
377541
377575
|
reason: "stopped via /stop",
|
|
@@ -377549,12 +377583,19 @@ Round ${finalRound} · stopped via /stop`;
|
|
|
377549
377583
|
const prompt = useOnboarding ? buildOnboardingPrompt(round, focus, externalMsg, contextCompacted) : buildSelfDirectedPrompt(round, sessionSelfDirective, focus, externalMsg);
|
|
377550
377584
|
const nextCmd = focus ? `/keepgoing ${focus}` : "/keepgoing";
|
|
377551
377585
|
const handleReady = () => {
|
|
377552
|
-
|
|
377553
|
-
|
|
377554
|
-
|
|
377555
|
-
|
|
377556
|
-
|
|
377557
|
-
|
|
377586
|
+
try {
|
|
377587
|
+
enqueue({ value: nextCmd, mode: "prompt", isMeta: true });
|
|
377588
|
+
onDone(undefined, {
|
|
377589
|
+
display: "system",
|
|
377590
|
+
shouldQuery: true,
|
|
377591
|
+
metaMessages: [prompt]
|
|
377592
|
+
});
|
|
377593
|
+
} catch (e) {
|
|
377594
|
+
logKgCrash(e, "handleReady");
|
|
377595
|
+
try {
|
|
377596
|
+
onDone(`⚠ keepgoing recovered from internal error`, { display: "system" });
|
|
377597
|
+
} catch {}
|
|
377598
|
+
}
|
|
377558
377599
|
};
|
|
377559
377600
|
return /* @__PURE__ */ jsx_dev_runtime196.jsxDEV(KeepGoingBanner, {
|
|
377560
377601
|
round,
|
|
@@ -377564,6 +377605,21 @@ Round ${finalRound} · stopped via /stop`;
|
|
|
377564
377605
|
showBypassWarning,
|
|
377565
377606
|
onReady: handleReady
|
|
377566
377607
|
}, undefined, false, undefined, this);
|
|
377608
|
+
}
|
|
377609
|
+
var React58, jsx_dev_runtime196, sessionRound = 0, sessionFocus = "", sessionOriginalMode = "default", sessionSelfDirective = "", call22 = async (onDone, context7, args) => {
|
|
377610
|
+
try {
|
|
377611
|
+
return await callInner3(onDone, context7, args);
|
|
377612
|
+
} catch (error5) {
|
|
377613
|
+
logKgCrash(error5, "call");
|
|
377614
|
+
const msg = error5 instanceof Error ? error5.message : String(error5);
|
|
377615
|
+
try {
|
|
377616
|
+
const rawArgs = args?.trim() ?? "";
|
|
377617
|
+
const nextCmd = rawArgs ? `/keepgoing ${rawArgs}` : "/keepgoing";
|
|
377618
|
+
enqueue({ value: nextCmd, mode: "prompt", isMeta: true });
|
|
377619
|
+
} catch {}
|
|
377620
|
+
onDone(`⚠ keepgoing error (restarting): ${msg}`, { display: "system" });
|
|
377621
|
+
return null;
|
|
377622
|
+
}
|
|
377567
377623
|
};
|
|
377568
377624
|
var init_keepgoing = __esm(() => {
|
|
377569
377625
|
init_ink2();
|
|
@@ -385924,7 +385980,7 @@ function Help(t0) {
|
|
|
385924
385980
|
let t6;
|
|
385925
385981
|
if ($2[31] !== tabs) {
|
|
385926
385982
|
t6 = /* @__PURE__ */ jsx_dev_runtime221.jsxDEV(Tabs, {
|
|
385927
|
-
title: `localclawd v${"
|
|
385983
|
+
title: `localclawd v${"2.0.0"}`,
|
|
385928
385984
|
color: "professionalBlue",
|
|
385929
385985
|
defaultTab: "general",
|
|
385930
385986
|
children: tabs
|
|
@@ -403186,7 +403242,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
|
|
|
403186
403242
|
}
|
|
403187
403243
|
return [];
|
|
403188
403244
|
}
|
|
403189
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "
|
|
403245
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "2.0.0") {
|
|
403190
403246
|
if (process.env.USER_TYPE === "ant") {
|
|
403191
403247
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
403192
403248
|
if (changelog) {
|
|
@@ -403213,7 +403269,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.9.8") {
|
|
|
403213
403269
|
releaseNotes
|
|
403214
403270
|
};
|
|
403215
403271
|
}
|
|
403216
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "
|
|
403272
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "2.0.0") {
|
|
403217
403273
|
if (process.env.USER_TYPE === "ant") {
|
|
403218
403274
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
403219
403275
|
if (changelog) {
|
|
@@ -403370,7 +403426,7 @@ function getRecentActivitySync() {
|
|
|
403370
403426
|
return cachedActivity;
|
|
403371
403427
|
}
|
|
403372
403428
|
function getLogoDisplayData() {
|
|
403373
|
-
const version = process.env.DEMO_VERSION ?? "
|
|
403429
|
+
const version = process.env.DEMO_VERSION ?? "2.0.0";
|
|
403374
403430
|
const serverUrl = getDirectConnectServerUrl();
|
|
403375
403431
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
403376
403432
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -404470,7 +404526,7 @@ function Logo() {
|
|
|
404470
404526
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
404471
404527
|
t2 = () => {
|
|
404472
404528
|
const currentConfig = getGlobalConfig();
|
|
404473
|
-
if (currentConfig.lastReleaseNotesSeen === "
|
|
404529
|
+
if (currentConfig.lastReleaseNotesSeen === "2.0.0") {
|
|
404474
404530
|
return;
|
|
404475
404531
|
}
|
|
404476
404532
|
saveGlobalConfig(_temp326);
|
|
@@ -405129,12 +405185,12 @@ function Logo() {
|
|
|
405129
405185
|
return t41;
|
|
405130
405186
|
}
|
|
405131
405187
|
function _temp326(current) {
|
|
405132
|
-
if (current.lastReleaseNotesSeen === "
|
|
405188
|
+
if (current.lastReleaseNotesSeen === "2.0.0") {
|
|
405133
405189
|
return current;
|
|
405134
405190
|
}
|
|
405135
405191
|
return {
|
|
405136
405192
|
...current,
|
|
405137
|
-
lastReleaseNotesSeen: "
|
|
405193
|
+
lastReleaseNotesSeen: "2.0.0"
|
|
405138
405194
|
};
|
|
405139
405195
|
}
|
|
405140
405196
|
function _temp241(s_0) {
|
|
@@ -435613,7 +435669,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
435613
435669
|
smapsRollup,
|
|
435614
435670
|
platform: process.platform,
|
|
435615
435671
|
nodeVersion: process.version,
|
|
435616
|
-
ccVersion: "
|
|
435672
|
+
ccVersion: "2.0.0"
|
|
435617
435673
|
};
|
|
435618
435674
|
}
|
|
435619
435675
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -436198,7 +436254,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
436198
436254
|
var call88 = async () => {
|
|
436199
436255
|
return {
|
|
436200
436256
|
type: "text",
|
|
436201
|
-
value: `${"
|
|
436257
|
+
value: `${"2.0.0"} (built ${"2026-05-07T20:13:14.831Z"})`
|
|
436202
436258
|
};
|
|
436203
436259
|
}, version, version_default;
|
|
436204
436260
|
var init_version = __esm(() => {
|
|
@@ -444142,7 +444198,7 @@ function generateHtmlReport(data, insights) {
|
|
|
444142
444198
|
</html>`;
|
|
444143
444199
|
}
|
|
444144
444200
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
444145
|
-
const version2 = typeof MACRO !== "undefined" ? "
|
|
444201
|
+
const version2 = typeof MACRO !== "undefined" ? "2.0.0" : "unknown";
|
|
444146
444202
|
const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
|
|
444147
444203
|
const facets_summary = {
|
|
444148
444204
|
total: facets.size,
|
|
@@ -448345,7 +448401,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
448345
448401
|
init_settings2();
|
|
448346
448402
|
init_slowOperations();
|
|
448347
448403
|
init_uuid();
|
|
448348
|
-
VERSION6 = typeof MACRO !== "undefined" ? "
|
|
448404
|
+
VERSION6 = typeof MACRO !== "undefined" ? "2.0.0" : "unknown";
|
|
448349
448405
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
448350
448406
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
448351
448407
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -449546,7 +449602,7 @@ var init_filesystem = __esm(() => {
|
|
|
449546
449602
|
});
|
|
449547
449603
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
449548
449604
|
const nonce = randomBytes20(16).toString("hex");
|
|
449549
|
-
return join151(getClaudeTempDir(), "bundled-skills", "
|
|
449605
|
+
return join151(getClaudeTempDir(), "bundled-skills", "2.0.0", nonce);
|
|
449550
449606
|
});
|
|
449551
449607
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
449552
449608
|
});
|
|
@@ -458783,7 +458839,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
458783
458839
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
458784
458840
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
458785
458841
|
betas: getSdkBetas(),
|
|
458786
|
-
claude_code_version: "
|
|
458842
|
+
claude_code_version: "2.0.0",
|
|
458787
458843
|
output_style: outputStyle2,
|
|
458788
458844
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
458789
458845
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -472940,7 +472996,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
472940
472996
|
function getSemverPart(version2) {
|
|
472941
472997
|
return `${import_semver10.major(version2, { loose: true })}.${import_semver10.minor(version2, { loose: true })}.${import_semver10.patch(version2, { loose: true })}`;
|
|
472942
472998
|
}
|
|
472943
|
-
function useUpdateNotification(updatedVersion, initialVersion = "
|
|
472999
|
+
function useUpdateNotification(updatedVersion, initialVersion = "2.0.0") {
|
|
472944
473000
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react214.useState(() => getSemverPart(initialVersion));
|
|
472945
473001
|
if (!updatedVersion) {
|
|
472946
473002
|
return null;
|
|
@@ -472980,7 +473036,7 @@ function AutoUpdater({
|
|
|
472980
473036
|
return;
|
|
472981
473037
|
}
|
|
472982
473038
|
if (false) {}
|
|
472983
|
-
const currentVersion = "
|
|
473039
|
+
const currentVersion = "2.0.0";
|
|
472984
473040
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
472985
473041
|
let latestVersion = await getLatestVersion(channel);
|
|
472986
473042
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -473191,12 +473247,12 @@ function NativeAutoUpdater({
|
|
|
473191
473247
|
logEvent("tengu_native_auto_updater_start", {});
|
|
473192
473248
|
try {
|
|
473193
473249
|
const maxVersion = await getMaxVersion();
|
|
473194
|
-
if (maxVersion && gt("
|
|
473250
|
+
if (maxVersion && gt("2.0.0", maxVersion)) {
|
|
473195
473251
|
const msg = await getMaxVersionMessage();
|
|
473196
473252
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
473197
473253
|
}
|
|
473198
473254
|
const result = await installLatest(channel);
|
|
473199
|
-
const currentVersion = "
|
|
473255
|
+
const currentVersion = "2.0.0";
|
|
473200
473256
|
const latencyMs = Date.now() - startTime;
|
|
473201
473257
|
if (result.lockFailed) {
|
|
473202
473258
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -473331,17 +473387,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
473331
473387
|
const maxVersion = await getMaxVersion();
|
|
473332
473388
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
473333
473389
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
473334
|
-
if (gte("
|
|
473335
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"
|
|
473390
|
+
if (gte("2.0.0", maxVersion)) {
|
|
473391
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"2.0.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
473336
473392
|
setUpdateAvailable(false);
|
|
473337
473393
|
return;
|
|
473338
473394
|
}
|
|
473339
473395
|
latest = maxVersion;
|
|
473340
473396
|
}
|
|
473341
|
-
const hasUpdate = latest && !gte("
|
|
473397
|
+
const hasUpdate = latest && !gte("2.0.0", latest) && !shouldSkipVersion(latest);
|
|
473342
473398
|
setUpdateAvailable(!!hasUpdate);
|
|
473343
473399
|
if (hasUpdate) {
|
|
473344
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"
|
|
473400
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"2.0.0"} -> ${latest}`);
|
|
473345
473401
|
}
|
|
473346
473402
|
};
|
|
473347
473403
|
$2[0] = t1;
|
|
@@ -473375,7 +473431,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
473375
473431
|
wrap: "truncate",
|
|
473376
473432
|
children: [
|
|
473377
473433
|
"currentVersion: ",
|
|
473378
|
-
"
|
|
473434
|
+
"2.0.0"
|
|
473379
473435
|
]
|
|
473380
473436
|
}, undefined, true, undefined, this);
|
|
473381
473437
|
$2[3] = verbose;
|
|
@@ -480935,7 +480991,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
480935
480991
|
project_dir: getOriginalCwd(),
|
|
480936
480992
|
added_dirs: addedDirs
|
|
480937
480993
|
},
|
|
480938
|
-
version: "
|
|
480994
|
+
version: "2.0.0",
|
|
480939
480995
|
output_style: {
|
|
480940
480996
|
name: outputStyleName
|
|
480941
480997
|
},
|
|
@@ -492507,7 +492563,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
492507
492563
|
} catch {}
|
|
492508
492564
|
const data = {
|
|
492509
492565
|
trigger,
|
|
492510
|
-
version: "
|
|
492566
|
+
version: "2.0.0",
|
|
492511
492567
|
platform: process.platform,
|
|
492512
492568
|
transcript,
|
|
492513
492569
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -509416,7 +509472,7 @@ function appendToLog(path17, message) {
|
|
|
509416
509472
|
cwd: getFsImplementation().cwd(),
|
|
509417
509473
|
userType: process.env.USER_TYPE,
|
|
509418
509474
|
sessionId: getSessionId(),
|
|
509419
|
-
version: "
|
|
509475
|
+
version: "2.0.0"
|
|
509420
509476
|
};
|
|
509421
509477
|
getLogWriter(path17).write(messageWithTimestamp);
|
|
509422
509478
|
}
|
|
@@ -513440,8 +513496,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
513440
513496
|
}
|
|
513441
513497
|
async function checkEnvLessBridgeMinVersion() {
|
|
513442
513498
|
const cfg = await getEnvLessBridgeConfig();
|
|
513443
|
-
if (cfg.min_version && lt("
|
|
513444
|
-
return `Your version of localclawd (${"
|
|
513499
|
+
if (cfg.min_version && lt("2.0.0", cfg.min_version)) {
|
|
513500
|
+
return `Your version of localclawd (${"2.0.0"}) is too old for Remote Control.
|
|
513445
513501
|
Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
|
|
513446
513502
|
}
|
|
513447
513503
|
return null;
|
|
@@ -513913,7 +513969,7 @@ async function initBridgeCore(params) {
|
|
|
513913
513969
|
const rawApi = createBridgeApiClient({
|
|
513914
513970
|
baseUrl,
|
|
513915
513971
|
getAccessToken,
|
|
513916
|
-
runnerVersion: "
|
|
513972
|
+
runnerVersion: "2.0.0",
|
|
513917
513973
|
onDebug: logForDebugging,
|
|
513918
513974
|
onAuth401,
|
|
513919
513975
|
getTrustedDeviceToken
|
|
@@ -519632,7 +519688,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
|
|
|
519632
519688
|
setCwd(cwd3);
|
|
519633
519689
|
const server = new Server({
|
|
519634
519690
|
name: "claude/tengu",
|
|
519635
|
-
version: "
|
|
519691
|
+
version: "2.0.0"
|
|
519636
519692
|
}, {
|
|
519637
519693
|
capabilities: {
|
|
519638
519694
|
tools: {}
|
|
@@ -520713,7 +520769,7 @@ function WelcomeLogo() {
|
|
|
520713
520769
|
dimColor: true,
|
|
520714
520770
|
children: [
|
|
520715
520771
|
"v",
|
|
520716
|
-
"
|
|
520772
|
+
"2.0.0"
|
|
520717
520773
|
]
|
|
520718
520774
|
}, undefined, true, undefined, this)
|
|
520719
520775
|
]
|
|
@@ -520904,7 +520960,7 @@ __export(exports_update, {
|
|
|
520904
520960
|
});
|
|
520905
520961
|
async function update() {
|
|
520906
520962
|
logEvent("tengu_update_check", {});
|
|
520907
|
-
writeToStdout(`Current version: ${"
|
|
520963
|
+
writeToStdout(`Current version: ${"2.0.0"}
|
|
520908
520964
|
`);
|
|
520909
520965
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
520910
520966
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -520979,8 +521035,8 @@ async function update() {
|
|
|
520979
521035
|
writeToStdout(`localclawd is managed by Homebrew.
|
|
520980
521036
|
`);
|
|
520981
521037
|
const latest = await getLatestVersion(channel);
|
|
520982
|
-
if (latest && !gte("
|
|
520983
|
-
writeToStdout(`Update available: ${"
|
|
521038
|
+
if (latest && !gte("2.0.0", latest)) {
|
|
521039
|
+
writeToStdout(`Update available: ${"2.0.0"} → ${latest}
|
|
520984
521040
|
`);
|
|
520985
521041
|
writeToStdout(`
|
|
520986
521042
|
`);
|
|
@@ -520996,8 +521052,8 @@ async function update() {
|
|
|
520996
521052
|
writeToStdout(`localclawd is managed by winget.
|
|
520997
521053
|
`);
|
|
520998
521054
|
const latest = await getLatestVersion(channel);
|
|
520999
|
-
if (latest && !gte("
|
|
521000
|
-
writeToStdout(`Update available: ${"
|
|
521055
|
+
if (latest && !gte("2.0.0", latest)) {
|
|
521056
|
+
writeToStdout(`Update available: ${"2.0.0"} → ${latest}
|
|
521001
521057
|
`);
|
|
521002
521058
|
writeToStdout(`
|
|
521003
521059
|
`);
|
|
@@ -521011,8 +521067,8 @@ async function update() {
|
|
|
521011
521067
|
writeToStdout(`localclawd is managed by apk.
|
|
521012
521068
|
`);
|
|
521013
521069
|
const latest = await getLatestVersion(channel);
|
|
521014
|
-
if (latest && !gte("
|
|
521015
|
-
writeToStdout(`Update available: ${"
|
|
521070
|
+
if (latest && !gte("2.0.0", latest)) {
|
|
521071
|
+
writeToStdout(`Update available: ${"2.0.0"} → ${latest}
|
|
521016
521072
|
`);
|
|
521017
521073
|
writeToStdout(`
|
|
521018
521074
|
`);
|
|
@@ -521077,11 +521133,11 @@ async function update() {
|
|
|
521077
521133
|
`);
|
|
521078
521134
|
await gracefulShutdown(1);
|
|
521079
521135
|
}
|
|
521080
|
-
if (result.latestVersion === "
|
|
521081
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"
|
|
521136
|
+
if (result.latestVersion === "2.0.0") {
|
|
521137
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"2.0.0"})`) + `
|
|
521082
521138
|
`);
|
|
521083
521139
|
} else {
|
|
521084
|
-
writeToStdout(source_default.green(`Successfully updated from ${"
|
|
521140
|
+
writeToStdout(source_default.green(`Successfully updated from ${"2.0.0"} to version ${result.latestVersion}`) + `
|
|
521085
521141
|
`);
|
|
521086
521142
|
await regenerateCompletionCache();
|
|
521087
521143
|
}
|
|
@@ -521141,12 +521197,12 @@ async function update() {
|
|
|
521141
521197
|
`);
|
|
521142
521198
|
await gracefulShutdown(1);
|
|
521143
521199
|
}
|
|
521144
|
-
if (latestVersion === "
|
|
521145
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"
|
|
521200
|
+
if (latestVersion === "2.0.0") {
|
|
521201
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"2.0.0"})`) + `
|
|
521146
521202
|
`);
|
|
521147
521203
|
await gracefulShutdown(0);
|
|
521148
521204
|
}
|
|
521149
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"
|
|
521205
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"2.0.0"})
|
|
521150
521206
|
`);
|
|
521151
521207
|
writeToStdout(`Installing update...
|
|
521152
521208
|
`);
|
|
@@ -521191,7 +521247,7 @@ async function update() {
|
|
|
521191
521247
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
521192
521248
|
switch (status2) {
|
|
521193
521249
|
case "success":
|
|
521194
|
-
writeToStdout(source_default.green(`Successfully updated from ${"
|
|
521250
|
+
writeToStdout(source_default.green(`Successfully updated from ${"2.0.0"} to version ${latestVersion}`) + `
|
|
521195
521251
|
`);
|
|
521196
521252
|
await regenerateCompletionCache();
|
|
521197
521253
|
break;
|
|
@@ -522433,7 +522489,7 @@ Run with --debug for more details.
|
|
|
522433
522489
|
}
|
|
522434
522490
|
}
|
|
522435
522491
|
logForDiagnosticsNoPII("info", "started", {
|
|
522436
|
-
version: "
|
|
522492
|
+
version: "2.0.0",
|
|
522437
522493
|
is_native_binary: isInBundledMode()
|
|
522438
522494
|
});
|
|
522439
522495
|
registerCleanup(async () => {
|
|
@@ -523217,7 +523273,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
523217
523273
|
pendingHookMessages
|
|
523218
523274
|
}, renderAndRun);
|
|
523219
523275
|
}
|
|
523220
|
-
}).version("
|
|
523276
|
+
}).version("2.0.0 (localclawd)", "-v, --version", "Output the version number");
|
|
523221
523277
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
523222
523278
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
523223
523279
|
if (canUserConfigureAdvisor()) {
|
|
@@ -523731,7 +523787,7 @@ if (false) {}
|
|
|
523731
523787
|
async function main2() {
|
|
523732
523788
|
const args = process.argv.slice(2);
|
|
523733
523789
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
523734
|
-
console.log(`${"
|
|
523790
|
+
console.log(`${"2.0.0"} (localclawd)`);
|
|
523735
523791
|
return;
|
|
523736
523792
|
}
|
|
523737
523793
|
const {
|
|
@@ -523802,9 +523858,17 @@ async function main2() {
|
|
|
523802
523858
|
process.on("unhandledRejection", (reason) => {
|
|
523803
523859
|
const msg = reason instanceof Error ? reason.stack ?? reason.message : String(reason);
|
|
523804
523860
|
process.stderr.write(`
|
|
523805
|
-
localclawd: unhandled error — ${msg}
|
|
523861
|
+
localclawd: unhandled error (continuing) — ${msg}
|
|
523806
523862
|
`);
|
|
523807
|
-
|
|
523863
|
+
try {
|
|
523864
|
+
const { appendFileSync: appendFileSync4, mkdirSync: mkdirSync6 } = __require("fs");
|
|
523865
|
+
const { homedir: homedir40 } = __require("os");
|
|
523866
|
+
const { join: join169 } = __require("path");
|
|
523867
|
+
const dir = join169(homedir40(), ".claude");
|
|
523868
|
+
mkdirSync6(dir, { recursive: true });
|
|
523869
|
+
appendFileSync4(join169(dir, "crash.log"), `[${new Date().toISOString()}] unhandledRejection: ${msg}
|
|
523870
|
+
`);
|
|
523871
|
+
} catch {}
|
|
523808
523872
|
});
|
|
523809
523873
|
main2().catch((err2) => {
|
|
523810
523874
|
const msg = err2 instanceof Error ? err2.stack ?? err2.message : String(err2);
|
|
@@ -523814,4 +523878,4 @@ localclawd crashed: ${msg}
|
|
|
523814
523878
|
process.exit(1);
|
|
523815
523879
|
});
|
|
523816
523880
|
|
|
523817
|
-
//# debugId=
|
|
523881
|
+
//# debugId=8834DF2F5FD71AF664756E2164756E21
|