@rayu-dev/rayu-cli 1.4.467 → 1.4.468

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/rayu.js +352 -104
  2. package/package.json +1 -1
package/dist/rayu.js CHANGED
@@ -40670,6 +40670,82 @@ var init_vertexAuth = __esm(() => {
40670
40670
  DEFAULT_TOKEN_TTL_MS = 60 * 60 * 1000;
40671
40671
  });
40672
40672
 
40673
+ // src/services/api/ollamaCloud.ts
40674
+ var exports_ollamaCloud = {};
40675
+ __export(exports_ollamaCloud, {
40676
+ fetchOllamaCloudModels: () => fetchOllamaCloudModels,
40677
+ fetchOllamaCloudModelContexts: () => fetchOllamaCloudModelContexts,
40678
+ OLLAMA_CLOUD_PROVIDER_ID: () => OLLAMA_CLOUD_PROVIDER_ID,
40679
+ OLLAMA_CLOUD_BASE_URL: () => OLLAMA_CLOUD_BASE_URL
40680
+ });
40681
+ function hostOf(baseURL) {
40682
+ return (baseURL || OLLAMA_CLOUD_BASE_URL).replace(/\/+$/, "");
40683
+ }
40684
+ function bearer(apiKey) {
40685
+ return apiKey ? { Authorization: `Bearer ${apiKey}` } : {};
40686
+ }
40687
+ async function fetchOllamaCloudModels(apiKey, baseURL) {
40688
+ const host = hostOf(baseURL);
40689
+ const headers = bearer(apiKey);
40690
+ const ids = new Set;
40691
+ try {
40692
+ const res = await fetch(`${host}/v1/models`, { headers, signal: AbortSignal.timeout(15000) });
40693
+ if (res.ok) {
40694
+ const json = await res.json();
40695
+ for (const m2 of json.data ?? []) {
40696
+ if (typeof m2.id === "string" && m2.id)
40697
+ ids.add(m2.id);
40698
+ }
40699
+ }
40700
+ } catch {}
40701
+ if (ids.size === 0) {
40702
+ try {
40703
+ const res = await fetch(`${host}/api/tags`, { headers, signal: AbortSignal.timeout(15000) });
40704
+ if (res.ok) {
40705
+ const json = await res.json();
40706
+ for (const m2 of json.models ?? []) {
40707
+ const id = m2.model || m2.name;
40708
+ if (typeof id === "string" && id)
40709
+ ids.add(id);
40710
+ }
40711
+ }
40712
+ } catch {}
40713
+ }
40714
+ return [...ids].sort();
40715
+ }
40716
+ async function fetchOllamaCloudModelContexts(apiKey, baseURL, models) {
40717
+ const host = hostOf(baseURL);
40718
+ const headers = { "Content-Type": "application/json", ...bearer(apiKey) };
40719
+ const out = {};
40720
+ const CONCURRENCY = 4;
40721
+ let next = 0;
40722
+ async function worker() {
40723
+ while (next < models.length) {
40724
+ const model = models[next++];
40725
+ try {
40726
+ const res = await fetch(`${host}/api/show`, {
40727
+ method: "POST",
40728
+ headers,
40729
+ body: JSON.stringify({ model }),
40730
+ signal: AbortSignal.timeout(1e4)
40731
+ });
40732
+ if (!res.ok)
40733
+ continue;
40734
+ const json = await res.json();
40735
+ for (const [k, v] of Object.entries(json.model_info ?? {})) {
40736
+ if (k.endsWith(".context_length") && typeof v === "number" && v > 0) {
40737
+ out[model] = v;
40738
+ break;
40739
+ }
40740
+ }
40741
+ } catch {}
40742
+ }
40743
+ }
40744
+ await Promise.all(Array.from({ length: Math.min(CONCURRENCY, Math.max(models.length, 1)) }, worker));
40745
+ return out;
40746
+ }
40747
+ var OLLAMA_CLOUD_PROVIDER_ID = "ollama-cloud", OLLAMA_CLOUD_BASE_URL = "https://ollama.com";
40748
+
40673
40749
  // src/utils/rayuProviders.ts
40674
40750
  var exports_rayuProviders = {};
40675
40751
  __export(exports_rayuProviders, {
@@ -40718,8 +40794,16 @@ function ollamaBaseURL() {
40718
40794
  raw = `${raw}/v1`;
40719
40795
  return raw;
40720
40796
  }
40797
+ function envMultiKeyProviderIds() {
40798
+ const raw = process.env.RAYU_MULTI_KEY_PROVIDERS;
40799
+ if (!raw)
40800
+ return [];
40801
+ return raw.split(/[\s,]+/).map((s2) => s2.trim()).filter(Boolean);
40802
+ }
40721
40803
  function supportsMultiApiKey(providerId) {
40722
- return !!providerId && MULTI_KEY_PROVIDER_IDS.has(providerId);
40804
+ if (!providerId)
40805
+ return false;
40806
+ return MULTI_KEY_PROVIDER_IDS.has(providerId) || envMultiKeyProviderIds().includes(providerId);
40723
40807
  }
40724
40808
  function migrateEnvKeysToConfig() {
40725
40809
  loadDotEnv();
@@ -40839,7 +40923,8 @@ var init_rayuProviders = __esm(() => {
40839
40923
  ];
40840
40924
  MULTI_KEY_PROVIDER_IDS = new Set([
40841
40925
  "nvidia",
40842
- "openrouter"
40926
+ "openrouter",
40927
+ "ollama-cloud"
40843
40928
  ]);
40844
40929
  PROVIDER_PRESETS = [
40845
40930
  {
@@ -40858,6 +40943,14 @@ var init_rayuProviders = __esm(() => {
40858
40943
  defaultModel: "LongCat-2.0",
40859
40944
  envKeys: ["LONGCAT_API_KEY"]
40860
40945
  },
40946
+ {
40947
+ id: OLLAMA_CLOUD_PROVIDER_ID,
40948
+ label: "Ollama Cloud (ollama.com) · hosted models · fetches your account models",
40949
+ kind: "anthropic-compatible",
40950
+ baseURL: OLLAMA_CLOUD_BASE_URL,
40951
+ defaultModel: "gpt-oss:120b-cloud",
40952
+ envKeys: ["OLLAMA_CLOUD_API_KEY"]
40953
+ },
40861
40954
  {
40862
40955
  id: "nvidia",
40863
40956
  label: "NVIDIA NIM (integrate.api.nvidia.com)",
@@ -41109,6 +41202,7 @@ var init_rayuProviders = __esm(() => {
41109
41202
  copilot: "GitHub Copilot",
41110
41203
  "rayu-hosted": "Rayu",
41111
41204
  ollama: "Ollama",
41205
+ "ollama-cloud": "Ollama Cloud",
41112
41206
  local: "Local"
41113
41207
  };
41114
41208
  });
@@ -41818,6 +41912,10 @@ async function fetchProviderModels(p) {
41818
41912
  const { fetchCopilotModels: fetchCopilotModels2 } = await Promise.resolve().then(() => (init_copilotAuth(), exports_copilotAuth));
41819
41913
  return fetchCopilotModels2(p.apiKey);
41820
41914
  }
41915
+ if (p.id === "ollama-cloud") {
41916
+ const { fetchOllamaCloudModels: fetchOllamaCloudModels2 } = await Promise.resolve().then(() => exports_ollamaCloud);
41917
+ return fetchOllamaCloudModels2(p.apiKey, p.baseURL);
41918
+ }
41821
41919
  if (p.kind !== "openai-compatible" || !p.baseURL)
41822
41920
  return [];
41823
41921
  const curated = CURATED_PROVIDER_MODELS[p.id] ?? [];
@@ -41850,7 +41948,7 @@ async function fetchProviderModels(p) {
41850
41948
  }
41851
41949
  async function refreshActiveProviderModels() {
41852
41950
  const p = getActiveProvider();
41853
- if (!p || p.kind !== "openai-compatible" && p.kind !== "bedrock" && p.kind !== "vertex" && p.kind !== "genai" && p.kind !== "kiro" && p.kind !== "copilot")
41951
+ if (!p || p.kind !== "openai-compatible" && p.kind !== "bedrock" && p.kind !== "vertex" && p.kind !== "genai" && p.kind !== "kiro" && p.kind !== "copilot" && p.kind !== "anthropic-compatible")
41854
41952
  return [];
41855
41953
  const models = await fetchProviderModels(p);
41856
41954
  if (models.length) {
@@ -41938,13 +42036,15 @@ var init_rayuConfig = __esm(() => {
41938
42036
  [/gpt-4\.1/i, 1048576],
41939
42037
  [/gemini[-.]?(1\.5|2|2\.5|3)/i, 1048576],
41940
42038
  [/gemini/i, 1048576],
41941
- [/deepseek[-/]?v4[-/]?(flash|pro)/i, 1e6],
42039
+ [/deepseek[-_/.]?v4/i, 1e6],
41942
42040
  [/longcat/i, 1e6],
41943
42041
  [/minimax[-_.]?m3/i, 1e6],
41944
- [/glm-5\.2/i, 1e6],
42042
+ [/glm-?5\.2/i, 1e6],
41945
42043
  [/fugu/i, 1e6],
42044
+ [/llama[-_.]?4/i, 1e6],
41946
42045
  [/kimi-k1|kimi.*long/i, 200000],
41947
42046
  [/kimi[-_.]?k2[-_.]?(thinking|\d{4}|[5-9])/i, 256000],
42047
+ [/kimi[-_.\s]?cod(e|ing)|kimi[-_.]?k?2[.\-_]?7/i, 256000],
41948
42048
  [/kimi|moonshot/i, 131072],
41949
42049
  [/qwen[-.]?3[-.]?(coder|next)/i, 256000],
41950
42050
  [/jamba/i, 256000],
@@ -41953,7 +42053,7 @@ var init_rayuConfig = __esm(() => {
41953
42053
  [/minimax/i, 204800],
41954
42054
  [/deepseek-(chat|reasoner|v3|coder)/i, 131072],
41955
42055
  [/deepseek-r1/i, 131072],
41956
- [/llama-3\.[1-3]|llama-3-70b|llama-4|nemotron/i, 131072],
42056
+ [/llama-3\.[1-3]|llama-3-70b|nemotron/i, 131072],
41957
42057
  [/qwen[-_.]?[23]|qwq/i, 131072],
41958
42058
  [/gemma-[234]/i, 131072],
41959
42059
  [/mixtral|mistral|ministral|codestral|devstral/i, 131072],
@@ -41990,6 +42090,7 @@ var exports_providers = {};
41990
42090
  __export(exports_providers, {
41991
42091
  isVertexGeminiActive: () => isVertexGeminiActive,
41992
42092
  isRayuNonAnthropicActive: () => isRayuNonAnthropicActive,
42093
+ isRayuAnthropicCompatibleActive: () => isRayuAnthropicCompatibleActive,
41993
42094
  isOpenAICompatibleActive: () => isOpenAICompatibleActive,
41994
42095
  isGeminiVertexConfigured: () => isGeminiVertexConfigured,
41995
42096
  isFirstPartyAnthropicBaseUrl: () => isFirstPartyAnthropicBaseUrl,
@@ -42019,6 +42120,14 @@ function isRayuNonAnthropicActive() {
42019
42120
  return false;
42020
42121
  }
42021
42122
  }
42123
+ function isRayuAnthropicCompatibleActive() {
42124
+ try {
42125
+ const { getActiveProvider: getActiveProvider2 } = (init_rayuConfig(), __toCommonJS(exports_rayuConfig));
42126
+ return getActiveProvider2()?.kind === "anthropic-compatible";
42127
+ } catch {
42128
+ return false;
42129
+ }
42130
+ }
42022
42131
  function isOpenAICompatibleActive() {
42023
42132
  if (isEnvTruthy(process.env.RAYU_OPENAI_COMPATIBLE)) {
42024
42133
  return true;
@@ -148855,7 +148964,7 @@ var init_isEqual = __esm(() => {
148855
148964
 
148856
148965
  // src/utils/userAgent.ts
148857
148966
  function getRayuUserAgent() {
148858
- return `rayu/${"1.4.467"}`;
148967
+ return `rayu/${"1.4.468"}`;
148859
148968
  }
148860
148969
  var getClaudeCodeUserAgent;
148861
148970
  var init_userAgent = __esm(() => {
@@ -148881,7 +148990,7 @@ function getUserAgent() {
148881
148990
  const clientApp = process.env.RAYU_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}` : "";
148882
148991
  const workload = getWorkload();
148883
148992
  const workloadSuffix = workload ? `, workload/${workload}` : "";
148884
- return `rayu/${"1.4.467"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148993
+ return `rayu/${"1.4.468"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148885
148994
  }
148886
148995
  function getMCPUserAgent() {
148887
148996
  const parts = [];
@@ -148895,7 +149004,7 @@ function getMCPUserAgent() {
148895
149004
  parts.push(`client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}`);
148896
149005
  }
148897
149006
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
148898
- return `rayu/${"1.4.467"}${suffix}`;
149007
+ return `rayu/${"1.4.468"}${suffix}`;
148899
149008
  }
148900
149009
  function getWebFetchUserAgent() {
148901
149010
  return `Rayu-User (${getRayuUserAgent()})`;
@@ -174790,16 +174899,16 @@ async function getKiroBearer(provider) {
174790
174899
  if (!profileArn) {
174791
174900
  profileArn = await fetchKiroProfileArn(creds.accessToken, region) ?? "";
174792
174901
  }
174793
- const bearer = {
174902
+ const bearer2 = {
174794
174903
  token: creds.accessToken,
174795
174904
  region,
174796
174905
  ...profileArn ? { profileArn } : {}
174797
174906
  };
174798
174907
  oauthCache.set(provider.id, {
174799
- bearer,
174908
+ bearer: bearer2,
174800
174909
  expiresAtMs: creds.expiresAt ? creds.expiresAt * 1000 : Date.now() + 1800000
174801
174910
  });
174802
- return bearer;
174911
+ return bearer2;
174803
174912
  }
174804
174913
  var TOKEN_VALIDITY_BUFFER_MS, DEFAULT_REGION2 = "us-east-1", TOKEN_KEYS, DEVICE_REG_KEYS, defaultRefreshHook = async (url3, body) => {
174805
174914
  const res = await fetch(url3, {
@@ -175252,12 +175361,12 @@ function createKiroClient(provider, maxRetries = 2) {
175252
175361
  });
175253
175362
  }
175254
175363
  for (let attempt = 0;attempt <= maxRetries; attempt++) {
175255
- const bearer = await getKiroBearer(provider);
175256
- if (bearer.profileArn)
175257
- payload.profileArn = bearer.profileArn;
175258
- const endpoint = `https://q.${bearer.region}.amazonaws.com/`;
175364
+ const bearer2 = await getKiroBearer(provider);
175365
+ if (bearer2.profileArn)
175366
+ payload.profileArn = bearer2.profileArn;
175367
+ const endpoint = `https://q.${bearer2.region}.amazonaws.com/`;
175259
175368
  const headers = {
175260
- Authorization: `Bearer ${bearer.token}`,
175369
+ Authorization: `Bearer ${bearer2.token}`,
175261
175370
  "Content-Type": "application/x-amz-json-1.0",
175262
175371
  Accept: "*/*",
175263
175372
  "X-Amz-Target": AMZ_TARGET,
@@ -175267,8 +175376,8 @@ function createKiroClient(provider, maxRetries = 2) {
175267
175376
  "amz-sdk-invocation-id": invocationId,
175268
175377
  "amz-sdk-request": `attempt=${attempt + 1}; max=${maxRetries + 1}`
175269
175378
  };
175270
- if (bearer.tokenType)
175271
- headers.TokenType = bearer.tokenType;
175379
+ if (bearer2.tokenType)
175380
+ headers.TokenType = bearer2.tokenType;
175272
175381
  const timeout = AbortSignal.timeout(REQUEST_TIMEOUT_MS);
175273
175382
  const composite = signal && "any" in AbortSignal ? AbortSignal.any([signal, timeout]) : signal ?? timeout;
175274
175383
  let res;
@@ -175430,18 +175539,53 @@ var init_rayuHostedClient = __esm(() => {
175430
175539
  // src/services/api/anthropicCompatibleClient.ts
175431
175540
  var exports_anthropicCompatibleClient = {};
175432
175541
  __export(exports_anthropicCompatibleClient, {
175542
+ makeKeyRotatingFetch: () => makeKeyRotatingFetch,
175433
175543
  createAnthropicCompatibleClient: () => createAnthropicCompatibleClient
175434
175544
  });
175435
- function createAnthropicCompatibleClient(provider, maxRetries) {
175545
+ function makeKeyRotatingFetch(keys2, baseFetch) {
175546
+ let current = 0;
175547
+ const rotating = async (input, init) => {
175548
+ const n2 = keys2.length;
175549
+ let lastResp;
175550
+ for (let attempt = 0;attempt < n2; attempt++) {
175551
+ const idx = (current + attempt) % n2;
175552
+ const headers = new Headers(init?.headers);
175553
+ headers.set("Authorization", `Bearer ${keys2[idx]}`);
175554
+ const resp = await baseFetch(input, { ...init, headers });
175555
+ if (resp.ok || attempt === n2 - 1 || !ROTATABLE_KEY_STATUSES2.has(resp.status)) {
175556
+ if (resp.ok)
175557
+ current = idx;
175558
+ return resp;
175559
+ }
175560
+ try {
175561
+ await resp.body?.cancel();
175562
+ } catch {}
175563
+ lastResp = resp;
175564
+ }
175565
+ return lastResp;
175566
+ };
175567
+ return rotating;
175568
+ }
175569
+ function createAnthropicCompatibleClient(provider, maxRetries, transport = {}, apiKeys) {
175570
+ const keys2 = (apiKeys ?? []).map((k2) => k2?.trim()).filter((k2) => !!k2);
175571
+ const rotate = keys2.length > 1;
175572
+ const finalTransport = rotate ? {
175573
+ ...transport,
175574
+ fetch: makeKeyRotatingFetch(keys2, transport.fetch ?? globalThis.fetch)
175575
+ } : transport;
175436
175576
  return new Anthropic({
175577
+ dangerouslyAllowBrowser: true,
175578
+ ...finalTransport,
175437
175579
  apiKey: null,
175438
- authToken: provider.apiKey,
175580
+ authToken: keys2[0] ?? provider.apiKey,
175439
175581
  baseURL: provider.baseURL,
175440
175582
  maxRetries
175441
175583
  });
175442
175584
  }
175585
+ var ROTATABLE_KEY_STATUSES2;
175443
175586
  var init_anthropicCompatibleClient = __esm(() => {
175444
175587
  init_sdk();
175588
+ ROTATABLE_KEY_STATUSES2 = new Set([429, 402, 401, 403]);
175445
175589
  });
175446
175590
 
175447
175591
  // src/services/api/client.ts
@@ -175576,13 +175720,38 @@ async function getRayuHostedClient(maxRetries) {
175576
175720
  const { createRayuHostedClient: createRayuHostedClient2 } = await Promise.resolve().then(() => (init_rayuHostedClient(), exports_rayuHostedClient));
175577
175721
  return createRayuHostedClient2(active, maxRetries);
175578
175722
  }
175579
- async function getRayuAnthropicCompatibleClient(maxRetries) {
175580
- const { getActiveProvider: getActiveProvider2 } = await Promise.resolve().then(() => (init_rayuConfig(), exports_rayuConfig));
175723
+ function anthropicCompatibleTransport(source, fetchOverride2) {
175724
+ const customHeaders = getCustomHeaders();
175725
+ const defaultHeaders = {
175726
+ "x-app": "cli",
175727
+ "User-Agent": getUserAgent(),
175728
+ "X-Claude-Code-Session-Id": getSessionId(),
175729
+ ...customHeaders
175730
+ };
175731
+ const resolvedFetch = buildFetch(fetchOverride2, source);
175732
+ return {
175733
+ defaultHeaders,
175734
+ timeout: parseInt(process.env.API_TIMEOUT_MS || String(600000), 10),
175735
+ fetchOptions: getProxyFetchOptions({
175736
+ forAnthropicAPI: true
175737
+ }),
175738
+ ...resolvedFetch ? { fetch: resolvedFetch } : {},
175739
+ ...isDebugToStdErr() ? { logger: createStderrLogger() } : {}
175740
+ };
175741
+ }
175742
+ async function getRayuAnthropicCompatibleClient(maxRetries, source, fetchOverride2) {
175743
+ const { getActiveProvider: getActiveProvider2, getProviderApiKeys: getProviderApiKeys2 } = await Promise.resolve().then(() => (init_rayuConfig(), exports_rayuConfig));
175581
175744
  const active = getActiveProvider2();
175582
175745
  if (active?.kind !== "anthropic-compatible")
175583
175746
  return null;
175584
175747
  const { createAnthropicCompatibleClient: createAnthropicCompatibleClient2 } = await Promise.resolve().then(() => (init_anthropicCompatibleClient(), exports_anthropicCompatibleClient));
175585
- return createAnthropicCompatibleClient2(active, maxRetries);
175748
+ let apiKeys = getProviderApiKeys2(active);
175749
+ const { supportsMultiApiKey: supportsMultiApiKey2 } = await Promise.resolve().then(() => (init_rayuProviders(), exports_rayuProviders));
175750
+ const { isMultiApiKeyAllowed: isMultiApiKeyAllowed2 } = await Promise.resolve().then(() => (init_multiApiKeyFeature(), exports_multiApiKeyFeature));
175751
+ if (!supportsMultiApiKey2(active.id) || !isMultiApiKeyAllowed2()) {
175752
+ apiKeys = apiKeys.slice(0, 1);
175753
+ }
175754
+ return createAnthropicCompatibleClient2(active, maxRetries, anthropicCompatibleTransport(source, fetchOverride2), apiKeys);
175586
175755
  }
175587
175756
  async function buildClientForProvider(provider, maxRetries) {
175588
175757
  if (provider.kind === "bedrock" && provider.bedrockApi === "anthropic" && provider.apiKey) {
@@ -175624,7 +175793,14 @@ async function buildClientForProvider(provider, maxRetries) {
175624
175793
  }
175625
175794
  if (provider.kind === "anthropic-compatible") {
175626
175795
  const { createAnthropicCompatibleClient: createAnthropicCompatibleClient2 } = await Promise.resolve().then(() => (init_anthropicCompatibleClient(), exports_anthropicCompatibleClient));
175627
- return createAnthropicCompatibleClient2(provider, maxRetries);
175796
+ const { getProviderApiKeys: getProviderApiKeys2 } = await Promise.resolve().then(() => (init_rayuConfig(), exports_rayuConfig));
175797
+ const { supportsMultiApiKey: supportsMultiApiKey2 } = await Promise.resolve().then(() => (init_rayuProviders(), exports_rayuProviders));
175798
+ const { isMultiApiKeyAllowed: isMultiApiKeyAllowed2 } = await Promise.resolve().then(() => (init_multiApiKeyFeature(), exports_multiApiKeyFeature));
175799
+ let apiKeys = getProviderApiKeys2(provider);
175800
+ if (!supportsMultiApiKey2(provider.id) || !isMultiApiKeyAllowed2()) {
175801
+ apiKeys = apiKeys.slice(0, 1);
175802
+ }
175803
+ return createAnthropicCompatibleClient2(provider, maxRetries, anthropicCompatibleTransport(), apiKeys);
175628
175804
  }
175629
175805
  if ((provider.kind === "openai-compatible" || provider.kind === "bedrock") && provider.baseURL) {
175630
175806
  const { createOpenAICompatibleClient: createOpenAICompatibleClient2 } = await Promise.resolve().then(() => (init_openaiAdapter(), exports_openaiAdapter));
@@ -175699,7 +175875,7 @@ async function getAnthropicClient({
175699
175875
  if (rayuHostedClient) {
175700
175876
  return rayuHostedClient;
175701
175877
  }
175702
- const anthropicCompatibleClient = await getRayuAnthropicCompatibleClient(maxRetries);
175878
+ const anthropicCompatibleClient = await getRayuAnthropicCompatibleClient(maxRetries, source, fetchOverride2);
175703
175879
  if (anthropicCompatibleClient) {
175704
175880
  return anthropicCompatibleClient;
175705
175881
  }
@@ -205143,7 +205319,7 @@ function getAttributionHeader(fingerprint) {
205143
205319
  if (!isAttributionHeaderEnabled()) {
205144
205320
  return "";
205145
205321
  }
205146
- const version2 = `${"1.4.467"}.${fingerprint}`;
205322
+ const version2 = `${"1.4.468"}.${fingerprint}`;
205147
205323
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
205148
205324
  const cch = "";
205149
205325
  const workload = getWorkload();
@@ -240215,7 +240391,13 @@ function modelSupportsAdaptiveThinking(model) {
240215
240391
  if (supported3P !== undefined) {
240216
240392
  return supported3P;
240217
240393
  }
240218
- if (isOpenAICompatibleActive() || isRayuNonAnthropicActive()) {
240394
+ if (isOpenAICompatibleActive()) {
240395
+ return true;
240396
+ }
240397
+ if (isRayuAnthropicCompatibleActive()) {
240398
+ return false;
240399
+ }
240400
+ if (isRayuNonAnthropicActive()) {
240219
240401
  return true;
240220
240402
  }
240221
240403
  const canonical = getCanonicalName(model);
@@ -259106,7 +259288,7 @@ var init_metadata = __esm(() => {
259106
259288
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
259107
259289
  WHITESPACE_REGEX = /\s+/;
259108
259290
  getVersionBase = memoize_default(() => {
259109
- const match = "1.4.467".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
259291
+ const match = "1.4.468".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
259110
259292
  return match ? match[0] : undefined;
259111
259293
  });
259112
259294
  buildEnvContext = memoize_default(async () => {
@@ -259145,7 +259327,7 @@ var init_metadata = __esm(() => {
259145
259327
  },
259146
259328
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
259147
259329
  isRayuAction: isEnvTruthy(process.env.RAYU_ACTION),
259148
- version: "1.4.467",
259330
+ version: "1.4.468",
259149
259331
  versionBase: getVersionBase(),
259150
259332
  buildTime: "",
259151
259333
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
@@ -291159,7 +291341,7 @@ function getTelemetryAttributes() {
291159
291341
  attributes["session.id"] = sessionId;
291160
291342
  }
291161
291343
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
291162
- attributes["app.version"] = "1.4.467";
291344
+ attributes["app.version"] = "1.4.468";
291163
291345
  }
291164
291346
  const oauthAccount = getOauthAccountInfo();
291165
291347
  if (oauthAccount) {
@@ -401516,7 +401698,7 @@ function getInstallationEnv() {
401516
401698
  return;
401517
401699
  }
401518
401700
  function getClaudeCodeVersion() {
401519
- return "1.4.467";
401701
+ return "1.4.468";
401520
401702
  }
401521
401703
  async function getInstalledVSCodeExtensionVersion(command) {
401522
401704
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -406754,7 +406936,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
406754
406936
  const client3 = new Client({
406755
406937
  name: "claude-code",
406756
406938
  title: "RAYU",
406757
- version: "1.4.467",
406939
+ version: "1.4.468",
406758
406940
  description: "Anthropic's agentic coding tool",
406759
406941
  websiteUrl: PRODUCT_URL
406760
406942
  }, {
@@ -407071,7 +407253,7 @@ var init_client7 = __esm(() => {
407071
407253
  const client3 = new Client({
407072
407254
  name: "claude-code",
407073
407255
  title: "RAYU",
407074
- version: "1.4.467",
407256
+ version: "1.4.468",
407075
407257
  description: "Anthropic's agentic coding tool",
407076
407258
  websiteUrl: PRODUCT_URL
407077
407259
  }, {
@@ -421890,7 +422072,7 @@ function computeFingerprint(messageText, version2) {
421890
422072
  }
421891
422073
  function computeFingerprintFromMessages(messages) {
421892
422074
  const firstMessageText = extractFirstMessageText(messages);
421893
- return computeFingerprint(firstMessageText, "1.4.467");
422075
+ return computeFingerprint(firstMessageText, "1.4.468");
421894
422076
  }
421895
422077
  var FINGERPRINT_SALT = "59cf53e54c78";
421896
422078
  var init_fingerprint = () => {};
@@ -421932,7 +422114,7 @@ async function sideQuery(opts) {
421932
422114
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
421933
422115
  }
421934
422116
  const messageText = extractFirstUserMessageText(messages);
421935
- const fingerprint = computeFingerprint(messageText, "1.4.467");
422117
+ const fingerprint = computeFingerprint(messageText, "1.4.468");
421936
422118
  const attributionHeader = getAttributionHeader(fingerprint);
421937
422119
  const systemBlocks = [
421938
422120
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -521268,9 +521450,9 @@ async function assertMinVersion() {
521268
521450
  if (false) {}
521269
521451
  try {
521270
521452
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
521271
- if (versionConfig.minVersion && lt("1.4.467", versionConfig.minVersion)) {
521453
+ if (versionConfig.minVersion && lt("1.4.468", versionConfig.minVersion)) {
521272
521454
  console.error(`
521273
- It looks like your version of RAYU (${"1.4.467"}) needs an update.
521455
+ It looks like your version of RAYU (${"1.4.468"}) needs an update.
521274
521456
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
521275
521457
 
521276
521458
  To update, please run:
@@ -521496,7 +521678,7 @@ async function installGlobalPackage(specificVersion) {
521496
521678
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
521497
521679
  logEvent("tengu_auto_updater_lock_contention", {
521498
521680
  pid: process.pid,
521499
- currentVersion: "1.4.467"
521681
+ currentVersion: "1.4.468"
521500
521682
  });
521501
521683
  return "in_progress";
521502
521684
  }
@@ -521505,7 +521687,7 @@ async function installGlobalPackage(specificVersion) {
521505
521687
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
521506
521688
  logError2(new Error("Windows NPM detected in WSL environment"));
521507
521689
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
521508
- currentVersion: "1.4.467"
521690
+ currentVersion: "1.4.468"
521509
521691
  });
521510
521692
  console.error(`
521511
521693
  Error: Windows NPM detected in WSL
@@ -522036,7 +522218,7 @@ function detectLinuxGlobPatternWarnings() {
522036
522218
  }
522037
522219
  async function getDoctorDiagnostic() {
522038
522220
  const installationType = await getCurrentInstallationType();
522039
- const version2 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
522221
+ const version2 = typeof MACRO !== "undefined" ? "1.4.468" : "unknown";
522040
522222
  const installationPath = await getInstallationPath();
522041
522223
  const invokedBinary = getInvokedBinary();
522042
522224
  const multipleInstallations = await detectMultipleInstallations();
@@ -522830,8 +523012,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
522830
523012
  const maxVersion = await getMaxVersion();
522831
523013
  if (maxVersion && gt(version2, maxVersion)) {
522832
523014
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
522833
- if (gte("1.4.467", maxVersion)) {
522834
- logForDebugging(`Native installer: current version ${"1.4.467"} is already at or above maxVersion ${maxVersion}, skipping update`);
523015
+ if (gte("1.4.468", maxVersion)) {
523016
+ logForDebugging(`Native installer: current version ${"1.4.468"} is already at or above maxVersion ${maxVersion}, skipping update`);
522835
523017
  logEvent("tengu_native_update_skipped_max_version", {
522836
523018
  latency_ms: Date.now() - startTime2,
522837
523019
  max_version: maxVersion,
@@ -522842,7 +523024,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
522842
523024
  version2 = maxVersion;
522843
523025
  }
522844
523026
  }
522845
- if (!forceReinstall && version2 === "1.4.467" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
523027
+ if (!forceReinstall && version2 === "1.4.468" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
522846
523028
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
522847
523029
  logEvent("tengu_native_update_complete", {
522848
523030
  latency_ms: Date.now() - startTime2,
@@ -524038,7 +524220,7 @@ function buildPrimarySection() {
524038
524220
  });
524039
524221
  return [{
524040
524222
  label: "Version",
524041
- value: "1.4.467"
524223
+ value: "1.4.468"
524042
524224
  }, {
524043
524225
  label: "Session name",
524044
524226
  value: nameValue
@@ -527709,7 +527891,7 @@ function Config({
527709
527891
  }
527710
527892
  })
527711
527893
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime168.jsx(ChannelDowngradeDialog, {
527712
- currentVersion: "1.4.467",
527894
+ currentVersion: "1.4.468",
527713
527895
  onChoice: (choice) => {
527714
527896
  setShowSubmenu(null);
527715
527897
  setTabsHidden(false);
@@ -527721,7 +527903,7 @@ function Config({
527721
527903
  autoUpdatesChannel: "stable"
527722
527904
  };
527723
527905
  if (choice === "stay") {
527724
- newSettings.minimumVersion = "1.4.467";
527906
+ newSettings.minimumVersion = "1.4.468";
527725
527907
  }
527726
527908
  updateSettingsForSource("userSettings", newSettings);
527727
527909
  setSettingsData((prev_27) => ({
@@ -535781,7 +535963,7 @@ function HelpV2(t0) {
535781
535963
  let t6;
535782
535964
  if ($3[31] !== tabs) {
535783
535965
  t6 = /* @__PURE__ */ jsx_runtime195.jsx(Tabs, {
535784
- title: `Rayu-CLI v${"1.4.467"}`,
535966
+ title: `Rayu-CLI v${"1.4.468"}`,
535785
535967
  color: "professionalBlue",
535786
535968
  defaultTab: "general",
535787
535969
  children: tabs
@@ -555864,7 +556046,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
555864
556046
  }
555865
556047
  return [];
555866
556048
  }
555867
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.467") {
556049
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.468") {
555868
556050
  if (false) {}
555869
556051
  const cachedChangelog = await getStoredChangelog();
555870
556052
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -555877,7 +556059,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.467")
555877
556059
  releaseNotes
555878
556060
  };
555879
556061
  }
555880
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.4.467") {
556062
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.4.468") {
555881
556063
  if (false) {}
555882
556064
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
555883
556065
  return {
@@ -556005,7 +556187,7 @@ function getRecentActivitySync() {
556005
556187
  return cachedActivity;
556006
556188
  }
556007
556189
  function getLogoDisplayData() {
556008
- const version2 = process.env.DEMO_VERSION ?? "1.4.467";
556190
+ const version2 = process.env.DEMO_VERSION ?? "1.4.468";
556009
556191
  const serverUrl = getDirectConnectServerUrl();
556010
556192
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
556011
556193
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -557169,7 +557351,7 @@ function LogoV2() {
557169
557351
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
557170
557352
  t2 = () => {
557171
557353
  const currentConfig = getGlobalConfig();
557172
- if (currentConfig.lastReleaseNotesSeen === "1.4.467") {
557354
+ if (currentConfig.lastReleaseNotesSeen === "1.4.468") {
557173
557355
  return;
557174
557356
  }
557175
557357
  saveGlobalConfig(_temp327);
@@ -557647,7 +557829,7 @@ function LogoV2() {
557647
557829
  t24 = $3[61];
557648
557830
  }
557649
557831
  const _latestNpm = getCachedLatestNpmVersionSync();
557650
- const _updateFeeds = _latestNpm && gt(_latestNpm, "1.4.467") ? [createUpdateAvailableFeed("1.4.467", _latestNpm)] : [];
557832
+ const _updateFeeds = _latestNpm && gt(_latestNpm, "1.4.468") ? [createUpdateAvailableFeed("1.4.468", _latestNpm)] : [];
557651
557833
  const t25 = layoutMode === "horizontal" && /* @__PURE__ */ jsx_runtime236.jsx(FeedColumn, {
557652
557834
  feeds: showOnboarding ? [createProjectOnboardingFeed(getSteps()), createRecentActivityFeed(activities)] : showGuestPassesUpsell ? [createRecentActivityFeed(activities), createGuestPassesFeed()] : showOverageCreditUpsell ? [createRecentActivityFeed(activities), createOverageCreditFeed()] : [createRecentActivityFeed(activities), ..._updateFeeds, createWhatsNewFeed(changelog)],
557653
557835
  maxWidth: rightWidth
@@ -557847,12 +558029,12 @@ function LogoV2() {
557847
558029
  return t41;
557848
558030
  }
557849
558031
  function _temp327(current) {
557850
- if (current.lastReleaseNotesSeen === "1.4.467") {
558032
+ if (current.lastReleaseNotesSeen === "1.4.468") {
557851
558033
  return current;
557852
558034
  }
557853
558035
  return {
557854
558036
  ...current,
557855
- lastReleaseNotesSeen: "1.4.467"
558037
+ lastReleaseNotesSeen: "1.4.468"
557856
558038
  };
557857
558039
  }
557858
558040
  function _temp241(s_0) {
@@ -582850,7 +583032,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
582850
583032
  smapsRollup,
582851
583033
  platform: process.platform,
582852
583034
  nodeVersion: process.version,
582853
- ccVersion: "1.4.467"
583035
+ ccVersion: "1.4.468"
582854
583036
  };
582855
583037
  }
582856
583038
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -583372,7 +583554,7 @@ var init_bridge_kick = __esm(() => {
583372
583554
  var call50 = async () => {
583373
583555
  return {
583374
583556
  type: "text",
583375
- value: "1.4.467"
583557
+ value: "1.4.468"
583376
583558
  };
583377
583559
  }, version2, version_default;
583378
583560
  var init_version = __esm(() => {
@@ -586365,6 +586547,7 @@ function RayuProviderSetup({
586365
586547
  const [baseURL, setBaseURL] = import_react178.useState("");
586366
586548
  const [model, setModel] = import_react178.useState("");
586367
586549
  const [apiKey, setApiKey] = import_react178.useState("");
586550
+ const [multiKeys, setMultiKeys] = import_react178.useState([]);
586368
586551
  const [cursor, setCursor] = import_react178.useState(0);
586369
586552
  const [region, setRegion] = import_react178.useState(DEFAULT_BEDROCK_REGION);
586370
586553
  const [bedrockModels, setBedrockModels] = import_react178.useState([]);
@@ -586795,6 +586978,44 @@ ${r2.output.slice(-200)}`);
586795
586978
  cancelled = true;
586796
586979
  };
586797
586980
  }, [phase, kiroStep]);
586981
+ import_react178.default.useEffect(() => {
586982
+ if (phase !== "ollamaCloudFetching")
586983
+ return;
586984
+ let cancelled = false;
586985
+ (async () => {
586986
+ const { fetchOllamaCloudModelContexts: fetchOllamaCloudModelContexts2, OLLAMA_CLOUD_BASE_URL: OLLAMA_CLOUD_BASE_URL2 } = await Promise.resolve().then(() => exports_ollamaCloud);
586987
+ const keys2 = (multiKeys.length ? multiKeys : [apiKey]).map((k2) => k2.trim()).filter(Boolean);
586988
+ const base2 = {
586989
+ id: preset?.id ?? "ollama-cloud",
586990
+ kind: "anthropic-compatible",
586991
+ apiKey: keys2[0],
586992
+ ...keys2.length > 1 ? { apiKeys: keys2 } : {},
586993
+ baseURL: (baseURL || preset?.baseURL || OLLAMA_CLOUD_BASE_URL2).trim()
586994
+ };
586995
+ upsertProvider(base2, true);
586996
+ const models = await fetchProviderModels(base2).catch(() => []);
586997
+ if (cancelled)
586998
+ return;
586999
+ const chat2 = models.filter(isLikelyChatModel);
587000
+ const list = chat2.length ? chat2 : models;
587001
+ const contexts = list.length ? await fetchOllamaCloudModelContexts2(base2.apiKey, base2.baseURL, list).catch(() => ({})) : {};
587002
+ if (cancelled)
587003
+ return;
587004
+ const preferred = list.find((m3) => /qwen3-coder/i.test(m3)) ?? list.find((m3) => /glm-4\.[67]|glm-5/i.test(m3)) ?? list.find((m3) => /gpt-oss/i.test(m3)) ?? list.find((m3) => /cloud/i.test(m3)) ?? list[0] ?? "gpt-oss:120b-cloud";
587005
+ upsertProvider({
587006
+ ...base2,
587007
+ ...list.length ? { fetchedModels: list } : {},
587008
+ ...Object.keys(contexts).length ? { modelContextWindows: contexts } : {},
587009
+ defaultModel: preferred
587010
+ }, true);
587011
+ if (cancelled)
587012
+ return;
587013
+ onDone();
587014
+ })();
587015
+ return () => {
587016
+ cancelled = true;
587017
+ };
587018
+ }, [phase]);
586798
587019
  if (phase === "pick") {
586799
587020
  const localIds = new Set(["ollama", "local"]);
586800
587021
  const pickOptions = [
@@ -587019,6 +587240,23 @@ ${r2.output.slice(-200)}`);
587019
587240
  ]
587020
587241
  });
587021
587242
  }
587243
+ if (phase === "ollamaCloudFetching") {
587244
+ return /* @__PURE__ */ jsx_runtime324.jsxs(ThemedBox_default, {
587245
+ flexDirection: "column",
587246
+ gap: 1,
587247
+ paddingLeft: 1,
587248
+ children: [
587249
+ /* @__PURE__ */ jsx_runtime324.jsx(ThemedText, {
587250
+ bold: true,
587251
+ children: "Fetching your Ollama Cloud models…"
587252
+ }),
587253
+ /* @__PURE__ */ jsx_runtime324.jsx(ThemedText, {
587254
+ dimColor: true,
587255
+ children: "Listing the models available to your ollama.com account and their context sizes."
587256
+ })
587257
+ ]
587258
+ });
587259
+ }
587022
587260
  if (phase === "kiroChoice") {
587023
587261
  return /* @__PURE__ */ jsx_runtime324.jsxs(ThemedBox_default, {
587024
587262
  flexDirection: "column",
@@ -587640,11 +587878,21 @@ ${r2.output.slice(-200)}`);
587640
587878
  providerLabel: preset.label,
587641
587879
  maxKeys: getMaxStoredApiKeys(),
587642
587880
  initialKeys: existing,
587643
- onDone: finishMultiKey,
587881
+ onDone: (keys2) => {
587882
+ const cleaned = keys2.map((k2) => k2.trim()).filter(Boolean);
587883
+ if (preset.id === "ollama-cloud") {
587884
+ setMultiKeys(cleaned);
587885
+ setApiKey(cleaned[0] ?? "");
587886
+ setPhase("ollamaCloudFetching");
587887
+ return;
587888
+ }
587889
+ finishMultiKey(cleaned);
587890
+ },
587644
587891
  onCancel: onDone
587645
587892
  });
587646
587893
  }
587647
587894
  const isBedrock = preset?.kind === "bedrock";
587895
+ const isOllamaCloud = preset?.id === "ollama-cloud";
587648
587896
  const showMultiKeyUpsell = supportsMultiApiKey(preset?.id);
587649
587897
  return /* @__PURE__ */ jsx_runtime324.jsxs(ThemedBox_default, {
587650
587898
  flexDirection: "column",
@@ -587657,7 +587905,7 @@ ${r2.output.slice(-200)}`);
587657
587905
  }),
587658
587906
  /* @__PURE__ */ jsx_runtime324.jsx(ThemedText, {
587659
587907
  dimColor: true,
587660
- children: isBedrock ? "Bedrock API key (bearer token). Stored locally in ~/.rayu/providers.json (0600)." : "Stored locally in ~/.rayu/providers.json (0600). Leave blank to skip."
587908
+ children: isBedrock ? "Bedrock API key (bearer token). Stored locally in ~/.rayu/providers.json (0600)." : isOllamaCloud ? "Ollama Cloud API key (ollama.com → Settings → Keys). Stored locally in ~/.rayu/providers.json (0600)." : "Stored locally in ~/.rayu/providers.json (0600). Leave blank to skip."
587661
587909
  }),
587662
587910
  showMultiKeyUpsell ? /* @__PURE__ */ jsx_runtime324.jsxs(ThemedText, {
587663
587911
  dimColor: true,
@@ -587670,9 +587918,9 @@ ${r2.output.slice(-200)}`);
587670
587918
  /* @__PURE__ */ jsx_runtime324.jsx(TextInput, {
587671
587919
  value: apiKey,
587672
587920
  onChange: setApiKey,
587673
- onSubmit: () => isBedrock ? setPhase("region") : finish(apiKey),
587921
+ onSubmit: () => isBedrock ? setPhase("region") : isOllamaCloud ? setPhase("ollamaCloudFetching") : finish(apiKey),
587674
587922
  mask: "*",
587675
- placeholder: isBedrock ? "ABSK..." : "sk-...",
587923
+ placeholder: isBedrock ? "ABSK..." : isOllamaCloud ? "your ollama.com API key" : "sk-...",
587676
587924
  columns: 80,
587677
587925
  cursorOffset: cursor,
587678
587926
  onChangeCursorOffset: setCursor
@@ -593564,7 +593812,7 @@ function generateHtmlReport(data, insights) {
593564
593812
  </html>`;
593565
593813
  }
593566
593814
  function buildExportData(data, insights, facets, remoteStats) {
593567
- const version3 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
593815
+ const version3 = typeof MACRO !== "undefined" ? "1.4.468" : "unknown";
593568
593816
  const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
593569
593817
  const facets_summary = {
593570
593818
  total: facets.size,
@@ -597474,7 +597722,7 @@ var init_sessionStorage = __esm(() => {
597474
597722
  init_settings2();
597475
597723
  init_slowOperations();
597476
597724
  init_uuid();
597477
- VERSION6 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
597725
+ VERSION6 = typeof MACRO !== "undefined" ? "1.4.468" : "unknown";
597478
597726
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
597479
597727
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
597480
597728
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -598692,7 +598940,7 @@ var init_filesystem = __esm(() => {
598692
598940
  });
598693
598941
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
598694
598942
  const nonce = randomBytes19(16).toString("hex");
598695
- return join153(getClaudeTempDir(), "bundled-skills", "1.4.467", nonce);
598943
+ return join153(getClaudeTempDir(), "bundled-skills", "1.4.468", nonce);
598696
598944
  });
598697
598945
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
598698
598946
  });
@@ -603862,7 +604110,7 @@ __export(exports_update, {
603862
604110
  update: () => update
603863
604111
  });
603864
604112
  async function update() {
603865
- writeToStdout(`Current version: ${"1.4.467"}
604113
+ writeToStdout(`Current version: ${"1.4.468"}
603866
604114
  `);
603867
604115
  const isBundled = isInBundledMode();
603868
604116
  if (isBundled) {
@@ -603893,13 +604141,13 @@ Manual check: npm view ${"@rayu-dev/rayu-cli"} version
603893
604141
  process.exit(1);
603894
604142
  return;
603895
604143
  }
603896
- if (latestVersion === "1.4.467") {
604144
+ if (latestVersion === "1.4.468") {
603897
604145
  writeToStdout(source_default.green(`
603898
- Rayu CLI is up to date (${"1.4.467"})
604146
+ Rayu CLI is up to date (${"1.4.468"})
603899
604147
  `));
603900
604148
  process.exit(0);
603901
604149
  }
603902
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.4.467"})
604150
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.4.468"})
603903
604151
  `);
603904
604152
  writeToStdout(`Installing update...
603905
604153
 
@@ -603966,14 +604214,14 @@ async function updateNativeBinary() {
603966
604214
  } catch {
603967
604215
  latestVersion = "";
603968
604216
  }
603969
- if (latestVersion && latestVersion === "1.4.467") {
604217
+ if (latestVersion && latestVersion === "1.4.468") {
603970
604218
  writeToStdout(source_default.green(`
603971
- Rayu CLI is up to date (1.4.467)
604219
+ Rayu CLI is up to date (1.4.468)
603972
604220
  `));
603973
604221
  process.exit(0);
603974
604222
  }
603975
604223
  if (latestVersion) {
603976
- writeToStdout(`New version available: ${latestVersion} (current: 1.4.467)
604224
+ writeToStdout(`New version available: ${latestVersion} (current: 1.4.468)
603977
604225
  `);
603978
604226
  }
603979
604227
  writeToStdout(`Downloading and installing update...
@@ -603988,13 +604236,13 @@ Rayu CLI is up to date (1.4.467)
603988
604236
  return;
603989
604237
  }
603990
604238
  writeToStdout(source_default.green(`
603991
- Rayu CLI is up to date (1.4.467)
604239
+ Rayu CLI is up to date (1.4.468)
603992
604240
  `));
603993
604241
  process.exit(0);
603994
604242
  }
603995
604243
  const updatedTo = result.latestVersion ?? latestVersion ?? "latest";
603996
604244
  writeToStdout(source_default.green(`
603997
- Successfully updated from 1.4.467 to ${updatedTo}
604245
+ Successfully updated from 1.4.468 to ${updatedTo}
603998
604246
  `));
603999
604247
  writeToStdout(`Restart your terminal to use the new version.
604000
604248
  `);
@@ -604059,7 +604307,7 @@ async function removeDataDir(dir) {
604059
604307
  async function uninstall(args = []) {
604060
604308
  const yes = args.includes("--yes") || args.includes("-y");
604061
604309
  const keepData = args.includes("--keep-data");
604062
- writeToStdout(`Uninstalling Rayu CLI (${"1.4.467"})...
604310
+ writeToStdout(`Uninstalling Rayu CLI (${"1.4.468"})...
604063
604311
  `);
604064
604312
  writeToStdout(`Running: npm uninstall -g ${"@rayu-dev/rayu-cli"}
604065
604313
 
@@ -604093,7 +604341,7 @@ This looks like a permissions error on npm's global install
604093
604341
  return;
604094
604342
  }
604095
604343
  writeToStdout(source_default.green(`
604096
- Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.4.467"}
604344
+ Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.4.468"}
604097
604345
  `));
604098
604346
  const configDir = getRayuConfigHomeDir();
604099
604347
  const dataExists = existsSync28(configDir);
@@ -604176,7 +604424,7 @@ function showFirstRunWelcome() {
604176
604424
  `);
604177
604425
  try {
604178
604426
  mkdirSync16(getRayuConfigHomeDir(), { recursive: true });
604179
- writeFileSync18(markerPath(), "1.4.467", "utf8");
604427
+ writeFileSync18(markerPath(), "1.4.468", "utf8");
604180
604428
  } catch {}
604181
604429
  }
604182
604430
  var init_firstRun = __esm(() => {
@@ -620362,7 +620610,7 @@ async function initializeBetaTracing(resource) {
620362
620610
  });
620363
620611
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
620364
620612
  setLoggerProvider(loggerProvider);
620365
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.467");
620613
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.468");
620366
620614
  setEventLogger(eventLogger);
620367
620615
  process.on("beforeExit", async () => {
620368
620616
  await loggerProvider?.forceFlush();
@@ -620402,7 +620650,7 @@ async function initializeTelemetry() {
620402
620650
  const platform4 = getPlatform();
620403
620651
  const baseAttributes = {
620404
620652
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
620405
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.4.467"
620653
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.4.468"
620406
620654
  };
620407
620655
  if (platform4 === "wsl") {
620408
620656
  const wslVersion = getWslVersion();
@@ -620447,7 +620695,7 @@ async function initializeTelemetry() {
620447
620695
  } catch {}
620448
620696
  };
620449
620697
  registerCleanup(shutdownTelemetry2);
620450
- return meterProvider2.getMeter("com.anthropic.claude_code", "1.4.467");
620698
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.4.468");
620451
620699
  }
620452
620700
  const meterProvider = new import_sdk_metrics2.MeterProvider({
620453
620701
  resource,
@@ -620467,7 +620715,7 @@ async function initializeTelemetry() {
620467
620715
  });
620468
620716
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
620469
620717
  setLoggerProvider(loggerProvider);
620470
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.467");
620718
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.468");
620471
620719
  setEventLogger(eventLogger);
620472
620720
  logForDebugging("[3P telemetry] Event logger set successfully");
620473
620721
  process.on("beforeExit", async () => {
@@ -620529,7 +620777,7 @@ Current timeout: ${timeoutMs}ms
620529
620777
  }
620530
620778
  };
620531
620779
  registerCleanup(shutdownTelemetry);
620532
- return meterProvider.getMeter("com.anthropic.claude_code", "1.4.467");
620780
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.4.468");
620533
620781
  }
620534
620782
  async function flushTelemetry() {
620535
620783
  const meterProvider = getMeterProvider();
@@ -622031,7 +622279,7 @@ function buildSystemInitMessage(inputs) {
622031
622279
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
622032
622280
  apiKeySource: getAnthropicApiKeyWithSource().source,
622033
622281
  betas: getSdkBetas(),
622034
- claude_code_version: "1.4.467",
622282
+ claude_code_version: "1.4.468",
622035
622283
  output_style: outputStyle2,
622036
622284
  agents: inputs.agents.map((agent) => agent.agentType),
622037
622285
  skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
@@ -638362,7 +638610,7 @@ var init_useVoiceEnabled = __esm(() => {
638362
638610
  function getSemverPart(version3) {
638363
638611
  return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
638364
638612
  }
638365
- function useUpdateNotification(updatedVersion, initialVersion = "1.4.467") {
638613
+ function useUpdateNotification(updatedVersion, initialVersion = "1.4.468") {
638366
638614
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react216.useState(() => getSemverPart(initialVersion));
638367
638615
  if (!updatedVersion) {
638368
638616
  return null;
@@ -638402,7 +638650,7 @@ function AutoUpdater({
638402
638650
  return;
638403
638651
  }
638404
638652
  if (false) {}
638405
- const currentVersion = "1.4.467";
638653
+ const currentVersion = "1.4.468";
638406
638654
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
638407
638655
  let latestVersion = await getLatestVersion(channel2);
638408
638656
  const isDisabled = isAutoUpdaterDisabled();
@@ -638615,12 +638863,12 @@ function NativeAutoUpdater({
638615
638863
  logEvent("tengu_native_auto_updater_start", {});
638616
638864
  try {
638617
638865
  const maxVersion = await getMaxVersion();
638618
- if (maxVersion && gt("1.4.467", maxVersion)) {
638866
+ if (maxVersion && gt("1.4.468", maxVersion)) {
638619
638867
  const msg = await getMaxVersionMessage();
638620
638868
  setMaxVersionIssue(msg ?? "affects your version");
638621
638869
  }
638622
638870
  const result = await installLatest(channel2);
638623
- const currentVersion = "1.4.467";
638871
+ const currentVersion = "1.4.468";
638624
638872
  const latencyMs = Date.now() - startTime2;
638625
638873
  if (result.lockFailed) {
638626
638874
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -638757,17 +639005,17 @@ function PackageManagerAutoUpdater(t0) {
638757
639005
  const maxVersion = await getMaxVersion();
638758
639006
  if (maxVersion && latest && gt(latest, maxVersion)) {
638759
639007
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
638760
- if (gte("1.4.467", maxVersion)) {
638761
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.4.467"} is already at or above maxVersion ${maxVersion}, skipping update`);
639008
+ if (gte("1.4.468", maxVersion)) {
639009
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.4.468"} is already at or above maxVersion ${maxVersion}, skipping update`);
638762
639010
  setUpdateAvailable(false);
638763
639011
  return;
638764
639012
  }
638765
639013
  latest = maxVersion;
638766
639014
  }
638767
- const hasUpdate = latest && !gte("1.4.467", latest) && !shouldSkipVersion(latest);
639015
+ const hasUpdate = latest && !gte("1.4.468", latest) && !shouldSkipVersion(latest);
638768
639016
  setUpdateAvailable(!!hasUpdate);
638769
639017
  if (hasUpdate) {
638770
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.4.467"} -> ${latest}`);
639018
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.4.468"} -> ${latest}`);
638771
639019
  }
638772
639020
  };
638773
639021
  $3[0] = t1;
@@ -638801,7 +639049,7 @@ function PackageManagerAutoUpdater(t0) {
638801
639049
  wrap: "truncate",
638802
639050
  children: [
638803
639051
  "currentVersion: ",
638804
- "1.4.467"
639052
+ "1.4.468"
638805
639053
  ]
638806
639054
  });
638807
639055
  $3[3] = verbose;
@@ -646965,7 +647213,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
646965
647213
  project_dir: getOriginalCwd(),
646966
647214
  added_dirs: addedDirs
646967
647215
  },
646968
- version: "1.4.467",
647216
+ version: "1.4.468",
646969
647217
  output_style: {
646970
647218
  name: outputStyleName
646971
647219
  },
@@ -649144,7 +649392,7 @@ var init_user = __esm(() => {
649144
649392
  deviceId,
649145
649393
  sessionId: getSessionId(),
649146
649394
  email: getEmail(),
649147
- appVersion: "1.4.467",
649395
+ appVersion: "1.4.468",
649148
649396
  platform: getHostPlatformForAnalytics(),
649149
649397
  organizationUuid,
649150
649398
  accountUuid,
@@ -658583,7 +658831,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
658583
658831
  } catch {}
658584
658832
  const data = {
658585
658833
  trigger,
658586
- version: "1.4.467",
658834
+ version: "1.4.468",
658587
658835
  platform: process.platform,
658588
658836
  transcript,
658589
658837
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -670550,7 +670798,7 @@ function WelcomeV2() {
670550
670798
  dimColor: true,
670551
670799
  children: [
670552
670800
  "v",
670553
- "1.4.467"
670801
+ "1.4.468"
670554
670802
  ]
670555
670803
  })
670556
670804
  ]
@@ -671557,7 +671805,7 @@ function completeOnboarding() {
671557
671805
  saveGlobalConfig((current) => ({
671558
671806
  ...current,
671559
671807
  hasCompletedOnboarding: true,
671560
- lastOnboardingVersion: "1.4.467"
671808
+ lastOnboardingVersion: "1.4.468"
671561
671809
  }));
671562
671810
  }
671563
671811
  function showDialog(root2, renderer) {
@@ -676490,7 +676738,7 @@ function appendToLog(path29, message) {
676490
676738
  cwd: getFsImplementation().cwd(),
676491
676739
  userType: "external",
676492
676740
  sessionId: getSessionId(),
676493
- version: "1.4.467"
676741
+ version: "1.4.468"
676494
676742
  };
676495
676743
  getLogWriter(path29).write(messageWithTimestamp);
676496
676744
  }
@@ -680595,8 +680843,8 @@ async function getEnvLessBridgeConfig() {
680595
680843
  }
680596
680844
  async function checkEnvLessBridgeMinVersion() {
680597
680845
  const cfg = await getEnvLessBridgeConfig();
680598
- if (cfg.min_version && lt("1.4.467", cfg.min_version)) {
680599
- return `Your version of RAYU (${"1.4.467"}) is too old for Remote Control.
680846
+ if (cfg.min_version && lt("1.4.468", cfg.min_version)) {
680847
+ return `Your version of RAYU (${"1.4.468"}) is too old for Remote Control.
680600
680848
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
680601
680849
  }
680602
680850
  return null;
@@ -681069,7 +681317,7 @@ async function initBridgeCore(params) {
681069
681317
  const rawApi = createBridgeApiClient({
681070
681318
  baseUrl,
681071
681319
  getAccessToken,
681072
- runnerVersion: "1.4.467",
681320
+ runnerVersion: "1.4.468",
681073
681321
  onDebug: logForDebugging,
681074
681322
  onAuth401,
681075
681323
  getTrustedDeviceToken
@@ -686424,7 +686672,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
686424
686672
  setCwd(cwd3);
686425
686673
  const server = new Server({
686426
686674
  name: "claude/tengu",
686427
- version: "1.4.467"
686675
+ version: "1.4.468"
686428
686676
  }, {
686429
686677
  capabilities: {
686430
686678
  tools: {}
@@ -688950,7 +689198,7 @@ ${customInstructions}` : customInstructions;
688950
689198
  }
688951
689199
  }
688952
689200
  logForDiagnosticsNoPII("info", "started", {
688953
- version: "1.4.467",
689201
+ version: "1.4.468",
688954
689202
  is_native_binary: isInBundledMode()
688955
689203
  });
688956
689204
  registerCleanup(async () => {
@@ -689669,7 +689917,7 @@ Usage: rayu --remote "your task description"`, () => gracefulShutdown(1));
689669
689917
  pendingHookMessages
689670
689918
  }, renderAndRun);
689671
689919
  }
689672
- }).version(`1.4.467 (${PRODUCT_NAME})`, "-v, --version", "Output the version number");
689920
+ }).version(`1.4.468 (${PRODUCT_NAME})`, "-v, --version", "Output the version number");
689673
689921
  program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
689674
689922
  program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
689675
689923
  if (canUserConfigureAdvisor()) {
@@ -690129,7 +690377,7 @@ if (false) {}
690129
690377
  async function main2() {
690130
690378
  const args = process.argv.slice(2);
690131
690379
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
690132
- console.log(`${"1.4.467"} (Rayu-CLI)`);
690380
+ console.log(`${"1.4.468"} (Rayu-CLI)`);
690133
690381
  return;
690134
690382
  }
690135
690383
  if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayu-dev/rayu-cli",
3
- "version": "1.4.467",
3
+ "version": "1.4.468",
4
4
  "description": "Rayu-CLI — a multi-provider AI coding CLI",
5
5
  "type": "module",
6
6
  "bin": {