@rayu-dev/rayu-cli 1.3.440 → 1.3.441
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rayu.js +766 -274
- 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.
|
|
148562
|
+
return `rayu/${"1.3.441"}`;
|
|
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.
|
|
148588
|
+
return `rayu/${"1.3.441"} (${"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.
|
|
148602
|
+
return `rayu/${"1.3.441"}${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.
|
|
148725
|
+
appVersion: "1.3.441",
|
|
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 || "
|
|
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 || "
|
|
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.
|
|
184612
|
+
const match = "1.3.441".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.
|
|
184651
|
+
version: "1.3.441",
|
|
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.
|
|
185265
|
+
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.3.441"
|
|
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.
|
|
185292
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("io.rayu.events", "1.3.441");
|
|
185281
185293
|
}
|
|
185282
185294
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
185283
185295
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -221193,7 +221205,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
221193
221205
|
if (!isAttributionHeaderEnabled()) {
|
|
221194
221206
|
return "";
|
|
221195
221207
|
}
|
|
221196
|
-
const version2 = `${"1.3.
|
|
221208
|
+
const version2 = `${"1.3.441"}.${fingerprint}`;
|
|
221197
221209
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
221198
221210
|
const cch = "";
|
|
221199
221211
|
const workload = getWorkload();
|
|
@@ -306113,7 +306125,7 @@ function getTelemetryAttributes() {
|
|
|
306113
306125
|
attributes["session.id"] = sessionId;
|
|
306114
306126
|
}
|
|
306115
306127
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
306116
|
-
attributes["app.version"] = "1.3.
|
|
306128
|
+
attributes["app.version"] = "1.3.441";
|
|
306117
306129
|
}
|
|
306118
306130
|
const oauthAccount = getOauthAccountInfo();
|
|
306119
306131
|
if (oauthAccount) {
|
|
@@ -416468,7 +416480,7 @@ function getInstallationEnv() {
|
|
|
416468
416480
|
return;
|
|
416469
416481
|
}
|
|
416470
416482
|
function getClaudeCodeVersion() {
|
|
416471
|
-
return "1.3.
|
|
416483
|
+
return "1.3.441";
|
|
416472
416484
|
}
|
|
416473
416485
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
416474
416486
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -421706,7 +421718,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
421706
421718
|
const client4 = new Client({
|
|
421707
421719
|
name: "claude-code",
|
|
421708
421720
|
title: "RAYU",
|
|
421709
|
-
version: "1.3.
|
|
421721
|
+
version: "1.3.441",
|
|
421710
421722
|
description: "Anthropic's agentic coding tool",
|
|
421711
421723
|
websiteUrl: PRODUCT_URL
|
|
421712
421724
|
}, {
|
|
@@ -422023,7 +422035,7 @@ var init_client7 = __esm(() => {
|
|
|
422023
422035
|
const client4 = new Client({
|
|
422024
422036
|
name: "claude-code",
|
|
422025
422037
|
title: "RAYU",
|
|
422026
|
-
version: "1.3.
|
|
422038
|
+
version: "1.3.441",
|
|
422027
422039
|
description: "Anthropic's agentic coding tool",
|
|
422028
422040
|
websiteUrl: PRODUCT_URL
|
|
422029
422041
|
}, {
|
|
@@ -436828,7 +436840,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
436828
436840
|
}
|
|
436829
436841
|
function computeFingerprintFromMessages(messages) {
|
|
436830
436842
|
const firstMessageText = extractFirstMessageText(messages);
|
|
436831
|
-
return computeFingerprint(firstMessageText, "1.3.
|
|
436843
|
+
return computeFingerprint(firstMessageText, "1.3.441");
|
|
436832
436844
|
}
|
|
436833
436845
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
436834
436846
|
var init_fingerprint = () => {};
|
|
@@ -436870,7 +436882,7 @@ async function sideQuery(opts) {
|
|
|
436870
436882
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
436871
436883
|
}
|
|
436872
436884
|
const messageText = extractFirstUserMessageText(messages);
|
|
436873
|
-
const fingerprint = computeFingerprint(messageText, "1.3.
|
|
436885
|
+
const fingerprint = computeFingerprint(messageText, "1.3.441");
|
|
436874
436886
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
436875
436887
|
const systemBlocks = [
|
|
436876
436888
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -439423,7 +439435,8 @@ function AssistantThinkingMessage({
|
|
|
439423
439435
|
isTranscriptMode,
|
|
439424
439436
|
verbose,
|
|
439425
439437
|
hideInTranscript = false,
|
|
439426
|
-
isThinking = false
|
|
439438
|
+
isThinking = false,
|
|
439439
|
+
liveStreamingPreview = false
|
|
439427
439440
|
}) {
|
|
439428
439441
|
if (!thinking) {
|
|
439429
439442
|
return null;
|
|
@@ -439432,6 +439445,40 @@ function AssistantThinkingMessage({
|
|
|
439432
439445
|
return null;
|
|
439433
439446
|
}
|
|
439434
439447
|
const shouldShowFullThinking = isTranscriptMode || verbose;
|
|
439448
|
+
if (liveStreamingPreview && isThinking && !shouldShowFullThinking) {
|
|
439449
|
+
const previewLines = thinking.split(`
|
|
439450
|
+
`).map((line) => line.trimEnd()).filter((line) => line.length > 0).slice(-THINKING_PREVIEW_LINES);
|
|
439451
|
+
const preview = previewLines.join(`
|
|
439452
|
+
`);
|
|
439453
|
+
return /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
|
|
439454
|
+
flexDirection: "column",
|
|
439455
|
+
marginTop: addMargin ? 1 : 0,
|
|
439456
|
+
width: "100%",
|
|
439457
|
+
children: [
|
|
439458
|
+
/* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThinkingHeader, {}, undefined, false, undefined, this),
|
|
439459
|
+
/* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
|
|
439460
|
+
paddingLeft: 2,
|
|
439461
|
+
flexDirection: "column",
|
|
439462
|
+
children: [
|
|
439463
|
+
preview ? /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
|
|
439464
|
+
height: Math.min(THINKING_PREVIEW_LINES, previewLines.length),
|
|
439465
|
+
flexDirection: "column",
|
|
439466
|
+
overflow: "hidden",
|
|
439467
|
+
children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
439468
|
+
dimColor: true,
|
|
439469
|
+
children: preview
|
|
439470
|
+
}, undefined, false, undefined, this)
|
|
439471
|
+
}, undefined, false, undefined, this) : null,
|
|
439472
|
+
/* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
439473
|
+
dimColor: true,
|
|
439474
|
+
italic: true,
|
|
439475
|
+
children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(CtrlOToExpand, {}, undefined, false, undefined, this)
|
|
439476
|
+
}, undefined, false, undefined, this)
|
|
439477
|
+
]
|
|
439478
|
+
}, undefined, true, undefined, this)
|
|
439479
|
+
]
|
|
439480
|
+
}, undefined, true, undefined, this);
|
|
439481
|
+
}
|
|
439435
439482
|
if (!shouldShowFullThinking) {
|
|
439436
439483
|
return /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
|
|
439437
439484
|
marginTop: addMargin ? 1 : 0,
|
|
@@ -439477,7 +439524,7 @@ function AssistantThinkingMessage({
|
|
|
439477
439524
|
]
|
|
439478
439525
|
}, undefined, true, undefined, this);
|
|
439479
439526
|
}
|
|
439480
|
-
var jsx_dev_runtime71, THINK_PULSE, THINK_FRAMES, THINK_ICON_COLOR = "#F5F5F5";
|
|
439527
|
+
var jsx_dev_runtime71, THINK_PULSE, THINK_FRAMES, THINK_ICON_COLOR = "#F5F5F5", THINKING_PREVIEW_LINES = 3;
|
|
439481
439528
|
var init_AssistantThinkingMessage = __esm(() => {
|
|
439482
439529
|
init_figures();
|
|
439483
439530
|
init_ink2();
|
|
@@ -447739,7 +447786,7 @@ function TurnDurationMessage(t0) {
|
|
|
447739
447786
|
} else {
|
|
447740
447787
|
t6 = $3[8];
|
|
447741
447788
|
}
|
|
447742
|
-
const t7 = showTurnDuration &&
|
|
447789
|
+
const t7 = showTurnDuration && `Rayu ${verb.toLowerCase()} for ${duration3}`;
|
|
447743
447790
|
const t8 = backgroundTaskSummary && ` · ${backgroundTaskSummary} still running`;
|
|
447744
447791
|
let t9;
|
|
447745
447792
|
if ($3[9] !== budgetSuffix || $3[10] !== t7 || $3[11] !== t8) {
|
|
@@ -468694,34 +468741,41 @@ function classifySource(rawSource, localExists) {
|
|
|
468694
468741
|
}
|
|
468695
468742
|
return { type: "local", path: source };
|
|
468696
468743
|
}
|
|
468697
|
-
async function
|
|
468744
|
+
async function locateSkillDirs(root2) {
|
|
468698
468745
|
if (await fileExists(join92(root2, "SKILL.md")))
|
|
468699
|
-
return root2;
|
|
468700
|
-
const
|
|
468701
|
-
if (
|
|
468746
|
+
return [root2];
|
|
468747
|
+
const skillsContainer = join92(root2, "skills");
|
|
468748
|
+
if (await fileExists(skillsContainer)) {
|
|
468749
|
+
const collected = await collectSkillDirs(skillsContainer, 0, 4, []);
|
|
468750
|
+
if (collected.length > 0)
|
|
468751
|
+
return collected;
|
|
468752
|
+
}
|
|
468753
|
+
const found = await collectSkillDirs(root2, 0, 5, []);
|
|
468754
|
+
if (found.length > 0)
|
|
468702
468755
|
return found;
|
|
468703
|
-
throw new InstallSkillError("No SKILL.md found.
|
|
468756
|
+
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
468757
|
}
|
|
468705
|
-
async function
|
|
468706
|
-
if (depth
|
|
468707
|
-
return
|
|
468758
|
+
async function collectSkillDirs(dir, depth, maxDepth, out) {
|
|
468759
|
+
if (depth > maxDepth)
|
|
468760
|
+
return out;
|
|
468761
|
+
if (await fileExists(join92(dir, "SKILL.md"))) {
|
|
468762
|
+
out.push(dir);
|
|
468763
|
+
return out;
|
|
468764
|
+
}
|
|
468708
468765
|
let entries;
|
|
468709
468766
|
try {
|
|
468710
468767
|
entries = await readdir13(dir, { withFileTypes: true });
|
|
468711
468768
|
} catch {
|
|
468712
|
-
return
|
|
468769
|
+
return out;
|
|
468713
468770
|
}
|
|
468714
468771
|
for (const e2 of entries) {
|
|
468715
468772
|
if (!e2.isDirectory())
|
|
468716
468773
|
continue;
|
|
468717
|
-
|
|
468718
|
-
|
|
468719
|
-
|
|
468720
|
-
const deeper = await findSkillDirRecursive(candidate, depth + 1, maxDepth);
|
|
468721
|
-
if (deeper)
|
|
468722
|
-
return deeper;
|
|
468774
|
+
if (e2.name.startsWith(".") || e2.name === "node_modules")
|
|
468775
|
+
continue;
|
|
468776
|
+
await collectSkillDirs(join92(dir, e2.name), depth + 1, maxDepth, out);
|
|
468723
468777
|
}
|
|
468724
|
-
return
|
|
468778
|
+
return out;
|
|
468725
468779
|
}
|
|
468726
468780
|
async function fileExists(p) {
|
|
468727
468781
|
try {
|
|
@@ -468754,9 +468808,9 @@ async function installSkillFromSource(rawSource, options = {}) {
|
|
|
468754
468808
|
const kind = classifySource(source, localExists);
|
|
468755
468809
|
const staging = await mkdtemp3(join92(tmpdir10(), "rayu-skill-"));
|
|
468756
468810
|
try {
|
|
468757
|
-
let
|
|
468811
|
+
let scanRoot;
|
|
468758
468812
|
if (kind.type === "local") {
|
|
468759
|
-
|
|
468813
|
+
scanRoot = expandHome(kind.path);
|
|
468760
468814
|
} else if (kind.type === "github") {
|
|
468761
468815
|
const cloneDir = join92(staging, "repo");
|
|
468762
468816
|
await cloneGitHub(kind.owner, kind.repo, cloneDir);
|
|
@@ -468764,41 +468818,57 @@ async function installSkillFromSource(rawSource, options = {}) {
|
|
|
468764
468818
|
if (!resolve38(root2).startsWith(resolve38(cloneDir))) {
|
|
468765
468819
|
throw new InstallSkillError("Invalid subdir in GitHub source.");
|
|
468766
468820
|
}
|
|
468767
|
-
|
|
468821
|
+
scanRoot = root2;
|
|
468768
468822
|
} else {
|
|
468769
468823
|
const dlDir = join92(staging, "dl");
|
|
468770
468824
|
await mkdir19(dlDir, { recursive: true });
|
|
468771
468825
|
const md3 = await downloadText(kind.url);
|
|
468772
468826
|
await writeFile17(join92(dlDir, "SKILL.md"), md3, "utf-8");
|
|
468773
|
-
|
|
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}.`);
|
|
468827
|
+
scanRoot = dlDir;
|
|
468781
468828
|
}
|
|
468782
|
-
const
|
|
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";
|
|
468829
|
+
const skillDirs = await locateSkillDirs(scanRoot);
|
|
468786
468830
|
const skillsRoot = getUserSkillsDir();
|
|
468787
|
-
const
|
|
468788
|
-
|
|
468789
|
-
|
|
468790
|
-
|
|
468791
|
-
|
|
468792
|
-
|
|
468831
|
+
const planned = [];
|
|
468832
|
+
const seenNames = new Set;
|
|
468833
|
+
for (const skillDir of skillDirs) {
|
|
468834
|
+
const skillFile = join92(skillDir, "SKILL.md");
|
|
468835
|
+
let content;
|
|
468836
|
+
try {
|
|
468837
|
+
content = await readFile24(skillFile, { encoding: "utf-8" });
|
|
468838
|
+
} catch {
|
|
468839
|
+
throw new InstallSkillError(`SKILL.md not readable at ${skillFile}.`);
|
|
468840
|
+
}
|
|
468841
|
+
const { frontmatter, content: markdown } = parseFrontmatter(content, skillFile);
|
|
468842
|
+
const nameSource = (frontmatter.name != null ? String(frontmatter.name) : "") || basename27(skillDir);
|
|
468843
|
+
const name = sanitizeSkillName(nameSource);
|
|
468844
|
+
if (seenNames.has(name))
|
|
468845
|
+
continue;
|
|
468846
|
+
seenNames.add(name);
|
|
468847
|
+
const description = (frontmatter.description != null ? String(frontmatter.description) : "") || firstLine(markdown) || "Installed skill";
|
|
468848
|
+
const dest = join92(skillsRoot, name);
|
|
468849
|
+
if (!resolve38(dest).startsWith(resolve38(skillsRoot) + sep25)) {
|
|
468850
|
+
throw new InstallSkillError(`Refusing to install outside ${skillsRoot}.`);
|
|
468851
|
+
}
|
|
468852
|
+
planned.push({ skillDir, name, description, dest });
|
|
468793
468853
|
}
|
|
468794
468854
|
await mkdir19(skillsRoot, { recursive: true, mode: 448 });
|
|
468795
|
-
const
|
|
468796
|
-
|
|
468797
|
-
|
|
468798
|
-
|
|
468855
|
+
const installed = [];
|
|
468856
|
+
for (const p of planned) {
|
|
468857
|
+
const replaced = await fileExists(p.dest);
|
|
468858
|
+
const tmpDest = join92(skillsRoot, `.${p.name}.installing-${randomUUID21()}`);
|
|
468859
|
+
await cp2(p.skillDir, tmpDest, { recursive: true });
|
|
468860
|
+
await rm7(p.dest, { recursive: true, force: true });
|
|
468861
|
+
await rename4(tmpDest, p.dest);
|
|
468862
|
+
installed.push({
|
|
468863
|
+
name: p.name,
|
|
468864
|
+
description: p.description,
|
|
468865
|
+
path: p.dest,
|
|
468866
|
+
replaced
|
|
468867
|
+
});
|
|
468868
|
+
}
|
|
468799
468869
|
clearSkillCaches();
|
|
468800
468870
|
clearCommandMemoizationCaches();
|
|
468801
|
-
return
|
|
468871
|
+
return installed;
|
|
468802
468872
|
} finally {
|
|
468803
468873
|
await rm7(staging, { recursive: true, force: true }).catch((e2) => logError2(e2));
|
|
468804
468874
|
}
|
|
@@ -468856,8 +468926,11 @@ The "source" can be:
|
|
|
468856
468926
|
- a direct URL to a SKILL.md file
|
|
468857
468927
|
- a local directory path containing a SKILL.md
|
|
468858
468928
|
|
|
468929
|
+
If the source is a collection — a repo with a "skills/" directory, or any tree
|
|
468930
|
+
containing multiple SKILL.md files — every skill it contains is installed.
|
|
468931
|
+
|
|
468859
468932
|
Skills are installed into the Rayu user skills directory (~/.rayu/skills/<name>/).
|
|
468860
|
-
|
|
468933
|
+
Reinstalling overwrites an existing skill of the same name and reports it as replaced.`, inputSchema17, outputSchema15, InstallSkillTool;
|
|
468861
468934
|
var init_InstallSkillTool = __esm(() => {
|
|
468862
468935
|
init_v4();
|
|
468863
468936
|
init_Tool();
|
|
@@ -468867,9 +468940,12 @@ var init_InstallSkillTool = __esm(() => {
|
|
|
468867
468940
|
overwrite: exports_external.boolean().optional().describe("Replace an already-installed skill with the same name")
|
|
468868
468941
|
}));
|
|
468869
468942
|
outputSchema15 = lazySchema(() => exports_external.object({
|
|
468870
|
-
|
|
468871
|
-
|
|
468872
|
-
|
|
468943
|
+
skills: exports_external.array(exports_external.object({
|
|
468944
|
+
name: exports_external.string(),
|
|
468945
|
+
description: exports_external.string(),
|
|
468946
|
+
path: exports_external.string(),
|
|
468947
|
+
replaced: exports_external.boolean()
|
|
468948
|
+
}))
|
|
468873
468949
|
}));
|
|
468874
468950
|
InstallSkillTool = buildTool({
|
|
468875
468951
|
name: INSTALL_SKILL_TOOL_NAME,
|
|
@@ -468916,17 +468992,21 @@ var init_InstallSkillTool = __esm(() => {
|
|
|
468916
468992
|
};
|
|
468917
468993
|
},
|
|
468918
468994
|
async call(input, _context) {
|
|
468919
|
-
const
|
|
468995
|
+
const skills = await installSkillFromSource(input.source, {
|
|
468920
468996
|
overwrite: input.overwrite
|
|
468921
468997
|
});
|
|
468922
|
-
return { data:
|
|
468998
|
+
return { data: { skills } };
|
|
468923
468999
|
},
|
|
468924
469000
|
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
469001
|
+
const replaced = output.skills.filter((s2) => s2.replaced);
|
|
469002
|
+
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(", ")})` : "") + ".";
|
|
469003
|
+
const lines2 = output.skills.map((s2) => `- /${s2.name}${s2.replaced ? " [overwritten]" : ""} (${s2.path}): ${s2.description}`);
|
|
468925
469004
|
return {
|
|
468926
469005
|
tool_use_id: toolUseID,
|
|
468927
469006
|
type: "tool_result",
|
|
468928
|
-
content:
|
|
468929
|
-
|
|
469007
|
+
content: `${header} Each is now invocable as /<name> or via the Skill tool.
|
|
469008
|
+
${lines2.join(`
|
|
469009
|
+
`)}`
|
|
468930
469010
|
};
|
|
468931
469011
|
}
|
|
468932
469012
|
});
|
|
@@ -491483,12 +491563,13 @@ function rayuFeatureAllowed(featureKey) {
|
|
|
491483
491563
|
if (!isUseRayuOAuthEnabled())
|
|
491484
491564
|
return true;
|
|
491485
491565
|
const ent = getCachedEntitlements();
|
|
491486
|
-
if (
|
|
491487
|
-
|
|
491488
|
-
|
|
491489
|
-
|
|
491490
|
-
return
|
|
491491
|
-
|
|
491566
|
+
if (ent && ent.features) {
|
|
491567
|
+
const f3 = ent.features[featureKey];
|
|
491568
|
+
if (!f3)
|
|
491569
|
+
return true;
|
|
491570
|
+
return f3.enabled !== false;
|
|
491571
|
+
}
|
|
491572
|
+
return !hasRayuSession();
|
|
491492
491573
|
}
|
|
491493
491574
|
var FILE = "rayu-entitlements.json", REFRESH_COOLDOWN_MS = 30000, cache5 = null, loadedFromDisk = false, fetching = false, lastAttempt = 0;
|
|
491494
491575
|
var init_rayuEntitlements = __esm(() => {
|
|
@@ -491497,6 +491578,191 @@ var init_rayuEntitlements = __esm(() => {
|
|
|
491497
491578
|
init_rayuSession();
|
|
491498
491579
|
});
|
|
491499
491580
|
|
|
491581
|
+
// src/services/rayuAuth/rayuFeatureUsage.ts
|
|
491582
|
+
function getFeatureUsage(featureKey) {
|
|
491583
|
+
maybeRefreshFeatureUsage();
|
|
491584
|
+
if (!cache6)
|
|
491585
|
+
return null;
|
|
491586
|
+
return cache6[featureKey] ?? null;
|
|
491587
|
+
}
|
|
491588
|
+
function maybeRefreshFeatureUsage() {
|
|
491589
|
+
if (isUseRayuOAuthEnabled() && hasRayuSession() && !fetching2 && Date.now() - lastAttempt2 > REFRESH_COOLDOWN_MS2) {
|
|
491590
|
+
refreshFeatureUsage();
|
|
491591
|
+
}
|
|
491592
|
+
}
|
|
491593
|
+
async function refreshFeatureUsage() {
|
|
491594
|
+
if (!isUseRayuOAuthEnabled() || !hasRayuSession() || fetching2)
|
|
491595
|
+
return;
|
|
491596
|
+
fetching2 = true;
|
|
491597
|
+
lastAttempt2 = Date.now();
|
|
491598
|
+
try {
|
|
491599
|
+
const token = await getValidRayuAccessToken();
|
|
491600
|
+
if (!token)
|
|
491601
|
+
return;
|
|
491602
|
+
const res = await globalThis.fetch(`${getRayuApiBaseUrl()}/usage/features`, { headers: { Authorization: `Bearer ${token}` } });
|
|
491603
|
+
if (!res.ok)
|
|
491604
|
+
return;
|
|
491605
|
+
const data = await res.json();
|
|
491606
|
+
if (data && typeof data === "object") {
|
|
491607
|
+
const next = {};
|
|
491608
|
+
for (const [k2, v2] of Object.entries(data)) {
|
|
491609
|
+
if (v2 && typeof v2 === "object") {
|
|
491610
|
+
const rawUsed = v2.used;
|
|
491611
|
+
const rawLimit = v2.limit;
|
|
491612
|
+
const used = typeof rawUsed === "number" && Number.isFinite(rawUsed) ? rawUsed : 0;
|
|
491613
|
+
const limit3 = typeof rawLimit === "number" && Number.isFinite(rawLimit) ? rawLimit : null;
|
|
491614
|
+
next[k2] = { used, limit: limit3 };
|
|
491615
|
+
}
|
|
491616
|
+
}
|
|
491617
|
+
cache6 = next;
|
|
491618
|
+
}
|
|
491619
|
+
} catch {} finally {
|
|
491620
|
+
fetching2 = false;
|
|
491621
|
+
}
|
|
491622
|
+
}
|
|
491623
|
+
function bumpFeatureUsage(featureKey) {
|
|
491624
|
+
if (!cache6)
|
|
491625
|
+
return;
|
|
491626
|
+
const cur = cache6[featureKey];
|
|
491627
|
+
if (cur)
|
|
491628
|
+
cache6[featureKey] = { ...cur, used: cur.used + 1 };
|
|
491629
|
+
}
|
|
491630
|
+
function clearFeatureUsage() {
|
|
491631
|
+
cache6 = null;
|
|
491632
|
+
lastAttempt2 = 0;
|
|
491633
|
+
}
|
|
491634
|
+
var REFRESH_COOLDOWN_MS2 = 60000, cache6 = null, fetching2 = false, lastAttempt2 = 0;
|
|
491635
|
+
var init_rayuFeatureUsage = __esm(() => {
|
|
491636
|
+
init_rayuSession();
|
|
491637
|
+
});
|
|
491638
|
+
|
|
491639
|
+
// src/services/rayuAuth/rayuPlansCatalog.ts
|
|
491640
|
+
function getEntryPaidPlan() {
|
|
491641
|
+
maybeRefreshPlansCatalog();
|
|
491642
|
+
if (!cache7)
|
|
491643
|
+
return null;
|
|
491644
|
+
let best = null;
|
|
491645
|
+
for (const p of cache7) {
|
|
491646
|
+
if (p.availability === "active" && p.priceCents > 0) {
|
|
491647
|
+
if (!best || p.priceCents < best.priceCents)
|
|
491648
|
+
best = p;
|
|
491649
|
+
}
|
|
491650
|
+
}
|
|
491651
|
+
return best;
|
|
491652
|
+
}
|
|
491653
|
+
function maybeRefreshPlansCatalog() {
|
|
491654
|
+
if (isUseRayuOAuthEnabled() && !fetching3 && Date.now() - lastAttempt3 > REFRESH_COOLDOWN_MS3) {
|
|
491655
|
+
refreshPlansCatalog();
|
|
491656
|
+
}
|
|
491657
|
+
}
|
|
491658
|
+
async function refreshPlansCatalog() {
|
|
491659
|
+
if (!isUseRayuOAuthEnabled() || fetching3)
|
|
491660
|
+
return;
|
|
491661
|
+
fetching3 = true;
|
|
491662
|
+
lastAttempt3 = Date.now();
|
|
491663
|
+
try {
|
|
491664
|
+
const res = await globalThis.fetch(`${getRayuApiBaseUrl()}/plans`);
|
|
491665
|
+
if (!res.ok)
|
|
491666
|
+
return;
|
|
491667
|
+
const data = await res.json();
|
|
491668
|
+
if (Array.isArray(data)) {
|
|
491669
|
+
cache7 = data.filter((p) => !!p && typeof p === "object" && typeof p.name === "string" && typeof p.priceCents === "number").map((p) => ({
|
|
491670
|
+
code: String(p.code),
|
|
491671
|
+
name: p.name,
|
|
491672
|
+
priceCents: p.priceCents,
|
|
491673
|
+
availability: String(p.availability)
|
|
491674
|
+
}));
|
|
491675
|
+
}
|
|
491676
|
+
} catch {} finally {
|
|
491677
|
+
fetching3 = false;
|
|
491678
|
+
}
|
|
491679
|
+
}
|
|
491680
|
+
var REFRESH_COOLDOWN_MS3 = 60000, cache7 = null, fetching3 = false, lastAttempt3 = 0;
|
|
491681
|
+
var init_rayuPlansCatalog = __esm(() => {
|
|
491682
|
+
init_rayuSession();
|
|
491683
|
+
});
|
|
491684
|
+
|
|
491685
|
+
// src/services/rayuAuth/paidFeatureGate.ts
|
|
491686
|
+
function isPaidFeatureLocked(featureKey) {
|
|
491687
|
+
return !rayuFeatureAllowed(featureKey);
|
|
491688
|
+
}
|
|
491689
|
+
function capitalize3(s2) {
|
|
491690
|
+
return s2.length ? s2[0].toUpperCase() + s2.slice(1) : s2;
|
|
491691
|
+
}
|
|
491692
|
+
function usd(cents) {
|
|
491693
|
+
return `$${(cents / 100).toFixed(cents % 100 === 0 ? 0 : 2)}`;
|
|
491694
|
+
}
|
|
491695
|
+
function upgradeTargetLabel() {
|
|
491696
|
+
const plan = getEntryPaidPlan();
|
|
491697
|
+
if (plan) {
|
|
491698
|
+
const price = plan.priceCents > 0 ? ` (${usd(plan.priceCents)}/mo)` : "";
|
|
491699
|
+
return `the ${plan.name} plan${price}`;
|
|
491700
|
+
}
|
|
491701
|
+
return "a paid plan";
|
|
491702
|
+
}
|
|
491703
|
+
function upgradePromptForUser(featureLabel) {
|
|
491704
|
+
return `${capitalize3(featureLabel)} is a paid feature. Please upgrade to ${upgradeTargetLabel()} to unlock it and all other premium features.`;
|
|
491705
|
+
}
|
|
491706
|
+
function paidFeatureUpgradeNote(featureLabel) {
|
|
491707
|
+
return `
|
|
491708
|
+
|
|
491709
|
+
---
|
|
491710
|
+
> \uD83D\uDD12 **Paid feature — requires ${upgradeTargetLabel()}.**
|
|
491711
|
+
>
|
|
491712
|
+
> 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.
|
|
491713
|
+
>
|
|
491714
|
+
> If the user asks for ${featureLabel}, do **not** call this tool — it will fail. Instead, tell the user: "${upgradePromptForUser(featureLabel)}"
|
|
491715
|
+
>
|
|
491716
|
+
> Users on a paid plan get unlimited access to this tool.`;
|
|
491717
|
+
}
|
|
491718
|
+
function paidFeatureDescriptionSuffix() {
|
|
491719
|
+
return ` (Requires ${upgradeTargetLabel()}.)`;
|
|
491720
|
+
}
|
|
491721
|
+
function paidFeatureBlockedMessage(featureLabel) {
|
|
491722
|
+
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.`;
|
|
491723
|
+
}
|
|
491724
|
+
function featureLimitReached(featureKey) {
|
|
491725
|
+
if (!isUseRayuOAuthEnabled())
|
|
491726
|
+
return false;
|
|
491727
|
+
if (!rayuFeatureAllowed(featureKey))
|
|
491728
|
+
return false;
|
|
491729
|
+
const u4 = getFeatureUsage(featureKey);
|
|
491730
|
+
if (!u4 || u4.limit == null)
|
|
491731
|
+
return false;
|
|
491732
|
+
return u4.used >= u4.limit;
|
|
491733
|
+
}
|
|
491734
|
+
function usageSuffix(featureKey) {
|
|
491735
|
+
const u4 = getFeatureUsage(featureKey);
|
|
491736
|
+
if (!u4 || u4.limit == null)
|
|
491737
|
+
return "";
|
|
491738
|
+
return ` (${u4.used}/${u4.limit} used this month)`;
|
|
491739
|
+
}
|
|
491740
|
+
function featureLimitUpgradePrompt(featureLabel) {
|
|
491741
|
+
return `You've reached this month's ${featureLabel} limit. Upgrade to ${upgradeTargetLabel()} for unlimited ${featureLabel}, or wait until it resets next month.`;
|
|
491742
|
+
}
|
|
491743
|
+
function featureLimitReachedNote(featureKey, featureLabel) {
|
|
491744
|
+
return `
|
|
491745
|
+
|
|
491746
|
+
---
|
|
491747
|
+
> \uD83D\uDD12 **Monthly ${featureLabel} limit reached${usageSuffix(featureKey)}.**
|
|
491748
|
+
>
|
|
491749
|
+
> 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.
|
|
491750
|
+
>
|
|
491751
|
+
> If the user asks for ${featureLabel}, do **not** call this tool — it will fail. Instead, tell the user: "${featureLimitUpgradePrompt(featureLabel)}"`;
|
|
491752
|
+
}
|
|
491753
|
+
function featureLimitDescriptionSuffix(featureKey) {
|
|
491754
|
+
return ` (Monthly limit reached${usageSuffix(featureKey)} — upgrade for unlimited.)`;
|
|
491755
|
+
}
|
|
491756
|
+
function featureLimitReachedMessage(featureKey, featureLabel) {
|
|
491757
|
+
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.`;
|
|
491758
|
+
}
|
|
491759
|
+
var init_paidFeatureGate = __esm(() => {
|
|
491760
|
+
init_rayuEntitlements();
|
|
491761
|
+
init_rayuFeatureUsage();
|
|
491762
|
+
init_rayuPlansCatalog();
|
|
491763
|
+
init_rayuSession();
|
|
491764
|
+
});
|
|
491765
|
+
|
|
491500
491766
|
// src/tools/ImageGenTool/ImageGenTool.ts
|
|
491501
491767
|
import { mkdir as mkdir21, readFile as readFile26, writeFile as writeFile19 } from "fs/promises";
|
|
491502
491768
|
import { dirname as dirname43, isAbsolute as isAbsolute28, relative as relative20 } from "path";
|
|
@@ -491533,7 +491799,7 @@ function extForMedia(mediaType) {
|
|
|
491533
491799
|
const ext = mediaType.split("/")[1] || "png";
|
|
491534
491800
|
return ext === "jpeg" ? "jpg" : ext;
|
|
491535
491801
|
}
|
|
491536
|
-
var inputSchema21, outputSchema19, ImageGenTool;
|
|
491802
|
+
var IMAGE_GEN_FEATURE = "image_generation", IMAGE_GEN_LABEL = "image generation", inputSchema21, outputSchema19, ImageGenTool;
|
|
491537
491803
|
var init_ImageGenTool = __esm(() => {
|
|
491538
491804
|
init_v4();
|
|
491539
491805
|
init_Tool();
|
|
@@ -491546,7 +491812,8 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491546
491812
|
init_vertexImageClient();
|
|
491547
491813
|
init_prompt17();
|
|
491548
491814
|
init_UI16();
|
|
491549
|
-
|
|
491815
|
+
init_paidFeatureGate();
|
|
491816
|
+
init_rayuFeatureUsage();
|
|
491550
491817
|
inputSchema21 = lazySchema(() => exports_external.strictObject({
|
|
491551
491818
|
prompt: exports_external.string().min(1).describe("Text description of the image to generate, or the edit to make"),
|
|
491552
491819
|
output_path: exports_external.string().optional().describe("Where to save the PNG (inside the working directory). Default: ./generated-image-<timestamp>.png"),
|
|
@@ -491579,7 +491846,7 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491579
491846
|
return outputSchema19();
|
|
491580
491847
|
},
|
|
491581
491848
|
isEnabled() {
|
|
491582
|
-
return
|
|
491849
|
+
return getNvidiaApiKey() != null || isGeminiVertexImageAvailable();
|
|
491583
491850
|
},
|
|
491584
491851
|
isReadOnly() {
|
|
491585
491852
|
return false;
|
|
@@ -491591,6 +491858,12 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491591
491858
|
return `GenerateImage: ${input.prompt}`;
|
|
491592
491859
|
},
|
|
491593
491860
|
async description() {
|
|
491861
|
+
if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
|
|
491862
|
+
return DESCRIPTION13 + paidFeatureDescriptionSuffix();
|
|
491863
|
+
}
|
|
491864
|
+
if (featureLimitReached(IMAGE_GEN_FEATURE)) {
|
|
491865
|
+
return DESCRIPTION13 + featureLimitDescriptionSuffix(IMAGE_GEN_FEATURE);
|
|
491866
|
+
}
|
|
491594
491867
|
return DESCRIPTION13;
|
|
491595
491868
|
},
|
|
491596
491869
|
userFacingName() {
|
|
@@ -491600,7 +491873,14 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491600
491873
|
return input?.prompt ? `Generating image: ${input.prompt}` : "Generating image";
|
|
491601
491874
|
},
|
|
491602
491875
|
async prompt() {
|
|
491603
|
-
|
|
491876
|
+
const base2 = getImageGenPrompt();
|
|
491877
|
+
if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
|
|
491878
|
+
return base2 + paidFeatureUpgradeNote(IMAGE_GEN_LABEL);
|
|
491879
|
+
}
|
|
491880
|
+
if (featureLimitReached(IMAGE_GEN_FEATURE)) {
|
|
491881
|
+
return base2 + featureLimitReachedNote(IMAGE_GEN_FEATURE, IMAGE_GEN_LABEL);
|
|
491882
|
+
}
|
|
491883
|
+
return base2;
|
|
491604
491884
|
},
|
|
491605
491885
|
async validateInput(input) {
|
|
491606
491886
|
const { ok } = resolveOutputPath(input.output_path);
|
|
@@ -491628,6 +491908,12 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491628
491908
|
};
|
|
491629
491909
|
},
|
|
491630
491910
|
async call(input, context) {
|
|
491911
|
+
if (isPaidFeatureLocked(IMAGE_GEN_FEATURE)) {
|
|
491912
|
+
throw new Error(paidFeatureBlockedMessage(IMAGE_GEN_LABEL));
|
|
491913
|
+
}
|
|
491914
|
+
if (featureLimitReached(IMAGE_GEN_FEATURE)) {
|
|
491915
|
+
throw new Error(featureLimitReachedMessage(IMAGE_GEN_FEATURE, IMAGE_GEN_LABEL));
|
|
491916
|
+
}
|
|
491631
491917
|
if (input.output_path && !resolveOutputPath(input.output_path).ok) {
|
|
491632
491918
|
throw new Error("output_path must be a file inside the working directory.");
|
|
491633
491919
|
}
|
|
@@ -491689,6 +491975,7 @@ var init_ImageGenTool = __esm(() => {
|
|
|
491689
491975
|
inlineMedia = `image/${r2.mediaType}`;
|
|
491690
491976
|
} catch {}
|
|
491691
491977
|
const dims = imageDimensions(buffer);
|
|
491978
|
+
bumpFeatureUsage(IMAGE_GEN_FEATURE);
|
|
491692
491979
|
return {
|
|
491693
491980
|
data: {
|
|
491694
491981
|
path: path22,
|
|
@@ -492312,7 +492599,7 @@ function resolveOutputPath2(output_path) {
|
|
|
492312
492599
|
const ok = rel.length > 0 && !rel.startsWith("..") && !isAbsolute29(rel);
|
|
492313
492600
|
return { ok, path: path22 };
|
|
492314
492601
|
}
|
|
492315
|
-
var inputSchema22, outputSchema20, VideoGenTool;
|
|
492602
|
+
var VIDEO_GEN_FEATURE = "video_generation", VIDEO_GEN_LABEL = "video generation", inputSchema22, outputSchema20, VideoGenTool;
|
|
492316
492603
|
var init_VideoGenTool = __esm(() => {
|
|
492317
492604
|
init_v4();
|
|
492318
492605
|
init_Tool();
|
|
@@ -492325,7 +492612,8 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492325
492612
|
init_vertexVideoClient();
|
|
492326
492613
|
init_prompt18();
|
|
492327
492614
|
init_UI17();
|
|
492328
|
-
|
|
492615
|
+
init_paidFeatureGate();
|
|
492616
|
+
init_rayuFeatureUsage();
|
|
492329
492617
|
inputSchema22 = lazySchema(() => exports_external.strictObject({
|
|
492330
492618
|
prompt: exports_external.string().min(1).describe("Text description of the video to generate, or the motion to apply"),
|
|
492331
492619
|
output_path: exports_external.string().optional().describe("Where to save the MP4 (inside the working directory). Default: ./generated-video-<timestamp>.mp4"),
|
|
@@ -492359,7 +492647,7 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492359
492647
|
return outputSchema20();
|
|
492360
492648
|
},
|
|
492361
492649
|
isEnabled() {
|
|
492362
|
-
return
|
|
492650
|
+
return isVideoEnabled() || isGeminiVertexVideoAvailable();
|
|
492363
492651
|
},
|
|
492364
492652
|
isReadOnly() {
|
|
492365
492653
|
return false;
|
|
@@ -492371,6 +492659,12 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492371
492659
|
return `GenerateVideo: ${input.prompt}`;
|
|
492372
492660
|
},
|
|
492373
492661
|
async description() {
|
|
492662
|
+
if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
|
|
492663
|
+
return DESCRIPTION14 + paidFeatureDescriptionSuffix();
|
|
492664
|
+
}
|
|
492665
|
+
if (featureLimitReached(VIDEO_GEN_FEATURE)) {
|
|
492666
|
+
return DESCRIPTION14 + featureLimitDescriptionSuffix(VIDEO_GEN_FEATURE);
|
|
492667
|
+
}
|
|
492374
492668
|
return DESCRIPTION14;
|
|
492375
492669
|
},
|
|
492376
492670
|
userFacingName() {
|
|
@@ -492380,7 +492674,14 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492380
492674
|
return input?.prompt ? `Generating video (please wait ~1-2 min): ${input.prompt}` : "Generating video — please wait, this takes ~1-2 minutes";
|
|
492381
492675
|
},
|
|
492382
492676
|
async prompt() {
|
|
492383
|
-
|
|
492677
|
+
const base2 = getVideoGenPrompt();
|
|
492678
|
+
if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
|
|
492679
|
+
return base2 + paidFeatureUpgradeNote(VIDEO_GEN_LABEL);
|
|
492680
|
+
}
|
|
492681
|
+
if (featureLimitReached(VIDEO_GEN_FEATURE)) {
|
|
492682
|
+
return base2 + featureLimitReachedNote(VIDEO_GEN_FEATURE, VIDEO_GEN_LABEL);
|
|
492683
|
+
}
|
|
492684
|
+
return base2;
|
|
492384
492685
|
},
|
|
492385
492686
|
async validateInput(input) {
|
|
492386
492687
|
const { ok } = resolveOutputPath2(input.output_path);
|
|
@@ -492408,6 +492709,12 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492408
492709
|
};
|
|
492409
492710
|
},
|
|
492410
492711
|
async call(input, context) {
|
|
492712
|
+
if (isPaidFeatureLocked(VIDEO_GEN_FEATURE)) {
|
|
492713
|
+
throw new Error(paidFeatureBlockedMessage(VIDEO_GEN_LABEL));
|
|
492714
|
+
}
|
|
492715
|
+
if (featureLimitReached(VIDEO_GEN_FEATURE)) {
|
|
492716
|
+
throw new Error(featureLimitReachedMessage(VIDEO_GEN_FEATURE, VIDEO_GEN_LABEL));
|
|
492717
|
+
}
|
|
492411
492718
|
const { ok, path: path22 } = resolveOutputPath2(input.output_path);
|
|
492412
492719
|
if (!ok) {
|
|
492413
492720
|
throw new Error("output_path must be a file inside the working directory.");
|
|
@@ -492459,6 +492766,7 @@ var init_VideoGenTool = __esm(() => {
|
|
|
492459
492766
|
await mkdir22(dirname44(path22), { recursive: true });
|
|
492460
492767
|
await writeFile20(path22, buffer);
|
|
492461
492768
|
const preview = await extractPreviewFrame(path22);
|
|
492769
|
+
bumpFeatureUsage(VIDEO_GEN_FEATURE);
|
|
492462
492770
|
return {
|
|
492463
492771
|
data: {
|
|
492464
492772
|
path: path22,
|
|
@@ -507483,7 +507791,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
|
|
|
507483
507791
|
}
|
|
507484
507792
|
}
|
|
507485
507793
|
function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_STATE_CACHE_SIZE) {
|
|
507486
|
-
const
|
|
507794
|
+
const cache8 = createFileStateCacheWithSizeLimit(maxSize);
|
|
507487
507795
|
const fileReadToolUseIds = new Map;
|
|
507488
507796
|
const fileWriteToolUseIds = new Map;
|
|
507489
507797
|
const fileEditToolUseIds = new Map;
|
|
@@ -507527,7 +507835,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
507527
507835
|
`).trim();
|
|
507528
507836
|
if (message.timestamp) {
|
|
507529
507837
|
const timestamp = new Date(message.timestamp).getTime();
|
|
507530
|
-
|
|
507838
|
+
cache8.set(readFilePath, {
|
|
507531
507839
|
content: fileContent,
|
|
507532
507840
|
timestamp,
|
|
507533
507841
|
offset: undefined,
|
|
@@ -507538,7 +507846,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
507538
507846
|
const writeToolData = fileWriteToolUseIds.get(content.tool_use_id);
|
|
507539
507847
|
if (writeToolData && message.timestamp) {
|
|
507540
507848
|
const timestamp = new Date(message.timestamp).getTime();
|
|
507541
|
-
|
|
507849
|
+
cache8.set(writeToolData.filePath, {
|
|
507542
507850
|
content: writeToolData.content,
|
|
507543
507851
|
timestamp,
|
|
507544
507852
|
offset: undefined,
|
|
@@ -507549,7 +507857,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
507549
507857
|
if (editFilePath && content.is_error !== true) {
|
|
507550
507858
|
try {
|
|
507551
507859
|
const { content: diskContent } = readFileSyncWithMetadata(editFilePath);
|
|
507552
|
-
|
|
507860
|
+
cache8.set(editFilePath, {
|
|
507553
507861
|
content: diskContent,
|
|
507554
507862
|
timestamp: getFileModificationTime(editFilePath),
|
|
507555
507863
|
offset: undefined,
|
|
@@ -507565,7 +507873,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
507565
507873
|
}
|
|
507566
507874
|
}
|
|
507567
507875
|
}
|
|
507568
|
-
return
|
|
507876
|
+
return cache8;
|
|
507569
507877
|
}
|
|
507570
507878
|
function extractBashToolsFromMessages(messages) {
|
|
507571
507879
|
const tools = new Set;
|
|
@@ -522790,8 +523098,8 @@ function filterSwarmFieldsFromSchema(toolName2, schema) {
|
|
|
522790
523098
|
}
|
|
522791
523099
|
async function toolToAPISchema(tool, options) {
|
|
522792
523100
|
const cacheKey = "inputJSONSchema" in tool && tool.inputJSONSchema ? `${tool.name}:${jsonStringify(tool.inputJSONSchema)}` : tool.name;
|
|
522793
|
-
const
|
|
522794
|
-
let base2 =
|
|
523101
|
+
const cache8 = getToolSchemaCache();
|
|
523102
|
+
let base2 = cache8.get(cacheKey);
|
|
522795
523103
|
if (!base2) {
|
|
522796
523104
|
const strictToolsEnabled = checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_tool_pear");
|
|
522797
523105
|
let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
@@ -522814,7 +523122,7 @@ async function toolToAPISchema(tool, options) {
|
|
|
522814
523122
|
if (getAPIProvider() === "anthropic" && !isOpenAICompatibleActive() && isFirstPartyAnthropicBaseUrl() && (getFeatureValue_CACHED_MAY_BE_STALE("tengu_fgts", false) || isEnvTruthy(process.env.CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING))) {
|
|
522815
523123
|
base2.eager_input_streaming = true;
|
|
522816
523124
|
}
|
|
522817
|
-
|
|
523125
|
+
cache8.set(cacheKey, base2);
|
|
522818
523126
|
}
|
|
522819
523127
|
const schema = {
|
|
522820
523128
|
name: base2.name,
|
|
@@ -529931,13 +530239,14 @@ class HighlightSegmenter {
|
|
|
529931
530239
|
this.stringPos += token.code.length;
|
|
529932
530240
|
this.tokenIdx++;
|
|
529933
530241
|
} else {
|
|
530242
|
+
const charValue = token.value;
|
|
529934
530243
|
const charsNeeded = targetVisiblePos - this.visiblePos;
|
|
529935
|
-
const charsAvailable =
|
|
530244
|
+
const charsAvailable = charValue.length - this.charIdx;
|
|
529936
530245
|
const charsToTake = Math.min(charsNeeded, charsAvailable);
|
|
529937
530246
|
this.stringPos += charsToTake;
|
|
529938
530247
|
this.visiblePos += charsToTake;
|
|
529939
530248
|
this.charIdx += charsToTake;
|
|
529940
|
-
if (this.charIdx >=
|
|
530249
|
+
if (this.charIdx >= charValue.length) {
|
|
529941
530250
|
this.tokenIdx++;
|
|
529942
530251
|
this.charIdx = 0;
|
|
529943
530252
|
}
|
|
@@ -532048,7 +532357,7 @@ function Feedback({
|
|
|
532048
532357
|
platform: env4.platform,
|
|
532049
532358
|
gitRepo: envInfo.isGit,
|
|
532050
532359
|
terminal: env4.terminal,
|
|
532051
|
-
version: "1.3.
|
|
532360
|
+
version: "1.3.441",
|
|
532052
532361
|
transcript: normalizeMessagesForAPI(messages),
|
|
532053
532362
|
errors: sanitizedErrors,
|
|
532054
532363
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -532240,7 +532549,7 @@ function Feedback({
|
|
|
532240
532549
|
", ",
|
|
532241
532550
|
env4.terminal,
|
|
532242
532551
|
", v",
|
|
532243
|
-
"1.3.
|
|
532552
|
+
"1.3.441"
|
|
532244
532553
|
]
|
|
532245
532554
|
}, undefined, true, undefined, this)
|
|
532246
532555
|
]
|
|
@@ -532346,7 +532655,7 @@ ${sanitizedDescription}
|
|
|
532346
532655
|
` + `**Environment Info**
|
|
532347
532656
|
` + `- Platform: ${env4.platform}
|
|
532348
532657
|
` + `- Terminal: ${env4.terminal}
|
|
532349
|
-
` + `- Version: ${"1.3.
|
|
532658
|
+
` + `- Version: ${"1.3.441"}
|
|
532350
532659
|
` + `- Feedback ID: ${feedbackId}
|
|
532351
532660
|
` + `
|
|
532352
532661
|
**Errors**
|
|
@@ -535186,9 +535495,9 @@ async function assertMinVersion() {
|
|
|
535186
535495
|
if (false) {}
|
|
535187
535496
|
try {
|
|
535188
535497
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
535189
|
-
if (versionConfig.minVersion && lt("1.3.
|
|
535498
|
+
if (versionConfig.minVersion && lt("1.3.441", versionConfig.minVersion)) {
|
|
535190
535499
|
console.error(`
|
|
535191
|
-
It looks like your version of RAYU (${"1.3.
|
|
535500
|
+
It looks like your version of RAYU (${"1.3.441"}) needs an update.
|
|
535192
535501
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
535193
535502
|
|
|
535194
535503
|
To update, please run:
|
|
@@ -535414,7 +535723,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
535414
535723
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
535415
535724
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
535416
535725
|
pid: process.pid,
|
|
535417
|
-
currentVersion: "1.3.
|
|
535726
|
+
currentVersion: "1.3.441"
|
|
535418
535727
|
});
|
|
535419
535728
|
return "in_progress";
|
|
535420
535729
|
}
|
|
@@ -535423,7 +535732,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
535423
535732
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
535424
535733
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
535425
535734
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
535426
|
-
currentVersion: "1.3.
|
|
535735
|
+
currentVersion: "1.3.441"
|
|
535427
535736
|
});
|
|
535428
535737
|
console.error(`
|
|
535429
535738
|
Error: Windows NPM detected in WSL
|
|
@@ -535959,7 +536268,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
535959
536268
|
}
|
|
535960
536269
|
async function getDoctorDiagnostic() {
|
|
535961
536270
|
const installationType = await getCurrentInstallationType();
|
|
535962
|
-
const version2 = typeof MACRO !== "undefined" ? "1.3.
|
|
536271
|
+
const version2 = typeof MACRO !== "undefined" ? "1.3.441" : "unknown";
|
|
535963
536272
|
const installationPath = await getInstallationPath();
|
|
535964
536273
|
const invokedBinary = getInvokedBinary();
|
|
535965
536274
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -536754,8 +537063,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
536754
537063
|
const maxVersion = await getMaxVersion();
|
|
536755
537064
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
536756
537065
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
536757
|
-
if (gte("1.3.
|
|
536758
|
-
logForDebugging(`Native installer: current version ${"1.3.
|
|
537066
|
+
if (gte("1.3.441", maxVersion)) {
|
|
537067
|
+
logForDebugging(`Native installer: current version ${"1.3.441"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
536759
537068
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
536760
537069
|
latency_ms: Date.now() - startTime,
|
|
536761
537070
|
max_version: maxVersion,
|
|
@@ -536766,7 +537075,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
536766
537075
|
version2 = maxVersion;
|
|
536767
537076
|
}
|
|
536768
537077
|
}
|
|
536769
|
-
if (!forceReinstall && version2 === "1.3.
|
|
537078
|
+
if (!forceReinstall && version2 === "1.3.441" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
|
|
536770
537079
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
536771
537080
|
logEvent("tengu_native_update_complete", {
|
|
536772
537081
|
latency_ms: Date.now() - startTime,
|
|
@@ -537962,7 +538271,7 @@ function buildPrimarySection() {
|
|
|
537962
538271
|
}, undefined, false, undefined, this);
|
|
537963
538272
|
return [{
|
|
537964
538273
|
label: "Version",
|
|
537965
|
-
value: "1.3.
|
|
538274
|
+
value: "1.3.441"
|
|
537966
538275
|
}, {
|
|
537967
538276
|
label: "Session name",
|
|
537968
538277
|
value: nameValue
|
|
@@ -541653,7 +541962,7 @@ function Config({
|
|
|
541653
541962
|
}
|
|
541654
541963
|
}, undefined, false, undefined, this)
|
|
541655
541964
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime170.jsxDEV(ChannelDowngradeDialog, {
|
|
541656
|
-
currentVersion: "1.3.
|
|
541965
|
+
currentVersion: "1.3.441",
|
|
541657
541966
|
onChoice: (choice) => {
|
|
541658
541967
|
setShowSubmenu(null);
|
|
541659
541968
|
setTabsHidden(false);
|
|
@@ -541665,7 +541974,7 @@ function Config({
|
|
|
541665
541974
|
autoUpdatesChannel: "stable"
|
|
541666
541975
|
};
|
|
541667
541976
|
if (choice === "stay") {
|
|
541668
|
-
newSettings.minimumVersion = "1.3.
|
|
541977
|
+
newSettings.minimumVersion = "1.3.441";
|
|
541669
541978
|
}
|
|
541670
541979
|
updateSettingsForSource("userSettings", newSettings);
|
|
541671
541980
|
setSettingsData((prev_27) => ({
|
|
@@ -544492,14 +544801,14 @@ function computeTurnStats(turn) {
|
|
|
544492
544801
|
};
|
|
544493
544802
|
}
|
|
544494
544803
|
function useTurnDiffs(messages) {
|
|
544495
|
-
const
|
|
544804
|
+
const cache8 = import_react108.useRef({
|
|
544496
544805
|
completedTurns: [],
|
|
544497
544806
|
currentTurn: null,
|
|
544498
544807
|
lastProcessedIndex: 0,
|
|
544499
544808
|
lastTurnIndex: 0
|
|
544500
544809
|
});
|
|
544501
544810
|
return import_react108.useMemo(() => {
|
|
544502
|
-
const c4 =
|
|
544811
|
+
const c4 = cache8.current;
|
|
544503
544812
|
if (messages.length < c4.lastProcessedIndex) {
|
|
544504
544813
|
c4.completedTurns = [];
|
|
544505
544814
|
c4.currentTurn = null;
|
|
@@ -549727,7 +550036,7 @@ function HelpV2(t0) {
|
|
|
549727
550036
|
let t6;
|
|
549728
550037
|
if ($3[31] !== tabs) {
|
|
549729
550038
|
t6 = /* @__PURE__ */ jsx_dev_runtime197.jsxDEV(Tabs, {
|
|
549730
|
-
title: `Rayu-CLI v${"1.3.
|
|
550039
|
+
title: `Rayu-CLI v${"1.3.441"}`,
|
|
549731
550040
|
color: "professionalBlue",
|
|
549732
550041
|
defaultTab: "general",
|
|
549733
550042
|
children: tabs
|
|
@@ -555649,21 +555958,21 @@ async function loadInstallCountsCache() {
|
|
|
555649
555958
|
logForDebugging("Install counts cache has invalid structure");
|
|
555650
555959
|
return null;
|
|
555651
555960
|
}
|
|
555652
|
-
const
|
|
555653
|
-
if (
|
|
555654
|
-
logForDebugging(`Install counts cache version mismatch (got ${
|
|
555961
|
+
const cache8 = parsed;
|
|
555962
|
+
if (cache8.version !== INSTALL_COUNTS_CACHE_VERSION) {
|
|
555963
|
+
logForDebugging(`Install counts cache version mismatch (got ${cache8.version}, expected ${INSTALL_COUNTS_CACHE_VERSION})`);
|
|
555655
555964
|
return null;
|
|
555656
555965
|
}
|
|
555657
|
-
if (typeof
|
|
555966
|
+
if (typeof cache8.fetchedAt !== "string" || !Array.isArray(cache8.counts)) {
|
|
555658
555967
|
logForDebugging("Install counts cache has invalid structure");
|
|
555659
555968
|
return null;
|
|
555660
555969
|
}
|
|
555661
|
-
const fetchedAt = new Date(
|
|
555970
|
+
const fetchedAt = new Date(cache8.fetchedAt).getTime();
|
|
555662
555971
|
if (Number.isNaN(fetchedAt)) {
|
|
555663
555972
|
logForDebugging("Install counts cache has invalid fetchedAt timestamp");
|
|
555664
555973
|
return null;
|
|
555665
555974
|
}
|
|
555666
|
-
const validCounts =
|
|
555975
|
+
const validCounts = cache8.counts.every((entry) => typeof entry === "object" && entry !== null && typeof entry.plugin === "string" && typeof entry.unique_installs === "number");
|
|
555667
555976
|
if (!validCounts) {
|
|
555668
555977
|
logForDebugging("Install counts cache has malformed entries");
|
|
555669
555978
|
return null;
|
|
@@ -555674,9 +555983,9 @@ async function loadInstallCountsCache() {
|
|
|
555674
555983
|
return null;
|
|
555675
555984
|
}
|
|
555676
555985
|
return {
|
|
555677
|
-
version:
|
|
555678
|
-
fetchedAt:
|
|
555679
|
-
counts:
|
|
555986
|
+
version: cache8.version,
|
|
555987
|
+
fetchedAt: cache8.fetchedAt,
|
|
555988
|
+
counts: cache8.counts
|
|
555680
555989
|
};
|
|
555681
555990
|
} catch (error54) {
|
|
555682
555991
|
const code = getErrnoCode(error54);
|
|
@@ -555686,13 +555995,13 @@ async function loadInstallCountsCache() {
|
|
|
555686
555995
|
return null;
|
|
555687
555996
|
}
|
|
555688
555997
|
}
|
|
555689
|
-
async function saveInstallCountsCache(
|
|
555998
|
+
async function saveInstallCountsCache(cache8) {
|
|
555690
555999
|
const cachePath = getInstallCountsCachePath();
|
|
555691
556000
|
const tempPath = `${cachePath}.${randomBytes15(8).toString("hex")}.tmp`;
|
|
555692
556001
|
try {
|
|
555693
556002
|
const pluginsDir = getPluginsDirectory();
|
|
555694
556003
|
await getFsImplementation().mkdir(pluginsDir);
|
|
555695
|
-
const content = jsonStringify(
|
|
556004
|
+
const content = jsonStringify(cache8, null, 2);
|
|
555696
556005
|
await writeFile38(tempPath, content, {
|
|
555697
556006
|
encoding: "utf-8",
|
|
555698
556007
|
mode: 384
|
|
@@ -555724,12 +556033,12 @@ async function fetchInstallCountsFromGitHub() {
|
|
|
555724
556033
|
}
|
|
555725
556034
|
}
|
|
555726
556035
|
async function getInstallCounts() {
|
|
555727
|
-
const
|
|
555728
|
-
if (
|
|
556036
|
+
const cache8 = await loadInstallCountsCache();
|
|
556037
|
+
if (cache8) {
|
|
555729
556038
|
logForDebugging("Using cached install counts");
|
|
555730
556039
|
logPluginFetch("install_counts", INSTALL_COUNTS_URL, "cache_hit", 0);
|
|
555731
556040
|
const map4 = new Map;
|
|
555732
|
-
for (const entry of
|
|
556041
|
+
for (const entry of cache8.counts) {
|
|
555733
556042
|
map4.set(entry.plugin, entry.unique_installs);
|
|
555734
556043
|
}
|
|
555735
556044
|
return map4;
|
|
@@ -560142,7 +560451,7 @@ async function writeToDisk(plugins) {
|
|
|
560142
560451
|
mode: 384
|
|
560143
560452
|
});
|
|
560144
560453
|
await rename11(tempPath, filePath);
|
|
560145
|
-
|
|
560454
|
+
cache8 = plugins;
|
|
560146
560455
|
} catch (error54) {
|
|
560147
560456
|
logError2(error54);
|
|
560148
560457
|
try {
|
|
@@ -560160,20 +560469,20 @@ async function loadFlaggedPlugins() {
|
|
|
560160
560469
|
changed = true;
|
|
560161
560470
|
}
|
|
560162
560471
|
}
|
|
560163
|
-
|
|
560472
|
+
cache8 = all4;
|
|
560164
560473
|
if (changed) {
|
|
560165
560474
|
await writeToDisk(all4);
|
|
560166
560475
|
}
|
|
560167
560476
|
}
|
|
560168
560477
|
function getFlaggedPlugins() {
|
|
560169
|
-
return
|
|
560478
|
+
return cache8 ?? {};
|
|
560170
560479
|
}
|
|
560171
560480
|
async function addFlaggedPlugin(pluginId) {
|
|
560172
|
-
if (
|
|
560173
|
-
|
|
560481
|
+
if (cache8 === null) {
|
|
560482
|
+
cache8 = await readFromDisk();
|
|
560174
560483
|
}
|
|
560175
560484
|
const updated = {
|
|
560176
|
-
...
|
|
560485
|
+
...cache8,
|
|
560177
560486
|
[pluginId]: {
|
|
560178
560487
|
flaggedAt: new Date().toISOString()
|
|
560179
560488
|
}
|
|
@@ -560182,12 +560491,12 @@ async function addFlaggedPlugin(pluginId) {
|
|
|
560182
560491
|
logForDebugging(`Flagged plugin: ${pluginId}`);
|
|
560183
560492
|
}
|
|
560184
560493
|
async function markFlaggedPluginsSeen(pluginIds) {
|
|
560185
|
-
if (
|
|
560186
|
-
|
|
560494
|
+
if (cache8 === null) {
|
|
560495
|
+
cache8 = await readFromDisk();
|
|
560187
560496
|
}
|
|
560188
560497
|
const now2 = new Date().toISOString();
|
|
560189
560498
|
let changed = false;
|
|
560190
|
-
const updated = { ...
|
|
560499
|
+
const updated = { ...cache8 };
|
|
560191
560500
|
for (const id of pluginIds) {
|
|
560192
560501
|
const entry = updated[id];
|
|
560193
560502
|
if (entry && !entry.seenAt) {
|
|
@@ -560200,16 +560509,16 @@ async function markFlaggedPluginsSeen(pluginIds) {
|
|
|
560200
560509
|
}
|
|
560201
560510
|
}
|
|
560202
560511
|
async function removeFlaggedPlugin(pluginId) {
|
|
560203
|
-
if (
|
|
560204
|
-
|
|
560512
|
+
if (cache8 === null) {
|
|
560513
|
+
cache8 = await readFromDisk();
|
|
560205
560514
|
}
|
|
560206
|
-
if (!(pluginId in
|
|
560515
|
+
if (!(pluginId in cache8))
|
|
560207
560516
|
return;
|
|
560208
|
-
const { [pluginId]: _2, ...rest } =
|
|
560209
|
-
|
|
560517
|
+
const { [pluginId]: _2, ...rest } = cache8;
|
|
560518
|
+
cache8 = rest;
|
|
560210
560519
|
await writeToDisk(rest);
|
|
560211
560520
|
}
|
|
560212
|
-
var FLAGGED_PLUGINS_FILENAME = "flagged-plugins.json", SEEN_EXPIRY_MS,
|
|
560521
|
+
var FLAGGED_PLUGINS_FILENAME = "flagged-plugins.json", SEEN_EXPIRY_MS, cache8 = null;
|
|
560213
560522
|
var init_pluginFlagging = __esm(() => {
|
|
560214
560523
|
init_debug();
|
|
560215
560524
|
init_fsOperations();
|
|
@@ -569814,7 +570123,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
|
|
|
569814
570123
|
}
|
|
569815
570124
|
return [];
|
|
569816
570125
|
}
|
|
569817
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.
|
|
570126
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.441") {
|
|
569818
570127
|
if (false) {}
|
|
569819
570128
|
const cachedChangelog = await getStoredChangelog();
|
|
569820
570129
|
if (lastSeenVersion !== currentVersion || !cachedChangelog) {
|
|
@@ -569827,7 +570136,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.3.440")
|
|
|
569827
570136
|
releaseNotes
|
|
569828
570137
|
};
|
|
569829
570138
|
}
|
|
569830
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.3.
|
|
570139
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.3.441") {
|
|
569831
570140
|
if (false) {}
|
|
569832
570141
|
const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
|
|
569833
570142
|
return {
|
|
@@ -569955,7 +570264,7 @@ function getRecentActivitySync() {
|
|
|
569955
570264
|
return cachedActivity;
|
|
569956
570265
|
}
|
|
569957
570266
|
function getLogoDisplayData() {
|
|
569958
|
-
const version2 = process.env.DEMO_VERSION ?? "1.3.
|
|
570267
|
+
const version2 = process.env.DEMO_VERSION ?? "1.3.441";
|
|
569959
570268
|
const serverUrl = getDirectConnectServerUrl();
|
|
569960
570269
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
569961
570270
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -571202,7 +571511,7 @@ function LogoV2() {
|
|
|
571202
571511
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
571203
571512
|
t2 = () => {
|
|
571204
571513
|
const currentConfig = getGlobalConfig();
|
|
571205
|
-
if (currentConfig.lastReleaseNotesSeen === "1.3.
|
|
571514
|
+
if (currentConfig.lastReleaseNotesSeen === "1.3.441") {
|
|
571206
571515
|
return;
|
|
571207
571516
|
}
|
|
571208
571517
|
saveGlobalConfig(_temp327);
|
|
@@ -571680,7 +571989,7 @@ function LogoV2() {
|
|
|
571680
571989
|
t24 = $3[61];
|
|
571681
571990
|
}
|
|
571682
571991
|
const _latestNpm = getCachedLatestNpmVersionSync();
|
|
571683
|
-
const _updateFeeds = _latestNpm && gt(_latestNpm, "1.3.
|
|
571992
|
+
const _updateFeeds = _latestNpm && gt(_latestNpm, "1.3.441") ? [createUpdateAvailableFeed("1.3.441", _latestNpm)] : [];
|
|
571684
571993
|
const t25 = layoutMode === "horizontal" && /* @__PURE__ */ jsx_dev_runtime239.jsxDEV(FeedColumn, {
|
|
571685
571994
|
feeds: showOnboarding ? [createProjectOnboardingFeed(getSteps()), createRecentActivityFeed(activities)] : showGuestPassesUpsell ? [createRecentActivityFeed(activities), createGuestPassesFeed()] : showOverageCreditUpsell ? [createRecentActivityFeed(activities), createOverageCreditFeed()] : [createRecentActivityFeed(activities), ..._updateFeeds, createWhatsNewFeed(changelog)],
|
|
571686
571995
|
maxWidth: rightWidth
|
|
@@ -571880,12 +572189,12 @@ function LogoV2() {
|
|
|
571880
572189
|
return t41;
|
|
571881
572190
|
}
|
|
571882
572191
|
function _temp327(current) {
|
|
571883
|
-
if (current.lastReleaseNotesSeen === "1.3.
|
|
572192
|
+
if (current.lastReleaseNotesSeen === "1.3.441") {
|
|
571884
572193
|
return current;
|
|
571885
572194
|
}
|
|
571886
572195
|
return {
|
|
571887
572196
|
...current,
|
|
571888
|
-
lastReleaseNotesSeen: "1.3.
|
|
572197
|
+
lastReleaseNotesSeen: "1.3.441"
|
|
571889
572198
|
};
|
|
571890
572199
|
}
|
|
571891
572200
|
function _temp241(s_0) {
|
|
@@ -574494,6 +574803,7 @@ function shouldRenderStatically(message, streamingToolUseIDs, inProgressToolUseI
|
|
|
574494
574803
|
return false;
|
|
574495
574804
|
}
|
|
574496
574805
|
}
|
|
574806
|
+
return false;
|
|
574497
574807
|
}
|
|
574498
574808
|
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
574809
|
messages,
|
|
@@ -574794,10 +575104,11 @@ var import_compiler_runtime186, React76, import_react148, jsx_dev_runtime248, Lo
|
|
|
574794
575104
|
thinking: streamingThinking.thinking
|
|
574795
575105
|
},
|
|
574796
575106
|
addMargin: false,
|
|
574797
|
-
isTranscriptMode
|
|
575107
|
+
isTranscriptMode,
|
|
574798
575108
|
verbose,
|
|
574799
575109
|
hideInTranscript: false,
|
|
574800
|
-
isThinking: streamingThinking.isStreaming
|
|
575110
|
+
isThinking: streamingThinking.isStreaming,
|
|
575111
|
+
liveStreamingPreview: true
|
|
574801
575112
|
}, undefined, false, undefined, this)
|
|
574802
575113
|
}, undefined, false, undefined, this),
|
|
574803
575114
|
streamingText && !isBriefOnly && /* @__PURE__ */ jsx_dev_runtime248.jsxDEV(ThemedBox_default, {
|
|
@@ -596792,7 +597103,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
596792
597103
|
smapsRollup,
|
|
596793
597104
|
platform: process.platform,
|
|
596794
597105
|
nodeVersion: process.version,
|
|
596795
|
-
ccVersion: "1.3.
|
|
597106
|
+
ccVersion: "1.3.441"
|
|
596796
597107
|
};
|
|
596797
597108
|
}
|
|
596798
597109
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -597314,7 +597625,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
597314
597625
|
var call49 = async () => {
|
|
597315
597626
|
return {
|
|
597316
597627
|
type: "text",
|
|
597317
|
-
value: "1.3.
|
|
597628
|
+
value: "1.3.441"
|
|
597318
597629
|
};
|
|
597319
597630
|
}, version2, version_default;
|
|
597320
597631
|
var init_version = __esm(() => {
|
|
@@ -598771,10 +599082,12 @@ async function call53() {
|
|
|
598771
599082
|
}
|
|
598772
599083
|
clearRayuSession();
|
|
598773
599084
|
clearRayuEntitlements();
|
|
599085
|
+
clearFeatureUsage();
|
|
598774
599086
|
return { type: "text", value: "Signed out of Rayu." };
|
|
598775
599087
|
}
|
|
598776
599088
|
var init_logout = __esm(() => {
|
|
598777
599089
|
init_rayuEntitlements();
|
|
599090
|
+
init_rayuFeatureUsage();
|
|
598778
599091
|
init_rayuSession();
|
|
598779
599092
|
});
|
|
598780
599093
|
|
|
@@ -598819,12 +599132,12 @@ function fmtReset(seconds) {
|
|
|
598819
599132
|
return `${h3}h ${m3}m`;
|
|
598820
599133
|
return `${m3}m`;
|
|
598821
599134
|
}
|
|
598822
|
-
function
|
|
599135
|
+
function usd2(cents) {
|
|
598823
599136
|
return `$${(cents / 100).toFixed(cents % 100 === 0 ? 0 : 2)}`;
|
|
598824
599137
|
}
|
|
598825
599138
|
function formatRayuUsageSummary(c4) {
|
|
598826
599139
|
const lines2 = [];
|
|
598827
|
-
const price = c4.priceCents > 0 ? ` (${
|
|
599140
|
+
const price = c4.priceCents > 0 ? ` (${usd2(c4.priceCents)}/mo)` : "";
|
|
598828
599141
|
lines2.push(`Plan: ${c4.planName || c4.plan}${price}`);
|
|
598829
599142
|
if (c4.periodEnd) {
|
|
598830
599143
|
lines2.push(`Renews: ${new Date(c4.periodEnd).toLocaleDateString()}`);
|
|
@@ -601564,11 +601877,18 @@ function InstallSkillFlow({
|
|
|
601564
601877
|
let cancelled = false;
|
|
601565
601878
|
(async () => {
|
|
601566
601879
|
try {
|
|
601567
|
-
const
|
|
601880
|
+
const skills3 = await installSkillFromSource(source, { overwrite });
|
|
601568
601881
|
if (cancelled)
|
|
601569
601882
|
return;
|
|
601570
|
-
setState({ status: "done",
|
|
601571
|
-
|
|
601883
|
+
setState({ status: "done", skills: skills3 });
|
|
601884
|
+
const replaced = skills3.filter((s2) => s2.replaced).map((s2) => s2.name);
|
|
601885
|
+
const fresh = skills3.filter((s2) => !s2.replaced).map((s2) => s2.name);
|
|
601886
|
+
const parts = [];
|
|
601887
|
+
if (fresh.length)
|
|
601888
|
+
parts.push(`installed ${fresh.join(", ")}`);
|
|
601889
|
+
if (replaced.length)
|
|
601890
|
+
parts.push(`overwrote already-installed ${replaced.join(", ")}`);
|
|
601891
|
+
onDone(`Skill install complete — ${parts.join("; ")}.`);
|
|
601572
601892
|
} catch (e2) {
|
|
601573
601893
|
if (cancelled)
|
|
601574
601894
|
return;
|
|
@@ -601611,39 +601931,54 @@ function InstallSkillFlow({
|
|
|
601611
601931
|
}, undefined, true, undefined, this)
|
|
601612
601932
|
}, undefined, false, undefined, this);
|
|
601613
601933
|
}
|
|
601934
|
+
const { skills: skills2 } = state;
|
|
601935
|
+
const replacedCount = skills2.filter((s2) => s2.replaced).length;
|
|
601614
601936
|
return /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedBox_default, {
|
|
601615
601937
|
flexDirection: "column",
|
|
601616
601938
|
paddingLeft: 1,
|
|
601617
601939
|
children: [
|
|
601618
601940
|
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601619
601941
|
color: "green",
|
|
601620
|
-
children: "Installed skill: "
|
|
601621
|
-
}, undefined, false, undefined, this),
|
|
601622
|
-
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601623
|
-
bold: true,
|
|
601624
601942
|
children: [
|
|
601625
|
-
"
|
|
601626
|
-
|
|
601943
|
+
"Installed ",
|
|
601944
|
+
skills2.length,
|
|
601945
|
+
" skill",
|
|
601946
|
+
skills2.length === 1 ? "" : "s",
|
|
601947
|
+
replacedCount > 0 ? ` (${replacedCount} already existed and ${replacedCount === 1 ? "was" : "were"} overwritten)` : "",
|
|
601948
|
+
":"
|
|
601627
601949
|
]
|
|
601628
601950
|
}, undefined, true, undefined, this),
|
|
601629
|
-
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(
|
|
601630
|
-
|
|
601631
|
-
|
|
601632
|
-
}, undefined, false, undefined, this),
|
|
601633
|
-
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601634
|
-
dimColor: true,
|
|
601951
|
+
skills2.map((s2) => /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedBox_default, {
|
|
601952
|
+
flexDirection: "column",
|
|
601953
|
+
marginTop: 1,
|
|
601635
601954
|
children: [
|
|
601636
|
-
|
|
601637
|
-
|
|
601955
|
+
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601956
|
+
bold: true,
|
|
601957
|
+
children: [
|
|
601958
|
+
"/",
|
|
601959
|
+
s2.name,
|
|
601960
|
+
s2.replaced ? /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601961
|
+
color: "yellow",
|
|
601962
|
+
children: " (overwritten)"
|
|
601963
|
+
}, undefined, false, undefined, this) : null
|
|
601964
|
+
]
|
|
601965
|
+
}, undefined, true, undefined, this),
|
|
601966
|
+
s2.description ? /* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601967
|
+
dimColor: true,
|
|
601968
|
+
children: s2.description
|
|
601969
|
+
}, undefined, false, undefined, this) : null,
|
|
601970
|
+
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601971
|
+
dimColor: true,
|
|
601972
|
+
children: [
|
|
601973
|
+
"Location: ",
|
|
601974
|
+
s2.path
|
|
601975
|
+
]
|
|
601976
|
+
}, undefined, true, undefined, this)
|
|
601638
601977
|
]
|
|
601639
|
-
},
|
|
601978
|
+
}, s2.name, true, undefined, this)),
|
|
601640
601979
|
/* @__PURE__ */ jsx_dev_runtime329.jsxDEV(ThemedText, {
|
|
601641
|
-
children: [
|
|
601642
|
-
|
|
601643
|
-
state.skill.name,
|
|
601644
|
-
" or via the Skill tool."
|
|
601645
|
-
]
|
|
601646
|
-
}, undefined, true, undefined, this)
|
|
601980
|
+
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."
|
|
601981
|
+
}, undefined, false, undefined, this)
|
|
601647
601982
|
]
|
|
601648
601983
|
}, undefined, true, undefined, this);
|
|
601649
601984
|
}
|
|
@@ -603078,7 +603413,7 @@ async function loadStatsCache() {
|
|
|
603078
603413
|
return getEmptyCache();
|
|
603079
603414
|
}
|
|
603080
603415
|
}
|
|
603081
|
-
async function saveStatsCache(
|
|
603416
|
+
async function saveStatsCache(cache9) {
|
|
603082
603417
|
const fs15 = getFsImplementation();
|
|
603083
603418
|
const cachePath = getStatsCachePath();
|
|
603084
603419
|
const tempPath = `${cachePath}.${randomBytes18(8).toString("hex")}.tmp`;
|
|
@@ -603087,7 +603422,7 @@ async function saveStatsCache(cache7) {
|
|
|
603087
603422
|
try {
|
|
603088
603423
|
await fs15.mkdir(configDir);
|
|
603089
603424
|
} catch {}
|
|
603090
|
-
const content = jsonStringify(
|
|
603425
|
+
const content = jsonStringify(cache9, null, 2);
|
|
603091
603426
|
const handle = await open15(tempPath, "w", 384);
|
|
603092
603427
|
try {
|
|
603093
603428
|
await handle.writeFile(content, { encoding: "utf-8" });
|
|
@@ -603096,7 +603431,7 @@ async function saveStatsCache(cache7) {
|
|
|
603096
603431
|
await handle.close();
|
|
603097
603432
|
}
|
|
603098
603433
|
await fs15.rename(tempPath, cachePath);
|
|
603099
|
-
logForDebugging(`Stats cache saved successfully (lastComputedDate: ${
|
|
603434
|
+
logForDebugging(`Stats cache saved successfully (lastComputedDate: ${cache9.lastComputedDate})`);
|
|
603100
603435
|
} catch (error54) {
|
|
603101
603436
|
logError2(error54);
|
|
603102
603437
|
try {
|
|
@@ -603955,9 +604290,9 @@ async function getAllSessionFiles() {
|
|
|
603955
604290
|
}));
|
|
603956
604291
|
return projectResults.flat();
|
|
603957
604292
|
}
|
|
603958
|
-
function cacheToStats(
|
|
604293
|
+
function cacheToStats(cache9, todayStats) {
|
|
603959
604294
|
const dailyActivityMap = new Map;
|
|
603960
|
-
for (const day of
|
|
604295
|
+
for (const day of cache9.dailyActivity) {
|
|
603961
604296
|
dailyActivityMap.set(day.date, { ...day });
|
|
603962
604297
|
}
|
|
603963
604298
|
if (todayStats) {
|
|
@@ -603973,7 +604308,7 @@ function cacheToStats(cache7, todayStats) {
|
|
|
603973
604308
|
}
|
|
603974
604309
|
}
|
|
603975
604310
|
const dailyModelTokensMap = new Map;
|
|
603976
|
-
for (const day of
|
|
604311
|
+
for (const day of cache9.dailyModelTokens) {
|
|
603977
604312
|
dailyModelTokensMap.set(day.date, { ...day.tokensByModel });
|
|
603978
604313
|
}
|
|
603979
604314
|
if (todayStats) {
|
|
@@ -603988,7 +604323,7 @@ function cacheToStats(cache7, todayStats) {
|
|
|
603988
604323
|
}
|
|
603989
604324
|
}
|
|
603990
604325
|
}
|
|
603991
|
-
const modelUsage = { ...
|
|
604326
|
+
const modelUsage = { ...cache9.modelUsage };
|
|
603992
604327
|
if (todayStats) {
|
|
603993
604328
|
for (const [model, usage2] of Object.entries(todayStats.modelUsage)) {
|
|
603994
604329
|
if (modelUsage[model]) {
|
|
@@ -604008,7 +604343,7 @@ function cacheToStats(cache7, todayStats) {
|
|
|
604008
604343
|
}
|
|
604009
604344
|
}
|
|
604010
604345
|
const hourCountsMap = new Map;
|
|
604011
|
-
for (const [hour, count4] of Object.entries(
|
|
604346
|
+
for (const [hour, count4] of Object.entries(cache9.hourCounts)) {
|
|
604012
604347
|
hourCountsMap.set(parseInt(hour, 10), count4);
|
|
604013
604348
|
}
|
|
604014
604349
|
if (todayStats) {
|
|
@@ -604020,9 +604355,9 @@ function cacheToStats(cache7, todayStats) {
|
|
|
604020
604355
|
const dailyActivityArray = Array.from(dailyActivityMap.values()).sort((a2, b3) => a2.date.localeCompare(b3.date));
|
|
604021
604356
|
const streaks = calculateStreaks(dailyActivityArray);
|
|
604022
604357
|
const dailyModelTokens = Array.from(dailyModelTokensMap.entries()).map(([date6, tokensByModel]) => ({ date: date6, tokensByModel })).sort((a2, b3) => a2.date.localeCompare(b3.date));
|
|
604023
|
-
const totalSessions =
|
|
604024
|
-
const totalMessages =
|
|
604025
|
-
let longestSession =
|
|
604358
|
+
const totalSessions = cache9.totalSessions + (todayStats?.sessionStats.length || 0);
|
|
604359
|
+
const totalMessages = cache9.totalMessages + (todayStats?.totalMessages || 0);
|
|
604360
|
+
let longestSession = cache9.longestSession;
|
|
604026
604361
|
if (todayStats) {
|
|
604027
604362
|
for (const session2 of todayStats.sessionStats) {
|
|
604028
604363
|
if (!longestSession || session2.duration > longestSession.duration) {
|
|
@@ -604030,7 +604365,7 @@ function cacheToStats(cache7, todayStats) {
|
|
|
604030
604365
|
}
|
|
604031
604366
|
}
|
|
604032
604367
|
}
|
|
604033
|
-
let firstSessionDate =
|
|
604368
|
+
let firstSessionDate = cache9.firstSessionDate;
|
|
604034
604369
|
let lastSessionDate = null;
|
|
604035
604370
|
if (todayStats) {
|
|
604036
604371
|
for (const session2 of todayStats.sessionStats) {
|
|
@@ -604048,7 +604383,7 @@ function cacheToStats(cache7, todayStats) {
|
|
|
604048
604383
|
const peakActivityDay = dailyActivityArray.length > 0 ? dailyActivityArray.reduce((max2, d2) => d2.messageCount > max2.messageCount ? d2 : max2).date : null;
|
|
604049
604384
|
const peakActivityHour = hourCountsMap.size > 0 ? Array.from(hourCountsMap.entries()).reduce((max2, [hour, count4]) => count4 > max2[1] ? [hour, count4] : max2)[0] : null;
|
|
604050
604385
|
const totalDays = firstSessionDate && lastSessionDate ? Math.ceil((new Date(lastSessionDate).getTime() - new Date(firstSessionDate).getTime()) / (1000 * 60 * 60 * 24)) + 1 : 0;
|
|
604051
|
-
const totalSpeculationTimeSavedMs =
|
|
604386
|
+
const totalSpeculationTimeSavedMs = cache9.totalSpeculationTimeSavedMs + (todayStats?.totalSpeculationTimeSavedMs || 0);
|
|
604052
604387
|
const result = {
|
|
604053
604388
|
totalSessions,
|
|
604054
604389
|
totalMessages,
|
|
@@ -604074,30 +604409,30 @@ async function aggregateClaudeCodeStats() {
|
|
|
604074
604409
|
return getEmptyStats();
|
|
604075
604410
|
}
|
|
604076
604411
|
const updatedCache = await withStatsCacheLock(async () => {
|
|
604077
|
-
const
|
|
604412
|
+
const cache9 = await loadStatsCache();
|
|
604078
604413
|
const yesterday = getYesterdayDateString();
|
|
604079
|
-
let result =
|
|
604080
|
-
if (!
|
|
604414
|
+
let result = cache9;
|
|
604415
|
+
if (!cache9.lastComputedDate) {
|
|
604081
604416
|
logForDebugging("Stats cache empty, processing all historical data");
|
|
604082
604417
|
const historicalStats = await processSessionFiles(allSessionFiles, {
|
|
604083
604418
|
toDate: yesterday
|
|
604084
604419
|
});
|
|
604085
604420
|
if (historicalStats.sessionStats.length > 0 || historicalStats.dailyActivity.length > 0) {
|
|
604086
|
-
result = mergeCacheWithNewStats(
|
|
604421
|
+
result = mergeCacheWithNewStats(cache9, historicalStats, yesterday);
|
|
604087
604422
|
await saveStatsCache(result);
|
|
604088
604423
|
}
|
|
604089
|
-
} else if (isDateBefore(
|
|
604090
|
-
const nextDay = getNextDay(
|
|
604091
|
-
logForDebugging(`Stats cache stale (${
|
|
604424
|
+
} else if (isDateBefore(cache9.lastComputedDate, yesterday)) {
|
|
604425
|
+
const nextDay = getNextDay(cache9.lastComputedDate);
|
|
604426
|
+
logForDebugging(`Stats cache stale (${cache9.lastComputedDate}), processing ${nextDay} to ${yesterday}`);
|
|
604092
604427
|
const newStats = await processSessionFiles(allSessionFiles, {
|
|
604093
604428
|
fromDate: nextDay,
|
|
604094
604429
|
toDate: yesterday
|
|
604095
604430
|
});
|
|
604096
604431
|
if (newStats.sessionStats.length > 0 || newStats.dailyActivity.length > 0) {
|
|
604097
|
-
result = mergeCacheWithNewStats(
|
|
604432
|
+
result = mergeCacheWithNewStats(cache9, newStats, yesterday);
|
|
604098
604433
|
await saveStatsCache(result);
|
|
604099
604434
|
} else {
|
|
604100
|
-
result = { ...
|
|
604435
|
+
result = { ...cache9, lastComputedDate: yesterday };
|
|
604101
604436
|
await saveStatsCache(result);
|
|
604102
604437
|
}
|
|
604103
604438
|
}
|
|
@@ -607243,7 +607578,7 @@ function generateHtmlReport(data, insights) {
|
|
|
607243
607578
|
</html>`;
|
|
607244
607579
|
}
|
|
607245
607580
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
607246
|
-
const version3 = typeof MACRO !== "undefined" ? "1.3.
|
|
607581
|
+
const version3 = typeof MACRO !== "undefined" ? "1.3.441" : "unknown";
|
|
607247
607582
|
const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
|
|
607248
607583
|
const facets_summary = {
|
|
607249
607584
|
total: facets.size,
|
|
@@ -611153,7 +611488,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
611153
611488
|
init_settings2();
|
|
611154
611489
|
init_slowOperations();
|
|
611155
611490
|
init_uuid();
|
|
611156
|
-
VERSION6 = typeof MACRO !== "undefined" ? "1.3.
|
|
611491
|
+
VERSION6 = typeof MACRO !== "undefined" ? "1.3.441" : "unknown";
|
|
611157
611492
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
611158
611493
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
611159
611494
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -612373,7 +612708,7 @@ var init_filesystem = __esm(() => {
|
|
|
612373
612708
|
});
|
|
612374
612709
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
612375
612710
|
const nonce = randomBytes19(16).toString("hex");
|
|
612376
|
-
return join154(getClaudeTempDir(), "bundled-skills", "1.3.
|
|
612711
|
+
return join154(getClaudeTempDir(), "bundled-skills", "1.3.441", nonce);
|
|
612377
612712
|
});
|
|
612378
612713
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
612379
612714
|
});
|
|
@@ -617488,7 +617823,7 @@ __export(exports_update, {
|
|
|
617488
617823
|
import { execFileSync as execFileSync3 } from "node:child_process";
|
|
617489
617824
|
import { homedir as homedir35 } from "os";
|
|
617490
617825
|
async function update() {
|
|
617491
|
-
writeToStdout(`Current version: ${"1.3.
|
|
617826
|
+
writeToStdout(`Current version: ${"1.3.441"}
|
|
617492
617827
|
`);
|
|
617493
617828
|
const isBundled = isInBundledMode();
|
|
617494
617829
|
if (isBundled) {
|
|
@@ -617514,13 +617849,13 @@ Manual check: npm view ${"@rayu-dev/rayu-cli"} version
|
|
|
617514
617849
|
process.exit(1);
|
|
617515
617850
|
return;
|
|
617516
617851
|
}
|
|
617517
|
-
if (latestVersion === "1.3.
|
|
617852
|
+
if (latestVersion === "1.3.441") {
|
|
617518
617853
|
writeToStdout(source_default.green(`
|
|
617519
|
-
Rayu CLI is up to date (${"1.3.
|
|
617854
|
+
Rayu CLI is up to date (${"1.3.441"})
|
|
617520
617855
|
`));
|
|
617521
617856
|
process.exit(0);
|
|
617522
617857
|
}
|
|
617523
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"1.3.
|
|
617858
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"1.3.441"})
|
|
617524
617859
|
`);
|
|
617525
617860
|
writeToStdout(`Installing update...
|
|
617526
617861
|
|
|
@@ -617544,7 +617879,7 @@ Try manually:
|
|
|
617544
617879
|
return;
|
|
617545
617880
|
}
|
|
617546
617881
|
writeToStdout(source_default.green(`
|
|
617547
|
-
Successfully updated from ${"1.3.
|
|
617882
|
+
Successfully updated from ${"1.3.441"} to ${latestVersion}
|
|
617548
617883
|
`));
|
|
617549
617884
|
process.exit(0);
|
|
617550
617885
|
}
|
|
@@ -617558,14 +617893,14 @@ async function updateNativeBinary() {
|
|
|
617558
617893
|
} catch {
|
|
617559
617894
|
latestVersion = "";
|
|
617560
617895
|
}
|
|
617561
|
-
if (latestVersion && latestVersion === "1.3.
|
|
617896
|
+
if (latestVersion && latestVersion === "1.3.441") {
|
|
617562
617897
|
writeToStdout(source_default.green(`
|
|
617563
|
-
Rayu CLI is up to date (1.3.
|
|
617898
|
+
Rayu CLI is up to date (1.3.441)
|
|
617564
617899
|
`));
|
|
617565
617900
|
process.exit(0);
|
|
617566
617901
|
}
|
|
617567
617902
|
if (latestVersion) {
|
|
617568
|
-
writeToStdout(`New version available: ${latestVersion} (current: 1.3.
|
|
617903
|
+
writeToStdout(`New version available: ${latestVersion} (current: 1.3.441)
|
|
617569
617904
|
`);
|
|
617570
617905
|
}
|
|
617571
617906
|
writeToStdout(`Downloading and installing update...
|
|
@@ -617580,13 +617915,13 @@ Rayu CLI is up to date (1.3.440)
|
|
|
617580
617915
|
return;
|
|
617581
617916
|
}
|
|
617582
617917
|
writeToStdout(source_default.green(`
|
|
617583
|
-
Rayu CLI is up to date (1.3.
|
|
617918
|
+
Rayu CLI is up to date (1.3.441)
|
|
617584
617919
|
`));
|
|
617585
617920
|
process.exit(0);
|
|
617586
617921
|
}
|
|
617587
617922
|
const updatedTo = result.latestVersion ?? latestVersion ?? "latest";
|
|
617588
617923
|
writeToStdout(source_default.green(`
|
|
617589
|
-
Successfully updated from 1.3.
|
|
617924
|
+
Successfully updated from 1.3.441 to ${updatedTo}
|
|
617590
617925
|
`));
|
|
617591
617926
|
writeToStdout(`Restart your terminal to use the new version.
|
|
617592
617927
|
`);
|
|
@@ -617617,7 +617952,7 @@ __export(exports_uninstall, {
|
|
|
617617
617952
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
617618
617953
|
import { homedir as homedir36 } from "os";
|
|
617619
617954
|
async function uninstall() {
|
|
617620
|
-
writeToStdout(`Uninstalling Rayu CLI (${"1.3.
|
|
617955
|
+
writeToStdout(`Uninstalling Rayu CLI (${"1.3.441"})...
|
|
617621
617956
|
`);
|
|
617622
617957
|
writeToStdout(`Running: npm uninstall -g ${"@rayu-dev/rayu-cli"}
|
|
617623
617958
|
|
|
@@ -617640,7 +617975,7 @@ Try running manually:
|
|
|
617640
617975
|
process.exit(1);
|
|
617641
617976
|
}
|
|
617642
617977
|
writeToStdout(source_default.green(`
|
|
617643
|
-
Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.3.
|
|
617978
|
+
Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.3.441"}
|
|
617644
617979
|
`));
|
|
617645
617980
|
writeToStdout(`Thanks for using Rayu CLI!
|
|
617646
617981
|
`);
|
|
@@ -617692,7 +618027,7 @@ function showFirstRunWelcome() {
|
|
|
617692
618027
|
`);
|
|
617693
618028
|
try {
|
|
617694
618029
|
mkdirSync16(getRayuConfigHomeDir(), { recursive: true });
|
|
617695
|
-
writeFileSync18(markerPath(), "1.3.
|
|
618030
|
+
writeFileSync18(markerPath(), "1.3.441", "utf8");
|
|
617696
618031
|
} catch {}
|
|
617697
618032
|
}
|
|
617698
618033
|
var init_firstRun = __esm(() => {
|
|
@@ -629535,7 +629870,7 @@ async function initializeBetaTracing(resource) {
|
|
|
629535
629870
|
});
|
|
629536
629871
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
629537
629872
|
setLoggerProvider(loggerProvider);
|
|
629538
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.
|
|
629873
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.441");
|
|
629539
629874
|
setEventLogger(eventLogger);
|
|
629540
629875
|
process.on("beforeExit", async () => {
|
|
629541
629876
|
await loggerProvider?.forceFlush();
|
|
@@ -629575,7 +629910,7 @@ async function initializeTelemetry() {
|
|
|
629575
629910
|
const platform4 = getPlatform();
|
|
629576
629911
|
const baseAttributes = {
|
|
629577
629912
|
[import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
|
|
629578
|
-
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "1.3.
|
|
629913
|
+
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "1.3.441"
|
|
629579
629914
|
};
|
|
629580
629915
|
if (platform4 === "wsl") {
|
|
629581
629916
|
const wslVersion = getWslVersion();
|
|
@@ -629620,7 +629955,7 @@ async function initializeTelemetry() {
|
|
|
629620
629955
|
} catch {}
|
|
629621
629956
|
};
|
|
629622
629957
|
registerCleanup(shutdownTelemetry2);
|
|
629623
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "1.3.
|
|
629958
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "1.3.441");
|
|
629624
629959
|
}
|
|
629625
629960
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
629626
629961
|
resource,
|
|
@@ -629640,7 +629975,7 @@ async function initializeTelemetry() {
|
|
|
629640
629975
|
});
|
|
629641
629976
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
629642
629977
|
setLoggerProvider(loggerProvider);
|
|
629643
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.
|
|
629978
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.3.441");
|
|
629644
629979
|
setEventLogger(eventLogger);
|
|
629645
629980
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
629646
629981
|
process.on("beforeExit", async () => {
|
|
@@ -629702,7 +630037,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
629702
630037
|
}
|
|
629703
630038
|
};
|
|
629704
630039
|
registerCleanup(shutdownTelemetry);
|
|
629705
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "1.3.
|
|
630040
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "1.3.441");
|
|
629706
630041
|
}
|
|
629707
630042
|
async function flushTelemetry() {
|
|
629708
630043
|
const meterProvider = getMeterProvider();
|
|
@@ -631215,7 +631550,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
631215
631550
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
631216
631551
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
631217
631552
|
betas: getSdkBetas(),
|
|
631218
|
-
claude_code_version: "1.3.
|
|
631553
|
+
claude_code_version: "1.3.441",
|
|
631219
631554
|
output_style: outputStyle2,
|
|
631220
631555
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
631221
631556
|
skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -647549,7 +647884,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
647549
647884
|
function getSemverPart(version3) {
|
|
647550
647885
|
return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
|
|
647551
647886
|
}
|
|
647552
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.3.
|
|
647887
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.3.441") {
|
|
647553
647888
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react217.useState(() => getSemverPart(initialVersion));
|
|
647554
647889
|
if (!updatedVersion) {
|
|
647555
647890
|
return null;
|
|
@@ -647589,7 +647924,7 @@ function AutoUpdater({
|
|
|
647589
647924
|
return;
|
|
647590
647925
|
}
|
|
647591
647926
|
if (false) {}
|
|
647592
|
-
const currentVersion = "1.3.
|
|
647927
|
+
const currentVersion = "1.3.441";
|
|
647593
647928
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
647594
647929
|
let latestVersion = await getLatestVersion(channel);
|
|
647595
647930
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -647802,12 +648137,12 @@ function NativeAutoUpdater({
|
|
|
647802
648137
|
logEvent("tengu_native_auto_updater_start", {});
|
|
647803
648138
|
try {
|
|
647804
648139
|
const maxVersion = await getMaxVersion();
|
|
647805
|
-
if (maxVersion && gt("1.3.
|
|
648140
|
+
if (maxVersion && gt("1.3.441", maxVersion)) {
|
|
647806
648141
|
const msg = await getMaxVersionMessage();
|
|
647807
648142
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
647808
648143
|
}
|
|
647809
648144
|
const result = await installLatest(channel);
|
|
647810
|
-
const currentVersion = "1.3.
|
|
648145
|
+
const currentVersion = "1.3.441";
|
|
647811
648146
|
const latencyMs = Date.now() - startTime;
|
|
647812
648147
|
if (result.lockFailed) {
|
|
647813
648148
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -647944,17 +648279,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
647944
648279
|
const maxVersion = await getMaxVersion();
|
|
647945
648280
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
647946
648281
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
647947
|
-
if (gte("1.3.
|
|
647948
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.3.
|
|
648282
|
+
if (gte("1.3.441", maxVersion)) {
|
|
648283
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.3.441"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
647949
648284
|
setUpdateAvailable(false);
|
|
647950
648285
|
return;
|
|
647951
648286
|
}
|
|
647952
648287
|
latest = maxVersion;
|
|
647953
648288
|
}
|
|
647954
|
-
const hasUpdate = latest && !gte("1.3.
|
|
648289
|
+
const hasUpdate = latest && !gte("1.3.441", latest) && !shouldSkipVersion(latest);
|
|
647955
648290
|
setUpdateAvailable(!!hasUpdate);
|
|
647956
648291
|
if (hasUpdate) {
|
|
647957
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.3.
|
|
648292
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.3.441"} -> ${latest}`);
|
|
647958
648293
|
}
|
|
647959
648294
|
};
|
|
647960
648295
|
$3[0] = t1;
|
|
@@ -647988,7 +648323,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
647988
648323
|
wrap: "truncate",
|
|
647989
648324
|
children: [
|
|
647990
648325
|
"currentVersion: ",
|
|
647991
|
-
"1.3.
|
|
648326
|
+
"1.3.441"
|
|
647992
648327
|
]
|
|
647993
648328
|
}, undefined, true, undefined, this);
|
|
647994
648329
|
$3[3] = verbose;
|
|
@@ -649682,7 +650017,7 @@ function get2(obj, path29) {
|
|
|
649682
650017
|
return arr ? list : list[0];
|
|
649683
650018
|
}
|
|
649684
650019
|
function norm(weight = 1, mantissa = 3) {
|
|
649685
|
-
const
|
|
650020
|
+
const cache9 = new Map;
|
|
649686
650021
|
const m3 = Math.pow(10, mantissa);
|
|
649687
650022
|
return {
|
|
649688
650023
|
get(value) {
|
|
@@ -649698,15 +650033,15 @@ function norm(weight = 1, mantissa = 3) {
|
|
|
649698
650033
|
inSpace = false;
|
|
649699
650034
|
}
|
|
649700
650035
|
}
|
|
649701
|
-
if (
|
|
649702
|
-
return
|
|
650036
|
+
if (cache9.has(numTokens)) {
|
|
650037
|
+
return cache9.get(numTokens);
|
|
649703
650038
|
}
|
|
649704
650039
|
const n3 = Math.round(m3 / Math.pow(numTokens, 0.5 * weight)) / m3;
|
|
649705
|
-
|
|
650040
|
+
cache9.set(numTokens, n3);
|
|
649706
650041
|
return n3;
|
|
649707
650042
|
},
|
|
649708
650043
|
clear() {
|
|
649709
|
-
|
|
650044
|
+
cache9.clear();
|
|
649710
650045
|
}
|
|
649711
650046
|
};
|
|
649712
650047
|
}
|
|
@@ -651946,7 +652281,7 @@ function mcpQueryFor(searchToken) {
|
|
|
651946
652281
|
function findReusableCacheEntry(mcpQuery, searchToken) {
|
|
651947
652282
|
let best;
|
|
651948
652283
|
let bestLen = 0;
|
|
651949
|
-
for (const [key2, channels] of
|
|
652284
|
+
for (const [key2, channels] of cache9) {
|
|
651950
652285
|
if (mcpQuery.startsWith(key2) && key2.length > bestLen && channels.some((c4) => c4.startsWith(searchToken))) {
|
|
651951
652286
|
best = channels;
|
|
651952
652287
|
bestLen = key2.length;
|
|
@@ -651959,7 +652294,7 @@ async function getSlackChannelSuggestions(clients, searchToken) {
|
|
|
651959
652294
|
return [];
|
|
651960
652295
|
const mcpQuery = mcpQueryFor(searchToken);
|
|
651961
652296
|
const lower2 = searchToken.toLowerCase();
|
|
651962
|
-
let channels =
|
|
652297
|
+
let channels = cache9.get(mcpQuery) ?? findReusableCacheEntry(mcpQuery, lower2);
|
|
651963
652298
|
if (!channels) {
|
|
651964
652299
|
if (inflightQuery === mcpQuery && inflightPromise) {
|
|
651965
652300
|
channels = await inflightPromise;
|
|
@@ -651967,7 +652302,7 @@ async function getSlackChannelSuggestions(clients, searchToken) {
|
|
|
651967
652302
|
inflightQuery = mcpQuery;
|
|
651968
652303
|
inflightPromise = fetchChannels(clients, mcpQuery);
|
|
651969
652304
|
channels = await inflightPromise;
|
|
651970
|
-
|
|
652305
|
+
cache9.set(mcpQuery, channels);
|
|
651971
652306
|
const before = knownChannels.size;
|
|
651972
652307
|
for (const c4 of channels)
|
|
651973
652308
|
knownChannels.add(c4);
|
|
@@ -651975,8 +652310,8 @@ async function getSlackChannelSuggestions(clients, searchToken) {
|
|
|
651975
652310
|
knownChannelsVersion++;
|
|
651976
652311
|
knownChannelsChanged.emit();
|
|
651977
652312
|
}
|
|
651978
|
-
if (
|
|
651979
|
-
|
|
652313
|
+
if (cache9.size > 50) {
|
|
652314
|
+
cache9.delete(cache9.keys().next().value);
|
|
651980
652315
|
}
|
|
651981
652316
|
if (inflightQuery === mcpQuery) {
|
|
651982
652317
|
inflightQuery = null;
|
|
@@ -651989,12 +652324,12 @@ async function getSlackChannelSuggestions(clients, searchToken) {
|
|
|
651989
652324
|
displayText: `#${c4}`
|
|
651990
652325
|
}));
|
|
651991
652326
|
}
|
|
651992
|
-
var SLACK_SEARCH_TOOL = "slack_search_channels",
|
|
652327
|
+
var SLACK_SEARCH_TOOL = "slack_search_channels", cache9, knownChannels, knownChannelsVersion = 0, knownChannelsChanged, subscribeKnownChannels, inflightQuery = null, inflightPromise = null, resultsEnvelopeSchema;
|
|
651993
652328
|
var init_slackChannelSuggestions = __esm(() => {
|
|
651994
652329
|
init_zod3();
|
|
651995
652330
|
init_debug();
|
|
651996
652331
|
init_slowOperations();
|
|
651997
|
-
|
|
652332
|
+
cache9 = new Map;
|
|
651998
652333
|
knownChannels = new Set;
|
|
651999
652334
|
knownChannelsChanged = createSignal();
|
|
652000
652335
|
subscribeKnownChannels = knownChannelsChanged.subscribe;
|
|
@@ -656153,7 +656488,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
656153
656488
|
project_dir: getOriginalCwd(),
|
|
656154
656489
|
added_dirs: addedDirs
|
|
656155
656490
|
},
|
|
656156
|
-
version: "1.3.
|
|
656491
|
+
version: "1.3.441",
|
|
656157
656492
|
output_style: {
|
|
656158
656493
|
name: outputStyleName
|
|
656159
656494
|
},
|
|
@@ -665900,6 +666235,100 @@ var init_useIdeSelection = __esm(() => {
|
|
|
665900
666235
|
}));
|
|
665901
666236
|
});
|
|
665902
666237
|
|
|
666238
|
+
// src/utils/progressCoalescing.ts
|
|
666239
|
+
function coalesceEphemeralProgressMessages(oldMessages, newMessage) {
|
|
666240
|
+
const next = newMessage;
|
|
666241
|
+
const matches = (m3) => {
|
|
666242
|
+
if (m3.type !== "progress") {
|
|
666243
|
+
return false;
|
|
666244
|
+
}
|
|
666245
|
+
const candidate = m3;
|
|
666246
|
+
return candidate.parentToolUseID === next.parentToolUseID && candidate.data.type === next.data.type;
|
|
666247
|
+
};
|
|
666248
|
+
const last2 = oldMessages[oldMessages.length - 1];
|
|
666249
|
+
if (last2 !== undefined && matches(last2)) {
|
|
666250
|
+
const copy2 = oldMessages.slice();
|
|
666251
|
+
copy2[copy2.length - 1] = newMessage;
|
|
666252
|
+
return copy2;
|
|
666253
|
+
}
|
|
666254
|
+
const result = [];
|
|
666255
|
+
for (const m3 of oldMessages) {
|
|
666256
|
+
if (!matches(m3)) {
|
|
666257
|
+
result.push(m3);
|
|
666258
|
+
}
|
|
666259
|
+
}
|
|
666260
|
+
result.push(newMessage);
|
|
666261
|
+
return result;
|
|
666262
|
+
}
|
|
666263
|
+
|
|
666264
|
+
// src/utils/memProbe.ts
|
|
666265
|
+
function isMemProbeEnabled() {
|
|
666266
|
+
return isEnvTruthy(process.env.RAYU_MEM_PROBE);
|
|
666267
|
+
}
|
|
666268
|
+
function reportMemProbeValue(name, value) {
|
|
666269
|
+
if (!isMemProbeEnabled()) {
|
|
666270
|
+
return;
|
|
666271
|
+
}
|
|
666272
|
+
reported2.set(name, value);
|
|
666273
|
+
}
|
|
666274
|
+
function setMemProbeFpsTracker(tracker) {
|
|
666275
|
+
fpsTrackerRef = tracker;
|
|
666276
|
+
}
|
|
666277
|
+
function activeCount(method) {
|
|
666278
|
+
try {
|
|
666279
|
+
const fn = process[method];
|
|
666280
|
+
return typeof fn === "function" ? fn.call(process).length : undefined;
|
|
666281
|
+
} catch {
|
|
666282
|
+
return;
|
|
666283
|
+
}
|
|
666284
|
+
}
|
|
666285
|
+
function formatMemProbeLine() {
|
|
666286
|
+
const mu = process.memoryUsage();
|
|
666287
|
+
const toMB = (bytes) => (bytes / 1024 / 1024).toFixed(1);
|
|
666288
|
+
const parts = [
|
|
666289
|
+
`heapUsed=${toMB(mu.heapUsed)}MB`,
|
|
666290
|
+
`rss=${toMB(mu.rss)}MB`,
|
|
666291
|
+
`external=${toMB(mu.external)}MB`
|
|
666292
|
+
];
|
|
666293
|
+
const handles = activeCount("_getActiveHandles");
|
|
666294
|
+
if (handles !== undefined) {
|
|
666295
|
+
parts.push(`handles=${handles}`);
|
|
666296
|
+
}
|
|
666297
|
+
const requests = activeCount("_getActiveRequests");
|
|
666298
|
+
if (requests !== undefined) {
|
|
666299
|
+
parts.push(`requests=${requests}`);
|
|
666300
|
+
}
|
|
666301
|
+
try {
|
|
666302
|
+
parts.push(`yogaLiveNodes=${getYogaCounters().live}`);
|
|
666303
|
+
} catch {}
|
|
666304
|
+
if (fpsTrackerRef) {
|
|
666305
|
+
try {
|
|
666306
|
+
parts.push(`fpsBuffer=${fpsTrackerRef.bufferSize()}`);
|
|
666307
|
+
} catch {}
|
|
666308
|
+
}
|
|
666309
|
+
for (const [name, value] of reported2) {
|
|
666310
|
+
parts.push(`${name}=${value}`);
|
|
666311
|
+
}
|
|
666312
|
+
return `[mem-probe] ${parts.join(" ")}`;
|
|
666313
|
+
}
|
|
666314
|
+
function startMemProbeIfEnabled(intervalMs = DEFAULT_INTERVAL_MS) {
|
|
666315
|
+
if (interval || !isMemProbeEnabled()) {
|
|
666316
|
+
return;
|
|
666317
|
+
}
|
|
666318
|
+
logForDebugging(`[mem-probe] enabled — sampling every ${Math.round(intervalMs / 1000)}s`);
|
|
666319
|
+
interval = setInterval(() => {
|
|
666320
|
+
logForDebugging(formatMemProbeLine());
|
|
666321
|
+
}, intervalMs);
|
|
666322
|
+
interval.unref?.();
|
|
666323
|
+
}
|
|
666324
|
+
var DEFAULT_INTERVAL_MS = 30000, interval = null, reported2, fpsTrackerRef = null;
|
|
666325
|
+
var init_memProbe = __esm(() => {
|
|
666326
|
+
init_yoga_layout();
|
|
666327
|
+
init_debug();
|
|
666328
|
+
init_envUtils();
|
|
666329
|
+
reported2 = new Map;
|
|
666330
|
+
});
|
|
666331
|
+
|
|
665903
666332
|
// src/utils/asciicast.ts
|
|
665904
666333
|
var exports_asciicast = {};
|
|
665905
666334
|
__export(exports_asciicast, {
|
|
@@ -667557,7 +667986,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
667557
667986
|
} catch {}
|
|
667558
667987
|
const data = {
|
|
667559
667988
|
trigger,
|
|
667560
|
-
version: "1.3.
|
|
667989
|
+
version: "1.3.441",
|
|
667561
667990
|
platform: process.platform,
|
|
667562
667991
|
transcript,
|
|
667563
667992
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -675253,8 +675682,8 @@ function AnimatedTerminalTitle(t0) {
|
|
|
675253
675682
|
if (disabled || noPrefix || !isAnimating || !terminalFocused) {
|
|
675254
675683
|
return;
|
|
675255
675684
|
}
|
|
675256
|
-
const
|
|
675257
|
-
return () => clearInterval(
|
|
675685
|
+
const interval2 = setInterval(_temp289, TITLE_ANIMATION_INTERVAL_MS, setFrame);
|
|
675686
|
+
return () => clearInterval(interval2);
|
|
675258
675687
|
};
|
|
675259
675688
|
t2 = [disabled, noPrefix, isAnimating, terminalFocused];
|
|
675260
675689
|
$3[0] = disabled;
|
|
@@ -676490,13 +676919,12 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
676490
676919
|
if (false) {}
|
|
676491
676920
|
} else if (newMessage.type === "progress" && isEphemeralToolProgress(newMessage.data.type)) {
|
|
676492
676921
|
setMessages((oldMessages) => {
|
|
676493
|
-
const
|
|
676494
|
-
if (
|
|
676495
|
-
|
|
676496
|
-
|
|
676497
|
-
return copy2;
|
|
676922
|
+
const next = coalesceEphemeralProgressMessages(oldMessages, newMessage);
|
|
676923
|
+
if (isMemProbeEnabled()) {
|
|
676924
|
+
reportMemProbeValue("messages", next.length);
|
|
676925
|
+
reportMemProbeValue("ephemeralProgress", next.reduce((n3, m3) => n3 + (m3.type === "progress" ? 1 : 0), 0));
|
|
676498
676926
|
}
|
|
676499
|
-
return
|
|
676927
|
+
return next;
|
|
676500
676928
|
});
|
|
676501
676929
|
} else {
|
|
676502
676930
|
setMessages((oldMessages) => [...oldMessages, newMessage]);
|
|
@@ -678533,6 +678961,7 @@ var init_REPL = __esm(() => {
|
|
|
678533
678961
|
init_AppState();
|
|
678534
678962
|
init_plans();
|
|
678535
678963
|
init_sessionStorage();
|
|
678964
|
+
init_memProbe();
|
|
678536
678965
|
init_conversationRecovery();
|
|
678537
678966
|
init_queryHelpers();
|
|
678538
678967
|
init_microCompact();
|
|
@@ -679451,28 +679880,43 @@ var init_terminalPreference = __esm(() => {
|
|
|
679451
679880
|
|
|
679452
679881
|
// src/utils/fpsTracker.ts
|
|
679453
679882
|
class FpsTracker {
|
|
679454
|
-
|
|
679883
|
+
now;
|
|
679884
|
+
reservoir = [];
|
|
679885
|
+
totalFrames = 0;
|
|
679455
679886
|
firstRenderTime;
|
|
679456
679887
|
lastRenderTime;
|
|
679888
|
+
constructor(now2 = () => performance.now()) {
|
|
679889
|
+
this.now = now2;
|
|
679890
|
+
}
|
|
679457
679891
|
record(durationMs) {
|
|
679458
|
-
const now2 =
|
|
679892
|
+
const now2 = this.now();
|
|
679459
679893
|
if (this.firstRenderTime === undefined) {
|
|
679460
679894
|
this.firstRenderTime = now2;
|
|
679461
679895
|
}
|
|
679462
679896
|
this.lastRenderTime = now2;
|
|
679463
|
-
this.
|
|
679897
|
+
this.totalFrames++;
|
|
679898
|
+
if (this.reservoir.length < RESERVOIR_SIZE2) {
|
|
679899
|
+
this.reservoir.push(durationMs);
|
|
679900
|
+
} else {
|
|
679901
|
+
const j3 = Math.floor(Math.random() * this.totalFrames);
|
|
679902
|
+
if (j3 < RESERVOIR_SIZE2) {
|
|
679903
|
+
this.reservoir[j3] = durationMs;
|
|
679904
|
+
}
|
|
679905
|
+
}
|
|
679906
|
+
}
|
|
679907
|
+
bufferSize() {
|
|
679908
|
+
return this.reservoir.length;
|
|
679464
679909
|
}
|
|
679465
679910
|
getMetrics() {
|
|
679466
|
-
if (this.
|
|
679911
|
+
if (this.totalFrames === 0 || this.firstRenderTime === undefined || this.lastRenderTime === undefined) {
|
|
679467
679912
|
return;
|
|
679468
679913
|
}
|
|
679469
679914
|
const totalTimeMs = this.lastRenderTime - this.firstRenderTime;
|
|
679470
679915
|
if (totalTimeMs <= 0) {
|
|
679471
679916
|
return;
|
|
679472
679917
|
}
|
|
679473
|
-
const
|
|
679474
|
-
const
|
|
679475
|
-
const sorted = this.frameDurations.slice().sort((a2, b3) => b3 - a2);
|
|
679918
|
+
const averageFps = this.totalFrames / (totalTimeMs / 1000);
|
|
679919
|
+
const sorted = this.reservoir.slice().sort((a2, b3) => b3 - a2);
|
|
679476
679920
|
const p99Index = Math.max(0, Math.ceil(sorted.length * 0.01) - 1);
|
|
679477
679921
|
const p99FrameTimeMs = sorted[p99Index];
|
|
679478
679922
|
const low1PctFps = p99FrameTimeMs > 0 ? 1000 / p99FrameTimeMs : 0;
|
|
@@ -679482,6 +679926,49 @@ class FpsTracker {
|
|
|
679482
679926
|
};
|
|
679483
679927
|
}
|
|
679484
679928
|
}
|
|
679929
|
+
var RESERVOIR_SIZE2 = 1024;
|
|
679930
|
+
|
|
679931
|
+
// src/utils/interactiveHeapDumpMonitor.ts
|
|
679932
|
+
function isAutoHeapDumpEnabled() {
|
|
679933
|
+
return !isEnvDefinedFalsy(process.env.RAYU_AUTO_HEAPDUMP);
|
|
679934
|
+
}
|
|
679935
|
+
async function checkHeapForAutoDump(getHeapUsed = () => process.memoryUsage().heapUsed, dump = performHeapDump) {
|
|
679936
|
+
if (inFlight || dumpsTaken >= MAX_AUTO_DUMPS) {
|
|
679937
|
+
return false;
|
|
679938
|
+
}
|
|
679939
|
+
if (getHeapUsed() < AUTO_HEAPDUMP_THRESHOLD_BYTES) {
|
|
679940
|
+
return false;
|
|
679941
|
+
}
|
|
679942
|
+
inFlight = true;
|
|
679943
|
+
dumpsTaken++;
|
|
679944
|
+
try {
|
|
679945
|
+
const result = await dump("auto-1.5GB", dumpsTaken);
|
|
679946
|
+
if (result.success) {
|
|
679947
|
+
logForDebugging(`[auto-heapdump] heap crossed 1.5GB — snapshot written to ${result.heapPath} (diagnostics: ${result.diagPath})`);
|
|
679948
|
+
} else {
|
|
679949
|
+
logForDebugging(`[auto-heapdump] snapshot failed: ${result.error}`);
|
|
679950
|
+
}
|
|
679951
|
+
return true;
|
|
679952
|
+
} finally {
|
|
679953
|
+
inFlight = false;
|
|
679954
|
+
}
|
|
679955
|
+
}
|
|
679956
|
+
function startInteractiveHeapDumpMonitor() {
|
|
679957
|
+
if (interval2 || !isAutoHeapDumpEnabled()) {
|
|
679958
|
+
return;
|
|
679959
|
+
}
|
|
679960
|
+
interval2 = setInterval(() => {
|
|
679961
|
+
checkHeapForAutoDump();
|
|
679962
|
+
}, CHECK_INTERVAL_MS);
|
|
679963
|
+
interval2.unref?.();
|
|
679964
|
+
}
|
|
679965
|
+
var AUTO_HEAPDUMP_THRESHOLD_BYTES, CHECK_INTERVAL_MS = 1e4, MAX_AUTO_DUMPS = 1, interval2 = null, dumpsTaken = 0, inFlight = false;
|
|
679966
|
+
var init_interactiveHeapDumpMonitor = __esm(() => {
|
|
679967
|
+
init_debug();
|
|
679968
|
+
init_envUtils();
|
|
679969
|
+
init_heapDumpService();
|
|
679970
|
+
AUTO_HEAPDUMP_THRESHOLD_BYTES = 1.5 * 1024 * 1024 * 1024;
|
|
679971
|
+
});
|
|
679485
679972
|
|
|
679486
679973
|
// src/utils/githubRepoPathMapping.ts
|
|
679487
679974
|
import { realpath as realpath13 } from "fs/promises";
|
|
@@ -679602,7 +680089,7 @@ function WelcomeV2() {
|
|
|
679602
680089
|
dimColor: true,
|
|
679603
680090
|
children: [
|
|
679604
680091
|
"v",
|
|
679605
|
-
"1.3.
|
|
680092
|
+
"1.3.441"
|
|
679606
680093
|
]
|
|
679607
680094
|
}, undefined, true, undefined, this)
|
|
679608
680095
|
]
|
|
@@ -681336,7 +681823,7 @@ function completeOnboarding() {
|
|
|
681336
681823
|
saveGlobalConfig((current) => ({
|
|
681337
681824
|
...current,
|
|
681338
681825
|
hasCompletedOnboarding: true,
|
|
681339
|
-
lastOnboardingVersion: "1.3.
|
|
681826
|
+
lastOnboardingVersion: "1.3.441"
|
|
681340
681827
|
}));
|
|
681341
681828
|
}
|
|
681342
681829
|
function showDialog(root2, renderer) {
|
|
@@ -681473,6 +681960,9 @@ function getRenderContext(exitOnCtrlC) {
|
|
|
681473
681960
|
const fpsTracker = new FpsTracker;
|
|
681474
681961
|
const stats3 = createStatsStore();
|
|
681475
681962
|
setStatsStore(stats3);
|
|
681963
|
+
setMemProbeFpsTracker(fpsTracker);
|
|
681964
|
+
startMemProbeIfEnabled();
|
|
681965
|
+
startInteractiveHeapDumpMonitor();
|
|
681476
681966
|
const frameTimingLogPath = process.env.CLAUDE_CODE_FRAME_TIMING_LOG;
|
|
681477
681967
|
return {
|
|
681478
681968
|
getFpsMetrics: () => fpsTracker.getMetrics(),
|
|
@@ -681533,6 +682023,8 @@ var init_interactiveHelpers = __esm(() => {
|
|
|
681533
682023
|
init_config2();
|
|
681534
682024
|
init_terminalPreference();
|
|
681535
682025
|
init_envUtils();
|
|
682026
|
+
init_memProbe();
|
|
682027
|
+
init_interactiveHeapDumpMonitor();
|
|
681536
682028
|
init_githubRepoPathMapping();
|
|
681537
682029
|
init_managedEnv();
|
|
681538
682030
|
init_renderOptions();
|
|
@@ -686279,7 +686771,7 @@ function appendToLog(path30, message) {
|
|
|
686279
686771
|
cwd: getFsImplementation().cwd(),
|
|
686280
686772
|
userType: "external",
|
|
686281
686773
|
sessionId: getSessionId(),
|
|
686282
|
-
version: "1.3.
|
|
686774
|
+
version: "1.3.441"
|
|
686283
686775
|
};
|
|
686284
686776
|
getLogWriter(path30).write(messageWithTimestamp);
|
|
686285
686777
|
}
|
|
@@ -690387,8 +690879,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
690387
690879
|
}
|
|
690388
690880
|
async function checkEnvLessBridgeMinVersion() {
|
|
690389
690881
|
const cfg = await getEnvLessBridgeConfig();
|
|
690390
|
-
if (cfg.min_version && lt("1.3.
|
|
690391
|
-
return `Your version of RAYU (${"1.3.
|
|
690882
|
+
if (cfg.min_version && lt("1.3.441", cfg.min_version)) {
|
|
690883
|
+
return `Your version of RAYU (${"1.3.441"}) is too old for Remote Control.
|
|
690392
690884
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
690393
690885
|
}
|
|
690394
690886
|
return null;
|
|
@@ -690862,7 +691354,7 @@ async function initBridgeCore(params) {
|
|
|
690862
691354
|
const rawApi = createBridgeApiClient({
|
|
690863
691355
|
baseUrl,
|
|
690864
691356
|
getAccessToken,
|
|
690865
|
-
runnerVersion: "1.3.
|
|
691357
|
+
runnerVersion: "1.3.441",
|
|
690866
691358
|
onDebug: logForDebugging,
|
|
690867
691359
|
onAuth401,
|
|
690868
691360
|
getTrustedDeviceToken
|
|
@@ -693570,8 +694062,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
693570
694062
|
jsonSchema: getInitJsonSchema() ?? options.jsonSchema,
|
|
693571
694063
|
mutableMessages,
|
|
693572
694064
|
getReadFileCache: () => pendingSeeds.size === 0 ? readFileState : mergeFileStateCaches(readFileState, pendingSeeds),
|
|
693573
|
-
setReadFileCache: (
|
|
693574
|
-
readFileState =
|
|
694065
|
+
setReadFileCache: (cache10) => {
|
|
694066
|
+
readFileState = cache10;
|
|
693575
694067
|
for (const [path30, seed] of pendingSeeds.entries()) {
|
|
693576
694068
|
const existing = readFileState.get(path30);
|
|
693577
694069
|
if (!existing || seed.timestamp > existing.timestamp) {
|
|
@@ -696224,7 +696716,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
|
|
|
696224
696716
|
setCwd(cwd3);
|
|
696225
696717
|
const server = new Server({
|
|
696226
696718
|
name: "claude/tengu",
|
|
696227
|
-
version: "1.3.
|
|
696719
|
+
version: "1.3.441"
|
|
696228
696720
|
}, {
|
|
696229
696721
|
capabilities: {
|
|
696230
696722
|
tools: {}
|
|
@@ -698750,7 +699242,7 @@ ${customInstructions}` : customInstructions;
|
|
|
698750
699242
|
}
|
|
698751
699243
|
}
|
|
698752
699244
|
logForDiagnosticsNoPII("info", "started", {
|
|
698753
|
-
version: "1.3.
|
|
699245
|
+
version: "1.3.441",
|
|
698754
699246
|
is_native_binary: isInBundledMode()
|
|
698755
699247
|
});
|
|
698756
699248
|
registerCleanup(async () => {
|
|
@@ -699469,7 +699961,7 @@ Usage: rayu --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
699469
699961
|
pendingHookMessages
|
|
699470
699962
|
}, renderAndRun);
|
|
699471
699963
|
}
|
|
699472
|
-
}).version("1.3.
|
|
699964
|
+
}).version("1.3.441 (Rayu-CLI)", "-v, --version", "Output the version number");
|
|
699473
699965
|
program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
699474
699966
|
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
699967
|
if (canUserConfigureAdvisor()) {
|
|
@@ -699935,7 +700427,7 @@ if (false) {}
|
|
|
699935
700427
|
async function main2() {
|
|
699936
700428
|
const args = process.argv.slice(2);
|
|
699937
700429
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
699938
|
-
console.log(`${"1.3.
|
|
700430
|
+
console.log(`${"1.3.441"} (Rayu-CLI)`);
|
|
699939
700431
|
return;
|
|
699940
700432
|
}
|
|
699941
700433
|
const {
|