localclawd 1.8.4 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +503 -339
- 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/${"1.8.
|
|
87611
|
+
return `claude-code/${"1.8.6"}`;
|
|
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/${"1.8.
|
|
87633
|
+
return `claude-cli/${"1.8.6"} (${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/${"1.8.
|
|
87647
|
+
return `claude-code/${"1.8.6"}${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 = `${"1.8.
|
|
130843
|
+
const version = `${"1.8.6"}.${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 = "1.8.
|
|
147032
|
+
const match = "1.8.6".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: "1.8.
|
|
147072
|
+
version: "1.8.6",
|
|
147073
147073
|
versionBase: getVersionBase(),
|
|
147074
|
-
buildTime: "2026-05-
|
|
147074
|
+
buildTime: "2026-05-07T17:03:06.068Z",
|
|
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"] = "1.8.
|
|
179650
|
+
attributes["app.version"] = "1.8.6";
|
|
179651
179651
|
}
|
|
179652
179652
|
const oauthAccount = getOauthAccountInfo();
|
|
179653
179653
|
if (oauthAccount) {
|
|
@@ -242448,7 +242448,7 @@ function getInstallationEnv() {
|
|
|
242448
242448
|
return;
|
|
242449
242449
|
}
|
|
242450
242450
|
function getClaudeCodeVersion() {
|
|
242451
|
-
return "1.8.
|
|
242451
|
+
return "1.8.6";
|
|
242452
242452
|
}
|
|
242453
242453
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
242454
242454
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -247722,7 +247722,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
247722
247722
|
const client4 = new Client({
|
|
247723
247723
|
name: "localclawd",
|
|
247724
247724
|
title: "localclawd",
|
|
247725
|
-
version: "1.8.
|
|
247725
|
+
version: "1.8.6",
|
|
247726
247726
|
description: "local-first AI coding tool",
|
|
247727
247727
|
websiteUrl: PRODUCT_URL
|
|
247728
247728
|
}, {
|
|
@@ -248064,7 +248064,7 @@ var init_client9 = __esm(() => {
|
|
|
248064
248064
|
const client4 = new Client({
|
|
248065
248065
|
name: "localclawd",
|
|
248066
248066
|
title: "localclawd",
|
|
248067
|
-
version: "1.8.
|
|
248067
|
+
version: "1.8.6",
|
|
248068
248068
|
description: "local-first AI coding tool",
|
|
248069
248069
|
websiteUrl: PRODUCT_URL
|
|
248070
248070
|
}, {
|
|
@@ -262466,7 +262466,7 @@ function computeFingerprint(messageText, version) {
|
|
|
262466
262466
|
}
|
|
262467
262467
|
function computeFingerprintFromMessages(messages) {
|
|
262468
262468
|
const firstMessageText = extractFirstMessageText(messages);
|
|
262469
|
-
return computeFingerprint(firstMessageText, "1.8.
|
|
262469
|
+
return computeFingerprint(firstMessageText, "1.8.6");
|
|
262470
262470
|
}
|
|
262471
262471
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
262472
262472
|
var init_fingerprint = () => {};
|
|
@@ -262508,7 +262508,7 @@ async function sideQuery(opts) {
|
|
|
262508
262508
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
262509
262509
|
}
|
|
262510
262510
|
const messageText = extractFirstUserMessageText(messages);
|
|
262511
|
-
const fingerprint = computeFingerprint(messageText, "1.8.
|
|
262511
|
+
const fingerprint = computeFingerprint(messageText, "1.8.6");
|
|
262512
262512
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
262513
262513
|
const systemBlocks = [
|
|
262514
262514
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -283256,7 +283256,7 @@ var init_user = __esm(() => {
|
|
|
283256
283256
|
deviceId,
|
|
283257
283257
|
sessionId: getSessionId(),
|
|
283258
283258
|
email: getEmail(),
|
|
283259
|
-
appVersion: "1.8.
|
|
283259
|
+
appVersion: "1.8.6",
|
|
283260
283260
|
platform: getHostPlatformForAnalytics(),
|
|
283261
283261
|
organizationUuid,
|
|
283262
283262
|
accountUuid,
|
|
@@ -284321,7 +284321,7 @@ async function initializeBetaTracing(resource) {
|
|
|
284321
284321
|
});
|
|
284322
284322
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
284323
284323
|
setLoggerProvider(loggerProvider);
|
|
284324
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.
|
|
284324
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.6");
|
|
284325
284325
|
setEventLogger(eventLogger);
|
|
284326
284326
|
process.on("beforeExit", async () => {
|
|
284327
284327
|
await loggerProvider?.forceFlush();
|
|
@@ -284361,7 +284361,7 @@ async function initializeTelemetry() {
|
|
|
284361
284361
|
const platform2 = getPlatform();
|
|
284362
284362
|
const baseAttributes = {
|
|
284363
284363
|
[ATTR_SERVICE_NAME4]: "claude-code",
|
|
284364
|
-
[ATTR_SERVICE_VERSION4]: "1.8.
|
|
284364
|
+
[ATTR_SERVICE_VERSION4]: "1.8.6"
|
|
284365
284365
|
};
|
|
284366
284366
|
if (platform2 === "wsl") {
|
|
284367
284367
|
const wslVersion = getWslVersion();
|
|
@@ -284406,7 +284406,7 @@ async function initializeTelemetry() {
|
|
|
284406
284406
|
} catch {}
|
|
284407
284407
|
};
|
|
284408
284408
|
registerCleanup(shutdownTelemetry2);
|
|
284409
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "1.8.
|
|
284409
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "1.8.6");
|
|
284410
284410
|
}
|
|
284411
284411
|
const meterProvider = new MeterProvider4({
|
|
284412
284412
|
resource,
|
|
@@ -284426,7 +284426,7 @@ async function initializeTelemetry() {
|
|
|
284426
284426
|
});
|
|
284427
284427
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
284428
284428
|
setLoggerProvider(loggerProvider);
|
|
284429
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.
|
|
284429
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.6");
|
|
284430
284430
|
setEventLogger(eventLogger);
|
|
284431
284431
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
284432
284432
|
process.on("beforeExit", async () => {
|
|
@@ -284488,7 +284488,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
284488
284488
|
}
|
|
284489
284489
|
};
|
|
284490
284490
|
registerCleanup(shutdownTelemetry);
|
|
284491
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "1.8.
|
|
284491
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "1.8.6");
|
|
284492
284492
|
}
|
|
284493
284493
|
async function flushTelemetry() {
|
|
284494
284494
|
const meterProvider = getMeterProvider();
|
|
@@ -285678,7 +285678,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
285678
285678
|
}
|
|
285679
285679
|
async function getDoctorDiagnostic() {
|
|
285680
285680
|
const installationType = await getCurrentInstallationType();
|
|
285681
|
-
const version = typeof MACRO !== "undefined" ? "1.8.
|
|
285681
|
+
const version = typeof MACRO !== "undefined" ? "1.8.6" : "unknown";
|
|
285682
285682
|
const installationPath = await getInstallationPath();
|
|
285683
285683
|
const invokedBinary = getInvokedBinary();
|
|
285684
285684
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -286619,8 +286619,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
286619
286619
|
const maxVersion = await getMaxVersion();
|
|
286620
286620
|
if (maxVersion && gt(version, maxVersion)) {
|
|
286621
286621
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version} to ${maxVersion}`);
|
|
286622
|
-
if (gte("1.8.
|
|
286623
|
-
logForDebugging(`Native installer: current version ${"1.8.
|
|
286622
|
+
if (gte("1.8.6", maxVersion)) {
|
|
286623
|
+
logForDebugging(`Native installer: current version ${"1.8.6"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
286624
286624
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
286625
286625
|
latency_ms: Date.now() - startTime,
|
|
286626
286626
|
max_version: maxVersion,
|
|
@@ -286631,7 +286631,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
286631
286631
|
version = maxVersion;
|
|
286632
286632
|
}
|
|
286633
286633
|
}
|
|
286634
|
-
if (!forceReinstall && version === "1.8.
|
|
286634
|
+
if (!forceReinstall && version === "1.8.6" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
|
|
286635
286635
|
logForDebugging(`Found ${version} at ${executablePath}, skipping install`);
|
|
286636
286636
|
logEvent("tengu_native_update_complete", {
|
|
286637
286637
|
latency_ms: Date.now() - startTime,
|
|
@@ -322825,6 +322825,28 @@ async function pollForCompletion(url3, promptId, maxWaitMs = 120000, intervalMs
|
|
|
322825
322825
|
}
|
|
322826
322826
|
return null;
|
|
322827
322827
|
}
|
|
322828
|
+
async function fetchServerWorkflowList(url3) {
|
|
322829
|
+
try {
|
|
322830
|
+
const res = await fetch(`${url3}/userdata?dir=workflows&recurse=true`);
|
|
322831
|
+
if (!res.ok)
|
|
322832
|
+
return null;
|
|
322833
|
+
const data = await res.json();
|
|
322834
|
+
return Array.isArray(data) ? data.filter((f) => typeof f === "string" && f.endsWith(".json")) : null;
|
|
322835
|
+
} catch {
|
|
322836
|
+
return null;
|
|
322837
|
+
}
|
|
322838
|
+
}
|
|
322839
|
+
async function fetchServerWorkflow(url3, name) {
|
|
322840
|
+
try {
|
|
322841
|
+
const filename = name.endsWith(".json") ? name : `${name}.json`;
|
|
322842
|
+
const res = await fetch(`${url3}/userdata/workflows/${encodeURIComponent(filename)}`);
|
|
322843
|
+
if (!res.ok)
|
|
322844
|
+
return null;
|
|
322845
|
+
return res.json();
|
|
322846
|
+
} catch {
|
|
322847
|
+
return null;
|
|
322848
|
+
}
|
|
322849
|
+
}
|
|
322828
322850
|
function extractOutputImages(item) {
|
|
322829
322851
|
const images = [];
|
|
322830
322852
|
for (const nodeOutput of Object.values(item.outputs)) {
|
|
@@ -322839,6 +322861,64 @@ var DEFAULT_COMFYUI_URL = "http://127.0.0.1:8000", PROBE_TIMEOUT_MS = 3000;
|
|
|
322839
322861
|
// src/services/imagePipeline/imagePipeline.ts
|
|
322840
322862
|
import { mkdir as mkdir19, writeFile as writeFile19, readFile as readFile26, access as access5 } from "fs/promises";
|
|
322841
322863
|
import { join as join79 } from "path";
|
|
322864
|
+
function injectPrompt(workflow, positivePrompt, negativePrompt, params = {}) {
|
|
322865
|
+
const wf = replaceTemplatesDeep(JSON.parse(JSON.stringify(workflow)), {
|
|
322866
|
+
positive_prompt: positivePrompt,
|
|
322867
|
+
negative_prompt: negativePrompt
|
|
322868
|
+
});
|
|
322869
|
+
for (const node of Object.values(wf)) {
|
|
322870
|
+
const ct = node.class_type;
|
|
322871
|
+
if (ct === "KSampler" || ct === "KSamplerAdvanced") {
|
|
322872
|
+
const posRef = node.inputs.positive;
|
|
322873
|
+
const negRef = node.inputs.negative;
|
|
322874
|
+
if (posRef?.[0] && wf[posRef[0]]?.class_type === "CLIPTextEncode") {
|
|
322875
|
+
wf[posRef[0]].inputs.text = positivePrompt;
|
|
322876
|
+
}
|
|
322877
|
+
if (negRef?.[0] && wf[negRef[0]]?.class_type === "CLIPTextEncode") {
|
|
322878
|
+
wf[negRef[0]].inputs.text = negativePrompt;
|
|
322879
|
+
}
|
|
322880
|
+
if (params.seed !== undefined)
|
|
322881
|
+
node.inputs.seed = params.seed;
|
|
322882
|
+
if (params.steps !== undefined)
|
|
322883
|
+
node.inputs.steps = params.steps;
|
|
322884
|
+
if (params.cfg !== undefined)
|
|
322885
|
+
node.inputs.cfg = params.cfg;
|
|
322886
|
+
}
|
|
322887
|
+
if (node.class_type === "EmptyLatentImage" || node.class_type === "EmptySD3LatentImage") {
|
|
322888
|
+
if (params.width !== undefined)
|
|
322889
|
+
node.inputs.width = params.width;
|
|
322890
|
+
if (params.height !== undefined)
|
|
322891
|
+
node.inputs.height = params.height;
|
|
322892
|
+
}
|
|
322893
|
+
if (node.class_type === "CheckpointLoaderSimple" && params.model) {
|
|
322894
|
+
node.inputs.ckpt_name = params.model;
|
|
322895
|
+
}
|
|
322896
|
+
}
|
|
322897
|
+
return wf;
|
|
322898
|
+
}
|
|
322899
|
+
function replaceTemplatesDeep(obj, vars) {
|
|
322900
|
+
if (typeof obj === "string") {
|
|
322901
|
+
let s = obj;
|
|
322902
|
+
for (const [k2, v2] of Object.entries(vars))
|
|
322903
|
+
s = s.replaceAll(`{{${k2}}}`, v2);
|
|
322904
|
+
return s;
|
|
322905
|
+
}
|
|
322906
|
+
if (Array.isArray(obj))
|
|
322907
|
+
return obj.map((item) => replaceTemplatesDeep(item, vars));
|
|
322908
|
+
if (obj !== null && typeof obj === "object") {
|
|
322909
|
+
return Object.fromEntries(Object.entries(obj).map(([k2, v2]) => [k2, replaceTemplatesDeep(v2, vars)]));
|
|
322910
|
+
}
|
|
322911
|
+
return obj;
|
|
322912
|
+
}
|
|
322913
|
+
async function loadWorkflow(projectRoot, name) {
|
|
322914
|
+
const filename = name.endsWith(".json") ? name : `${name}.json`;
|
|
322915
|
+
try {
|
|
322916
|
+
const data = await readFile26(join79(projectRoot, ".localclawd", "image-pipeline", "workflows", filename), "utf-8");
|
|
322917
|
+
return JSON.parse(data);
|
|
322918
|
+
} catch {
|
|
322919
|
+
return null;
|
|
322920
|
+
}
|
|
322921
|
+
}
|
|
322842
322922
|
async function scaffoldProject(projectRoot) {
|
|
322843
322923
|
const base = join79(projectRoot, ".localclawd", "image-pipeline");
|
|
322844
322924
|
let alreadyExisted = false;
|
|
@@ -322846,7 +322926,7 @@ async function scaffoldProject(projectRoot) {
|
|
|
322846
322926
|
await access5(join79(base, "config.json"));
|
|
322847
322927
|
alreadyExisted = true;
|
|
322848
322928
|
} catch {}
|
|
322849
|
-
const dirs = [base, join79(base, "prompts"), join79(base, "workflows"), join79(base, "
|
|
322929
|
+
const dirs = [base, join79(base, "prompts"), join79(base, "workflows"), join79(base, "generated"), join79(base, "scripts")];
|
|
322850
322930
|
for (const dir of dirs) {
|
|
322851
322931
|
await mkdir19(dir, { recursive: true });
|
|
322852
322932
|
}
|
|
@@ -322857,8 +322937,10 @@ async function scaffoldProject(projectRoot) {
|
|
|
322857
322937
|
created.push(".localclawd/image-pipeline/config.json");
|
|
322858
322938
|
await writeFile19(join79(base, "prompts", "example.json"), JSON.stringify(EXAMPLE_PROMPT, null, 2), "utf-8");
|
|
322859
322939
|
created.push(".localclawd/image-pipeline/prompts/example.json");
|
|
322860
|
-
await writeFile19(join79(base, "workflows", "txt2img.json"), JSON.stringify(
|
|
322940
|
+
await writeFile19(join79(base, "workflows", "txt2img.json"), JSON.stringify(DEFAULT_WORKFLOW, null, 2), "utf-8");
|
|
322861
322941
|
created.push(".localclawd/image-pipeline/workflows/txt2img.json");
|
|
322942
|
+
await writeFile19(join79(base, "workflows", "z_image_turbo.json"), JSON.stringify(Z_IMAGE_TURBO_WORKFLOW, null, 2), "utf-8");
|
|
322943
|
+
created.push(".localclawd/image-pipeline/workflows/z_image_turbo.json");
|
|
322862
322944
|
await writeFile19(join79(base, "scripts", "generate.sh"), GENERATE_SH, "utf-8");
|
|
322863
322945
|
created.push(".localclawd/image-pipeline/scripts/generate.sh");
|
|
322864
322946
|
await writeFile19(join79(base, "scripts", "generate.ps1"), GENERATE_PS1, "utf-8");
|
|
@@ -322899,7 +322981,7 @@ async function listWorkflows(projectRoot) {
|
|
|
322899
322981
|
return [];
|
|
322900
322982
|
}
|
|
322901
322983
|
}
|
|
322902
|
-
var DEFAULT_CONFIG2, EXAMPLE_PROMPT,
|
|
322984
|
+
var DEFAULT_CONFIG2, EXAMPLE_PROMPT, DEFAULT_WORKFLOW, Z_IMAGE_TURBO_WORKFLOW, GENERATE_SH = `#!/usr/bin/env bash
|
|
322903
322985
|
# localclawd image pipeline — quick generate helper
|
|
322904
322986
|
# Usage: ./scripts/generate.sh "positive prompt" "negative prompt"
|
|
322905
322987
|
|
|
@@ -322952,8 +323034,8 @@ Project-local image generation configuration for localclawd + ComfyUI.
|
|
|
322952
323034
|
|
|
322953
323035
|
1. Start ComfyUI on this machine (default port 8000)
|
|
322954
323036
|
2. Run \`/image-pipeline\` in localclawd to check status
|
|
322955
|
-
3. Use \`/image
|
|
322956
|
-
4.
|
|
323037
|
+
3. Use \`/image a misty forest at dawn\` to generate an image
|
|
323038
|
+
4. Use \`/image txt2img: a misty forest at dawn\` to use a specific workflow
|
|
322957
323039
|
|
|
322958
323040
|
## Structure
|
|
322959
323041
|
|
|
@@ -322961,7 +323043,7 @@ Project-local image generation configuration for localclawd + ComfyUI.
|
|
|
322961
323043
|
config.json — backend URL and default params
|
|
322962
323044
|
prompts/ — reusable prompt templates (JSON)
|
|
322963
323045
|
workflows/ — full ComfyUI workflow JSON files
|
|
322964
|
-
|
|
323046
|
+
generated/ — locally downloaded output images
|
|
322965
323047
|
scripts/ — generate.sh / generate.ps1 helpers
|
|
322966
323048
|
\`\`\`
|
|
322967
323049
|
|
|
@@ -322973,8 +323055,12 @@ Edit \`config.json\` → set \`backendUrl\` to your remote URL, e.g.:
|
|
|
322973
323055
|
## Workflow Templates
|
|
322974
323056
|
|
|
322975
323057
|
\`workflows/txt2img.json\` is a standard KSampler workflow.
|
|
322976
|
-
|
|
322977
|
-
|
|
323058
|
+
To use a workflow: \`/image <workflow-name>: <prompt>\`
|
|
323059
|
+
To set a default workflow: \`/image-pipeline workflow <name>\`
|
|
323060
|
+
|
|
323061
|
+
Export workflows from ComfyUI via the Save (API format) button.
|
|
323062
|
+
Workflows with \`{{positive_prompt}}\` / \`{{negative_prompt}}\` placeholders
|
|
323063
|
+
are injected automatically; raw ComfyUI exports work via graph traversal.
|
|
322978
323064
|
`;
|
|
322979
323065
|
var init_imagePipeline = __esm(() => {
|
|
322980
323066
|
DEFAULT_CONFIG2 = {
|
|
@@ -322985,7 +323071,7 @@ var init_imagePipeline = __esm(() => {
|
|
|
322985
323071
|
defaultCfg: 7,
|
|
322986
323072
|
defaultSampler: "euler",
|
|
322987
323073
|
defaultModel: "",
|
|
322988
|
-
outputDir: ".localclawd/image-pipeline/
|
|
323074
|
+
outputDir: ".localclawd/image-pipeline/generated"
|
|
322989
323075
|
};
|
|
322990
323076
|
EXAMPLE_PROMPT = {
|
|
322991
323077
|
name: "example-character",
|
|
@@ -322998,7 +323084,7 @@ var init_imagePipeline = __esm(() => {
|
|
|
322998
323084
|
cfg: 7,
|
|
322999
323085
|
sampler: "euler"
|
|
323000
323086
|
};
|
|
323001
|
-
|
|
323087
|
+
DEFAULT_WORKFLOW = {
|
|
323002
323088
|
"4": {
|
|
323003
323089
|
class_type: "CheckpointLoaderSimple",
|
|
323004
323090
|
inputs: { ckpt_name: "v1-5-pruned-emaonly.safetensors" }
|
|
@@ -323039,6 +323125,32 @@ var init_imagePipeline = __esm(() => {
|
|
|
323039
323125
|
inputs: { filename_prefix: "localclawd", images: ["8", 0] }
|
|
323040
323126
|
}
|
|
323041
323127
|
};
|
|
323128
|
+
Z_IMAGE_TURBO_WORKFLOW = {
|
|
323129
|
+
"28": { class_type: "UNETLoader", inputs: { unet_name: "z_image_turbo_bf16.safetensors", weight_dtype: "default" } },
|
|
323130
|
+
"30": { class_type: "CLIPLoader", inputs: { clip_name: "qwen_3_4b.safetensors", type: "lumina2" } },
|
|
323131
|
+
"29": { class_type: "VAELoader", inputs: { vae_name: "ae.safetensors" } },
|
|
323132
|
+
"27": { class_type: "CLIPTextEncode", inputs: { clip: ["30", 0], text: "{{positive_prompt}}" } },
|
|
323133
|
+
"33": { class_type: "ConditioningZeroOut", inputs: { conditioning: ["27", 0] } },
|
|
323134
|
+
"13": { class_type: "EmptySD3LatentImage", inputs: { width: 1024, height: 1024, batch_size: 1 } },
|
|
323135
|
+
"11": { class_type: "ModelSamplingAuraFlow", inputs: { model: ["28", 0], shift: 3 } },
|
|
323136
|
+
"3": {
|
|
323137
|
+
class_type: "KSampler",
|
|
323138
|
+
inputs: {
|
|
323139
|
+
model: ["11", 0],
|
|
323140
|
+
positive: ["27", 0],
|
|
323141
|
+
negative: ["33", 0],
|
|
323142
|
+
latent_image: ["13", 0],
|
|
323143
|
+
seed: 42,
|
|
323144
|
+
steps: 8,
|
|
323145
|
+
cfg: 1,
|
|
323146
|
+
sampler_name: "res_multistep",
|
|
323147
|
+
scheduler: "simple",
|
|
323148
|
+
denoise: 1
|
|
323149
|
+
}
|
|
323150
|
+
},
|
|
323151
|
+
"8": { class_type: "VAEDecode", inputs: { samples: ["3", 0], vae: ["29", 0] } },
|
|
323152
|
+
"9": { class_type: "SaveImage", inputs: { filename_prefix: "z-image-turbo", images: ["8", 0] } }
|
|
323153
|
+
};
|
|
323042
323154
|
});
|
|
323043
323155
|
|
|
323044
323156
|
// src/tools/GenerateImageTool/prompt.ts
|
|
@@ -323048,11 +323160,17 @@ Backend resolution order:
|
|
|
323048
323160
|
1. http://127.0.0.1:8000 (localhost default)
|
|
323049
323161
|
2. backendUrl in .localclawd/image-pipeline/config.json (set via /image-pipeline config <url>)
|
|
323050
323162
|
|
|
323163
|
+
Workflow selection:
|
|
323164
|
+
- Omit workflow to use the default (set via /image-pipeline workflow <name>, or built-in txt2img)
|
|
323165
|
+
- Pass workflow name (without .json) to use a specific workflow from .localclawd/image-pipeline/workflows/
|
|
323166
|
+
- Workflows support {{positive_prompt}} / {{negative_prompt}} templates or raw ComfyUI API exports
|
|
323167
|
+
|
|
323051
323168
|
Output directory:
|
|
323052
323169
|
- .localclawd/image-pipeline/generated/ when the pipeline is scaffolded (run /image-pipeline setup)
|
|
323053
323170
|
- ~/generatedimages/ otherwise
|
|
323054
323171
|
|
|
323055
323172
|
If ComfyUI is not reachable, ask the user to run /image-pipeline config <url> with their ComfyUI address.
|
|
323173
|
+
To list available workflows, call /image-pipeline list.
|
|
323056
323174
|
|
|
323057
323175
|
After generating, the image is returned visually in the tool result so you can review it.
|
|
323058
323176
|
|
|
@@ -323115,6 +323233,7 @@ var init_GenerateImageTool = __esm(() => {
|
|
|
323115
323233
|
inputSchema27 = lazySchema(() => z62.strictObject({
|
|
323116
323234
|
prompt: z62.string().describe("Positive text prompt describing the image to generate"),
|
|
323117
323235
|
negative_prompt: z62.string().optional().describe("What to exclude from the image (optional)"),
|
|
323236
|
+
workflow: z62.string().optional().describe("Workflow name from .localclawd/image-pipeline/workflows/ (without .json). Omit to use default."),
|
|
323118
323237
|
width: z62.number().int().min(64).max(2048).optional().describe("Width in pixels (default: 512)"),
|
|
323119
323238
|
height: z62.number().int().min(64).max(2048).optional().describe("Height in pixels (default: 512)"),
|
|
323120
323239
|
steps: z62.number().int().min(1).max(150).optional().describe("Sampling steps (default: 20)"),
|
|
@@ -323200,32 +323319,11 @@ var init_GenerateImageTool = __esm(() => {
|
|
|
323200
323319
|
const height = input.height ?? config?.defaultHeight ?? 512;
|
|
323201
323320
|
const steps = input.steps ?? config?.defaultSteps ?? 20;
|
|
323202
323321
|
const cfg = input.cfg ?? config?.defaultCfg ?? 7;
|
|
323203
|
-
const sampler = config?.defaultSampler ?? "euler";
|
|
323204
323322
|
const seed = input.seed ?? Math.floor(Math.random() * 2 ** 32);
|
|
323205
323323
|
const negativePrompt = input.negative_prompt ?? "blurry, low quality, watermark, deformed";
|
|
323206
|
-
const
|
|
323207
|
-
|
|
323208
|
-
|
|
323209
|
-
"6": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: input.prompt } },
|
|
323210
|
-
"7": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: negativePrompt } },
|
|
323211
|
-
"3": {
|
|
323212
|
-
class_type: "KSampler",
|
|
323213
|
-
inputs: {
|
|
323214
|
-
model: ["4", 0],
|
|
323215
|
-
positive: ["6", 0],
|
|
323216
|
-
negative: ["7", 0],
|
|
323217
|
-
latent_image: ["5", 0],
|
|
323218
|
-
seed,
|
|
323219
|
-
steps,
|
|
323220
|
-
cfg,
|
|
323221
|
-
sampler_name: sampler,
|
|
323222
|
-
scheduler: "normal",
|
|
323223
|
-
denoise: 1
|
|
323224
|
-
}
|
|
323225
|
-
},
|
|
323226
|
-
"8": { class_type: "VAEDecode", inputs: { samples: ["3", 0], vae: ["4", 2] } },
|
|
323227
|
-
"9": { class_type: "SaveImage", inputs: { filename_prefix: "localclawd", images: ["8", 0] } }
|
|
323228
|
-
};
|
|
323324
|
+
const workflowName = input.workflow ?? config?.defaultWorkflow;
|
|
323325
|
+
const workflowBase = workflowName ? await loadWorkflow(projectRoot, workflowName) : null;
|
|
323326
|
+
const workflow = injectPrompt(workflowBase ?? DEFAULT_WORKFLOW, input.prompt, negativePrompt, { seed, model, width, height, steps, cfg });
|
|
323229
323327
|
let queued;
|
|
323230
323328
|
try {
|
|
323231
323329
|
queued = await queuePrompt(backendUrl, workflow);
|
|
@@ -331770,7 +331868,7 @@ function getAnthropicEnvMetadata() {
|
|
|
331770
331868
|
function getBuildAgeMinutes() {
|
|
331771
331869
|
if (false)
|
|
331772
331870
|
;
|
|
331773
|
-
const buildTime = new Date("2026-05-
|
|
331871
|
+
const buildTime = new Date("2026-05-07T17:03:06.068Z").getTime();
|
|
331774
331872
|
if (isNaN(buildTime))
|
|
331775
331873
|
return;
|
|
331776
331874
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -360600,7 +360698,7 @@ function Feedback({
|
|
|
360600
360698
|
platform: env3.platform,
|
|
360601
360699
|
gitRepo: envInfo.isGit,
|
|
360602
360700
|
terminal: env3.terminal,
|
|
360603
|
-
version: "1.8.
|
|
360701
|
+
version: "1.8.6",
|
|
360604
360702
|
transcript: normalizeMessagesForAPI(messages),
|
|
360605
360703
|
errors: sanitizedErrors,
|
|
360606
360704
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -360792,7 +360890,7 @@ function Feedback({
|
|
|
360792
360890
|
", ",
|
|
360793
360891
|
env3.terminal,
|
|
360794
360892
|
", v",
|
|
360795
|
-
"1.8.
|
|
360893
|
+
"1.8.6"
|
|
360796
360894
|
]
|
|
360797
360895
|
}, undefined, true, undefined, this)
|
|
360798
360896
|
]
|
|
@@ -360898,7 +360996,7 @@ ${sanitizedDescription}
|
|
|
360898
360996
|
` + `**Environment Info**
|
|
360899
360997
|
` + `- Platform: ${env3.platform}
|
|
360900
360998
|
` + `- Terminal: ${env3.terminal}
|
|
360901
|
-
` + `- Version: ${"1.8.
|
|
360999
|
+
` + `- Version: ${"1.8.6"}
|
|
360902
361000
|
` + `- Feedback ID: ${feedbackId}
|
|
360903
361001
|
` + `
|
|
360904
361002
|
**Errors**
|
|
@@ -363526,7 +363624,7 @@ function buildPrimarySection() {
|
|
|
363526
363624
|
}, undefined, false, undefined, this);
|
|
363527
363625
|
return [{
|
|
363528
363626
|
label: "Version",
|
|
363529
|
-
value: "1.8.
|
|
363627
|
+
value: "1.8.6"
|
|
363530
363628
|
}, {
|
|
363531
363629
|
label: "Session name",
|
|
363532
363630
|
value: nameValue
|
|
@@ -368207,7 +368305,7 @@ function Config({
|
|
|
368207
368305
|
}
|
|
368208
368306
|
}, undefined, false, undefined, this)
|
|
368209
368307
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
|
|
368210
|
-
currentVersion: "1.8.
|
|
368308
|
+
currentVersion: "1.8.6",
|
|
368211
368309
|
onChoice: (choice) => {
|
|
368212
368310
|
setShowSubmenu(null);
|
|
368213
368311
|
setTabsHidden(false);
|
|
@@ -368219,7 +368317,7 @@ function Config({
|
|
|
368219
368317
|
autoUpdatesChannel: "stable"
|
|
368220
368318
|
};
|
|
368221
368319
|
if (choice === "stay") {
|
|
368222
|
-
newSettings.minimumVersion = "1.8.
|
|
368320
|
+
newSettings.minimumVersion = "1.8.6";
|
|
368223
368321
|
}
|
|
368224
368322
|
updateSettingsForSource("userSettings", newSettings);
|
|
368225
368323
|
setSettingsData((prev_27) => ({
|
|
@@ -374564,24 +374662,57 @@ function slugify2(text, maxLen = 40) {
|
|
|
374564
374662
|
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, maxLen);
|
|
374565
374663
|
}
|
|
374566
374664
|
var call19 = async (onDone, _context, args) => {
|
|
374567
|
-
const
|
|
374568
|
-
|
|
374569
|
-
|
|
374665
|
+
const raw = args?.trim() ?? "";
|
|
374666
|
+
const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
|
|
374667
|
+
const projectRoot = getOriginalCwd2() ?? process.cwd();
|
|
374668
|
+
if (!raw) {
|
|
374669
|
+
const config3 = await loadConfig(projectRoot);
|
|
374670
|
+
const workflows = await listWorkflows(projectRoot);
|
|
374671
|
+
const defaultWf = config3?.defaultWorkflow ?? "(built-in txt2img)";
|
|
374672
|
+
const lines2 = [
|
|
374570
374673
|
"◆ /image — Generate an image via ComfyUI",
|
|
374571
374674
|
"",
|
|
374572
374675
|
" Usage: /image <prompt>",
|
|
374573
|
-
"
|
|
374676
|
+
" Workflow: /image <name>: <prompt>",
|
|
374574
374677
|
"",
|
|
374575
|
-
"
|
|
374576
|
-
" /image
|
|
374577
|
-
"
|
|
374578
|
-
"
|
|
374579
|
-
|
|
374678
|
+
" Examples:",
|
|
374679
|
+
" /image a misty forest at dawn, cinematic lighting",
|
|
374680
|
+
" /image txt2img: an elderly scholar by candlelight",
|
|
374681
|
+
"",
|
|
374682
|
+
` Default workflow: ${defaultWf}`
|
|
374683
|
+
];
|
|
374684
|
+
if (workflows.length > 0) {
|
|
374685
|
+
lines2.push(" Available workflows:");
|
|
374686
|
+
for (const w2 of workflows)
|
|
374687
|
+
lines2.push(` • ${w2.replace(/\.json$/, "")}`);
|
|
374688
|
+
} else {
|
|
374689
|
+
lines2.push(" No project workflows — run /image-pipeline setup to scaffold");
|
|
374690
|
+
}
|
|
374691
|
+
lines2.push("");
|
|
374692
|
+
lines2.push(" ComfyUI must be running. To configure:");
|
|
374693
|
+
lines2.push(" /image-pipeline setup — scaffold project folders");
|
|
374694
|
+
lines2.push(" /image-pipeline config <url> — set backend URL");
|
|
374695
|
+
lines2.push(" /image-pipeline workflow <n> — set default workflow");
|
|
374696
|
+
onDone(lines2.join(`
|
|
374580
374697
|
`), { display: "system" });
|
|
374581
374698
|
return null;
|
|
374582
374699
|
}
|
|
374583
|
-
|
|
374584
|
-
|
|
374700
|
+
let workflowName;
|
|
374701
|
+
let promptText = raw;
|
|
374702
|
+
const colonIdx = raw.indexOf(":");
|
|
374703
|
+
if (colonIdx > 0) {
|
|
374704
|
+
const candidate = raw.slice(0, colonIdx).trim();
|
|
374705
|
+
if (/^[\w-]+$/.test(candidate)) {
|
|
374706
|
+
workflowName = candidate;
|
|
374707
|
+
promptText = raw.slice(colonIdx + 1).trim();
|
|
374708
|
+
}
|
|
374709
|
+
}
|
|
374710
|
+
if (!promptText) {
|
|
374711
|
+
onDone(`◆ /image — Prompt required
|
|
374712
|
+
|
|
374713
|
+
Usage: /image <name>: <prompt>`, { display: "system" });
|
|
374714
|
+
return null;
|
|
374715
|
+
}
|
|
374585
374716
|
const config2 = await loadConfig(projectRoot);
|
|
374586
374717
|
const configuredUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
374587
374718
|
let backendUrl = null;
|
|
@@ -374592,48 +374723,39 @@ var call19 = async (onDone, _context, args) => {
|
|
|
374592
374723
|
}
|
|
374593
374724
|
if (!backendUrl) {
|
|
374594
374725
|
onDone([
|
|
374595
|
-
"◆ /image —
|
|
374726
|
+
"◆ /image — ComfyUI not found",
|
|
374596
374727
|
"",
|
|
374597
|
-
`
|
|
374728
|
+
` Tried: ${configuredUrl}`,
|
|
374598
374729
|
" Start ComfyUI, then try again.",
|
|
374599
374730
|
" To set a remote URL: /image-pipeline config http://<host>:8000"
|
|
374600
374731
|
].join(`
|
|
374601
374732
|
`), { display: "system" });
|
|
374602
374733
|
return null;
|
|
374603
374734
|
}
|
|
374735
|
+
const effectiveWorkflowName = workflowName ?? config2?.defaultWorkflow;
|
|
374736
|
+
let workflow = effectiveWorkflowName ? await loadWorkflow(projectRoot, effectiveWorkflowName) : null;
|
|
374737
|
+
if (effectiveWorkflowName && !workflow) {
|
|
374738
|
+
onDone([
|
|
374739
|
+
`◆ /image — Workflow not found: "${effectiveWorkflowName}"`,
|
|
374740
|
+
"",
|
|
374741
|
+
" Run /image-pipeline list to see available workflows.",
|
|
374742
|
+
" Falling back to built-in txt2img workflow."
|
|
374743
|
+
].join(`
|
|
374744
|
+
`), { display: "system" });
|
|
374745
|
+
}
|
|
374746
|
+
if (!workflow)
|
|
374747
|
+
workflow = DEFAULT_WORKFLOW;
|
|
374604
374748
|
const model = config2?.defaultModel || "v1-5-pruned-emaonly.safetensors";
|
|
374605
374749
|
const width = config2?.defaultWidth ?? 512;
|
|
374606
374750
|
const height = config2?.defaultHeight ?? 512;
|
|
374607
374751
|
const steps = config2?.defaultSteps ?? 20;
|
|
374608
374752
|
const cfg = config2?.defaultCfg ?? 7;
|
|
374609
|
-
const sampler = config2?.defaultSampler ?? "euler";
|
|
374610
374753
|
const seed = Math.floor(Math.random() * 4294967296);
|
|
374611
|
-
const
|
|
374612
|
-
|
|
374613
|
-
"5": { class_type: "EmptyLatentImage", inputs: { width, height, batch_size: 1 } },
|
|
374614
|
-
"6": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: prompt } },
|
|
374615
|
-
"7": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: "blurry, low quality, watermark, deformed" } },
|
|
374616
|
-
"3": {
|
|
374617
|
-
class_type: "KSampler",
|
|
374618
|
-
inputs: {
|
|
374619
|
-
model: ["4", 0],
|
|
374620
|
-
positive: ["6", 0],
|
|
374621
|
-
negative: ["7", 0],
|
|
374622
|
-
latent_image: ["5", 0],
|
|
374623
|
-
seed,
|
|
374624
|
-
steps,
|
|
374625
|
-
cfg,
|
|
374626
|
-
sampler_name: sampler,
|
|
374627
|
-
scheduler: "normal",
|
|
374628
|
-
denoise: 1
|
|
374629
|
-
}
|
|
374630
|
-
},
|
|
374631
|
-
"8": { class_type: "VAEDecode", inputs: { samples: ["3", 0], vae: ["4", 2] } },
|
|
374632
|
-
"9": { class_type: "SaveImage", inputs: { filename_prefix: "localclawd", images: ["8", 0] } }
|
|
374633
|
-
};
|
|
374754
|
+
const negative = "blurry, low quality, watermark, deformed";
|
|
374755
|
+
const finalWorkflow = injectPrompt(workflow, promptText, negative, { seed, model, width, height, steps, cfg });
|
|
374634
374756
|
let queued;
|
|
374635
374757
|
try {
|
|
374636
|
-
queued = await queuePrompt(backendUrl,
|
|
374758
|
+
queued = await queuePrompt(backendUrl, finalWorkflow);
|
|
374637
374759
|
} catch (e) {
|
|
374638
374760
|
onDone(`◆ /image — Queue Error
|
|
374639
374761
|
|
|
@@ -374664,24 +374786,25 @@ var call19 = async (onDone, _context, args) => {
|
|
|
374664
374786
|
const params = new URLSearchParams({ filename: imgFilename, subfolder, type: "output" });
|
|
374665
374787
|
const res = await fetch(`${backendUrl}/view?${params}`);
|
|
374666
374788
|
if (res.ok) {
|
|
374667
|
-
const outName = `${timestamp2()}_${slugify2(
|
|
374789
|
+
const outName = `${timestamp2()}_${slugify2(promptText)}.png`;
|
|
374668
374790
|
await writeFile36(join112(outputDir, outName), Buffer.from(await res.arrayBuffer()));
|
|
374669
374791
|
savedPaths.push(join112(outputDir, outName));
|
|
374670
374792
|
}
|
|
374671
374793
|
} catch {}
|
|
374672
374794
|
}
|
|
374795
|
+
const usedWorkflow = effectiveWorkflowName ?? "built-in txt2img";
|
|
374673
374796
|
const lines = savedPaths.length > 0 ? [
|
|
374674
374797
|
"◆ /image — Done",
|
|
374675
374798
|
"",
|
|
374676
374799
|
` Saved to: ${savedPaths.join(`
|
|
374677
374800
|
`)}`,
|
|
374678
|
-
` Seed: ${seed} · ${steps} steps · ${width}×${height}
|
|
374801
|
+
` Workflow: ${usedWorkflow} · Seed: ${seed} · ${steps} steps · ${width}×${height}`
|
|
374679
374802
|
] : [
|
|
374680
374803
|
"◆ /image — Done (download failed)",
|
|
374681
374804
|
"",
|
|
374682
|
-
|
|
374805
|
+
" Job complete but image download failed.",
|
|
374683
374806
|
` ComfyUI filenames: ${comfyImages.join(", ") || "(none)"}`,
|
|
374684
|
-
` Seed: ${seed}`
|
|
374807
|
+
` Workflow: ${usedWorkflow} · Seed: ${seed}`
|
|
374685
374808
|
];
|
|
374686
374809
|
onDone(lines.join(`
|
|
374687
374810
|
`), { display: "system" });
|
|
@@ -374698,8 +374821,8 @@ var init_images2 = __esm(() => {
|
|
|
374698
374821
|
type: "local-jsx",
|
|
374699
374822
|
name: "image",
|
|
374700
374823
|
aliases: ["images"],
|
|
374701
|
-
description:
|
|
374702
|
-
argumentHint: "<prompt>",
|
|
374824
|
+
description: 'Generate an image via ComfyUI. Use "name: prompt" to select a workflow. Run /image-pipeline setup first.',
|
|
374825
|
+
argumentHint: "[workflow-name:] <prompt>",
|
|
374703
374826
|
load: () => Promise.resolve().then(() => (init_images(), exports_images))
|
|
374704
374827
|
};
|
|
374705
374828
|
images_default = image;
|
|
@@ -374712,22 +374835,6 @@ __export(exports_image_pipeline, {
|
|
|
374712
374835
|
});
|
|
374713
374836
|
import { join as join113 } from "path";
|
|
374714
374837
|
import { mkdir as mkdir35, writeFile as writeFile37 } from "fs/promises";
|
|
374715
|
-
function timestamp3() {
|
|
374716
|
-
const d = new Date;
|
|
374717
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
374718
|
-
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}_${pad(d.getHours())}-${pad(d.getMinutes())}-${pad(d.getSeconds())}`;
|
|
374719
|
-
}
|
|
374720
|
-
function slugify3(text, maxLen = 40) {
|
|
374721
|
-
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, maxLen);
|
|
374722
|
-
}
|
|
374723
|
-
async function pickBackend(config2) {
|
|
374724
|
-
if (await detectComfyUI(DEFAULT_COMFYUI_URL))
|
|
374725
|
-
return DEFAULT_COMFYUI_URL;
|
|
374726
|
-
const configured = config2?.backendUrl;
|
|
374727
|
-
if (configured && configured !== DEFAULT_COMFYUI_URL && await detectComfyUI(configured))
|
|
374728
|
-
return configured;
|
|
374729
|
-
return null;
|
|
374730
|
-
}
|
|
374731
374838
|
var call20 = async (onDone, _context, args) => {
|
|
374732
374839
|
const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
|
|
374733
374840
|
const projectRoot = getOriginalCwd2() ?? process.cwd();
|
|
@@ -374735,70 +374842,84 @@ var call20 = async (onDone, _context, args) => {
|
|
|
374735
374842
|
const [subcmd, ...rest] = rawArgs ? rawArgs.split(/\s+/) : [""];
|
|
374736
374843
|
const restText = rest.join(" ").trim();
|
|
374737
374844
|
if (!subcmd) {
|
|
374738
|
-
const
|
|
374739
|
-
const backendUrl =
|
|
374845
|
+
const config2 = await loadConfig(projectRoot);
|
|
374846
|
+
const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
374740
374847
|
const active = await detectComfyUI(backendUrl);
|
|
374741
|
-
const scaffolded =
|
|
374742
|
-
const prompts = scaffolded ? await listPrompts(projectRoot) : [];
|
|
374743
|
-
const
|
|
374744
|
-
const lines2 = ["◆ Image Pipeline", ""];
|
|
374848
|
+
const scaffolded = config2 !== null;
|
|
374849
|
+
const [prompts, workflows] = scaffolded ? await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]) : [[], []];
|
|
374850
|
+
const lines = ["◆ Image Pipeline", ""];
|
|
374745
374851
|
if (active) {
|
|
374746
|
-
|
|
374852
|
+
lines.push(` ● ComfyUI active at ${backendUrl}`);
|
|
374747
374853
|
} else {
|
|
374748
|
-
|
|
374749
|
-
|
|
374854
|
+
lines.push(` ○ ComfyUI not found at ${backendUrl}`);
|
|
374855
|
+
lines.push(` → To connect: /image-pipeline config http://<host>:8000`);
|
|
374750
374856
|
}
|
|
374751
374857
|
if (scaffolded) {
|
|
374752
|
-
|
|
374753
|
-
|
|
374858
|
+
const defaultWf = config2?.defaultWorkflow ?? "(built-in txt2img)";
|
|
374859
|
+
lines.push(` Scaffold: .localclawd/image-pipeline/ (${prompts.length} prompts, ${workflows.length} workflows)`);
|
|
374860
|
+
lines.push(` Generated: .localclawd/image-pipeline/generated/`);
|
|
374861
|
+
lines.push(` Default workflow: ${defaultWf}`);
|
|
374754
374862
|
} else {
|
|
374755
|
-
|
|
374863
|
+
lines.push(` Not scaffolded — run: /image-pipeline setup`);
|
|
374756
374864
|
}
|
|
374757
|
-
|
|
374758
|
-
|
|
374759
|
-
|
|
374760
|
-
|
|
374761
|
-
|
|
374762
|
-
|
|
374763
|
-
|
|
374865
|
+
lines.push("");
|
|
374866
|
+
lines.push(" Commands:");
|
|
374867
|
+
lines.push(" /image-pipeline setup — create project dirs and workflow templates");
|
|
374868
|
+
lines.push(" /image-pipeline config <url> — set ComfyUI backend URL");
|
|
374869
|
+
lines.push(" /image-pipeline workflow <name> — set default workflow");
|
|
374870
|
+
lines.push(" /image-pipeline list — list local + server workflows");
|
|
374871
|
+
lines.push(" /image-pipeline fetch <name> — download workflow from ComfyUI server");
|
|
374872
|
+
lines.push("");
|
|
374873
|
+
lines.push(" To generate images:");
|
|
374874
|
+
lines.push(" /image <prompt> — generate with default workflow");
|
|
374875
|
+
lines.push(" /image <name>: <prompt> — generate with named workflow");
|
|
374876
|
+
onDone(lines.join(`
|
|
374764
374877
|
`), { display: "system" });
|
|
374765
374878
|
return null;
|
|
374766
374879
|
}
|
|
374767
374880
|
if (subcmd === "setup") {
|
|
374768
374881
|
const { created, alreadyExisted } = await scaffoldProject(projectRoot);
|
|
374769
|
-
const
|
|
374770
|
-
const backendUrl =
|
|
374882
|
+
const config2 = await loadConfig(projectRoot);
|
|
374883
|
+
const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
374771
374884
|
const active = await detectComfyUI(backendUrl);
|
|
374772
|
-
const
|
|
374773
|
-
const
|
|
374885
|
+
const generatedDir = join113(projectRoot, ".localclawd", "image-pipeline", "generated");
|
|
374886
|
+
const lines = ["◆ Image Pipeline — Setup", ""];
|
|
374774
374887
|
if (active) {
|
|
374775
|
-
|
|
374888
|
+
lines.push(` ● ComfyUI active at ${backendUrl}`);
|
|
374776
374889
|
} else {
|
|
374777
|
-
|
|
374778
|
-
|
|
374890
|
+
lines.push(` ○ ComfyUI not detected at ${backendUrl}`);
|
|
374891
|
+
lines.push(` → To connect: /image-pipeline config http://<host>:8000`);
|
|
374779
374892
|
}
|
|
374780
|
-
|
|
374893
|
+
lines.push("");
|
|
374781
374894
|
if (alreadyExisted) {
|
|
374782
|
-
|
|
374895
|
+
lines.push(" Pipeline already scaffolded.");
|
|
374783
374896
|
} else {
|
|
374784
|
-
|
|
374897
|
+
lines.push(` Created ${created.length} files:`);
|
|
374785
374898
|
for (const f of created)
|
|
374786
|
-
|
|
374899
|
+
lines.push(` + ${f}`);
|
|
374787
374900
|
}
|
|
374788
|
-
|
|
374789
|
-
|
|
374790
|
-
|
|
374791
|
-
|
|
374901
|
+
lines.push("");
|
|
374902
|
+
lines.push(` Generated images will be saved to:`);
|
|
374903
|
+
lines.push(` ${generatedDir}`);
|
|
374904
|
+
lines.push("");
|
|
374905
|
+
lines.push(" Next steps:");
|
|
374906
|
+
lines.push(" /image-pipeline config http://127.0.0.1:8000 — confirm or change ComfyUI URL");
|
|
374907
|
+
lines.push(" /image-pipeline workflow txt2img — set default workflow");
|
|
374908
|
+
lines.push(" /image a misty forest at dawn — generate an image");
|
|
374909
|
+
onDone(lines.join(`
|
|
374792
374910
|
`), { display: "system" });
|
|
374793
374911
|
return null;
|
|
374794
374912
|
}
|
|
374795
374913
|
if (subcmd === "config") {
|
|
374796
374914
|
const newUrl = restText;
|
|
374797
374915
|
if (!newUrl || !newUrl.startsWith("http")) {
|
|
374798
|
-
onDone(
|
|
374799
|
-
|
|
374800
|
-
|
|
374801
|
-
|
|
374916
|
+
onDone([
|
|
374917
|
+
"◆ Image Pipeline — Config",
|
|
374918
|
+
"",
|
|
374919
|
+
" Usage: /image-pipeline config http://<host>:8000",
|
|
374920
|
+
" Example: /image-pipeline config http://192.168.1.50:8000"
|
|
374921
|
+
].join(`
|
|
374922
|
+
`), { display: "system" });
|
|
374802
374923
|
return null;
|
|
374803
374924
|
}
|
|
374804
374925
|
await scaffoldProject(projectRoot);
|
|
@@ -374815,141 +374936,184 @@ var call20 = async (onDone, _context, args) => {
|
|
|
374815
374936
|
existing.backendUrl = newUrl;
|
|
374816
374937
|
await saveConfig2(projectRoot, existing);
|
|
374817
374938
|
const active = await detectComfyUI(newUrl);
|
|
374818
|
-
|
|
374939
|
+
onDone([
|
|
374819
374940
|
"◆ Image Pipeline — Config Saved",
|
|
374820
374941
|
"",
|
|
374821
374942
|
` Backend URL: ${newUrl}`,
|
|
374822
374943
|
active ? " ● ComfyUI is reachable" : " ○ ComfyUI not reachable yet (URL saved — start ComfyUI to connect)"
|
|
374823
|
-
]
|
|
374824
|
-
onDone(lines2.join(`
|
|
374944
|
+
].join(`
|
|
374825
374945
|
`), { display: "system" });
|
|
374826
374946
|
return null;
|
|
374827
374947
|
}
|
|
374828
|
-
if (subcmd === "
|
|
374829
|
-
const
|
|
374830
|
-
|
|
374831
|
-
|
|
374832
|
-
|
|
374833
|
-
|
|
374834
|
-
|
|
374835
|
-
|
|
374836
|
-
|
|
374837
|
-
|
|
374838
|
-
|
|
374948
|
+
if (subcmd === "workflow") {
|
|
374949
|
+
const name = restText;
|
|
374950
|
+
if (!name) {
|
|
374951
|
+
const workflows2 = await listWorkflows(projectRoot);
|
|
374952
|
+
const lines = [
|
|
374953
|
+
"◆ Image Pipeline — Set Default Workflow",
|
|
374954
|
+
"",
|
|
374955
|
+
" Usage: /image-pipeline workflow <name>"
|
|
374956
|
+
];
|
|
374957
|
+
if (workflows2.length > 0) {
|
|
374958
|
+
lines.push(" Available:");
|
|
374959
|
+
for (const w2 of workflows2)
|
|
374960
|
+
lines.push(` • ${w2.replace(/\.json$/, "")}`);
|
|
374961
|
+
} else {
|
|
374962
|
+
lines.push(" No workflows found — run /image-pipeline setup first.");
|
|
374839
374963
|
}
|
|
374964
|
+
onDone(lines.join(`
|
|
374965
|
+
`), { display: "system" });
|
|
374966
|
+
return null;
|
|
374967
|
+
}
|
|
374968
|
+
await scaffoldProject(projectRoot);
|
|
374969
|
+
const config2 = await loadConfig(projectRoot) ?? {
|
|
374970
|
+
backendUrl: DEFAULT_COMFYUI_URL,
|
|
374971
|
+
defaultWidth: 512,
|
|
374972
|
+
defaultHeight: 512,
|
|
374973
|
+
defaultSteps: 20,
|
|
374974
|
+
defaultCfg: 7,
|
|
374975
|
+
defaultSampler: "euler",
|
|
374976
|
+
defaultModel: "",
|
|
374977
|
+
outputDir: ".localclawd/image-pipeline/generated"
|
|
374978
|
+
};
|
|
374979
|
+
const workflows = await listWorkflows(projectRoot);
|
|
374980
|
+
const match = workflows.find((w2) => w2 === name || w2 === `${name}.json`);
|
|
374981
|
+
if (!match) {
|
|
374982
|
+
const lines = [
|
|
374983
|
+
`◆ Image Pipeline — Workflow not found: "${name}"`,
|
|
374984
|
+
""
|
|
374985
|
+
];
|
|
374840
374986
|
if (workflows.length > 0) {
|
|
374841
|
-
|
|
374987
|
+
lines.push(" Available:");
|
|
374842
374988
|
for (const w2 of workflows)
|
|
374843
|
-
|
|
374989
|
+
lines.push(` • ${w2.replace(/\.json$/, "")}`);
|
|
374990
|
+
} else {
|
|
374991
|
+
lines.push(" No workflows found — run /image-pipeline setup first.");
|
|
374844
374992
|
}
|
|
374845
|
-
|
|
374846
|
-
onDone(lines2.join(`
|
|
374993
|
+
onDone(lines.join(`
|
|
374847
374994
|
`), { display: "system" });
|
|
374848
|
-
|
|
374849
|
-
|
|
374850
|
-
|
|
374851
|
-
|
|
374852
|
-
onDone(`◆ Image Pipeline — Generate
|
|
374853
|
-
|
|
374854
|
-
Usage: /image-pipeline generate <prompt>
|
|
374855
|
-
Example: /image-pipeline generate a misty mountain at dawn, cinematic`, { display: "system" });
|
|
374856
|
-
return null;
|
|
374857
|
-
}
|
|
374858
|
-
const config2 = await loadConfig(projectRoot);
|
|
374859
|
-
const backend = await pickBackend(config2);
|
|
374860
|
-
if (!backend) {
|
|
374861
|
-
const tried = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
374995
|
+
return null;
|
|
374996
|
+
}
|
|
374997
|
+
config2.defaultWorkflow = name.replace(/\.json$/, "");
|
|
374998
|
+
await saveConfig2(projectRoot, config2);
|
|
374862
374999
|
onDone([
|
|
374863
|
-
"◆ Image Pipeline —
|
|
375000
|
+
"◆ Image Pipeline — Default Workflow Set",
|
|
374864
375001
|
"",
|
|
374865
|
-
`
|
|
374866
|
-
"
|
|
374867
|
-
" Or
|
|
375002
|
+
` Default workflow: ${config2.defaultWorkflow}`,
|
|
375003
|
+
" Use /image <prompt> to generate with this workflow.",
|
|
375004
|
+
" Or override per-generation: /image <other-workflow>: <prompt>"
|
|
374868
375005
|
].join(`
|
|
374869
375006
|
`), { display: "system" });
|
|
374870
375007
|
return null;
|
|
374871
375008
|
}
|
|
374872
|
-
|
|
374873
|
-
|
|
374874
|
-
|
|
374875
|
-
|
|
374876
|
-
|
|
374877
|
-
|
|
374878
|
-
|
|
374879
|
-
|
|
374880
|
-
|
|
374881
|
-
|
|
374882
|
-
|
|
374883
|
-
|
|
374884
|
-
"3": {
|
|
374885
|
-
class_type: "KSampler",
|
|
374886
|
-
inputs: {
|
|
374887
|
-
model: ["4", 0],
|
|
374888
|
-
positive: ["6", 0],
|
|
374889
|
-
negative: ["7", 0],
|
|
374890
|
-
latent_image: ["5", 0],
|
|
374891
|
-
seed,
|
|
374892
|
-
steps,
|
|
374893
|
-
cfg,
|
|
374894
|
-
sampler_name: sampler,
|
|
374895
|
-
scheduler: "normal",
|
|
374896
|
-
denoise: 1
|
|
375009
|
+
if (subcmd === "list") {
|
|
375010
|
+
const config2 = await loadConfig(projectRoot);
|
|
375011
|
+
const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
375012
|
+
const [prompts, workflows] = await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]);
|
|
375013
|
+
const defaultWf = config2?.defaultWorkflow;
|
|
375014
|
+
const lines = ["◆ Image Pipeline — Workflows & Templates", ""];
|
|
375015
|
+
if (workflows.length > 0) {
|
|
375016
|
+
lines.push(" Local workflows (.localclawd/image-pipeline/workflows/):");
|
|
375017
|
+
for (const w2 of workflows) {
|
|
375018
|
+
const name = w2.replace(/\.json$/, "");
|
|
375019
|
+
const marker = defaultWf && name === defaultWf ? " ← default" : "";
|
|
375020
|
+
lines.push(` • ${name}${marker}`);
|
|
374897
375021
|
}
|
|
374898
|
-
}
|
|
374899
|
-
|
|
374900
|
-
|
|
374901
|
-
|
|
374902
|
-
|
|
374903
|
-
|
|
374904
|
-
|
|
374905
|
-
|
|
374906
|
-
|
|
374907
|
-
|
|
374908
|
-
|
|
374909
|
-
|
|
375022
|
+
} else {
|
|
375023
|
+
lines.push(" No local workflows — run /image-pipeline setup to scaffold.");
|
|
375024
|
+
}
|
|
375025
|
+
const serverList = await fetchServerWorkflowList(backendUrl);
|
|
375026
|
+
if (serverList && serverList.length > 0) {
|
|
375027
|
+
lines.push("");
|
|
375028
|
+
lines.push(` Server workflows (${backendUrl}):`);
|
|
375029
|
+
for (const w2 of serverList)
|
|
375030
|
+
lines.push(` • ${w2.replace(/\.json$/, "")}`);
|
|
375031
|
+
lines.push(" → /image-pipeline fetch <name> — download to local workflows/");
|
|
375032
|
+
lines.push(" Note: server workflows must be saved in API format to work with /image");
|
|
375033
|
+
} else if (await detectComfyUI(backendUrl)) {
|
|
375034
|
+
lines.push("");
|
|
375035
|
+
lines.push(` Server (${backendUrl}): no saved workflows found`);
|
|
375036
|
+
}
|
|
375037
|
+
if (prompts.length > 0) {
|
|
375038
|
+
lines.push("");
|
|
375039
|
+
lines.push(" Prompt templates:");
|
|
375040
|
+
for (const p of prompts)
|
|
375041
|
+
lines.push(` • prompts/${p}`);
|
|
375042
|
+
}
|
|
375043
|
+
lines.push("");
|
|
375044
|
+
lines.push(" To use: /image <name>: <prompt>");
|
|
375045
|
+
lines.push(" To set default: /image-pipeline workflow <name>");
|
|
375046
|
+
onDone(lines.join(`
|
|
375047
|
+
`), { display: "system" });
|
|
374910
375048
|
return null;
|
|
374911
375049
|
}
|
|
374912
|
-
|
|
374913
|
-
|
|
375050
|
+
if (subcmd === "fetch") {
|
|
375051
|
+
const name = restText;
|
|
375052
|
+
const config2 = await loadConfig(projectRoot);
|
|
375053
|
+
const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
|
|
375054
|
+
if (!name) {
|
|
375055
|
+
const serverList = await fetchServerWorkflowList(backendUrl);
|
|
375056
|
+
const lines = ["◆ Image Pipeline — Fetch Server Workflow", ""];
|
|
375057
|
+
if (!serverList) {
|
|
375058
|
+
lines.push(` ComfyUI not reachable at ${backendUrl}`);
|
|
375059
|
+
lines.push(" Start ComfyUI or run /image-pipeline config <url>");
|
|
375060
|
+
} else if (serverList.length === 0) {
|
|
375061
|
+
lines.push(" No workflows found on server.");
|
|
375062
|
+
lines.push(" Save workflows in ComfyUI (using API format) to make them available.");
|
|
375063
|
+
} else {
|
|
375064
|
+
lines.push(" Usage: /image-pipeline fetch <name>");
|
|
375065
|
+
lines.push("");
|
|
375066
|
+
lines.push(" Available on server:");
|
|
375067
|
+
for (const w2 of serverList)
|
|
375068
|
+
lines.push(` • ${w2.replace(/\.json$/, "")}`);
|
|
375069
|
+
lines.push("");
|
|
375070
|
+
lines.push(" Note: workflows must be saved in ComfyUI API format (not visual editor format).");
|
|
375071
|
+
lines.push(' Enable Dev Mode in ComfyUI settings to get "Save (API Format)" option.');
|
|
375072
|
+
}
|
|
375073
|
+
onDone(lines.join(`
|
|
375074
|
+
`), { display: "system" });
|
|
375075
|
+
return null;
|
|
375076
|
+
}
|
|
375077
|
+
const workflowData = await fetchServerWorkflow(backendUrl, name);
|
|
375078
|
+
if (!workflowData) {
|
|
375079
|
+
onDone([
|
|
375080
|
+
`◆ Image Pipeline — Fetch Failed: "${name}"`,
|
|
375081
|
+
"",
|
|
375082
|
+
` Could not fetch from ${backendUrl}/userdata/workflows/${name}.json`,
|
|
375083
|
+
" Check ComfyUI is running and the workflow name is correct.",
|
|
375084
|
+
" Run /image-pipeline fetch (no args) to list available workflows."
|
|
375085
|
+
].join(`
|
|
375086
|
+
`), { display: "system" });
|
|
375087
|
+
return null;
|
|
375088
|
+
}
|
|
375089
|
+
await scaffoldProject(projectRoot);
|
|
375090
|
+
const filename = name.endsWith(".json") ? name : `${name}.json`;
|
|
375091
|
+
const outPath = join113(projectRoot, ".localclawd", "image-pipeline", "workflows", filename);
|
|
375092
|
+
await mkdir35(join113(projectRoot, ".localclawd", "image-pipeline", "workflows"), { recursive: true });
|
|
375093
|
+
await writeFile37(outPath, JSON.stringify(workflowData, null, 2), "utf-8");
|
|
374914
375094
|
onDone([
|
|
374915
|
-
|
|
375095
|
+
`◆ Image Pipeline — Fetched: "${name}"`,
|
|
374916
375096
|
"",
|
|
374917
|
-
`
|
|
374918
|
-
`
|
|
375097
|
+
` Saved to: .localclawd/image-pipeline/workflows/${filename}`,
|
|
375098
|
+
` Use: /image ${name.replace(/\.json$/, "")}: <prompt>`,
|
|
375099
|
+
" Or set as default: /image-pipeline workflow " + name.replace(/\.json$/, ""),
|
|
375100
|
+
"",
|
|
375101
|
+
" Note: if this was saved from the ComfyUI visual editor (not API format),",
|
|
375102
|
+
" it may not work. Enable Dev Mode in ComfyUI → Save (API Format) instead."
|
|
374919
375103
|
].join(`
|
|
374920
375104
|
`), { display: "system" });
|
|
374921
375105
|
return null;
|
|
374922
375106
|
}
|
|
374923
|
-
|
|
374924
|
-
|
|
374925
|
-
const comfyImages = extractOutputImages(result);
|
|
374926
|
-
const savedPaths = [];
|
|
374927
|
-
for (const imgFilename of comfyImages) {
|
|
374928
|
-
const subfolder = Object.values(result.outputs).flatMap((o) => o.images ?? []).find((img) => img.filename === imgFilename)?.subfolder ?? "";
|
|
374929
|
-
try {
|
|
374930
|
-
const params = new URLSearchParams({ filename: imgFilename, subfolder, type: "output" });
|
|
374931
|
-
const res = await fetch(`${backend}/view?${params}`);
|
|
374932
|
-
if (res.ok) {
|
|
374933
|
-
const outName = `${timestamp3()}_${slugify3(promptText)}.png`;
|
|
374934
|
-
await writeFile37(join113(outputDir, outName), Buffer.from(await res.arrayBuffer()));
|
|
374935
|
-
savedPaths.push(join113(outputDir, outName));
|
|
374936
|
-
}
|
|
374937
|
-
} catch {}
|
|
374938
|
-
}
|
|
374939
|
-
const lines = savedPaths.length > 0 ? [
|
|
374940
|
-
"◆ Image Pipeline — Done",
|
|
374941
|
-
"",
|
|
374942
|
-
` Saved ${savedPaths.length} image${savedPaths.length !== 1 ? "s" : ""}:`,
|
|
374943
|
-
...savedPaths.map((p) => ` ${p}`),
|
|
374944
|
-
` Seed: ${seed} · ${steps} steps · ${width}×${height} · ${model}`
|
|
374945
|
-
] : [
|
|
374946
|
-
"◆ Image Pipeline — Done (download failed)",
|
|
375107
|
+
onDone([
|
|
375108
|
+
`◆ Image Pipeline — Unknown subcommand: "${subcmd}"`,
|
|
374947
375109
|
"",
|
|
374948
|
-
|
|
374949
|
-
|
|
374950
|
-
|
|
374951
|
-
|
|
374952
|
-
|
|
375110
|
+
" Commands:",
|
|
375111
|
+
" /image-pipeline setup — scaffold project",
|
|
375112
|
+
" /image-pipeline config <url> — set ComfyUI backend URL",
|
|
375113
|
+
" /image-pipeline workflow <name> — set default workflow",
|
|
375114
|
+
" /image-pipeline list — list local + server workflows",
|
|
375115
|
+
" /image-pipeline fetch <name> — download workflow from ComfyUI server"
|
|
375116
|
+
].join(`
|
|
374953
375117
|
`), { display: "system" });
|
|
374954
375118
|
return null;
|
|
374955
375119
|
};
|
|
@@ -374964,8 +375128,8 @@ var init_image_pipeline2 = __esm(() => {
|
|
|
374964
375128
|
type: "local-jsx",
|
|
374965
375129
|
name: "image-pipeline",
|
|
374966
375130
|
aliases: ["comfyui", "imgpipe"],
|
|
374967
|
-
description: "ComfyUI
|
|
374968
|
-
argumentHint: "[setup|
|
|
375131
|
+
description: "ComfyUI pipeline setup — scaffold workflows, configure backend, manage templates. Use /image to generate.",
|
|
375132
|
+
argumentHint: "[setup|config|workflow|list|fetch] [args]",
|
|
374969
375133
|
load: () => Promise.resolve().then(() => (init_image_pipeline(), exports_image_pipeline))
|
|
374970
375134
|
};
|
|
374971
375135
|
image_pipeline_default = imagePipeline;
|
|
@@ -375061,7 +375225,7 @@ async function saveDirectorState(state) {
|
|
|
375061
375225
|
await mkdir36(dir, { recursive: true });
|
|
375062
375226
|
await writeFile38(getStatePath(), JSON.stringify(state, null, 2), "utf-8");
|
|
375063
375227
|
}
|
|
375064
|
-
function
|
|
375228
|
+
function slugify3(path12) {
|
|
375065
375229
|
return basename34(resolve36(path12)).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
375066
375230
|
}
|
|
375067
375231
|
async function detectGitRemote(projectPath) {
|
|
@@ -375099,7 +375263,7 @@ function generateTags(project) {
|
|
|
375099
375263
|
}
|
|
375100
375264
|
async function registerProject(state, projectPath, description) {
|
|
375101
375265
|
const absPath = resolve36(projectPath);
|
|
375102
|
-
const id =
|
|
375266
|
+
const id = slugify3(absPath);
|
|
375103
375267
|
const existing = state.projects.find((p) => p.id === id || p.path === absPath);
|
|
375104
375268
|
if (existing) {
|
|
375105
375269
|
existing.lastActive = Date.now();
|
|
@@ -385583,7 +385747,7 @@ function Help(t0) {
|
|
|
385583
385747
|
let t6;
|
|
385584
385748
|
if ($2[31] !== tabs) {
|
|
385585
385749
|
t6 = /* @__PURE__ */ jsx_dev_runtime221.jsxDEV(Tabs, {
|
|
385586
|
-
title: `localclawd v${"1.8.
|
|
385750
|
+
title: `localclawd v${"1.8.6"}`,
|
|
385587
385751
|
color: "professionalBlue",
|
|
385588
385752
|
defaultTab: "general",
|
|
385589
385753
|
children: tabs
|
|
@@ -402845,7 +403009,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
|
|
|
402845
403009
|
}
|
|
402846
403010
|
return [];
|
|
402847
403011
|
}
|
|
402848
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.
|
|
403012
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.6") {
|
|
402849
403013
|
if (process.env.USER_TYPE === "ant") {
|
|
402850
403014
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
402851
403015
|
if (changelog) {
|
|
@@ -402872,7 +403036,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.4") {
|
|
|
402872
403036
|
releaseNotes
|
|
402873
403037
|
};
|
|
402874
403038
|
}
|
|
402875
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.8.
|
|
403039
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.8.6") {
|
|
402876
403040
|
if (process.env.USER_TYPE === "ant") {
|
|
402877
403041
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
402878
403042
|
if (changelog) {
|
|
@@ -403029,7 +403193,7 @@ function getRecentActivitySync() {
|
|
|
403029
403193
|
return cachedActivity;
|
|
403030
403194
|
}
|
|
403031
403195
|
function getLogoDisplayData() {
|
|
403032
|
-
const version = process.env.DEMO_VERSION ?? "1.8.
|
|
403196
|
+
const version = process.env.DEMO_VERSION ?? "1.8.6";
|
|
403033
403197
|
const serverUrl = getDirectConnectServerUrl();
|
|
403034
403198
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
403035
403199
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -403414,9 +403578,9 @@ function checkCachedPassesEligibility() {
|
|
|
403414
403578
|
hasCache: false
|
|
403415
403579
|
};
|
|
403416
403580
|
}
|
|
403417
|
-
const { eligible: eligible2, timestamp:
|
|
403581
|
+
const { eligible: eligible2, timestamp: timestamp3 } = cachedEntry;
|
|
403418
403582
|
const now2 = Date.now();
|
|
403419
|
-
const needsRefresh = now2 -
|
|
403583
|
+
const needsRefresh = now2 - timestamp3 > CACHE_EXPIRATION_MS;
|
|
403420
403584
|
return {
|
|
403421
403585
|
eligible: eligible2,
|
|
403422
403586
|
needsRefresh,
|
|
@@ -403499,11 +403663,11 @@ async function getCachedOrFetchPassesEligibility() {
|
|
|
403499
403663
|
if (now2 - cachedEntry.timestamp > CACHE_EXPIRATION_MS) {
|
|
403500
403664
|
logForDebugging("Passes: Cache stale, returning cached data and refreshing in background");
|
|
403501
403665
|
fetchAndStorePassesEligibility();
|
|
403502
|
-
const { timestamp:
|
|
403666
|
+
const { timestamp: timestamp4, ...response2 } = cachedEntry;
|
|
403503
403667
|
return response2;
|
|
403504
403668
|
}
|
|
403505
403669
|
logForDebugging("Passes: Using fresh cached eligibility data");
|
|
403506
|
-
const { timestamp:
|
|
403670
|
+
const { timestamp: timestamp3, ...response } = cachedEntry;
|
|
403507
403671
|
return response;
|
|
403508
403672
|
}
|
|
403509
403673
|
async function prefetchPassesEligibility() {
|
|
@@ -404129,7 +404293,7 @@ function Logo() {
|
|
|
404129
404293
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
404130
404294
|
t2 = () => {
|
|
404131
404295
|
const currentConfig = getGlobalConfig();
|
|
404132
|
-
if (currentConfig.lastReleaseNotesSeen === "1.8.
|
|
404296
|
+
if (currentConfig.lastReleaseNotesSeen === "1.8.6") {
|
|
404133
404297
|
return;
|
|
404134
404298
|
}
|
|
404135
404299
|
saveGlobalConfig(_temp326);
|
|
@@ -404788,12 +404952,12 @@ function Logo() {
|
|
|
404788
404952
|
return t41;
|
|
404789
404953
|
}
|
|
404790
404954
|
function _temp326(current) {
|
|
404791
|
-
if (current.lastReleaseNotesSeen === "1.8.
|
|
404955
|
+
if (current.lastReleaseNotesSeen === "1.8.6") {
|
|
404792
404956
|
return current;
|
|
404793
404957
|
}
|
|
404794
404958
|
return {
|
|
404795
404959
|
...current,
|
|
404796
|
-
lastReleaseNotesSeen: "1.8.
|
|
404960
|
+
lastReleaseNotesSeen: "1.8.6"
|
|
404797
404961
|
};
|
|
404798
404962
|
}
|
|
404799
404963
|
function _temp241(s_0) {
|
|
@@ -435272,7 +435436,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
435272
435436
|
smapsRollup,
|
|
435273
435437
|
platform: process.platform,
|
|
435274
435438
|
nodeVersion: process.version,
|
|
435275
|
-
ccVersion: "1.8.
|
|
435439
|
+
ccVersion: "1.8.6"
|
|
435276
435440
|
};
|
|
435277
435441
|
}
|
|
435278
435442
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -435857,7 +436021,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
435857
436021
|
var call87 = async () => {
|
|
435858
436022
|
return {
|
|
435859
436023
|
type: "text",
|
|
435860
|
-
value: `${"1.8.
|
|
436024
|
+
value: `${"1.8.6"} (built ${"2026-05-07T17:03:06.068Z"})`
|
|
435861
436025
|
};
|
|
435862
436026
|
}, version, version_default;
|
|
435863
436027
|
var init_version = __esm(() => {
|
|
@@ -437988,13 +438152,13 @@ async function call91(onDone, context7, args) {
|
|
|
437988
438152
|
}
|
|
437989
438153
|
}
|
|
437990
438154
|
const firstPrompt = extractFirstPrompt(context7.messages);
|
|
437991
|
-
const
|
|
438155
|
+
const timestamp3 = formatTimestamp(new Date);
|
|
437992
438156
|
let defaultFilename;
|
|
437993
438157
|
if (firstPrompt) {
|
|
437994
438158
|
const sanitized = sanitizeFilename(firstPrompt);
|
|
437995
|
-
defaultFilename = sanitized ? `${
|
|
438159
|
+
defaultFilename = sanitized ? `${timestamp3}-${sanitized}.txt` : `conversation-${timestamp3}.txt`;
|
|
437996
438160
|
} else {
|
|
437997
|
-
defaultFilename = `conversation-${
|
|
438161
|
+
defaultFilename = `conversation-${timestamp3}.txt`;
|
|
437998
438162
|
}
|
|
437999
438163
|
return /* @__PURE__ */ jsx_dev_runtime351.jsxDEV(ExportDialog, {
|
|
438000
438164
|
content,
|
|
@@ -442800,9 +442964,9 @@ function detectMultiClauding(sessions) {
|
|
|
442800
442964
|
const OVERLAP_WINDOW_MS = 30 * 60000;
|
|
442801
442965
|
const allSessionMessages = [];
|
|
442802
442966
|
for (const session2 of sessions) {
|
|
442803
|
-
for (const
|
|
442967
|
+
for (const timestamp3 of session2.user_message_timestamps) {
|
|
442804
442968
|
try {
|
|
442805
|
-
const ts = new Date(
|
|
442969
|
+
const ts = new Date(timestamp3).getTime();
|
|
442806
442970
|
allSessionMessages.push({ ts, sessionId: session2.session_id });
|
|
442807
442971
|
} catch {}
|
|
442808
442972
|
}
|
|
@@ -443801,7 +443965,7 @@ function generateHtmlReport(data, insights) {
|
|
|
443801
443965
|
</html>`;
|
|
443802
443966
|
}
|
|
443803
443967
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
443804
|
-
const version2 = typeof MACRO !== "undefined" ? "1.8.
|
|
443968
|
+
const version2 = typeof MACRO !== "undefined" ? "1.8.6" : "unknown";
|
|
443805
443969
|
const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
|
|
443806
443970
|
const facets_summary = {
|
|
443807
443971
|
total: facets.size,
|
|
@@ -444450,9 +444614,9 @@ Find something genuinely interesting or amusing from the session summaries.`,
|
|
|
444450
444614
|
let reportUrl = `file://${htmlPath}`;
|
|
444451
444615
|
let uploadHint = "";
|
|
444452
444616
|
if (process.env.USER_TYPE === "ant") {
|
|
444453
|
-
const
|
|
444617
|
+
const timestamp3 = new Date().toISOString().replace(/[-:]/g, "").replace("T", "_").slice(0, 15);
|
|
444454
444618
|
const username = process.env.SAFEUSER || process.env.USER || "unknown";
|
|
444455
|
-
const filename = `${username}_insights_${
|
|
444619
|
+
const filename = `${username}_insights_${timestamp3}.html`;
|
|
444456
444620
|
const s3Path = `s3://anthropic-serve/atamkin/cc-user-reports/${filename}`;
|
|
444457
444621
|
const s3Url = `https://s3-frontend.infra.ant.dev/anthropic-serve/atamkin/cc-user-reports/${filename}`;
|
|
444458
444622
|
reportUrl = s3Url;
|
|
@@ -448002,7 +448166,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
448002
448166
|
init_settings2();
|
|
448003
448167
|
init_slowOperations();
|
|
448004
448168
|
init_uuid();
|
|
448005
|
-
VERSION6 = typeof MACRO !== "undefined" ? "1.8.
|
|
448169
|
+
VERSION6 = typeof MACRO !== "undefined" ? "1.8.6" : "unknown";
|
|
448006
448170
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
448007
448171
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
448008
448172
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -449203,7 +449367,7 @@ var init_filesystem = __esm(() => {
|
|
|
449203
449367
|
});
|
|
449204
449368
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
449205
449369
|
const nonce = randomBytes20(16).toString("hex");
|
|
449206
|
-
return join151(getClaudeTempDir(), "bundled-skills", "1.8.
|
|
449370
|
+
return join151(getClaudeTempDir(), "bundled-skills", "1.8.6", nonce);
|
|
449207
449371
|
});
|
|
449208
449372
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
449209
449373
|
});
|
|
@@ -458440,7 +458604,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
458440
458604
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
458441
458605
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
458442
458606
|
betas: getSdkBetas(),
|
|
458443
|
-
claude_code_version: "1.8.
|
|
458607
|
+
claude_code_version: "1.8.6",
|
|
458444
458608
|
output_style: outputStyle2,
|
|
458445
458609
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
458446
458610
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -472597,7 +472761,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
472597
472761
|
function getSemverPart(version2) {
|
|
472598
472762
|
return `${import_semver10.major(version2, { loose: true })}.${import_semver10.minor(version2, { loose: true })}.${import_semver10.patch(version2, { loose: true })}`;
|
|
472599
472763
|
}
|
|
472600
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.8.
|
|
472764
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.8.6") {
|
|
472601
472765
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react214.useState(() => getSemverPart(initialVersion));
|
|
472602
472766
|
if (!updatedVersion) {
|
|
472603
472767
|
return null;
|
|
@@ -472637,7 +472801,7 @@ function AutoUpdater({
|
|
|
472637
472801
|
return;
|
|
472638
472802
|
}
|
|
472639
472803
|
if (false) {}
|
|
472640
|
-
const currentVersion = "1.8.
|
|
472804
|
+
const currentVersion = "1.8.6";
|
|
472641
472805
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
472642
472806
|
let latestVersion = await getLatestVersion(channel);
|
|
472643
472807
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -472848,12 +473012,12 @@ function NativeAutoUpdater({
|
|
|
472848
473012
|
logEvent("tengu_native_auto_updater_start", {});
|
|
472849
473013
|
try {
|
|
472850
473014
|
const maxVersion = await getMaxVersion();
|
|
472851
|
-
if (maxVersion && gt("1.8.
|
|
473015
|
+
if (maxVersion && gt("1.8.6", maxVersion)) {
|
|
472852
473016
|
const msg = await getMaxVersionMessage();
|
|
472853
473017
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
472854
473018
|
}
|
|
472855
473019
|
const result = await installLatest(channel);
|
|
472856
|
-
const currentVersion = "1.8.
|
|
473020
|
+
const currentVersion = "1.8.6";
|
|
472857
473021
|
const latencyMs = Date.now() - startTime;
|
|
472858
473022
|
if (result.lockFailed) {
|
|
472859
473023
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -472988,17 +473152,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
472988
473152
|
const maxVersion = await getMaxVersion();
|
|
472989
473153
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
472990
473154
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
472991
|
-
if (gte("1.8.
|
|
472992
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.8.
|
|
473155
|
+
if (gte("1.8.6", maxVersion)) {
|
|
473156
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.8.6"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
472993
473157
|
setUpdateAvailable(false);
|
|
472994
473158
|
return;
|
|
472995
473159
|
}
|
|
472996
473160
|
latest = maxVersion;
|
|
472997
473161
|
}
|
|
472998
|
-
const hasUpdate = latest && !gte("1.8.
|
|
473162
|
+
const hasUpdate = latest && !gte("1.8.6", latest) && !shouldSkipVersion(latest);
|
|
472999
473163
|
setUpdateAvailable(!!hasUpdate);
|
|
473000
473164
|
if (hasUpdate) {
|
|
473001
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.8.
|
|
473165
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.8.6"} -> ${latest}`);
|
|
473002
473166
|
}
|
|
473003
473167
|
};
|
|
473004
473168
|
$2[0] = t1;
|
|
@@ -473032,7 +473196,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
473032
473196
|
wrap: "truncate",
|
|
473033
473197
|
children: [
|
|
473034
473198
|
"currentVersion: ",
|
|
473035
|
-
"1.8.
|
|
473199
|
+
"1.8.6"
|
|
473036
473200
|
]
|
|
473037
473201
|
}, undefined, true, undefined, this);
|
|
473038
473202
|
$2[3] = verbose;
|
|
@@ -480592,7 +480756,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
480592
480756
|
project_dir: getOriginalCwd(),
|
|
480593
480757
|
added_dirs: addedDirs
|
|
480594
480758
|
},
|
|
480595
|
-
version: "1.8.
|
|
480759
|
+
version: "1.8.6",
|
|
480596
480760
|
output_style: {
|
|
480597
480761
|
name: outputStyleName
|
|
480598
480762
|
},
|
|
@@ -486960,8 +487124,8 @@ async function cleanupOldFilesInDirectory(dirPath, cutoffDate, isMessagePath) {
|
|
|
486960
487124
|
const files2 = await getFsImplementation().readdir(dirPath);
|
|
486961
487125
|
for (const file of files2) {
|
|
486962
487126
|
try {
|
|
486963
|
-
const
|
|
486964
|
-
if (
|
|
487127
|
+
const timestamp3 = convertFileNameToDate(file.name);
|
|
487128
|
+
if (timestamp3 < cutoffDate) {
|
|
486965
487129
|
await getFsImplementation().unlink(join156(dirPath, file.name));
|
|
486966
487130
|
if (isMessagePath) {
|
|
486967
487131
|
result.messages++;
|
|
@@ -492164,7 +492328,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
492164
492328
|
} catch {}
|
|
492165
492329
|
const data = {
|
|
492166
492330
|
trigger,
|
|
492167
|
-
version: "1.8.
|
|
492331
|
+
version: "1.8.6",
|
|
492168
492332
|
platform: process.platform,
|
|
492169
492333
|
transcript,
|
|
492170
492334
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -492319,21 +492483,21 @@ function useFeedbackSurvey(messages, isLoading, submitCount, surveyType = "sessi
|
|
|
492319
492483
|
messagesRef.current = messages;
|
|
492320
492484
|
const probabilityPassedRef = import_react280.useRef(false);
|
|
492321
492485
|
const lastEligibleSubmitCountRef = import_react280.useRef(null);
|
|
492322
|
-
const updateLastShownTime = import_react280.useCallback((
|
|
492486
|
+
const updateLastShownTime = import_react280.useCallback((timestamp3, submitCountValue) => {
|
|
492323
492487
|
setFeedbackSurvey((prev) => {
|
|
492324
|
-
if (prev.timeLastShown ===
|
|
492488
|
+
if (prev.timeLastShown === timestamp3 && prev.submitCountAtLastAppearance === submitCountValue) {
|
|
492325
492489
|
return prev;
|
|
492326
492490
|
}
|
|
492327
492491
|
return {
|
|
492328
|
-
timeLastShown:
|
|
492492
|
+
timeLastShown: timestamp3,
|
|
492329
492493
|
submitCountAtLastAppearance: submitCountValue
|
|
492330
492494
|
};
|
|
492331
492495
|
});
|
|
492332
|
-
if (getGlobalConfig().feedbackSurveyState?.lastShownTime !==
|
|
492496
|
+
if (getGlobalConfig().feedbackSurveyState?.lastShownTime !== timestamp3) {
|
|
492333
492497
|
saveGlobalConfig((current) => ({
|
|
492334
492498
|
...current,
|
|
492335
492499
|
feedbackSurveyState: {
|
|
492336
|
-
lastShownTime:
|
|
492500
|
+
lastShownTime: timestamp3
|
|
492337
492501
|
}
|
|
492338
492502
|
}));
|
|
492339
492503
|
}
|
|
@@ -509073,7 +509237,7 @@ function appendToLog(path17, message) {
|
|
|
509073
509237
|
cwd: getFsImplementation().cwd(),
|
|
509074
509238
|
userType: process.env.USER_TYPE,
|
|
509075
509239
|
sessionId: getSessionId(),
|
|
509076
|
-
version: "1.8.
|
|
509240
|
+
version: "1.8.6"
|
|
509077
509241
|
};
|
|
509078
509242
|
getLogWriter(path17).write(messageWithTimestamp);
|
|
509079
509243
|
}
|
|
@@ -513097,8 +513261,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
513097
513261
|
}
|
|
513098
513262
|
async function checkEnvLessBridgeMinVersion() {
|
|
513099
513263
|
const cfg = await getEnvLessBridgeConfig();
|
|
513100
|
-
if (cfg.min_version && lt("1.8.
|
|
513101
|
-
return `Your version of localclawd (${"1.8.
|
|
513264
|
+
if (cfg.min_version && lt("1.8.6", cfg.min_version)) {
|
|
513265
|
+
return `Your version of localclawd (${"1.8.6"}) is too old for Remote Control.
|
|
513102
513266
|
Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
|
|
513103
513267
|
}
|
|
513104
513268
|
return null;
|
|
@@ -513570,7 +513734,7 @@ async function initBridgeCore(params) {
|
|
|
513570
513734
|
const rawApi = createBridgeApiClient({
|
|
513571
513735
|
baseUrl,
|
|
513572
513736
|
getAccessToken,
|
|
513573
|
-
runnerVersion: "1.8.
|
|
513737
|
+
runnerVersion: "1.8.6",
|
|
513574
513738
|
onDebug: logForDebugging,
|
|
513575
513739
|
onAuth401,
|
|
513576
513740
|
getTrustedDeviceToken
|
|
@@ -519289,7 +519453,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
|
|
|
519289
519453
|
setCwd(cwd3);
|
|
519290
519454
|
const server = new Server({
|
|
519291
519455
|
name: "claude/tengu",
|
|
519292
|
-
version: "1.8.
|
|
519456
|
+
version: "1.8.6"
|
|
519293
519457
|
}, {
|
|
519294
519458
|
capabilities: {
|
|
519295
519459
|
tools: {}
|
|
@@ -520370,7 +520534,7 @@ function WelcomeLogo() {
|
|
|
520370
520534
|
dimColor: true,
|
|
520371
520535
|
children: [
|
|
520372
520536
|
"v",
|
|
520373
|
-
"1.8.
|
|
520537
|
+
"1.8.6"
|
|
520374
520538
|
]
|
|
520375
520539
|
}, undefined, true, undefined, this)
|
|
520376
520540
|
]
|
|
@@ -520561,7 +520725,7 @@ __export(exports_update, {
|
|
|
520561
520725
|
});
|
|
520562
520726
|
async function update() {
|
|
520563
520727
|
logEvent("tengu_update_check", {});
|
|
520564
|
-
writeToStdout(`Current version: ${"1.8.
|
|
520728
|
+
writeToStdout(`Current version: ${"1.8.6"}
|
|
520565
520729
|
`);
|
|
520566
520730
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
520567
520731
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -520636,8 +520800,8 @@ async function update() {
|
|
|
520636
520800
|
writeToStdout(`localclawd is managed by Homebrew.
|
|
520637
520801
|
`);
|
|
520638
520802
|
const latest = await getLatestVersion(channel);
|
|
520639
|
-
if (latest && !gte("1.8.
|
|
520640
|
-
writeToStdout(`Update available: ${"1.8.
|
|
520803
|
+
if (latest && !gte("1.8.6", latest)) {
|
|
520804
|
+
writeToStdout(`Update available: ${"1.8.6"} → ${latest}
|
|
520641
520805
|
`);
|
|
520642
520806
|
writeToStdout(`
|
|
520643
520807
|
`);
|
|
@@ -520653,8 +520817,8 @@ async function update() {
|
|
|
520653
520817
|
writeToStdout(`localclawd is managed by winget.
|
|
520654
520818
|
`);
|
|
520655
520819
|
const latest = await getLatestVersion(channel);
|
|
520656
|
-
if (latest && !gte("1.8.
|
|
520657
|
-
writeToStdout(`Update available: ${"1.8.
|
|
520820
|
+
if (latest && !gte("1.8.6", latest)) {
|
|
520821
|
+
writeToStdout(`Update available: ${"1.8.6"} → ${latest}
|
|
520658
520822
|
`);
|
|
520659
520823
|
writeToStdout(`
|
|
520660
520824
|
`);
|
|
@@ -520668,8 +520832,8 @@ async function update() {
|
|
|
520668
520832
|
writeToStdout(`localclawd is managed by apk.
|
|
520669
520833
|
`);
|
|
520670
520834
|
const latest = await getLatestVersion(channel);
|
|
520671
|
-
if (latest && !gte("1.8.
|
|
520672
|
-
writeToStdout(`Update available: ${"1.8.
|
|
520835
|
+
if (latest && !gte("1.8.6", latest)) {
|
|
520836
|
+
writeToStdout(`Update available: ${"1.8.6"} → ${latest}
|
|
520673
520837
|
`);
|
|
520674
520838
|
writeToStdout(`
|
|
520675
520839
|
`);
|
|
@@ -520734,11 +520898,11 @@ async function update() {
|
|
|
520734
520898
|
`);
|
|
520735
520899
|
await gracefulShutdown(1);
|
|
520736
520900
|
}
|
|
520737
|
-
if (result.latestVersion === "1.8.
|
|
520738
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"1.8.
|
|
520901
|
+
if (result.latestVersion === "1.8.6") {
|
|
520902
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"1.8.6"})`) + `
|
|
520739
520903
|
`);
|
|
520740
520904
|
} else {
|
|
520741
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.8.
|
|
520905
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.8.6"} to version ${result.latestVersion}`) + `
|
|
520742
520906
|
`);
|
|
520743
520907
|
await regenerateCompletionCache();
|
|
520744
520908
|
}
|
|
@@ -520798,12 +520962,12 @@ async function update() {
|
|
|
520798
520962
|
`);
|
|
520799
520963
|
await gracefulShutdown(1);
|
|
520800
520964
|
}
|
|
520801
|
-
if (latestVersion === "1.8.
|
|
520802
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"1.8.
|
|
520965
|
+
if (latestVersion === "1.8.6") {
|
|
520966
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"1.8.6"})`) + `
|
|
520803
520967
|
`);
|
|
520804
520968
|
await gracefulShutdown(0);
|
|
520805
520969
|
}
|
|
520806
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"1.8.
|
|
520970
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"1.8.6"})
|
|
520807
520971
|
`);
|
|
520808
520972
|
writeToStdout(`Installing update...
|
|
520809
520973
|
`);
|
|
@@ -520848,7 +521012,7 @@ async function update() {
|
|
|
520848
521012
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
520849
521013
|
switch (status2) {
|
|
520850
521014
|
case "success":
|
|
520851
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.8.
|
|
521015
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.8.6"} to version ${latestVersion}`) + `
|
|
520852
521016
|
`);
|
|
520853
521017
|
await regenerateCompletionCache();
|
|
520854
521018
|
break;
|
|
@@ -522090,7 +522254,7 @@ Run with --debug for more details.
|
|
|
522090
522254
|
}
|
|
522091
522255
|
}
|
|
522092
522256
|
logForDiagnosticsNoPII("info", "started", {
|
|
522093
|
-
version: "1.8.
|
|
522257
|
+
version: "1.8.6",
|
|
522094
522258
|
is_native_binary: isInBundledMode()
|
|
522095
522259
|
});
|
|
522096
522260
|
registerCleanup(async () => {
|
|
@@ -522874,7 +523038,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
522874
523038
|
pendingHookMessages
|
|
522875
523039
|
}, renderAndRun);
|
|
522876
523040
|
}
|
|
522877
|
-
}).version("1.8.
|
|
523041
|
+
}).version("1.8.6 (localclawd)", "-v, --version", "Output the version number");
|
|
522878
523042
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
522879
523043
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
522880
523044
|
if (canUserConfigureAdvisor()) {
|
|
@@ -523388,7 +523552,7 @@ if (false) {}
|
|
|
523388
523552
|
async function main2() {
|
|
523389
523553
|
const args = process.argv.slice(2);
|
|
523390
523554
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
523391
|
-
console.log(`${"1.8.
|
|
523555
|
+
console.log(`${"1.8.6"} (localclawd)`);
|
|
523392
523556
|
return;
|
|
523393
523557
|
}
|
|
523394
523558
|
const {
|
|
@@ -523471,4 +523635,4 @@ localclawd crashed: ${msg}
|
|
|
523471
523635
|
process.exit(1);
|
|
523472
523636
|
});
|
|
523473
523637
|
|
|
523474
|
-
//# debugId=
|
|
523638
|
+
//# debugId=239D176AE480DB8064756E2164756E21
|