@rayu-dev/rayu-cli 1.3.440 → 1.3.442

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/rayu.js +784 -274
  2. package/package.json +5 -2
package/dist/rayu.js CHANGED
@@ -19391,7 +19391,7 @@ var init_contextPrepCache = __esm(() => {
19391
19391
  });
19392
19392
 
19393
19393
  // src/utils/curatedProviderModels.ts
19394
- var DOUBLEWORD_MODELS, CURATED_PROVIDER_MODELS;
19394
+ var DOUBLEWORD_MODELS, FUGU_MODELS, CURATED_PROVIDER_MODELS;
19395
19395
  var init_curatedProviderModels = __esm(() => {
19396
19396
  DOUBLEWORD_MODELS = [
19397
19397
  "Qwen/Qwen3-14B-FP8",
@@ -19412,8 +19412,10 @@ var init_curatedProviderModels = __esm(() => {
19412
19412
  "openai/gpt-oss-20b",
19413
19413
  "zai-org/GLM-5.1-FP8"
19414
19414
  ];
19415
+ FUGU_MODELS = ["fugu", "fugu-ultra"];
19415
19416
  CURATED_PROVIDER_MODELS = {
19416
- doubleword: DOUBLEWORD_MODELS
19417
+ doubleword: DOUBLEWORD_MODELS,
19418
+ fugu: FUGU_MODELS
19417
19419
  };
19418
19420
  });
19419
19421
 
@@ -36083,6 +36085,15 @@ var init_rayuProviders = __esm(() => {
36083
36085
  smallFastModel: "kimi-for-coding",
36084
36086
  envKeys: ["KIMI_FOR_CODE_API_KEY"]
36085
36087
  },
36088
+ {
36089
+ id: "fugu",
36090
+ label: "Fugu — Sakana AI (api.sakana.ai)",
36091
+ kind: "openai-compatible",
36092
+ baseURL: "https://api.sakana.ai/v1",
36093
+ defaultModel: "fugu",
36094
+ smallFastModel: "fugu",
36095
+ envKeys: ["SAKANA_API_KEY"]
36096
+ },
36086
36097
  {
36087
36098
  id: "openai",
36088
36099
  label: "OpenAI (api.openai.com)",
@@ -36238,6 +36249,7 @@ var init_rayuProviders = __esm(() => {
36238
36249
  deepseek: "DeepSeek",
36239
36250
  "kimi-moonshot": "Kimi",
36240
36251
  "kimi-for-code": "Kimi for Code",
36252
+ fugu: "Fugu",
36241
36253
  openai: "OpenAI",
36242
36254
  gemini: "Gemini",
36243
36255
  [GEMINI_VERTEX_PROVIDER_ID]: "Vertex AI",
@@ -37045,6 +37057,7 @@ var init_rayuConfig = __esm(() => {
37045
37057
  [/gemini/i, 1048576],
37046
37058
  [/deepseek[-/]?v4[-/]?(flash|pro)/i, 1e6],
37047
37059
  [/minimax/i, 1e6],
37060
+ [/fugu/i, 1e6],
37048
37061
  [/kimi-k1|kimi.*long/i, 200000],
37049
37062
  [/kimi[-_.]?k2[-_.]?(thinking|\d{4}|[5-9])/i, 256000],
37050
37063
  [/kimi|moonshot/i, 131072],
@@ -81314,7 +81327,6 @@ var init_PermissionMode = __esm(() => {
81314
81327
  ...{}
81315
81328
  };
81316
81329
  });
81317
-
81318
81330
  // src/entrypoints/sdk/coreTypes.generated.ts
81319
81331
  var init_coreTypes_generated = () => {};
81320
81332
 
@@ -148547,7 +148559,7 @@ var init_auth = __esm(() => {
148547
148559
 
148548
148560
  // src/utils/userAgent.ts
148549
148561
  function getRayuUserAgent() {
148550
- return `rayu/${"1.3.440"}`;
148562
+ return `rayu/${"1.3.442"}`;
148551
148563
  }
148552
148564
  var getClaudeCodeUserAgent;
148553
148565
  var init_userAgent = __esm(() => {
@@ -148573,7 +148585,7 @@ function getUserAgent() {
148573
148585
  const clientApp = process.env.RAYU_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}` : "";
148574
148586
  const workload = getWorkload();
148575
148587
  const workloadSuffix = workload ? `, workload/${workload}` : "";
148576
- return `rayu/${"1.3.440"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148588
+ return `rayu/${"1.3.442"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148577
148589
  }
148578
148590
  function getMCPUserAgent() {
148579
148591
  const parts = [];
@@ -148587,7 +148599,7 @@ function getMCPUserAgent() {
148587
148599
  parts.push(`client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}`);
148588
148600
  }
148589
148601
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
148590
- return `rayu/${"1.3.440"}${suffix}`;
148602
+ return `rayu/${"1.3.442"}${suffix}`;
148591
148603
  }
148592
148604
  function getWebFetchUserAgent() {
148593
148605
  return `Rayu-User (${getRayuUserAgent()})`;
@@ -148710,7 +148722,7 @@ var init_user = __esm(() => {
148710
148722
  deviceId,
148711
148723
  sessionId: getSessionId(),
148712
148724
  email: getEmail(),
148713
- appVersion: "1.3.440",
148725
+ appVersion: "1.3.442",
148714
148726
  platform: getHostPlatformForAnalytics(),
148715
148727
  organizationUuid,
148716
148728
  accountUuid,
@@ -165683,11 +165695,11 @@ function isUseRayuOAuthEnabled() {
165683
165695
  return isEnvTruthy("false");
165684
165696
  }
165685
165697
  function getRayuApiBaseUrl() {
165686
- const base2 = process.env.RAYU_API_URL || "" || "http://localhost:4000/api";
165698
+ const base2 = process.env.RAYU_API_URL || "http://localhost:4000/api";
165687
165699
  return base2.replace(/\/$/, "");
165688
165700
  }
165689
165701
  function getRayuWebBaseUrl() {
165690
- const base2 = process.env.RAYU_WEB_URL || "" || "http://localhost:3000";
165702
+ const base2 = process.env.RAYU_WEB_URL || "http://localhost:3000";
165691
165703
  return base2.replace(/\/$/, "");
165692
165704
  }
165693
165705
  function getRayuGatewayBaseUrl() {
@@ -184597,7 +184609,7 @@ var init_metadata = __esm(() => {
184597
184609
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
184598
184610
  WHITESPACE_REGEX = /\s+/;
184599
184611
  getVersionBase = memoize_default(() => {
184600
- const match = "1.3.440".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
184612
+ const match = "1.3.442".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
184601
184613
  return match ? match[0] : undefined;
184602
184614
  });
184603
184615
  buildEnvContext = memoize_default(async () => {
@@ -184636,7 +184648,7 @@ var init_metadata = __esm(() => {
184636
184648
  },
184637
184649
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
184638
184650
  isRayuAction: isEnvTruthy(process.env.RAYU_ACTION),
184639
- version: "1.3.440",
184651
+ version: "1.3.442",
184640
184652
  versionBase: getVersionBase(),
184641
184653
  buildTime: "",
184642
184654
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
@@ -185250,7 +185262,7 @@ function initialize1PEventLogging() {
185250
185262
  const platform2 = getPlatform();
185251
185263
  const attributes = {
185252
185264
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "rayu",
185253
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.3.440"
185265
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.3.442"
185254
185266
  };
185255
185267
  if (platform2 === "wsl") {
185256
185268
  const wslVersion = getWslVersion();
@@ -185277,7 +185289,7 @@ function initialize1PEventLogging() {
185277
185289
  })
185278
185290
  ]
185279
185291
  });
185280
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("io.rayu.events", "1.3.440");
185292
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("io.rayu.events", "1.3.442");
185281
185293
  }
185282
185294
  async function reinitialize1PEventLoggingIfConfigChanged() {
185283
185295
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -207579,6 +207591,19 @@ function diffRowAdded(nextCells, next, ci, y, startX, endX, nextCell, cb) {
207579
207591
  }
207580
207592
  return false;
207581
207593
  }
207594
+ function diffRowTrailingRemoved(prevCells, nextCells, prev, ci, y, startX, endX, prevCell, cb) {
207595
+ for (let x2 = startX;x2 < endX; x2++, ci += 2) {
207596
+ if (prevCells[ci] === 0 && prevCells[ci | 1] === 0 && nextCells[ci] === 0 && nextCells[ci | 1] === 0) {
207597
+ continue;
207598
+ }
207599
+ if ((prevCells[ci] !== 0 || prevCells[ci | 1] !== 0) && nextCells[ci] === 0 && nextCells[ci | 1] === 0) {
207600
+ cellAtCI(prev, ci, prevCell);
207601
+ if (cb(x2, y, prevCell, undefined))
207602
+ return true;
207603
+ }
207604
+ }
207605
+ return false;
207606
+ }
207582
207607
  function diffSameWidth(prev, next, startX, endX, startY, endY, cb) {
207583
207608
  const prevCells = prev.cells;
207584
207609
  const nextCells = next.cells;
@@ -207606,6 +207631,11 @@ function diffSameWidth(prev, next, startX, endX, startY, endY, cb) {
207606
207631
  if (prevIn && nextIn) {
207607
207632
  if (diffRowBoth(prevCells, nextCells, prev, next, rowCI, y, startX, rowEndX, prevCell, nextCell, cb))
207608
207633
  return true;
207634
+ if (rowEndX < width) {
207635
+ const tailCI = y * width + rowEndX << 1;
207636
+ if (diffRowTrailingRemoved(prevCells, nextCells, prev, tailCI, y, rowEndX, width, prevCell, cb))
207637
+ return true;
207638
+ }
207609
207639
  } else if (prevIn) {
207610
207640
  if (diffRowRemoved(prev, rowCI, y, startX, rowEndX, prevCell, cb))
207611
207641
  return true;
@@ -221193,7 +221223,7 @@ function getAttributionHeader(fingerprint) {
221193
221223
  if (!isAttributionHeaderEnabled()) {
221194
221224
  return "";
221195
221225
  }
221196
- const version2 = `${"1.3.440"}.${fingerprint}`;
221226
+ const version2 = `${"1.3.442"}.${fingerprint}`;
221197
221227
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
221198
221228
  const cch = "";
221199
221229
  const workload = getWorkload();
@@ -306113,7 +306143,7 @@ function getTelemetryAttributes() {
306113
306143
  attributes["session.id"] = sessionId;
306114
306144
  }
306115
306145
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
306116
- attributes["app.version"] = "1.3.440";
306146
+ attributes["app.version"] = "1.3.442";
306117
306147
  }
306118
306148
  const oauthAccount = getOauthAccountInfo();
306119
306149
  if (oauthAccount) {
@@ -416468,7 +416498,7 @@ function getInstallationEnv() {
416468
416498
  return;
416469
416499
  }
416470
416500
  function getClaudeCodeVersion() {
416471
- return "1.3.440";
416501
+ return "1.3.442";
416472
416502
  }
416473
416503
  async function getInstalledVSCodeExtensionVersion(command) {
416474
416504
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -421706,7 +421736,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
421706
421736
  const client4 = new Client({
421707
421737
  name: "claude-code",
421708
421738
  title: "RAYU",
421709
- version: "1.3.440",
421739
+ version: "1.3.442",
421710
421740
  description: "Anthropic's agentic coding tool",
421711
421741
  websiteUrl: PRODUCT_URL
421712
421742
  }, {
@@ -422023,7 +422053,7 @@ var init_client7 = __esm(() => {
422023
422053
  const client4 = new Client({
422024
422054
  name: "claude-code",
422025
422055
  title: "RAYU",
422026
- version: "1.3.440",
422056
+ version: "1.3.442",
422027
422057
  description: "Anthropic's agentic coding tool",
422028
422058
  websiteUrl: PRODUCT_URL
422029
422059
  }, {
@@ -436828,7 +436858,7 @@ function computeFingerprint(messageText, version2) {
436828
436858
  }
436829
436859
  function computeFingerprintFromMessages(messages) {
436830
436860
  const firstMessageText = extractFirstMessageText(messages);
436831
- return computeFingerprint(firstMessageText, "1.3.440");
436861
+ return computeFingerprint(firstMessageText, "1.3.442");
436832
436862
  }
436833
436863
  var FINGERPRINT_SALT = "59cf53e54c78";
436834
436864
  var init_fingerprint = () => {};
@@ -436870,7 +436900,7 @@ async function sideQuery(opts) {
436870
436900
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
436871
436901
  }
436872
436902
  const messageText = extractFirstUserMessageText(messages);
436873
- const fingerprint = computeFingerprint(messageText, "1.3.440");
436903
+ const fingerprint = computeFingerprint(messageText, "1.3.442");
436874
436904
  const attributionHeader = getAttributionHeader(fingerprint);
436875
436905
  const systemBlocks = [
436876
436906
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -439423,7 +439453,8 @@ function AssistantThinkingMessage({
439423
439453
  isTranscriptMode,
439424
439454
  verbose,
439425
439455
  hideInTranscript = false,
439426
- isThinking = false
439456
+ isThinking = false,
439457
+ liveStreamingPreview = false
439427
439458
  }) {
439428
439459
  if (!thinking) {
439429
439460
  return null;
@@ -439432,6 +439463,40 @@ function AssistantThinkingMessage({
439432
439463
  return null;
439433
439464
  }
439434
439465
  const shouldShowFullThinking = isTranscriptMode || verbose;
439466
+ if (liveStreamingPreview && isThinking && !shouldShowFullThinking) {
439467
+ const previewLines = thinking.split(`
439468
+ `).map((line) => line.trimEnd()).filter((line) => line.length > 0).slice(-THINKING_PREVIEW_LINES);
439469
+ const preview = previewLines.join(`
439470
+ `);
439471
+ return /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
439472
+ flexDirection: "column",
439473
+ marginTop: addMargin ? 1 : 0,
439474
+ width: "100%",
439475
+ children: [
439476
+ /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThinkingHeader, {}, undefined, false, undefined, this),
439477
+ /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
439478
+ paddingLeft: 2,
439479
+ flexDirection: "column",
439480
+ children: [
439481
+ preview ? /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
439482
+ height: Math.min(THINKING_PREVIEW_LINES, previewLines.length),
439483
+ flexDirection: "column",
439484
+ overflow: "hidden",
439485
+ children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
439486
+ dimColor: true,
439487
+ children: preview
439488
+ }, undefined, false, undefined, this)
439489
+ }, undefined, false, undefined, this) : null,
439490
+ /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
439491
+ dimColor: true,
439492
+ italic: true,
439493
+ children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(CtrlOToExpand, {}, undefined, false, undefined, this)
439494
+ }, undefined, false, undefined, this)
439495
+ ]
439496
+ }, undefined, true, undefined, this)
439497
+ ]
439498
+ }, undefined, true, undefined, this);
439499
+ }
439435
439500
  if (!shouldShowFullThinking) {
439436
439501
  return /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
439437
439502
  marginTop: addMargin ? 1 : 0,
@@ -439477,7 +439542,7 @@ function AssistantThinkingMessage({
439477
439542
  ]
439478
439543
  }, undefined, true, undefined, this);
439479
439544
  }
439480
- var jsx_dev_runtime71, THINK_PULSE, THINK_FRAMES, THINK_ICON_COLOR = "#F5F5F5";
439545
+ var jsx_dev_runtime71, THINK_PULSE, THINK_FRAMES, THINK_ICON_COLOR = "#F5F5F5", THINKING_PREVIEW_LINES = 3;
439481
439546
  var init_AssistantThinkingMessage = __esm(() => {
439482
439547
  init_figures();
439483
439548
  init_ink2();
@@ -447739,7 +447804,7 @@ function TurnDurationMessage(t0) {
447739
447804
  } else {
447740
447805
  t6 = $3[8];
447741
447806
  }
447742
- const t7 = showTurnDuration && `${verb} for ${duration3}`;
447807
+ const t7 = showTurnDuration && `Rayu ${verb.toLowerCase()} for ${duration3}`;
447743
447808
  const t8 = backgroundTaskSummary && ` · ${backgroundTaskSummary} still running`;
447744
447809
  let t9;
447745
447810
  if ($3[9] !== budgetSuffix || $3[10] !== t7 || $3[11] !== t8) {
@@ -468694,34 +468759,41 @@ function classifySource(rawSource, localExists) {
468694
468759
  }
468695
468760
  return { type: "local", path: source };
468696
468761
  }
468697
- async function locateSkillDir(root2) {
468762
+ async function locateSkillDirs(root2) {
468698
468763
  if (await fileExists(join92(root2, "SKILL.md")))
468699
- return root2;
468700
- const found = await findSkillDirRecursive(root2, 0, 5);
468701
- if (found)
468764
+ return [root2];
468765
+ const skillsContainer = join92(root2, "skills");
468766
+ if (await fileExists(skillsContainer)) {
468767
+ const collected = await collectSkillDirs(skillsContainer, 0, 4, []);
468768
+ if (collected.length > 0)
468769
+ return collected;
468770
+ }
468771
+ const found = await collectSkillDirs(root2, 0, 5, []);
468772
+ if (found.length > 0)
468702
468773
  return found;
468703
- throw new InstallSkillError("No SKILL.md found. Check that the source has a SKILL.md file at the root, or " + "specify a subdirectory: owner/repo/tree/main/path/to/skill");
468774
+ throw new InstallSkillError("No SKILL.md found. The source should contain a SKILL.md (a single skill), " + 'a "skills/" directory of skills, or you can point at a subdirectory: ' + "owner/repo/tree/main/path/to/skill");
468704
468775
  }
468705
- async function findSkillDirRecursive(dir, depth, maxDepth) {
468706
- if (depth >= maxDepth)
468707
- return null;
468776
+ async function collectSkillDirs(dir, depth, maxDepth, out) {
468777
+ if (depth > maxDepth)
468778
+ return out;
468779
+ if (await fileExists(join92(dir, "SKILL.md"))) {
468780
+ out.push(dir);
468781
+ return out;
468782
+ }
468708
468783
  let entries;
468709
468784
  try {
468710
468785
  entries = await readdir13(dir, { withFileTypes: true });
468711
468786
  } catch {
468712
- return null;
468787
+ return out;
468713
468788
  }
468714
468789
  for (const e2 of entries) {
468715
468790
  if (!e2.isDirectory())
468716
468791
  continue;
468717
- const candidate = join92(dir, e2.name);
468718
- if (await fileExists(join92(candidate, "SKILL.md")))
468719
- return candidate;
468720
- const deeper = await findSkillDirRecursive(candidate, depth + 1, maxDepth);
468721
- if (deeper)
468722
- return deeper;
468792
+ if (e2.name.startsWith(".") || e2.name === "node_modules")
468793
+ continue;
468794
+ await collectSkillDirs(join92(dir, e2.name), depth + 1, maxDepth, out);
468723
468795
  }
468724
- return null;
468796
+ return out;
468725
468797
  }
468726
468798
  async function fileExists(p) {
468727
468799
  try {
@@ -468754,9 +468826,9 @@ async function installSkillFromSource(rawSource, options = {}) {
468754
468826
  const kind = classifySource(source, localExists);
468755
468827
  const staging = await mkdtemp3(join92(tmpdir10(), "rayu-skill-"));
468756
468828
  try {
468757
- let skillDir;
468829
+ let scanRoot;
468758
468830
  if (kind.type === "local") {
468759
- skillDir = await locateSkillDir(expandHome(kind.path));
468831
+ scanRoot = expandHome(kind.path);
468760
468832
  } else if (kind.type === "github") {
468761
468833
  const cloneDir = join92(staging, "repo");
468762
468834
  await cloneGitHub(kind.owner, kind.repo, cloneDir);
@@ -468764,41 +468836,57 @@ async function installSkillFromSource(rawSource, options = {}) {
468764
468836
  if (!resolve38(root2).startsWith(resolve38(cloneDir))) {
468765
468837
  throw new InstallSkillError("Invalid subdir in GitHub source.");
468766
468838
  }
468767
- skillDir = await locateSkillDir(root2);
468839
+ scanRoot = root2;
468768
468840
  } else {
468769
468841
  const dlDir = join92(staging, "dl");
468770
468842
  await mkdir19(dlDir, { recursive: true });
468771
468843
  const md3 = await downloadText(kind.url);
468772
468844
  await writeFile17(join92(dlDir, "SKILL.md"), md3, "utf-8");
468773
- skillDir = dlDir;
468774
- }
468775
- const skillFile = join92(skillDir, "SKILL.md");
468776
- let content;
468777
- try {
468778
- content = await readFile24(skillFile, { encoding: "utf-8" });
468779
- } catch {
468780
- throw new InstallSkillError(`SKILL.md not readable at ${skillFile}.`);
468845
+ scanRoot = dlDir;
468781
468846
  }
468782
- const { frontmatter, content: markdown } = parseFrontmatter(content, skillFile);
468783
- const nameSource = (frontmatter.name != null ? String(frontmatter.name) : "") || basename27(skillDir);
468784
- const name = sanitizeSkillName(nameSource);
468785
- const description = (frontmatter.description != null ? String(frontmatter.description) : "") || firstLine(markdown) || "Installed skill";
468847
+ const skillDirs = await locateSkillDirs(scanRoot);
468786
468848
  const skillsRoot = getUserSkillsDir();
468787
- const dest = join92(skillsRoot, name);
468788
- if (!resolve38(dest).startsWith(resolve38(skillsRoot) + sep25)) {
468789
- throw new InstallSkillError(`Refusing to install outside ${skillsRoot}.`);
468790
- }
468791
- if (await fileExists(dest) && !options.overwrite) {
468792
- throw new InstallSkillError(`A skill named "${name}" is already installed. Re-run with overwrite to replace it.`);
468849
+ const planned = [];
468850
+ const seenNames = new Set;
468851
+ for (const skillDir of skillDirs) {
468852
+ const skillFile = join92(skillDir, "SKILL.md");
468853
+ let content;
468854
+ try {
468855
+ content = await readFile24(skillFile, { encoding: "utf-8" });
468856
+ } catch {
468857
+ throw new InstallSkillError(`SKILL.md not readable at ${skillFile}.`);
468858
+ }
468859
+ const { frontmatter, content: markdown } = parseFrontmatter(content, skillFile);
468860
+ const nameSource = (frontmatter.name != null ? String(frontmatter.name) : "") || basename27(skillDir);
468861
+ const name = sanitizeSkillName(nameSource);
468862
+ if (seenNames.has(name))
468863
+ continue;
468864
+ seenNames.add(name);
468865
+ const description = (frontmatter.description != null ? String(frontmatter.description) : "") || firstLine(markdown) || "Installed skill";
468866
+ const dest = join92(skillsRoot, name);
468867
+ if (!resolve38(dest).startsWith(resolve38(skillsRoot) + sep25)) {
468868
+ throw new InstallSkillError(`Refusing to install outside ${skillsRoot}.`);
468869
+ }
468870
+ planned.push({ skillDir, name, description, dest });
468793
468871
  }
468794
468872
  await mkdir19(skillsRoot, { recursive: true, mode: 448 });
468795
- const tmpDest = join92(skillsRoot, `.${name}.installing-${randomUUID21()}`);
468796
- await cp2(skillDir, tmpDest, { recursive: true });
468797
- await rm7(dest, { recursive: true, force: true });
468798
- await rename4(tmpDest, dest);
468873
+ const installed = [];
468874
+ for (const p of planned) {
468875
+ const replaced = await fileExists(p.dest);
468876
+ const tmpDest = join92(skillsRoot, `.${p.name}.installing-${randomUUID21()}`);
468877
+ await cp2(p.skillDir, tmpDest, { recursive: true });
468878
+ await rm7(p.dest, { recursive: true, force: true });
468879
+ await rename4(tmpDest, p.dest);
468880
+ installed.push({
468881
+ name: p.name,
468882
+ description: p.description,
468883
+ path: p.dest,
468884
+ replaced
468885
+ });
468886
+ }
468799
468887
  clearSkillCaches();
468800
468888
  clearCommandMemoizationCaches();
468801
- return { name, description, path: dest };
468889
+ return installed;
468802
468890
  } finally {
468803
468891
  await rm7(staging, { recursive: true, force: true }).catch((e2) => logError2(e2));
468804
468892
  }
@@ -468856,8 +468944,11 @@ The "source" can be:
468856
468944
  - a direct URL to a SKILL.md file
468857
468945
  - a local directory path containing a SKILL.md
468858
468946
 
468947
+ If the source is a collection — a repo with a "skills/" directory, or any tree
468948
+ containing multiple SKILL.md files — every skill it contains is installed.
468949
+
468859
468950
  Skills are installed into the Rayu user skills directory (~/.rayu/skills/<name>/).
468860
- Set "overwrite" to true to replace a skill that is already installed.`, inputSchema17, outputSchema15, InstallSkillTool;
468951
+ Reinstalling overwrites an existing skill of the same name and reports it as replaced.`, inputSchema17, outputSchema15, InstallSkillTool;
468861
468952
  var init_InstallSkillTool = __esm(() => {
468862
468953
  init_v4();
468863
468954
  init_Tool();
@@ -468867,9 +468958,12 @@ var init_InstallSkillTool = __esm(() => {
468867
468958
  overwrite: exports_external.boolean().optional().describe("Replace an already-installed skill with the same name")
468868
468959
  }));
468869
468960
  outputSchema15 = lazySchema(() => exports_external.object({
468870
- name: exports_external.string(),
468871
- description: exports_external.string(),
468872
- path: exports_external.string()
468961
+ skills: exports_external.array(exports_external.object({
468962
+ name: exports_external.string(),
468963
+ description: exports_external.string(),
468964
+ path: exports_external.string(),
468965
+ replaced: exports_external.boolean()
468966
+ }))
468873
468967
  }));
468874
468968
  InstallSkillTool = buildTool({
468875
468969
  name: INSTALL_SKILL_TOOL_NAME,
@@ -468916,17 +469010,21 @@ var init_InstallSkillTool = __esm(() => {
468916
469010
  };
468917
469011
  },
468918
469012
  async call(input, _context) {
468919
- const skill = await installSkillFromSource(input.source, {
469013
+ const skills = await installSkillFromSource(input.source, {
468920
469014
  overwrite: input.overwrite
468921
469015
  });
468922
- return { data: skill };
469016
+ return { data: { skills } };
468923
469017
  },
468924
469018
  mapToolResultToToolResultBlockParam(output, toolUseID) {
469019
+ const replaced = output.skills.filter((s2) => s2.replaced);
469020
+ const header = output.skills.length === 1 ? `Installed skill "${output.skills[0].name}"${output.skills[0].replaced ? " (a skill of the same name already existed and was overwritten)" : ""}.` : `Installed ${output.skills.length} skills` + (replaced.length ? ` (${replaced.length} already existed and ${replaced.length === 1 ? "was" : "were"} overwritten: ${replaced.map((s2) => s2.name).join(", ")})` : "") + ".";
469021
+ const lines2 = output.skills.map((s2) => `- /${s2.name}${s2.replaced ? " [overwritten]" : ""} (${s2.path}): ${s2.description}`);
468925
469022
  return {
468926
469023
  tool_use_id: toolUseID,
468927
469024
  type: "tool_result",
468928
- content: `Installed skill "${output.name}" into ${output.path}. It is now invocable as /${output.name} or via the Skill tool.
468929
- Description: ${output.description}`
469025
+ content: `${header} Each is now invocable as /<name> or via the Skill tool.
469026
+ ${lines2.join(`
469027
+ `)}`
468930
469028
  };
468931
469029
  }
468932
469030
  });
@@ -491483,12 +491581,13 @@ function rayuFeatureAllowed(featureKey) {
491483
491581
  if (!isUseRayuOAuthEnabled())
491484
491582
  return true;
491485
491583
  const ent = getCachedEntitlements();
491486
- if (!ent || !ent.features)
491487
- return true;
491488
- const f3 = ent.features[featureKey];
491489
- if (!f3)
491490
- return true;
491491
- return f3.enabled !== false;
491584
+ if (ent && ent.features) {
491585
+ const f3 = ent.features[featureKey];
491586
+ if (!f3)
491587
+ return true;
491588
+ return f3.enabled !== false;
491589
+ }
491590
+ return !hasRayuSession();
491492
491591
  }
491493
491592
  var FILE = "rayu-entitlements.json", REFRESH_COOLDOWN_MS = 30000, cache5 = null, loadedFromDisk = false, fetching = false, lastAttempt = 0;
491494
491593
  var init_rayuEntitlements = __esm(() => {
@@ -491497,6 +491596,191 @@ var init_rayuEntitlements = __esm(() => {
491497
491596
  init_rayuSession();
491498
491597
  });
491499
491598
 
491599
+ // src/services/rayuAuth/rayuFeatureUsage.ts
491600
+ function getFeatureUsage(featureKey) {
491601
+ maybeRefreshFeatureUsage();
491602
+ if (!cache6)
491603
+ return null;
491604
+ return cache6[featureKey] ?? null;
491605
+ }
491606
+ function maybeRefreshFeatureUsage() {
491607
+ if (isUseRayuOAuthEnabled() && hasRayuSession() && !fetching2 && Date.now() - lastAttempt2 > REFRESH_COOLDOWN_MS2) {
491608
+ refreshFeatureUsage();
491609
+ }
491610
+ }
491611
+ async function refreshFeatureUsage() {
491612
+ if (!isUseRayuOAuthEnabled() || !hasRayuSession() || fetching2)
491613
+ return;
491614
+ fetching2 = true;
491615
+ lastAttempt2 = Date.now();
491616
+ try {
491617
+ const token = await getValidRayuAccessToken();
491618
+ if (!token)
491619
+ return;
491620
+ const res = await globalThis.fetch(`${getRayuApiBaseUrl()}/usage/features`, { headers: { Authorization: `Bearer ${token}` } });
491621
+ if (!res.ok)
491622
+ return;
491623
+ const data = await res.json();
491624
+ if (data && typeof data === "object") {
491625
+ const next = {};
491626
+ for (const [k2, v2] of Object.entries(data)) {
491627
+ if (v2 && typeof v2 === "object") {
491628
+ const rawUsed = v2.used;
491629
+ const rawLimit = v2.limit;
491630
+ const used = typeof rawUsed === "number" && Number.isFinite(rawUsed) ? rawUsed : 0;
491631
+ const limit3 = typeof rawLimit === "number" && Number.isFinite(rawLimit) ? rawLimit : null;
491632
+ next[k2] = { used, limit: limit3 };
491633
+ }
491634
+ }
491635
+ cache6 = next;
491636
+ }
491637
+ } catch {} finally {
491638
+ fetching2 = false;
491639
+ }
491640
+ }
491641
+ function bumpFeatureUsage(featureKey) {
491642
+ if (!cache6)
491643
+ return;
491644
+ const cur = cache6[featureKey];
491645
+ if (cur)
491646
+ cache6[featureKey] = { ...cur, used: cur.used + 1 };
491647
+ }
491648
+ function clearFeatureUsage() {
491649
+ cache6 = null;
491650
+ lastAttempt2 = 0;
491651
+ }
491652
+ var REFRESH_COOLDOWN_MS2 = 60000, cache6 = null, fetching2 = false, lastAttempt2 = 0;
491653
+ var init_rayuFeatureUsage = __esm(() => {
491654
+ init_rayuSession();
491655
+ });
491656
+
491657
+ // src/services/rayuAuth/rayuPlansCatalog.ts
491658
+ function getEntryPaidPlan() {
491659
+ maybeRefreshPlansCatalog();
491660
+ if (!cache7)
491661
+ return null;
491662
+ let best = null;
491663
+ for (const p of cache7) {
491664
+ if (p.availability === "active" && p.priceCents > 0) {
491665
+ if (!best || p.priceCents < best.priceCents)
491666
+ best = p;
491667
+ }
491668
+ }
491669
+ return best;
491670
+ }
491671
+ function maybeRefreshPlansCatalog() {
491672
+ if (isUseRayuOAuthEnabled() && !fetching3 && Date.now() - lastAttempt3 > REFRESH_COOLDOWN_MS3) {
491673
+ refreshPlansCatalog();
491674
+ }
491675
+ }
491676
+ async function refreshPlansCatalog() {
491677
+ if (!isUseRayuOAuthEnabled() || fetching3)
491678
+ return;
491679
+ fetching3 = true;
491680
+ lastAttempt3 = Date.now();
491681
+ try {
491682
+ const res = await globalThis.fetch(`${getRayuApiBaseUrl()}/plans`);
491683
+ if (!res.ok)
491684
+ return;
491685
+ const data = await res.json();
491686
+ if (Array.isArray(data)) {
491687
+ cache7 = data.filter((p) => !!p && typeof p === "object" && typeof p.name === "string" && typeof p.priceCents === "number").map((p) => ({
491688
+ code: String(p.code),
491689
+ name: p.name,
491690
+ priceCents: p.priceCents,
491691
+ availability: String(p.availability)
491692
+ }));
491693
+ }
491694
+ } catch {} finally {
491695
+ fetching3 = false;
491696
+ }
491697
+ }
491698
+ var REFRESH_COOLDOWN_MS3 = 60000, cache7 = null, fetching3 = false, lastAttempt3 = 0;
491699
+ var init_rayuPlansCatalog = __esm(() => {
491700
+ init_rayuSession();
491701
+ });
491702
+
491703
+ // src/services/rayuAuth/paidFeatureGate.ts
491704
+ function isPaidFeatureLocked(featureKey) {
491705
+ return !rayuFeatureAllowed(featureKey);
491706
+ }
491707
+ function capitalize3(s2) {
491708
+ return s2.length ? s2[0].toUpperCase() + s2.slice(1) : s2;
491709
+ }
491710
+ function usd(cents) {
491711
+ return `$${(cents / 100).toFixed(cents % 100 === 0 ? 0 : 2)}`;
491712
+ }
491713
+ function upgradeTargetLabel() {
491714
+ const plan = getEntryPaidPlan();
491715
+ if (plan) {
491716
+ const price = plan.priceCents > 0 ? ` (${usd(plan.priceCents)}/mo)` : "";
491717
+ return `the ${plan.name} plan${price}`;
491718
+ }
491719
+ return "a paid plan";
491720
+ }
491721
+ function upgradePromptForUser(featureLabel) {
491722
+ return `${capitalize3(featureLabel)} is a paid feature. Please upgrade to ${upgradeTargetLabel()} to unlock it and all other premium features.`;
491723
+ }
491724
+ function paidFeatureUpgradeNote(featureLabel) {
491725
+ return `
491726
+
491727
+ ---
491728
+ > \uD83D\uDD12 **Paid feature — requires ${upgradeTargetLabel()}.**
491729
+ >
491730
+ > The signed-in user is on the **Free** plan, which does not include ${featureLabel}. This tool will refuse to run for them and return an error.
491731
+ >
491732
+ > If the user asks for ${featureLabel}, do **not** call this tool — it will fail. Instead, tell the user: "${upgradePromptForUser(featureLabel)}"
491733
+ >
491734
+ > Users on a paid plan get unlimited access to this tool.`;
491735
+ }
491736
+ function paidFeatureDescriptionSuffix() {
491737
+ return ` (Requires ${upgradeTargetLabel()}.)`;
491738
+ }
491739
+ function paidFeatureBlockedMessage(featureLabel) {
491740
+ return `\uD83D\uDD12 ${capitalize3(featureLabel)} requires ${upgradeTargetLabel()}. The signed-in user is on the Free plan, so this tool is locked. Tell the user: "${upgradePromptForUser(featureLabel)}" Do not retry this tool until they upgrade.`;
491741
+ }
491742
+ function featureLimitReached(featureKey) {
491743
+ if (!isUseRayuOAuthEnabled())
491744
+ return false;
491745
+ if (!rayuFeatureAllowed(featureKey))
491746
+ return false;
491747
+ const u4 = getFeatureUsage(featureKey);
491748
+ if (!u4 || u4.limit == null)
491749
+ return false;
491750
+ return u4.used >= u4.limit;
491751
+ }
491752
+ function usageSuffix(featureKey) {
491753
+ const u4 = getFeatureUsage(featureKey);
491754
+ if (!u4 || u4.limit == null)
491755
+ return "";
491756
+ return ` (${u4.used}/${u4.limit} used this month)`;
491757
+ }
491758
+ function featureLimitUpgradePrompt(featureLabel) {
491759
+ return `You've reached this month's ${featureLabel} limit. Upgrade to ${upgradeTargetLabel()} for unlimited ${featureLabel}, or wait until it resets next month.`;
491760
+ }
491761
+ function featureLimitReachedNote(featureKey, featureLabel) {
491762
+ return `
491763
+
491764
+ ---
491765
+ > \uD83D\uDD12 **Monthly ${featureLabel} limit reached${usageSuffix(featureKey)}.**
491766
+ >
491767
+ > The signed-in user has used their ${featureLabel} allowance for this month on their current plan. This tool will refuse to run until the limit resets next month (UTC) or they upgrade.
491768
+ >
491769
+ > If the user asks for ${featureLabel}, do **not** call this tool — it will fail. Instead, tell the user: "${featureLimitUpgradePrompt(featureLabel)}"`;
491770
+ }
491771
+ function featureLimitDescriptionSuffix(featureKey) {
491772
+ return ` (Monthly limit reached${usageSuffix(featureKey)} — upgrade for unlimited.)`;
491773
+ }
491774
+ function featureLimitReachedMessage(featureKey, featureLabel) {
491775
+ return `\uD83D\uDD12 Monthly ${featureLabel} limit reached${usageSuffix(featureKey)}. Tell the user: "${featureLimitUpgradePrompt(featureLabel)}" Do not retry this tool until the limit resets next month or they upgrade.`;
491776
+ }
491777
+ var init_paidFeatureGate = __esm(() => {
491778
+ init_rayuEntitlements();
491779
+ init_rayuFeatureUsage();
491780
+ init_rayuPlansCatalog();
491781
+ init_rayuSession();
491782
+ });
491783
+
491500
491784
  // src/tools/ImageGenTool/ImageGenTool.ts
491501
491785
  import { mkdir as mkdir21, readFile as readFile26, writeFile as writeFile19 } from "fs/promises";
491502
491786
  import { dirname as dirname43, isAbsolute as isAbsolute28, relative as relative20 } from "path";
@@ -491533,7 +491817,7 @@ function extForMedia(mediaType) {
491533
491817
  const ext = mediaType.split("/")[1] || "png";
491534
491818
  return ext === "jpeg" ? "jpg" : ext;
491535
491819
  }
491536
- var inputSchema21, outputSchema19, ImageGenTool;
491820
+ var IMAGE_GEN_FEATURE = "image_generation", IMAGE_GEN_LABEL = "image generation", inputSchema21, outputSchema19, ImageGenTool;
491537
491821
  var init_ImageGenTool = __esm(() => {
491538
491822
  init_v4();
491539
491823
  init_Tool();
@@ -491546,7 +491830,8 @@ var init_ImageGenTool = __esm(() => {
491546
491830
  init_vertexImageClient();
491547
491831
  init_prompt17();
491548
491832
  init_UI16();
491549
- init_rayuEntitlements();
491833
+ init_paidFeatureGate();
491834
+ init_rayuFeatureUsage();
491550
491835
  inputSchema21 = lazySchema(() => exports_external.strictObject({
491551
491836
  prompt: exports_external.string().min(1).describe("Text description of the image to generate, or the edit to make"),
491552
491837
  output_path: exports_external.string().optional().describe("Where to save the PNG (inside the working directory). Default: ./generated-image-<timestamp>.png"),
@@ -491579,7 +491864,7 @@ var init_ImageGenTool = __esm(() => {
491579
491864
  return outputSchema19();
491580
491865
  },
491581
491866
  isEnabled() {
491582
- return (getNvidiaApiKey() != null || isGeminiVertexImageAvailable()) && rayuFeatureAllowed("image_generation");
491867
+ return getNvidiaApiKey() != null || isGeminiVertexImageAvailable();
491583
491868
  },
491584
491869
  isReadOnly() {
491585
491870
  return false;
@@ -491591,6 +491876,12 @@ var init_ImageGenTool = __esm(() => {
491591
491876
  return `GenerateImage: ${input.prompt}`;
491592
491877
  },
491593
491878
  async description() {
491879
+ if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
491880
+ return DESCRIPTION13 + paidFeatureDescriptionSuffix();
491881
+ }
491882
+ if (featureLimitReached(IMAGE_GEN_FEATURE)) {
491883
+ return DESCRIPTION13 + featureLimitDescriptionSuffix(IMAGE_GEN_FEATURE);
491884
+ }
491594
491885
  return DESCRIPTION13;
491595
491886
  },
491596
491887
  userFacingName() {
@@ -491600,7 +491891,14 @@ var init_ImageGenTool = __esm(() => {
491600
491891
  return input?.prompt ? `Generating image: ${input.prompt}` : "Generating image";
491601
491892
  },
491602
491893
  async prompt() {
491603
- return getImageGenPrompt();
491894
+ const base2 = getImageGenPrompt();
491895
+ if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
491896
+ return base2 + paidFeatureUpgradeNote(IMAGE_GEN_LABEL);
491897
+ }
491898
+ if (featureLimitReached(IMAGE_GEN_FEATURE)) {
491899
+ return base2 + featureLimitReachedNote(IMAGE_GEN_FEATURE, IMAGE_GEN_LABEL);
491900
+ }
491901
+ return base2;
491604
491902
  },
491605
491903
  async validateInput(input) {
491606
491904
  const { ok } = resolveOutputPath(input.output_path);
@@ -491628,6 +491926,12 @@ var init_ImageGenTool = __esm(() => {
491628
491926
  };
491629
491927
  },
491630
491928
  async call(input, context) {
491929
+ if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
491930
+ throw new Error(paidFeatureBlockedMessage(IMAGE_GEN_LABEL));
491931
+ }
491932
+ if (featureLimitReached(IMAGE_GEN_FEATURE)) {
491933
+ throw new Error(featureLimitReachedMessage(IMAGE_GEN_FEATURE, IMAGE_GEN_LABEL));
491934
+ }
491631
491935
  if (input.output_path && !resolveOutputPath(input.output_path).ok) {
491632
491936
  throw new Error("output_path must be a file inside the working directory.");
491633
491937
  }
@@ -491689,6 +491993,7 @@ var init_ImageGenTool = __esm(() => {
491689
491993
  inlineMedia = `image/${r2.mediaType}`;
491690
491994
  } catch {}
491691
491995
  const dims = imageDimensions(buffer);
491996
+ bumpFeatureUsage(IMAGE_GEN_FEATURE);
491692
491997
  return {
491693
491998
  data: {
491694
491999
  path: path22,
@@ -492312,7 +492617,7 @@ function resolveOutputPath2(output_path) {
492312
492617
  const ok = rel.length > 0 && !rel.startsWith("..") && !isAbsolute29(rel);
492313
492618
  return { ok, path: path22 };
492314
492619
  }
492315
- var inputSchema22, outputSchema20, VideoGenTool;
492620
+ var VIDEO_GEN_FEATURE = "video_generation", VIDEO_GEN_LABEL = "video generation", inputSchema22, outputSchema20, VideoGenTool;
492316
492621
  var init_VideoGenTool = __esm(() => {
492317
492622
  init_v4();
492318
492623
  init_Tool();
@@ -492325,7 +492630,8 @@ var init_VideoGenTool = __esm(() => {
492325
492630
  init_vertexVideoClient();
492326
492631
  init_prompt18();
492327
492632
  init_UI17();
492328
- init_rayuEntitlements();
492633
+ init_paidFeatureGate();
492634
+ init_rayuFeatureUsage();
492329
492635
  inputSchema22 = lazySchema(() => exports_external.strictObject({
492330
492636
  prompt: exports_external.string().min(1).describe("Text description of the video to generate, or the motion to apply"),
492331
492637
  output_path: exports_external.string().optional().describe("Where to save the MP4 (inside the working directory). Default: ./generated-video-<timestamp>.mp4"),
@@ -492359,7 +492665,7 @@ var init_VideoGenTool = __esm(() => {
492359
492665
  return outputSchema20();
492360
492666
  },
492361
492667
  isEnabled() {
492362
- return (isVideoEnabled() || isGeminiVertexVideoAvailable()) && rayuFeatureAllowed("video_generation");
492668
+ return isVideoEnabled() || isGeminiVertexVideoAvailable();
492363
492669
  },
492364
492670
  isReadOnly() {
492365
492671
  return false;
@@ -492371,6 +492677,12 @@ var init_VideoGenTool = __esm(() => {
492371
492677
  return `GenerateVideo: ${input.prompt}`;
492372
492678
  },
492373
492679
  async description() {
492680
+ if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
492681
+ return DESCRIPTION14 + paidFeatureDescriptionSuffix();
492682
+ }
492683
+ if (featureLimitReached(VIDEO_GEN_FEATURE)) {
492684
+ return DESCRIPTION14 + featureLimitDescriptionSuffix(VIDEO_GEN_FEATURE);
492685
+ }
492374
492686
  return DESCRIPTION14;
492375
492687
  },
492376
492688
  userFacingName() {
@@ -492380,7 +492692,14 @@ var init_VideoGenTool = __esm(() => {
492380
492692
  return input?.prompt ? `Generating video (please wait ~1-2 min): ${input.prompt}` : "Generating video — please wait, this takes ~1-2 minutes";
492381
492693
  },
492382
492694
  async prompt() {
492383
- return getVideoGenPrompt();
492695
+ const base2 = getVideoGenPrompt();
492696
+ if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
492697
+ return base2 + paidFeatureUpgradeNote(VIDEO_GEN_LABEL);
492698
+ }
492699
+ if (featureLimitReached(VIDEO_GEN_FEATURE)) {
492700
+ return base2 + featureLimitReachedNote(VIDEO_GEN_FEATURE, VIDEO_GEN_LABEL);
492701
+ }
492702
+ return base2;
492384
492703
  },
492385
492704
  async validateInput(input) {
492386
492705
  const { ok } = resolveOutputPath2(input.output_path);
@@ -492408,6 +492727,12 @@ var init_VideoGenTool = __esm(() => {
492408
492727
  };
492409
492728
  },
492410
492729
  async call(input, context) {
492730
+ if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
492731
+ throw new Error(paidFeatureBlockedMessage(VIDEO_GEN_LABEL));
492732
+ }
492733
+ if (featureLimitReached(VIDEO_GEN_FEATURE)) {
492734
+ throw new Error(featureLimitReachedMessage(VIDEO_GEN_FEATURE, VIDEO_GEN_LABEL));
492735
+ }
492411
492736
  const { ok, path: path22 } = resolveOutputPath2(input.output_path);
492412
492737
  if (!ok) {
492413
492738
  throw new Error("output_path must be a file inside the working directory.");
@@ -492459,6 +492784,7 @@ var init_VideoGenTool = __esm(() => {
492459
492784
  await mkdir22(dirname44(path22), { recursive: true });
492460
492785
  await writeFile20(path22, buffer);
492461
492786
  const preview = await extractPreviewFrame(path22);
492787
+ bumpFeatureUsage(VIDEO_GEN_FEATURE);
492462
492788
  return {
492463
492789
  data: {
492464
492790
  path: path22,
@@ -507483,7 +507809,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
507483
507809
  }
507484
507810
  }
507485
507811
  function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_STATE_CACHE_SIZE) {
507486
- const cache6 = createFileStateCacheWithSizeLimit(maxSize);
507812
+ const cache8 = createFileStateCacheWithSizeLimit(maxSize);
507487
507813
  const fileReadToolUseIds = new Map;
507488
507814
  const fileWriteToolUseIds = new Map;
507489
507815
  const fileEditToolUseIds = new Map;
@@ -507527,7 +507853,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
507527
507853
  `).trim();
507528
507854
  if (message.timestamp) {
507529
507855
  const timestamp = new Date(message.timestamp).getTime();
507530
- cache6.set(readFilePath, {
507856
+ cache8.set(readFilePath, {
507531
507857
  content: fileContent,
507532
507858
  timestamp,
507533
507859
  offset: undefined,
@@ -507538,7 +507864,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
507538
507864
  const writeToolData = fileWriteToolUseIds.get(content.tool_use_id);
507539
507865
  if (writeToolData && message.timestamp) {
507540
507866
  const timestamp = new Date(message.timestamp).getTime();
507541
- cache6.set(writeToolData.filePath, {
507867
+ cache8.set(writeToolData.filePath, {
507542
507868
  content: writeToolData.content,
507543
507869
  timestamp,
507544
507870
  offset: undefined,
@@ -507549,7 +507875,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
507549
507875
  if (editFilePath && content.is_error !== true) {
507550
507876
  try {
507551
507877
  const { content: diskContent } = readFileSyncWithMetadata(editFilePath);
507552
- cache6.set(editFilePath, {
507878
+ cache8.set(editFilePath, {
507553
507879
  content: diskContent,
507554
507880
  timestamp: getFileModificationTime(editFilePath),
507555
507881
  offset: undefined,
@@ -507565,7 +507891,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
507565
507891
  }
507566
507892
  }
507567
507893
  }
507568
- return cache6;
507894
+ return cache8;
507569
507895
  }
507570
507896
  function extractBashToolsFromMessages(messages) {
507571
507897
  const tools = new Set;
@@ -522790,8 +523116,8 @@ function filterSwarmFieldsFromSchema(toolName2, schema) {
522790
523116
  }
522791
523117
  async function toolToAPISchema(tool, options) {
522792
523118
  const cacheKey = "inputJSONSchema" in tool && tool.inputJSONSchema ? `${tool.name}:${jsonStringify(tool.inputJSONSchema)}` : tool.name;
522793
- const cache6 = getToolSchemaCache();
522794
- let base2 = cache6.get(cacheKey);
523119
+ const cache8 = getToolSchemaCache();
523120
+ let base2 = cache8.get(cacheKey);
522795
523121
  if (!base2) {
522796
523122
  const strictToolsEnabled = checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_tool_pear");
522797
523123
  let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
@@ -522814,7 +523140,7 @@ async function toolToAPISchema(tool, options) {
522814
523140
  if (getAPIProvider() === "anthropic" && !isOpenAICompatibleActive() && isFirstPartyAnthropicBaseUrl() && (getFeatureValue_CACHED_MAY_BE_STALE("tengu_fgts", false) || isEnvTruthy(process.env.CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING))) {
522815
523141
  base2.eager_input_streaming = true;
522816
523142
  }
522817
- cache6.set(cacheKey, base2);
523143
+ cache8.set(cacheKey, base2);
522818
523144
  }
522819
523145
  const schema = {
522820
523146
  name: base2.name,
@@ -529931,13 +530257,14 @@ class HighlightSegmenter {
529931
530257
  this.stringPos += token.code.length;
529932
530258
  this.tokenIdx++;
529933
530259
  } else {
530260
+ const charValue = token.value;
529934
530261
  const charsNeeded = targetVisiblePos - this.visiblePos;
529935
- const charsAvailable = token.value.length - this.charIdx;
530262
+ const charsAvailable = charValue.length - this.charIdx;
529936
530263
  const charsToTake = Math.min(charsNeeded, charsAvailable);
529937
530264
  this.stringPos += charsToTake;
529938
530265
  this.visiblePos += charsToTake;
529939
530266
  this.charIdx += charsToTake;
529940
- if (this.charIdx >= token.value.length) {
530267
+ if (this.charIdx >= charValue.length) {
529941
530268
  this.tokenIdx++;
529942
530269
  this.charIdx = 0;
529943
530270
  }
@@ -532048,7 +532375,7 @@ function Feedback({
532048
532375
  platform: env4.platform,
532049
532376
  gitRepo: envInfo.isGit,
532050
532377
  terminal: env4.terminal,
532051
- version: "1.3.440",
532378
+ version: "1.3.442",
532052
532379
  transcript: normalizeMessagesForAPI(messages),
532053
532380
  errors: sanitizedErrors,
532054
532381
  lastApiRequest: getLastAPIRequest(),
@@ -532240,7 +532567,7 @@ function Feedback({
532240
532567
  ", ",
532241
532568
  env4.terminal,
532242
532569
  ", v",
532243
- "1.3.440"
532570
+ "1.3.442"
532244
532571
  ]
532245
532572
  }, undefined, true, undefined, this)
532246
532573
  ]
@@ -532346,7 +532673,7 @@ ${sanitizedDescription}
532346
532673
  ` + `**Environment Info**
532347
532674
  ` + `- Platform: ${env4.platform}
532348
532675
  ` + `- Terminal: ${env4.terminal}
532349
- ` + `- Version: ${"1.3.440"}
532676
+ ` + `- Version: ${"1.3.442"}
532350
532677
  ` + `- Feedback ID: ${feedbackId}
532351
532678
  ` + `
532352
532679
  **Errors**
@@ -535186,9 +535513,9 @@ async function assertMinVersion() {
535186
535513
  if (false) {}
535187
535514
  try {
535188
535515
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
535189
- if (versionConfig.minVersion && lt("1.3.440", versionConfig.minVersion)) {
535516
+ if (versionConfig.minVersion && lt("1.3.442", versionConfig.minVersion)) {
535190
535517
  console.error(`
535191
- It looks like your version of RAYU (${"1.3.440"}) needs an update.
535518
+ It looks like your version of RAYU (${"1.3.442"}) needs an update.
535192
535519
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
535193
535520
 
535194
535521
  To update, please run:
@@ -535414,7 +535741,7 @@ async function installGlobalPackage(specificVersion) {
535414
535741
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
535415
535742
  logEvent("tengu_auto_updater_lock_contention", {
535416
535743
  pid: process.pid,
535417
- currentVersion: "1.3.440"
535744
+ currentVersion: "1.3.442"
535418
535745
  });
535419
535746
  return "in_progress";
535420
535747
  }
@@ -535423,7 +535750,7 @@ async function installGlobalPackage(specificVersion) {
535423
535750
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
535424
535751
  logError2(new Error("Windows NPM detected in WSL environment"));
535425
535752
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
535426
- currentVersion: "1.3.440"
535753
+ currentVersion: "1.3.442"
535427
535754
  });
535428
535755
  console.error(`
535429
535756
  Error: Windows NPM detected in WSL
@@ -535959,7 +536286,7 @@ function detectLinuxGlobPatternWarnings() {
535959
536286
  }
535960
536287
  async function getDoctorDiagnostic() {
535961
536288
  const installationType = await getCurrentInstallationType();
535962
- const version2 = typeof MACRO !== "undefined" ? "1.3.440" : "unknown";
536289
+ const version2 = typeof MACRO !== "undefined" ? "1.3.442" : "unknown";
535963
536290
  const installationPath = await getInstallationPath();
535964
536291
  const invokedBinary = getInvokedBinary();
535965
536292
  const multipleInstallations = await detectMultipleInstallations();
@@ -536754,8 +537081,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
536754
537081
  const maxVersion = await getMaxVersion();
536755
537082
  if (maxVersion && gt(version2, maxVersion)) {
536756
537083
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
536757
- if (gte("1.3.440", maxVersion)) {
536758
- logForDebugging(`Native installer: current version ${"1.3.440"} is already at or above maxVersion ${maxVersion}, skipping update`);
537084
+ if (gte("1.3.442", maxVersion)) {
537085
+ logForDebugging(`Native installer: current version ${"1.3.442"} is already at or above maxVersion ${maxVersion}, skipping update`);
536759
537086
  logEvent("tengu_native_update_skipped_max_version", {
536760
537087
  latency_ms: Date.now() - startTime,
536761
537088
  max_version: maxVersion,
@@ -536766,7 +537093,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
536766
537093
  version2 = maxVersion;
536767
537094
  }
536768
537095
  }
536769
- if (!forceReinstall && version2 === "1.3.440" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
537096
+ if (!forceReinstall && version2 === "1.3.442" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
536770
537097
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
536771
537098
  logEvent("tengu_native_update_complete", {
536772
537099
  latency_ms: Date.now() - startTime,
@@ -537962,7 +538289,7 @@ function buildPrimarySection() {
537962
538289
  }, undefined, false, undefined, this);
537963
538290
  return [{
537964
538291
  label: "Version",
537965
- value: "1.3.440"
538292
+ value: "1.3.442"
537966
538293
  }, {
537967
538294
  label: "Session name",
537968
538295
  value: nameValue
@@ -541653,7 +541980,7 @@ function Config({
541653
541980
  }
541654
541981
  }, undefined, false, undefined, this)
541655
541982
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime170.jsxDEV(ChannelDowngradeDialog, {
541656
- currentVersion: "1.3.440",
541983
+ currentVersion: "1.3.442",
541657
541984
  onChoice: (choice) => {
541658
541985
  setShowSubmenu(null);
541659
541986
  setTabsHidden(false);
@@ -541665,7 +541992,7 @@ function Config({
541665
541992
  autoUpdatesChannel: "stable"
541666
541993
  };
541667
541994
  if (choice === "stay") {
541668
- newSettings.minimumVersion = "1.3.440";
541995
+ newSettings.minimumVersion = "1.3.442";
541669
541996
  }
541670
541997
  updateSettingsForSource("userSettings", newSettings);
541671
541998
  setSettingsData((prev_27) => ({
@@ -544492,14 +544819,14 @@ function computeTurnStats(turn) {
544492
544819
  };
544493
544820
  }
544494
544821
  function useTurnDiffs(messages) {
544495
- const cache6 = import_react108.useRef({
544822
+ const cache8 = import_react108.useRef({
544496
544823
  completedTurns: [],
544497
544824
  currentTurn: null,
544498
544825
  lastProcessedIndex: 0,
544499
544826
  lastTurnIndex: 0
544500
544827
  });
544501
544828
  return import_react108.useMemo(() => {
544502
- const c4 = cache6.current;
544829
+ const c4 = cache8.current;
544503
544830
  if (messages.length < c4.lastProcessedIndex) {
544504
544831
  c4.completedTurns = [];
544505
544832
  c4.currentTurn = null;
@@ -549727,7 +550054,7 @@ function HelpV2(t0) {
549727
550054
  let t6;
549728
550055
  if ($3[31] !== tabs) {
549729
550056
  t6 = /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Tabs, {
549730
- title: `Rayu-CLI v${"1.3.440"}`,
550057
+ title: `Rayu-CLI v${"1.3.442"}`,
549731
550058
  color: "professionalBlue",
549732
550059
  defaultTab: "general",
549733
550060
  children: tabs
@@ -555649,21 +555976,21 @@ async function loadInstallCountsCache() {
555649
555976
  logForDebugging("Install counts cache has invalid structure");
555650
555977
  return null;
555651
555978
  }
555652
- const cache6 = parsed;
555653
- if (cache6.version !== INSTALL_COUNTS_CACHE_VERSION) {
555654
- logForDebugging(`Install counts cache version mismatch (got ${cache6.version}, expected ${INSTALL_COUNTS_CACHE_VERSION})`);
555979
+ const cache8 = parsed;
555980
+ if (cache8.version !== INSTALL_COUNTS_CACHE_VERSION) {
555981
+ logForDebugging(`Install counts cache version mismatch (got ${cache8.version}, expected ${INSTALL_COUNTS_CACHE_VERSION})`);
555655
555982
  return null;
555656
555983
  }
555657
- if (typeof cache6.fetchedAt !== "string" || !Array.isArray(cache6.counts)) {
555984
+ if (typeof cache8.fetchedAt !== "string" || !Array.isArray(cache8.counts)) {
555658
555985
  logForDebugging("Install counts cache has invalid structure");
555659
555986
  return null;
555660
555987
  }
555661
- const fetchedAt = new Date(cache6.fetchedAt).getTime();
555988
+ const fetchedAt = new Date(cache8.fetchedAt).getTime();
555662
555989
  if (Number.isNaN(fetchedAt)) {
555663
555990
  logForDebugging("Install counts cache has invalid fetchedAt timestamp");
555664
555991
  return null;
555665
555992
  }
555666
- const validCounts = cache6.counts.every((entry) => typeof entry === "object" && entry !== null && typeof entry.plugin === "string" && typeof entry.unique_installs === "number");
555993
+ const validCounts = cache8.counts.every((entry) => typeof entry === "object" && entry !== null && typeof entry.plugin === "string" && typeof entry.unique_installs === "number");
555667
555994
  if (!validCounts) {
555668
555995
  logForDebugging("Install counts cache has malformed entries");
555669
555996
  return null;
@@ -555674,9 +556001,9 @@ async function loadInstallCountsCache() {
555674
556001
  return null;
555675
556002
  }
555676
556003
  return {
555677
- version: cache6.version,
555678
- fetchedAt: cache6.fetchedAt,
555679
- counts: cache6.counts
556004
+ version: cache8.version,
556005
+ fetchedAt: cache8.fetchedAt,
556006
+ counts: cache8.counts
555680
556007
  };
555681
556008
  } catch (error54) {
555682
556009
  const code = getErrnoCode(error54);
@@ -555686,13 +556013,13 @@ async function loadInstallCountsCache() {
555686
556013
  return null;
555687
556014
  }
555688
556015
  }
555689
- async function saveInstallCountsCache(cache6) {
556016
+ async function saveInstallCountsCache(cache8) {
555690
556017
  const cachePath = getInstallCountsCachePath();
555691
556018
  const tempPath = `${cachePath}.${randomBytes15(8).toString("hex")}.tmp`;
555692
556019
  try {
555693
556020
  const pluginsDir = getPluginsDirectory();
555694
556021
  await getFsImplementation().mkdir(pluginsDir);
555695
- const content = jsonStringify(cache6, null, 2);
556022
+ const content = jsonStringify(cache8, null, 2);
555696
556023
  await writeFile38(tempPath, content, {
555697
556024
  encoding: "utf-8",
555698
556025
  mode: 384
@@ -555724,12 +556051,12 @@ async function fetchInstallCountsFromGitHub() {
555724
556051
  }
555725
556052
  }
555726
556053
  async function getInstallCounts() {
555727
- const cache6 = await loadInstallCountsCache();
555728
- if (cache6) {
556054
+ const cache8 = await loadInstallCountsCache();
556055
+ if (cache8) {
555729
556056
  logForDebugging("Using cached install counts");
555730
556057
  logPluginFetch("install_counts", INSTALL_COUNTS_URL, "cache_hit", 0);
555731
556058
  const map4 = new Map;
555732
- for (const entry of cache6.counts) {
556059
+ for (const entry of cache8.counts) {
555733
556060
  map4.set(entry.plugin, entry.unique_installs);
555734
556061
  }
555735
556062
  return map4;
@@ -560142,7 +560469,7 @@ async function writeToDisk(plugins) {
560142
560469
  mode: 384
560143
560470
  });
560144
560471
  await rename11(tempPath, filePath);
560145
- cache6 = plugins;
560472
+ cache8 = plugins;
560146
560473
  } catch (error54) {
560147
560474
  logError2(error54);
560148
560475
  try {
@@ -560160,20 +560487,20 @@ async function loadFlaggedPlugins() {
560160
560487
  changed = true;
560161
560488
  }
560162
560489
  }
560163
- cache6 = all4;
560490
+ cache8 = all4;
560164
560491
  if (changed) {
560165
560492
  await writeToDisk(all4);
560166
560493
  }
560167
560494
  }
560168
560495
  function getFlaggedPlugins() {
560169
- return cache6 ?? {};
560496
+ return cache8 ?? {};
560170
560497
  }
560171
560498
  async function addFlaggedPlugin(pluginId) {
560172
- if (cache6 === null) {
560173
- cache6 = await readFromDisk();
560499
+ if (cache8 === null) {
560500
+ cache8 = await readFromDisk();
560174
560501
  }
560175
560502
  const updated = {
560176
- ...cache6,
560503
+ ...cache8,
560177
560504
  [pluginId]: {
560178
560505
  flaggedAt: new Date().toISOString()
560179
560506
  }
@@ -560182,12 +560509,12 @@ async function addFlaggedPlugin(pluginId) {
560182
560509
  logForDebugging(`Flagged plugin: ${pluginId}`);
560183
560510
  }
560184
560511
  async function markFlaggedPluginsSeen(pluginIds) {
560185
- if (cache6 === null) {
560186
- cache6 = await readFromDisk();
560512
+ if (cache8 === null) {
560513
+ cache8 = await readFromDisk();
560187
560514
  }
560188
560515
  const now2 = new Date().toISOString();
560189
560516
  let changed = false;
560190
- const updated = { ...cache6 };
560517
+ const updated = { ...cache8 };
560191
560518
  for (const id of pluginIds) {
560192
560519
  const entry = updated[id];
560193
560520
  if (entry && !entry.seenAt) {
@@ -560200,16 +560527,16 @@ async function markFlaggedPluginsSeen(pluginIds) {
560200
560527
  }
560201
560528
  }
560202
560529
  async function removeFlaggedPlugin(pluginId) {
560203
- if (cache6 === null) {
560204
- cache6 = await readFromDisk();
560530
+ if (cache8 === null) {
560531
+ cache8 = await readFromDisk();
560205
560532
  }
560206
- if (!(pluginId in cache6))
560533
+ if (!(pluginId in cache8))
560207
560534
  return;
560208
- const { [pluginId]: _2, ...rest } = cache6;
560209
- cache6 = rest;
560535
+ const { [pluginId]: _2, ...rest } = cache8;
560536
+ cache8 = rest;
560210
560537
  await writeToDisk(rest);
560211
560538
  }
560212
- var FLAGGED_PLUGINS_FILENAME = "flagged-plugins.json", SEEN_EXPIRY_MS, cache6 = null;
560539
+ var FLAGGED_PLUGINS_FILENAME = "flagged-plugins.json", SEEN_EXPIRY_MS, cache8 = null;
560213
560540
  var init_pluginFlagging = __esm(() => {
560214
560541
  init_debug();
560215
560542
  init_fsOperations();
@@ -569814,7 +570141,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
569814
570141
  }
569815
570142
  return [];
569816
570143
  }
569817
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.440") {
570144
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.442") {
569818
570145
  if (false) {}
569819
570146
  const cachedChangelog = await getStoredChangelog();
569820
570147
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -569827,7 +570154,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.440")
569827
570154
  releaseNotes
569828
570155
  };
569829
570156
  }
569830
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.3.440") {
570157
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.3.442") {
569831
570158
  if (false) {}
569832
570159
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
569833
570160
  return {
@@ -569955,7 +570282,7 @@ function getRecentActivitySync() {
569955
570282
  return cachedActivity;
569956
570283
  }
569957
570284
  function getLogoDisplayData() {
569958
- const version2 = process.env.DEMO_VERSION ?? "1.3.440";
570285
+ const version2 = process.env.DEMO_VERSION ?? "1.3.442";
569959
570286
  const serverUrl = getDirectConnectServerUrl();
569960
570287
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
569961
570288
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -571202,7 +571529,7 @@ function LogoV2() {
571202
571529
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
571203
571530
  t2 = () => {
571204
571531
  const currentConfig = getGlobalConfig();
571205
- if (currentConfig.lastReleaseNotesSeen === "1.3.440") {
571532
+ if (currentConfig.lastReleaseNotesSeen === "1.3.442") {
571206
571533
  return;
571207
571534
  }
571208
571535
  saveGlobalConfig(_temp327);
@@ -571680,7 +572007,7 @@ function LogoV2() {
571680
572007
  t24 = $3[61];
571681
572008
  }
571682
572009
  const _latestNpm = getCachedLatestNpmVersionSync();
571683
- const _updateFeeds = _latestNpm && gt(_latestNpm, "1.3.440") ? [createUpdateAvailableFeed("1.3.440", _latestNpm)] : [];
572010
+ const _updateFeeds = _latestNpm && gt(_latestNpm, "1.3.442") ? [createUpdateAvailableFeed("1.3.442", _latestNpm)] : [];
571684
572011
  const t25 = layoutMode === "horizontal" && /* @__PURE__ */ jsx_dev_runtime239.jsxDEV(FeedColumn, {
571685
572012
  feeds: showOnboarding ? [createProjectOnboardingFeed(getSteps()), createRecentActivityFeed(activities)] : showGuestPassesUpsell ? [createRecentActivityFeed(activities), createGuestPassesFeed()] : showOverageCreditUpsell ? [createRecentActivityFeed(activities), createOverageCreditFeed()] : [createRecentActivityFeed(activities), ..._updateFeeds, createWhatsNewFeed(changelog)],
571686
572013
  maxWidth: rightWidth
@@ -571880,12 +572207,12 @@ function LogoV2() {
571880
572207
  return t41;
571881
572208
  }
571882
572209
  function _temp327(current) {
571883
- if (current.lastReleaseNotesSeen === "1.3.440") {
572210
+ if (current.lastReleaseNotesSeen === "1.3.442") {
571884
572211
  return current;
571885
572212
  }
571886
572213
  return {
571887
572214
  ...current,
571888
- lastReleaseNotesSeen: "1.3.440"
572215
+ lastReleaseNotesSeen: "1.3.442"
571889
572216
  };
571890
572217
  }
571891
572218
  function _temp241(s_0) {
@@ -574494,6 +574821,7 @@ function shouldRenderStatically(message, streamingToolUseIDs, inProgressToolUseI
574494
574821
  return false;
574495
574822
  }
574496
574823
  }
574824
+ return false;
574497
574825
  }
574498
574826
  var import_compiler_runtime186, React76, import_react148, jsx_dev_runtime248, LogoHeader, proactiveModule2 = null, BRIEF_TOOL_NAME4 = null, SEND_USER_FILE_TOOL_NAME2 = null, MAX_MESSAGES_TO_SHOW_IN_TRANSCRIPT_MODE = 30, MAX_MESSAGES_WITHOUT_VIRTUALIZATION = 200, MESSAGE_CAP_STEP = 50, MessagesImpl = ({
574499
574827
  messages,
@@ -574794,10 +575122,11 @@ var import_compiler_runtime186, React76, import_react148, jsx_dev_runtime248, Lo
574794
575122
  thinking: streamingThinking.thinking
574795
575123
  },
574796
575124
  addMargin: false,
574797
- isTranscriptMode: true,
575125
+ isTranscriptMode,
574798
575126
  verbose,
574799
575127
  hideInTranscript: false,
574800
- isThinking: streamingThinking.isStreaming
575128
+ isThinking: streamingThinking.isStreaming,
575129
+ liveStreamingPreview: true
574801
575130
  }, undefined, false, undefined, this)
574802
575131
  }, undefined, false, undefined, this),
574803
575132
  streamingText && !isBriefOnly && /* @__PURE__ */ jsx_dev_runtime248.jsxDEV(ThemedBox_default, {
@@ -596792,7 +597121,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
596792
597121
  smapsRollup,
596793
597122
  platform: process.platform,
596794
597123
  nodeVersion: process.version,
596795
- ccVersion: "1.3.440"
597124
+ ccVersion: "1.3.442"
596796
597125
  };
596797
597126
  }
596798
597127
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -597314,7 +597643,7 @@ var init_bridge_kick = __esm(() => {
597314
597643
  var call49 = async () => {
597315
597644
  return {
597316
597645
  type: "text",
597317
- value: "1.3.440"
597646
+ value: "1.3.442"
597318
597647
  };
597319
597648
  }, version2, version_default;
597320
597649
  var init_version = __esm(() => {
@@ -598771,10 +599100,12 @@ async function call53() {
598771
599100
  }
598772
599101
  clearRayuSession();
598773
599102
  clearRayuEntitlements();
599103
+ clearFeatureUsage();
598774
599104
  return { type: "text", value: "Signed out of Rayu." };
598775
599105
  }
598776
599106
  var init_logout = __esm(() => {
598777
599107
  init_rayuEntitlements();
599108
+ init_rayuFeatureUsage();
598778
599109
  init_rayuSession();
598779
599110
  });
598780
599111
 
@@ -598819,12 +599150,12 @@ function fmtReset(seconds) {
598819
599150
  return `${h3}h ${m3}m`;
598820
599151
  return `${m3}m`;
598821
599152
  }
598822
- function usd(cents) {
599153
+ function usd2(cents) {
598823
599154
  return `$${(cents / 100).toFixed(cents % 100 === 0 ? 0 : 2)}`;
598824
599155
  }
598825
599156
  function formatRayuUsageSummary(c4) {
598826
599157
  const lines2 = [];
598827
- const price = c4.priceCents > 0 ? ` (${usd(c4.priceCents)}/mo)` : "";
599158
+ const price = c4.priceCents > 0 ? ` (${usd2(c4.priceCents)}/mo)` : "";
598828
599159
  lines2.push(`Plan: ${c4.planName || c4.plan}${price}`);
598829
599160
  if (c4.periodEnd) {
598830
599161
  lines2.push(`Renews: ${new Date(c4.periodEnd).toLocaleDateString()}`);
@@ -601564,11 +601895,18 @@ function InstallSkillFlow({
601564
601895
  let cancelled = false;
601565
601896
  (async () => {
601566
601897
  try {
601567
- const skill = await installSkillFromSource(source, { overwrite });
601898
+ const skills3 = await installSkillFromSource(source, { overwrite });
601568
601899
  if (cancelled)
601569
601900
  return;
601570
- setState({ status: "done", skill });
601571
- onDone(`Installed skill "${skill.name}" ${skill.path}`);
601901
+ setState({ status: "done", skills: skills3 });
601902
+ const replaced = skills3.filter((s2) => s2.replaced).map((s2) => s2.name);
601903
+ const fresh = skills3.filter((s2) => !s2.replaced).map((s2) => s2.name);
601904
+ const parts = [];
601905
+ if (fresh.length)
601906
+ parts.push(`installed ${fresh.join(", ")}`);
601907
+ if (replaced.length)
601908
+ parts.push(`overwrote already-installed ${replaced.join(", ")}`);
601909
+ onDone(`Skill install complete — ${parts.join("; ")}.`);
601572
601910
  } catch (e2) {
601573
601911
  if (cancelled)
601574
601912
  return;
@@ -601611,39 +601949,54 @@ function InstallSkillFlow({
601611
601949
  }, undefined, true, undefined, this)
601612
601950
  }, undefined, false, undefined, this);
601613
601951
  }
601952
+ const { skills: skills2 } = state;
601953
+ const replacedCount = skills2.filter((s2) => s2.replaced).length;
601614
601954
  return /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedBox_default, {
601615
601955
  flexDirection: "column",
601616
601956
  paddingLeft: 1,
601617
601957
  children: [
601618
601958
  /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601619
601959
  color: "green",
601620
- children: "Installed skill: "
601621
- }, undefined, false, undefined, this),
601622
- /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601623
- bold: true,
601624
601960
  children: [
601625
- "/",
601626
- state.skill.name
601961
+ "Installed ",
601962
+ skills2.length,
601963
+ " skill",
601964
+ skills2.length === 1 ? "" : "s",
601965
+ replacedCount > 0 ? ` (${replacedCount} already existed and ${replacedCount === 1 ? "was" : "were"} overwritten)` : "",
601966
+ ":"
601627
601967
  ]
601628
601968
  }, undefined, true, undefined, this),
601629
- /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601630
- dimColor: true,
601631
- children: state.skill.description
601632
- }, undefined, false, undefined, this),
601633
- /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601634
- dimColor: true,
601969
+ skills2.map((s2) => /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedBox_default, {
601970
+ flexDirection: "column",
601971
+ marginTop: 1,
601635
601972
  children: [
601636
- "Location: ",
601637
- state.skill.path
601973
+ /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601974
+ bold: true,
601975
+ children: [
601976
+ "/",
601977
+ s2.name,
601978
+ s2.replaced ? /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601979
+ color: "yellow",
601980
+ children: " (overwritten)"
601981
+ }, undefined, false, undefined, this) : null
601982
+ ]
601983
+ }, undefined, true, undefined, this),
601984
+ s2.description ? /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601985
+ dimColor: true,
601986
+ children: s2.description
601987
+ }, undefined, false, undefined, this) : null,
601988
+ /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601989
+ dimColor: true,
601990
+ children: [
601991
+ "Location: ",
601992
+ s2.path
601993
+ ]
601994
+ }, undefined, true, undefined, this)
601638
601995
  ]
601639
- }, undefined, true, undefined, this),
601996
+ }, s2.name, true, undefined, this)),
601640
601997
  /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
601641
- children: [
601642
- "It is available now as /",
601643
- state.skill.name,
601644
- " or via the Skill tool."
601645
- ]
601646
- }, undefined, true, undefined, this)
601998
+ children: skills2.length === 1 ? `It is available now as /${skills2[0].name} or via the Skill tool.` : "They are available now via /<name> or the Skill tool."
601999
+ }, undefined, false, undefined, this)
601647
602000
  ]
601648
602001
  }, undefined, true, undefined, this);
601649
602002
  }
@@ -603078,7 +603431,7 @@ async function loadStatsCache() {
603078
603431
  return getEmptyCache();
603079
603432
  }
603080
603433
  }
603081
- async function saveStatsCache(cache7) {
603434
+ async function saveStatsCache(cache9) {
603082
603435
  const fs15 = getFsImplementation();
603083
603436
  const cachePath = getStatsCachePath();
603084
603437
  const tempPath = `${cachePath}.${randomBytes18(8).toString("hex")}.tmp`;
@@ -603087,7 +603440,7 @@ async function saveStatsCache(cache7) {
603087
603440
  try {
603088
603441
  await fs15.mkdir(configDir);
603089
603442
  } catch {}
603090
- const content = jsonStringify(cache7, null, 2);
603443
+ const content = jsonStringify(cache9, null, 2);
603091
603444
  const handle = await open15(tempPath, "w", 384);
603092
603445
  try {
603093
603446
  await handle.writeFile(content, { encoding: "utf-8" });
@@ -603096,7 +603449,7 @@ async function saveStatsCache(cache7) {
603096
603449
  await handle.close();
603097
603450
  }
603098
603451
  await fs15.rename(tempPath, cachePath);
603099
- logForDebugging(`Stats cache saved successfully (lastComputedDate: ${cache7.lastComputedDate})`);
603452
+ logForDebugging(`Stats cache saved successfully (lastComputedDate: ${cache9.lastComputedDate})`);
603100
603453
  } catch (error54) {
603101
603454
  logError2(error54);
603102
603455
  try {
@@ -603955,9 +604308,9 @@ async function getAllSessionFiles() {
603955
604308
  }));
603956
604309
  return projectResults.flat();
603957
604310
  }
603958
- function cacheToStats(cache7, todayStats) {
604311
+ function cacheToStats(cache9, todayStats) {
603959
604312
  const dailyActivityMap = new Map;
603960
- for (const day of cache7.dailyActivity) {
604313
+ for (const day of cache9.dailyActivity) {
603961
604314
  dailyActivityMap.set(day.date, { ...day });
603962
604315
  }
603963
604316
  if (todayStats) {
@@ -603973,7 +604326,7 @@ function cacheToStats(cache7, todayStats) {
603973
604326
  }
603974
604327
  }
603975
604328
  const dailyModelTokensMap = new Map;
603976
- for (const day of cache7.dailyModelTokens) {
604329
+ for (const day of cache9.dailyModelTokens) {
603977
604330
  dailyModelTokensMap.set(day.date, { ...day.tokensByModel });
603978
604331
  }
603979
604332
  if (todayStats) {
@@ -603988,7 +604341,7 @@ function cacheToStats(cache7, todayStats) {
603988
604341
  }
603989
604342
  }
603990
604343
  }
603991
- const modelUsage = { ...cache7.modelUsage };
604344
+ const modelUsage = { ...cache9.modelUsage };
603992
604345
  if (todayStats) {
603993
604346
  for (const [model, usage2] of Object.entries(todayStats.modelUsage)) {
603994
604347
  if (modelUsage[model]) {
@@ -604008,7 +604361,7 @@ function cacheToStats(cache7, todayStats) {
604008
604361
  }
604009
604362
  }
604010
604363
  const hourCountsMap = new Map;
604011
- for (const [hour, count4] of Object.entries(cache7.hourCounts)) {
604364
+ for (const [hour, count4] of Object.entries(cache9.hourCounts)) {
604012
604365
  hourCountsMap.set(parseInt(hour, 10), count4);
604013
604366
  }
604014
604367
  if (todayStats) {
@@ -604020,9 +604373,9 @@ function cacheToStats(cache7, todayStats) {
604020
604373
  const dailyActivityArray = Array.from(dailyActivityMap.values()).sort((a2, b3) => a2.date.localeCompare(b3.date));
604021
604374
  const streaks = calculateStreaks(dailyActivityArray);
604022
604375
  const dailyModelTokens = Array.from(dailyModelTokensMap.entries()).map(([date6, tokensByModel]) => ({ date: date6, tokensByModel })).sort((a2, b3) => a2.date.localeCompare(b3.date));
604023
- const totalSessions = cache7.totalSessions + (todayStats?.sessionStats.length || 0);
604024
- const totalMessages = cache7.totalMessages + (todayStats?.totalMessages || 0);
604025
- let longestSession = cache7.longestSession;
604376
+ const totalSessions = cache9.totalSessions + (todayStats?.sessionStats.length || 0);
604377
+ const totalMessages = cache9.totalMessages + (todayStats?.totalMessages || 0);
604378
+ let longestSession = cache9.longestSession;
604026
604379
  if (todayStats) {
604027
604380
  for (const session2 of todayStats.sessionStats) {
604028
604381
  if (!longestSession || session2.duration > longestSession.duration) {
@@ -604030,7 +604383,7 @@ function cacheToStats(cache7, todayStats) {
604030
604383
  }
604031
604384
  }
604032
604385
  }
604033
- let firstSessionDate = cache7.firstSessionDate;
604386
+ let firstSessionDate = cache9.firstSessionDate;
604034
604387
  let lastSessionDate = null;
604035
604388
  if (todayStats) {
604036
604389
  for (const session2 of todayStats.sessionStats) {
@@ -604048,7 +604401,7 @@ function cacheToStats(cache7, todayStats) {
604048
604401
  const peakActivityDay = dailyActivityArray.length > 0 ? dailyActivityArray.reduce((max2, d2) => d2.messageCount > max2.messageCount ? d2 : max2).date : null;
604049
604402
  const peakActivityHour = hourCountsMap.size > 0 ? Array.from(hourCountsMap.entries()).reduce((max2, [hour, count4]) => count4 > max2[1] ? [hour, count4] : max2)[0] : null;
604050
604403
  const totalDays = firstSessionDate && lastSessionDate ? Math.ceil((new Date(lastSessionDate).getTime() - new Date(firstSessionDate).getTime()) / (1000 * 60 * 60 * 24)) + 1 : 0;
604051
- const totalSpeculationTimeSavedMs = cache7.totalSpeculationTimeSavedMs + (todayStats?.totalSpeculationTimeSavedMs || 0);
604404
+ const totalSpeculationTimeSavedMs = cache9.totalSpeculationTimeSavedMs + (todayStats?.totalSpeculationTimeSavedMs || 0);
604052
604405
  const result = {
604053
604406
  totalSessions,
604054
604407
  totalMessages,
@@ -604074,30 +604427,30 @@ async function aggregateClaudeCodeStats() {
604074
604427
  return getEmptyStats();
604075
604428
  }
604076
604429
  const updatedCache = await withStatsCacheLock(async () => {
604077
- const cache7 = await loadStatsCache();
604430
+ const cache9 = await loadStatsCache();
604078
604431
  const yesterday = getYesterdayDateString();
604079
- let result = cache7;
604080
- if (!cache7.lastComputedDate) {
604432
+ let result = cache9;
604433
+ if (!cache9.lastComputedDate) {
604081
604434
  logForDebugging("Stats cache empty, processing all historical data");
604082
604435
  const historicalStats = await processSessionFiles(allSessionFiles, {
604083
604436
  toDate: yesterday
604084
604437
  });
604085
604438
  if (historicalStats.sessionStats.length > 0 || historicalStats.dailyActivity.length > 0) {
604086
- result = mergeCacheWithNewStats(cache7, historicalStats, yesterday);
604439
+ result = mergeCacheWithNewStats(cache9, historicalStats, yesterday);
604087
604440
  await saveStatsCache(result);
604088
604441
  }
604089
- } else if (isDateBefore(cache7.lastComputedDate, yesterday)) {
604090
- const nextDay = getNextDay(cache7.lastComputedDate);
604091
- logForDebugging(`Stats cache stale (${cache7.lastComputedDate}), processing ${nextDay} to ${yesterday}`);
604442
+ } else if (isDateBefore(cache9.lastComputedDate, yesterday)) {
604443
+ const nextDay = getNextDay(cache9.lastComputedDate);
604444
+ logForDebugging(`Stats cache stale (${cache9.lastComputedDate}), processing ${nextDay} to ${yesterday}`);
604092
604445
  const newStats = await processSessionFiles(allSessionFiles, {
604093
604446
  fromDate: nextDay,
604094
604447
  toDate: yesterday
604095
604448
  });
604096
604449
  if (newStats.sessionStats.length > 0 || newStats.dailyActivity.length > 0) {
604097
- result = mergeCacheWithNewStats(cache7, newStats, yesterday);
604450
+ result = mergeCacheWithNewStats(cache9, newStats, yesterday);
604098
604451
  await saveStatsCache(result);
604099
604452
  } else {
604100
- result = { ...cache7, lastComputedDate: yesterday };
604453
+ result = { ...cache9, lastComputedDate: yesterday };
604101
604454
  await saveStatsCache(result);
604102
604455
  }
604103
604456
  }
@@ -607243,7 +607596,7 @@ function generateHtmlReport(data, insights) {
607243
607596
  </html>`;
607244
607597
  }
607245
607598
  function buildExportData(data, insights, facets, remoteStats) {
607246
- const version3 = typeof MACRO !== "undefined" ? "1.3.440" : "unknown";
607599
+ const version3 = typeof MACRO !== "undefined" ? "1.3.442" : "unknown";
607247
607600
  const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
607248
607601
  const facets_summary = {
607249
607602
  total: facets.size,
@@ -611153,7 +611506,7 @@ var init_sessionStorage = __esm(() => {
611153
611506
  init_settings2();
611154
611507
  init_slowOperations();
611155
611508
  init_uuid();
611156
- VERSION6 = typeof MACRO !== "undefined" ? "1.3.440" : "unknown";
611509
+ VERSION6 = typeof MACRO !== "undefined" ? "1.3.442" : "unknown";
611157
611510
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
611158
611511
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
611159
611512
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -612373,7 +612726,7 @@ var init_filesystem = __esm(() => {
612373
612726
  });
612374
612727
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
612375
612728
  const nonce = randomBytes19(16).toString("hex");
612376
- return join154(getClaudeTempDir(), "bundled-skills", "1.3.440", nonce);
612729
+ return join154(getClaudeTempDir(), "bundled-skills", "1.3.442", nonce);
612377
612730
  });
612378
612731
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
612379
612732
  });
@@ -617488,7 +617841,7 @@ __export(exports_update, {
617488
617841
  import { execFileSync as execFileSync3 } from "node:child_process";
617489
617842
  import { homedir as homedir35 } from "os";
617490
617843
  async function update() {
617491
- writeToStdout(`Current version: ${"1.3.440"}
617844
+ writeToStdout(`Current version: ${"1.3.442"}
617492
617845
  `);
617493
617846
  const isBundled = isInBundledMode();
617494
617847
  if (isBundled) {
@@ -617514,13 +617867,13 @@ Manual check: npm view ${"@rayu-dev/rayu-cli"} version
617514
617867
  process.exit(1);
617515
617868
  return;
617516
617869
  }
617517
- if (latestVersion === "1.3.440") {
617870
+ if (latestVersion === "1.3.442") {
617518
617871
  writeToStdout(source_default.green(`
617519
- Rayu CLI is up to date (${"1.3.440"})
617872
+ Rayu CLI is up to date (${"1.3.442"})
617520
617873
  `));
617521
617874
  process.exit(0);
617522
617875
  }
617523
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.3.440"})
617876
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.3.442"})
617524
617877
  `);
617525
617878
  writeToStdout(`Installing update...
617526
617879
 
@@ -617544,7 +617897,7 @@ Try manually:
617544
617897
  return;
617545
617898
  }
617546
617899
  writeToStdout(source_default.green(`
617547
- Successfully updated from ${"1.3.440"} to ${latestVersion}
617900
+ Successfully updated from ${"1.3.442"} to ${latestVersion}
617548
617901
  `));
617549
617902
  process.exit(0);
617550
617903
  }
@@ -617558,14 +617911,14 @@ async function updateNativeBinary() {
617558
617911
  } catch {
617559
617912
  latestVersion = "";
617560
617913
  }
617561
- if (latestVersion && latestVersion === "1.3.440") {
617914
+ if (latestVersion && latestVersion === "1.3.442") {
617562
617915
  writeToStdout(source_default.green(`
617563
- Rayu CLI is up to date (1.3.440)
617916
+ Rayu CLI is up to date (1.3.442)
617564
617917
  `));
617565
617918
  process.exit(0);
617566
617919
  }
617567
617920
  if (latestVersion) {
617568
- writeToStdout(`New version available: ${latestVersion} (current: 1.3.440)
617921
+ writeToStdout(`New version available: ${latestVersion} (current: 1.3.442)
617569
617922
  `);
617570
617923
  }
617571
617924
  writeToStdout(`Downloading and installing update...
@@ -617580,13 +617933,13 @@ Rayu CLI is up to date (1.3.440)
617580
617933
  return;
617581
617934
  }
617582
617935
  writeToStdout(source_default.green(`
617583
- Rayu CLI is up to date (1.3.440)
617936
+ Rayu CLI is up to date (1.3.442)
617584
617937
  `));
617585
617938
  process.exit(0);
617586
617939
  }
617587
617940
  const updatedTo = result.latestVersion ?? latestVersion ?? "latest";
617588
617941
  writeToStdout(source_default.green(`
617589
- Successfully updated from 1.3.440 to ${updatedTo}
617942
+ Successfully updated from 1.3.442 to ${updatedTo}
617590
617943
  `));
617591
617944
  writeToStdout(`Restart your terminal to use the new version.
617592
617945
  `);
@@ -617617,7 +617970,7 @@ __export(exports_uninstall, {
617617
617970
  import { execFileSync as execFileSync4 } from "node:child_process";
617618
617971
  import { homedir as homedir36 } from "os";
617619
617972
  async function uninstall() {
617620
- writeToStdout(`Uninstalling Rayu CLI (${"1.3.440"})...
617973
+ writeToStdout(`Uninstalling Rayu CLI (${"1.3.442"})...
617621
617974
  `);
617622
617975
  writeToStdout(`Running: npm uninstall -g ${"@rayu-dev/rayu-cli"}
617623
617976
 
@@ -617640,7 +617993,7 @@ Try running manually:
617640
617993
  process.exit(1);
617641
617994
  }
617642
617995
  writeToStdout(source_default.green(`
617643
- Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.3.440"}
617996
+ Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.3.442"}
617644
617997
  `));
617645
617998
  writeToStdout(`Thanks for using Rayu CLI!
617646
617999
  `);
@@ -617692,7 +618045,7 @@ function showFirstRunWelcome() {
617692
618045
  `);
617693
618046
  try {
617694
618047
  mkdirSync16(getRayuConfigHomeDir(), { recursive: true });
617695
- writeFileSync18(markerPath(), "1.3.440", "utf8");
618048
+ writeFileSync18(markerPath(), "1.3.442", "utf8");
617696
618049
  } catch {}
617697
618050
  }
617698
618051
  var init_firstRun = __esm(() => {
@@ -629535,7 +629888,7 @@ async function initializeBetaTracing(resource) {
629535
629888
  });
629536
629889
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
629537
629890
  setLoggerProvider(loggerProvider);
629538
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.440");
629891
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.442");
629539
629892
  setEventLogger(eventLogger);
629540
629893
  process.on("beforeExit", async () => {
629541
629894
  await loggerProvider?.forceFlush();
@@ -629575,7 +629928,7 @@ async function initializeTelemetry() {
629575
629928
  const platform4 = getPlatform();
629576
629929
  const baseAttributes = {
629577
629930
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
629578
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "1.3.440"
629931
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "1.3.442"
629579
629932
  };
629580
629933
  if (platform4 === "wsl") {
629581
629934
  const wslVersion = getWslVersion();
@@ -629620,7 +629973,7 @@ async function initializeTelemetry() {
629620
629973
  } catch {}
629621
629974
  };
629622
629975
  registerCleanup(shutdownTelemetry2);
629623
- return meterProvider2.getMeter("com.anthropic.claude_code", "1.3.440");
629976
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.3.442");
629624
629977
  }
629625
629978
  const meterProvider = new import_sdk_metrics2.MeterProvider({
629626
629979
  resource,
@@ -629640,7 +629993,7 @@ async function initializeTelemetry() {
629640
629993
  });
629641
629994
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
629642
629995
  setLoggerProvider(loggerProvider);
629643
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.440");
629996
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.442");
629644
629997
  setEventLogger(eventLogger);
629645
629998
  logForDebugging("[3P telemetry] Event logger set successfully");
629646
629999
  process.on("beforeExit", async () => {
@@ -629702,7 +630055,7 @@ Current timeout: ${timeoutMs}ms
629702
630055
  }
629703
630056
  };
629704
630057
  registerCleanup(shutdownTelemetry);
629705
- return meterProvider.getMeter("com.anthropic.claude_code", "1.3.440");
630058
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.3.442");
629706
630059
  }
629707
630060
  async function flushTelemetry() {
629708
630061
  const meterProvider = getMeterProvider();
@@ -631215,7 +631568,7 @@ function buildSystemInitMessage(inputs) {
631215
631568
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
631216
631569
  apiKeySource: getAnthropicApiKeyWithSource().source,
631217
631570
  betas: getSdkBetas(),
631218
- claude_code_version: "1.3.440",
631571
+ claude_code_version: "1.3.442",
631219
631572
  output_style: outputStyle2,
631220
631573
  agents: inputs.agents.map((agent) => agent.agentType),
631221
631574
  skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
@@ -647549,7 +647902,7 @@ var init_useVoiceEnabled = __esm(() => {
647549
647902
  function getSemverPart(version3) {
647550
647903
  return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
647551
647904
  }
647552
- function useUpdateNotification(updatedVersion, initialVersion = "1.3.440") {
647905
+ function useUpdateNotification(updatedVersion, initialVersion = "1.3.442") {
647553
647906
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react217.useState(() => getSemverPart(initialVersion));
647554
647907
  if (!updatedVersion) {
647555
647908
  return null;
@@ -647589,7 +647942,7 @@ function AutoUpdater({
647589
647942
  return;
647590
647943
  }
647591
647944
  if (false) {}
647592
- const currentVersion = "1.3.440";
647945
+ const currentVersion = "1.3.442";
647593
647946
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
647594
647947
  let latestVersion = await getLatestVersion(channel);
647595
647948
  const isDisabled = isAutoUpdaterDisabled();
@@ -647802,12 +648155,12 @@ function NativeAutoUpdater({
647802
648155
  logEvent("tengu_native_auto_updater_start", {});
647803
648156
  try {
647804
648157
  const maxVersion = await getMaxVersion();
647805
- if (maxVersion && gt("1.3.440", maxVersion)) {
648158
+ if (maxVersion && gt("1.3.442", maxVersion)) {
647806
648159
  const msg = await getMaxVersionMessage();
647807
648160
  setMaxVersionIssue(msg ?? "affects your version");
647808
648161
  }
647809
648162
  const result = await installLatest(channel);
647810
- const currentVersion = "1.3.440";
648163
+ const currentVersion = "1.3.442";
647811
648164
  const latencyMs = Date.now() - startTime;
647812
648165
  if (result.lockFailed) {
647813
648166
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -647944,17 +648297,17 @@ function PackageManagerAutoUpdater(t0) {
647944
648297
  const maxVersion = await getMaxVersion();
647945
648298
  if (maxVersion && latest && gt(latest, maxVersion)) {
647946
648299
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
647947
- if (gte("1.3.440", maxVersion)) {
647948
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.3.440"} is already at or above maxVersion ${maxVersion}, skipping update`);
648300
+ if (gte("1.3.442", maxVersion)) {
648301
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.3.442"} is already at or above maxVersion ${maxVersion}, skipping update`);
647949
648302
  setUpdateAvailable(false);
647950
648303
  return;
647951
648304
  }
647952
648305
  latest = maxVersion;
647953
648306
  }
647954
- const hasUpdate = latest && !gte("1.3.440", latest) && !shouldSkipVersion(latest);
648307
+ const hasUpdate = latest && !gte("1.3.442", latest) && !shouldSkipVersion(latest);
647955
648308
  setUpdateAvailable(!!hasUpdate);
647956
648309
  if (hasUpdate) {
647957
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.3.440"} -> ${latest}`);
648310
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.3.442"} -> ${latest}`);
647958
648311
  }
647959
648312
  };
647960
648313
  $3[0] = t1;
@@ -647988,7 +648341,7 @@ function PackageManagerAutoUpdater(t0) {
647988
648341
  wrap: "truncate",
647989
648342
  children: [
647990
648343
  "currentVersion: ",
647991
- "1.3.440"
648344
+ "1.3.442"
647992
648345
  ]
647993
648346
  }, undefined, true, undefined, this);
647994
648347
  $3[3] = verbose;
@@ -649682,7 +650035,7 @@ function get2(obj, path29) {
649682
650035
  return arr ? list : list[0];
649683
650036
  }
649684
650037
  function norm(weight = 1, mantissa = 3) {
649685
- const cache7 = new Map;
650038
+ const cache9 = new Map;
649686
650039
  const m3 = Math.pow(10, mantissa);
649687
650040
  return {
649688
650041
  get(value) {
@@ -649698,15 +650051,15 @@ function norm(weight = 1, mantissa = 3) {
649698
650051
  inSpace = false;
649699
650052
  }
649700
650053
  }
649701
- if (cache7.has(numTokens)) {
649702
- return cache7.get(numTokens);
650054
+ if (cache9.has(numTokens)) {
650055
+ return cache9.get(numTokens);
649703
650056
  }
649704
650057
  const n3 = Math.round(m3 / Math.pow(numTokens, 0.5 * weight)) / m3;
649705
- cache7.set(numTokens, n3);
650058
+ cache9.set(numTokens, n3);
649706
650059
  return n3;
649707
650060
  },
649708
650061
  clear() {
649709
- cache7.clear();
650062
+ cache9.clear();
649710
650063
  }
649711
650064
  };
649712
650065
  }
@@ -651946,7 +652299,7 @@ function mcpQueryFor(searchToken) {
651946
652299
  function findReusableCacheEntry(mcpQuery, searchToken) {
651947
652300
  let best;
651948
652301
  let bestLen = 0;
651949
- for (const [key2, channels] of cache7) {
652302
+ for (const [key2, channels] of cache9) {
651950
652303
  if (mcpQuery.startsWith(key2) && key2.length > bestLen && channels.some((c4) => c4.startsWith(searchToken))) {
651951
652304
  best = channels;
651952
652305
  bestLen = key2.length;
@@ -651959,7 +652312,7 @@ async function getSlackChannelSuggestions(clients, searchToken) {
651959
652312
  return [];
651960
652313
  const mcpQuery = mcpQueryFor(searchToken);
651961
652314
  const lower2 = searchToken.toLowerCase();
651962
- let channels = cache7.get(mcpQuery) ?? findReusableCacheEntry(mcpQuery, lower2);
652315
+ let channels = cache9.get(mcpQuery) ?? findReusableCacheEntry(mcpQuery, lower2);
651963
652316
  if (!channels) {
651964
652317
  if (inflightQuery === mcpQuery && inflightPromise) {
651965
652318
  channels = await inflightPromise;
@@ -651967,7 +652320,7 @@ async function getSlackChannelSuggestions(clients, searchToken) {
651967
652320
  inflightQuery = mcpQuery;
651968
652321
  inflightPromise = fetchChannels(clients, mcpQuery);
651969
652322
  channels = await inflightPromise;
651970
- cache7.set(mcpQuery, channels);
652323
+ cache9.set(mcpQuery, channels);
651971
652324
  const before = knownChannels.size;
651972
652325
  for (const c4 of channels)
651973
652326
  knownChannels.add(c4);
@@ -651975,8 +652328,8 @@ async function getSlackChannelSuggestions(clients, searchToken) {
651975
652328
  knownChannelsVersion++;
651976
652329
  knownChannelsChanged.emit();
651977
652330
  }
651978
- if (cache7.size > 50) {
651979
- cache7.delete(cache7.keys().next().value);
652331
+ if (cache9.size > 50) {
652332
+ cache9.delete(cache9.keys().next().value);
651980
652333
  }
651981
652334
  if (inflightQuery === mcpQuery) {
651982
652335
  inflightQuery = null;
@@ -651989,12 +652342,12 @@ async function getSlackChannelSuggestions(clients, searchToken) {
651989
652342
  displayText: `#${c4}`
651990
652343
  }));
651991
652344
  }
651992
- var SLACK_SEARCH_TOOL = "slack_search_channels", cache7, knownChannels, knownChannelsVersion = 0, knownChannelsChanged, subscribeKnownChannels, inflightQuery = null, inflightPromise = null, resultsEnvelopeSchema;
652345
+ var SLACK_SEARCH_TOOL = "slack_search_channels", cache9, knownChannels, knownChannelsVersion = 0, knownChannelsChanged, subscribeKnownChannels, inflightQuery = null, inflightPromise = null, resultsEnvelopeSchema;
651993
652346
  var init_slackChannelSuggestions = __esm(() => {
651994
652347
  init_zod3();
651995
652348
  init_debug();
651996
652349
  init_slowOperations();
651997
- cache7 = new Map;
652350
+ cache9 = new Map;
651998
652351
  knownChannels = new Set;
651999
652352
  knownChannelsChanged = createSignal();
652000
652353
  subscribeKnownChannels = knownChannelsChanged.subscribe;
@@ -656153,7 +656506,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
656153
656506
  project_dir: getOriginalCwd(),
656154
656507
  added_dirs: addedDirs
656155
656508
  },
656156
- version: "1.3.440",
656509
+ version: "1.3.442",
656157
656510
  output_style: {
656158
656511
  name: outputStyleName
656159
656512
  },
@@ -665900,6 +666253,100 @@ var init_useIdeSelection = __esm(() => {
665900
666253
  }));
665901
666254
  });
665902
666255
 
666256
+ // src/utils/progressCoalescing.ts
666257
+ function coalesceEphemeralProgressMessages(oldMessages, newMessage) {
666258
+ const next = newMessage;
666259
+ const matches = (m3) => {
666260
+ if (m3.type !== "progress") {
666261
+ return false;
666262
+ }
666263
+ const candidate = m3;
666264
+ return candidate.parentToolUseID === next.parentToolUseID && candidate.data.type === next.data.type;
666265
+ };
666266
+ const last2 = oldMessages[oldMessages.length - 1];
666267
+ if (last2 !== undefined && matches(last2)) {
666268
+ const copy2 = oldMessages.slice();
666269
+ copy2[copy2.length - 1] = newMessage;
666270
+ return copy2;
666271
+ }
666272
+ const result = [];
666273
+ for (const m3 of oldMessages) {
666274
+ if (!matches(m3)) {
666275
+ result.push(m3);
666276
+ }
666277
+ }
666278
+ result.push(newMessage);
666279
+ return result;
666280
+ }
666281
+
666282
+ // src/utils/memProbe.ts
666283
+ function isMemProbeEnabled() {
666284
+ return isEnvTruthy(process.env.RAYU_MEM_PROBE);
666285
+ }
666286
+ function reportMemProbeValue(name, value) {
666287
+ if (!isMemProbeEnabled()) {
666288
+ return;
666289
+ }
666290
+ reported2.set(name, value);
666291
+ }
666292
+ function setMemProbeFpsTracker(tracker) {
666293
+ fpsTrackerRef = tracker;
666294
+ }
666295
+ function activeCount(method) {
666296
+ try {
666297
+ const fn = process[method];
666298
+ return typeof fn === "function" ? fn.call(process).length : undefined;
666299
+ } catch {
666300
+ return;
666301
+ }
666302
+ }
666303
+ function formatMemProbeLine() {
666304
+ const mu = process.memoryUsage();
666305
+ const toMB = (bytes) => (bytes / 1024 / 1024).toFixed(1);
666306
+ const parts = [
666307
+ `heapUsed=${toMB(mu.heapUsed)}MB`,
666308
+ `rss=${toMB(mu.rss)}MB`,
666309
+ `external=${toMB(mu.external)}MB`
666310
+ ];
666311
+ const handles = activeCount("_getActiveHandles");
666312
+ if (handles !== undefined) {
666313
+ parts.push(`handles=${handles}`);
666314
+ }
666315
+ const requests = activeCount("_getActiveRequests");
666316
+ if (requests !== undefined) {
666317
+ parts.push(`requests=${requests}`);
666318
+ }
666319
+ try {
666320
+ parts.push(`yogaLiveNodes=${getYogaCounters().live}`);
666321
+ } catch {}
666322
+ if (fpsTrackerRef) {
666323
+ try {
666324
+ parts.push(`fpsBuffer=${fpsTrackerRef.bufferSize()}`);
666325
+ } catch {}
666326
+ }
666327
+ for (const [name, value] of reported2) {
666328
+ parts.push(`${name}=${value}`);
666329
+ }
666330
+ return `[mem-probe] ${parts.join(" ")}`;
666331
+ }
666332
+ function startMemProbeIfEnabled(intervalMs = DEFAULT_INTERVAL_MS) {
666333
+ if (interval || !isMemProbeEnabled()) {
666334
+ return;
666335
+ }
666336
+ logForDebugging(`[mem-probe] enabled — sampling every ${Math.round(intervalMs / 1000)}s`);
666337
+ interval = setInterval(() => {
666338
+ logForDebugging(formatMemProbeLine());
666339
+ }, intervalMs);
666340
+ interval.unref?.();
666341
+ }
666342
+ var DEFAULT_INTERVAL_MS = 30000, interval = null, reported2, fpsTrackerRef = null;
666343
+ var init_memProbe = __esm(() => {
666344
+ init_yoga_layout();
666345
+ init_debug();
666346
+ init_envUtils();
666347
+ reported2 = new Map;
666348
+ });
666349
+
665903
666350
  // src/utils/asciicast.ts
665904
666351
  var exports_asciicast = {};
665905
666352
  __export(exports_asciicast, {
@@ -667557,7 +668004,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
667557
668004
  } catch {}
667558
668005
  const data = {
667559
668006
  trigger,
667560
- version: "1.3.440",
668007
+ version: "1.3.442",
667561
668008
  platform: process.platform,
667562
668009
  transcript,
667563
668010
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -675253,8 +675700,8 @@ function AnimatedTerminalTitle(t0) {
675253
675700
  if (disabled || noPrefix || !isAnimating || !terminalFocused) {
675254
675701
  return;
675255
675702
  }
675256
- const interval = setInterval(_temp289, TITLE_ANIMATION_INTERVAL_MS, setFrame);
675257
- return () => clearInterval(interval);
675703
+ const interval2 = setInterval(_temp289, TITLE_ANIMATION_INTERVAL_MS, setFrame);
675704
+ return () => clearInterval(interval2);
675258
675705
  };
675259
675706
  t2 = [disabled, noPrefix, isAnimating, terminalFocused];
675260
675707
  $3[0] = disabled;
@@ -676490,13 +676937,12 @@ Error: sandbox required but unavailable: ${reason}
676490
676937
  if (false) {}
676491
676938
  } else if (newMessage.type === "progress" && isEphemeralToolProgress(newMessage.data.type)) {
676492
676939
  setMessages((oldMessages) => {
676493
- const last2 = oldMessages.at(-1);
676494
- if (last2?.type === "progress" && last2.parentToolUseID === newMessage.parentToolUseID && last2.data.type === newMessage.data.type) {
676495
- const copy2 = oldMessages.slice();
676496
- copy2[copy2.length - 1] = newMessage;
676497
- return copy2;
676940
+ const next = coalesceEphemeralProgressMessages(oldMessages, newMessage);
676941
+ if (isMemProbeEnabled()) {
676942
+ reportMemProbeValue("messages", next.length);
676943
+ reportMemProbeValue("ephemeralProgress", next.reduce((n3, m3) => n3 + (m3.type === "progress" ? 1 : 0), 0));
676498
676944
  }
676499
- return [...oldMessages, newMessage];
676945
+ return next;
676500
676946
  });
676501
676947
  } else {
676502
676948
  setMessages((oldMessages) => [...oldMessages, newMessage]);
@@ -678533,6 +678979,7 @@ var init_REPL = __esm(() => {
678533
678979
  init_AppState();
678534
678980
  init_plans();
678535
678981
  init_sessionStorage();
678982
+ init_memProbe();
678536
678983
  init_conversationRecovery();
678537
678984
  init_queryHelpers();
678538
678985
  init_microCompact();
@@ -679451,28 +679898,43 @@ var init_terminalPreference = __esm(() => {
679451
679898
 
679452
679899
  // src/utils/fpsTracker.ts
679453
679900
  class FpsTracker {
679454
- frameDurations = [];
679901
+ now;
679902
+ reservoir = [];
679903
+ totalFrames = 0;
679455
679904
  firstRenderTime;
679456
679905
  lastRenderTime;
679906
+ constructor(now2 = () => performance.now()) {
679907
+ this.now = now2;
679908
+ }
679457
679909
  record(durationMs) {
679458
- const now2 = performance.now();
679910
+ const now2 = this.now();
679459
679911
  if (this.firstRenderTime === undefined) {
679460
679912
  this.firstRenderTime = now2;
679461
679913
  }
679462
679914
  this.lastRenderTime = now2;
679463
- this.frameDurations.push(durationMs);
679915
+ this.totalFrames++;
679916
+ if (this.reservoir.length < RESERVOIR_SIZE2) {
679917
+ this.reservoir.push(durationMs);
679918
+ } else {
679919
+ const j3 = Math.floor(Math.random() * this.totalFrames);
679920
+ if (j3 < RESERVOIR_SIZE2) {
679921
+ this.reservoir[j3] = durationMs;
679922
+ }
679923
+ }
679924
+ }
679925
+ bufferSize() {
679926
+ return this.reservoir.length;
679464
679927
  }
679465
679928
  getMetrics() {
679466
- if (this.frameDurations.length === 0 || this.firstRenderTime === undefined || this.lastRenderTime === undefined) {
679929
+ if (this.totalFrames === 0 || this.firstRenderTime === undefined || this.lastRenderTime === undefined) {
679467
679930
  return;
679468
679931
  }
679469
679932
  const totalTimeMs = this.lastRenderTime - this.firstRenderTime;
679470
679933
  if (totalTimeMs <= 0) {
679471
679934
  return;
679472
679935
  }
679473
- const totalFrames = this.frameDurations.length;
679474
- const averageFps = totalFrames / (totalTimeMs / 1000);
679475
- const sorted = this.frameDurations.slice().sort((a2, b3) => b3 - a2);
679936
+ const averageFps = this.totalFrames / (totalTimeMs / 1000);
679937
+ const sorted = this.reservoir.slice().sort((a2, b3) => b3 - a2);
679476
679938
  const p99Index = Math.max(0, Math.ceil(sorted.length * 0.01) - 1);
679477
679939
  const p99FrameTimeMs = sorted[p99Index];
679478
679940
  const low1PctFps = p99FrameTimeMs > 0 ? 1000 / p99FrameTimeMs : 0;
@@ -679482,6 +679944,49 @@ class FpsTracker {
679482
679944
  };
679483
679945
  }
679484
679946
  }
679947
+ var RESERVOIR_SIZE2 = 1024;
679948
+
679949
+ // src/utils/interactiveHeapDumpMonitor.ts
679950
+ function isAutoHeapDumpEnabled() {
679951
+ return !isEnvDefinedFalsy(process.env.RAYU_AUTO_HEAPDUMP);
679952
+ }
679953
+ async function checkHeapForAutoDump(getHeapUsed = () => process.memoryUsage().heapUsed, dump = performHeapDump) {
679954
+ if (inFlight || dumpsTaken >= MAX_AUTO_DUMPS) {
679955
+ return false;
679956
+ }
679957
+ if (getHeapUsed() < AUTO_HEAPDUMP_THRESHOLD_BYTES) {
679958
+ return false;
679959
+ }
679960
+ inFlight = true;
679961
+ dumpsTaken++;
679962
+ try {
679963
+ const result = await dump("auto-1.5GB", dumpsTaken);
679964
+ if (result.success) {
679965
+ logForDebugging(`[auto-heapdump] heap crossed 1.5GB — snapshot written to ${result.heapPath} (diagnostics: ${result.diagPath})`);
679966
+ } else {
679967
+ logForDebugging(`[auto-heapdump] snapshot failed: ${result.error}`);
679968
+ }
679969
+ return true;
679970
+ } finally {
679971
+ inFlight = false;
679972
+ }
679973
+ }
679974
+ function startInteractiveHeapDumpMonitor() {
679975
+ if (interval2 || !isAutoHeapDumpEnabled()) {
679976
+ return;
679977
+ }
679978
+ interval2 = setInterval(() => {
679979
+ checkHeapForAutoDump();
679980
+ }, CHECK_INTERVAL_MS);
679981
+ interval2.unref?.();
679982
+ }
679983
+ var AUTO_HEAPDUMP_THRESHOLD_BYTES, CHECK_INTERVAL_MS = 1e4, MAX_AUTO_DUMPS = 1, interval2 = null, dumpsTaken = 0, inFlight = false;
679984
+ var init_interactiveHeapDumpMonitor = __esm(() => {
679985
+ init_debug();
679986
+ init_envUtils();
679987
+ init_heapDumpService();
679988
+ AUTO_HEAPDUMP_THRESHOLD_BYTES = 1.5 * 1024 * 1024 * 1024;
679989
+ });
679485
679990
 
679486
679991
  // src/utils/githubRepoPathMapping.ts
679487
679992
  import { realpath as realpath13 } from "fs/promises";
@@ -679602,7 +680107,7 @@ function WelcomeV2() {
679602
680107
  dimColor: true,
679603
680108
  children: [
679604
680109
  "v",
679605
- "1.3.440"
680110
+ "1.3.442"
679606
680111
  ]
679607
680112
  }, undefined, true, undefined, this)
679608
680113
  ]
@@ -681336,7 +681841,7 @@ function completeOnboarding() {
681336
681841
  saveGlobalConfig((current) => ({
681337
681842
  ...current,
681338
681843
  hasCompletedOnboarding: true,
681339
- lastOnboardingVersion: "1.3.440"
681844
+ lastOnboardingVersion: "1.3.442"
681340
681845
  }));
681341
681846
  }
681342
681847
  function showDialog(root2, renderer) {
@@ -681473,6 +681978,9 @@ function getRenderContext(exitOnCtrlC) {
681473
681978
  const fpsTracker = new FpsTracker;
681474
681979
  const stats3 = createStatsStore();
681475
681980
  setStatsStore(stats3);
681981
+ setMemProbeFpsTracker(fpsTracker);
681982
+ startMemProbeIfEnabled();
681983
+ startInteractiveHeapDumpMonitor();
681476
681984
  const frameTimingLogPath = process.env.CLAUDE_CODE_FRAME_TIMING_LOG;
681477
681985
  return {
681478
681986
  getFpsMetrics: () => fpsTracker.getMetrics(),
@@ -681533,6 +682041,8 @@ var init_interactiveHelpers = __esm(() => {
681533
682041
  init_config2();
681534
682042
  init_terminalPreference();
681535
682043
  init_envUtils();
682044
+ init_memProbe();
682045
+ init_interactiveHeapDumpMonitor();
681536
682046
  init_githubRepoPathMapping();
681537
682047
  init_managedEnv();
681538
682048
  init_renderOptions();
@@ -686279,7 +686789,7 @@ function appendToLog(path30, message) {
686279
686789
  cwd: getFsImplementation().cwd(),
686280
686790
  userType: "external",
686281
686791
  sessionId: getSessionId(),
686282
- version: "1.3.440"
686792
+ version: "1.3.442"
686283
686793
  };
686284
686794
  getLogWriter(path30).write(messageWithTimestamp);
686285
686795
  }
@@ -690387,8 +690897,8 @@ async function getEnvLessBridgeConfig() {
690387
690897
  }
690388
690898
  async function checkEnvLessBridgeMinVersion() {
690389
690899
  const cfg = await getEnvLessBridgeConfig();
690390
- if (cfg.min_version && lt("1.3.440", cfg.min_version)) {
690391
- return `Your version of RAYU (${"1.3.440"}) is too old for Remote Control.
690900
+ if (cfg.min_version && lt("1.3.442", cfg.min_version)) {
690901
+ return `Your version of RAYU (${"1.3.442"}) is too old for Remote Control.
690392
690902
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
690393
690903
  }
690394
690904
  return null;
@@ -690862,7 +691372,7 @@ async function initBridgeCore(params) {
690862
691372
  const rawApi = createBridgeApiClient({
690863
691373
  baseUrl,
690864
691374
  getAccessToken,
690865
- runnerVersion: "1.3.440",
691375
+ runnerVersion: "1.3.442",
690866
691376
  onDebug: logForDebugging,
690867
691377
  onAuth401,
690868
691378
  getTrustedDeviceToken
@@ -693570,8 +694080,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
693570
694080
  jsonSchema: getInitJsonSchema() ?? options.jsonSchema,
693571
694081
  mutableMessages,
693572
694082
  getReadFileCache: () => pendingSeeds.size === 0 ? readFileState : mergeFileStateCaches(readFileState, pendingSeeds),
693573
- setReadFileCache: (cache8) => {
693574
- readFileState = cache8;
694083
+ setReadFileCache: (cache10) => {
694084
+ readFileState = cache10;
693575
694085
  for (const [path30, seed] of pendingSeeds.entries()) {
693576
694086
  const existing = readFileState.get(path30);
693577
694087
  if (!existing || seed.timestamp > existing.timestamp) {
@@ -696224,7 +696734,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
696224
696734
  setCwd(cwd3);
696225
696735
  const server = new Server({
696226
696736
  name: "claude/tengu",
696227
- version: "1.3.440"
696737
+ version: "1.3.442"
696228
696738
  }, {
696229
696739
  capabilities: {
696230
696740
  tools: {}
@@ -698750,7 +699260,7 @@ ${customInstructions}` : customInstructions;
698750
699260
  }
698751
699261
  }
698752
699262
  logForDiagnosticsNoPII("info", "started", {
698753
- version: "1.3.440",
699263
+ version: "1.3.442",
698754
699264
  is_native_binary: isInBundledMode()
698755
699265
  });
698756
699266
  registerCleanup(async () => {
@@ -699469,7 +699979,7 @@ Usage: rayu --remote "your task description"`, () => gracefulShutdown(1));
699469
699979
  pendingHookMessages
699470
699980
  }, renderAndRun);
699471
699981
  }
699472
- }).version("1.3.440 (Rayu-CLI)", "-v, --version", "Output the version number");
699982
+ }).version("1.3.442 (Rayu-CLI)", "-v, --version", "Output the version number");
699473
699983
  program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
699474
699984
  program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
699475
699985
  if (canUserConfigureAdvisor()) {
@@ -699935,7 +700445,7 @@ if (false) {}
699935
700445
  async function main2() {
699936
700446
  const args = process.argv.slice(2);
699937
700447
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
699938
- console.log(`${"1.3.440"} (Rayu-CLI)`);
700448
+ console.log(`${"1.3.442"} (Rayu-CLI)`);
699939
700449
  return;
699940
700450
  }
699941
700451
  const {