localclawd 1.7.9 → 1.8.1

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 +696 -661
  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.7.9"}`;
87611
+ return `claude-code/${"1.8.1"}`;
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.7.9"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
87633
+ return `claude-cli/${"1.8.1"} (${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.7.9"}${suffix}`;
87647
+ return `claude-code/${"1.8.1"}${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.7.9"}.${fingerprint}`;
130843
+ const version = `${"1.8.1"}.${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.7.9".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
147032
+ const match = "1.8.1".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.7.9",
147072
+ version: "1.8.1",
147073
147073
  versionBase: getVersionBase(),
147074
- buildTime: "2026-05-07T15:08:19.360Z",
147074
+ buildTime: "2026-05-07T15:19:47.253Z",
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.7.9";
179650
+ attributes["app.version"] = "1.8.1";
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.7.9";
242451
+ return "1.8.1";
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.7.9",
247725
+ version: "1.8.1",
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.7.9",
248067
+ version: "1.8.1",
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.7.9");
262469
+ return computeFingerprint(firstMessageText, "1.8.1");
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.7.9");
262511
+ const fingerprint = computeFingerprint(messageText, "1.8.1");
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.7.9",
283259
+ appVersion: "1.8.1",
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.7.9");
284324
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.1");
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.7.9"
284364
+ [ATTR_SERVICE_VERSION4]: "1.8.1"
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.7.9");
284409
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.8.1");
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.7.9");
284429
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.8.1");
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.7.9");
284491
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.8.1");
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.7.9" : "unknown";
285681
+ const version = typeof MACRO !== "undefined" ? "1.8.1" : "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.7.9", maxVersion)) {
286623
- logForDebugging(`Native installer: current version ${"1.7.9"} is already at or above maxVersion ${maxVersion}, skipping update`);
286622
+ if (gte("1.8.1", maxVersion)) {
286623
+ logForDebugging(`Native installer: current version ${"1.8.1"} 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.7.9" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
286634
+ if (!forceReinstall && version === "1.8.1" && 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,
@@ -323042,9 +323042,17 @@ var init_imagePipeline = __esm(() => {
323042
323042
  });
323043
323043
 
323044
323044
  // src/tools/GenerateImageTool/prompt.ts
323045
- var GENERATE_IMAGE_TOOL_NAME = "GenerateImage", DESCRIPTION13 = `Generate an image using a local ComfyUI backend and save it to ~/generatedimages/.
323045
+ var GENERATE_IMAGE_TOOL_NAME = "GenerateImage", DESCRIPTION13 = `Generate an image using a local ComfyUI backend.
323046
323046
 
323047
- Auto-detects ComfyUI at http://127.0.0.1:8188. Falls back to the backendUrl set in the project's .localclawd/image-pipeline/config.json when present.
323047
+ Backend resolution order:
323048
+ 1. http://127.0.0.1:8188 (localhost default)
323049
+ 2. backendUrl in .localclawd/image-pipeline/config.json (set via /image-pipeline config <url>)
323050
+
323051
+ Output directory:
323052
+ - .localclawd/image-pipeline/generated/ when the pipeline is scaffolded (run /image-pipeline setup)
323053
+ - ~/generatedimages/ otherwise
323054
+
323055
+ If ComfyUI is not reachable, ask the user to run /image-pipeline config <url> with their ComfyUI address.
323048
323056
 
323049
323057
  After generating, the image is returned visually in the tool result so you can review it.
323050
323058
 
@@ -323088,7 +323096,7 @@ var init_UI20 = __esm(() => {
323088
323096
  // src/tools/GenerateImageTool/GenerateImageTool.ts
323089
323097
  import { z as z62 } from "zod/v4";
323090
323098
  import { homedir as homedir23 } from "os";
323091
- import { mkdir as mkdir20, readFile as readFile27, writeFile as writeFile20 } from "fs/promises";
323099
+ import { access as access6, mkdir as mkdir20, readFile as readFile27, writeFile as writeFile20 } from "fs/promises";
323092
323100
  import { join as join80 } from "path";
323093
323101
  function slugify(text, maxLen = 40) {
323094
323102
  return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, maxLen);
@@ -323260,7 +323268,9 @@ var init_GenerateImageTool = __esm(() => {
323260
323268
  rawBytes = Buffer.from(await res.arrayBuffer());
323261
323269
  }
323262
323270
  } catch {}
323263
- const outputDir = join80(homedir23(), "generatedimages");
323271
+ const projectGenDir = join80(getCwd(), ".localclawd", "image-pipeline", "generated");
323272
+ const useProjectDir = await access6(projectGenDir).then(() => true).catch(() => false);
323273
+ const outputDir = useProjectDir ? projectGenDir : join80(homedir23(), "generatedimages");
323264
323274
  await mkdir20(outputDir, { recursive: true });
323265
323275
  const outName = `${timestamp()}_${slugify(input.prompt)}.png`;
323266
323276
  const savedPath = join80(outputDir, outName);
@@ -331760,7 +331770,7 @@ function getAnthropicEnvMetadata() {
331760
331770
  function getBuildAgeMinutes() {
331761
331771
  if (false)
331762
331772
  ;
331763
- const buildTime = new Date("2026-05-07T15:08:19.360Z").getTime();
331773
+ const buildTime = new Date("2026-05-07T15:19:47.253Z").getTime();
331764
331774
  if (isNaN(buildTime))
331765
331775
  return;
331766
331776
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -360590,7 +360600,7 @@ function Feedback({
360590
360600
  platform: env3.platform,
360591
360601
  gitRepo: envInfo.isGit,
360592
360602
  terminal: env3.terminal,
360593
- version: "1.7.9",
360603
+ version: "1.8.1",
360594
360604
  transcript: normalizeMessagesForAPI(messages),
360595
360605
  errors: sanitizedErrors,
360596
360606
  lastApiRequest: getLastAPIRequest(),
@@ -360782,7 +360792,7 @@ function Feedback({
360782
360792
  ", ",
360783
360793
  env3.terminal,
360784
360794
  ", v",
360785
- "1.7.9"
360795
+ "1.8.1"
360786
360796
  ]
360787
360797
  }, undefined, true, undefined, this)
360788
360798
  ]
@@ -360888,7 +360898,7 @@ ${sanitizedDescription}
360888
360898
  ` + `**Environment Info**
360889
360899
  ` + `- Platform: ${env3.platform}
360890
360900
  ` + `- Terminal: ${env3.terminal}
360891
- ` + `- Version: ${"1.7.9"}
360901
+ ` + `- Version: ${"1.8.1"}
360892
360902
  ` + `- Feedback ID: ${feedbackId}
360893
360903
  ` + `
360894
360904
  **Errors**
@@ -363516,7 +363526,7 @@ function buildPrimarySection() {
363516
363526
  }, undefined, false, undefined, this);
363517
363527
  return [{
363518
363528
  label: "Version",
363519
- value: "1.7.9"
363529
+ value: "1.8.1"
363520
363530
  }, {
363521
363531
  label: "Session name",
363522
363532
  value: nameValue
@@ -368197,7 +368207,7 @@ function Config({
368197
368207
  }
368198
368208
  }, undefined, false, undefined, this)
368199
368209
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
368200
- currentVersion: "1.7.9",
368210
+ currentVersion: "1.8.1",
368201
368211
  onChoice: (choice) => {
368202
368212
  setShowSubmenu(null);
368203
368213
  setTabsHidden(false);
@@ -368209,7 +368219,7 @@ function Config({
368209
368219
  autoUpdatesChannel: "stable"
368210
368220
  };
368211
368221
  if (choice === "stay") {
368212
- newSettings.minimumVersion = "1.7.9";
368222
+ newSettings.minimumVersion = "1.8.1";
368213
368223
  }
368214
368224
  updateSettingsForSource("userSettings", newSettings);
368215
368225
  setSettingsData((prev_27) => ({
@@ -374730,7 +374740,9 @@ var exports_image_pipeline = {};
374730
374740
  __export(exports_image_pipeline, {
374731
374741
  call: () => call20
374732
374742
  });
374733
- function Banner({
374743
+ import { mkdir as mkdir35, writeFile as writeFile37 } from "fs/promises";
374744
+ import { join as join113 } from "path";
374745
+ function PipelineCard({
374734
374746
  title,
374735
374747
  lines,
374736
374748
  color: color3,
@@ -374750,88 +374762,189 @@ function Banner({
374750
374762
  children: title
374751
374763
  }, undefined, false, undefined, this),
374752
374764
  lines.map((line, i2) => /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(ThemedText, {
374753
- dimColor: i2 > 0,
374765
+ dimColor: line === "",
374754
374766
  children: line
374755
374767
  }, i2, false, undefined, this))
374756
374768
  ]
374757
374769
  }, undefined, true, undefined, this);
374758
374770
  }
374759
- async function showStatus(onDone, projectRoot) {
374760
- const config2 = await loadConfig(projectRoot);
374761
- const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374762
- const active = await detectComfyUI(backendUrl);
374763
- let urlToUse = backendUrl;
374764
- let autoDetected = false;
374765
- if (!active && backendUrl !== DEFAULT_COMFYUI_URL) {
374766
- const localActive = await detectComfyUI(DEFAULT_COMFYUI_URL);
374767
- if (localActive) {
374768
- urlToUse = DEFAULT_COMFYUI_URL;
374769
- autoDetected = true;
374770
- }
374771
- }
374772
- const prompts = await listPrompts(projectRoot);
374773
- const workflows = await listWorkflows(projectRoot);
374774
- const statusLine = active || autoDetected ? `● ComfyUI active at ${urlToUse}` : `○ ComfyUI not found at ${urlToUse}`;
374775
- const lines = [
374776
- statusLine,
374777
- ` Config: .localclawd/image-pipeline/config.json${config2 ? "" : " (not scaffolded)"}`,
374778
- ` Prompts: ${prompts.length} template${prompts.length !== 1 ? "s" : ""} | Workflows: ${workflows.length}`,
374779
- "",
374780
- " Commands:",
374781
- " /image-pipeline setup — scaffold project dirs",
374782
- " /image-pipeline generate <prompt> — submit to ComfyUI",
374783
- " /image-pipeline list — list templates",
374784
- " /image-pipeline config <url> — set backend URL"
374785
- ];
374786
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374787
- title: "◆ Image Pipeline",
374788
- lines,
374789
- color: active || autoDetected ? "green" : "yellow",
374790
- onReady: () => onDone(undefined)
374791
- }, undefined, false, undefined, this);
374771
+ function timestamp3() {
374772
+ const d = new Date;
374773
+ const pad = (n) => String(n).padStart(2, "0");
374774
+ return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}_${pad(d.getHours())}-${pad(d.getMinutes())}-${pad(d.getSeconds())}`;
374775
+ }
374776
+ function slugify3(text, maxLen = 40) {
374777
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, maxLen);
374778
+ }
374779
+ async function pickBackend(config2) {
374780
+ const configured = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374781
+ if (await detectComfyUI(DEFAULT_COMFYUI_URL))
374782
+ return DEFAULT_COMFYUI_URL;
374783
+ if (configured !== DEFAULT_COMFYUI_URL && await detectComfyUI(configured))
374784
+ return configured;
374785
+ return null;
374792
374786
  }
374793
- async function runGenerate(onDone, projectRoot, prompt) {
374794
- if (!prompt.trim()) {
374795
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374787
+ var React59, jsx_dev_runtime197, call20 = async (onDone, _context, args) => {
374788
+ const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
374789
+ const projectRoot = getOriginalCwd2() ?? process.cwd();
374790
+ const rawArgs = args?.trim() ?? "";
374791
+ const [subcmd, ...rest] = rawArgs ? rawArgs.split(/\s+/) : [""];
374792
+ const restText = rest.join(" ").trim();
374793
+ if (!subcmd) {
374794
+ const config3 = await loadConfig(projectRoot);
374795
+ const backendUrl = config3?.backendUrl ?? DEFAULT_COMFYUI_URL;
374796
+ const active = await detectComfyUI(backendUrl);
374797
+ const prompts = await listPrompts(projectRoot);
374798
+ const workflows = await listWorkflows(projectRoot);
374799
+ const scaffolded = config3 !== null;
374800
+ const lines2 = [];
374801
+ if (active) {
374802
+ lines2.push(`● ComfyUI active at ${backendUrl}`);
374803
+ } else {
374804
+ lines2.push(`○ ComfyUI not found at ${backendUrl}`);
374805
+ lines2.push("");
374806
+ lines2.push(" To connect:");
374807
+ lines2.push(" /image-pipeline config http://<host>:8188");
374808
+ lines2.push(" Then scaffold the project:");
374809
+ lines2.push(" /image-pipeline setup");
374810
+ }
374811
+ if (scaffolded) {
374812
+ lines2.push(` Scaffold: .localclawd/image-pipeline/ (${prompts.length} prompts, ${workflows.length} workflows)`);
374813
+ lines2.push(` Output dir: .localclawd/image-pipeline/generated/`);
374814
+ } else if (active) {
374815
+ lines2.push(" Not scaffolded — run /image-pipeline setup");
374816
+ }
374817
+ lines2.push("");
374818
+ lines2.push(" /image-pipeline setup scaffold project dirs");
374819
+ lines2.push(" /image-pipeline generate <prompt> generate and save image");
374820
+ lines2.push(" /image-pipeline config <url> set ComfyUI URL");
374821
+ lines2.push(" /image-pipeline list list templates");
374822
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374823
+ title: "◆ Image Pipeline",
374824
+ lines: lines2,
374825
+ color: active ? "green" : "yellow",
374826
+ onReady: () => onDone(undefined)
374827
+ }, undefined, false, undefined, this);
374828
+ }
374829
+ if (subcmd === "setup") {
374830
+ const { created, alreadyExisted } = await scaffoldProject(projectRoot);
374831
+ const config3 = await loadConfig(projectRoot);
374832
+ const backendUrl = config3?.backendUrl ?? DEFAULT_COMFYUI_URL;
374833
+ const active = await detectComfyUI(backendUrl);
374834
+ const lines2 = [
374835
+ active ? `● ComfyUI active at ${backendUrl}` : `○ ComfyUI not detected at ${backendUrl}`,
374836
+ ""
374837
+ ];
374838
+ if (alreadyExisted) {
374839
+ lines2.push(" Pipeline already scaffolded.");
374840
+ } else {
374841
+ lines2.push(` Created ${created.length} files:`);
374842
+ for (const f of created)
374843
+ lines2.push(` + ${f}`);
374844
+ }
374845
+ if (!active) {
374846
+ lines2.push("", " To connect ComfyUI:", " /image-pipeline config http://<host>:8188");
374847
+ }
374848
+ lines2.push("", " Generated images will be saved to:", ` ${join113(projectRoot, ".localclawd", "image-pipeline", "generated")}`);
374849
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374850
+ title: "◆ Image Pipeline — Setup",
374851
+ lines: lines2,
374852
+ color: active ? "green" : "yellow",
374853
+ onReady: () => onDone(undefined)
374854
+ }, undefined, false, undefined, this);
374855
+ }
374856
+ if (subcmd === "config") {
374857
+ const newUrl = restText;
374858
+ if (!newUrl || !newUrl.startsWith("http")) {
374859
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374860
+ title: "◆ Image Pipeline — Config",
374861
+ lines: [" Usage: /image-pipeline config http://<host>:8188"],
374862
+ color: "yellow",
374863
+ onReady: () => onDone(undefined)
374864
+ }, undefined, false, undefined, this);
374865
+ }
374866
+ await scaffoldProject(projectRoot);
374867
+ const existing = await loadConfig(projectRoot) ?? {
374868
+ backendUrl: DEFAULT_COMFYUI_URL,
374869
+ defaultWidth: 512,
374870
+ defaultHeight: 512,
374871
+ defaultSteps: 20,
374872
+ defaultCfg: 7,
374873
+ defaultSampler: "euler",
374874
+ defaultModel: "",
374875
+ outputDir: ".localclawd/image-pipeline/generated"
374876
+ };
374877
+ existing.backendUrl = newUrl;
374878
+ await saveConfig2(projectRoot, existing);
374879
+ const active = await detectComfyUI(newUrl);
374880
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374881
+ title: "◆ Image Pipeline — Config Saved",
374882
+ lines: [
374883
+ ` Backend URL: ${newUrl}`,
374884
+ active ? " ● ComfyUI reachable" : " ○ ComfyUI not reachable (saved anyway)"
374885
+ ],
374886
+ color: active ? "green" : "yellow",
374887
+ onReady: () => onDone(undefined)
374888
+ }, undefined, false, undefined, this);
374889
+ }
374890
+ if (subcmd === "list") {
374891
+ const [prompts, workflows] = await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]);
374892
+ const lines2 = [];
374893
+ if (prompts.length === 0 && workflows.length === 0) {
374894
+ lines2.push(" No templates yet — run /image-pipeline setup");
374895
+ } else {
374896
+ if (prompts.length > 0) {
374897
+ lines2.push(" Prompt templates:");
374898
+ for (const p of prompts)
374899
+ lines2.push(` • prompts/${p}`);
374900
+ }
374901
+ if (workflows.length > 0) {
374902
+ lines2.push(" Workflows:");
374903
+ for (const w2 of workflows)
374904
+ lines2.push(` • workflows/${w2}`);
374905
+ }
374906
+ }
374907
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374908
+ title: "◆ Image Pipeline — Templates",
374909
+ lines: lines2,
374910
+ onReady: () => onDone(undefined)
374911
+ }, undefined, false, undefined, this);
374912
+ }
374913
+ const promptText = subcmd === "generate" || subcmd === "gen" ? restText : rawArgs;
374914
+ if (!promptText) {
374915
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374796
374916
  title: "◆ Image Pipeline — Generate",
374797
- lines: ["Usage: /image-pipeline generate <positive prompt>"],
374917
+ lines: [" Usage: /image-pipeline generate <prompt>"],
374798
374918
  color: "yellow",
374799
374919
  onReady: () => onDone(undefined)
374800
374920
  }, undefined, false, undefined, this);
374801
374921
  }
374802
374922
  const config2 = await loadConfig(projectRoot);
374803
- const backendUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374804
- let urlToUse = backendUrl;
374805
- const active = await detectComfyUI(backendUrl);
374806
- if (!active && backendUrl !== DEFAULT_COMFYUI_URL) {
374807
- if (await detectComfyUI(DEFAULT_COMFYUI_URL)) {
374808
- urlToUse = DEFAULT_COMFYUI_URL;
374809
- }
374810
- }
374811
- if (!await detectComfyUI(urlToUse)) {
374812
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374813
- title: "◆ Image Pipeline — Generate Failed",
374923
+ const backend = await pickBackend(config2);
374924
+ if (!backend) {
374925
+ const tried = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374926
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374927
+ title: "◆ Image Pipeline — No Backend",
374814
374928
  lines: [
374815
- `ComfyUI not reachable at ${urlToUse}`,
374816
- "Start ComfyUI or run /image-pipeline config <url> to set a remote backend."
374929
+ ` ComfyUI not reachable at ${tried}`,
374930
+ " Start ComfyUI or run: /image-pipeline config <url>"
374817
374931
  ],
374818
374932
  color: "red",
374819
374933
  onReady: () => onDone(undefined)
374820
374934
  }, undefined, false, undefined, this);
374821
374935
  }
374822
- const negativePrompt = config2 ? "" : "blurry, low quality, watermark";
374936
+ const model = config2?.defaultModel || "v1-5-pruned-emaonly.safetensors";
374823
374937
  const width = config2?.defaultWidth ?? 512;
374824
374938
  const height = config2?.defaultHeight ?? 512;
374825
374939
  const steps = config2?.defaultSteps ?? 20;
374826
374940
  const cfg = config2?.defaultCfg ?? 7;
374827
374941
  const sampler = config2?.defaultSampler ?? "euler";
374828
- const model = config2?.defaultModel || "v1-5-pruned-emaonly.safetensors";
374829
- const seed = Math.floor(Math.random() * 2 ** 32);
374942
+ const seed = Math.floor(Math.random() * 4294967296);
374830
374943
  const workflow = {
374831
374944
  "4": { class_type: "CheckpointLoaderSimple", inputs: { ckpt_name: model } },
374832
374945
  "5": { class_type: "EmptyLatentImage", inputs: { width, height, batch_size: 1 } },
374833
- "6": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: prompt } },
374834
- "7": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: negativePrompt } },
374946
+ "6": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: promptText } },
374947
+ "7": { class_type: "CLIPTextEncode", inputs: { clip: ["4", 1], text: "blurry, low quality, watermark, deformed" } },
374835
374948
  "3": {
374836
374949
  class_type: "KSampler",
374837
374950
  inputs: {
@@ -374852,137 +374965,59 @@ async function runGenerate(onDone, projectRoot, prompt) {
374852
374965
  };
374853
374966
  let queued;
374854
374967
  try {
374855
- queued = await queuePrompt(urlToUse, workflow);
374968
+ queued = await queuePrompt(backend, workflow);
374856
374969
  } catch (e) {
374857
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374970
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374858
374971
  title: "◆ Image Pipeline — Queue Error",
374859
- lines: [String(e)],
374972
+ lines: [` ${String(e)}`],
374860
374973
  color: "red",
374861
374974
  onReady: () => onDone(undefined)
374862
374975
  }, undefined, false, undefined, this);
374863
374976
  }
374864
- const result = await pollForCompletion(urlToUse, queued.prompt_id);
374865
- const images = result ? extractOutputImages(result) : [];
374866
- const lines = result ? [
374867
- `Job complete: ${queued.prompt_id}`,
374868
- `Output file${images.length !== 1 ? "s" : ""}: ${images.join(", ") || "(check ComfyUI output folder)"}`,
374869
- `Seed: ${seed} · ${steps} steps · ${width}×${height}`
374870
- ] : [
374871
- `Job queued: ${queued.prompt_id}`,
374872
- "Timed out waiting for completion — check ComfyUI directly.",
374873
- `URL: ${urlToUse}/history/${queued.prompt_id}`
374874
- ];
374875
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374876
- title: "◆ Image Pipeline — Generate",
374877
- lines,
374878
- color: result ? "green" : "yellow",
374879
- onReady: () => onDone(undefined)
374880
- }, undefined, false, undefined, this);
374881
- }
374882
- async function showList(onDone, projectRoot) {
374883
- const [prompts, workflows] = await Promise.all([listPrompts(projectRoot), listWorkflows(projectRoot)]);
374884
- const lines = [];
374885
- if (prompts.length === 0 && workflows.length === 0) {
374886
- lines.push("No templates yet. Run /image-pipeline setup to scaffold the project.");
374887
- } else {
374888
- if (prompts.length > 0) {
374889
- lines.push("Prompt templates:");
374890
- for (const p of prompts)
374891
- lines.push(` • prompts/${p}`);
374892
- }
374893
- if (workflows.length > 0) {
374894
- lines.push("Workflows:");
374895
- for (const w2 of workflows)
374896
- lines.push(` • workflows/${w2}`);
374897
- }
374898
- }
374899
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374900
- title: "◆ Image Pipeline — Templates",
374901
- lines,
374902
- onReady: () => onDone(undefined)
374903
- }, undefined, false, undefined, this);
374904
- }
374905
- async function updateConfig(onDone, projectRoot, newUrl) {
374906
- if (!newUrl.startsWith("http")) {
374907
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374908
- title: "◆ Image Pipeline — Config",
374909
- lines: ["Invalid URL. Example: /image-pipeline config http://192.168.1.50:8188"],
374977
+ const result = await pollForCompletion(backend, queued.prompt_id);
374978
+ if (!result) {
374979
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
374980
+ title: "◆ Image Pipeline — Timed Out",
374981
+ lines: [
374982
+ ` Job queued: ${queued.prompt_id}`,
374983
+ ` Check: ${backend}/history/${queued.prompt_id}`
374984
+ ],
374910
374985
  color: "yellow",
374911
374986
  onReady: () => onDone(undefined)
374912
374987
  }, undefined, false, undefined, this);
374913
374988
  }
374914
- const existing = await loadConfig(projectRoot) ?? {
374915
- backendUrl: DEFAULT_COMFYUI_URL,
374916
- defaultWidth: 512,
374917
- defaultHeight: 512,
374918
- defaultSteps: 20,
374919
- defaultCfg: 7,
374920
- defaultSampler: "euler",
374921
- defaultModel: "",
374922
- outputDir: ".localclawd/image-pipeline/outputs"
374923
- };
374924
- existing.backendUrl = newUrl;
374925
- await saveConfig2(projectRoot, existing);
374926
- const active = await detectComfyUI(newUrl);
374927
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374928
- title: "◆ Image Pipeline — Config Updated",
374929
- lines: [
374930
- `Backend URL: ${newUrl}`,
374931
- active ? "● ComfyUI reachable" : "○ ComfyUI not reachable at that URL"
374932
- ],
374933
- color: active ? "green" : "yellow",
374934
- onReady: () => onDone(undefined)
374935
- }, undefined, false, undefined, this);
374936
- }
374937
- async function runSetup(onDone, projectRoot) {
374938
- const { created, alreadyExisted } = await scaffoldProject(projectRoot);
374939
- const config2 = await loadConfig(projectRoot);
374940
- const configuredUrl = config2?.backendUrl ?? DEFAULT_COMFYUI_URL;
374941
- const localActive = await detectComfyUI(DEFAULT_COMFYUI_URL);
374942
- let activeUrl = null;
374943
- if (localActive) {
374944
- activeUrl = DEFAULT_COMFYUI_URL;
374945
- } else if (configuredUrl !== DEFAULT_COMFYUI_URL && await detectComfyUI(configuredUrl)) {
374946
- activeUrl = configuredUrl;
374989
+ const outputDir = join113(projectRoot, ".localclawd", "image-pipeline", "generated");
374990
+ await mkdir35(outputDir, { recursive: true });
374991
+ const comfyImages = extractOutputImages(result);
374992
+ const savedPaths = [];
374993
+ for (const imgFilename of comfyImages) {
374994
+ const subfolder = Object.values(result.outputs).flatMap((o) => o.images ?? []).find((img) => img.filename === imgFilename)?.subfolder ?? "";
374995
+ try {
374996
+ const params = new URLSearchParams({ filename: imgFilename, subfolder, type: "output" });
374997
+ const res = await fetch(`${backend}/view?${params}`);
374998
+ if (res.ok) {
374999
+ const outName = `${timestamp3()}_${slugify3(promptText)}.png`;
375000
+ const outPath = join113(outputDir, outName);
375001
+ await writeFile37(outPath, Buffer.from(await res.arrayBuffer()));
375002
+ savedPaths.push(outPath);
375003
+ }
375004
+ } catch {}
374947
375005
  }
374948
- const comfyLine = activeUrl ? `● ComfyUI active at ${activeUrl}` : `○ ComfyUI not detected — run: /image-pipeline config <url>`;
374949
- const lines = [
374950
- comfyLine,
374951
- "",
374952
- alreadyExisted ? " Pipeline already scaffolded." : ` Created ${created.length} files under .localclawd/image-pipeline/`
375006
+ const lines = savedPaths.length > 0 ? [
375007
+ ` Saved ${savedPaths.length} image${savedPaths.length !== 1 ? "s" : ""}:`,
375008
+ ...savedPaths.map((p) => ` ${p}`),
375009
+ ` Seed: ${seed} · ${steps} steps · ${width}×${height} · ${model}`
375010
+ ] : [
375011
+ ` Job complete — download failed, images in ComfyUI output folder.`,
375012
+ ` ComfyUI filenames: ${comfyImages.join(", ") || "(none)"}`,
375013
+ ` Seed: ${seed}`
374953
375014
  ];
374954
- if (!alreadyExisted) {
374955
- for (const f of created)
374956
- lines.push(` + ${f}`);
374957
- }
374958
- lines.push("", " Commands:", " /image-pipeline — status", " /image-pipeline generate <prompt> — submit to ComfyUI", " /image-pipeline config <url> — set backend URL", " /image-pipeline list — list templates", " /image <prompt> — quick generate + save to ~/generatedimages/");
374959
- return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Banner, {
374960
- title: "◆ Image Pipeline — Setup",
375015
+ return /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(PipelineCard, {
375016
+ title: "◆ Image Pipeline — Done",
374961
375017
  lines,
374962
- color: activeUrl ? "green" : "yellow",
375018
+ color: savedPaths.length > 0 ? "green" : "yellow",
374963
375019
  onReady: () => onDone(undefined)
374964
375020
  }, undefined, false, undefined, this);
374965
- }
374966
- var React59, jsx_dev_runtime197, call20 = async (onDone, _context, args) => {
374967
- const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
374968
- const projectRoot = getOriginalCwd2() ?? process.cwd();
374969
- const rawArgs = args?.trim() ?? "";
374970
- if (!rawArgs) {
374971
- return showStatus(onDone, projectRoot);
374972
- }
374973
- const [subcmd, ...rest] = rawArgs.split(/\s+/);
374974
- const restText = rest.join(" ").trim();
374975
- if (subcmd === "list") {
374976
- return showList(onDone, projectRoot);
374977
- }
374978
- if (subcmd === "config") {
374979
- return updateConfig(onDone, projectRoot, restText);
374980
- }
374981
- if (subcmd === "generate" || subcmd === "gen") {
374982
- const promptText = restText || rawArgs;
374983
- return runGenerate(onDone, projectRoot, promptText);
374984
- }
374985
- return runSetup(onDone, projectRoot);
374986
375021
  };
374987
375022
  var init_image_pipeline = __esm(() => {
374988
375023
  init_ink2();
@@ -375021,9 +375056,9 @@ var init_telegramSignals = __esm(() => {
375021
375056
 
375022
375057
  // src/services/telegram/telegramKill.ts
375023
375058
  import { readdir as readdir22, unlink as unlink16 } from "fs/promises";
375024
- import { join as join113 } from "path";
375059
+ import { join as join114 } from "path";
375025
375060
  async function killAllInstances() {
375026
- const sessionsDir = join113(getClaudeConfigHomeDir(), "sessions");
375061
+ const sessionsDir = join114(getClaudeConfigHomeDir(), "sessions");
375027
375062
  let files;
375028
375063
  try {
375029
375064
  files = await readdir22(sessionsDir);
@@ -375042,7 +375077,7 @@ async function killAllInstances() {
375042
375077
  killed++;
375043
375078
  logForDebugging(`[telegram-kill] Sent SIGTERM to PID ${pid}`);
375044
375079
  } catch {
375045
- await unlink16(join113(sessionsDir, file)).catch(() => {});
375080
+ await unlink16(join114(sessionsDir, file)).catch(() => {});
375046
375081
  }
375047
375082
  }
375048
375083
  return killed;
@@ -375069,15 +375104,15 @@ function createEmptyState() {
375069
375104
  }
375070
375105
 
375071
375106
  // src/services/director/directorMemoryOps.ts
375072
- import { mkdir as mkdir35, readdir as readdir23, readFile as readFile44, stat as stat38, writeFile as writeFile37 } from "fs/promises";
375073
- import { basename as basename34, join as join114, resolve as resolve36 } from "path";
375107
+ import { mkdir as mkdir36, readdir as readdir23, readFile as readFile44, stat as stat38, writeFile as writeFile38 } from "fs/promises";
375108
+ import { basename as basename34, join as join115, resolve as resolve36 } from "path";
375074
375109
  function setDirectorProjectRoot(projectPath) {
375075
- _projectStateDir = join114(projectPath, ".localclawd");
375110
+ _projectStateDir = join115(projectPath, ".localclawd");
375076
375111
  }
375077
375112
  function getStatePath() {
375078
375113
  if (_projectStateDir)
375079
- return join114(_projectStateDir, "director-memory.json");
375080
- return join114(GLOBAL_DIRECTOR_DIR, "state.json");
375114
+ return join115(_projectStateDir, "director-memory.json");
375115
+ return join115(GLOBAL_DIRECTOR_DIR, "state.json");
375081
375116
  }
375082
375117
  async function loadDirectorState() {
375083
375118
  try {
@@ -375092,15 +375127,15 @@ async function loadDirectorState() {
375092
375127
  }
375093
375128
  async function saveDirectorState(state) {
375094
375129
  const dir = _projectStateDir || GLOBAL_DIRECTOR_DIR;
375095
- await mkdir35(dir, { recursive: true });
375096
- await writeFile37(getStatePath(), JSON.stringify(state, null, 2), "utf-8");
375130
+ await mkdir36(dir, { recursive: true });
375131
+ await writeFile38(getStatePath(), JSON.stringify(state, null, 2), "utf-8");
375097
375132
  }
375098
- function slugify3(path12) {
375133
+ function slugify4(path12) {
375099
375134
  return basename34(resolve36(path12)).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
375100
375135
  }
375101
375136
  async function detectGitRemote(projectPath) {
375102
375137
  try {
375103
- const configPath = join114(projectPath, ".git", "config");
375138
+ const configPath = join115(projectPath, ".git", "config");
375104
375139
  const config2 = await readFile44(configPath, "utf-8");
375105
375140
  const match = config2.match(/\[remote "origin"\][^[]*url\s*=\s*(.+)/m);
375106
375141
  return match?.[1]?.trim();
@@ -375110,12 +375145,12 @@ async function detectGitRemote(projectPath) {
375110
375145
  }
375111
375146
  async function detectDescription(projectPath) {
375112
375147
  try {
375113
- const pkg = JSON.parse(await readFile44(join114(projectPath, "package.json"), "utf-8"));
375148
+ const pkg = JSON.parse(await readFile44(join115(projectPath, "package.json"), "utf-8"));
375114
375149
  if (pkg.description)
375115
375150
  return pkg.description;
375116
375151
  } catch {}
375117
375152
  try {
375118
- const readme = await readFile44(join114(projectPath, "README.md"), "utf-8");
375153
+ const readme = await readFile44(join115(projectPath, "README.md"), "utf-8");
375119
375154
  const firstLine = readme.split(`
375120
375155
  `).find((l) => l.trim() && !l.startsWith("#"));
375121
375156
  if (firstLine)
@@ -375133,7 +375168,7 @@ function generateTags(project) {
375133
375168
  }
375134
375169
  async function registerProject(state, projectPath, description) {
375135
375170
  const absPath = resolve36(projectPath);
375136
- const id = slugify3(absPath);
375171
+ const id = slugify4(absPath);
375137
375172
  const existing = state.projects.find((p) => p.id === id || p.path === absPath);
375138
375173
  if (existing) {
375139
375174
  existing.lastActive = Date.now();
@@ -375169,7 +375204,7 @@ async function indexProjectFiles(state, projectId, projectPath) {
375169
375204
  const absPath = resolve36(projectPath);
375170
375205
  for (const name of KEY_FILES) {
375171
375206
  try {
375172
- const filePath = join114(absPath, name);
375207
+ const filePath = join115(absPath, name);
375173
375208
  await stat38(filePath);
375174
375209
  const content = await readFile44(filePath, "utf-8");
375175
375210
  const firstLine = content.split(`
@@ -375184,7 +375219,7 @@ async function indexProjectFiles(state, projectId, projectPath) {
375184
375219
  } catch {}
375185
375220
  }
375186
375221
  try {
375187
- const srcDir = join114(absPath, "src");
375222
+ const srcDir = join115(absPath, "src");
375188
375223
  const srcFiles = await readdir23(srcDir);
375189
375224
  for (const file of srcFiles.slice(0, 30)) {
375190
375225
  if (!file.endsWith(".ts") && !file.endsWith(".tsx") && !file.endsWith(".js") && !file.endsWith(".py") && !file.endsWith(".rs") && !file.endsWith(".go"))
@@ -375257,8 +375292,8 @@ var GLOBAL_DIRECTOR_DIR, DIRECTOR_MEMORY_DIR, _projectStateDir = "", KEY_FILES,
375257
375292
  var init_directorMemoryOps = __esm(() => {
375258
375293
  init_debug();
375259
375294
  init_envUtils();
375260
- GLOBAL_DIRECTOR_DIR = join114(getClaudeConfigHomeDir(), "director");
375261
- DIRECTOR_MEMORY_DIR = join114(GLOBAL_DIRECTOR_DIR, "memory");
375295
+ GLOBAL_DIRECTOR_DIR = join115(getClaudeConfigHomeDir(), "director");
375296
+ DIRECTOR_MEMORY_DIR = join115(GLOBAL_DIRECTOR_DIR, "memory");
375262
375297
  KEY_FILES = [
375263
375298
  "package.json",
375264
375299
  "README.md",
@@ -375611,11 +375646,11 @@ async function initSlack() {
375611
375646
  if (!token || !channelId) {
375612
375647
  try {
375613
375648
  const { readFile: readFile45 } = await import("fs/promises");
375614
- const { join: join115 } = await import("path");
375649
+ const { join: join116 } = await import("path");
375615
375650
  const { homedir: homedir28 } = await import("os");
375616
375651
  const { getClaudeConfigHomeDir: getClaudeConfigHomeDir3 } = await Promise.resolve().then(() => (init_envUtils(), exports_envUtils));
375617
- const newPath = join115(getClaudeConfigHomeDir3(), "slack.json");
375618
- const legacyPath = join115(homedir28(), ".claude", "slack.json");
375652
+ const newPath = join116(getClaudeConfigHomeDir3(), "slack.json");
375653
+ const legacyPath = join116(homedir28(), ".claude", "slack.json");
375619
375654
  let configPath = newPath;
375620
375655
  try {
375621
375656
  await (await import("fs/promises")).stat(newPath);
@@ -375931,11 +375966,11 @@ async function initDiscord() {
375931
375966
  if (!token || !channelId) {
375932
375967
  try {
375933
375968
  const { readFile: readFile45 } = await import("fs/promises");
375934
- const { join: join115 } = await import("path");
375969
+ const { join: join116 } = await import("path");
375935
375970
  const { homedir: homedir28 } = await import("os");
375936
375971
  const { getClaudeConfigHomeDir: getClaudeConfigHomeDir3 } = await Promise.resolve().then(() => (init_envUtils(), exports_envUtils));
375937
- const newPath = join115(getClaudeConfigHomeDir3(), "discord.json");
375938
- const legacyPath = join115(homedir28(), ".claude", "discord.json");
375972
+ const newPath = join116(getClaudeConfigHomeDir3(), "discord.json");
375973
+ const legacyPath = join116(homedir28(), ".claude", "discord.json");
375939
375974
  let configPath = newPath;
375940
375975
  try {
375941
375976
  await (await import("fs/promises")).stat(newPath);
@@ -376328,8 +376363,8 @@ __export(exports_scheduler, {
376328
376363
  getSchedules: () => getSchedules,
376329
376364
  addSchedule: () => addSchedule
376330
376365
  });
376331
- import { mkdir as mkdir36, readFile as readFile45, writeFile as writeFile38 } from "fs/promises";
376332
- import { join as join115 } from "path";
376366
+ import { mkdir as mkdir37, readFile as readFile45, writeFile as writeFile39 } from "fs/promises";
376367
+ import { join as join116 } from "path";
376333
376368
  async function loadSchedules() {
376334
376369
  try {
376335
376370
  const raw = await readFile45(SCHEDULES_PATH, "utf-8");
@@ -376342,8 +376377,8 @@ async function loadSchedules() {
376342
376377
  }
376343
376378
  }
376344
376379
  async function saveSchedules(file) {
376345
- await mkdir36(getClaudeConfigHomeDir(), { recursive: true });
376346
- await writeFile38(SCHEDULES_PATH, JSON.stringify(file, null, 2), "utf-8");
376380
+ await mkdir37(getClaudeConfigHomeDir(), { recursive: true });
376381
+ await writeFile39(SCHEDULES_PATH, JSON.stringify(file, null, 2), "utf-8");
376347
376382
  }
376348
376383
  function nextRunTime(expr, from = Date.now()) {
376349
376384
  const trimmed = expr.trim().toLowerCase();
@@ -376547,7 +376582,7 @@ var SCHEDULES_PATH, TICK_INTERVAL_MS = 30000, _tickTimer = null;
376547
376582
  var init_scheduler = __esm(() => {
376548
376583
  init_debug();
376549
376584
  init_envUtils();
376550
- SCHEDULES_PATH = join115(getClaudeConfigHomeDir(), "schedules.json");
376585
+ SCHEDULES_PATH = join116(getClaudeConfigHomeDir(), "schedules.json");
376551
376586
  });
376552
376587
 
376553
376588
  // src/services/telegram/telegramBot.ts
@@ -376679,7 +376714,7 @@ async function initTelegram() {
376679
376714
  if (!token || !chatIdStr) {
376680
376715
  try {
376681
376716
  const { readFile: readFile46, stat: stat39 } = await import("fs/promises");
376682
- const { join: join116 } = await import("path");
376717
+ const { join: join117 } = await import("path");
376683
376718
  const { homedir: homedir28 } = await import("os");
376684
376719
  const { getClaudeConfigHomeDir: getClaudeConfigHomeDir3 } = await Promise.resolve().then(() => (init_envUtils(), exports_envUtils));
376685
376720
  const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
@@ -376687,10 +376722,10 @@ async function initTelegram() {
376687
376722
  try {
376688
376723
  const cwd2 = getOriginalCwd2();
376689
376724
  if (cwd2)
376690
- candidates.push(join116(cwd2, ".localclawd", "telegram.json"));
376725
+ candidates.push(join117(cwd2, ".localclawd", "telegram.json"));
376691
376726
  } catch {}
376692
- candidates.push(join116(getClaudeConfigHomeDir3(), "telegram.json"));
376693
- candidates.push(join116(homedir28(), ".claude", "telegram.json"));
376727
+ candidates.push(join117(getClaudeConfigHomeDir3(), "telegram.json"));
376728
+ candidates.push(join117(homedir28(), ".claude", "telegram.json"));
376694
376729
  let configPath = null;
376695
376730
  for (const p of candidates) {
376696
376731
  try {
@@ -377289,8 +377324,8 @@ var exports_telegram = {};
377289
377324
  __export(exports_telegram, {
377290
377325
  call: () => call22
377291
377326
  });
377292
- import { writeFile as writeFile39, mkdir as mkdir37 } from "fs/promises";
377293
- import { join as join116 } from "path";
377327
+ import { writeFile as writeFile40, mkdir as mkdir38 } from "fs/promises";
377328
+ import { join as join117 } from "path";
377294
377329
  function TelegramSetup({ onDone }) {
377295
377330
  const [step, setStep] = React61.useState("instructions");
377296
377331
  const [token, setToken] = React61.useState("");
@@ -377576,20 +377611,20 @@ async function saveTelegramConfig(token, chatId) {
377576
377611
  const { getOriginalCwd: getOriginalCwd2 } = await Promise.resolve().then(() => (init_state(), exports_state));
377577
377612
  const cwd2 = getOriginalCwd2();
377578
377613
  if (cwd2) {
377579
- const projDir = join116(cwd2, ".localclawd");
377580
- await mkdir37(projDir, { recursive: true });
377581
- configPath = join116(projDir, "telegram.json");
377614
+ const projDir = join117(cwd2, ".localclawd");
377615
+ await mkdir38(projDir, { recursive: true });
377616
+ configPath = join117(projDir, "telegram.json");
377582
377617
  } else {
377583
377618
  const dir = getClaudeConfigHomeDir();
377584
- await mkdir37(dir, { recursive: true });
377585
- configPath = join116(dir, "telegram.json");
377619
+ await mkdir38(dir, { recursive: true });
377620
+ configPath = join117(dir, "telegram.json");
377586
377621
  }
377587
377622
  } catch {
377588
377623
  const dir = getClaudeConfigHomeDir();
377589
- await mkdir37(dir, { recursive: true });
377590
- configPath = join116(dir, "telegram.json");
377624
+ await mkdir38(dir, { recursive: true });
377625
+ configPath = join117(dir, "telegram.json");
377591
377626
  }
377592
- await writeFile39(configPath, JSON.stringify({ token, chatId }, null, 2), "utf-8");
377627
+ await writeFile40(configPath, JSON.stringify({ token, chatId }, null, 2), "utf-8");
377593
377628
  }
377594
377629
  function TelegramStatus({
377595
377630
  onDone
@@ -377799,8 +377834,8 @@ var exports_slack = {};
377799
377834
  __export(exports_slack, {
377800
377835
  call: () => call23
377801
377836
  });
377802
- import { writeFile as writeFile40, mkdir as mkdir38 } from "fs/promises";
377803
- import { join as join117 } from "path";
377837
+ import { writeFile as writeFile41, mkdir as mkdir39 } from "fs/promises";
377838
+ import { join as join118 } from "path";
377804
377839
  function SlackSetup({ onDone }) {
377805
377840
  const [step, setStep] = React62.useState("instructions");
377806
377841
  const [token, setToken] = React62.useState("");
@@ -378155,9 +378190,9 @@ function SlackSetupDone({
378155
378190
  }
378156
378191
  async function saveSlackConfig(token, channelId, userId) {
378157
378192
  const configDir = getClaudeConfigHomeDir();
378158
- await mkdir38(configDir, { recursive: true });
378159
- const configPath = join117(configDir, "slack.json");
378160
- await writeFile40(configPath, JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378193
+ await mkdir39(configDir, { recursive: true });
378194
+ const configPath = join118(configDir, "slack.json");
378195
+ await writeFile41(configPath, JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378161
378196
  }
378162
378197
  function SlackStatus({
378163
378198
  onDone
@@ -378382,8 +378417,8 @@ var exports_discord = {};
378382
378417
  __export(exports_discord, {
378383
378418
  call: () => call24
378384
378419
  });
378385
- import { writeFile as writeFile41, mkdir as mkdir39 } from "fs/promises";
378386
- import { join as join118 } from "path";
378420
+ import { writeFile as writeFile42, mkdir as mkdir40 } from "fs/promises";
378421
+ import { join as join119 } from "path";
378387
378422
  function DiscordSetup({ onDone }) {
378388
378423
  const [step, setStep] = React64.useState("instructions");
378389
378424
  const [token, setToken] = React64.useState("");
@@ -378677,8 +378712,8 @@ function DiscordSetupDone({
378677
378712
  }
378678
378713
  async function saveConfig3(token, channelId, userId) {
378679
378714
  const configDir = getClaudeConfigHomeDir();
378680
- await mkdir39(configDir, { recursive: true });
378681
- await writeFile41(join118(configDir, "discord.json"), JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378715
+ await mkdir40(configDir, { recursive: true });
378716
+ await writeFile42(join119(configDir, "discord.json"), JSON.stringify({ token, channelId, userId: userId ?? null }, null, 2), "utf-8");
378682
378717
  }
378683
378718
  function DiscordStatus({
378684
378719
  onDone
@@ -379210,8 +379245,8 @@ var init_schedule2 = __esm(() => {
379210
379245
  });
379211
379246
 
379212
379247
  // src/services/sessionSearch/sessionSummarize.ts
379213
- import { readdir as readdir24, readFile as readFile46, writeFile as writeFile42, mkdir as mkdir40, stat as stat39 } from "fs/promises";
379214
- import { join as join119 } from "path";
379248
+ import { readdir as readdir24, readFile as readFile46, writeFile as writeFile43, mkdir as mkdir41, stat as stat39 } from "fs/promises";
379249
+ import { join as join120 } from "path";
379215
379250
  import { homedir as homedir28 } from "os";
379216
379251
  function extractText(obj) {
379217
379252
  if (typeof obj === "string")
@@ -379240,7 +379275,7 @@ async function listUnsummarized() {
379240
379275
  for (const f of files) {
379241
379276
  if (!f.endsWith(".json"))
379242
379277
  continue;
379243
- const s = await stat39(join119(SUMMARIES_DIR2, f)).catch(() => null);
379278
+ const s = await stat39(join120(SUMMARIES_DIR2, f)).catch(() => null);
379244
379279
  if (s)
379245
379280
  existing.set(f.replace(/\.json$/, ""), s.mtimeMs);
379246
379281
  }
@@ -379254,7 +379289,7 @@ async function listUnsummarized() {
379254
379289
  continue;
379255
379290
  }
379256
379291
  for (const slug of slugs) {
379257
- const slugDir = join119(projectsDir, slug);
379292
+ const slugDir = join120(projectsDir, slug);
379258
379293
  try {
379259
379294
  const entries = await readdir24(slugDir);
379260
379295
  for (const entry of entries) {
@@ -379264,7 +379299,7 @@ async function listUnsummarized() {
379264
379299
  if (seen.has(sessionId))
379265
379300
  continue;
379266
379301
  seen.add(sessionId);
379267
- const full = join119(slugDir, entry);
379302
+ const full = join120(slugDir, entry);
379268
379303
  const s = await stat39(full).catch(() => null);
379269
379304
  if (!s)
379270
379305
  continue;
@@ -379375,7 +379410,7 @@ ${transcript}`;
379375
379410
  };
379376
379411
  }
379377
379412
  async function summarizeAllPending(limit = 20, onProgress) {
379378
- await mkdir40(SUMMARIES_DIR2, { recursive: true });
379413
+ await mkdir41(SUMMARIES_DIR2, { recursive: true });
379379
379414
  const pending = await listUnsummarized();
379380
379415
  pending.sort((a, b3) => b3.mtime - a.mtime);
379381
379416
  const slice = pending.slice(0, limit);
@@ -379390,7 +379425,7 @@ async function summarizeAllPending(limit = 20, onProgress) {
379390
379425
  continue;
379391
379426
  }
379392
379427
  try {
379393
- await writeFile42(join119(SUMMARIES_DIR2, `${p.sessionId}.json`), JSON.stringify(summary, null, 2), "utf-8");
379428
+ await writeFile43(join120(SUMMARIES_DIR2, `${p.sessionId}.json`), JSON.stringify(summary, null, 2), "utf-8");
379394
379429
  summarized++;
379395
379430
  } catch (e) {
379396
379431
  logForDebugging(`[session-summarize] write failed: ${e}`);
@@ -379407,7 +379442,7 @@ async function loadAllSummaries() {
379407
379442
  if (!f.endsWith(".json"))
379408
379443
  continue;
379409
379444
  try {
379410
- const raw = await readFile46(join119(SUMMARIES_DIR2, f), "utf-8");
379445
+ const raw = await readFile46(join120(SUMMARIES_DIR2, f), "utf-8");
379411
379446
  summaries.push(JSON.parse(raw));
379412
379447
  } catch {}
379413
379448
  }
@@ -379422,15 +379457,15 @@ var init_sessionSummarize = __esm(() => {
379422
379457
  init_envUtils();
379423
379458
  init_providers();
379424
379459
  PROJECTS_DIRS = [
379425
- join119(getClaudeConfigHomeDir(), "projects"),
379426
- join119(homedir28(), ".claude", "projects")
379460
+ join120(getClaudeConfigHomeDir(), "projects"),
379461
+ join120(homedir28(), ".claude", "projects")
379427
379462
  ];
379428
- SUMMARIES_DIR2 = join119(getClaudeConfigHomeDir(), "session-summaries");
379463
+ SUMMARIES_DIR2 = join120(getClaudeConfigHomeDir(), "session-summaries");
379429
379464
  });
379430
379465
 
379431
379466
  // src/services/sessionSearch/fts5Index.ts
379432
379467
  import { readdir as readdir25, readFile as readFile47, stat as stat40 } from "fs/promises";
379433
- import { join as join120 } from "path";
379468
+ import { join as join121 } from "path";
379434
379469
  async function tryOpenDatabase() {
379435
379470
  if (_db)
379436
379471
  return _db;
@@ -379495,7 +379530,7 @@ async function rebuildIndex() {
379495
379530
  continue;
379496
379531
  const sessionId = entry.replace(/\.json$/, "");
379497
379532
  seen.add(sessionId);
379498
- const filePath = join120(SUMMARIES_DIR3, entry);
379533
+ const filePath = join121(SUMMARIES_DIR3, entry);
379499
379534
  let s;
379500
379535
  try {
379501
379536
  s = await stat40(filePath);
@@ -379566,13 +379601,13 @@ var DB_PATH, SUMMARIES_DIR3, _db = null, _available = null;
379566
379601
  var init_fts5Index = __esm(() => {
379567
379602
  init_debug();
379568
379603
  init_envUtils();
379569
- DB_PATH = join120(getClaudeConfigHomeDir(), "sessions.db");
379570
- SUMMARIES_DIR3 = join120(getClaudeConfigHomeDir(), "session-summaries");
379604
+ DB_PATH = join121(getClaudeConfigHomeDir(), "sessions.db");
379605
+ SUMMARIES_DIR3 = join121(getClaudeConfigHomeDir(), "session-summaries");
379571
379606
  });
379572
379607
 
379573
379608
  // src/services/sessionSearch/sessionSearch.ts
379574
379609
  import { readdir as readdir26, readFile as readFile48, stat as stat41 } from "fs/promises";
379575
- import { join as join121 } from "path";
379610
+ import { join as join122 } from "path";
379576
379611
  import { homedir as homedir29 } from "os";
379577
379612
  function tokenize6(text) {
379578
379613
  return text.toLowerCase().split(/[^a-z0-9_]+/).filter((t) => t.length >= 2);
@@ -379607,13 +379642,13 @@ async function listSessionFiles() {
379607
379642
  continue;
379608
379643
  }
379609
379644
  for (const slug of projects) {
379610
- const slugDir = join121(projectsDir, slug);
379645
+ const slugDir = join122(projectsDir, slug);
379611
379646
  try {
379612
379647
  const entries = await readdir26(slugDir);
379613
379648
  for (const entry of entries) {
379614
379649
  if (!entry.endsWith(".jsonl"))
379615
379650
  continue;
379616
- const full = join121(slugDir, entry);
379651
+ const full = join122(slugDir, entry);
379617
379652
  if (seen.has(entry))
379618
379653
  continue;
379619
379654
  seen.add(entry);
@@ -379829,8 +379864,8 @@ var init_sessionSearch = __esm(() => {
379829
379864
  init_sessionSummarize();
379830
379865
  init_fts5Index();
379831
379866
  PROJECTS_DIRS2 = [
379832
- join121(getClaudeConfigHomeDir(), "projects"),
379833
- join121(homedir29(), ".claude", "projects")
379867
+ join122(getClaudeConfigHomeDir(), "projects"),
379868
+ join122(homedir29(), ".claude", "projects")
379834
379869
  ];
379835
379870
  MAX_FILE_BYTES = 5 * 1024 * 1024;
379836
379871
  });
@@ -379998,8 +380033,8 @@ var init_summarize_sessions2 = __esm(() => {
379998
380033
  });
379999
380034
 
380000
380035
  // src/services/sessionSearch/trajectoryCompress.ts
380001
- import { readFile as readFile49, writeFile as writeFile43, readdir as readdir27, mkdir as mkdir41, stat as stat42 } from "fs/promises";
380002
- import { join as join122 } from "path";
380036
+ import { readFile as readFile49, writeFile as writeFile44, readdir as readdir27, mkdir as mkdir42, stat as stat42 } from "fs/promises";
380037
+ import { join as join123 } from "path";
380003
380038
  import { homedir as homedir30 } from "os";
380004
380039
  function flattenText(obj) {
380005
380040
  if (typeof obj === "string")
@@ -380083,7 +380118,7 @@ async function compressSession(sessionId, projectSlug) {
380083
380118
  let source = null;
380084
380119
  let sourceStat = null;
380085
380120
  for (const projectsDir of PROJECTS_DIRS3) {
380086
- const candidate = join122(projectsDir, projectSlug, `${sessionId}.jsonl`);
380121
+ const candidate = join123(projectsDir, projectSlug, `${sessionId}.jsonl`);
380087
380122
  try {
380088
380123
  const text = await readFile49(candidate, "utf-8");
380089
380124
  const s = await stat42(candidate);
@@ -380117,8 +380152,8 @@ async function compressSession(sessionId, projectSlug) {
380117
380152
  };
380118
380153
  const serialized = JSON.stringify(trajectory, null, 0);
380119
380154
  trajectory.compressedBytes = Buffer.byteLength(serialized, "utf-8");
380120
- await mkdir41(TRAJECTORIES_DIR2, { recursive: true });
380121
- await writeFile43(join122(TRAJECTORIES_DIR2, `${sessionId}.json`), JSON.stringify(trajectory), "utf-8");
380155
+ await mkdir42(TRAJECTORIES_DIR2, { recursive: true });
380156
+ await writeFile44(join123(TRAJECTORIES_DIR2, `${sessionId}.json`), JSON.stringify(trajectory), "utf-8");
380122
380157
  return trajectory;
380123
380158
  }
380124
380159
  async function compressAllPending(limit = 20) {
@@ -380128,7 +380163,7 @@ async function compressAllPending(limit = 20) {
380128
380163
  for (const f of files) {
380129
380164
  if (!f.endsWith(".json"))
380130
380165
  continue;
380131
- const s = await stat42(join122(TRAJECTORIES_DIR2, f)).catch(() => null);
380166
+ const s = await stat42(join123(TRAJECTORIES_DIR2, f)).catch(() => null);
380132
380167
  if (s)
380133
380168
  existing.set(f.replace(/\.json$/, ""), s.mtimeMs);
380134
380169
  }
@@ -380144,7 +380179,7 @@ async function compressAllPending(limit = 20) {
380144
380179
  }
380145
380180
  for (const slug of slugs) {
380146
380181
  try {
380147
- const entries = await readdir27(join122(projectsDir, slug));
380182
+ const entries = await readdir27(join123(projectsDir, slug));
380148
380183
  for (const entry of entries) {
380149
380184
  if (!entry.endsWith(".jsonl"))
380150
380185
  continue;
@@ -380152,7 +380187,7 @@ async function compressAllPending(limit = 20) {
380152
380187
  if (seen.has(sessionId))
380153
380188
  continue;
380154
380189
  seen.add(sessionId);
380155
- const s = await stat42(join122(projectsDir, slug, entry)).catch(() => null);
380190
+ const s = await stat42(join123(projectsDir, slug, entry)).catch(() => null);
380156
380191
  if (!s)
380157
380192
  continue;
380158
380193
  const have = existing.get(sessionId);
@@ -380192,10 +380227,10 @@ var init_trajectoryCompress = __esm(() => {
380192
380227
  init_debug();
380193
380228
  init_envUtils();
380194
380229
  PROJECTS_DIRS3 = [
380195
- join122(getClaudeConfigHomeDir(), "projects"),
380196
- join122(homedir30(), ".claude", "projects")
380230
+ join123(getClaudeConfigHomeDir(), "projects"),
380231
+ join123(homedir30(), ".claude", "projects")
380197
380232
  ];
380198
- TRAJECTORIES_DIR2 = join122(getClaudeConfigHomeDir(), "trajectories");
380233
+ TRAJECTORIES_DIR2 = join123(getClaudeConfigHomeDir(), "trajectories");
380199
380234
  });
380200
380235
 
380201
380236
  // src/commands/compress-sessions/compress-sessions.tsx
@@ -380276,7 +380311,7 @@ var init_compress_sessions2 = __esm(() => {
380276
380311
 
380277
380312
  // src/services/skills/skillDistill.ts
380278
380313
  import { readFile as readFile50, readdir as readdir28, stat as stat43 } from "fs/promises";
380279
- import { join as join123 } from "path";
380314
+ import { join as join124 } from "path";
380280
380315
  import { homedir as homedir31 } from "os";
380281
380316
  function extractText3(obj) {
380282
380317
  if (typeof obj === "string")
@@ -380307,13 +380342,13 @@ async function findMostRecentSession() {
380307
380342
  continue;
380308
380343
  }
380309
380344
  for (const slug of slugs) {
380310
- const slugDir = join123(projectsDir, slug);
380345
+ const slugDir = join124(projectsDir, slug);
380311
380346
  try {
380312
380347
  const entries = await readdir28(slugDir);
380313
380348
  for (const entry of entries) {
380314
380349
  if (!entry.endsWith(".jsonl"))
380315
380350
  continue;
380316
- const full = join123(slugDir, entry);
380351
+ const full = join124(slugDir, entry);
380317
380352
  const s = await stat43(full).catch(() => null);
380318
380353
  if (!s)
380319
380354
  continue;
@@ -380437,8 +380472,8 @@ var init_skillDistill = __esm(() => {
380437
380472
  init_envUtils();
380438
380473
  init_providers();
380439
380474
  PROJECTS_DIRS4 = [
380440
- join123(getClaudeConfigHomeDir(), "projects"),
380441
- join123(homedir31(), ".claude", "projects")
380475
+ join124(getClaudeConfigHomeDir(), "projects"),
380476
+ join124(homedir31(), ".claude", "projects")
380442
380477
  ];
380443
380478
  });
380444
380479
 
@@ -381674,8 +381709,8 @@ var init_daytona_run2 = __esm(() => {
381674
381709
  });
381675
381710
 
381676
381711
  // src/services/skills/skillPortable.ts
381677
- import { readdir as readdir29, readFile as readFile51, writeFile as writeFile44, mkdir as mkdir42, stat as stat44 } from "fs/promises";
381678
- import { join as join124, basename as basename35, extname as extname13, resolve as resolve37 } from "path";
381712
+ import { readdir as readdir29, readFile as readFile51, writeFile as writeFile45, mkdir as mkdir43, stat as stat44 } from "fs/promises";
381713
+ import { join as join125, basename as basename35, extname as extname13, resolve as resolve37 } from "path";
381679
381714
  function parseFrontmatter2(raw) {
381680
381715
  const m2 = raw.match(/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);
381681
381716
  if (!m2)
@@ -381727,7 +381762,7 @@ async function listSkills() {
381727
381762
  out.push(entry.replace(/\.md$/, ""));
381728
381763
  } else {
381729
381764
  try {
381730
- const sub = await stat44(join124(USER_SKILLS_DIR, entry, "SKILL.md"));
381765
+ const sub = await stat44(join125(USER_SKILLS_DIR, entry, "SKILL.md"));
381731
381766
  if (sub.isFile())
381732
381767
  out.push(entry);
381733
381768
  } catch {}
@@ -381739,12 +381774,12 @@ async function listSkills() {
381739
381774
  }
381740
381775
  }
381741
381776
  async function readSkillFile(name) {
381742
- const flatPath = join124(USER_SKILLS_DIR, `${name}.md`);
381777
+ const flatPath = join125(USER_SKILLS_DIR, `${name}.md`);
381743
381778
  try {
381744
381779
  const raw = await readFile51(flatPath, "utf-8");
381745
381780
  return { raw, path: flatPath };
381746
381781
  } catch {}
381747
- const dirPath = join124(USER_SKILLS_DIR, name, "SKILL.md");
381782
+ const dirPath = join125(USER_SKILLS_DIR, name, "SKILL.md");
381748
381783
  try {
381749
381784
  const raw = await readFile51(dirPath, "utf-8");
381750
381785
  return { raw, path: dirPath };
@@ -381766,8 +381801,8 @@ async function exportSkill(name, destDir) {
381766
381801
  body
381767
381802
  };
381768
381803
  const outPath = resolve37(destDir, `${skill.name}.md`);
381769
- await mkdir42(destDir, { recursive: true });
381770
- await writeFile44(outPath, buildFrontmatter(skill), "utf-8");
381804
+ await mkdir43(destDir, { recursive: true });
381805
+ await writeFile45(outPath, buildFrontmatter(skill), "utf-8");
381771
381806
  return { ok: true, path: outPath };
381772
381807
  }
381773
381808
  async function importSkill(filePath) {
@@ -381788,10 +381823,10 @@ async function importSkill(filePath) {
381788
381823
  const description = typeof meta.description === "string" ? meta.description : "";
381789
381824
  const tags = Array.isArray(meta.tags) ? meta.tags : [];
381790
381825
  const skill = { name, description, tags, body };
381791
- const outPath = join124(USER_SKILLS_DIR, `${name}.md`);
381826
+ const outPath = join125(USER_SKILLS_DIR, `${name}.md`);
381792
381827
  try {
381793
- await mkdir42(USER_SKILLS_DIR, { recursive: true });
381794
- await writeFile44(outPath, buildFrontmatter(skill), "utf-8");
381828
+ await mkdir43(USER_SKILLS_DIR, { recursive: true });
381829
+ await writeFile45(outPath, buildFrontmatter(skill), "utf-8");
381795
381830
  logForDebugging(`[skills] imported ${name} → ${outPath}`);
381796
381831
  return { ok: true, name, path: outPath };
381797
381832
  } catch (e) {
@@ -381802,7 +381837,7 @@ var USER_SKILLS_DIR;
381802
381837
  var init_skillPortable = __esm(() => {
381803
381838
  init_debug();
381804
381839
  init_envUtils();
381805
- USER_SKILLS_DIR = join124(getClaudeConfigHomeDir(), "skills");
381840
+ USER_SKILLS_DIR = join125(getClaudeConfigHomeDir(), "skills");
381806
381841
  });
381807
381842
 
381808
381843
  // src/commands/skills-export/skills-export.tsx
@@ -381996,8 +382031,8 @@ var init_skills_import2 = __esm(() => {
381996
382031
  });
381997
382032
 
381998
382033
  // src/services/skills/skillUsage.ts
381999
- import { mkdir as mkdir43, readFile as readFile52, writeFile as writeFile45 } from "fs/promises";
382000
- import { join as join125 } from "path";
382034
+ import { mkdir as mkdir44, readFile as readFile52, writeFile as writeFile46 } from "fs/promises";
382035
+ import { join as join126 } from "path";
382001
382036
  async function loadFile() {
382002
382037
  try {
382003
382038
  const raw = await readFile52(USAGE_PATH, "utf-8");
@@ -382031,7 +382066,7 @@ async function shouldNudgeDistillation() {
382031
382066
  var USAGE_PATH;
382032
382067
  var init_skillUsage = __esm(() => {
382033
382068
  init_envUtils();
382034
- USAGE_PATH = join125(getClaudeConfigHomeDir(), "skill-usage.json");
382069
+ USAGE_PATH = join126(getClaudeConfigHomeDir(), "skill-usage.json");
382035
382070
  });
382036
382071
 
382037
382072
  // src/commands/skill-stats/skill-stats.tsx
@@ -382133,16 +382168,16 @@ var init_skill_stats2 = __esm(() => {
382133
382168
  });
382134
382169
 
382135
382170
  // src/services/skills/skillNotes.ts
382136
- import { mkdir as mkdir44, readFile as readFile53, writeFile as writeFile46, appendFile as appendFile5, stat as stat45 } from "fs/promises";
382137
- import { join as join126 } from "path";
382171
+ import { mkdir as mkdir45, readFile as readFile53, writeFile as writeFile47, appendFile as appendFile5, stat as stat45 } from "fs/promises";
382172
+ import { join as join127 } from "path";
382138
382173
  async function findNotesPath(skillName) {
382139
- const dirPath = join126(USER_SKILLS_DIR2, skillName, "NOTES.md");
382174
+ const dirPath = join127(USER_SKILLS_DIR2, skillName, "NOTES.md");
382140
382175
  try {
382141
- const s = await stat45(join126(USER_SKILLS_DIR2, skillName));
382176
+ const s = await stat45(join127(USER_SKILLS_DIR2, skillName));
382142
382177
  if (s.isDirectory())
382143
382178
  return dirPath;
382144
382179
  } catch {}
382145
- return join126(USER_SKILLS_DIR2, `${skillName}.notes.md`);
382180
+ return join127(USER_SKILLS_DIR2, `${skillName}.notes.md`);
382146
382181
  }
382147
382182
  async function loadSkillNotes(skillName) {
382148
382183
  const path12 = await findNotesPath(skillName);
@@ -382157,7 +382192,7 @@ async function appendSkillNote(skillName, note) {
382157
382192
  if (!trimmed)
382158
382193
  return { ok: false, error: "note is empty" };
382159
382194
  const path12 = await findNotesPath(skillName);
382160
- await mkdir44(USER_SKILLS_DIR2, { recursive: true });
382195
+ await mkdir45(USER_SKILLS_DIR2, { recursive: true });
382161
382196
  let existing = "";
382162
382197
  try {
382163
382198
  existing = await readFile53(path12, "utf-8");
@@ -382182,7 +382217,7 @@ async function appendSkillNote(skillName, note) {
382182
382217
  const compacted = lines.slice(0, headerEnd).concat(lines.slice(trimStart)).join(`
382183
382218
  `);
382184
382219
  try {
382185
- await writeFile46(path12, compacted + entry, "utf-8");
382220
+ await writeFile47(path12, compacted + entry, "utf-8");
382186
382221
  } catch (e) {
382187
382222
  return { ok: false, error: String(e) };
382188
382223
  }
@@ -382201,7 +382236,7 @@ var USER_SKILLS_DIR2, MAX_NOTES_BYTES, MAX_NOTE_LENGTH = 500;
382201
382236
  var init_skillNotes = __esm(() => {
382202
382237
  init_debug();
382203
382238
  init_envUtils();
382204
- USER_SKILLS_DIR2 = join126(getClaudeConfigHomeDir(), "skills");
382239
+ USER_SKILLS_DIR2 = join127(getClaudeConfigHomeDir(), "skills");
382205
382240
  MAX_NOTES_BYTES = 32 * 1024;
382206
382241
  });
382207
382242
 
@@ -382961,9 +382996,9 @@ __export(exports_webuiServer, {
382961
382996
  broadcastNewWindow: () => broadcastNewWindow
382962
382997
  });
382963
382998
  import { createServer as createServer5 } from "http";
382964
- import { mkdir as mkdir45, readdir as readdir30, readFile as readFile54, writeFile as writeFile47 } from "fs/promises";
382999
+ import { mkdir as mkdir46, readdir as readdir30, readFile as readFile54, writeFile as writeFile48 } from "fs/promises";
382965
383000
  import { createHash as createHash23 } from "crypto";
382966
- import { join as join127 } from "path";
383001
+ import { join as join128 } from "path";
382967
383002
  function getWebuiPort() {
382968
383003
  return _boundPort;
382969
383004
  }
@@ -382988,7 +383023,7 @@ function broadcastNewWindow(label) {
382988
383023
  }
382989
383024
  }
382990
383025
  async function listInstances() {
382991
- const sessionsDir = join127(getClaudeConfigHomeDir(), "sessions");
383026
+ const sessionsDir = join128(getClaudeConfigHomeDir(), "sessions");
382992
383027
  const out = [];
382993
383028
  let files;
382994
383029
  try {
@@ -383005,7 +383040,7 @@ async function listInstances() {
383005
383040
  let cwd2;
383006
383041
  let port;
383007
383042
  try {
383008
- const raw = await readFile54(join127(sessionsDir, f), "utf-8");
383043
+ const raw = await readFile54(join128(sessionsDir, f), "utf-8");
383009
383044
  const parsed = JSON.parse(raw);
383010
383045
  cwd2 = parsed.cwd;
383011
383046
  port = parsed.webuiPort;
@@ -383016,8 +383051,8 @@ async function listInstances() {
383016
383051
  }
383017
383052
  async function ensureStaticHtml() {
383018
383053
  try {
383019
- await mkdir45(getClaudeConfigHomeDir(), { recursive: true });
383020
- await writeFile47(WEBUI_HTML_PATH, STATIC_HTML, "utf-8");
383054
+ await mkdir46(getClaudeConfigHomeDir(), { recursive: true });
383055
+ await writeFile48(WEBUI_HTML_PATH, STATIC_HTML, "utf-8");
383021
383056
  } catch {}
383022
383057
  }
383023
383058
  function decodeFrame(buffer) {
@@ -383171,7 +383206,7 @@ async function startWebuiServer(port) {
383171
383206
  _boundPort = addr.port;
383172
383207
  _server = server;
383173
383208
  logForDebugging(`[webui] listening on http://127.0.0.1:${_boundPort}`);
383174
- mkdir45(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile47(PORT_FILE, String(_boundPort), "utf-8").catch(() => {}));
383209
+ mkdir46(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile48(PORT_FILE, String(_boundPort), "utf-8").catch(() => {}));
383175
383210
  resolve39({ ok: true, port: _boundPort });
383176
383211
  } else {
383177
383212
  resolve39({ ok: false, error: "no address bound" });
@@ -383393,8 +383428,8 @@ var DEFAULT_PORT = 7150, PORT_FILE, WEBUI_HTML_PATH, _server = null, _boundPort
383393
383428
  var init_webuiServer = __esm(() => {
383394
383429
  init_debug();
383395
383430
  init_envUtils();
383396
- PORT_FILE = join127(getClaudeConfigHomeDir(), "webui-port");
383397
- WEBUI_HTML_PATH = join127(getClaudeConfigHomeDir(), "webui-static.html");
383431
+ PORT_FILE = join128(getClaudeConfigHomeDir(), "webui-port");
383432
+ WEBUI_HTML_PATH = join128(getClaudeConfigHomeDir(), "webui-static.html");
383398
383433
  _websockets = new Set;
383399
383434
  _outputBuffer = [];
383400
383435
  });
@@ -383757,9 +383792,9 @@ var init_windows_setup2 = __esm(() => {
383757
383792
 
383758
383793
  // src/services/rpc/toolRpcServer.ts
383759
383794
  import { createServer as createServer6 } from "http";
383760
- import { readFile as readFile55, writeFile as writeFile48, mkdir as mkdir46, readdir as readdir31, stat as stat46 } from "fs/promises";
383795
+ import { readFile as readFile55, writeFile as writeFile49, mkdir as mkdir47, readdir as readdir31, stat as stat46 } from "fs/promises";
383761
383796
  import { spawn as spawn12 } from "child_process";
383762
- import { join as join128, resolve as resolvePath, relative as relative23 } from "path";
383797
+ import { join as join129, resolve as resolvePath, relative as relative23 } from "path";
383763
383798
  async function handleRead(p) {
383764
383799
  try {
383765
383800
  const raw = await readFile55(p.path, "utf-8");
@@ -383771,7 +383806,7 @@ async function handleRead(p) {
383771
383806
  }
383772
383807
  async function handleWrite(p) {
383773
383808
  try {
383774
- await writeFile48(p.path, p.content, "utf-8");
383809
+ await writeFile49(p.path, p.content, "utf-8");
383775
383810
  return { ok: true, data: { bytes: Buffer.byteLength(p.content, "utf-8") } };
383776
383811
  } catch (e) {
383777
383812
  return { ok: false, error: String(e) };
@@ -383798,7 +383833,7 @@ async function handleEdit(p) {
383798
383833
  updated = content.replace(p.oldString, p.newString);
383799
383834
  replacements2 = 1;
383800
383835
  }
383801
- await writeFile48(p.path, updated, "utf-8");
383836
+ await writeFile49(p.path, updated, "utf-8");
383802
383837
  return { ok: true, data: { replacements: replacements2 } };
383803
383838
  } catch (e) {
383804
383839
  return { ok: false, error: String(e) };
@@ -383870,7 +383905,7 @@ async function walk(root2, out, maxEntries) {
383870
383905
  for (const entry of entries) {
383871
383906
  if (out.length >= maxEntries)
383872
383907
  return;
383873
- const full = join128(root2, entry.name);
383908
+ const full = join129(root2, entry.name);
383874
383909
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === ".next")
383875
383910
  continue;
383876
383911
  if (entry.isDirectory()) {
@@ -384016,7 +384051,7 @@ async function startToolRpcServer() {
384016
384051
  _boundPort2 = addr.port;
384017
384052
  _server2 = server;
384018
384053
  logForDebugging(`[rpc] listening on 127.0.0.1:${_boundPort2}`);
384019
- mkdir46(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile48(PORT_FILE2, String(_boundPort2), "utf-8").catch(() => {}));
384054
+ mkdir47(getClaudeConfigHomeDir(), { recursive: true }).then(() => writeFile49(PORT_FILE2, String(_boundPort2), "utf-8").catch(() => {}));
384020
384055
  }
384021
384056
  resolve39();
384022
384057
  });
@@ -384029,7 +384064,7 @@ var DEFAULT_PORT2 = 7149, PORT_FILE2, _server2 = null, _boundPort2 = 0;
384029
384064
  var init_toolRpcServer = __esm(() => {
384030
384065
  init_debug();
384031
384066
  init_envUtils();
384032
- PORT_FILE2 = join128(getClaudeConfigHomeDir(), "rpc-port");
384067
+ PORT_FILE2 = join129(getClaudeConfigHomeDir(), "rpc-port");
384033
384068
  });
384034
384069
 
384035
384070
  // src/commands/rpc/rpc.tsx
@@ -384915,8 +384950,8 @@ var init_versions2 = __esm(() => {
384915
384950
  });
384916
384951
 
384917
384952
  // src/components/memory/MemoryFileSelector.tsx
384918
- import { mkdir as mkdir47 } from "fs/promises";
384919
- import { join as join129 } from "path";
384953
+ import { mkdir as mkdir48 } from "fs/promises";
384954
+ import { join as join130 } from "path";
384920
384955
  function MemoryFileSelector(t0) {
384921
384956
  const $2 = c3(58);
384922
384957
  const {
@@ -384924,8 +384959,8 @@ function MemoryFileSelector(t0) {
384924
384959
  onCancel
384925
384960
  } = t0;
384926
384961
  const existingMemoryFiles = import_react112.use(getMemoryFiles());
384927
- const userMemoryPath = join129(getClaudeConfigHomeDir(), "CLAUDE.md");
384928
- const projectMemoryPath = join129(getOriginalCwd(), "CLAUDE.md");
384962
+ const userMemoryPath = join130(getClaudeConfigHomeDir(), "CLAUDE.md");
384963
+ const projectMemoryPath = join130(getOriginalCwd(), "CLAUDE.md");
384929
384964
  const hasUserMemory = existingMemoryFiles.some((f) => f.path === userMemoryPath);
384930
384965
  const hasProjectMemory = existingMemoryFiles.some((f_0) => f_0.path === projectMemoryPath);
384931
384966
  const allMemoryFiles = [...existingMemoryFiles.filter(_temp79).map(_temp230), ...hasUserMemory ? [] : [{
@@ -385264,7 +385299,7 @@ function MemoryFileSelector(t0) {
385264
385299
  t20 = (value) => {
385265
385300
  if (value.startsWith(OPEN_FOLDER_PREFIX)) {
385266
385301
  const folderPath = value.slice(OPEN_FOLDER_PREFIX.length);
385267
- mkdir47(folderPath, {
385302
+ mkdir48(folderPath, {
385268
385303
  recursive: true
385269
385304
  }).catch(_temp86).then(() => openPath(folderPath));
385270
385305
  return;
@@ -385624,19 +385659,19 @@ var exports_memory = {};
385624
385659
  __export(exports_memory, {
385625
385660
  call: () => call55
385626
385661
  });
385627
- import { mkdir as mkdir48, writeFile as writeFile49 } from "fs/promises";
385662
+ import { mkdir as mkdir49, writeFile as writeFile50 } from "fs/promises";
385628
385663
  function MemoryCommand({
385629
385664
  onDone
385630
385665
  }) {
385631
385666
  const handleSelectMemoryFile = async (memoryPath) => {
385632
385667
  try {
385633
385668
  if (memoryPath.includes(getClaudeConfigHomeDir())) {
385634
- await mkdir48(getClaudeConfigHomeDir(), {
385669
+ await mkdir49(getClaudeConfigHomeDir(), {
385635
385670
  recursive: true
385636
385671
  });
385637
385672
  }
385638
385673
  try {
385639
- await writeFile49(memoryPath, "", {
385674
+ await writeFile50(memoryPath, "", {
385640
385675
  encoding: "utf8",
385641
385676
  flag: "wx"
385642
385677
  });
@@ -386558,7 +386593,7 @@ function Help(t0) {
386558
386593
  let t6;
386559
386594
  if ($2[31] !== tabs) {
386560
386595
  t6 = /* @__PURE__ */ jsx_dev_runtime238.jsxDEV(Tabs, {
386561
- title: `localclawd v${"1.7.9"}`,
386596
+ title: `localclawd v${"1.8.1"}`,
386562
386597
  color: "professionalBlue",
386563
386598
  defaultTab: "general",
386564
386599
  children: tabs
@@ -387936,7 +387971,7 @@ var exports_keybindings = {};
387936
387971
  __export(exports_keybindings, {
387937
387972
  call: () => call58
387938
387973
  });
387939
- import { mkdir as mkdir49, writeFile as writeFile50 } from "fs/promises";
387974
+ import { mkdir as mkdir50, writeFile as writeFile51 } from "fs/promises";
387940
387975
  import { dirname as dirname47 } from "path";
387941
387976
  async function call58() {
387942
387977
  if (!isKeybindingCustomizationEnabled()) {
@@ -387947,9 +387982,9 @@ async function call58() {
387947
387982
  }
387948
387983
  const keybindingsPath = getKeybindingsPath();
387949
387984
  let fileExists = false;
387950
- await mkdir49(dirname47(keybindingsPath), { recursive: true });
387985
+ await mkdir50(dirname47(keybindingsPath), { recursive: true });
387951
387986
  try {
387952
- await writeFile50(keybindingsPath, generateKeybindingsTemplate(), {
387987
+ await writeFile51(keybindingsPath, generateKeybindingsTemplate(), {
387953
387988
  encoding: "utf-8",
387954
387989
  flag: "wx"
387955
387990
  });
@@ -392259,7 +392294,7 @@ __export(exports_pluginStartupCheck, {
392259
392294
  findMissingPlugins: () => findMissingPlugins,
392260
392295
  checkEnabledPlugins: () => checkEnabledPlugins
392261
392296
  });
392262
- import { join as join130 } from "path";
392297
+ import { join as join131 } from "path";
392263
392298
  async function checkEnabledPlugins() {
392264
392299
  const settings = getInitialSettings();
392265
392300
  const enabledPlugins = [];
@@ -392394,7 +392429,7 @@ async function installSelectedPlugins(pluginsToInstall, onProgress, scope = "use
392394
392429
  } else {
392395
392430
  registerPluginInstallation({
392396
392431
  pluginId,
392397
- installPath: join130(marketplaceInstallLocation, entry.source),
392432
+ installPath: join131(marketplaceInstallLocation, entry.source),
392398
392433
  version: entry.version
392399
392434
  }, scope, projectPath);
392400
392435
  }
@@ -392712,10 +392747,10 @@ var init_AddMarketplace = __esm(() => {
392712
392747
 
392713
392748
  // src/utils/plugins/installCounts.ts
392714
392749
  import { randomBytes as randomBytes17 } from "crypto";
392715
- import { readFile as readFile56, rename as rename7, unlink as unlink17, writeFile as writeFile51 } from "fs/promises";
392716
- import { join as join131 } from "path";
392750
+ import { readFile as readFile56, rename as rename7, unlink as unlink17, writeFile as writeFile52 } from "fs/promises";
392751
+ import { join as join132 } from "path";
392717
392752
  function getInstallCountsCachePath() {
392718
- return join131(getPluginsDirectory(), INSTALL_COUNTS_CACHE_FILENAME);
392753
+ return join132(getPluginsDirectory(), INSTALL_COUNTS_CACHE_FILENAME);
392719
392754
  }
392720
392755
  async function loadInstallCountsCache() {
392721
392756
  const cachePath = getInstallCountsCachePath();
@@ -392770,7 +392805,7 @@ async function saveInstallCountsCache(cache3) {
392770
392805
  const pluginsDir = getPluginsDirectory();
392771
392806
  await getFsImplementation().mkdir(pluginsDir);
392772
392807
  const content = jsonStringify(cache3, null, 2);
392773
- await writeFile51(tempPath, content, {
392808
+ await writeFile52(tempPath, content, {
392774
392809
  encoding: "utf-8",
392775
392810
  mode: 384
392776
392811
  });
@@ -395457,7 +395492,7 @@ var init_DiscoverPlugins = __esm(() => {
395457
395492
  });
395458
395493
 
395459
395494
  // src/services/plugins/pluginOperations.ts
395460
- import { dirname as dirname48, join as join132 } from "path";
395495
+ import { dirname as dirname48, join as join133 } from "path";
395461
395496
  function assertInstallableScope(scope) {
395462
395497
  if (!VALID_INSTALLABLE_SCOPES.includes(scope)) {
395463
395498
  throw new Error(`Invalid scope "${scope}". Must be one of: ${VALID_INSTALLABLE_SCOPES.join(", ")}`);
@@ -395935,7 +395970,7 @@ async function performPluginUpdate({
395935
395970
  throw e;
395936
395971
  }
395937
395972
  const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname48(marketplaceInstallLocation);
395938
- sourcePath = join132(marketplaceDir, entry.source);
395973
+ sourcePath = join133(marketplaceDir, entry.source);
395939
395974
  try {
395940
395975
  await fs4.stat(sourcePath);
395941
395976
  } catch (e) {
@@ -395950,7 +395985,7 @@ async function performPluginUpdate({
395950
395985
  throw e;
395951
395986
  }
395952
395987
  let pluginManifest;
395953
- const manifestPath = join132(sourcePath, ".claude-plugin", "plugin.json");
395988
+ const manifestPath = join133(sourcePath, ".claude-plugin", "plugin.json");
395954
395989
  try {
395955
395990
  pluginManifest = await loadPluginManifest(manifestPath, entry.name, entry.source);
395956
395991
  } catch {}
@@ -397167,10 +397202,10 @@ var init_ManageMarketplaces = __esm(() => {
397167
397202
 
397168
397203
  // src/utils/plugins/pluginFlagging.ts
397169
397204
  import { randomBytes as randomBytes18 } from "crypto";
397170
- import { readFile as readFile57, rename as rename8, unlink as unlink18, writeFile as writeFile52 } from "fs/promises";
397171
- import { join as join133 } from "path";
397205
+ import { readFile as readFile57, rename as rename8, unlink as unlink18, writeFile as writeFile53 } from "fs/promises";
397206
+ import { join as join134 } from "path";
397172
397207
  function getFlaggedPluginsPath() {
397173
- return join133(getPluginsDirectory(), FLAGGED_PLUGINS_FILENAME);
397208
+ return join134(getPluginsDirectory(), FLAGGED_PLUGINS_FILENAME);
397174
397209
  }
397175
397210
  function parsePluginsData(content) {
397176
397211
  const parsed = jsonParse(content);
@@ -397208,7 +397243,7 @@ async function writeToDisk(plugins) {
397208
397243
  try {
397209
397244
  await getFsImplementation().mkdir(getPluginsDirectory());
397210
397245
  const content = jsonStringify({ plugins }, null, 2);
397211
- await writeFile52(tempPath, content, {
397246
+ await writeFile53(tempPath, content, {
397212
397247
  encoding: "utf-8",
397213
397248
  mode: 384
397214
397249
  });
@@ -403717,10 +403752,10 @@ var init_transcriptSearch = __esm(() => {
403717
403752
  });
403718
403753
 
403719
403754
  // src/utils/releaseNotes.ts
403720
- import { mkdir as mkdir50, readFile as readFile60, writeFile as writeFile53 } from "fs/promises";
403721
- import { dirname as dirname50, join as join136 } from "path";
403755
+ import { mkdir as mkdir51, readFile as readFile60, writeFile as writeFile54 } from "fs/promises";
403756
+ import { dirname as dirname50, join as join137 } from "path";
403722
403757
  function getChangelogCachePath() {
403723
- return join136(getClaudeConfigHomeDir(), "cache", "changelog.md");
403758
+ return join137(getClaudeConfigHomeDir(), "cache", "changelog.md");
403724
403759
  }
403725
403760
  async function migrateChangelogFromConfig() {
403726
403761
  const config2 = getGlobalConfig();
@@ -403729,8 +403764,8 @@ async function migrateChangelogFromConfig() {
403729
403764
  }
403730
403765
  const cachePath = getChangelogCachePath();
403731
403766
  try {
403732
- await mkdir50(dirname50(cachePath), { recursive: true });
403733
- await writeFile53(cachePath, config2.cachedChangelog, {
403767
+ await mkdir51(dirname50(cachePath), { recursive: true });
403768
+ await writeFile54(cachePath, config2.cachedChangelog, {
403734
403769
  encoding: "utf-8",
403735
403770
  flag: "wx"
403736
403771
  });
@@ -403751,8 +403786,8 @@ async function fetchAndStoreChangelog() {
403751
403786
  return;
403752
403787
  }
403753
403788
  const cachePath = getChangelogCachePath();
403754
- await mkdir50(dirname50(cachePath), { recursive: true });
403755
- await writeFile53(cachePath, changelogContent, { encoding: "utf-8" });
403789
+ await mkdir51(dirname50(cachePath), { recursive: true });
403790
+ await writeFile54(cachePath, changelogContent, { encoding: "utf-8" });
403756
403791
  changelogMemoryCache = changelogContent;
403757
403792
  const changelogLastFetched = Date.now();
403758
403793
  saveGlobalConfig((current) => ({
@@ -403820,7 +403855,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
403820
403855
  }
403821
403856
  return [];
403822
403857
  }
403823
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.7.9") {
403858
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.8.1") {
403824
403859
  if (process.env.USER_TYPE === "ant") {
403825
403860
  const changelog = MACRO.VERSION_CHANGELOG;
403826
403861
  if (changelog) {
@@ -403847,7 +403882,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.7.9") {
403847
403882
  releaseNotes
403848
403883
  };
403849
403884
  }
403850
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.7.9") {
403885
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.8.1") {
403851
403886
  if (process.env.USER_TYPE === "ant") {
403852
403887
  const changelog = MACRO.VERSION_CHANGELOG;
403853
403888
  if (changelog) {
@@ -404004,7 +404039,7 @@ function getRecentActivitySync() {
404004
404039
  return cachedActivity;
404005
404040
  }
404006
404041
  function getLogoDisplayData() {
404007
- const version = process.env.DEMO_VERSION ?? "1.7.9";
404042
+ const version = process.env.DEMO_VERSION ?? "1.8.1";
404008
404043
  const serverUrl = getDirectConnectServerUrl();
404009
404044
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
404010
404045
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -404389,9 +404424,9 @@ function checkCachedPassesEligibility() {
404389
404424
  hasCache: false
404390
404425
  };
404391
404426
  }
404392
- const { eligible: eligible2, timestamp: timestamp3 } = cachedEntry;
404427
+ const { eligible: eligible2, timestamp: timestamp4 } = cachedEntry;
404393
404428
  const now2 = Date.now();
404394
- const needsRefresh = now2 - timestamp3 > CACHE_EXPIRATION_MS;
404429
+ const needsRefresh = now2 - timestamp4 > CACHE_EXPIRATION_MS;
404395
404430
  return {
404396
404431
  eligible: eligible2,
404397
404432
  needsRefresh,
@@ -404474,11 +404509,11 @@ async function getCachedOrFetchPassesEligibility() {
404474
404509
  if (now2 - cachedEntry.timestamp > CACHE_EXPIRATION_MS) {
404475
404510
  logForDebugging("Passes: Cache stale, returning cached data and refreshing in background");
404476
404511
  fetchAndStorePassesEligibility();
404477
- const { timestamp: timestamp4, ...response2 } = cachedEntry;
404512
+ const { timestamp: timestamp5, ...response2 } = cachedEntry;
404478
404513
  return response2;
404479
404514
  }
404480
404515
  logForDebugging("Passes: Using fresh cached eligibility data");
404481
- const { timestamp: timestamp3, ...response } = cachedEntry;
404516
+ const { timestamp: timestamp4, ...response } = cachedEntry;
404482
404517
  return response;
404483
404518
  }
404484
404519
  async function prefetchPassesEligibility() {
@@ -405104,7 +405139,7 @@ function Logo() {
405104
405139
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
405105
405140
  t2 = () => {
405106
405141
  const currentConfig = getGlobalConfig();
405107
- if (currentConfig.lastReleaseNotesSeen === "1.7.9") {
405142
+ if (currentConfig.lastReleaseNotesSeen === "1.8.1") {
405108
405143
  return;
405109
405144
  }
405110
405145
  saveGlobalConfig(_temp326);
@@ -405763,12 +405798,12 @@ function Logo() {
405763
405798
  return t41;
405764
405799
  }
405765
405800
  function _temp326(current) {
405766
- if (current.lastReleaseNotesSeen === "1.7.9") {
405801
+ if (current.lastReleaseNotesSeen === "1.8.1") {
405767
405802
  return current;
405768
405803
  }
405769
405804
  return {
405770
405805
  ...current,
405771
- lastReleaseNotesSeen: "1.7.9"
405806
+ lastReleaseNotesSeen: "1.8.1"
405772
405807
  };
405773
405808
  }
405774
405809
  function _temp241(s_0) {
@@ -423126,7 +423161,7 @@ __export(exports_thinkback, {
423126
423161
  });
423127
423162
  import { execa as execa11 } from "execa";
423128
423163
  import { readFile as readFile61 } from "fs/promises";
423129
- import { join as join137 } from "path";
423164
+ import { join as join138 } from "path";
423130
423165
  function getMarketplaceName() {
423131
423166
  return OFFICIAL_MARKETPLACE_NAME;
423132
423167
  }
@@ -423144,15 +423179,15 @@ async function getThinkbackSkillDir() {
423144
423179
  if (!thinkbackPlugin) {
423145
423180
  return null;
423146
423181
  }
423147
- const skillDir = join137(thinkbackPlugin.path, "skills", SKILL_NAME);
423182
+ const skillDir = join138(thinkbackPlugin.path, "skills", SKILL_NAME);
423148
423183
  if (await pathExists(skillDir)) {
423149
423184
  return skillDir;
423150
423185
  }
423151
423186
  return null;
423152
423187
  }
423153
423188
  async function playAnimation(skillDir) {
423154
- const dataPath = join137(skillDir, "year_in_review.js");
423155
- const playerPath = join137(skillDir, "player.js");
423189
+ const dataPath = join138(skillDir, "year_in_review.js");
423190
+ const playerPath = join138(skillDir, "player.js");
423156
423191
  try {
423157
423192
  await readFile61(dataPath);
423158
423193
  } catch (e) {
@@ -423200,7 +423235,7 @@ async function playAnimation(skillDir) {
423200
423235
  } catch {} finally {
423201
423236
  inkInstance.exitAlternateScreen();
423202
423237
  }
423203
- const htmlPath = join137(skillDir, "year_in_review.html");
423238
+ const htmlPath = join138(skillDir, "year_in_review.html");
423204
423239
  if (await pathExists(htmlPath)) {
423205
423240
  const platform3 = getPlatform();
423206
423241
  const openCmd = platform3 === "macos" ? "open" : platform3 === "windows" ? "start" : "xdg-open";
@@ -423536,7 +423571,7 @@ function ThinkbackFlow(t0) {
423536
423571
  if (!skillDir) {
423537
423572
  return;
423538
423573
  }
423539
- const dataPath = join137(skillDir, "year_in_review.js");
423574
+ const dataPath = join138(skillDir, "year_in_review.js");
423540
423575
  pathExists(dataPath).then((exists) => {
423541
423576
  logForDebugging(`Checking for ${dataPath}: ${exists ? "found" : "not found"}`);
423542
423577
  setHasGenerated(exists);
@@ -423707,7 +423742,7 @@ var exports_thinkback_play = {};
423707
423742
  __export(exports_thinkback_play, {
423708
423743
  call: () => call72
423709
423744
  });
423710
- import { join as join138 } from "path";
423745
+ import { join as join139 } from "path";
423711
423746
  function getPluginId2() {
423712
423747
  const marketplaceName = process.env.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
423713
423748
  return `thinkback@${marketplaceName}`;
@@ -423729,7 +423764,7 @@ async function call72() {
423729
423764
  value: "Thinkback plugin installation path not found."
423730
423765
  };
423731
423766
  }
423732
- const skillDir = join138(firstInstall.installPath, "skills", SKILL_NAME2);
423767
+ const skillDir = join139(firstInstall.installPath, "skills", SKILL_NAME2);
423733
423768
  const result = await playAnimation(skillDir);
423734
423769
  return { type: "text", value: result.message };
423735
423770
  }
@@ -429764,7 +429799,7 @@ __export(exports_branch, {
429764
429799
  call: () => call80
429765
429800
  });
429766
429801
  import { randomUUID as randomUUID27 } from "crypto";
429767
- import { mkdir as mkdir51, readFile as readFile62, writeFile as writeFile54 } from "fs/promises";
429802
+ import { mkdir as mkdir52, readFile as readFile62, writeFile as writeFile55 } from "fs/promises";
429768
429803
  function deriveFirstPrompt(firstUserMessage) {
429769
429804
  const content = firstUserMessage?.message?.content;
429770
429805
  if (!content)
@@ -429780,7 +429815,7 @@ async function createFork(customTitle) {
429780
429815
  const projectDir = getProjectDir2(getOriginalCwd());
429781
429816
  const forkSessionPath = getTranscriptPathForSession(forkSessionId);
429782
429817
  const currentTranscriptPath = getTranscriptPath();
429783
- await mkdir51(projectDir, { recursive: true, mode: 448 });
429818
+ await mkdir52(projectDir, { recursive: true, mode: 448 });
429784
429819
  let transcriptContent;
429785
429820
  try {
429786
429821
  transcriptContent = await readFile62(currentTranscriptPath);
@@ -429828,7 +429863,7 @@ async function createFork(customTitle) {
429828
429863
  };
429829
429864
  lines.push(jsonStringify(forkedReplacementEntry));
429830
429865
  }
429831
- await writeFile54(forkSessionPath, lines.join(`
429866
+ await writeFile55(forkSessionPath, lines.join(`
429832
429867
  `) + `
429833
429868
  `, {
429834
429869
  encoding: "utf8",
@@ -430090,8 +430125,8 @@ var init_types11 = __esm(() => {
430090
430125
  });
430091
430126
 
430092
430127
  // src/components/agents/agentFileUtils.ts
430093
- import { mkdir as mkdir52, open as open12, unlink as unlink19 } from "fs/promises";
430094
- import { join as join139 } from "path";
430128
+ import { mkdir as mkdir53, open as open12, unlink as unlink19 } from "fs/promises";
430129
+ import { join as join140 } from "path";
430095
430130
  function formatAgentAsMarkdown(agentType, whenToUse, tools, systemPrompt, color3, model, memory2, effort) {
430096
430131
  const escapedWhenToUse = whenToUse.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\\\n");
430097
430132
  const isAllTools = tools === undefined || tools.length === 1 && tools[0] === "*";
@@ -430118,26 +430153,26 @@ function getAgentDirectoryPath(location) {
430118
430153
  case "flagSettings":
430119
430154
  throw new Error(`Cannot get directory path for ${location} agents`);
430120
430155
  case "userSettings":
430121
- return join139(getClaudeConfigHomeDir(), AGENT_PATHS.AGENTS_DIR);
430156
+ return join140(getClaudeConfigHomeDir(), AGENT_PATHS.AGENTS_DIR);
430122
430157
  case "projectSettings":
430123
- return join139(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430158
+ return join140(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430124
430159
  case "policySettings":
430125
- return join139(getManagedFilePath(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430160
+ return join140(getManagedFilePath(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430126
430161
  case "localSettings":
430127
- return join139(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430162
+ return join140(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430128
430163
  }
430129
430164
  }
430130
430165
  function getRelativeAgentDirectoryPath(location) {
430131
430166
  switch (location) {
430132
430167
  case "projectSettings":
430133
- return join139(".", AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430168
+ return join140(".", AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR);
430134
430169
  default:
430135
430170
  return getAgentDirectoryPath(location);
430136
430171
  }
430137
430172
  }
430138
430173
  function getNewAgentFilePath(agent) {
430139
430174
  const dirPath = getAgentDirectoryPath(agent.source);
430140
- return join139(dirPath, `${agent.agentType}.md`);
430175
+ return join140(dirPath, `${agent.agentType}.md`);
430141
430176
  }
430142
430177
  function getActualAgentFilePath(agent) {
430143
430178
  if (agent.source === "built-in") {
@@ -430148,14 +430183,14 @@ function getActualAgentFilePath(agent) {
430148
430183
  }
430149
430184
  const dirPath = getAgentDirectoryPath(agent.source);
430150
430185
  const filename = agent.filename || agent.agentType;
430151
- return join139(dirPath, `${filename}.md`);
430186
+ return join140(dirPath, `${filename}.md`);
430152
430187
  }
430153
430188
  function getNewRelativeAgentFilePath(agent) {
430154
430189
  if (agent.source === "built-in") {
430155
430190
  return "Built-in";
430156
430191
  }
430157
430192
  const dirPath = getRelativeAgentDirectoryPath(agent.source);
430158
- return join139(dirPath, `${agent.agentType}.md`);
430193
+ return join140(dirPath, `${agent.agentType}.md`);
430159
430194
  }
430160
430195
  function getActualRelativeAgentFilePath(agent) {
430161
430196
  if (isBuiltInAgent(agent)) {
@@ -430169,11 +430204,11 @@ function getActualRelativeAgentFilePath(agent) {
430169
430204
  }
430170
430205
  const dirPath = getRelativeAgentDirectoryPath(agent.source);
430171
430206
  const filename = agent.filename || agent.agentType;
430172
- return join139(dirPath, `${filename}.md`);
430207
+ return join140(dirPath, `${filename}.md`);
430173
430208
  }
430174
430209
  async function ensureAgentDirectoryExists(source) {
430175
430210
  const dirPath = getAgentDirectoryPath(source);
430176
- await mkdir52(dirPath, { recursive: true });
430211
+ await mkdir53(dirPath, { recursive: true });
430177
430212
  return dirPath;
430178
430213
  }
430179
430214
  async function saveAgentToFile(source, agentType, whenToUse, tools, systemPrompt, checkExists = true, color3, model, memory2, effort) {
@@ -436156,8 +436191,8 @@ var init_rewind = __esm(() => {
436156
436191
 
436157
436192
  // src/utils/heapDumpService.ts
436158
436193
  import { createWriteStream as createWriteStream2, writeFileSync as writeFileSync4 } from "fs";
436159
- import { readdir as readdir34, readFile as readFile63, writeFile as writeFile55 } from "fs/promises";
436160
- import { join as join140 } from "path";
436194
+ import { readdir as readdir34, readFile as readFile63, writeFile as writeFile56 } from "fs/promises";
436195
+ import { join as join141 } from "path";
436161
436196
  import { pipeline as pipeline2 } from "stream/promises";
436162
436197
  import {
436163
436198
  getHeapSnapshot,
@@ -436247,7 +436282,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
436247
436282
  smapsRollup,
436248
436283
  platform: process.platform,
436249
436284
  nodeVersion: process.version,
436250
- ccVersion: "1.7.9"
436285
+ ccVersion: "1.8.1"
436251
436286
  };
436252
436287
  }
436253
436288
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -436265,9 +436300,9 @@ async function performHeapDump(trigger = "manual", dumpNumber = 0) {
436265
436300
  const suffix = dumpNumber > 0 ? `-dump${dumpNumber}` : "";
436266
436301
  const heapFilename = `${sessionId}${suffix}.heapsnapshot`;
436267
436302
  const diagFilename = `${sessionId}${suffix}-diagnostics.json`;
436268
- const heapPath = join140(dumpDir, heapFilename);
436269
- const diagPath = join140(dumpDir, diagFilename);
436270
- await writeFile55(diagPath, jsonStringify(diagnostics, null, 2), {
436303
+ const heapPath = join141(dumpDir, heapFilename);
436304
+ const diagPath = join141(dumpDir, diagFilename);
436305
+ await writeFile56(diagPath, jsonStringify(diagnostics, null, 2), {
436271
436306
  mode: 384
436272
436307
  });
436273
436308
  logForDebugging(`[HeapDump] Diagnostics written to ${diagPath}`);
@@ -436832,7 +436867,7 @@ var init_bridge_kick = __esm(() => {
436832
436867
  var call87 = async () => {
436833
436868
  return {
436834
436869
  type: "text",
436835
- value: `${"1.7.9"} (built ${"2026-05-07T15:08:19.360Z"})`
436870
+ value: `${"1.8.1"} (built ${"2026-05-07T15:19:47.253Z"})`
436836
436871
  };
436837
436872
  }, version, version_default;
436838
436873
  var init_version = __esm(() => {
@@ -438199,8 +438234,8 @@ var init_advisor2 = __esm(() => {
438199
438234
 
438200
438235
  // src/skills/bundledSkills.ts
438201
438236
  import { constants as fsConstants4 } from "fs";
438202
- import { mkdir as mkdir53, open as open13 } from "fs/promises";
438203
- import { dirname as dirname51, isAbsolute as isAbsolute24, join as join141, normalize as normalize12, sep as pathSep2 } from "path";
438237
+ import { mkdir as mkdir54, open as open13 } from "fs/promises";
438238
+ import { dirname as dirname51, isAbsolute as isAbsolute24, join as join142, normalize as normalize12, sep as pathSep2 } from "path";
438204
438239
  function registerBundledSkill(definition) {
438205
438240
  const { files: files2 } = definition;
438206
438241
  let skillRoot;
@@ -438248,7 +438283,7 @@ function getBundledSkills() {
438248
438283
  return [...bundledSkills];
438249
438284
  }
438250
438285
  function getBundledSkillExtractDir(skillName) {
438251
- return join141(getBundledSkillsRoot(), skillName);
438286
+ return join142(getBundledSkillsRoot(), skillName);
438252
438287
  }
438253
438288
  async function extractBundledSkillFiles(skillName, files2) {
438254
438289
  const dir = getBundledSkillExtractDir(skillName);
@@ -438273,7 +438308,7 @@ async function writeSkillFiles(dir, files2) {
438273
438308
  byParent.set(parent2, [entry]);
438274
438309
  }
438275
438310
  await Promise.all([...byParent].map(async ([parent2, entries]) => {
438276
- await mkdir53(parent2, { recursive: true, mode: 448 });
438311
+ await mkdir54(parent2, { recursive: true, mode: 448 });
438277
438312
  await Promise.all(entries.map(([p, c5]) => safeWriteFile(p, c5)));
438278
438313
  }));
438279
438314
  }
@@ -438290,7 +438325,7 @@ function resolveSkillFilePath(baseDir, relPath) {
438290
438325
  if (isAbsolute24(normalized) || normalized.split(pathSep2).includes("..") || normalized.split("/").includes("..")) {
438291
438326
  throw new Error(`bundled skill file path escapes skill dir: ${relPath}`);
438292
438327
  }
438293
- return join141(baseDir, normalized);
438328
+ return join142(baseDir, normalized);
438294
438329
  }
438295
438330
  function prependBaseDir(blocks, baseDir) {
438296
438331
  const prefix = `Base directory for this skill: ${baseDir}
@@ -438649,7 +438684,7 @@ var init_exit2 = __esm(() => {
438649
438684
  });
438650
438685
 
438651
438686
  // src/components/ExportDialog.tsx
438652
- import { join as join142 } from "path";
438687
+ import { join as join143 } from "path";
438653
438688
  function ExportDialog({
438654
438689
  content,
438655
438690
  defaultFilename,
@@ -438682,7 +438717,7 @@ function ExportDialog({
438682
438717
  };
438683
438718
  const handleFilenameSubmit = () => {
438684
438719
  const finalFilename = filename.endsWith(".txt") ? filename : filename.replace(/\.[^.]+$/, "") + ".txt";
438685
- const filepath = join142(getCwd(), finalFilename);
438720
+ const filepath = join143(getCwd(), finalFilename);
438686
438721
  try {
438687
438722
  writeFileSync_DEPRECATED(filepath, content, {
438688
438723
  encoding: "utf-8",
@@ -438905,7 +438940,7 @@ __export(exports_export, {
438905
438940
  extractFirstPrompt: () => extractFirstPrompt,
438906
438941
  call: () => call91
438907
438942
  });
438908
- import { join as join143 } from "path";
438943
+ import { join as join144 } from "path";
438909
438944
  function formatTimestamp(date2) {
438910
438945
  const year = date2.getFullYear();
438911
438946
  const month = String(date2.getMonth() + 1).padStart(2, "0");
@@ -438949,7 +438984,7 @@ async function call91(onDone, context7, args) {
438949
438984
  const filename = args.trim();
438950
438985
  if (filename) {
438951
438986
  const finalFilename = filename.endsWith(".txt") ? filename : filename.replace(/\.[^.]+$/, "") + ".txt";
438952
- const filepath = join143(getCwd(), finalFilename);
438987
+ const filepath = join144(getCwd(), finalFilename);
438953
438988
  try {
438954
438989
  writeFileSync_DEPRECATED(filepath, content, {
438955
438990
  encoding: "utf-8",
@@ -438963,13 +438998,13 @@ async function call91(onDone, context7, args) {
438963
438998
  }
438964
438999
  }
438965
439000
  const firstPrompt = extractFirstPrompt(context7.messages);
438966
- const timestamp3 = formatTimestamp(new Date);
439001
+ const timestamp4 = formatTimestamp(new Date);
438967
439002
  let defaultFilename;
438968
439003
  if (firstPrompt) {
438969
439004
  const sanitized = sanitizeFilename(firstPrompt);
438970
- defaultFilename = sanitized ? `${timestamp3}-${sanitized}.txt` : `conversation-${timestamp3}.txt`;
439005
+ defaultFilename = sanitized ? `${timestamp4}-${sanitized}.txt` : `conversation-${timestamp4}.txt`;
438971
439006
  } else {
438972
- defaultFilename = `conversation-${timestamp3}.txt`;
439007
+ defaultFilename = `conversation-${timestamp4}.txt`;
438973
439008
  }
438974
439009
  return /* @__PURE__ */ jsx_dev_runtime368.jsxDEV(ExportDialog, {
438975
439010
  content,
@@ -440494,7 +440529,7 @@ var init_asciichart = __esm(() => {
440494
440529
  // src/utils/statsCache.ts
440495
440530
  import { randomBytes as randomBytes19 } from "crypto";
440496
440531
  import { open as open14 } from "fs/promises";
440497
- import { join as join144 } from "path";
440532
+ import { join as join145 } from "path";
440498
440533
  async function withStatsCacheLock(fn) {
440499
440534
  while (statsCacheLockPromise) {
440500
440535
  await statsCacheLockPromise;
@@ -440511,7 +440546,7 @@ async function withStatsCacheLock(fn) {
440511
440546
  }
440512
440547
  }
440513
440548
  function getStatsCachePath() {
440514
- return join144(getClaudeConfigHomeDir(), STATS_CACHE_FILENAME);
440549
+ return join145(getClaudeConfigHomeDir(), STATS_CACHE_FILENAME);
440515
440550
  }
440516
440551
  function getEmptyCache() {
440517
440552
  return {
@@ -441177,16 +441212,16 @@ var init_ansiToPng = __esm(() => {
441177
441212
  });
441178
441213
 
441179
441214
  // src/utils/screenshotClipboard.ts
441180
- import { mkdir as mkdir54, unlink as unlink20, writeFile as writeFile56 } from "fs/promises";
441215
+ import { mkdir as mkdir55, unlink as unlink20, writeFile as writeFile57 } from "fs/promises";
441181
441216
  import { tmpdir as tmpdir8 } from "os";
441182
- import { join as join145 } from "path";
441217
+ import { join as join146 } from "path";
441183
441218
  async function copyAnsiToClipboard(ansiText, options) {
441184
441219
  try {
441185
- const tempDir = join145(tmpdir8(), "claude-code-screenshots");
441186
- await mkdir54(tempDir, { recursive: true });
441187
- const pngPath = join145(tempDir, `screenshot-${Date.now()}.png`);
441220
+ const tempDir = join146(tmpdir8(), "claude-code-screenshots");
441221
+ await mkdir55(tempDir, { recursive: true });
441222
+ const pngPath = join146(tempDir, `screenshot-${Date.now()}.png`);
441188
441223
  const pngBuffer = ansiToPng(ansiText, options);
441189
- await writeFile56(pngPath, pngBuffer);
441224
+ await writeFile57(pngPath, pngBuffer);
441190
441225
  const result = await copyPngToClipboard(pngPath);
441191
441226
  try {
441192
441227
  await unlink20(pngPath);
@@ -441255,7 +441290,7 @@ var init_screenshotClipboard = __esm(() => {
441255
441290
 
441256
441291
  // src/utils/stats.ts
441257
441292
  import { open as open15 } from "fs/promises";
441258
- import { basename as basename40, join as join146, sep as sep30 } from "path";
441293
+ import { basename as basename40, join as join147, sep as sep30 } from "path";
441259
441294
  async function processSessionFiles(sessionFiles, options = {}) {
441260
441295
  const { fromDate, toDate } = options;
441261
441296
  const fs5 = getFsImplementation();
@@ -441433,17 +441468,17 @@ async function getAllSessionFiles() {
441433
441468
  return [];
441434
441469
  throw e;
441435
441470
  }
441436
- const projectDirs = allEntries.filter((dirent) => dirent.isDirectory()).map((dirent) => join146(projectsDir, dirent.name));
441471
+ const projectDirs = allEntries.filter((dirent) => dirent.isDirectory()).map((dirent) => join147(projectsDir, dirent.name));
441437
441472
  const projectResults = await Promise.all(projectDirs.map(async (projectDir) => {
441438
441473
  try {
441439
441474
  const entries = await fs5.readdir(projectDir);
441440
- const mainFiles = entries.filter((dirent) => dirent.isFile() && dirent.name.endsWith(".jsonl")).map((dirent) => join146(projectDir, dirent.name));
441475
+ const mainFiles = entries.filter((dirent) => dirent.isFile() && dirent.name.endsWith(".jsonl")).map((dirent) => join147(projectDir, dirent.name));
441441
441476
  const sessionDirs = entries.filter((dirent) => dirent.isDirectory());
441442
441477
  const subagentResults = await Promise.all(sessionDirs.map(async (sessionDir) => {
441443
- const subagentsDir = join146(projectDir, sessionDir.name, "subagents");
441478
+ const subagentsDir = join147(projectDir, sessionDir.name, "subagents");
441444
441479
  try {
441445
441480
  const subagentEntries = await fs5.readdir(subagentsDir);
441446
- return subagentEntries.filter((dirent) => dirent.isFile() && dirent.name.endsWith(".jsonl") && dirent.name.startsWith("agent-")).map((dirent) => join146(subagentsDir, dirent.name));
441481
+ return subagentEntries.filter((dirent) => dirent.isFile() && dirent.name.endsWith(".jsonl") && dirent.name.startsWith("agent-")).map((dirent) => join147(subagentsDir, dirent.name));
441447
441482
  } catch {
441448
441483
  return [];
441449
441484
  }
@@ -443313,16 +443348,16 @@ import { execFileSync as execFileSync3 } from "child_process";
443313
443348
  import { constants as fsConstants5 } from "fs";
443314
443349
  import {
443315
443350
  copyFile as copyFile9,
443316
- mkdir as mkdir55,
443351
+ mkdir as mkdir56,
443317
443352
  mkdtemp,
443318
443353
  readdir as readdir35,
443319
443354
  readFile as readFile64,
443320
443355
  rm as rm10,
443321
443356
  unlink as unlink21,
443322
- writeFile as writeFile57
443357
+ writeFile as writeFile58
443323
443358
  } from "fs/promises";
443324
443359
  import { tmpdir as tmpdir9 } from "os";
443325
- import { extname as extname14, join as join147 } from "path";
443360
+ import { extname as extname14, join as join148 } from "path";
443326
443361
  function getAnalysisModel() {
443327
443362
  return getDefaultOpusModel();
443328
443363
  }
@@ -443330,13 +443365,13 @@ function getInsightsModel() {
443330
443365
  return getDefaultOpusModel();
443331
443366
  }
443332
443367
  function getDataDir() {
443333
- return join147(getClaudeConfigHomeDir(), "usage-data");
443368
+ return join148(getClaudeConfigHomeDir(), "usage-data");
443334
443369
  }
443335
443370
  function getFacetsDir() {
443336
- return join147(getDataDir(), "facets");
443371
+ return join148(getDataDir(), "facets");
443337
443372
  }
443338
443373
  function getSessionMetaDir() {
443339
- return join147(getDataDir(), "session-meta");
443374
+ return join148(getDataDir(), "session-meta");
443340
443375
  }
443341
443376
  function getLanguageFromPath(filePath) {
443342
443377
  const ext = extname14(filePath).toLowerCase();
@@ -443681,7 +443716,7 @@ async function formatTranscriptWithSummarization(log2) {
443681
443716
  `);
443682
443717
  }
443683
443718
  async function loadCachedFacets(sessionId) {
443684
- const facetPath = join147(getFacetsDir(), `${sessionId}.json`);
443719
+ const facetPath = join148(getFacetsDir(), `${sessionId}.json`);
443685
443720
  try {
443686
443721
  const content = await readFile64(facetPath, { encoding: "utf-8" });
443687
443722
  const parsed = jsonParse(content);
@@ -443698,16 +443733,16 @@ async function loadCachedFacets(sessionId) {
443698
443733
  }
443699
443734
  async function saveFacets(facets) {
443700
443735
  try {
443701
- await mkdir55(getFacetsDir(), { recursive: true });
443736
+ await mkdir56(getFacetsDir(), { recursive: true });
443702
443737
  } catch {}
443703
- const facetPath = join147(getFacetsDir(), `${facets.session_id}.json`);
443704
- await writeFile57(facetPath, jsonStringify(facets, null, 2), {
443738
+ const facetPath = join148(getFacetsDir(), `${facets.session_id}.json`);
443739
+ await writeFile58(facetPath, jsonStringify(facets, null, 2), {
443705
443740
  encoding: "utf-8",
443706
443741
  mode: 384
443707
443742
  });
443708
443743
  }
443709
443744
  async function loadCachedSessionMeta(sessionId) {
443710
- const metaPath = join147(getSessionMetaDir(), `${sessionId}.json`);
443745
+ const metaPath = join148(getSessionMetaDir(), `${sessionId}.json`);
443711
443746
  try {
443712
443747
  const content = await readFile64(metaPath, { encoding: "utf-8" });
443713
443748
  return jsonParse(content);
@@ -443717,10 +443752,10 @@ async function loadCachedSessionMeta(sessionId) {
443717
443752
  }
443718
443753
  async function saveSessionMeta(meta) {
443719
443754
  try {
443720
- await mkdir55(getSessionMetaDir(), { recursive: true });
443755
+ await mkdir56(getSessionMetaDir(), { recursive: true });
443721
443756
  } catch {}
443722
- const metaPath = join147(getSessionMetaDir(), `${meta.session_id}.json`);
443723
- await writeFile57(metaPath, jsonStringify(meta, null, 2), {
443757
+ const metaPath = join148(getSessionMetaDir(), `${meta.session_id}.json`);
443758
+ await writeFile58(metaPath, jsonStringify(meta, null, 2), {
443724
443759
  encoding: "utf-8",
443725
443760
  mode: 384
443726
443761
  });
@@ -443775,9 +443810,9 @@ function detectMultiClauding(sessions) {
443775
443810
  const OVERLAP_WINDOW_MS = 30 * 60000;
443776
443811
  const allSessionMessages = [];
443777
443812
  for (const session2 of sessions) {
443778
- for (const timestamp3 of session2.user_message_timestamps) {
443813
+ for (const timestamp4 of session2.user_message_timestamps) {
443779
443814
  try {
443780
- const ts = new Date(timestamp3).getTime();
443815
+ const ts = new Date(timestamp4).getTime();
443781
443816
  allSessionMessages.push({ ts, sessionId: session2.session_id });
443782
443817
  } catch {}
443783
443818
  }
@@ -444776,7 +444811,7 @@ function generateHtmlReport(data, insights) {
444776
444811
  </html>`;
444777
444812
  }
444778
444813
  function buildExportData(data, insights, facets, remoteStats) {
444779
- const version2 = typeof MACRO !== "undefined" ? "1.7.9" : "unknown";
444814
+ const version2 = typeof MACRO !== "undefined" ? "1.8.1" : "unknown";
444780
444815
  const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
444781
444816
  const facets_summary = {
444782
444817
  total: facets.size,
@@ -444827,7 +444862,7 @@ async function scanAllSessions() {
444827
444862
  } catch {
444828
444863
  return [];
444829
444864
  }
444830
- const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join147(projectsDir, dirent.name));
444865
+ const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join148(projectsDir, dirent.name));
444831
444866
  const allSessions = [];
444832
444867
  for (let i2 = 0;i2 < projectDirs.length; i2++) {
444833
444868
  const sessionFiles = await getSessionFilesWithMtime(projectDirs[i2]);
@@ -444849,7 +444884,7 @@ async function scanAllSessions() {
444849
444884
  async function generateUsageReport(options) {
444850
444885
  let remoteStats;
444851
444886
  if (process.env.USER_TYPE === "ant" && options?.collectRemote) {
444852
- const destDir = join147(getClaudeConfigHomeDir(), "projects");
444887
+ const destDir = join148(getClaudeConfigHomeDir(), "projects");
444853
444888
  const { hosts, totalCopied } = await collectAllRemoteHostData(destDir);
444854
444889
  remoteStats = { hosts, totalCopied };
444855
444890
  }
@@ -444986,10 +445021,10 @@ async function generateUsageReport(options) {
444986
445021
  const insights = await generateParallelInsights(aggregated, facets);
444987
445022
  const htmlReport = generateHtmlReport(aggregated, insights);
444988
445023
  try {
444989
- await mkdir55(getDataDir(), { recursive: true });
445024
+ await mkdir56(getDataDir(), { recursive: true });
444990
445025
  } catch {}
444991
- const htmlPath = join147(getDataDir(), "report.html");
444992
- await writeFile57(htmlPath, htmlReport, {
445026
+ const htmlPath = join148(getDataDir(), "report.html");
445027
+ await writeFile58(htmlPath, htmlReport, {
444993
445028
  encoding: "utf-8",
444994
445029
  mode: 384
444995
445030
  });
@@ -445084,13 +445119,13 @@ var init_insights = __esm(() => {
445084
445119
  } : async () => 0;
445085
445120
  collectFromRemoteHost = process.env.USER_TYPE === "ant" ? async (homespace, destDir) => {
445086
445121
  const result = { copied: 0, skipped: 0 };
445087
- const tempDir = await mkdtemp(join147(tmpdir9(), "claude-hs-"));
445122
+ const tempDir = await mkdtemp(join148(tmpdir9(), "claude-hs-"));
445088
445123
  try {
445089
445124
  const scpResult = await execFileNoThrow("scp", ["-rq", `${homespace}.coder:/root/.claude/projects/`, tempDir], { timeout: 300000 });
445090
445125
  if (scpResult.code !== 0) {
445091
445126
  return result;
445092
445127
  }
445093
- const projectsDir = join147(tempDir, "projects");
445128
+ const projectsDir = join148(tempDir, "projects");
445094
445129
  let projectDirents;
445095
445130
  try {
445096
445131
  projectDirents = await readdir35(projectsDir, { withFileTypes: true });
@@ -445099,13 +445134,13 @@ var init_insights = __esm(() => {
445099
445134
  }
445100
445135
  await Promise.all(projectDirents.map(async (dirent) => {
445101
445136
  const projectName = dirent.name;
445102
- const projectPath = join147(projectsDir, projectName);
445137
+ const projectPath = join148(projectsDir, projectName);
445103
445138
  if (!dirent.isDirectory())
445104
445139
  return;
445105
445140
  const destProjectName = `${projectName}__${homespace}`;
445106
- const destProjectPath = join147(destDir, destProjectName);
445141
+ const destProjectPath = join148(destDir, destProjectName);
445107
445142
  try {
445108
- await mkdir55(destProjectPath, { recursive: true });
445143
+ await mkdir56(destProjectPath, { recursive: true });
445109
445144
  } catch {}
445110
445145
  let files2;
445111
445146
  try {
@@ -445117,8 +445152,8 @@ var init_insights = __esm(() => {
445117
445152
  const fileName = fileDirent.name;
445118
445153
  if (!fileName.endsWith(".jsonl"))
445119
445154
  return;
445120
- const srcFile = join147(projectPath, fileName);
445121
- const destFile = join147(destProjectPath, fileName);
445155
+ const srcFile = join148(projectPath, fileName);
445156
+ const destFile = join148(destProjectPath, fileName);
445122
445157
  try {
445123
445158
  await copyFile9(srcFile, destFile, fsConstants5.COPYFILE_EXCL);
445124
445159
  result.copied++;
@@ -445425,9 +445460,9 @@ Find something genuinely interesting or amusing from the session summaries.`,
445425
445460
  let reportUrl = `file://${htmlPath}`;
445426
445461
  let uploadHint = "";
445427
445462
  if (process.env.USER_TYPE === "ant") {
445428
- const timestamp3 = new Date().toISOString().replace(/[-:]/g, "").replace("T", "_").slice(0, 15);
445463
+ const timestamp4 = new Date().toISOString().replace(/[-:]/g, "").replace("T", "_").slice(0, 15);
445429
445464
  const username = process.env.SAFEUSER || process.env.USER || "unknown";
445430
- const filename = `${username}_insights_${timestamp3}.html`;
445465
+ const filename = `${username}_insights_${timestamp4}.html`;
445431
445466
  const s3Path = `s3://anthropic-serve/atamkin/cc-user-reports/${filename}`;
445432
445467
  const s3Url = `https://s3-frontend.infra.ant.dev/anthropic-serve/atamkin/cc-user-reports/${filename}`;
445433
445468
  reportUrl = s3Url;
@@ -446149,14 +446184,14 @@ import { closeSync as closeSync4, fstatSync, openSync as openSync5, readSync as
446149
446184
  import {
446150
446185
  appendFile as fsAppendFile,
446151
446186
  open as fsOpen2,
446152
- mkdir as mkdir56,
446187
+ mkdir as mkdir57,
446153
446188
  readdir as readdir36,
446154
446189
  readFile as readFile65,
446155
446190
  stat as stat49,
446156
446191
  unlink as unlink22,
446157
- writeFile as writeFile58
446192
+ writeFile as writeFile59
446158
446193
  } from "fs/promises";
446159
- import { basename as basename41, dirname as dirname53, join as join148 } from "path";
446194
+ import { basename as basename41, dirname as dirname53, join as join149 } from "path";
446160
446195
  function isTranscriptMessage(entry) {
446161
446196
  return entry.type === "user" || entry.type === "assistant" || entry.type === "attachment" || entry.type === "system";
446162
446197
  }
@@ -446170,18 +446205,18 @@ function isEphemeralToolProgress(dataType) {
446170
446205
  return typeof dataType === "string" && EPHEMERAL_PROGRESS_TYPES.has(dataType);
446171
446206
  }
446172
446207
  function getProjectsDir2() {
446173
- return join148(getClaudeConfigHomeDir(), "projects");
446208
+ return join149(getClaudeConfigHomeDir(), "projects");
446174
446209
  }
446175
446210
  function getTranscriptPath() {
446176
446211
  const projectDir = getSessionProjectDir() ?? getProjectDir2(getOriginalCwd());
446177
- return join148(projectDir, `${getSessionId()}.jsonl`);
446212
+ return join149(projectDir, `${getSessionId()}.jsonl`);
446178
446213
  }
446179
446214
  function getTranscriptPathForSession(sessionId) {
446180
446215
  if (sessionId === getSessionId()) {
446181
446216
  return getTranscriptPath();
446182
446217
  }
446183
446218
  const projectDir = getProjectDir2(getOriginalCwd());
446184
- return join148(projectDir, `${sessionId}.jsonl`);
446219
+ return join149(projectDir, `${sessionId}.jsonl`);
446185
446220
  }
446186
446221
  function setAgentTranscriptSubdir(agentId, subdir) {
446187
446222
  agentTranscriptSubdirs.set(agentId, subdir);
@@ -446193,16 +446228,16 @@ function getAgentTranscriptPath(agentId) {
446193
446228
  const projectDir = getSessionProjectDir() ?? getProjectDir2(getOriginalCwd());
446194
446229
  const sessionId = getSessionId();
446195
446230
  const subdir = agentTranscriptSubdirs.get(agentId);
446196
- const base = subdir ? join148(projectDir, sessionId, "subagents", subdir) : join148(projectDir, sessionId, "subagents");
446197
- return join148(base, `agent-${agentId}.jsonl`);
446231
+ const base = subdir ? join149(projectDir, sessionId, "subagents", subdir) : join149(projectDir, sessionId, "subagents");
446232
+ return join149(base, `agent-${agentId}.jsonl`);
446198
446233
  }
446199
446234
  function getAgentMetadataPath(agentId) {
446200
446235
  return getAgentTranscriptPath(agentId).replace(/\.jsonl$/, ".meta.json");
446201
446236
  }
446202
446237
  async function writeAgentMetadata(agentId, metadata) {
446203
446238
  const path15 = getAgentMetadataPath(agentId);
446204
- await mkdir56(dirname53(path15), { recursive: true });
446205
- await writeFile58(path15, JSON.stringify(metadata));
446239
+ await mkdir57(dirname53(path15), { recursive: true });
446240
+ await writeFile59(path15, JSON.stringify(metadata));
446206
446241
  }
446207
446242
  async function readAgentMetadata(agentId) {
446208
446243
  const path15 = getAgentMetadataPath(agentId);
@@ -446217,15 +446252,15 @@ async function readAgentMetadata(agentId) {
446217
446252
  }
446218
446253
  function getRemoteAgentsDir() {
446219
446254
  const projectDir = getSessionProjectDir() ?? getProjectDir2(getOriginalCwd());
446220
- return join148(projectDir, getSessionId(), "remote-agents");
446255
+ return join149(projectDir, getSessionId(), "remote-agents");
446221
446256
  }
446222
446257
  function getRemoteAgentMetadataPath(taskId) {
446223
- return join148(getRemoteAgentsDir(), `remote-agent-${taskId}.meta.json`);
446258
+ return join149(getRemoteAgentsDir(), `remote-agent-${taskId}.meta.json`);
446224
446259
  }
446225
446260
  async function writeRemoteAgentMetadata(taskId, metadata) {
446226
446261
  const path15 = getRemoteAgentMetadataPath(taskId);
446227
- await mkdir56(dirname53(path15), { recursive: true });
446228
- await writeFile58(path15, JSON.stringify(metadata));
446262
+ await mkdir57(dirname53(path15), { recursive: true });
446263
+ await writeFile59(path15, JSON.stringify(metadata));
446229
446264
  }
446230
446265
  async function readRemoteAgentMetadata(taskId) {
446231
446266
  const path15 = getRemoteAgentMetadataPath(taskId);
@@ -446263,7 +446298,7 @@ async function listRemoteAgentMetadata() {
446263
446298
  if (!entry.isFile() || !entry.name.endsWith(".meta.json"))
446264
446299
  continue;
446265
446300
  try {
446266
- const raw = await readFile65(join148(dir, entry.name), "utf-8");
446301
+ const raw = await readFile65(join149(dir, entry.name), "utf-8");
446267
446302
  results.push(JSON.parse(raw));
446268
446303
  } catch (e) {
446269
446304
  logForDebugging(`listRemoteAgentMetadata: skipping ${entry.name}: ${String(e)}`);
@@ -446273,7 +446308,7 @@ async function listRemoteAgentMetadata() {
446273
446308
  }
446274
446309
  function sessionIdExists(sessionId) {
446275
446310
  const projectDir = getProjectDir2(getOriginalCwd());
446276
- const sessionFile = join148(projectDir, `${sessionId}.jsonl`);
446311
+ const sessionFile = join149(projectDir, `${sessionId}.jsonl`);
446277
446312
  const fs5 = getFsImplementation();
446278
446313
  try {
446279
446314
  fs5.statSync(sessionFile);
@@ -446413,7 +446448,7 @@ class Project {
446413
446448
  try {
446414
446449
  await fsAppendFile(filePath, data, { mode: 384 });
446415
446450
  } catch {
446416
- await mkdir56(dirname53(filePath), { recursive: true, mode: 448 });
446451
+ await mkdir57(dirname53(filePath), { recursive: true, mode: 448 });
446417
446452
  await fsAppendFile(filePath, data, { mode: 384 });
446418
446453
  }
446419
446454
  }
@@ -446617,7 +446652,7 @@ class Project {
446617
446652
  return true;
446618
446653
  }
446619
446654
  });
446620
- await writeFile58(this.sessionFile, lines.join(`
446655
+ await writeFile59(this.sessionFile, lines.join(`
446621
446656
  `), {
446622
446657
  encoding: "utf8"
446623
446658
  });
@@ -446954,11 +446989,11 @@ async function hydrateRemoteSession(sessionId, ingressUrl) {
446954
446989
  try {
446955
446990
  const remoteLogs = await getSessionLogs(sessionId, ingressUrl) || [];
446956
446991
  const projectDir = getProjectDir2(getOriginalCwd());
446957
- await mkdir56(projectDir, { recursive: true, mode: 448 });
446992
+ await mkdir57(projectDir, { recursive: true, mode: 448 });
446958
446993
  const sessionFile = getTranscriptPathForSession(sessionId);
446959
446994
  const content = remoteLogs.map((e) => jsonStringify(e) + `
446960
446995
  `).join("");
446961
- await writeFile58(sessionFile, content, { encoding: "utf8", mode: 384 });
446996
+ await writeFile59(sessionFile, content, { encoding: "utf8", mode: 384 });
446962
446997
  logForDebugging(`Hydrated ${remoteLogs.length} entries from remote`);
446963
446998
  return remoteLogs.length > 0;
446964
446999
  } catch (error5) {
@@ -446986,11 +447021,11 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
446986
447021
  return false;
446987
447022
  }
446988
447023
  const projectDir = getProjectDir2(getOriginalCwd());
446989
- await mkdir56(projectDir, { recursive: true, mode: 448 });
447024
+ await mkdir57(projectDir, { recursive: true, mode: 448 });
446990
447025
  const sessionFile = getTranscriptPathForSession(sessionId);
446991
447026
  const fgContent = events2.map((e) => jsonStringify(e.payload) + `
446992
447027
  `).join("");
446993
- await writeFile58(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
447028
+ await writeFile59(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
446994
447029
  logForDebugging(`Hydrated ${events2.length} foreground entries from CCR v2 internal events`);
446995
447030
  let subagentEventCount = 0;
446996
447031
  const subagentReader = project2.getInternalSubagentEventReader();
@@ -447012,10 +447047,10 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
447012
447047
  }
447013
447048
  for (const [agentId, entries] of byAgent) {
447014
447049
  const agentFile = getAgentTranscriptPath(asAgentId(agentId));
447015
- await mkdir56(dirname53(agentFile), { recursive: true, mode: 448 });
447050
+ await mkdir57(dirname53(agentFile), { recursive: true, mode: 448 });
447016
447051
  const agentContent = entries.map((p) => jsonStringify(p) + `
447017
447052
  `).join("");
447018
- await writeFile58(agentFile, agentContent, {
447053
+ await writeFile59(agentFile, agentContent, {
447019
447054
  encoding: "utf8",
447020
447055
  mode: 384
447021
447056
  });
@@ -448242,7 +448277,7 @@ async function loadTranscriptFile(filePath, opts) {
448242
448277
  };
448243
448278
  }
448244
448279
  async function loadSessionFile(sessionId) {
448245
- const sessionFile = join148(getSessionProjectDir() ?? getProjectDir2(getOriginalCwd()), `${sessionId}.jsonl`);
448280
+ const sessionFile = join149(getSessionProjectDir() ?? getProjectDir2(getOriginalCwd()), `${sessionId}.jsonl`);
448246
448281
  return loadTranscriptFile(sessionFile);
448247
448282
  }
448248
448283
  function clearSessionMessagesCache() {
@@ -448310,7 +448345,7 @@ async function loadAllProjectsMessageLogsFull(limit) {
448310
448345
  } catch {
448311
448346
  return [];
448312
448347
  }
448313
- const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join148(projectsDir, dirent.name));
448348
+ const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join149(projectsDir, dirent.name));
448314
448349
  const logsPerProject = await Promise.all(projectDirs.map((projectDir) => getLogsWithoutIndex(projectDir, limit)));
448315
448350
  const allLogs = logsPerProject.flat();
448316
448351
  const deduped = new Map;
@@ -448335,7 +448370,7 @@ async function loadAllProjectsMessageLogsProgressive(limit, initialEnrichCount =
448335
448370
  } catch {
448336
448371
  return { logs: [], allStatLogs: [], nextIndex: 0 };
448337
448372
  }
448338
- const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join148(projectsDir, dirent.name));
448373
+ const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join149(projectsDir, dirent.name));
448339
448374
  const rawLogs = [];
448340
448375
  for (const projectDir of projectDirs) {
448341
448376
  rawLogs.push(...await getSessionFilesLite(projectDir, limit));
@@ -448396,7 +448431,7 @@ async function getStatOnlyLogsForWorktrees(worktreePaths, limit) {
448396
448431
  for (const { path: wtPath, prefix } of indexed) {
448397
448432
  if (dirName === prefix || dirName.startsWith(prefix + "-")) {
448398
448433
  seenDirs.add(dirName);
448399
- allLogs.push(...await getSessionFilesLite(join148(projectsDir, dirent.name), undefined, wtPath));
448434
+ allLogs.push(...await getSessionFilesLite(join149(projectsDir, dirent.name), undefined, wtPath));
448400
448435
  break;
448401
448436
  }
448402
448437
  }
@@ -448465,7 +448500,7 @@ async function loadSubagentTranscripts(agentIds) {
448465
448500
  return transcripts;
448466
448501
  }
448467
448502
  async function loadAllSubagentTranscriptsFromDisk() {
448468
- const subagentsDir = join148(getSessionProjectDir() ?? getProjectDir2(getOriginalCwd()), getSessionId(), "subagents");
448503
+ const subagentsDir = join149(getSessionProjectDir() ?? getProjectDir2(getOriginalCwd()), getSessionId(), "subagents");
448469
448504
  let entries;
448470
448505
  try {
448471
448506
  entries = await readdir36(subagentsDir, { withFileTypes: true });
@@ -448593,7 +448628,7 @@ async function getSessionFilesWithMtime(projectDir) {
448593
448628
  const sessionId = validateUuid2(basename41(dirent.name, ".jsonl"));
448594
448629
  if (!sessionId)
448595
448630
  continue;
448596
- candidates.push({ sessionId, filePath: join148(projectDir, dirent.name) });
448631
+ candidates.push({ sessionId, filePath: join149(projectDir, dirent.name) });
448597
448632
  }
448598
448633
  await Promise.all(candidates.map(async ({ sessionId, filePath }) => {
448599
448634
  try {
@@ -448977,7 +449012,7 @@ var init_sessionStorage = __esm(() => {
448977
449012
  init_settings2();
448978
449013
  init_slowOperations();
448979
449014
  init_uuid();
448980
- VERSION6 = typeof MACRO !== "undefined" ? "1.7.9" : "unknown";
449015
+ VERSION6 = typeof MACRO !== "undefined" ? "1.8.1" : "unknown";
448981
449016
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
448982
449017
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
448983
449018
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -448989,7 +449024,7 @@ var init_sessionStorage = __esm(() => {
448989
449024
  MAX_TRANSCRIPT_READ_BYTES = 50 * 1024 * 1024;
448990
449025
  agentTranscriptSubdirs = new Map;
448991
449026
  getProjectDir2 = memoize_default((projectDir) => {
448992
- return join148(getProjectsDir2(), sanitizePath2(projectDir));
449027
+ return join149(getProjectsDir2(), sanitizePath2(projectDir));
448993
449028
  });
448994
449029
  METADATA_TYPE_MARKERS = [
448995
449030
  '"type":"summary"',
@@ -449225,41 +449260,41 @@ var init_memdir = __esm(() => {
449225
449260
  });
449226
449261
 
449227
449262
  // src/tools/AgentTool/agentMemory.ts
449228
- import { join as join149, normalize as normalize13, sep as sep31 } from "path";
449263
+ import { join as join150, normalize as normalize13, sep as sep31 } from "path";
449229
449264
  function sanitizeAgentTypeForPath(agentType) {
449230
449265
  return agentType.replace(/:/g, "-");
449231
449266
  }
449232
449267
  function getLocalAgentMemoryDir(dirName) {
449233
449268
  if (process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR) {
449234
- return join149(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects", sanitizePath2(findCanonicalGitRoot(getProjectRoot()) ?? getProjectRoot()), "agent-memory-local", dirName) + sep31;
449269
+ return join150(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects", sanitizePath2(findCanonicalGitRoot(getProjectRoot()) ?? getProjectRoot()), "agent-memory-local", dirName) + sep31;
449235
449270
  }
449236
- return join149(getProjectMemoryBaseDir(), "agent-memory-local", dirName) + sep31;
449271
+ return join150(getProjectMemoryBaseDir(), "agent-memory-local", dirName) + sep31;
449237
449272
  }
449238
449273
  function getAgentMemoryDir(agentType, scope) {
449239
449274
  const dirName = sanitizeAgentTypeForPath(agentType);
449240
449275
  switch (scope) {
449241
449276
  case "project":
449242
- return join149(getProjectMemoryBaseDir(), "agent-memory", dirName) + sep31;
449277
+ return join150(getProjectMemoryBaseDir(), "agent-memory", dirName) + sep31;
449243
449278
  case "local":
449244
449279
  return getLocalAgentMemoryDir(dirName);
449245
449280
  case "user":
449246
- return join149(getMemoryBaseDir(), "agent-memory", dirName) + sep31;
449281
+ return join150(getMemoryBaseDir(), "agent-memory", dirName) + sep31;
449247
449282
  }
449248
449283
  }
449249
449284
  function isAgentMemoryPath(absolutePath) {
449250
449285
  const normalizedPath = normalize13(absolutePath);
449251
449286
  const memoryBase = getMemoryBaseDir();
449252
- if (normalizedPath.startsWith(join149(memoryBase, "agent-memory") + sep31)) {
449287
+ if (normalizedPath.startsWith(join150(memoryBase, "agent-memory") + sep31)) {
449253
449288
  return true;
449254
449289
  }
449255
- if (normalizedPath.startsWith(join149(getProjectMemoryBaseDir(), "agent-memory") + sep31)) {
449290
+ if (normalizedPath.startsWith(join150(getProjectMemoryBaseDir(), "agent-memory") + sep31)) {
449256
449291
  return true;
449257
449292
  }
449258
449293
  if (process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR) {
449259
- if (normalizedPath.includes(sep31 + "agent-memory-local" + sep31) && normalizedPath.startsWith(join149(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects") + sep31)) {
449294
+ if (normalizedPath.includes(sep31 + "agent-memory-local" + sep31) && normalizedPath.startsWith(join150(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects") + sep31)) {
449260
449295
  return true;
449261
449296
  }
449262
- } else if (normalizedPath.startsWith(join149(getProjectMemoryBaseDir(), "agent-memory-local") + sep31)) {
449297
+ } else if (normalizedPath.startsWith(join150(getProjectMemoryBaseDir(), "agent-memory-local") + sep31)) {
449263
449298
  return true;
449264
449299
  }
449265
449300
  return false;
@@ -449267,7 +449302,7 @@ function isAgentMemoryPath(absolutePath) {
449267
449302
  function getMemoryScopeDisplay(memory2) {
449268
449303
  switch (memory2) {
449269
449304
  case "user":
449270
- return `User (${join149(getMemoryBaseDir(), "agent-memory")}/)`;
449305
+ return `User (${join150(getMemoryBaseDir(), "agent-memory")}/)`;
449271
449306
  case "project":
449272
449307
  return "Project (.localclawd/agent-memory/)";
449273
449308
  case "local":
@@ -449309,7 +449344,7 @@ var init_agentMemory = __esm(() => {
449309
449344
  // src/utils/permissions/filesystem.ts
449310
449345
  import { randomBytes as randomBytes20 } from "crypto";
449311
449346
  import { homedir as homedir35, tmpdir as tmpdir10 } from "os";
449312
- import { join as join150, normalize as normalize14, posix as posix8, sep as sep32 } from "path";
449347
+ import { join as join151, normalize as normalize14, posix as posix8, sep as sep32 } from "path";
449313
449348
  function normalizeCaseForComparison(path15) {
449314
449349
  return path15.toLowerCase();
449315
449350
  }
@@ -449318,11 +449353,11 @@ function getClaudeSkillScope(filePath) {
449318
449353
  const absolutePathLower = normalizeCaseForComparison(absolutePath);
449319
449354
  const bases = [
449320
449355
  {
449321
- dir: expandPath(join150(getOriginalCwd(), ".claude", "skills")),
449356
+ dir: expandPath(join151(getOriginalCwd(), ".claude", "skills")),
449322
449357
  prefix: "/.claude/skills/"
449323
449358
  },
449324
449359
  {
449325
- dir: expandPath(join150(homedir35(), ".claude", "skills")),
449360
+ dir: expandPath(join151(homedir35(), ".claude", "skills")),
449326
449361
  prefix: "~/.claude/skills/"
449327
449362
  }
449328
449363
  ];
@@ -449377,21 +449412,21 @@ function isClaudeConfigFilePath(filePath) {
449377
449412
  if (isClaudeSettingsPath(filePath)) {
449378
449413
  return true;
449379
449414
  }
449380
- const commandsDir = join150(getOriginalCwd(), ".claude", "commands");
449381
- const agentsDir = join150(getOriginalCwd(), ".claude", "agents");
449382
- const skillsDir = join150(getOriginalCwd(), ".claude", "skills");
449415
+ const commandsDir = join151(getOriginalCwd(), ".claude", "commands");
449416
+ const agentsDir = join151(getOriginalCwd(), ".claude", "agents");
449417
+ const skillsDir = join151(getOriginalCwd(), ".claude", "skills");
449383
449418
  return pathInWorkingPath(filePath, commandsDir) || pathInWorkingPath(filePath, agentsDir) || pathInWorkingPath(filePath, skillsDir);
449384
449419
  }
449385
449420
  function isSessionPlanFile(absolutePath) {
449386
- const expectedPrefix = join150(getPlansDirectory(), getPlanSlug());
449421
+ const expectedPrefix = join151(getPlansDirectory(), getPlanSlug());
449387
449422
  const normalizedPath = normalize14(absolutePath);
449388
449423
  return normalizedPath.startsWith(expectedPrefix) && normalizedPath.endsWith(".md");
449389
449424
  }
449390
449425
  function getSessionMemoryDir() {
449391
- return join150(getProjectDir2(getCwd()), getSessionId(), "session-memory") + sep32;
449426
+ return join151(getProjectDir2(getCwd()), getSessionId(), "session-memory") + sep32;
449392
449427
  }
449393
449428
  function getSessionMemoryPath() {
449394
- return join150(getSessionMemoryDir(), "summary.md");
449429
+ return join151(getSessionMemoryDir(), "summary.md");
449395
449430
  }
449396
449431
  function isSessionMemoryPath(absolutePath) {
449397
449432
  const normalizedPath = normalize14(absolutePath);
@@ -449413,10 +449448,10 @@ function getClaudeTempDirName() {
449413
449448
  return `claude-${uid}`;
449414
449449
  }
449415
449450
  function getProjectTempDir() {
449416
- return join150(getClaudeTempDir(), sanitizePath2(getOriginalCwd())) + sep32;
449451
+ return join151(getClaudeTempDir(), sanitizePath2(getOriginalCwd())) + sep32;
449417
449452
  }
449418
449453
  function getScratchpadDir() {
449419
- return join150(getProjectTempDir(), getSessionId(), "scratchpad");
449454
+ return join151(getProjectTempDir(), getSessionId(), "scratchpad");
449420
449455
  }
449421
449456
  async function ensureScratchpadDir() {
449422
449457
  if (!isScratchpadEnabled()) {
@@ -449994,7 +450029,7 @@ function checkEditableInternalPath(absolutePath, input) {
449994
450029
  }
449995
450030
  };
449996
450031
  }
449997
- if (normalizeCaseForComparison(normalizedPath) === normalizeCaseForComparison(join150(getOriginalCwd(), ".claude", "launch.json"))) {
450032
+ if (normalizeCaseForComparison(normalizedPath) === normalizeCaseForComparison(join151(getOriginalCwd(), ".claude", "launch.json"))) {
449998
450033
  return {
449999
450034
  behavior: "allow",
450000
450035
  updatedInput: input,
@@ -450091,7 +450126,7 @@ function checkReadableInternalPath(absolutePath, input) {
450091
450126
  }
450092
450127
  };
450093
450128
  }
450094
- const tasksDir = join150(getClaudeConfigHomeDir(), "tasks") + sep32;
450129
+ const tasksDir = join151(getClaudeConfigHomeDir(), "tasks") + sep32;
450095
450130
  if (normalizedPath === tasksDir.slice(0, -1) || normalizedPath.startsWith(tasksDir)) {
450096
450131
  return {
450097
450132
  behavior: "allow",
@@ -450102,7 +450137,7 @@ function checkReadableInternalPath(absolutePath, input) {
450102
450137
  }
450103
450138
  };
450104
450139
  }
450105
- const teamsReadDir = join150(getClaudeConfigHomeDir(), "teams") + sep32;
450140
+ const teamsReadDir = join151(getClaudeConfigHomeDir(), "teams") + sep32;
450106
450141
  if (normalizedPath === teamsReadDir.slice(0, -1) || normalizedPath.startsWith(teamsReadDir)) {
450107
450142
  return {
450108
450143
  behavior: "allow",
@@ -450174,11 +450209,11 @@ var init_filesystem = __esm(() => {
450174
450209
  try {
450175
450210
  resolvedBaseTmpDir = fs5.realpathSync(baseTmpDir);
450176
450211
  } catch {}
450177
- return join150(resolvedBaseTmpDir, getClaudeTempDirName()) + sep32;
450212
+ return join151(resolvedBaseTmpDir, getClaudeTempDirName()) + sep32;
450178
450213
  });
450179
450214
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
450180
450215
  const nonce = randomBytes20(16).toString("hex");
450181
- return join150(getClaudeTempDir(), "bundled-skills", "1.7.9", nonce);
450216
+ return join151(getClaudeTempDir(), "bundled-skills", "1.8.1", nonce);
450182
450217
  });
450183
450218
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
450184
450219
  });
@@ -450186,24 +450221,24 @@ var init_filesystem = __esm(() => {
450186
450221
  // src/utils/task/diskOutput.ts
450187
450222
  import { constants as fsConstants6 } from "fs";
450188
450223
  import {
450189
- mkdir as mkdir57,
450224
+ mkdir as mkdir58,
450190
450225
  open as open16,
450191
450226
  stat as stat50,
450192
450227
  symlink as symlink4,
450193
450228
  unlink as unlink23
450194
450229
  } from "fs/promises";
450195
- import { join as join151 } from "path";
450230
+ import { join as join152 } from "path";
450196
450231
  function getTaskOutputDir() {
450197
450232
  if (_taskOutputDir === undefined) {
450198
- _taskOutputDir = join151(getProjectTempDir(), getSessionId(), "tasks");
450233
+ _taskOutputDir = join152(getProjectTempDir(), getSessionId(), "tasks");
450199
450234
  }
450200
450235
  return _taskOutputDir;
450201
450236
  }
450202
450237
  async function ensureOutputDir() {
450203
- await mkdir57(getTaskOutputDir(), { recursive: true });
450238
+ await mkdir58(getTaskOutputDir(), { recursive: true });
450204
450239
  }
450205
450240
  function getTaskOutputPath(taskId) {
450206
- return join151(getTaskOutputDir(), `${taskId}.output`);
450241
+ return join152(getTaskOutputDir(), `${taskId}.output`);
450207
450242
  }
450208
450243
  function track(p) {
450209
450244
  _pendingOps.add(p);
@@ -454462,14 +454497,14 @@ __export(exports_worktree, {
454462
454497
  import { spawnSync as spawnSync9 } from "child_process";
454463
454498
  import {
454464
454499
  copyFile as copyFile10,
454465
- mkdir as mkdir58,
454500
+ mkdir as mkdir59,
454466
454501
  readdir as readdir37,
454467
454502
  readFile as readFile66,
454468
454503
  stat as stat52,
454469
454504
  symlink as symlink5,
454470
454505
  utimes as utimes2
454471
454506
  } from "fs/promises";
454472
- import { basename as basename43, dirname as dirname54, join as join152 } from "path";
454507
+ import { basename as basename43, dirname as dirname54, join as join153 } from "path";
454473
454508
  function validateWorktreeSlug(slug) {
454474
454509
  if (slug.length > MAX_WORKTREE_SLUG_LENGTH) {
454475
454510
  throw new Error(`Invalid worktree name: must be ${MAX_WORKTREE_SLUG_LENGTH} characters or fewer (got ${slug.length})`);
@@ -454484,7 +454519,7 @@ function validateWorktreeSlug(slug) {
454484
454519
  }
454485
454520
  }
454486
454521
  async function mkdirRecursive(dirPath) {
454487
- await mkdir58(dirPath, { recursive: true });
454522
+ await mkdir59(dirPath, { recursive: true });
454488
454523
  }
454489
454524
  async function symlinkDirectories(repoRootPath, worktreePath, dirsToSymlink) {
454490
454525
  for (const dir of dirsToSymlink) {
@@ -454492,8 +454527,8 @@ async function symlinkDirectories(repoRootPath, worktreePath, dirsToSymlink) {
454492
454527
  logForDebugging(`Skipping symlink for "${dir}": path traversal detected`, { level: "warn" });
454493
454528
  continue;
454494
454529
  }
454495
- const sourcePath = join152(repoRootPath, dir);
454496
- const destPath = join152(worktreePath, dir);
454530
+ const sourcePath = join153(repoRootPath, dir);
454531
+ const destPath = join153(worktreePath, dir);
454497
454532
  try {
454498
454533
  await symlink5(sourcePath, destPath, "dir");
454499
454534
  logForDebugging(`Symlinked ${dir} from main repository to worktree to avoid disk bloat`);
@@ -454517,7 +454552,7 @@ function generateTmuxSessionName(repoPath, branch2) {
454517
454552
  return combined.replace(/[/.]/g, "_");
454518
454553
  }
454519
454554
  function worktreesDir(repoRoot) {
454520
- return join152(repoRoot, ".claude", "worktrees");
454555
+ return join153(repoRoot, ".claude", "worktrees");
454521
454556
  }
454522
454557
  function flattenSlug(slug) {
454523
454558
  return slug.replaceAll("/", "+");
@@ -454526,7 +454561,7 @@ function worktreeBranchName(slug) {
454526
454561
  return `worktree-${flattenSlug(slug)}`;
454527
454562
  }
454528
454563
  function worktreePathFor(repoRoot, slug) {
454529
- return join152(worktreesDir(repoRoot), flattenSlug(slug));
454564
+ return join153(worktreesDir(repoRoot), flattenSlug(slug));
454530
454565
  }
454531
454566
  async function getOrCreateWorktree(repoRoot, slug, options) {
454532
454567
  const worktreePath = worktreePathFor(repoRoot, slug);
@@ -454540,7 +454575,7 @@ async function getOrCreateWorktree(repoRoot, slug, options) {
454540
454575
  existed: true
454541
454576
  };
454542
454577
  }
454543
- await mkdir58(worktreesDir(repoRoot), { recursive: true });
454578
+ await mkdir59(worktreesDir(repoRoot), { recursive: true });
454544
454579
  const fetchEnv = { ...process.env, ...GIT_NO_PROMPT_ENV2 };
454545
454580
  let baseBranch;
454546
454581
  let baseSha = null;
@@ -454607,7 +454642,7 @@ async function getOrCreateWorktree(repoRoot, slug, options) {
454607
454642
  async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
454608
454643
  let includeContent;
454609
454644
  try {
454610
- includeContent = await readFile66(join152(repoRoot, ".worktreeinclude"), "utf-8");
454645
+ includeContent = await readFile66(join153(repoRoot, ".worktreeinclude"), "utf-8");
454611
454646
  } catch {
454612
454647
  return [];
454613
454648
  }
@@ -454662,10 +454697,10 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
454662
454697
  }
454663
454698
  const copied = [];
454664
454699
  for (const relativePath2 of files2) {
454665
- const srcPath = join152(repoRoot, relativePath2);
454666
- const destPath = join152(worktreePath, relativePath2);
454700
+ const srcPath = join153(repoRoot, relativePath2);
454701
+ const destPath = join153(worktreePath, relativePath2);
454667
454702
  try {
454668
- await mkdir58(dirname54(destPath), { recursive: true });
454703
+ await mkdir59(dirname54(destPath), { recursive: true });
454669
454704
  await copyFile10(srcPath, destPath);
454670
454705
  copied.push(relativePath2);
454671
454706
  } catch (e) {
@@ -454679,9 +454714,9 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
454679
454714
  }
454680
454715
  async function performPostCreationSetup(repoRoot, worktreePath) {
454681
454716
  const localSettingsRelativePath = getRelativeSettingsFilePathForSource("localSettings");
454682
- const sourceSettingsLocal = join152(repoRoot, localSettingsRelativePath);
454717
+ const sourceSettingsLocal = join153(repoRoot, localSettingsRelativePath);
454683
454718
  try {
454684
- const destSettingsLocal = join152(worktreePath, localSettingsRelativePath);
454719
+ const destSettingsLocal = join153(worktreePath, localSettingsRelativePath);
454685
454720
  await mkdirRecursive(dirname54(destSettingsLocal));
454686
454721
  await copyFile10(sourceSettingsLocal, destSettingsLocal);
454687
454722
  logForDebugging(`Copied settings.local.json to worktree: ${destSettingsLocal}`);
@@ -454691,8 +454726,8 @@ async function performPostCreationSetup(repoRoot, worktreePath) {
454691
454726
  logForDebugging(`Failed to copy settings.local.json: ${e.message}`, { level: "warn" });
454692
454727
  }
454693
454728
  }
454694
- const huskyPath = join152(repoRoot, ".husky");
454695
- const gitHooksPath = join152(repoRoot, ".git", "hooks");
454729
+ const huskyPath = join153(repoRoot, ".husky");
454730
+ const gitHooksPath = join153(repoRoot, ".git", "hooks");
454696
454731
  let hooksPath = null;
454697
454732
  for (const candidatePath of [huskyPath, gitHooksPath]) {
454698
454733
  try {
@@ -454967,7 +455002,7 @@ async function cleanupStaleAgentWorktrees(cutoffDate) {
454967
455002
  if (!EPHEMERAL_WORKTREE_PATTERNS.some((p) => p.test(slug))) {
454968
455003
  continue;
454969
455004
  }
454970
- const worktreePath = join152(dir, slug);
455005
+ const worktreePath = join153(dir, slug);
454971
455006
  if (currentPath === worktreePath) {
454972
455007
  continue;
454973
455008
  }
@@ -457844,9 +457879,9 @@ __export(exports_upstreamproxy, {
457844
457879
  getUpstreamProxyEnv: () => getUpstreamProxyEnv,
457845
457880
  SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
457846
457881
  });
457847
- import { mkdir as mkdir59, readFile as readFile67, unlink as unlink24, writeFile as writeFile59 } from "fs/promises";
457882
+ import { mkdir as mkdir60, readFile as readFile67, unlink as unlink24, writeFile as writeFile60 } from "fs/promises";
457848
457883
  import { homedir as homedir36 } from "os";
457849
- import { join as join153 } from "path";
457884
+ import { join as join154 } from "path";
457850
457885
  async function initUpstreamProxy(opts) {
457851
457886
  if (!isEnvTruthy(process.env.CLAUDE_CODE_REMOTE)) {
457852
457887
  return state;
@@ -457867,7 +457902,7 @@ async function initUpstreamProxy(opts) {
457867
457902
  }
457868
457903
  setNonDumpable();
457869
457904
  const baseUrl = opts?.ccrBaseUrl ?? process.env.ANTHROPIC_BASE_URL ?? "https://api.anthropic.com";
457870
- const caBundlePath = opts?.caBundlePath ?? join153(homedir36(), ".ccr", "ca-bundle.crt");
457905
+ const caBundlePath = opts?.caBundlePath ?? join154(homedir36(), ".ccr", "ca-bundle.crt");
457871
457906
  const caOk = await downloadCaBundle(baseUrl, opts?.systemCaPath ?? SYSTEM_CA_BUNDLE, caBundlePath);
457872
457907
  if (!caOk)
457873
457908
  return state;
@@ -457967,8 +458002,8 @@ async function downloadCaBundle(baseUrl, systemCaPath, outPath) {
457967
458002
  }
457968
458003
  const ccrCa = await resp.text();
457969
458004
  const systemCa = await readFile67(systemCaPath, "utf8").catch(() => "");
457970
- await mkdir59(join153(outPath, ".."), { recursive: true });
457971
- await writeFile59(outPath, systemCa + `
458005
+ await mkdir60(join154(outPath, ".."), { recursive: true });
458006
+ await writeFile60(outPath, systemCa + `
457972
458007
  ` + ccrCa, "utf8");
457973
458008
  return true;
457974
458009
  } catch (err2) {
@@ -459415,7 +459450,7 @@ function buildSystemInitMessage(inputs) {
459415
459450
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
459416
459451
  apiKeySource: getAnthropicApiKeyWithSource().source,
459417
459452
  betas: getSdkBetas(),
459418
- claude_code_version: "1.7.9",
459453
+ claude_code_version: "1.8.1",
459419
459454
  output_style: outputStyle2,
459420
459455
  agents: inputs.agents.map((agent) => agent.agentType),
459421
459456
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -465774,7 +465809,7 @@ var init_ShowInIDEPrompt = __esm(() => {
465774
465809
 
465775
465810
  // src/components/permissions/FilePermissionDialog/permissionOptions.tsx
465776
465811
  import { homedir as homedir37 } from "os";
465777
- import { basename as basename47, join as join154, sep as sep33 } from "path";
465812
+ import { basename as basename47, join as join155, sep as sep33 } from "path";
465778
465813
  function isInClaudeFolder(filePath) {
465779
465814
  const absolutePath = expandPath(filePath);
465780
465815
  const claudeFolderPath = expandPath(`${getOriginalCwd()}/.claude`);
@@ -465784,7 +465819,7 @@ function isInClaudeFolder(filePath) {
465784
465819
  }
465785
465820
  function isInGlobalClaudeFolder(filePath) {
465786
465821
  const absolutePath = expandPath(filePath);
465787
- const globalClaudeFolderPath = join154(homedir37(), ".claude");
465822
+ const globalClaudeFolderPath = join155(homedir37(), ".claude");
465788
465823
  const normalizedAbsolutePath = normalizeCaseForComparison(absolutePath);
465789
465824
  const normalizedGlobalClaudeFolderPath = normalizeCaseForComparison(globalClaudeFolderPath);
465790
465825
  return normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + sep33.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + "/");
@@ -473572,7 +473607,7 @@ var init_useVoiceEnabled = __esm(() => {
473572
473607
  function getSemverPart(version2) {
473573
473608
  return `${import_semver10.major(version2, { loose: true })}.${import_semver10.minor(version2, { loose: true })}.${import_semver10.patch(version2, { loose: true })}`;
473574
473609
  }
473575
- function useUpdateNotification(updatedVersion, initialVersion = "1.7.9") {
473610
+ function useUpdateNotification(updatedVersion, initialVersion = "1.8.1") {
473576
473611
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react214.useState(() => getSemverPart(initialVersion));
473577
473612
  if (!updatedVersion) {
473578
473613
  return null;
@@ -473612,7 +473647,7 @@ function AutoUpdater({
473612
473647
  return;
473613
473648
  }
473614
473649
  if (false) {}
473615
- const currentVersion = "1.7.9";
473650
+ const currentVersion = "1.8.1";
473616
473651
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
473617
473652
  let latestVersion = await getLatestVersion(channel);
473618
473653
  const isDisabled = isAutoUpdaterDisabled();
@@ -473823,12 +473858,12 @@ function NativeAutoUpdater({
473823
473858
  logEvent("tengu_native_auto_updater_start", {});
473824
473859
  try {
473825
473860
  const maxVersion = await getMaxVersion();
473826
- if (maxVersion && gt("1.7.9", maxVersion)) {
473861
+ if (maxVersion && gt("1.8.1", maxVersion)) {
473827
473862
  const msg = await getMaxVersionMessage();
473828
473863
  setMaxVersionIssue(msg ?? "affects your version");
473829
473864
  }
473830
473865
  const result = await installLatest(channel);
473831
- const currentVersion = "1.7.9";
473866
+ const currentVersion = "1.8.1";
473832
473867
  const latencyMs = Date.now() - startTime;
473833
473868
  if (result.lockFailed) {
473834
473869
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -473963,17 +473998,17 @@ function PackageManagerAutoUpdater(t0) {
473963
473998
  const maxVersion = await getMaxVersion();
473964
473999
  if (maxVersion && latest && gt(latest, maxVersion)) {
473965
474000
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
473966
- if (gte("1.7.9", maxVersion)) {
473967
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.7.9"} is already at or above maxVersion ${maxVersion}, skipping update`);
474001
+ if (gte("1.8.1", maxVersion)) {
474002
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.8.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
473968
474003
  setUpdateAvailable(false);
473969
474004
  return;
473970
474005
  }
473971
474006
  latest = maxVersion;
473972
474007
  }
473973
- const hasUpdate = latest && !gte("1.7.9", latest) && !shouldSkipVersion(latest);
474008
+ const hasUpdate = latest && !gte("1.8.1", latest) && !shouldSkipVersion(latest);
473974
474009
  setUpdateAvailable(!!hasUpdate);
473975
474010
  if (hasUpdate) {
473976
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.7.9"} -> ${latest}`);
474011
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.8.1"} -> ${latest}`);
473977
474012
  }
473978
474013
  };
473979
474014
  $2[0] = t1;
@@ -474007,7 +474042,7 @@ function PackageManagerAutoUpdater(t0) {
474007
474042
  wrap: "truncate",
474008
474043
  children: [
474009
474044
  "currentVersion: ",
474010
- "1.7.9"
474045
+ "1.8.1"
474011
474046
  ]
474012
474047
  }, undefined, true, undefined, this);
474013
474048
  $2[3] = verbose;
@@ -481567,7 +481602,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
481567
481602
  project_dir: getOriginalCwd(),
481568
481603
  added_dirs: addedDirs
481569
481604
  },
481570
- version: "1.7.9",
481605
+ version: "1.8.1",
481571
481606
  output_style: {
481572
481607
  name: outputStyleName
481573
481608
  },
@@ -487651,9 +487686,9 @@ function initSkillImprovement() {
487651
487686
  async function applySkillImprovement(skillName, updates) {
487652
487687
  if (!skillName)
487653
487688
  return;
487654
- const { join: join155 } = await import("path");
487689
+ const { join: join156 } = await import("path");
487655
487690
  const fs5 = await import("fs/promises");
487656
- const filePath = join155(getCwd(), ".claude", "skills", skillName, "SKILL.md");
487691
+ const filePath = join156(getCwd(), ".claude", "skills", skillName, "SKILL.md");
487657
487692
  let currentContent;
487658
487693
  try {
487659
487694
  currentContent = await fs5.readFile(filePath, "utf-8");
@@ -487912,7 +487947,7 @@ var init_cacache = __esm(() => {
487912
487947
  // src/utils/cleanup.ts
487913
487948
  import * as fs5 from "fs/promises";
487914
487949
  import { homedir as homedir38 } from "os";
487915
- import { join as join155 } from "path";
487950
+ import { join as join156 } from "path";
487916
487951
  function getCutoffDate() {
487917
487952
  const settings = getSettings_DEPRECATED() || {};
487918
487953
  const cleanupPeriodDays = settings.cleanupPeriodDays ?? DEFAULT_CLEANUP_PERIOD_DAYS;
@@ -487935,9 +487970,9 @@ async function cleanupOldFilesInDirectory(dirPath, cutoffDate, isMessagePath) {
487935
487970
  const files2 = await getFsImplementation().readdir(dirPath);
487936
487971
  for (const file of files2) {
487937
487972
  try {
487938
- const timestamp3 = convertFileNameToDate(file.name);
487939
- if (timestamp3 < cutoffDate) {
487940
- await getFsImplementation().unlink(join155(dirPath, file.name));
487973
+ const timestamp4 = convertFileNameToDate(file.name);
487974
+ if (timestamp4 < cutoffDate) {
487975
+ await getFsImplementation().unlink(join156(dirPath, file.name));
487941
487976
  if (isMessagePath) {
487942
487977
  result.messages++;
487943
487978
  } else {
@@ -487968,7 +488003,7 @@ async function cleanupOldMessageFiles() {
487968
488003
  } catch {
487969
488004
  return result;
487970
488005
  }
487971
- const mcpLogDirs = dirents.filter((dirent) => dirent.isDirectory() && dirent.name.startsWith("mcp-logs-")).map((dirent) => join155(baseCachePath, dirent.name));
488006
+ const mcpLogDirs = dirents.filter((dirent) => dirent.isDirectory() && dirent.name.startsWith("mcp-logs-")).map((dirent) => join156(baseCachePath, dirent.name));
487972
488007
  for (const mcpLogDir of mcpLogDirs) {
487973
488008
  result = addCleanupResults(result, await cleanupOldFilesInDirectory(mcpLogDir, cutoffDate, true));
487974
488009
  await tryRmdir(mcpLogDir, fsImpl);
@@ -488007,7 +488042,7 @@ async function cleanupOldSessionFiles() {
488007
488042
  for (const projectDirent of projectDirents) {
488008
488043
  if (!projectDirent.isDirectory())
488009
488044
  continue;
488010
- const projectDir = join155(projectsDir, projectDirent.name);
488045
+ const projectDir = join156(projectsDir, projectDirent.name);
488011
488046
  let entries;
488012
488047
  try {
488013
488048
  entries = await fsImpl.readdir(projectDir);
@@ -488021,15 +488056,15 @@ async function cleanupOldSessionFiles() {
488021
488056
  continue;
488022
488057
  }
488023
488058
  try {
488024
- if (await unlinkIfOld(join155(projectDir, entry.name), cutoffDate, fsImpl)) {
488059
+ if (await unlinkIfOld(join156(projectDir, entry.name), cutoffDate, fsImpl)) {
488025
488060
  result.messages++;
488026
488061
  }
488027
488062
  } catch {
488028
488063
  result.errors++;
488029
488064
  }
488030
488065
  } else if (entry.isDirectory()) {
488031
- const sessionDir = join155(projectDir, entry.name);
488032
- const toolResultsDir = join155(sessionDir, TOOL_RESULTS_SUBDIR);
488066
+ const sessionDir = join156(projectDir, entry.name);
488067
+ const toolResultsDir = join156(sessionDir, TOOL_RESULTS_SUBDIR);
488033
488068
  let toolDirs;
488034
488069
  try {
488035
488070
  toolDirs = await fsImpl.readdir(toolResultsDir);
@@ -488040,14 +488075,14 @@ async function cleanupOldSessionFiles() {
488040
488075
  for (const toolEntry of toolDirs) {
488041
488076
  if (toolEntry.isFile()) {
488042
488077
  try {
488043
- if (await unlinkIfOld(join155(toolResultsDir, toolEntry.name), cutoffDate, fsImpl)) {
488078
+ if (await unlinkIfOld(join156(toolResultsDir, toolEntry.name), cutoffDate, fsImpl)) {
488044
488079
  result.messages++;
488045
488080
  }
488046
488081
  } catch {
488047
488082
  result.errors++;
488048
488083
  }
488049
488084
  } else if (toolEntry.isDirectory()) {
488050
- const toolDirPath = join155(toolResultsDir, toolEntry.name);
488085
+ const toolDirPath = join156(toolResultsDir, toolEntry.name);
488051
488086
  let toolFiles;
488052
488087
  try {
488053
488088
  toolFiles = await fsImpl.readdir(toolDirPath);
@@ -488058,7 +488093,7 @@ async function cleanupOldSessionFiles() {
488058
488093
  if (!tf.isFile())
488059
488094
  continue;
488060
488095
  try {
488061
- if (await unlinkIfOld(join155(toolDirPath, tf.name), cutoffDate, fsImpl)) {
488096
+ if (await unlinkIfOld(join156(toolDirPath, tf.name), cutoffDate, fsImpl)) {
488062
488097
  result.messages++;
488063
488098
  }
488064
488099
  } catch {
@@ -488090,7 +488125,7 @@ async function cleanupSingleDirectory(dirPath, extension2, removeEmptyDir = true
488090
488125
  if (!dirent.isFile() || !dirent.name.endsWith(extension2))
488091
488126
  continue;
488092
488127
  try {
488093
- if (await unlinkIfOld(join155(dirPath, dirent.name), cutoffDate, fsImpl)) {
488128
+ if (await unlinkIfOld(join156(dirPath, dirent.name), cutoffDate, fsImpl)) {
488094
488129
  result.messages++;
488095
488130
  }
488096
488131
  } catch {
@@ -488103,7 +488138,7 @@ async function cleanupSingleDirectory(dirPath, extension2, removeEmptyDir = true
488103
488138
  return result;
488104
488139
  }
488105
488140
  function cleanupOldPlanFiles() {
488106
- const plansDir = join155(getClaudeConfigHomeDir(), "plans");
488141
+ const plansDir = join156(getClaudeConfigHomeDir(), "plans");
488107
488142
  return cleanupSingleDirectory(plansDir, ".md");
488108
488143
  }
488109
488144
  async function cleanupOldFileHistoryBackups() {
@@ -488112,14 +488147,14 @@ async function cleanupOldFileHistoryBackups() {
488112
488147
  const fsImpl = getFsImplementation();
488113
488148
  try {
488114
488149
  const configDir = getClaudeConfigHomeDir();
488115
- const fileHistoryStorageDir = join155(configDir, "file-history");
488150
+ const fileHistoryStorageDir = join156(configDir, "file-history");
488116
488151
  let dirents;
488117
488152
  try {
488118
488153
  dirents = await fsImpl.readdir(fileHistoryStorageDir);
488119
488154
  } catch {
488120
488155
  return result;
488121
488156
  }
488122
- const fileHistorySessionsDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join155(fileHistoryStorageDir, dirent.name));
488157
+ const fileHistorySessionsDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join156(fileHistoryStorageDir, dirent.name));
488123
488158
  await Promise.all(fileHistorySessionsDirs.map(async (fileHistorySessionDir) => {
488124
488159
  try {
488125
488160
  const stats2 = await fsImpl.stat(fileHistorySessionDir);
@@ -488146,14 +488181,14 @@ async function cleanupOldSessionEnvDirs() {
488146
488181
  const fsImpl = getFsImplementation();
488147
488182
  try {
488148
488183
  const configDir = getClaudeConfigHomeDir();
488149
- const sessionEnvBaseDir = join155(configDir, "session-env");
488184
+ const sessionEnvBaseDir = join156(configDir, "session-env");
488150
488185
  let dirents;
488151
488186
  try {
488152
488187
  dirents = await fsImpl.readdir(sessionEnvBaseDir);
488153
488188
  } catch {
488154
488189
  return result;
488155
488190
  }
488156
- const sessionEnvDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join155(sessionEnvBaseDir, dirent.name));
488191
+ const sessionEnvDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join156(sessionEnvBaseDir, dirent.name));
488157
488192
  for (const sessionEnvDir of sessionEnvDirs) {
488158
488193
  try {
488159
488194
  const stats2 = await fsImpl.stat(sessionEnvDir);
@@ -488175,7 +488210,7 @@ async function cleanupOldDebugLogs() {
488175
488210
  const cutoffDate = getCutoffDate();
488176
488211
  const result = { messages: 0, errors: 0 };
488177
488212
  const fsImpl = getFsImplementation();
488178
- const debugDir = join155(getClaudeConfigHomeDir(), "debug");
488213
+ const debugDir = join156(getClaudeConfigHomeDir(), "debug");
488179
488214
  let dirents;
488180
488215
  try {
488181
488216
  dirents = await fsImpl.readdir(debugDir);
@@ -488187,7 +488222,7 @@ async function cleanupOldDebugLogs() {
488187
488222
  continue;
488188
488223
  }
488189
488224
  try {
488190
- if (await unlinkIfOld(join155(debugDir, dirent.name), cutoffDate, fsImpl)) {
488225
+ if (await unlinkIfOld(join156(debugDir, dirent.name), cutoffDate, fsImpl)) {
488191
488226
  result.messages++;
488192
488227
  }
488193
488228
  } catch {
@@ -488197,7 +488232,7 @@ async function cleanupOldDebugLogs() {
488197
488232
  return result;
488198
488233
  }
488199
488234
  async function cleanupNpmCacheForAnthropicPackages() {
488200
- const markerPath = join155(getClaudeConfigHomeDir(), ".npm-cache-cleanup");
488235
+ const markerPath = join156(getClaudeConfigHomeDir(), ".npm-cache-cleanup");
488201
488236
  try {
488202
488237
  const stat54 = await fs5.stat(markerPath);
488203
488238
  if (Date.now() - stat54.mtimeMs < ONE_DAY_MS) {
@@ -488212,7 +488247,7 @@ async function cleanupNpmCacheForAnthropicPackages() {
488212
488247
  return;
488213
488248
  }
488214
488249
  logForDebugging("npm cache cleanup: starting");
488215
- const npmCachePath = join155(homedir38(), ".npm", "_cacache");
488250
+ const npmCachePath = join156(homedir38(), ".npm", "_cacache");
488216
488251
  const NPM_CACHE_RETENTION_COUNT = 5;
488217
488252
  const startTime = Date.now();
488218
488253
  try {
@@ -488267,7 +488302,7 @@ async function cleanupNpmCacheForAnthropicPackages() {
488267
488302
  }
488268
488303
  }
488269
488304
  async function cleanupOldVersionsThrottled() {
488270
- const markerPath = join155(getClaudeConfigHomeDir(), ".version-cleanup");
488305
+ const markerPath = join156(getClaudeConfigHomeDir(), ".version-cleanup");
488271
488306
  try {
488272
488307
  const stat54 = await fs5.stat(markerPath);
488273
488308
  if (Date.now() - stat54.mtimeMs < ONE_DAY_MS) {
@@ -491497,7 +491532,7 @@ __export(exports_asciicast, {
491497
491532
  _resetRecordingStateForTesting: () => _resetRecordingStateForTesting
491498
491533
  });
491499
491534
  import { appendFile as appendFile6, rename as rename10 } from "fs/promises";
491500
- import { basename as basename56, dirname as dirname55, join as join157 } from "path";
491535
+ import { basename as basename56, dirname as dirname55, join as join158 } from "path";
491501
491536
  function getRecordFilePath() {
491502
491537
  if (recordingState.filePath !== null) {
491503
491538
  return recordingState.filePath;
@@ -491508,10 +491543,10 @@ function getRecordFilePath() {
491508
491543
  if (!isEnvTruthy(process.env.CLAUDE_CODE_TERMINAL_RECORDING)) {
491509
491544
  return null;
491510
491545
  }
491511
- const projectsDir = join157(getClaudeConfigHomeDir(), "projects");
491512
- const projectDir = join157(projectsDir, sanitizePath2(getOriginalCwd()));
491546
+ const projectsDir = join158(getClaudeConfigHomeDir(), "projects");
491547
+ const projectDir = join158(projectsDir, sanitizePath2(getOriginalCwd()));
491513
491548
  recordingState.timestamp = Date.now();
491514
- recordingState.filePath = join157(projectDir, `${getSessionId()}-${recordingState.timestamp}.cast`);
491549
+ recordingState.filePath = join158(projectDir, `${getSessionId()}-${recordingState.timestamp}.cast`);
491515
491550
  return recordingState.filePath;
491516
491551
  }
491517
491552
  function _resetRecordingStateForTesting() {
@@ -491520,13 +491555,13 @@ function _resetRecordingStateForTesting() {
491520
491555
  }
491521
491556
  function getSessionRecordingPaths() {
491522
491557
  const sessionId = getSessionId();
491523
- const projectsDir = join157(getClaudeConfigHomeDir(), "projects");
491524
- const projectDir = join157(projectsDir, sanitizePath2(getOriginalCwd()));
491558
+ const projectsDir = join158(getClaudeConfigHomeDir(), "projects");
491559
+ const projectDir = join158(projectsDir, sanitizePath2(getOriginalCwd()));
491525
491560
  try {
491526
491561
  const entries = getFsImplementation().readdirSync(projectDir);
491527
491562
  const names = typeof entries[0] === "string" ? entries : entries.map((e) => e.name);
491528
491563
  const files2 = names.filter((f) => f.startsWith(sessionId) && f.endsWith(".cast")).sort();
491529
- return files2.map((f) => join157(projectDir, f));
491564
+ return files2.map((f) => join158(projectDir, f));
491530
491565
  } catch {
491531
491566
  return [];
491532
491567
  }
@@ -491536,9 +491571,9 @@ async function renameRecordingForSession() {
491536
491571
  if (!oldPath || recordingState.timestamp === 0) {
491537
491572
  return;
491538
491573
  }
491539
- const projectsDir = join157(getClaudeConfigHomeDir(), "projects");
491540
- const projectDir = join157(projectsDir, sanitizePath2(getOriginalCwd()));
491541
- const newPath = join157(projectDir, `${getSessionId()}-${recordingState.timestamp}.cast`);
491574
+ const projectsDir = join158(getClaudeConfigHomeDir(), "projects");
491575
+ const projectDir = join158(projectsDir, sanitizePath2(getOriginalCwd()));
491576
+ const newPath = join158(projectDir, `${getSessionId()}-${recordingState.timestamp}.cast`);
491542
491577
  if (oldPath === newPath) {
491543
491578
  return;
491544
491579
  }
@@ -493139,7 +493174,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
493139
493174
  } catch {}
493140
493175
  const data = {
493141
493176
  trigger,
493142
- version: "1.7.9",
493177
+ version: "1.8.1",
493143
493178
  platform: process.platform,
493144
493179
  transcript,
493145
493180
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -493294,21 +493329,21 @@ function useFeedbackSurvey(messages, isLoading, submitCount, surveyType = "sessi
493294
493329
  messagesRef.current = messages;
493295
493330
  const probabilityPassedRef = import_react280.useRef(false);
493296
493331
  const lastEligibleSubmitCountRef = import_react280.useRef(null);
493297
- const updateLastShownTime = import_react280.useCallback((timestamp3, submitCountValue) => {
493332
+ const updateLastShownTime = import_react280.useCallback((timestamp4, submitCountValue) => {
493298
493333
  setFeedbackSurvey((prev) => {
493299
- if (prev.timeLastShown === timestamp3 && prev.submitCountAtLastAppearance === submitCountValue) {
493334
+ if (prev.timeLastShown === timestamp4 && prev.submitCountAtLastAppearance === submitCountValue) {
493300
493335
  return prev;
493301
493336
  }
493302
493337
  return {
493303
- timeLastShown: timestamp3,
493338
+ timeLastShown: timestamp4,
493304
493339
  submitCountAtLastAppearance: submitCountValue
493305
493340
  };
493306
493341
  });
493307
- if (getGlobalConfig().feedbackSurveyState?.lastShownTime !== timestamp3) {
493342
+ if (getGlobalConfig().feedbackSurveyState?.lastShownTime !== timestamp4) {
493308
493343
  saveGlobalConfig((current) => ({
493309
493344
  ...current,
493310
493345
  feedbackSurveyState: {
493311
- lastShownTime: timestamp3
493346
+ lastShownTime: timestamp4
493312
493347
  }
493313
493348
  }));
493314
493349
  }
@@ -494351,7 +494386,7 @@ var init_useAwaySummary = __esm(() => {
494351
494386
  });
494352
494387
 
494353
494388
  // src/utils/plugins/officialMarketplaceStartupCheck.ts
494354
- import { join as join158 } from "path";
494389
+ import { join as join159 } from "path";
494355
494390
  function isOfficialMarketplaceAutoInstallDisabled() {
494356
494391
  return isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL);
494357
494392
  }
@@ -494434,7 +494469,7 @@ async function checkAndInstallOfficialMarketplace() {
494434
494469
  return { installed: false, skipped: true, reason: "policy_blocked" };
494435
494470
  }
494436
494471
  const cacheDir = getMarketplacesCacheDir();
494437
- const installLocation = join158(cacheDir, OFFICIAL_MARKETPLACE_NAME);
494472
+ const installLocation = join159(cacheDir, OFFICIAL_MARKETPLACE_NAME);
494438
494473
  const gcsSha = await fetchOfficialMarketplaceFromGcs(installLocation, cacheDir);
494439
494474
  if (gcsSha !== null) {
494440
494475
  const known = await loadKnownMarketplacesConfig();
@@ -494690,7 +494725,7 @@ var init_tipHistory = __esm(() => {
494690
494725
 
494691
494726
  // src/utils/desktopDeepLink.ts
494692
494727
  import { readdir as readdir38 } from "fs/promises";
494693
- import { join as join159 } from "path";
494728
+ import { join as join160 } from "path";
494694
494729
  function isDevMode() {
494695
494730
  if (true) {
494696
494731
  return true;
@@ -494753,7 +494788,7 @@ async function getDesktopVersion() {
494753
494788
  if (!localAppData) {
494754
494789
  return null;
494755
494790
  }
494756
- const installDir = join159(localAppData, "AnthropicClaude");
494791
+ const installDir = join160(localAppData, "AnthropicClaude");
494757
494792
  try {
494758
494793
  const entries = await readdir38(installDir);
494759
494794
  const versions = entries.filter((e) => e.startsWith("app-")).map((e) => e.slice(4)).filter((v2) => import_semver14.coerce(v2) !== null).sort((a, b3) => {
@@ -497785,7 +497820,7 @@ var init_usePluginRecommendationBase = __esm(() => {
497785
497820
  });
497786
497821
 
497787
497822
  // src/hooks/useLspPluginRecommendation.tsx
497788
- import { extname as extname16, join as join160 } from "path";
497823
+ import { extname as extname16, join as join161 } from "path";
497789
497824
  function useLspPluginRecommendation() {
497790
497825
  const $2 = c3(12);
497791
497826
  const trackedFiles = useAppState(_temp204);
@@ -497870,7 +497905,7 @@ function useLspPluginRecommendation() {
497870
497905
  case "yes": {
497871
497906
  installPluginAndNotify(pluginId, pluginName, "lsp-plugin", addNotification, async (pluginData) => {
497872
497907
  logForDebugging(`[useLspPluginRecommendation] Installing plugin: ${pluginId}`);
497873
- const localSourcePath = typeof pluginData.entry.source === "string" ? join160(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
497908
+ const localSourcePath = typeof pluginData.entry.source === "string" ? join161(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
497874
497909
  await cacheAndRegisterPlugin(pluginId, pluginData.entry, "user", undefined, localSourcePath);
497875
497910
  const settings = getSettingsForSource("userSettings");
497876
497911
  updateSettingsForSource("userSettings", {
@@ -500702,9 +500737,9 @@ var exports_REPL = {};
500702
500737
  __export(exports_REPL, {
500703
500738
  REPL: () => REPL
500704
500739
  });
500705
- import { dirname as dirname57, join as join161 } from "path";
500740
+ import { dirname as dirname57, join as join162 } from "path";
500706
500741
  import { tmpdir as tmpdir11 } from "os";
500707
- import { writeFile as writeFile61 } from "fs/promises";
500742
+ import { writeFile as writeFile62 } from "fs/promises";
500708
500743
  import { randomUUID as randomUUID46 } from "crypto";
500709
500744
  function TranscriptModeFooter(t0) {
500710
500745
  const $2 = c3(9);
@@ -503272,8 +503307,8 @@ Note: ctrl + z now suspends localclawd, ctrl + _ undoes input.
503272
503307
  const w2 = Math.max(80, (process.stdout.columns ?? 80) - 6);
503273
503308
  const raw = await renderMessagesToPlainText(deferredMessages, tools, w2);
503274
503309
  const text = raw.replace(/[ \t]+$/gm, "");
503275
- const path17 = join161(tmpdir11(), `cc-transcript-${Date.now()}.txt`);
503276
- await writeFile61(path17, text);
503310
+ const path17 = join162(tmpdir11(), `cc-transcript-${Date.now()}.txt`);
503311
+ await writeFile62(path17, text);
503277
503312
  const opened = openFileInExternalEditor(path17);
503278
503313
  setStatus(opened ? `opening ${path17}` : `wrote ${path17} · no $VISUAL/$EDITOR set`);
503279
503314
  } catch (e) {
@@ -509999,12 +510034,12 @@ var init_createDirectConnectSession = __esm(() => {
509999
510034
  });
510000
510035
 
510001
510036
  // src/utils/errorLogSink.ts
510002
- import { dirname as dirname59, join as join162 } from "path";
510037
+ import { dirname as dirname59, join as join163 } from "path";
510003
510038
  function getErrorsPath() {
510004
- return join162(CACHE_PATHS.errors(), DATE + ".jsonl");
510039
+ return join163(CACHE_PATHS.errors(), DATE + ".jsonl");
510005
510040
  }
510006
510041
  function getMCPLogsPath(serverName) {
510007
- return join162(CACHE_PATHS.mcpLogs(serverName), DATE + ".jsonl");
510042
+ return join163(CACHE_PATHS.mcpLogs(serverName), DATE + ".jsonl");
510008
510043
  }
510009
510044
  function createJsonlWriter(options) {
510010
510045
  const writer = createBufferedWriter(options);
@@ -510048,7 +510083,7 @@ function appendToLog(path17, message) {
510048
510083
  cwd: getFsImplementation().cwd(),
510049
510084
  userType: process.env.USER_TYPE,
510050
510085
  sessionId: getSessionId(),
510051
- version: "1.7.9"
510086
+ version: "1.8.1"
510052
510087
  };
510053
510088
  getLogWriter(path17).write(messageWithTimestamp);
510054
510089
  }
@@ -510147,7 +510182,7 @@ var init_sinks = __esm(() => {
510147
510182
  });
510148
510183
 
510149
510184
  // src/services/SessionMemory/sessionMemory.ts
510150
- import { writeFile as writeFile62 } from "fs/promises";
510185
+ import { writeFile as writeFile63 } from "fs/promises";
510151
510186
  function isSessionMemoryGateEnabled() {
510152
510187
  if (isEnvTruthy(process.env.ENABLE_CLAUDE_CODE_SESSION_MEMORY)) {
510153
510188
  return true;
@@ -510210,13 +510245,13 @@ async function setupSessionMemoryFile(toolUseContext) {
510210
510245
  await fs6.mkdir(sessionMemoryDir, { mode: 448 });
510211
510246
  const memoryPath = getSessionMemoryPath();
510212
510247
  try {
510213
- await writeFile62(memoryPath, "", {
510248
+ await writeFile63(memoryPath, "", {
510214
510249
  encoding: "utf-8",
510215
510250
  mode: 384,
510216
510251
  flag: "wx"
510217
510252
  });
510218
510253
  const template = await loadSessionMemoryTemplate();
510219
- await writeFile62(memoryPath, template, {
510254
+ await writeFile63(memoryPath, template, {
510220
510255
  encoding: "utf-8",
510221
510256
  mode: 384
510222
510257
  });
@@ -510354,7 +510389,7 @@ var init_sessionMemory = __esm(() => {
510354
510389
  // src/utils/iTermBackup.ts
510355
510390
  import { copyFile as copyFile11, stat as stat56 } from "fs/promises";
510356
510391
  import { homedir as homedir40 } from "os";
510357
- import { join as join163 } from "path";
510392
+ import { join as join164 } from "path";
510358
510393
  function markITerm2SetupComplete() {
510359
510394
  saveGlobalConfig((current) => ({
510360
510395
  ...current,
@@ -510369,7 +510404,7 @@ function getIterm2RecoveryInfo() {
510369
510404
  };
510370
510405
  }
510371
510406
  function getITerm2PlistPath() {
510372
- return join163(homedir40(), "Library", "Preferences", "com.googlecode.iterm2.plist");
510407
+ return join164(homedir40(), "Library", "Preferences", "com.googlecode.iterm2.plist");
510373
510408
  }
510374
510409
  async function checkAndRestoreITerm2Backup() {
510375
510410
  const { inProgress, backupPath } = getIterm2RecoveryInfo();
@@ -513765,8 +513800,8 @@ var init_idleTimeout = __esm(() => {
513765
513800
 
513766
513801
  // src/bridge/inboundAttachments.ts
513767
513802
  import { randomUUID as randomUUID49 } from "crypto";
513768
- import { mkdir as mkdir60, writeFile as writeFile63 } from "fs/promises";
513769
- import { basename as basename57, join as join164 } from "path";
513803
+ import { mkdir as mkdir61, writeFile as writeFile64 } from "fs/promises";
513804
+ import { basename as basename57, join as join165 } from "path";
513770
513805
  import { z as z95 } from "zod/v4";
513771
513806
  function debug3(msg) {
513772
513807
  logForDebugging(`[bridge:inbound-attach] ${msg}`);
@@ -513783,7 +513818,7 @@ function sanitizeFileName(name) {
513783
513818
  return base || "attachment";
513784
513819
  }
513785
513820
  function uploadsDir() {
513786
- return join164(getClaudeConfigHomeDir(), "uploads", getSessionId());
513821
+ return join165(getClaudeConfigHomeDir(), "uploads", getSessionId());
513787
513822
  }
513788
513823
  async function resolveOne(att) {
513789
513824
  const token = getBridgeAccessToken();
@@ -513812,10 +513847,10 @@ async function resolveOne(att) {
513812
513847
  const safeName = sanitizeFileName(att.file_name);
513813
513848
  const prefix = (att.file_uuid.slice(0, 8) || randomUUID49().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
513814
513849
  const dir = uploadsDir();
513815
- const outPath = join164(dir, `${prefix}-${safeName}`);
513850
+ const outPath = join165(dir, `${prefix}-${safeName}`);
513816
513851
  try {
513817
- await mkdir60(dir, { recursive: true });
513818
- await writeFile63(outPath, data);
513852
+ await mkdir61(dir, { recursive: true });
513853
+ await writeFile64(outPath, data);
513819
513854
  } catch (e) {
513820
513855
  debug3(`write ${outPath} failed: ${e}`);
513821
513856
  return;
@@ -513911,7 +513946,7 @@ var init_sessionUrl = __esm(() => {
513911
513946
 
513912
513947
  // src/utils/plugins/zipCacheAdapters.ts
513913
513948
  import { readFile as readFile69 } from "fs/promises";
513914
- import { join as join165 } from "path";
513949
+ import { join as join166 } from "path";
513915
513950
  async function readZipCacheKnownMarketplaces() {
513916
513951
  try {
513917
513952
  const content = await readFile69(getZipCacheKnownMarketplacesPath(), "utf-8");
@@ -513936,13 +513971,13 @@ async function saveMarketplaceJsonToZipCache(marketplaceName, installLocation) {
513936
513971
  const content = await readMarketplaceJsonContent(installLocation);
513937
513972
  if (content !== null) {
513938
513973
  const relPath = getMarketplaceJsonRelativePath(marketplaceName);
513939
- await atomicWriteToZipCache(join165(zipCachePath, relPath), content);
513974
+ await atomicWriteToZipCache(join166(zipCachePath, relPath), content);
513940
513975
  }
513941
513976
  }
513942
513977
  async function readMarketplaceJsonContent(dir) {
513943
513978
  const candidates = [
513944
- join165(dir, ".claude-plugin", "marketplace.json"),
513945
- join165(dir, "marketplace.json"),
513979
+ join166(dir, ".claude-plugin", "marketplace.json"),
513980
+ join166(dir, "marketplace.json"),
513946
513981
  dir
513947
513982
  ];
513948
513983
  for (const candidate of candidates) {
@@ -514072,8 +514107,8 @@ async function getEnvLessBridgeConfig() {
514072
514107
  }
514073
514108
  async function checkEnvLessBridgeMinVersion() {
514074
514109
  const cfg = await getEnvLessBridgeConfig();
514075
- if (cfg.min_version && lt("1.7.9", cfg.min_version)) {
514076
- return `Your version of localclawd (${"1.7.9"}) is too old for Remote Control.
514110
+ if (cfg.min_version && lt("1.8.1", cfg.min_version)) {
514111
+ return `Your version of localclawd (${"1.8.1"}) is too old for Remote Control.
514077
514112
  Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
514078
514113
  }
514079
514114
  return null;
@@ -514398,17 +514433,17 @@ __export(exports_bridgePointer, {
514398
514433
  clearBridgePointer: () => clearBridgePointer,
514399
514434
  BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
514400
514435
  });
514401
- import { mkdir as mkdir61, readFile as readFile70, stat as stat57, unlink as unlink25, writeFile as writeFile64 } from "fs/promises";
514402
- import { dirname as dirname60, join as join166 } from "path";
514436
+ import { mkdir as mkdir62, readFile as readFile70, stat as stat57, unlink as unlink25, writeFile as writeFile65 } from "fs/promises";
514437
+ import { dirname as dirname60, join as join167 } from "path";
514403
514438
  import { z as z97 } from "zod/v4";
514404
514439
  function getBridgePointerPath(dir) {
514405
- return join166(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
514440
+ return join167(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
514406
514441
  }
514407
514442
  async function writeBridgePointer(dir, pointer) {
514408
514443
  const path17 = getBridgePointerPath(dir);
514409
514444
  try {
514410
- await mkdir61(dirname60(path17), { recursive: true });
514411
- await writeFile64(path17, jsonStringify(pointer), "utf8");
514445
+ await mkdir62(dirname60(path17), { recursive: true });
514446
+ await writeFile65(path17, jsonStringify(pointer), "utf8");
514412
514447
  logForDebugging(`[bridge:pointer] wrote ${path17}`);
514413
514448
  } catch (err2) {
514414
514449
  logForDebugging(`[bridge:pointer] write failed: ${err2}`, { level: "warn" });
@@ -514545,7 +514580,7 @@ async function initBridgeCore(params) {
514545
514580
  const rawApi = createBridgeApiClient({
514546
514581
  baseUrl,
514547
514582
  getAccessToken,
514548
- runnerVersion: "1.7.9",
514583
+ runnerVersion: "1.8.1",
514549
514584
  onDebug: logForDebugging,
514550
514585
  onAuth401,
514551
514586
  getTrustedDeviceToken
@@ -520264,7 +520299,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
520264
520299
  setCwd(cwd3);
520265
520300
  const server = new Server({
520266
520301
  name: "claude/tengu",
520267
- version: "1.7.9"
520302
+ version: "1.8.1"
520268
520303
  }, {
520269
520304
  capabilities: {
520270
520305
  tools: {}
@@ -520396,14 +520431,14 @@ __export(exports_appDesktop, {
520396
520431
  });
520397
520432
  import { readdir as readdir39, readFile as readFile72, stat as stat59 } from "fs/promises";
520398
520433
  import { homedir as homedir41 } from "os";
520399
- import { join as join167 } from "path";
520434
+ import { join as join168 } from "path";
520400
520435
  async function getClaudeDesktopConfigPath() {
520401
520436
  const platform3 = getPlatform();
520402
520437
  if (!SUPPORTED_PLATFORMS.includes(platform3)) {
520403
520438
  throw new Error(`Unsupported platform: ${platform3} - desktop app integration only works on macOS and WSL.`);
520404
520439
  }
520405
520440
  if (platform3 === "macos") {
520406
- return join167(homedir41(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
520441
+ return join168(homedir41(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
520407
520442
  }
520408
520443
  const windowsHome = process.env.USERPROFILE ? process.env.USERPROFILE.replace(/\\/g, "/") : null;
520409
520444
  if (windowsHome) {
@@ -520422,7 +520457,7 @@ async function getClaudeDesktopConfigPath() {
520422
520457
  if (user.name === "Public" || user.name === "Default" || user.name === "Default User" || user.name === "All Users") {
520423
520458
  continue;
520424
520459
  }
520425
- const potentialConfigPath = join167(usersDir, user.name, "AppData", "Roaming", "Claude", "claude_desktop_config.json");
520460
+ const potentialConfigPath = join168(usersDir, user.name, "AppData", "Roaming", "Claude", "claude_desktop_config.json");
520426
520461
  try {
520427
520462
  await stat59(potentialConfigPath);
520428
520463
  return potentialConfigPath;
@@ -521345,7 +521380,7 @@ function WelcomeLogo() {
521345
521380
  dimColor: true,
521346
521381
  children: [
521347
521382
  "v",
521348
- "1.7.9"
521383
+ "1.8.1"
521349
521384
  ]
521350
521385
  }, undefined, true, undefined, this)
521351
521386
  ]
@@ -521536,7 +521571,7 @@ __export(exports_update, {
521536
521571
  });
521537
521572
  async function update() {
521538
521573
  logEvent("tengu_update_check", {});
521539
- writeToStdout(`Current version: ${"1.7.9"}
521574
+ writeToStdout(`Current version: ${"1.8.1"}
521540
521575
  `);
521541
521576
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
521542
521577
  writeToStdout(`Checking for updates to ${channel} version...
@@ -521611,8 +521646,8 @@ async function update() {
521611
521646
  writeToStdout(`localclawd is managed by Homebrew.
521612
521647
  `);
521613
521648
  const latest = await getLatestVersion(channel);
521614
- if (latest && !gte("1.7.9", latest)) {
521615
- writeToStdout(`Update available: ${"1.7.9"} → ${latest}
521649
+ if (latest && !gte("1.8.1", latest)) {
521650
+ writeToStdout(`Update available: ${"1.8.1"} → ${latest}
521616
521651
  `);
521617
521652
  writeToStdout(`
521618
521653
  `);
@@ -521628,8 +521663,8 @@ async function update() {
521628
521663
  writeToStdout(`localclawd is managed by winget.
521629
521664
  `);
521630
521665
  const latest = await getLatestVersion(channel);
521631
- if (latest && !gte("1.7.9", latest)) {
521632
- writeToStdout(`Update available: ${"1.7.9"} → ${latest}
521666
+ if (latest && !gte("1.8.1", latest)) {
521667
+ writeToStdout(`Update available: ${"1.8.1"} → ${latest}
521633
521668
  `);
521634
521669
  writeToStdout(`
521635
521670
  `);
@@ -521643,8 +521678,8 @@ async function update() {
521643
521678
  writeToStdout(`localclawd is managed by apk.
521644
521679
  `);
521645
521680
  const latest = await getLatestVersion(channel);
521646
- if (latest && !gte("1.7.9", latest)) {
521647
- writeToStdout(`Update available: ${"1.7.9"} → ${latest}
521681
+ if (latest && !gte("1.8.1", latest)) {
521682
+ writeToStdout(`Update available: ${"1.8.1"} → ${latest}
521648
521683
  `);
521649
521684
  writeToStdout(`
521650
521685
  `);
@@ -521709,11 +521744,11 @@ async function update() {
521709
521744
  `);
521710
521745
  await gracefulShutdown(1);
521711
521746
  }
521712
- if (result.latestVersion === "1.7.9") {
521713
- writeToStdout(source_default.green(`localclawd is up to date (${"1.7.9"})`) + `
521747
+ if (result.latestVersion === "1.8.1") {
521748
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.8.1"})`) + `
521714
521749
  `);
521715
521750
  } else {
521716
- writeToStdout(source_default.green(`Successfully updated from ${"1.7.9"} to version ${result.latestVersion}`) + `
521751
+ writeToStdout(source_default.green(`Successfully updated from ${"1.8.1"} to version ${result.latestVersion}`) + `
521717
521752
  `);
521718
521753
  await regenerateCompletionCache();
521719
521754
  }
@@ -521773,12 +521808,12 @@ async function update() {
521773
521808
  `);
521774
521809
  await gracefulShutdown(1);
521775
521810
  }
521776
- if (latestVersion === "1.7.9") {
521777
- writeToStdout(source_default.green(`localclawd is up to date (${"1.7.9"})`) + `
521811
+ if (latestVersion === "1.8.1") {
521812
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.8.1"})`) + `
521778
521813
  `);
521779
521814
  await gracefulShutdown(0);
521780
521815
  }
521781
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.7.9"})
521816
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.8.1"})
521782
521817
  `);
521783
521818
  writeToStdout(`Installing update...
521784
521819
  `);
@@ -521823,7 +521858,7 @@ async function update() {
521823
521858
  logForDebugging(`update: Installation status: ${status2}`);
521824
521859
  switch (status2) {
521825
521860
  case "success":
521826
- writeToStdout(source_default.green(`Successfully updated from ${"1.7.9"} to version ${latestVersion}`) + `
521861
+ writeToStdout(source_default.green(`Successfully updated from ${"1.8.1"} to version ${latestVersion}`) + `
521827
521862
  `);
521828
521863
  await regenerateCompletionCache();
521829
521864
  break;
@@ -523065,7 +523100,7 @@ Run with --debug for more details.
523065
523100
  }
523066
523101
  }
523067
523102
  logForDiagnosticsNoPII("info", "started", {
523068
- version: "1.7.9",
523103
+ version: "1.8.1",
523069
523104
  is_native_binary: isInBundledMode()
523070
523105
  });
523071
523106
  registerCleanup(async () => {
@@ -523849,7 +523884,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
523849
523884
  pendingHookMessages
523850
523885
  }, renderAndRun);
523851
523886
  }
523852
- }).version("1.7.9 (localclawd)", "-v, --version", "Output the version number");
523887
+ }).version("1.8.1 (localclawd)", "-v, --version", "Output the version number");
523853
523888
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
523854
523889
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
523855
523890
  if (canUserConfigureAdvisor()) {
@@ -524363,7 +524398,7 @@ if (false) {}
524363
524398
  async function main2() {
524364
524399
  const args = process.argv.slice(2);
524365
524400
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
524366
- console.log(`${"1.7.9"} (localclawd)`);
524401
+ console.log(`${"1.8.1"} (localclawd)`);
524367
524402
  return;
524368
524403
  }
524369
524404
  const {
@@ -524446,4 +524481,4 @@ localclawd crashed: ${msg}
524446
524481
  process.exit(1);
524447
524482
  });
524448
524483
 
524449
- //# debugId=64B9F248110B7A0964756E2164756E21
524484
+ //# debugId=0B4A3C92707D29B164756E2164756E21