localclawd 1.8.4 → 1.8.5

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +497 -453
  2. 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.4"}`;
87611
+ return `claude-code/${"1.8.5"}`;
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.4"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
87633
+ return `claude-cli/${"1.8.5"} (${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.4"}${suffix}`;
87647
+ return `claude-code/${"1.8.5"}${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.4"}.${fingerprint}`;
130843
+ const version = `${"1.8.5"}.${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.4".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
147032
+ const match = "1.8.5".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.4",
147072
+ version: "1.8.5",
147073
147073
  versionBase: getVersionBase(),
147074
- buildTime: "2026-05-07T15:39:30.948Z",
147074
+ buildTime: "2026-05-07T15:46:56.263Z",
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.4";
179650
+ attributes["app.version"] = "1.8.5";
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.4";
242451
+ return "1.8.5";
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.4",
247725
+ version: "1.8.5",
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.4",
248067
+ version: "1.8.5",
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.4");
262469
+ return computeFingerprint(firstMessageText, "1.8.5");
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.4");
262511
+ const fingerprint = computeFingerprint(messageText, "1.8.5");
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.4",
283259
+ appVersion: "1.8.5",
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.4");
284324
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.5");
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.4"
284364
+ [ATTR_SERVICE_VERSION4]: "1.8.5"
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.4");
284409
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.8.5");
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.4");
284429
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.5");
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.4");
284491
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.8.5");
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.4" : "unknown";
285681
+ const version = typeof MACRO !== "undefined" ? "1.8.5" : "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.4", maxVersion)) {
286623
- logForDebugging(`Native installer: current version ${"1.8.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
286622
+ if (gte("1.8.5", maxVersion)) {
286623
+ logForDebugging(`Native installer: current version ${"1.8.5"} 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.4" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
286634
+ if (!forceReinstall && version === "1.8.5" && 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,
@@ -322839,6 +322839,64 @@ var DEFAULT_COMFYUI_URL = "http://127.0.0.1:8000", PROBE_TIMEOUT_MS = 3000;
322839
322839
  // src/services/imagePipeline/imagePipeline.ts
322840
322840
  import { mkdir as mkdir19, writeFile as writeFile19, readFile as readFile26, access as access5 } from "fs/promises";
322841
322841
  import { join as join79 } from "path";
322842
+ function injectPrompt(workflow, positivePrompt, negativePrompt, params = {}) {
322843
+ const wf = replaceTemplatesDeep(JSON.parse(JSON.stringify(workflow)), {
322844
+ positive_prompt: positivePrompt,
322845
+ negative_prompt: negativePrompt
322846
+ });
322847
+ for (const node of Object.values(wf)) {
322848
+ const ct = node.class_type;
322849
+ if (ct === "KSampler" || ct === "KSamplerAdvanced") {
322850
+ const posRef = node.inputs.positive;
322851
+ const negRef = node.inputs.negative;
322852
+ if (posRef?.[0] && wf[posRef[0]]?.class_type === "CLIPTextEncode") {
322853
+ wf[posRef[0]].inputs.text = positivePrompt;
322854
+ }
322855
+ if (negRef?.[0] && wf[negRef[0]]?.class_type === "CLIPTextEncode") {
322856
+ wf[negRef[0]].inputs.text = negativePrompt;
322857
+ }
322858
+ if (params.seed !== undefined)
322859
+ node.inputs.seed = params.seed;
322860
+ if (params.steps !== undefined)
322861
+ node.inputs.steps = params.steps;
322862
+ if (params.cfg !== undefined)
322863
+ node.inputs.cfg = params.cfg;
322864
+ }
322865
+ if (node.class_type === "EmptyLatentImage") {
322866
+ if (params.width !== undefined)
322867
+ node.inputs.width = params.width;
322868
+ if (params.height !== undefined)
322869
+ node.inputs.height = params.height;
322870
+ }
322871
+ if (node.class_type === "CheckpointLoaderSimple" && params.model) {
322872
+ node.inputs.ckpt_name = params.model;
322873
+ }
322874
+ }
322875
+ return wf;
322876
+ }
322877
+ function replaceTemplatesDeep(obj, vars) {
322878
+ if (typeof obj === "string") {
322879
+ let s = obj;
322880
+ for (const [k2, v2] of Object.entries(vars))
322881
+ s = s.replaceAll(`{{${k2}}}`, v2);
322882
+ return s;
322883
+ }
322884
+ if (Array.isArray(obj))
322885
+ return obj.map((item) => replaceTemplatesDeep(item, vars));
322886
+ if (obj !== null && typeof obj === "object") {
322887
+ return Object.fromEntries(Object.entries(obj).map(([k2, v2]) => [k2, replaceTemplatesDeep(v2, vars)]));
322888
+ }
322889
+ return obj;
322890
+ }
322891
+ async function loadWorkflow(projectRoot, name) {
322892
+ const filename = name.endsWith(".json") ? name : `${name}.json`;
322893
+ try {
322894
+ const data = await readFile26(join79(projectRoot, ".localclawd", "image-pipeline", "workflows", filename), "utf-8");
322895
+ return JSON.parse(data);
322896
+ } catch {
322897
+ return null;
322898
+ }
322899
+ }
322842
322900
  async function scaffoldProject(projectRoot) {
322843
322901
  const base = join79(projectRoot, ".localclawd", "image-pipeline");
322844
322902
  let alreadyExisted = false;
@@ -322846,7 +322904,7 @@ async function scaffoldProject(projectRoot) {
322846
322904
  await access5(join79(base, "config.json"));
322847
322905
  alreadyExisted = true;
322848
322906
  } catch {}
322849
- const dirs = [base, join79(base, "prompts"), join79(base, "workflows"), join79(base, "outputs"), join79(base, "scripts")];
322907
+ const dirs = [base, join79(base, "prompts"), join79(base, "workflows"), join79(base, "generated"), join79(base, "scripts")];
322850
322908
  for (const dir of dirs) {
322851
322909
  await mkdir19(dir, { recursive: true });
322852
322910
  }
@@ -322857,7 +322915,7 @@ async function scaffoldProject(projectRoot) {
322857
322915
  created.push(".localclawd/image-pipeline/config.json");
322858
322916
  await writeFile19(join79(base, "prompts", "example.json"), JSON.stringify(EXAMPLE_PROMPT, null, 2), "utf-8");
322859
322917
  created.push(".localclawd/image-pipeline/prompts/example.json");
322860
- await writeFile19(join79(base, "workflows", "txt2img.json"), JSON.stringify(TXT2IMG_WORKFLOW, null, 2), "utf-8");
322918
+ await writeFile19(join79(base, "workflows", "txt2img.json"), JSON.stringify(DEFAULT_WORKFLOW, null, 2), "utf-8");
322861
322919
  created.push(".localclawd/image-pipeline/workflows/txt2img.json");
322862
322920
  await writeFile19(join79(base, "scripts", "generate.sh"), GENERATE_SH, "utf-8");
322863
322921
  created.push(".localclawd/image-pipeline/scripts/generate.sh");
@@ -322899,7 +322957,7 @@ async function listWorkflows(projectRoot) {
322899
322957
  return [];
322900
322958
  }
322901
322959
  }
322902
- var DEFAULT_CONFIG2, EXAMPLE_PROMPT, TXT2IMG_WORKFLOW, GENERATE_SH = `#!/usr/bin/env bash
322960
+ var DEFAULT_CONFIG2, EXAMPLE_PROMPT, DEFAULT_WORKFLOW, GENERATE_SH = `#!/usr/bin/env bash
322903
322961
  # localclawd image pipeline — quick generate helper
322904
322962
  # Usage: ./scripts/generate.sh "positive prompt" "negative prompt"
322905
322963
 
@@ -322952,8 +323010,8 @@ Project-local image generation configuration for localclawd + ComfyUI.
322952
323010
 
322953
323011
  1. Start ComfyUI on this machine (default port 8000)
322954
323012
  2. Run \`/image-pipeline\` in localclawd to check status
322955
- 3. Use \`/image-pipeline generate "your prompt"\` to submit a job
322956
- 4. Or run \`bash .localclawd/image-pipeline/scripts/generate.sh "prompt"\`
323013
+ 3. Use \`/image a misty forest at dawn\` to generate an image
323014
+ 4. Use \`/image txt2img: a misty forest at dawn\` to use a specific workflow
322957
323015
 
322958
323016
  ## Structure
322959
323017
 
@@ -322961,7 +323019,7 @@ Project-local image generation configuration for localclawd + ComfyUI.
322961
323019
  config.json — backend URL and default params
322962
323020
  prompts/ — reusable prompt templates (JSON)
322963
323021
  workflows/ — full ComfyUI workflow JSON files
322964
- outputs/ local output reference (actual files saved by ComfyUI)
323022
+ generated/ locally downloaded output images
322965
323023
  scripts/ — generate.sh / generate.ps1 helpers
322966
323024
  \`\`\`
322967
323025
 
@@ -322973,8 +323031,12 @@ Edit \`config.json\` → set \`backendUrl\` to your remote URL, e.g.:
322973
323031
  ## Workflow Templates
322974
323032
 
322975
323033
  \`workflows/txt2img.json\` is a standard KSampler workflow.
322976
- Load it in ComfyUI via Menu → Load, customize, and save new workflows here.
322977
- Replace \`{{positive_prompt}}\` / \`{{negative_prompt}}\` placeholders before submitting.
323034
+ To use a workflow: \`/image <workflow-name>: <prompt>\`
323035
+ To set a default workflow: \`/image-pipeline workflow <name>\`
323036
+
323037
+ Export workflows from ComfyUI via the Save (API format) button.
323038
+ Workflows with \`{{positive_prompt}}\` / \`{{negative_prompt}}\` placeholders
323039
+ are injected automatically; raw ComfyUI exports work via graph traversal.
322978
323040
  `;
322979
323041
  var init_imagePipeline = __esm(() => {
322980
323042
  DEFAULT_CONFIG2 = {
@@ -322985,7 +323047,7 @@ var init_imagePipeline = __esm(() => {
322985
323047
  defaultCfg: 7,
322986
323048
  defaultSampler: "euler",
322987
323049
  defaultModel: "",
322988
- outputDir: ".localclawd/image-pipeline/outputs"
323050
+ outputDir: ".localclawd/image-pipeline/generated"
322989
323051
  };
322990
323052
  EXAMPLE_PROMPT = {
322991
323053
  name: "example-character",
@@ -322998,7 +323060,7 @@ var init_imagePipeline = __esm(() => {
322998
323060
  cfg: 7,
322999
323061
  sampler: "euler"
323000
323062
  };
323001
- TXT2IMG_WORKFLOW = {
323063
+ DEFAULT_WORKFLOW = {
323002
323064
  "4": {
323003
323065
  class_type: "CheckpointLoaderSimple",
323004
323066
  inputs: { ckpt_name: "v1-5-pruned-emaonly.safetensors" }
@@ -323048,11 +323110,17 @@ Backend resolution order:
323048
323110
  1. http://127.0.0.1:8000 (localhost default)
323049
323111
  2. backendUrl in .localclawd/image-pipeline/config.json (set via /image-pipeline config <url>)
323050
323112
 
323113
+ Workflow selection:
323114
+ - Omit workflow to use the default (set via /image-pipeline workflow <name>, or built-in txt2img)
323115
+ - Pass workflow name (without .json) to use a specific workflow from .localclawd/image-pipeline/workflows/
323116
+ - Workflows support {{positive_prompt}} / {{negative_prompt}} templates or raw ComfyUI API exports
323117
+
323051
323118
  Output directory:
323052
323119
  - .localclawd/image-pipeline/generated/ when the pipeline is scaffolded (run /image-pipeline setup)
323053
323120
  - ~/generatedimages/ otherwise
323054
323121
 
323055
323122
  If ComfyUI is not reachable, ask the user to run /image-pipeline config <url> with their ComfyUI address.
323123
+ To list available workflows, call /image-pipeline list.
323056
323124
 
323057
323125
  After generating, the image is returned visually in the tool result so you can review it.
323058
323126
 
@@ -323115,6 +323183,7 @@ var init_GenerateImageTool = __esm(() => {
323115
323183
  inputSchema27 = lazySchema(() => z62.strictObject({
323116
323184
  prompt: z62.string().describe("Positive text prompt describing the image to generate"),
323117
323185
  negative_prompt: z62.string().optional().describe("What to exclude from the image (optional)"),
323186
+ workflow: z62.string().optional().describe("Workflow name from .localclawd/image-pipeline/workflows/ (without .json). Omit to use default."),
323118
323187
  width: z62.number().int().min(64).max(2048).optional().describe("Width in pixels (default: 512)"),
323119
323188
  height: z62.number().int().min(64).max(2048).optional().describe("Height in pixels (default: 512)"),
323120
323189
  steps: z62.number().int().min(1).max(150).optional().describe("Sampling steps (default: 20)"),
@@ -323200,32 +323269,11 @@ var init_GenerateImageTool = __esm(() => {
323200
323269
  const height = input.height ?? config?.defaultHeight ?? 512;
323201
323270
  const steps = input.steps ?? config?.defaultSteps ?? 20;
323202
323271
  const cfg = input.cfg ?? config?.defaultCfg ?? 7;
323203
- const sampler = config?.defaultSampler ?? "euler";
323204
323272
  const seed = input.seed ?? Math.floor(Math.random() * 2 ** 32);
323205
323273
  const negativePrompt = input.negative_prompt ?? "blurry, low quality, watermark, deformed";
323206
- const workflow = {
323207
- "4": { class_type: "CheckpointLoaderSimple", inputs: { ckpt_name: model } },
323208
- "5": { class_type: "EmptyLatentImage", inputs: { width, height, batch_size: 1 } },
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
- };
323274
+ const workflowName = input.workflow ?? config?.defaultWorkflow;
323275
+ const workflowBase = workflowName ? await loadWorkflow(projectRoot, workflowName) : null;
323276
+ const workflow = injectPrompt(workflowBase ?? DEFAULT_WORKFLOW, input.prompt, negativePrompt, { seed, model, width, height, steps, cfg });
323229
323277
  let queued;
323230
323278
  try {
323231
323279
  queued = await queuePrompt(backendUrl, workflow);
@@ -331770,7 +331818,7 @@ function getAnthropicEnvMetadata() {
331770
331818
  function getBuildAgeMinutes() {
331771
331819
  if (false)
331772
331820
  ;
331773
- const buildTime = new Date("2026-05-07T15:39:30.948Z").getTime();
331821
+ const buildTime = new Date("2026-05-07T15:46:56.263Z").getTime();
331774
331822
  if (isNaN(buildTime))
331775
331823
  return;
331776
331824
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -360600,7 +360648,7 @@ function Feedback({
360600
360648
  platform: env3.platform,
360601
360649
  gitRepo: envInfo.isGit,
360602
360650
  terminal: env3.terminal,
360603
- version: "1.8.4",
360651
+ version: "1.8.5",
360604
360652
  transcript: normalizeMessagesForAPI(messages),
360605
360653
  errors: sanitizedErrors,
360606
360654
  lastApiRequest: getLastAPIRequest(),
@@ -360792,7 +360840,7 @@ function Feedback({
360792
360840
  ", ",
360793
360841
  env3.terminal,
360794
360842
  ", v",
360795
- "1.8.4"
360843
+ "1.8.5"
360796
360844
  ]
360797
360845
  }, undefined, true, undefined, this)
360798
360846
  ]
@@ -360898,7 +360946,7 @@ ${sanitizedDescription}
360898
360946
  ` + `**Environment Info**
360899
360947
  ` + `- Platform: ${env3.platform}
360900
360948
  ` + `- Terminal: ${env3.terminal}
360901
- ` + `- Version: ${"1.8.4"}
360949
+ ` + `- Version: ${"1.8.5"}
360902
360950
  ` + `- Feedback ID: ${feedbackId}
360903
360951
  ` + `
360904
360952
  **Errors**
@@ -363526,7 +363574,7 @@ function buildPrimarySection() {
363526
363574
  }, undefined, false, undefined, this);
363527
363575
  return [{
363528
363576
  label: "Version",
363529
- value: "1.8.4"
363577
+ value: "1.8.5"
363530
363578
  }, {
363531
363579
  label: "Session name",
363532
363580
  value: nameValue
@@ -368207,7 +368255,7 @@ function Config({
368207
368255
  }
368208
368256
  }, undefined, false, undefined, this)
368209
368257
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
368210
- currentVersion: "1.8.4",
368258
+ currentVersion: "1.8.5",
368211
368259
  onChoice: (choice) => {
368212
368260
  setShowSubmenu(null);
368213
368261
  setTabsHidden(false);
@@ -368219,7 +368267,7 @@ function Config({
368219
368267
  autoUpdatesChannel: "stable"
368220
368268
  };
368221
368269
  if (choice === "stay") {
368222
- newSettings.minimumVersion = "1.8.4";
368270
+ newSettings.minimumVersion = "1.8.5";
368223
368271
  }
368224
368272
  updateSettingsForSource("userSettings", newSettings);
368225
368273
  setSettingsData((prev_27) => ({
@@ -374564,24 +374612,57 @@ function slugify2(text, maxLen = 40) {
374564
374612
  return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, maxLen);
374565
374613
  }
374566
374614
  var call19 = async (onDone, _context, args) => {
374567
- const prompt = args?.trim() ?? "";
374568
- if (!prompt) {
374569
- onDone([
374615
+ const raw = args?.trim() ?? "";
374616
+ const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
374617
+ const projectRoot = getOriginalCwd2() ?? process.cwd();
374618
+ if (!raw) {
374619
+ const config3 = await loadConfig(projectRoot);
374620
+ const workflows = await listWorkflows(projectRoot);
374621
+ const defaultWf = config3?.defaultWorkflow ?? "(built-in txt2img)";
374622
+ const lines2 = [
374570
374623
  "◆ /image — Generate an image via ComfyUI",
374571
374624
  "",
374572
374625
  " Usage: /image <prompt>",
374573
- " Example: /image a misty forest at dawn, cinematic lighting",
374626
+ " Workflow: /image <name>: <prompt>",
374574
374627
  "",
374575
- " ComfyUI must be running. To set a remote URL:",
374576
- " /image-pipeline config http://<host>:8000",
374577
- " To scaffold the project output folder:",
374578
- " /image-pipeline setup"
374579
- ].join(`
374628
+ " Examples:",
374629
+ " /image a misty forest at dawn, cinematic lighting",
374630
+ " /image txt2img: an elderly scholar by candlelight",
374631
+ "",
374632
+ ` Default workflow: ${defaultWf}`
374633
+ ];
374634
+ if (workflows.length > 0) {
374635
+ lines2.push(" Available workflows:");
374636
+ for (const w2 of workflows)
374637
+ lines2.push(` • ${w2.replace(/\.json$/, "")}`);
374638
+ } else {
374639
+ lines2.push(" No project workflows — run /image-pipeline setup to scaffold");
374640
+ }
374641
+ lines2.push("");
374642
+ lines2.push(" ComfyUI must be running. To configure:");
374643
+ lines2.push(" /image-pipeline setup — scaffold project folders");
374644
+ lines2.push(" /image-pipeline config <url> — set backend URL");
374645
+ lines2.push(" /image-pipeline workflow <n> — set default workflow");
374646
+ onDone(lines2.join(`
374580
374647
  `), { display: "system" });
374581
374648
  return null;
374582
374649
  }
374583
- const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
374584
- const projectRoot = getOriginalCwd2() ?? process.cwd();
374650
+ let workflowName;
374651
+ let promptText = raw;
374652
+ const colonIdx = raw.indexOf(":");
374653
+ if (colonIdx > 0) {
374654
+ const candidate = raw.slice(0, colonIdx).trim();
374655
+ if (/^[\w-]+$/.test(candidate)) {
374656
+ workflowName = candidate;
374657
+ promptText = raw.slice(colonIdx + 1).trim();
374658
+ }
374659
+ }
374660
+ if (!promptText) {
374661
+ onDone(`◆ /image — Prompt required
374662
+
374663
+ Usage: /image <name>: <prompt>`, { display: "system" });
374664
+ return null;
374665
+ }
374585
374666
  const config2 = await loadConfig(projectRoot);
374586
374667
  const configuredUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374587
374668
  let backendUrl = null;
@@ -374592,48 +374673,39 @@ var call19 = async (onDone, _context, args) => {
374592
374673
  }
374593
374674
  if (!backendUrl) {
374594
374675
  onDone([
374595
- "◆ /image — No Backend",
374676
+ "◆ /image — ComfyUI not found",
374596
374677
  "",
374597
- ` ComfyUI not found at ${configuredUrl}`,
374678
+ ` Tried: ${configuredUrl}`,
374598
374679
  " Start ComfyUI, then try again.",
374599
374680
  " To set a remote URL: /image-pipeline config http://<host>:8000"
374600
374681
  ].join(`
374601
374682
  `), { display: "system" });
374602
374683
  return null;
374603
374684
  }
374685
+ const effectiveWorkflowName = workflowName ?? config2?.defaultWorkflow;
374686
+ let workflow = effectiveWorkflowName ? await loadWorkflow(projectRoot, effectiveWorkflowName) : null;
374687
+ if (effectiveWorkflowName && !workflow) {
374688
+ onDone([
374689
+ `◆ /image — Workflow not found: "${effectiveWorkflowName}"`,
374690
+ "",
374691
+ " Run /image-pipeline list to see available workflows.",
374692
+ " Falling back to built-in txt2img workflow."
374693
+ ].join(`
374694
+ `), { display: "system" });
374695
+ }
374696
+ if (!workflow)
374697
+ workflow = DEFAULT_WORKFLOW;
374604
374698
  const model = config2?.defaultModel || "v1-5-pruned-emaonly.safetensors";
374605
374699
  const width = config2?.defaultWidth ?? 512;
374606
374700
  const height = config2?.defaultHeight ?? 512;
374607
374701
  const steps = config2?.defaultSteps ?? 20;
374608
374702
  const cfg = config2?.defaultCfg ?? 7;
374609
- const sampler = config2?.defaultSampler ?? "euler";
374610
374703
  const seed = Math.floor(Math.random() * 4294967296);
374611
- const workflow = {
374612
- "4": { class_type: "CheckpointLoaderSimple", inputs: { ckpt_name: model } },
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
- };
374704
+ const negative = "blurry, low quality, watermark, deformed";
374705
+ const finalWorkflow = injectPrompt(workflow, promptText, negative, { seed, model, width, height, steps, cfg });
374634
374706
  let queued;
374635
374707
  try {
374636
- queued = await queuePrompt(backendUrl, workflow);
374708
+ queued = await queuePrompt(backendUrl, finalWorkflow);
374637
374709
  } catch (e) {
374638
374710
  onDone(`◆ /image — Queue Error
374639
374711
 
@@ -374664,24 +374736,25 @@ var call19 = async (onDone, _context, args) => {
374664
374736
  const params = new URLSearchParams({ filename: imgFilename, subfolder, type: "output" });
374665
374737
  const res = await fetch(`${backendUrl}/view?${params}`);
374666
374738
  if (res.ok) {
374667
- const outName = `${timestamp2()}_${slugify2(prompt)}.png`;
374739
+ const outName = `${timestamp2()}_${slugify2(promptText)}.png`;
374668
374740
  await writeFile36(join112(outputDir, outName), Buffer.from(await res.arrayBuffer()));
374669
374741
  savedPaths.push(join112(outputDir, outName));
374670
374742
  }
374671
374743
  } catch {}
374672
374744
  }
374745
+ const usedWorkflow = effectiveWorkflowName ?? "built-in txt2img";
374673
374746
  const lines = savedPaths.length > 0 ? [
374674
374747
  "◆ /image — Done",
374675
374748
  "",
374676
374749
  ` Saved to: ${savedPaths.join(`
374677
374750
  `)}`,
374678
- ` Seed: ${seed} · ${steps} steps · ${width}×${height} · ${model}`
374751
+ ` Workflow: ${usedWorkflow} · Seed: ${seed} · ${steps} steps · ${width}×${height}`
374679
374752
  ] : [
374680
374753
  "◆ /image — Done (download failed)",
374681
374754
  "",
374682
- ` Job complete but image download failed.`,
374755
+ " Job complete but image download failed.",
374683
374756
  ` ComfyUI filenames: ${comfyImages.join(", ") || "(none)"}`,
374684
- ` Seed: ${seed}`
374757
+ ` Workflow: ${usedWorkflow} · Seed: ${seed}`
374685
374758
  ];
374686
374759
  onDone(lines.join(`
374687
374760
  `), { display: "system" });
@@ -374711,23 +374784,6 @@ __export(exports_image_pipeline, {
374711
374784
  call: () => call20
374712
374785
  });
374713
374786
  import { join as join113 } from "path";
374714
- 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
374787
  var call20 = async (onDone, _context, args) => {
374732
374788
  const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
374733
374789
  const projectRoot = getOriginalCwd2() ?? process.cwd();
@@ -374735,70 +374791,83 @@ var call20 = async (onDone, _context, args) => {
374735
374791
  const [subcmd, ...rest] = rawArgs ? rawArgs.split(/\s+/) : [""];
374736
374792
  const restText = rest.join(" ").trim();
374737
374793
  if (!subcmd) {
374738
- const config3 = await loadConfig(projectRoot);
374739
- const backendUrl = config3?.backendUrl ?? DEFAULT_COMFYUI_URL;
374794
+ const config2 = await loadConfig(projectRoot);
374795
+ const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374740
374796
  const active = await detectComfyUI(backendUrl);
374741
- const scaffolded = config3 !== null;
374742
- const prompts = scaffolded ? await listPrompts(projectRoot) : [];
374743
- const workflows = scaffolded ? await listWorkflows(projectRoot) : [];
374744
- const lines2 = ["◆ Image Pipeline", ""];
374797
+ const scaffolded = config2 !== null;
374798
+ const [prompts, workflows] = scaffolded ? await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]) : [[], []];
374799
+ const lines = ["◆ Image Pipeline", ""];
374745
374800
  if (active) {
374746
- lines2.push(` ● ComfyUI active at ${backendUrl}`);
374801
+ lines.push(` ● ComfyUI active at ${backendUrl}`);
374747
374802
  } else {
374748
- lines2.push(` ○ ComfyUI not found at ${backendUrl}`);
374749
- lines2.push(` → Run: /image-pipeline config http://<host>:8000`);
374803
+ lines.push(` ○ ComfyUI not found at ${backendUrl}`);
374804
+ lines.push(` → To connect: /image-pipeline config http://<host>:8000`);
374750
374805
  }
374751
374806
  if (scaffolded) {
374752
- lines2.push(` Scaffold: .localclawd/image-pipeline/ (${prompts.length} prompts, ${workflows.length} workflows)`);
374753
- lines2.push(` Output: .localclawd/image-pipeline/generated/`);
374807
+ const defaultWf = config2?.defaultWorkflow ?? "(built-in txt2img)";
374808
+ lines.push(` Scaffold: .localclawd/image-pipeline/ (${prompts.length} prompts, ${workflows.length} workflows)`);
374809
+ lines.push(` Generated: .localclawd/image-pipeline/generated/`);
374810
+ lines.push(` Default workflow: ${defaultWf}`);
374754
374811
  } else {
374755
- lines2.push(` Not scaffolded — run: /image-pipeline setup`);
374812
+ lines.push(` Not scaffolded — run: /image-pipeline setup`);
374756
374813
  }
374757
- lines2.push("");
374758
- lines2.push(" Commands:");
374759
- lines2.push(" /image-pipeline setup — create project dirs and templates");
374760
- lines2.push(" /image-pipeline config <url> — set ComfyUI backend URL");
374761
- lines2.push(" /image-pipeline generate <prompt> generate image and save to project");
374762
- lines2.push(" /image-pipeline list — list prompt/workflow templates");
374763
- onDone(lines2.join(`
374814
+ lines.push("");
374815
+ lines.push(" Commands:");
374816
+ lines.push(" /image-pipeline setup — create project dirs and workflow templates");
374817
+ lines.push(" /image-pipeline config <url> — set ComfyUI backend URL");
374818
+ lines.push(" /image-pipeline workflow <name> set default workflow");
374819
+ lines.push(" /image-pipeline list — list workflows and prompt templates");
374820
+ lines.push("");
374821
+ lines.push(" To generate images:");
374822
+ lines.push(" /image <prompt> — generate with default workflow");
374823
+ lines.push(" /image <name>: <prompt> — generate with named workflow");
374824
+ onDone(lines.join(`
374764
374825
  `), { display: "system" });
374765
374826
  return null;
374766
374827
  }
374767
374828
  if (subcmd === "setup") {
374768
374829
  const { created, alreadyExisted } = await scaffoldProject(projectRoot);
374769
- const config3 = await loadConfig(projectRoot);
374770
- const backendUrl = config3?.backendUrl ?? DEFAULT_COMFYUI_URL;
374830
+ const config2 = await loadConfig(projectRoot);
374831
+ const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374771
374832
  const active = await detectComfyUI(backendUrl);
374772
- const outputDir2 = join113(projectRoot, ".localclawd", "image-pipeline", "generated");
374773
- const lines2 = ["◆ Image Pipeline — Setup", ""];
374833
+ const generatedDir = join113(projectRoot, ".localclawd", "image-pipeline", "generated");
374834
+ const lines = ["◆ Image Pipeline — Setup", ""];
374774
374835
  if (active) {
374775
- lines2.push(` ● ComfyUI active at ${backendUrl}`);
374836
+ lines.push(` ● ComfyUI active at ${backendUrl}`);
374776
374837
  } else {
374777
- lines2.push(` ○ ComfyUI not detected at ${backendUrl}`);
374778
- lines2.push(` → To connect: /image-pipeline config http://<host>:8000`);
374838
+ lines.push(` ○ ComfyUI not detected at ${backendUrl}`);
374839
+ lines.push(` → To connect: /image-pipeline config http://<host>:8000`);
374779
374840
  }
374780
- lines2.push("");
374841
+ lines.push("");
374781
374842
  if (alreadyExisted) {
374782
- lines2.push(" Pipeline already scaffolded.");
374843
+ lines.push(" Pipeline already scaffolded.");
374783
374844
  } else {
374784
- lines2.push(` Created ${created.length} files:`);
374845
+ lines.push(` Created ${created.length} files:`);
374785
374846
  for (const f of created)
374786
- lines2.push(` + ${f}`);
374847
+ lines.push(` + ${f}`);
374787
374848
  }
374788
- lines2.push("");
374789
- lines2.push(` Generated images will be saved to:`);
374790
- lines2.push(` ${outputDir2}`);
374791
- onDone(lines2.join(`
374849
+ lines.push("");
374850
+ lines.push(` Generated images will be saved to:`);
374851
+ lines.push(` ${generatedDir}`);
374852
+ lines.push("");
374853
+ lines.push(" Next steps:");
374854
+ lines.push(" /image-pipeline config http://127.0.0.1:8000 — confirm or change ComfyUI URL");
374855
+ lines.push(" /image-pipeline workflow txt2img — set default workflow");
374856
+ lines.push(" /image a misty forest at dawn — generate an image");
374857
+ onDone(lines.join(`
374792
374858
  `), { display: "system" });
374793
374859
  return null;
374794
374860
  }
374795
374861
  if (subcmd === "config") {
374796
374862
  const newUrl = restText;
374797
374863
  if (!newUrl || !newUrl.startsWith("http")) {
374798
- onDone(`◆ Image Pipeline — Config
374799
-
374800
- Usage: /image-pipeline config http://<host>:8000
374801
- Example: /image-pipeline config http://192.168.1.50:8000`, { display: "system" });
374864
+ onDone([
374865
+ "◆ Image Pipeline — Config",
374866
+ "",
374867
+ " Usage: /image-pipeline config http://<host>:8000",
374868
+ " Example: /image-pipeline config http://192.168.1.50:8000"
374869
+ ].join(`
374870
+ `), { display: "system" });
374802
374871
  return null;
374803
374872
  }
374804
374873
  await scaffoldProject(projectRoot);
@@ -374815,141 +374884,116 @@ var call20 = async (onDone, _context, args) => {
374815
374884
  existing.backendUrl = newUrl;
374816
374885
  await saveConfig2(projectRoot, existing);
374817
374886
  const active = await detectComfyUI(newUrl);
374818
- const lines2 = [
374887
+ onDone([
374819
374888
  "◆ Image Pipeline — Config Saved",
374820
374889
  "",
374821
374890
  ` Backend URL: ${newUrl}`,
374822
374891
  active ? " ● ComfyUI is reachable" : " ○ ComfyUI not reachable yet (URL saved — start ComfyUI to connect)"
374823
- ];
374824
- onDone(lines2.join(`
374892
+ ].join(`
374825
374893
  `), { display: "system" });
374826
374894
  return null;
374827
374895
  }
374828
- if (subcmd === "list") {
374829
- const [prompts, workflows] = await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]);
374830
- const lines2 = ["◆ Image Pipeline — Templates", ""];
374831
- if (prompts.length === 0 && workflows.length === 0) {
374832
- lines2.push(" No templates yet.");
374833
- lines2.push(" Run /image-pipeline setup to scaffold the project.");
374834
- } else {
374835
- if (prompts.length > 0) {
374836
- lines2.push(" Prompt templates:");
374837
- for (const p of prompts)
374838
- lines2.push(` • prompts/${p}`);
374896
+ if (subcmd === "workflow") {
374897
+ const name = restText;
374898
+ if (!name) {
374899
+ const workflows2 = await listWorkflows(projectRoot);
374900
+ const lines = [
374901
+ " Image Pipeline Set Default Workflow",
374902
+ "",
374903
+ " Usage: /image-pipeline workflow <name>"
374904
+ ];
374905
+ if (workflows2.length > 0) {
374906
+ lines.push(" Available:");
374907
+ for (const w2 of workflows2)
374908
+ lines.push(` • ${w2.replace(/\.json$/, "")}`);
374909
+ } else {
374910
+ lines.push(" No workflows found — run /image-pipeline setup first.");
374839
374911
  }
374912
+ onDone(lines.join(`
374913
+ `), { display: "system" });
374914
+ return null;
374915
+ }
374916
+ await scaffoldProject(projectRoot);
374917
+ const config2 = await loadConfig(projectRoot) ?? {
374918
+ backendUrl: DEFAULT_COMFYUI_URL,
374919
+ defaultWidth: 512,
374920
+ defaultHeight: 512,
374921
+ defaultSteps: 20,
374922
+ defaultCfg: 7,
374923
+ defaultSampler: "euler",
374924
+ defaultModel: "",
374925
+ outputDir: ".localclawd/image-pipeline/generated"
374926
+ };
374927
+ const workflows = await listWorkflows(projectRoot);
374928
+ const match = workflows.find((w2) => w2 === name || w2 === `${name}.json`);
374929
+ if (!match) {
374930
+ const lines = [
374931
+ `◆ Image Pipeline — Workflow not found: "${name}"`,
374932
+ ""
374933
+ ];
374840
374934
  if (workflows.length > 0) {
374841
- lines2.push(" Workflows:");
374935
+ lines.push(" Available:");
374842
374936
  for (const w2 of workflows)
374843
- lines2.push(` • workflows/${w2}`);
374937
+ lines.push(` • ${w2.replace(/\.json$/, "")}`);
374938
+ } else {
374939
+ lines.push(" No workflows found — run /image-pipeline setup first.");
374844
374940
  }
374845
- }
374846
- onDone(lines2.join(`
374941
+ onDone(lines.join(`
374847
374942
  `), { display: "system" });
374848
- return null;
374849
- }
374850
- const promptText = subcmd === "generate" || subcmd === "gen" ? restText : rawArgs;
374851
- if (!promptText) {
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;
374943
+ return null;
374944
+ }
374945
+ config2.defaultWorkflow = name.replace(/\.json$/, "");
374946
+ await saveConfig2(projectRoot, config2);
374862
374947
  onDone([
374863
- "◆ Image Pipeline — No Backend",
374948
+ "◆ Image Pipeline — Default Workflow Set",
374864
374949
  "",
374865
- ` ComfyUI not reachable at ${tried}`,
374866
- " Start ComfyUI, then run: /image-pipeline generate <prompt>",
374867
- " Or set a remote URL: /image-pipeline config http://<host>:8000"
374950
+ ` Default workflow: ${config2.defaultWorkflow}`,
374951
+ " Use /image <prompt> to generate with this workflow.",
374952
+ " Or override per-generation: /image <other-workflow>: <prompt>"
374868
374953
  ].join(`
374869
374954
  `), { display: "system" });
374870
374955
  return null;
374871
374956
  }
374872
- const model = config2?.defaultModel || "v1-5-pruned-emaonly.safetensors";
374873
- const width = config2?.defaultWidth ?? 512;
374874
- const height = config2?.defaultHeight ?? 512;
374875
- const steps = config2?.defaultSteps ?? 20;
374876
- const cfg = config2?.defaultCfg ?? 7;
374877
- const sampler = config2?.defaultSampler ?? "euler";
374878
- const seed = Math.floor(Math.random() * 4294967296);
374879
- const workflow = {
374880
- "4": { class_type: "CheckpointLoaderSimple", inputs: { ckpt_name: model } },
374881
- "5": { class_type: "EmptyLatentImage", inputs: { width, height, batch_size: 1 } },
374882
- "6": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: promptText } },
374883
- "7": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: "blurry, low quality, watermark, deformed" } },
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
374957
+ if (subcmd === "list") {
374958
+ const config2 = await loadConfig(projectRoot);
374959
+ const [prompts, workflows] = await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]);
374960
+ const defaultWf = config2?.defaultWorkflow;
374961
+ const lines = ["◆ Image Pipeline — Templates", ""];
374962
+ if (prompts.length === 0 && workflows.length === 0) {
374963
+ lines.push(" No templates yet.");
374964
+ lines.push(" Run /image-pipeline setup to scaffold the project.");
374965
+ } else {
374966
+ if (workflows.length > 0) {
374967
+ lines.push(" Workflows:");
374968
+ for (const w2 of workflows) {
374969
+ const name = w2.replace(/\.json$/, "");
374970
+ const marker = defaultWf && name === defaultWf ? " ← default" : "";
374971
+ lines.push(` • ${name}${marker}`);
374972
+ }
374973
+ lines.push("");
374974
+ lines.push(" To use: /image <name>: <prompt>");
374975
+ lines.push(" To set default: /image-pipeline workflow <name>");
374897
374976
  }
374898
- },
374899
- "8": { class_type: "VAEDecode", inputs: { samples: ["3", 0], vae: ["4", 2] } },
374900
- "9": { class_type: "SaveImage", inputs: { filename_prefix: "localclawd", images: ["8", 0] } }
374901
- };
374902
- let queued;
374903
- try {
374904
- queued = await queuePrompt(backend, workflow);
374905
- } catch (e) {
374906
- onDone(`◆ Image Pipeline — Queue Error
374907
-
374908
- ${String(e)}
374909
- Is ComfyUI running and a model loaded?`, { display: "system" });
374910
- return null;
374911
- }
374912
- const result = await pollForCompletion(backend, queued.prompt_id);
374913
- if (!result) {
374914
- onDone([
374915
- "◆ Image Pipeline — Timed Out",
374916
- "",
374917
- ` Job queued: ${queued.prompt_id}`,
374918
- ` Check: ${backend}/history/${queued.prompt_id}`
374919
- ].join(`
374977
+ if (prompts.length > 0) {
374978
+ lines.push("");
374979
+ lines.push(" Prompt templates:");
374980
+ for (const p of prompts)
374981
+ lines.push(` • prompts/${p}`);
374982
+ }
374983
+ }
374984
+ onDone(lines.join(`
374920
374985
  `), { display: "system" });
374921
374986
  return null;
374922
374987
  }
374923
- const outputDir = join113(projectRoot, ".localclawd", "image-pipeline", "generated");
374924
- await mkdir35(outputDir, { recursive: true });
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)",
374988
+ onDone([
374989
+ `◆ Image Pipeline — Unknown subcommand: "${subcmd}"`,
374947
374990
  "",
374948
- ` Job complete but image download failed.`,
374949
- ` Check ComfyUI output folder for: ${comfyImages.join(", ") || "(filenames unknown)"}`,
374950
- ` Seed: ${seed}`
374951
- ];
374952
- onDone(lines.join(`
374991
+ " Commands:",
374992
+ " /image-pipeline setup — scaffold project",
374993
+ " /image-pipeline config <url> — set ComfyUI backend URL",
374994
+ " /image-pipeline workflow <name> — set default workflow",
374995
+ " /image-pipeline list — list workflows and templates"
374996
+ ].join(`
374953
374997
  `), { display: "system" });
374954
374998
  return null;
374955
374999
  };
@@ -375035,7 +375079,7 @@ function createEmptyState() {
375035
375079
  }
375036
375080
 
375037
375081
  // src/services/director/directorMemoryOps.ts
375038
- import { mkdir as mkdir36, readdir as readdir23, readFile as readFile44, stat as stat38, writeFile as writeFile38 } from "fs/promises";
375082
+ import { mkdir as mkdir35, readdir as readdir23, readFile as readFile44, stat as stat38, writeFile as writeFile37 } from "fs/promises";
375039
375083
  import { basename as basename34, join as join115, resolve as resolve36 } from "path";
375040
375084
  function setDirectorProjectRoot(projectPath) {
375041
375085
  _projectStateDir = join115(projectPath, ".localclawd");
@@ -375058,10 +375102,10 @@ async function loadDirectorState() {
375058
375102
  }
375059
375103
  async function saveDirectorState(state) {
375060
375104
  const dir = _projectStateDir || GLOBAL_DIRECTOR_DIR;
375061
- await mkdir36(dir, { recursive: true });
375062
- await writeFile38(getStatePath(), JSON.stringify(state, null, 2), "utf-8");
375105
+ await mkdir35(dir, { recursive: true });
375106
+ await writeFile37(getStatePath(), JSON.stringify(state, null, 2), "utf-8");
375063
375107
  }
375064
- function slugify4(path12) {
375108
+ function slugify3(path12) {
375065
375109
  return basename34(resolve36(path12)).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
375066
375110
  }
375067
375111
  async function detectGitRemote(projectPath) {
@@ -375099,7 +375143,7 @@ function generateTags(project) {
375099
375143
  }
375100
375144
  async function registerProject(state, projectPath, description) {
375101
375145
  const absPath = resolve36(projectPath);
375102
- const id = slugify4(absPath);
375146
+ const id = slugify3(absPath);
375103
375147
  const existing = state.projects.find((p) => p.id === id || p.path === absPath);
375104
375148
  if (existing) {
375105
375149
  existing.lastActive = Date.now();
@@ -376294,7 +376338,7 @@ __export(exports_scheduler, {
376294
376338
  getSchedules: () => getSchedules,
376295
376339
  addSchedule: () => addSchedule
376296
376340
  });
376297
- import { mkdir as mkdir37, readFile as readFile45, writeFile as writeFile39 } from "fs/promises";
376341
+ import { mkdir as mkdir36, readFile as readFile45, writeFile as writeFile38 } from "fs/promises";
376298
376342
  import { join as join116 } from "path";
376299
376343
  async function loadSchedules() {
376300
376344
  try {
@@ -376308,8 +376352,8 @@ async function loadSchedules() {
376308
376352
  }
376309
376353
  }
376310
376354
  async function saveSchedules(file) {
376311
- await mkdir37(getClaudeConfigHomeDir(), { recursive: true });
376312
- await writeFile39(SCHEDULES_PATH, JSON.stringify(file, null, 2), "utf-8");
376355
+ await mkdir36(getClaudeConfigHomeDir(), { recursive: true });
376356
+ await writeFile38(SCHEDULES_PATH, JSON.stringify(file, null, 2), "utf-8");
376313
376357
  }
376314
376358
  function nextRunTime(expr, from = Date.now()) {
376315
376359
  const trimmed = expr.trim().toLowerCase();
@@ -377255,7 +377299,7 @@ var exports_telegram = {};
377255
377299
  __export(exports_telegram, {
377256
377300
  call: () => call22
377257
377301
  });
377258
- import { writeFile as writeFile40, mkdir as mkdir38 } from "fs/promises";
377302
+ import { writeFile as writeFile39, mkdir as mkdir37 } from "fs/promises";
377259
377303
  import { join as join117 } from "path";
377260
377304
  function TelegramSetup({ onDone }) {
377261
377305
  const [step, setStep] = React59.useState("instructions");
@@ -377543,19 +377587,19 @@ async function saveTelegramConfig(token, chatId) {
377543
377587
  const cwd2 = getOriginalCwd2();
377544
377588
  if (cwd2) {
377545
377589
  const projDir = join117(cwd2, ".localclawd");
377546
- await mkdir38(projDir, { recursive: true });
377590
+ await mkdir37(projDir, { recursive: true });
377547
377591
  configPath = join117(projDir, "telegram.json");
377548
377592
  } else {
377549
377593
  const dir = getClaudeConfigHomeDir();
377550
- await mkdir38(dir, { recursive: true });
377594
+ await mkdir37(dir, { recursive: true });
377551
377595
  configPath = join117(dir, "telegram.json");
377552
377596
  }
377553
377597
  } catch {
377554
377598
  const dir = getClaudeConfigHomeDir();
377555
- await mkdir38(dir, { recursive: true });
377599
+ await mkdir37(dir, { recursive: true });
377556
377600
  configPath = join117(dir, "telegram.json");
377557
377601
  }
377558
- await writeFile40(configPath, JSON.stringify({ token, chatId }, null, 2), "utf-8");
377602
+ await writeFile39(configPath, JSON.stringify({ token, chatId }, null, 2), "utf-8");
377559
377603
  }
377560
377604
  function TelegramStatus({
377561
377605
  onDone
@@ -377765,7 +377809,7 @@ var exports_slack = {};
377765
377809
  __export(exports_slack, {
377766
377810
  call: () => call23
377767
377811
  });
377768
- import { writeFile as writeFile41, mkdir as mkdir39 } from "fs/promises";
377812
+ import { writeFile as writeFile40, mkdir as mkdir38 } from "fs/promises";
377769
377813
  import { join as join118 } from "path";
377770
377814
  function SlackSetup({ onDone }) {
377771
377815
  const [step, setStep] = React60.useState("instructions");
@@ -378121,9 +378165,9 @@ function SlackSetupDone({
378121
378165
  }
378122
378166
  async function saveSlackConfig(token, channelId, userId) {
378123
378167
  const configDir = getClaudeConfigHomeDir();
378124
- await mkdir39(configDir, { recursive: true });
378168
+ await mkdir38(configDir, { recursive: true });
378125
378169
  const configPath = join118(configDir, "slack.json");
378126
- await writeFile41(configPath, JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378170
+ await writeFile40(configPath, JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378127
378171
  }
378128
378172
  function SlackStatus({
378129
378173
  onDone
@@ -378348,7 +378392,7 @@ var exports_discord = {};
378348
378392
  __export(exports_discord, {
378349
378393
  call: () => call24
378350
378394
  });
378351
- import { writeFile as writeFile42, mkdir as mkdir40 } from "fs/promises";
378395
+ import { writeFile as writeFile41, mkdir as mkdir39 } from "fs/promises";
378352
378396
  import { join as join119 } from "path";
378353
378397
  function DiscordSetup({ onDone }) {
378354
378398
  const [step, setStep] = React62.useState("instructions");
@@ -378643,8 +378687,8 @@ function DiscordSetupDone({
378643
378687
  }
378644
378688
  async function saveConfig3(token, channelId, userId) {
378645
378689
  const configDir = getClaudeConfigHomeDir();
378646
- await mkdir40(configDir, { recursive: true });
378647
- await writeFile42(join119(configDir, "discord.json"), JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378690
+ await mkdir39(configDir, { recursive: true });
378691
+ await writeFile41(join119(configDir, "discord.json"), JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378648
378692
  }
378649
378693
  function DiscordStatus({
378650
378694
  onDone
@@ -379015,7 +379059,7 @@ var init_schedule2 = __esm(() => {
379015
379059
  });
379016
379060
 
379017
379061
  // src/services/sessionSearch/sessionSummarize.ts
379018
- import { readdir as readdir24, readFile as readFile46, writeFile as writeFile43, mkdir as mkdir41, stat as stat39 } from "fs/promises";
379062
+ import { readdir as readdir24, readFile as readFile46, writeFile as writeFile42, mkdir as mkdir40, stat as stat39 } from "fs/promises";
379019
379063
  import { join as join120 } from "path";
379020
379064
  import { homedir as homedir28 } from "os";
379021
379065
  function extractText(obj) {
@@ -379180,7 +379224,7 @@ ${transcript}`;
379180
379224
  };
379181
379225
  }
379182
379226
  async function summarizeAllPending(limit = 20, onProgress) {
379183
- await mkdir41(SUMMARIES_DIR2, { recursive: true });
379227
+ await mkdir40(SUMMARIES_DIR2, { recursive: true });
379184
379228
  const pending = await listUnsummarized();
379185
379229
  pending.sort((a, b3) => b3.mtime - a.mtime);
379186
379230
  const slice = pending.slice(0, limit);
@@ -379195,7 +379239,7 @@ async function summarizeAllPending(limit = 20, onProgress) {
379195
379239
  continue;
379196
379240
  }
379197
379241
  try {
379198
- await writeFile43(join120(SUMMARIES_DIR2, `${p.sessionId}.json`), JSON.stringify(summary, null, 2), "utf-8");
379242
+ await writeFile42(join120(SUMMARIES_DIR2, `${p.sessionId}.json`), JSON.stringify(summary, null, 2), "utf-8");
379199
379243
  summarized++;
379200
379244
  } catch (e) {
379201
379245
  logForDebugging(`[session-summarize] write failed: ${e}`);
@@ -379738,7 +379782,7 @@ var init_summarize_sessions2 = __esm(() => {
379738
379782
  });
379739
379783
 
379740
379784
  // src/services/sessionSearch/trajectoryCompress.ts
379741
- import { readFile as readFile49, writeFile as writeFile44, readdir as readdir27, mkdir as mkdir42, stat as stat42 } from "fs/promises";
379785
+ import { readFile as readFile49, writeFile as writeFile43, readdir as readdir27, mkdir as mkdir41, stat as stat42 } from "fs/promises";
379742
379786
  import { join as join123 } from "path";
379743
379787
  import { homedir as homedir30 } from "os";
379744
379788
  function flattenText(obj) {
@@ -379857,8 +379901,8 @@ async function compressSession(sessionId, projectSlug) {
379857
379901
  };
379858
379902
  const serialized = JSON.stringify(trajectory, null, 0);
379859
379903
  trajectory.compressedBytes = Buffer.byteLength(serialized, "utf-8");
379860
- await mkdir42(TRAJECTORIES_DIR2, { recursive: true });
379861
- await writeFile44(join123(TRAJECTORIES_DIR2, `${sessionId}.json`), JSON.stringify(trajectory), "utf-8");
379904
+ await mkdir41(TRAJECTORIES_DIR2, { recursive: true });
379905
+ await writeFile43(join123(TRAJECTORIES_DIR2, `${sessionId}.json`), JSON.stringify(trajectory), "utf-8");
379862
379906
  return trajectory;
379863
379907
  }
379864
379908
  async function compressAllPending(limit = 20) {
@@ -380862,7 +380906,7 @@ var init_daytona_run2 = __esm(() => {
380862
380906
  });
380863
380907
 
380864
380908
  // src/services/skills/skillPortable.ts
380865
- import { readdir as readdir29, readFile as readFile51, writeFile as writeFile45, mkdir as mkdir43, stat as stat44 } from "fs/promises";
380909
+ import { readdir as readdir29, readFile as readFile51, writeFile as writeFile44, mkdir as mkdir42, stat as stat44 } from "fs/promises";
380866
380910
  import { join as join125, basename as basename35, extname as extname13, resolve as resolve37 } from "path";
380867
380911
  function parseFrontmatter2(raw) {
380868
380912
  const m2 = raw.match(/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);
@@ -380954,8 +380998,8 @@ async function exportSkill(name, destDir) {
380954
380998
  body
380955
380999
  };
380956
381000
  const outPath = resolve37(destDir, `${skill.name}.md`);
380957
- await mkdir43(destDir, { recursive: true });
380958
- await writeFile45(outPath, buildFrontmatter(skill), "utf-8");
381001
+ await mkdir42(destDir, { recursive: true });
381002
+ await writeFile44(outPath, buildFrontmatter(skill), "utf-8");
380959
381003
  return { ok: true, path: outPath };
380960
381004
  }
380961
381005
  async function importSkill(filePath) {
@@ -380978,8 +381022,8 @@ async function importSkill(filePath) {
380978
381022
  const skill = { name, description, tags, body };
380979
381023
  const outPath = join125(USER_SKILLS_DIR, `${name}.md`);
380980
381024
  try {
380981
- await mkdir43(USER_SKILLS_DIR, { recursive: true });
380982
- await writeFile45(outPath, buildFrontmatter(skill), "utf-8");
381025
+ await mkdir42(USER_SKILLS_DIR, { recursive: true });
381026
+ await writeFile44(outPath, buildFrontmatter(skill), "utf-8");
380983
381027
  logForDebugging(`[skills] imported ${name} → ${outPath}`);
380984
381028
  return { ok: true, name, path: outPath };
380985
381029
  } catch (e) {
@@ -381101,7 +381145,7 @@ var init_skills_import2 = __esm(() => {
381101
381145
  });
381102
381146
 
381103
381147
  // src/services/skills/skillUsage.ts
381104
- import { mkdir as mkdir44, readFile as readFile52, writeFile as writeFile46 } from "fs/promises";
381148
+ import { mkdir as mkdir43, readFile as readFile52, writeFile as writeFile45 } from "fs/promises";
381105
381149
  import { join as join126 } from "path";
381106
381150
  async function loadFile() {
381107
381151
  try {
@@ -381204,7 +381248,7 @@ var init_skill_stats2 = __esm(() => {
381204
381248
  });
381205
381249
 
381206
381250
  // src/services/skills/skillNotes.ts
381207
- import { mkdir as mkdir45, readFile as readFile53, writeFile as writeFile47, appendFile as appendFile5, stat as stat45 } from "fs/promises";
381251
+ import { mkdir as mkdir44, readFile as readFile53, writeFile as writeFile46, appendFile as appendFile5, stat as stat45 } from "fs/promises";
381208
381252
  import { join as join127 } from "path";
381209
381253
  async function findNotesPath(skillName) {
381210
381254
  const dirPath = join127(USER_SKILLS_DIR2, skillName, "NOTES.md");
@@ -381228,7 +381272,7 @@ async function appendSkillNote(skillName, note) {
381228
381272
  if (!trimmed)
381229
381273
  return { ok: false, error: "note is empty" };
381230
381274
  const path12 = await findNotesPath(skillName);
381231
- await mkdir45(USER_SKILLS_DIR2, { recursive: true });
381275
+ await mkdir44(USER_SKILLS_DIR2, { recursive: true });
381232
381276
  let existing = "";
381233
381277
  try {
381234
381278
  existing = await readFile53(path12, "utf-8");
@@ -381253,7 +381297,7 @@ async function appendSkillNote(skillName, note) {
381253
381297
  const compacted = lines.slice(0, headerEnd).concat(lines.slice(trimStart)).join(`
381254
381298
  `);
381255
381299
  try {
381256
- await writeFile47(path12, compacted + entry, "utf-8");
381300
+ await writeFile46(path12, compacted + entry, "utf-8");
381257
381301
  } catch (e) {
381258
381302
  return { ok: false, error: String(e) };
381259
381303
  }
@@ -381986,7 +382030,7 @@ __export(exports_webuiServer, {
381986
382030
  broadcastNewWindow: () => broadcastNewWindow
381987
382031
  });
381988
382032
  import { createServer as createServer5 } from "http";
381989
- import { mkdir as mkdir46, readdir as readdir30, readFile as readFile54, writeFile as writeFile48 } from "fs/promises";
382033
+ import { mkdir as mkdir45, readdir as readdir30, readFile as readFile54, writeFile as writeFile47 } from "fs/promises";
381990
382034
  import { createHash as createHash23 } from "crypto";
381991
382035
  import { join as join128 } from "path";
381992
382036
  function getWebuiPort() {
@@ -382041,8 +382085,8 @@ async function listInstances() {
382041
382085
  }
382042
382086
  async function ensureStaticHtml() {
382043
382087
  try {
382044
- await mkdir46(getClaudeConfigHomeDir(), { recursive: true });
382045
- await writeFile48(WEBUI_HTML_PATH, STATIC_HTML, "utf-8");
382088
+ await mkdir45(getClaudeConfigHomeDir(), { recursive: true });
382089
+ await writeFile47(WEBUI_HTML_PATH, STATIC_HTML, "utf-8");
382046
382090
  } catch {}
382047
382091
  }
382048
382092
  function decodeFrame(buffer) {
@@ -382196,7 +382240,7 @@ async function startWebuiServer(port) {
382196
382240
  _boundPort = addr.port;
382197
382241
  _server = server;
382198
382242
  logForDebugging(`[webui] listening on http://127.0.0.1:${_boundPort}`);
382199
- mkdir46(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile48(PORT_FILE, String(_boundPort), "utf-8").catch(() => {}));
382243
+ mkdir45(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile47(PORT_FILE, String(_boundPort), "utf-8").catch(() => {}));
382200
382244
  resolve39({ ok: true, port: _boundPort });
382201
382245
  } else {
382202
382246
  resolve39({ ok: false, error: "no address bound" });
@@ -382782,7 +382826,7 @@ var init_windows_setup2 = __esm(() => {
382782
382826
 
382783
382827
  // src/services/rpc/toolRpcServer.ts
382784
382828
  import { createServer as createServer6 } from "http";
382785
- import { readFile as readFile55, writeFile as writeFile49, mkdir as mkdir47, readdir as readdir31, stat as stat46 } from "fs/promises";
382829
+ import { readFile as readFile55, writeFile as writeFile48, mkdir as mkdir46, readdir as readdir31, stat as stat46 } from "fs/promises";
382786
382830
  import { spawn as spawn12 } from "child_process";
382787
382831
  import { join as join129, resolve as resolvePath, relative as relative23 } from "path";
382788
382832
  async function handleRead(p) {
@@ -382796,7 +382840,7 @@ async function handleRead(p) {
382796
382840
  }
382797
382841
  async function handleWrite(p) {
382798
382842
  try {
382799
- await writeFile49(p.path, p.content, "utf-8");
382843
+ await writeFile48(p.path, p.content, "utf-8");
382800
382844
  return { ok: true, data: { bytes: Buffer.byteLength(p.content, "utf-8") } };
382801
382845
  } catch (e) {
382802
382846
  return { ok: false, error: String(e) };
@@ -382823,7 +382867,7 @@ async function handleEdit(p) {
382823
382867
  updated = content.replace(p.oldString, p.newString);
382824
382868
  replacements2 = 1;
382825
382869
  }
382826
- await writeFile49(p.path, updated, "utf-8");
382870
+ await writeFile48(p.path, updated, "utf-8");
382827
382871
  return { ok: true, data: { replacements: replacements2 } };
382828
382872
  } catch (e) {
382829
382873
  return { ok: false, error: String(e) };
@@ -383041,7 +383085,7 @@ async function startToolRpcServer() {
383041
383085
  _boundPort2 = addr.port;
383042
383086
  _server2 = server;
383043
383087
  logForDebugging(`[rpc] listening on 127.0.0.1:${_boundPort2}`);
383044
- mkdir47(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile49(PORT_FILE2, String(_boundPort2), "utf-8").catch(() => {}));
383088
+ mkdir46(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile48(PORT_FILE2, String(_boundPort2), "utf-8").catch(() => {}));
383045
383089
  }
383046
383090
  resolve39();
383047
383091
  });
@@ -383940,7 +383984,7 @@ var init_versions2 = __esm(() => {
383940
383984
  });
383941
383985
 
383942
383986
  // src/components/memory/MemoryFileSelector.tsx
383943
- import { mkdir as mkdir48 } from "fs/promises";
383987
+ import { mkdir as mkdir47 } from "fs/promises";
383944
383988
  import { join as join130 } from "path";
383945
383989
  function MemoryFileSelector(t0) {
383946
383990
  const $2 = c3(58);
@@ -384289,7 +384333,7 @@ function MemoryFileSelector(t0) {
384289
384333
  t20 = (value) => {
384290
384334
  if (value.startsWith(OPEN_FOLDER_PREFIX)) {
384291
384335
  const folderPath = value.slice(OPEN_FOLDER_PREFIX.length);
384292
- mkdir48(folderPath, {
384336
+ mkdir47(folderPath, {
384293
384337
  recursive: true
384294
384338
  }).catch(_temp86).then(() => openPath(folderPath));
384295
384339
  return;
@@ -384649,19 +384693,19 @@ var exports_memory = {};
384649
384693
  __export(exports_memory, {
384650
384694
  call: () => call55
384651
384695
  });
384652
- import { mkdir as mkdir49, writeFile as writeFile50 } from "fs/promises";
384696
+ import { mkdir as mkdir48, writeFile as writeFile49 } from "fs/promises";
384653
384697
  function MemoryCommand({
384654
384698
  onDone
384655
384699
  }) {
384656
384700
  const handleSelectMemoryFile = async (memoryPath) => {
384657
384701
  try {
384658
384702
  if (memoryPath.includes(getClaudeConfigHomeDir())) {
384659
- await mkdir49(getClaudeConfigHomeDir(), {
384703
+ await mkdir48(getClaudeConfigHomeDir(), {
384660
384704
  recursive: true
384661
384705
  });
384662
384706
  }
384663
384707
  try {
384664
- await writeFile50(memoryPath, "", {
384708
+ await writeFile49(memoryPath, "", {
384665
384709
  encoding: "utf8",
384666
384710
  flag: "wx"
384667
384711
  });
@@ -385583,7 +385627,7 @@ function Help(t0) {
385583
385627
  let t6;
385584
385628
  if ($2[31] !== tabs) {
385585
385629
  t6 = /* @__PURE__ */ jsx_dev_runtime221.jsxDEV(Tabs, {
385586
- title: `localclawd v${"1.8.4"}`,
385630
+ title: `localclawd v${"1.8.5"}`,
385587
385631
  color: "professionalBlue",
385588
385632
  defaultTab: "general",
385589
385633
  children: tabs
@@ -386961,7 +387005,7 @@ var exports_keybindings = {};
386961
387005
  __export(exports_keybindings, {
386962
387006
  call: () => call58
386963
387007
  });
386964
- import { mkdir as mkdir50, writeFile as writeFile51 } from "fs/promises";
387008
+ import { mkdir as mkdir49, writeFile as writeFile50 } from "fs/promises";
386965
387009
  import { dirname as dirname47 } from "path";
386966
387010
  async function call58() {
386967
387011
  if (!isKeybindingCustomizationEnabled()) {
@@ -386972,9 +387016,9 @@ async function call58() {
386972
387016
  }
386973
387017
  const keybindingsPath = getKeybindingsPath();
386974
387018
  let fileExists = false;
386975
- await mkdir50(dirname47(keybindingsPath), { recursive: true });
387019
+ await mkdir49(dirname47(keybindingsPath), { recursive: true });
386976
387020
  try {
386977
- await writeFile51(keybindingsPath, generateKeybindingsTemplate(), {
387021
+ await writeFile50(keybindingsPath, generateKeybindingsTemplate(), {
386978
387022
  encoding: "utf-8",
386979
387023
  flag: "wx"
386980
387024
  });
@@ -391737,7 +391781,7 @@ var init_AddMarketplace = __esm(() => {
391737
391781
 
391738
391782
  // src/utils/plugins/installCounts.ts
391739
391783
  import { randomBytes as randomBytes17 } from "crypto";
391740
- import { readFile as readFile56, rename as rename7, unlink as unlink17, writeFile as writeFile52 } from "fs/promises";
391784
+ import { readFile as readFile56, rename as rename7, unlink as unlink17, writeFile as writeFile51 } from "fs/promises";
391741
391785
  import { join as join132 } from "path";
391742
391786
  function getInstallCountsCachePath() {
391743
391787
  return join132(getPluginsDirectory(), INSTALL_COUNTS_CACHE_FILENAME);
@@ -391795,7 +391839,7 @@ async function saveInstallCountsCache(cache3) {
391795
391839
  const pluginsDir = getPluginsDirectory();
391796
391840
  await getFsImplementation().mkdir(pluginsDir);
391797
391841
  const content = jsonStringify(cache3, null, 2);
391798
- await writeFile52(tempPath, content, {
391842
+ await writeFile51(tempPath, content, {
391799
391843
  encoding: "utf-8",
391800
391844
  mode: 384
391801
391845
  });
@@ -396192,7 +396236,7 @@ var init_ManageMarketplaces = __esm(() => {
396192
396236
 
396193
396237
  // src/utils/plugins/pluginFlagging.ts
396194
396238
  import { randomBytes as randomBytes18 } from "crypto";
396195
- import { readFile as readFile57, rename as rename8, unlink as unlink18, writeFile as writeFile53 } from "fs/promises";
396239
+ import { readFile as readFile57, rename as rename8, unlink as unlink18, writeFile as writeFile52 } from "fs/promises";
396196
396240
  import { join as join134 } from "path";
396197
396241
  function getFlaggedPluginsPath() {
396198
396242
  return join134(getPluginsDirectory(), FLAGGED_PLUGINS_FILENAME);
@@ -396233,7 +396277,7 @@ async function writeToDisk(plugins) {
396233
396277
  try {
396234
396278
  await getFsImplementation().mkdir(getPluginsDirectory());
396235
396279
  const content = jsonStringify({ plugins }, null, 2);
396236
- await writeFile53(tempPath, content, {
396280
+ await writeFile52(tempPath, content, {
396237
396281
  encoding: "utf-8",
396238
396282
  mode: 384
396239
396283
  });
@@ -402742,7 +402786,7 @@ var init_transcriptSearch = __esm(() => {
402742
402786
  });
402743
402787
 
402744
402788
  // src/utils/releaseNotes.ts
402745
- import { mkdir as mkdir51, readFile as readFile60, writeFile as writeFile54 } from "fs/promises";
402789
+ import { mkdir as mkdir50, readFile as readFile60, writeFile as writeFile53 } from "fs/promises";
402746
402790
  import { dirname as dirname50, join as join137 } from "path";
402747
402791
  function getChangelogCachePath() {
402748
402792
  return join137(getClaudeConfigHomeDir(), "cache", "changelog.md");
@@ -402754,8 +402798,8 @@ async function migrateChangelogFromConfig() {
402754
402798
  }
402755
402799
  const cachePath = getChangelogCachePath();
402756
402800
  try {
402757
- await mkdir51(dirname50(cachePath), { recursive: true });
402758
- await writeFile54(cachePath, config2.cachedChangelog, {
402801
+ await mkdir50(dirname50(cachePath), { recursive: true });
402802
+ await writeFile53(cachePath, config2.cachedChangelog, {
402759
402803
  encoding: "utf-8",
402760
402804
  flag: "wx"
402761
402805
  });
@@ -402776,8 +402820,8 @@ async function fetchAndStoreChangelog() {
402776
402820
  return;
402777
402821
  }
402778
402822
  const cachePath = getChangelogCachePath();
402779
- await mkdir51(dirname50(cachePath), { recursive: true });
402780
- await writeFile54(cachePath, changelogContent, { encoding: "utf-8" });
402823
+ await mkdir50(dirname50(cachePath), { recursive: true });
402824
+ await writeFile53(cachePath, changelogContent, { encoding: "utf-8" });
402781
402825
  changelogMemoryCache = changelogContent;
402782
402826
  const changelogLastFetched = Date.now();
402783
402827
  saveGlobalConfig((current) => ({
@@ -402845,7 +402889,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
402845
402889
  }
402846
402890
  return [];
402847
402891
  }
402848
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.4") {
402892
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.5") {
402849
402893
  if (process.env.USER_TYPE === "ant") {
402850
402894
  const changelog = MACRO.VERSION_CHANGELOG;
402851
402895
  if (changelog) {
@@ -402872,7 +402916,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.4") {
402872
402916
  releaseNotes
402873
402917
  };
402874
402918
  }
402875
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.8.4") {
402919
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.8.5") {
402876
402920
  if (process.env.USER_TYPE === "ant") {
402877
402921
  const changelog = MACRO.VERSION_CHANGELOG;
402878
402922
  if (changelog) {
@@ -403029,7 +403073,7 @@ function getRecentActivitySync() {
403029
403073
  return cachedActivity;
403030
403074
  }
403031
403075
  function getLogoDisplayData() {
403032
- const version = process.env.DEMO_VERSION ?? "1.8.4";
403076
+ const version = process.env.DEMO_VERSION ?? "1.8.5";
403033
403077
  const serverUrl = getDirectConnectServerUrl();
403034
403078
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
403035
403079
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -403414,9 +403458,9 @@ function checkCachedPassesEligibility() {
403414
403458
  hasCache: false
403415
403459
  };
403416
403460
  }
403417
- const { eligible: eligible2, timestamp: timestamp4 } = cachedEntry;
403461
+ const { eligible: eligible2, timestamp: timestamp3 } = cachedEntry;
403418
403462
  const now2 = Date.now();
403419
- const needsRefresh = now2 - timestamp4 > CACHE_EXPIRATION_MS;
403463
+ const needsRefresh = now2 - timestamp3 > CACHE_EXPIRATION_MS;
403420
403464
  return {
403421
403465
  eligible: eligible2,
403422
403466
  needsRefresh,
@@ -403499,11 +403543,11 @@ async function getCachedOrFetchPassesEligibility() {
403499
403543
  if (now2 - cachedEntry.timestamp > CACHE_EXPIRATION_MS) {
403500
403544
  logForDebugging("Passes: Cache stale, returning cached data and refreshing in background");
403501
403545
  fetchAndStorePassesEligibility();
403502
- const { timestamp: timestamp5, ...response2 } = cachedEntry;
403546
+ const { timestamp: timestamp4, ...response2 } = cachedEntry;
403503
403547
  return response2;
403504
403548
  }
403505
403549
  logForDebugging("Passes: Using fresh cached eligibility data");
403506
- const { timestamp: timestamp4, ...response } = cachedEntry;
403550
+ const { timestamp: timestamp3, ...response } = cachedEntry;
403507
403551
  return response;
403508
403552
  }
403509
403553
  async function prefetchPassesEligibility() {
@@ -404129,7 +404173,7 @@ function Logo() {
404129
404173
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
404130
404174
  t2 = () => {
404131
404175
  const currentConfig = getGlobalConfig();
404132
- if (currentConfig.lastReleaseNotesSeen === "1.8.4") {
404176
+ if (currentConfig.lastReleaseNotesSeen === "1.8.5") {
404133
404177
  return;
404134
404178
  }
404135
404179
  saveGlobalConfig(_temp326);
@@ -404788,12 +404832,12 @@ function Logo() {
404788
404832
  return t41;
404789
404833
  }
404790
404834
  function _temp326(current) {
404791
- if (current.lastReleaseNotesSeen === "1.8.4") {
404835
+ if (current.lastReleaseNotesSeen === "1.8.5") {
404792
404836
  return current;
404793
404837
  }
404794
404838
  return {
404795
404839
  ...current,
404796
- lastReleaseNotesSeen: "1.8.4"
404840
+ lastReleaseNotesSeen: "1.8.5"
404797
404841
  };
404798
404842
  }
404799
404843
  function _temp241(s_0) {
@@ -428789,7 +428833,7 @@ __export(exports_branch, {
428789
428833
  call: () => call80
428790
428834
  });
428791
428835
  import { randomUUID as randomUUID27 } from "crypto";
428792
- import { mkdir as mkdir52, readFile as readFile62, writeFile as writeFile55 } from "fs/promises";
428836
+ import { mkdir as mkdir51, readFile as readFile62, writeFile as writeFile54 } from "fs/promises";
428793
428837
  function deriveFirstPrompt(firstUserMessage) {
428794
428838
  const content = firstUserMessage?.message?.content;
428795
428839
  if (!content)
@@ -428805,7 +428849,7 @@ async function createFork(customTitle) {
428805
428849
  const projectDir = getProjectDir2(getOriginalCwd());
428806
428850
  const forkSessionPath = getTranscriptPathForSession(forkSessionId);
428807
428851
  const currentTranscriptPath = getTranscriptPath();
428808
- await mkdir52(projectDir, { recursive: true, mode: 448 });
428852
+ await mkdir51(projectDir, { recursive: true, mode: 448 });
428809
428853
  let transcriptContent;
428810
428854
  try {
428811
428855
  transcriptContent = await readFile62(currentTranscriptPath);
@@ -428853,7 +428897,7 @@ async function createFork(customTitle) {
428853
428897
  };
428854
428898
  lines.push(jsonStringify(forkedReplacementEntry));
428855
428899
  }
428856
- await writeFile55(forkSessionPath, lines.join(`
428900
+ await writeFile54(forkSessionPath, lines.join(`
428857
428901
  `) + `
428858
428902
  `, {
428859
428903
  encoding: "utf8",
@@ -429115,7 +429159,7 @@ var init_types11 = __esm(() => {
429115
429159
  });
429116
429160
 
429117
429161
  // src/components/agents/agentFileUtils.ts
429118
- import { mkdir as mkdir53, open as open12, unlink as unlink19 } from "fs/promises";
429162
+ import { mkdir as mkdir52, open as open12, unlink as unlink19 } from "fs/promises";
429119
429163
  import { join as join140 } from "path";
429120
429164
  function formatAgentAsMarkdown(agentType, whenToUse, tools, systemPrompt, color3, model, memory2, effort) {
429121
429165
  const escapedWhenToUse = whenToUse.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\\\n");
@@ -429198,7 +429242,7 @@ function getActualRelativeAgentFilePath(agent) {
429198
429242
  }
429199
429243
  async function ensureAgentDirectoryExists(source) {
429200
429244
  const dirPath = getAgentDirectoryPath(source);
429201
- await mkdir53(dirPath, { recursive: true });
429245
+ await mkdir52(dirPath, { recursive: true });
429202
429246
  return dirPath;
429203
429247
  }
429204
429248
  async function saveAgentToFile(source, agentType, whenToUse, tools, systemPrompt, checkExists = true, color3, model, memory2, effort) {
@@ -435181,7 +435225,7 @@ var init_rewind = __esm(() => {
435181
435225
 
435182
435226
  // src/utils/heapDumpService.ts
435183
435227
  import { createWriteStream as createWriteStream2, writeFileSync as writeFileSync4 } from "fs";
435184
- import { readdir as readdir34, readFile as readFile63, writeFile as writeFile56 } from "fs/promises";
435228
+ import { readdir as readdir34, readFile as readFile63, writeFile as writeFile55 } from "fs/promises";
435185
435229
  import { join as join141 } from "path";
435186
435230
  import { pipeline as pipeline2 } from "stream/promises";
435187
435231
  import {
@@ -435272,7 +435316,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
435272
435316
  smapsRollup,
435273
435317
  platform: process.platform,
435274
435318
  nodeVersion: process.version,
435275
- ccVersion: "1.8.4"
435319
+ ccVersion: "1.8.5"
435276
435320
  };
435277
435321
  }
435278
435322
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -435292,7 +435336,7 @@ async function performHeapDump(trigger = "manual", dumpNumber = 0) {
435292
435336
  const diagFilename = `${sessionId}${suffix}-diagnostics.json`;
435293
435337
  const heapPath = join141(dumpDir, heapFilename);
435294
435338
  const diagPath = join141(dumpDir, diagFilename);
435295
- await writeFile56(diagPath, jsonStringify(diagnostics, null, 2), {
435339
+ await writeFile55(diagPath, jsonStringify(diagnostics, null, 2), {
435296
435340
  mode: 384
435297
435341
  });
435298
435342
  logForDebugging(`[HeapDump] Diagnostics written to ${diagPath}`);
@@ -435857,7 +435901,7 @@ var init_bridge_kick = __esm(() => {
435857
435901
  var call87 = async () => {
435858
435902
  return {
435859
435903
  type: "text",
435860
- value: `${"1.8.4"} (built ${"2026-05-07T15:39:30.948Z"})`
435904
+ value: `${"1.8.5"} (built ${"2026-05-07T15:46:56.263Z"})`
435861
435905
  };
435862
435906
  }, version, version_default;
435863
435907
  var init_version = __esm(() => {
@@ -437224,7 +437268,7 @@ var init_advisor2 = __esm(() => {
437224
437268
 
437225
437269
  // src/skills/bundledSkills.ts
437226
437270
  import { constants as fsConstants4 } from "fs";
437227
- import { mkdir as mkdir54, open as open13 } from "fs/promises";
437271
+ import { mkdir as mkdir53, open as open13 } from "fs/promises";
437228
437272
  import { dirname as dirname51, isAbsolute as isAbsolute24, join as join142, normalize as normalize12, sep as pathSep2 } from "path";
437229
437273
  function registerBundledSkill(definition) {
437230
437274
  const { files: files2 } = definition;
@@ -437298,7 +437342,7 @@ async function writeSkillFiles(dir, files2) {
437298
437342
  byParent.set(parent2, [entry]);
437299
437343
  }
437300
437344
  await Promise.all([...byParent].map(async ([parent2, entries]) => {
437301
- await mkdir54(parent2, { recursive: true, mode: 448 });
437345
+ await mkdir53(parent2, { recursive: true, mode: 448 });
437302
437346
  await Promise.all(entries.map(([p, c5]) => safeWriteFile(p, c5)));
437303
437347
  }));
437304
437348
  }
@@ -437988,13 +438032,13 @@ async function call91(onDone, context7, args) {
437988
438032
  }
437989
438033
  }
437990
438034
  const firstPrompt = extractFirstPrompt(context7.messages);
437991
- const timestamp4 = formatTimestamp(new Date);
438035
+ const timestamp3 = formatTimestamp(new Date);
437992
438036
  let defaultFilename;
437993
438037
  if (firstPrompt) {
437994
438038
  const sanitized = sanitizeFilename(firstPrompt);
437995
- defaultFilename = sanitized ? `${timestamp4}-${sanitized}.txt` : `conversation-${timestamp4}.txt`;
438039
+ defaultFilename = sanitized ? `${timestamp3}-${sanitized}.txt` : `conversation-${timestamp3}.txt`;
437996
438040
  } else {
437997
- defaultFilename = `conversation-${timestamp4}.txt`;
438041
+ defaultFilename = `conversation-${timestamp3}.txt`;
437998
438042
  }
437999
438043
  return /* @__PURE__ */ jsx_dev_runtime351.jsxDEV(ExportDialog, {
438000
438044
  content,
@@ -440202,16 +440246,16 @@ var init_ansiToPng = __esm(() => {
440202
440246
  });
440203
440247
 
440204
440248
  // src/utils/screenshotClipboard.ts
440205
- import { mkdir as mkdir55, unlink as unlink20, writeFile as writeFile57 } from "fs/promises";
440249
+ import { mkdir as mkdir54, unlink as unlink20, writeFile as writeFile56 } from "fs/promises";
440206
440250
  import { tmpdir as tmpdir8 } from "os";
440207
440251
  import { join as join146 } from "path";
440208
440252
  async function copyAnsiToClipboard(ansiText, options) {
440209
440253
  try {
440210
440254
  const tempDir = join146(tmpdir8(), "claude-code-screenshots");
440211
- await mkdir55(tempDir, { recursive: true });
440255
+ await mkdir54(tempDir, { recursive: true });
440212
440256
  const pngPath = join146(tempDir, `screenshot-${Date.now()}.png`);
440213
440257
  const pngBuffer = ansiToPng(ansiText, options);
440214
- await writeFile57(pngPath, pngBuffer);
440258
+ await writeFile56(pngPath, pngBuffer);
440215
440259
  const result = await copyPngToClipboard(pngPath);
440216
440260
  try {
440217
440261
  await unlink20(pngPath);
@@ -442338,13 +442382,13 @@ import { execFileSync as execFileSync3 } from "child_process";
442338
442382
  import { constants as fsConstants5 } from "fs";
442339
442383
  import {
442340
442384
  copyFile as copyFile9,
442341
- mkdir as mkdir56,
442385
+ mkdir as mkdir55,
442342
442386
  mkdtemp,
442343
442387
  readdir as readdir35,
442344
442388
  readFile as readFile64,
442345
442389
  rm as rm10,
442346
442390
  unlink as unlink21,
442347
- writeFile as writeFile58
442391
+ writeFile as writeFile57
442348
442392
  } from "fs/promises";
442349
442393
  import { tmpdir as tmpdir9 } from "os";
442350
442394
  import { extname as extname14, join as join148 } from "path";
@@ -442723,10 +442767,10 @@ async function loadCachedFacets(sessionId) {
442723
442767
  }
442724
442768
  async function saveFacets(facets) {
442725
442769
  try {
442726
- await mkdir56(getFacetsDir(), { recursive: true });
442770
+ await mkdir55(getFacetsDir(), { recursive: true });
442727
442771
  } catch {}
442728
442772
  const facetPath = join148(getFacetsDir(), `${facets.session_id}.json`);
442729
- await writeFile58(facetPath, jsonStringify(facets, null, 2), {
442773
+ await writeFile57(facetPath, jsonStringify(facets, null, 2), {
442730
442774
  encoding: "utf-8",
442731
442775
  mode: 384
442732
442776
  });
@@ -442742,10 +442786,10 @@ async function loadCachedSessionMeta(sessionId) {
442742
442786
  }
442743
442787
  async function saveSessionMeta(meta) {
442744
442788
  try {
442745
- await mkdir56(getSessionMetaDir(), { recursive: true });
442789
+ await mkdir55(getSessionMetaDir(), { recursive: true });
442746
442790
  } catch {}
442747
442791
  const metaPath = join148(getSessionMetaDir(), `${meta.session_id}.json`);
442748
- await writeFile58(metaPath, jsonStringify(meta, null, 2), {
442792
+ await writeFile57(metaPath, jsonStringify(meta, null, 2), {
442749
442793
  encoding: "utf-8",
442750
442794
  mode: 384
442751
442795
  });
@@ -442800,9 +442844,9 @@ function detectMultiClauding(sessions) {
442800
442844
  const OVERLAP_WINDOW_MS = 30 * 60000;
442801
442845
  const allSessionMessages = [];
442802
442846
  for (const session2 of sessions) {
442803
- for (const timestamp4 of session2.user_message_timestamps) {
442847
+ for (const timestamp3 of session2.user_message_timestamps) {
442804
442848
  try {
442805
- const ts = new Date(timestamp4).getTime();
442849
+ const ts = new Date(timestamp3).getTime();
442806
442850
  allSessionMessages.push({ ts, sessionId: session2.session_id });
442807
442851
  } catch {}
442808
442852
  }
@@ -443801,7 +443845,7 @@ function generateHtmlReport(data, insights) {
443801
443845
  </html>`;
443802
443846
  }
443803
443847
  function buildExportData(data, insights, facets, remoteStats) {
443804
- const version2 = typeof MACRO !== "undefined" ? "1.8.4" : "unknown";
443848
+ const version2 = typeof MACRO !== "undefined" ? "1.8.5" : "unknown";
443805
443849
  const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
443806
443850
  const facets_summary = {
443807
443851
  total: facets.size,
@@ -444011,10 +444055,10 @@ async function generateUsageReport(options) {
444011
444055
  const insights = await generateParallelInsights(aggregated, facets);
444012
444056
  const htmlReport = generateHtmlReport(aggregated, insights);
444013
444057
  try {
444014
- await mkdir56(getDataDir(), { recursive: true });
444058
+ await mkdir55(getDataDir(), { recursive: true });
444015
444059
  } catch {}
444016
444060
  const htmlPath = join148(getDataDir(), "report.html");
444017
- await writeFile58(htmlPath, htmlReport, {
444061
+ await writeFile57(htmlPath, htmlReport, {
444018
444062
  encoding: "utf-8",
444019
444063
  mode: 384
444020
444064
  });
@@ -444130,7 +444174,7 @@ var init_insights = __esm(() => {
444130
444174
  const destProjectName = `${projectName}__${homespace}`;
444131
444175
  const destProjectPath = join148(destDir, destProjectName);
444132
444176
  try {
444133
- await mkdir56(destProjectPath, { recursive: true });
444177
+ await mkdir55(destProjectPath, { recursive: true });
444134
444178
  } catch {}
444135
444179
  let files2;
444136
444180
  try {
@@ -444450,9 +444494,9 @@ Find something genuinely interesting or amusing from the session summaries.`,
444450
444494
  let reportUrl = `file://${htmlPath}`;
444451
444495
  let uploadHint = "";
444452
444496
  if (process.env.USER_TYPE === "ant") {
444453
- const timestamp4 = new Date().toISOString().replace(/[-:]/g, "").replace("T", "_").slice(0, 15);
444497
+ const timestamp3 = new Date().toISOString().replace(/[-:]/g, "").replace("T", "_").slice(0, 15);
444454
444498
  const username = process.env.SAFEUSER || process.env.USER || "unknown";
444455
- const filename = `${username}_insights_${timestamp4}.html`;
444499
+ const filename = `${username}_insights_${timestamp3}.html`;
444456
444500
  const s3Path = `s3://anthropic-serve/atamkin/cc-user-reports/${filename}`;
444457
444501
  const s3Url = `https://s3-frontend.infra.ant.dev/anthropic-serve/atamkin/cc-user-reports/${filename}`;
444458
444502
  reportUrl = s3Url;
@@ -445174,12 +445218,12 @@ import { closeSync as closeSync4, fstatSync, openSync as openSync5, readSync as
445174
445218
  import {
445175
445219
  appendFile as fsAppendFile,
445176
445220
  open as fsOpen2,
445177
- mkdir as mkdir57,
445221
+ mkdir as mkdir56,
445178
445222
  readdir as readdir36,
445179
445223
  readFile as readFile65,
445180
445224
  stat as stat49,
445181
445225
  unlink as unlink22,
445182
- writeFile as writeFile59
445226
+ writeFile as writeFile58
445183
445227
  } from "fs/promises";
445184
445228
  import { basename as basename41, dirname as dirname53, join as join149 } from "path";
445185
445229
  function isTranscriptMessage(entry) {
@@ -445226,8 +445270,8 @@ function getAgentMetadataPath(agentId) {
445226
445270
  }
445227
445271
  async function writeAgentMetadata(agentId, metadata) {
445228
445272
  const path15 = getAgentMetadataPath(agentId);
445229
- await mkdir57(dirname53(path15), { recursive: true });
445230
- await writeFile59(path15, JSON.stringify(metadata));
445273
+ await mkdir56(dirname53(path15), { recursive: true });
445274
+ await writeFile58(path15, JSON.stringify(metadata));
445231
445275
  }
445232
445276
  async function readAgentMetadata(agentId) {
445233
445277
  const path15 = getAgentMetadataPath(agentId);
@@ -445249,8 +445293,8 @@ function getRemoteAgentMetadataPath(taskId) {
445249
445293
  }
445250
445294
  async function writeRemoteAgentMetadata(taskId, metadata) {
445251
445295
  const path15 = getRemoteAgentMetadataPath(taskId);
445252
- await mkdir57(dirname53(path15), { recursive: true });
445253
- await writeFile59(path15, JSON.stringify(metadata));
445296
+ await mkdir56(dirname53(path15), { recursive: true });
445297
+ await writeFile58(path15, JSON.stringify(metadata));
445254
445298
  }
445255
445299
  async function readRemoteAgentMetadata(taskId) {
445256
445300
  const path15 = getRemoteAgentMetadataPath(taskId);
@@ -445438,7 +445482,7 @@ class Project {
445438
445482
  try {
445439
445483
  await fsAppendFile(filePath, data, { mode: 384 });
445440
445484
  } catch {
445441
- await mkdir57(dirname53(filePath), { recursive: true, mode: 448 });
445485
+ await mkdir56(dirname53(filePath), { recursive: true, mode: 448 });
445442
445486
  await fsAppendFile(filePath, data, { mode: 384 });
445443
445487
  }
445444
445488
  }
@@ -445642,7 +445686,7 @@ class Project {
445642
445686
  return true;
445643
445687
  }
445644
445688
  });
445645
- await writeFile59(this.sessionFile, lines.join(`
445689
+ await writeFile58(this.sessionFile, lines.join(`
445646
445690
  `), {
445647
445691
  encoding: "utf8"
445648
445692
  });
@@ -445979,11 +446023,11 @@ async function hydrateRemoteSession(sessionId, ingressUrl) {
445979
446023
  try {
445980
446024
  const remoteLogs = await getSessionLogs(sessionId, ingressUrl) || [];
445981
446025
  const projectDir = getProjectDir2(getOriginalCwd());
445982
- await mkdir57(projectDir, { recursive: true, mode: 448 });
446026
+ await mkdir56(projectDir, { recursive: true, mode: 448 });
445983
446027
  const sessionFile = getTranscriptPathForSession(sessionId);
445984
446028
  const content = remoteLogs.map((e) => jsonStringify(e) + `
445985
446029
  `).join("");
445986
- await writeFile59(sessionFile, content, { encoding: "utf8", mode: 384 });
446030
+ await writeFile58(sessionFile, content, { encoding: "utf8", mode: 384 });
445987
446031
  logForDebugging(`Hydrated ${remoteLogs.length} entries from remote`);
445988
446032
  return remoteLogs.length > 0;
445989
446033
  } catch (error5) {
@@ -446011,11 +446055,11 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
446011
446055
  return false;
446012
446056
  }
446013
446057
  const projectDir = getProjectDir2(getOriginalCwd());
446014
- await mkdir57(projectDir, { recursive: true, mode: 448 });
446058
+ await mkdir56(projectDir, { recursive: true, mode: 448 });
446015
446059
  const sessionFile = getTranscriptPathForSession(sessionId);
446016
446060
  const fgContent = events2.map((e) => jsonStringify(e.payload) + `
446017
446061
  `).join("");
446018
- await writeFile59(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
446062
+ await writeFile58(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
446019
446063
  logForDebugging(`Hydrated ${events2.length} foreground entries from CCR v2 internal events`);
446020
446064
  let subagentEventCount = 0;
446021
446065
  const subagentReader = project2.getInternalSubagentEventReader();
@@ -446037,10 +446081,10 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
446037
446081
  }
446038
446082
  for (const [agentId, entries] of byAgent) {
446039
446083
  const agentFile = getAgentTranscriptPath(asAgentId(agentId));
446040
- await mkdir57(dirname53(agentFile), { recursive: true, mode: 448 });
446084
+ await mkdir56(dirname53(agentFile), { recursive: true, mode: 448 });
446041
446085
  const agentContent = entries.map((p) => jsonStringify(p) + `
446042
446086
  `).join("");
446043
- await writeFile59(agentFile, agentContent, {
446087
+ await writeFile58(agentFile, agentContent, {
446044
446088
  encoding: "utf8",
446045
446089
  mode: 384
446046
446090
  });
@@ -448002,7 +448046,7 @@ var init_sessionStorage = __esm(() => {
448002
448046
  init_settings2();
448003
448047
  init_slowOperations();
448004
448048
  init_uuid();
448005
- VERSION6 = typeof MACRO !== "undefined" ? "1.8.4" : "unknown";
448049
+ VERSION6 = typeof MACRO !== "undefined" ? "1.8.5" : "unknown";
448006
448050
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
448007
448051
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
448008
448052
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -449203,7 +449247,7 @@ var init_filesystem = __esm(() => {
449203
449247
  });
449204
449248
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
449205
449249
  const nonce = randomBytes20(16).toString("hex");
449206
- return join151(getClaudeTempDir(), "bundled-skills", "1.8.4", nonce);
449250
+ return join151(getClaudeTempDir(), "bundled-skills", "1.8.5", nonce);
449207
449251
  });
449208
449252
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
449209
449253
  });
@@ -449211,7 +449255,7 @@ var init_filesystem = __esm(() => {
449211
449255
  // src/utils/task/diskOutput.ts
449212
449256
  import { constants as fsConstants6 } from "fs";
449213
449257
  import {
449214
- mkdir as mkdir58,
449258
+ mkdir as mkdir57,
449215
449259
  open as open16,
449216
449260
  stat as stat50,
449217
449261
  symlink as symlink4,
@@ -449225,7 +449269,7 @@ function getTaskOutputDir() {
449225
449269
  return _taskOutputDir;
449226
449270
  }
449227
449271
  async function ensureOutputDir() {
449228
- await mkdir58(getTaskOutputDir(), { recursive: true });
449272
+ await mkdir57(getTaskOutputDir(), { recursive: true });
449229
449273
  }
449230
449274
  function getTaskOutputPath(taskId) {
449231
449275
  return join152(getTaskOutputDir(), `${taskId}.output`);
@@ -453487,7 +453531,7 @@ __export(exports_worktree, {
453487
453531
  import { spawnSync as spawnSync9 } from "child_process";
453488
453532
  import {
453489
453533
  copyFile as copyFile10,
453490
- mkdir as mkdir59,
453534
+ mkdir as mkdir58,
453491
453535
  readdir as readdir37,
453492
453536
  readFile as readFile66,
453493
453537
  stat as stat52,
@@ -453509,7 +453553,7 @@ function validateWorktreeSlug(slug) {
453509
453553
  }
453510
453554
  }
453511
453555
  async function mkdirRecursive(dirPath) {
453512
- await mkdir59(dirPath, { recursive: true });
453556
+ await mkdir58(dirPath, { recursive: true });
453513
453557
  }
453514
453558
  async function symlinkDirectories(repoRootPath, worktreePath, dirsToSymlink) {
453515
453559
  for (const dir of dirsToSymlink) {
@@ -453565,7 +453609,7 @@ async function getOrCreateWorktree(repoRoot, slug, options) {
453565
453609
  existed: true
453566
453610
  };
453567
453611
  }
453568
- await mkdir59(worktreesDir(repoRoot), { recursive: true });
453612
+ await mkdir58(worktreesDir(repoRoot), { recursive: true });
453569
453613
  const fetchEnv = { ...process.env, ...GIT_NO_PROMPT_ENV2 };
453570
453614
  let baseBranch;
453571
453615
  let baseSha = null;
@@ -453690,7 +453734,7 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
453690
453734
  const srcPath = join153(repoRoot, relativePath2);
453691
453735
  const destPath = join153(worktreePath, relativePath2);
453692
453736
  try {
453693
- await mkdir59(dirname54(destPath), { recursive: true });
453737
+ await mkdir58(dirname54(destPath), { recursive: true });
453694
453738
  await copyFile10(srcPath, destPath);
453695
453739
  copied.push(relativePath2);
453696
453740
  } catch (e) {
@@ -456869,7 +456913,7 @@ __export(exports_upstreamproxy, {
456869
456913
  getUpstreamProxyEnv: () => getUpstreamProxyEnv,
456870
456914
  SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
456871
456915
  });
456872
- import { mkdir as mkdir60, readFile as readFile67, unlink as unlink24, writeFile as writeFile60 } from "fs/promises";
456916
+ import { mkdir as mkdir59, readFile as readFile67, unlink as unlink24, writeFile as writeFile59 } from "fs/promises";
456873
456917
  import { homedir as homedir36 } from "os";
456874
456918
  import { join as join154 } from "path";
456875
456919
  async function initUpstreamProxy(opts) {
@@ -456992,8 +457036,8 @@ async function downloadCaBundle(baseUrl, systemCaPath, outPath) {
456992
457036
  }
456993
457037
  const ccrCa = await resp.text();
456994
457038
  const systemCa = await readFile67(systemCaPath, "utf8").catch(() => "");
456995
- await mkdir60(join154(outPath, ".."), { recursive: true });
456996
- await writeFile60(outPath, systemCa + `
457039
+ await mkdir59(join154(outPath, ".."), { recursive: true });
457040
+ await writeFile59(outPath, systemCa + `
456997
457041
  ` + ccrCa, "utf8");
456998
457042
  return true;
456999
457043
  } catch (err2) {
@@ -458440,7 +458484,7 @@ function buildSystemInitMessage(inputs) {
458440
458484
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
458441
458485
  apiKeySource: getAnthropicApiKeyWithSource().source,
458442
458486
  betas: getSdkBetas(),
458443
- claude_code_version: "1.8.4",
458487
+ claude_code_version: "1.8.5",
458444
458488
  output_style: outputStyle2,
458445
458489
  agents: inputs.agents.map((agent) => agent.agentType),
458446
458490
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -472597,7 +472641,7 @@ var init_useVoiceEnabled = __esm(() => {
472597
472641
  function getSemverPart(version2) {
472598
472642
  return `${import_semver10.major(version2, { loose: true })}.${import_semver10.minor(version2, { loose: true })}.${import_semver10.patch(version2, { loose: true })}`;
472599
472643
  }
472600
- function useUpdateNotification(updatedVersion, initialVersion = "1.8.4") {
472644
+ function useUpdateNotification(updatedVersion, initialVersion = "1.8.5") {
472601
472645
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react214.useState(() => getSemverPart(initialVersion));
472602
472646
  if (!updatedVersion) {
472603
472647
  return null;
@@ -472637,7 +472681,7 @@ function AutoUpdater({
472637
472681
  return;
472638
472682
  }
472639
472683
  if (false) {}
472640
- const currentVersion = "1.8.4";
472684
+ const currentVersion = "1.8.5";
472641
472685
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
472642
472686
  let latestVersion = await getLatestVersion(channel);
472643
472687
  const isDisabled = isAutoUpdaterDisabled();
@@ -472848,12 +472892,12 @@ function NativeAutoUpdater({
472848
472892
  logEvent("tengu_native_auto_updater_start", {});
472849
472893
  try {
472850
472894
  const maxVersion = await getMaxVersion();
472851
- if (maxVersion && gt("1.8.4", maxVersion)) {
472895
+ if (maxVersion && gt("1.8.5", maxVersion)) {
472852
472896
  const msg = await getMaxVersionMessage();
472853
472897
  setMaxVersionIssue(msg ?? "affects your version");
472854
472898
  }
472855
472899
  const result = await installLatest(channel);
472856
- const currentVersion = "1.8.4";
472900
+ const currentVersion = "1.8.5";
472857
472901
  const latencyMs = Date.now() - startTime;
472858
472902
  if (result.lockFailed) {
472859
472903
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -472988,17 +473032,17 @@ function PackageManagerAutoUpdater(t0) {
472988
473032
  const maxVersion = await getMaxVersion();
472989
473033
  if (maxVersion && latest && gt(latest, maxVersion)) {
472990
473034
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
472991
- if (gte("1.8.4", maxVersion)) {
472992
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.8.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
473035
+ if (gte("1.8.5", maxVersion)) {
473036
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.8.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
472993
473037
  setUpdateAvailable(false);
472994
473038
  return;
472995
473039
  }
472996
473040
  latest = maxVersion;
472997
473041
  }
472998
- const hasUpdate = latest && !gte("1.8.4", latest) && !shouldSkipVersion(latest);
473042
+ const hasUpdate = latest && !gte("1.8.5", latest) && !shouldSkipVersion(latest);
472999
473043
  setUpdateAvailable(!!hasUpdate);
473000
473044
  if (hasUpdate) {
473001
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.8.4"} -> ${latest}`);
473045
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.8.5"} -> ${latest}`);
473002
473046
  }
473003
473047
  };
473004
473048
  $2[0] = t1;
@@ -473032,7 +473076,7 @@ function PackageManagerAutoUpdater(t0) {
473032
473076
  wrap: "truncate",
473033
473077
  children: [
473034
473078
  "currentVersion: ",
473035
- "1.8.4"
473079
+ "1.8.5"
473036
473080
  ]
473037
473081
  }, undefined, true, undefined, this);
473038
473082
  $2[3] = verbose;
@@ -480592,7 +480636,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
480592
480636
  project_dir: getOriginalCwd(),
480593
480637
  added_dirs: addedDirs
480594
480638
  },
480595
- version: "1.8.4",
480639
+ version: "1.8.5",
480596
480640
  output_style: {
480597
480641
  name: outputStyleName
480598
480642
  },
@@ -486960,8 +487004,8 @@ async function cleanupOldFilesInDirectory(dirPath, cutoffDate, isMessagePath) {
486960
487004
  const files2 = await getFsImplementation().readdir(dirPath);
486961
487005
  for (const file of files2) {
486962
487006
  try {
486963
- const timestamp4 = convertFileNameToDate(file.name);
486964
- if (timestamp4 < cutoffDate) {
487007
+ const timestamp3 = convertFileNameToDate(file.name);
487008
+ if (timestamp3 < cutoffDate) {
486965
487009
  await getFsImplementation().unlink(join156(dirPath, file.name));
486966
487010
  if (isMessagePath) {
486967
487011
  result.messages++;
@@ -492164,7 +492208,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
492164
492208
  } catch {}
492165
492209
  const data = {
492166
492210
  trigger,
492167
- version: "1.8.4",
492211
+ version: "1.8.5",
492168
492212
  platform: process.platform,
492169
492213
  transcript,
492170
492214
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -492319,21 +492363,21 @@ function useFeedbackSurvey(messages, isLoading, submitCount, surveyType = "sessi
492319
492363
  messagesRef.current = messages;
492320
492364
  const probabilityPassedRef = import_react280.useRef(false);
492321
492365
  const lastEligibleSubmitCountRef = import_react280.useRef(null);
492322
- const updateLastShownTime = import_react280.useCallback((timestamp4, submitCountValue) => {
492366
+ const updateLastShownTime = import_react280.useCallback((timestamp3, submitCountValue) => {
492323
492367
  setFeedbackSurvey((prev) => {
492324
- if (prev.timeLastShown === timestamp4 && prev.submitCountAtLastAppearance === submitCountValue) {
492368
+ if (prev.timeLastShown === timestamp3 && prev.submitCountAtLastAppearance === submitCountValue) {
492325
492369
  return prev;
492326
492370
  }
492327
492371
  return {
492328
- timeLastShown: timestamp4,
492372
+ timeLastShown: timestamp3,
492329
492373
  submitCountAtLastAppearance: submitCountValue
492330
492374
  };
492331
492375
  });
492332
- if (getGlobalConfig().feedbackSurveyState?.lastShownTime !== timestamp4) {
492376
+ if (getGlobalConfig().feedbackSurveyState?.lastShownTime !== timestamp3) {
492333
492377
  saveGlobalConfig((current) => ({
492334
492378
  ...current,
492335
492379
  feedbackSurveyState: {
492336
- lastShownTime: timestamp4
492380
+ lastShownTime: timestamp3
492337
492381
  }
492338
492382
  }));
492339
492383
  }
@@ -499729,7 +499773,7 @@ __export(exports_REPL, {
499729
499773
  });
499730
499774
  import { dirname as dirname57, join as join162 } from "path";
499731
499775
  import { tmpdir as tmpdir11 } from "os";
499732
- import { writeFile as writeFile62 } from "fs/promises";
499776
+ import { writeFile as writeFile61 } from "fs/promises";
499733
499777
  import { randomUUID as randomUUID46 } from "crypto";
499734
499778
  function TranscriptModeFooter(t0) {
499735
499779
  const $2 = c3(9);
@@ -502298,7 +502342,7 @@ Note: ctrl + z now suspends localclawd, ctrl + _ undoes input.
502298
502342
  const raw = await renderMessagesToPlainText(deferredMessages, tools, w2);
502299
502343
  const text = raw.replace(/[ \t]+$/gm, "");
502300
502344
  const path17 = join162(tmpdir11(), `cc-transcript-${Date.now()}.txt`);
502301
- await writeFile62(path17, text);
502345
+ await writeFile61(path17, text);
502302
502346
  const opened = openFileInExternalEditor(path17);
502303
502347
  setStatus(opened ? `opening ${path17}` : `wrote ${path17} · no $VISUAL/$EDITOR set`);
502304
502348
  } catch (e) {
@@ -509073,7 +509117,7 @@ function appendToLog(path17, message) {
509073
509117
  cwd: getFsImplementation().cwd(),
509074
509118
  userType: process.env.USER_TYPE,
509075
509119
  sessionId: getSessionId(),
509076
- version: "1.8.4"
509120
+ version: "1.8.5"
509077
509121
  };
509078
509122
  getLogWriter(path17).write(messageWithTimestamp);
509079
509123
  }
@@ -509172,7 +509216,7 @@ var init_sinks = __esm(() => {
509172
509216
  });
509173
509217
 
509174
509218
  // src/services/SessionMemory/sessionMemory.ts
509175
- import { writeFile as writeFile63 } from "fs/promises";
509219
+ import { writeFile as writeFile62 } from "fs/promises";
509176
509220
  function isSessionMemoryGateEnabled() {
509177
509221
  if (isEnvTruthy(process.env.ENABLE_CLAUDE_CODE_SESSION_MEMORY)) {
509178
509222
  return true;
@@ -509235,13 +509279,13 @@ async function setupSessionMemoryFile(toolUseContext) {
509235
509279
  await fs6.mkdir(sessionMemoryDir, { mode: 448 });
509236
509280
  const memoryPath = getSessionMemoryPath();
509237
509281
  try {
509238
- await writeFile63(memoryPath, "", {
509282
+ await writeFile62(memoryPath, "", {
509239
509283
  encoding: "utf-8",
509240
509284
  mode: 384,
509241
509285
  flag: "wx"
509242
509286
  });
509243
509287
  const template = await loadSessionMemoryTemplate();
509244
- await writeFile63(memoryPath, template, {
509288
+ await writeFile62(memoryPath, template, {
509245
509289
  encoding: "utf-8",
509246
509290
  mode: 384
509247
509291
  });
@@ -512790,7 +512834,7 @@ var init_idleTimeout = __esm(() => {
512790
512834
 
512791
512835
  // src/bridge/inboundAttachments.ts
512792
512836
  import { randomUUID as randomUUID49 } from "crypto";
512793
- import { mkdir as mkdir61, writeFile as writeFile64 } from "fs/promises";
512837
+ import { mkdir as mkdir60, writeFile as writeFile63 } from "fs/promises";
512794
512838
  import { basename as basename57, join as join165 } from "path";
512795
512839
  import { z as z95 } from "zod/v4";
512796
512840
  function debug3(msg) {
@@ -512839,8 +512883,8 @@ async function resolveOne(att) {
512839
512883
  const dir = uploadsDir();
512840
512884
  const outPath = join165(dir, `${prefix}-${safeName}`);
512841
512885
  try {
512842
- await mkdir61(dir, { recursive: true });
512843
- await writeFile64(outPath, data);
512886
+ await mkdir60(dir, { recursive: true });
512887
+ await writeFile63(outPath, data);
512844
512888
  } catch (e) {
512845
512889
  debug3(`write ${outPath} failed: ${e}`);
512846
512890
  return;
@@ -513097,8 +513141,8 @@ async function getEnvLessBridgeConfig() {
513097
513141
  }
513098
513142
  async function checkEnvLessBridgeMinVersion() {
513099
513143
  const cfg = await getEnvLessBridgeConfig();
513100
- if (cfg.min_version && lt("1.8.4", cfg.min_version)) {
513101
- return `Your version of localclawd (${"1.8.4"}) is too old for Remote Control.
513144
+ if (cfg.min_version && lt("1.8.5", cfg.min_version)) {
513145
+ return `Your version of localclawd (${"1.8.5"}) is too old for Remote Control.
513102
513146
  Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
513103
513147
  }
513104
513148
  return null;
@@ -513423,7 +513467,7 @@ __export(exports_bridgePointer, {
513423
513467
  clearBridgePointer: () => clearBridgePointer,
513424
513468
  BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
513425
513469
  });
513426
- import { mkdir as mkdir62, readFile as readFile70, stat as stat57, unlink as unlink25, writeFile as writeFile65 } from "fs/promises";
513470
+ import { mkdir as mkdir61, readFile as readFile70, stat as stat57, unlink as unlink25, writeFile as writeFile64 } from "fs/promises";
513427
513471
  import { dirname as dirname60, join as join167 } from "path";
513428
513472
  import { z as z97 } from "zod/v4";
513429
513473
  function getBridgePointerPath(dir) {
@@ -513432,8 +513476,8 @@ function getBridgePointerPath(dir) {
513432
513476
  async function writeBridgePointer(dir, pointer) {
513433
513477
  const path17 = getBridgePointerPath(dir);
513434
513478
  try {
513435
- await mkdir62(dirname60(path17), { recursive: true });
513436
- await writeFile65(path17, jsonStringify(pointer), "utf8");
513479
+ await mkdir61(dirname60(path17), { recursive: true });
513480
+ await writeFile64(path17, jsonStringify(pointer), "utf8");
513437
513481
  logForDebugging(`[bridge:pointer] wrote ${path17}`);
513438
513482
  } catch (err2) {
513439
513483
  logForDebugging(`[bridge:pointer] write failed: ${err2}`, { level: "warn" });
@@ -513570,7 +513614,7 @@ async function initBridgeCore(params) {
513570
513614
  const rawApi = createBridgeApiClient({
513571
513615
  baseUrl,
513572
513616
  getAccessToken,
513573
- runnerVersion: "1.8.4",
513617
+ runnerVersion: "1.8.5",
513574
513618
  onDebug: logForDebugging,
513575
513619
  onAuth401,
513576
513620
  getTrustedDeviceToken
@@ -519289,7 +519333,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
519289
519333
  setCwd(cwd3);
519290
519334
  const server = new Server({
519291
519335
  name: "claude/tengu",
519292
- version: "1.8.4"
519336
+ version: "1.8.5"
519293
519337
  }, {
519294
519338
  capabilities: {
519295
519339
  tools: {}
@@ -520370,7 +520414,7 @@ function WelcomeLogo() {
520370
520414
  dimColor: true,
520371
520415
  children: [
520372
520416
  "v",
520373
- "1.8.4"
520417
+ "1.8.5"
520374
520418
  ]
520375
520419
  }, undefined, true, undefined, this)
520376
520420
  ]
@@ -520561,7 +520605,7 @@ __export(exports_update, {
520561
520605
  });
520562
520606
  async function update() {
520563
520607
  logEvent("tengu_update_check", {});
520564
- writeToStdout(`Current version: ${"1.8.4"}
520608
+ writeToStdout(`Current version: ${"1.8.5"}
520565
520609
  `);
520566
520610
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
520567
520611
  writeToStdout(`Checking for updates to ${channel} version...
@@ -520636,8 +520680,8 @@ async function update() {
520636
520680
  writeToStdout(`localclawd is managed by Homebrew.
520637
520681
  `);
520638
520682
  const latest = await getLatestVersion(channel);
520639
- if (latest && !gte("1.8.4", latest)) {
520640
- writeToStdout(`Update available: ${"1.8.4"} → ${latest}
520683
+ if (latest && !gte("1.8.5", latest)) {
520684
+ writeToStdout(`Update available: ${"1.8.5"} → ${latest}
520641
520685
  `);
520642
520686
  writeToStdout(`
520643
520687
  `);
@@ -520653,8 +520697,8 @@ async function update() {
520653
520697
  writeToStdout(`localclawd is managed by winget.
520654
520698
  `);
520655
520699
  const latest = await getLatestVersion(channel);
520656
- if (latest && !gte("1.8.4", latest)) {
520657
- writeToStdout(`Update available: ${"1.8.4"} → ${latest}
520700
+ if (latest && !gte("1.8.5", latest)) {
520701
+ writeToStdout(`Update available: ${"1.8.5"} → ${latest}
520658
520702
  `);
520659
520703
  writeToStdout(`
520660
520704
  `);
@@ -520668,8 +520712,8 @@ async function update() {
520668
520712
  writeToStdout(`localclawd is managed by apk.
520669
520713
  `);
520670
520714
  const latest = await getLatestVersion(channel);
520671
- if (latest && !gte("1.8.4", latest)) {
520672
- writeToStdout(`Update available: ${"1.8.4"} → ${latest}
520715
+ if (latest && !gte("1.8.5", latest)) {
520716
+ writeToStdout(`Update available: ${"1.8.5"} → ${latest}
520673
520717
  `);
520674
520718
  writeToStdout(`
520675
520719
  `);
@@ -520734,11 +520778,11 @@ async function update() {
520734
520778
  `);
520735
520779
  await gracefulShutdown(1);
520736
520780
  }
520737
- if (result.latestVersion === "1.8.4") {
520738
- writeToStdout(source_default.green(`localclawd is up to date (${"1.8.4"})`) + `
520781
+ if (result.latestVersion === "1.8.5") {
520782
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.8.5"})`) + `
520739
520783
  `);
520740
520784
  } else {
520741
- writeToStdout(source_default.green(`Successfully updated from ${"1.8.4"} to version ${result.latestVersion}`) + `
520785
+ writeToStdout(source_default.green(`Successfully updated from ${"1.8.5"} to version ${result.latestVersion}`) + `
520742
520786
  `);
520743
520787
  await regenerateCompletionCache();
520744
520788
  }
@@ -520798,12 +520842,12 @@ async function update() {
520798
520842
  `);
520799
520843
  await gracefulShutdown(1);
520800
520844
  }
520801
- if (latestVersion === "1.8.4") {
520802
- writeToStdout(source_default.green(`localclawd is up to date (${"1.8.4"})`) + `
520845
+ if (latestVersion === "1.8.5") {
520846
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.8.5"})`) + `
520803
520847
  `);
520804
520848
  await gracefulShutdown(0);
520805
520849
  }
520806
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.8.4"})
520850
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.8.5"})
520807
520851
  `);
520808
520852
  writeToStdout(`Installing update...
520809
520853
  `);
@@ -520848,7 +520892,7 @@ async function update() {
520848
520892
  logForDebugging(`update: Installation status: ${status2}`);
520849
520893
  switch (status2) {
520850
520894
  case "success":
520851
- writeToStdout(source_default.green(`Successfully updated from ${"1.8.4"} to version ${latestVersion}`) + `
520895
+ writeToStdout(source_default.green(`Successfully updated from ${"1.8.5"} to version ${latestVersion}`) + `
520852
520896
  `);
520853
520897
  await regenerateCompletionCache();
520854
520898
  break;
@@ -522090,7 +522134,7 @@ Run with --debug for more details.
522090
522134
  }
522091
522135
  }
522092
522136
  logForDiagnosticsNoPII("info", "started", {
522093
- version: "1.8.4",
522137
+ version: "1.8.5",
522094
522138
  is_native_binary: isInBundledMode()
522095
522139
  });
522096
522140
  registerCleanup(async () => {
@@ -522874,7 +522918,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
522874
522918
  pendingHookMessages
522875
522919
  }, renderAndRun);
522876
522920
  }
522877
- }).version("1.8.4 (localclawd)", "-v, --version", "Output the version number");
522921
+ }).version("1.8.5 (localclawd)", "-v, --version", "Output the version number");
522878
522922
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
522879
522923
  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
522924
  if (canUserConfigureAdvisor()) {
@@ -523388,7 +523432,7 @@ if (false) {}
523388
523432
  async function main2() {
523389
523433
  const args = process.argv.slice(2);
523390
523434
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
523391
- console.log(`${"1.8.4"} (localclawd)`);
523435
+ console.log(`${"1.8.5"} (localclawd)`);
523392
523436
  return;
523393
523437
  }
523394
523438
  const {
@@ -523471,4 +523515,4 @@ localclawd crashed: ${msg}
523471
523515
  process.exit(1);
523472
523516
  });
523473
523517
 
523474
- //# debugId=3BB4E5936E6C9C2664756E2164756E21
523518
+ //# debugId=58FEFA6FA3268BCE64756E2164756E21