ur-agent 1.45.3 → 1.45.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -56931,6 +56931,7 @@ var init_kimiToolCalls = __esm(() => {
56931
56931
  var exports_ollama = {};
56932
56932
  __export(exports_ollama, {
56933
56933
  mergeToolCalls: () => mergeToolCalls,
56934
+ isOllamaCloudModel: () => isOllamaCloudModel2,
56934
56935
  getOllamaRequestTimeoutMs: () => getOllamaRequestTimeoutMs,
56935
56936
  getEffectiveOllamaBaseUrl: () => getEffectiveOllamaBaseUrl,
56936
56937
  createOllamaURHQClient: () => createOllamaURHQClient
@@ -56986,7 +56987,7 @@ async function createNonStreamingRequest(params, options) {
56986
56987
  return ollamaResponseToURHQMessage(json2, params);
56987
56988
  }
56988
56989
  async function fetchOllamaChat(params, stream4, controller, options) {
56989
- const timeout = getOllamaRequestTimeoutMs(options);
56990
+ const timeout = getOllamaRequestTimeoutMs(options, process.env, params.model);
56990
56991
  const timeoutId = timeout > 0 ? setTimeout(() => controller.abort(), timeout) : undefined;
56991
56992
  try {
56992
56993
  const capabilities = await getOllamaModelCapabilities(params.model, controller.signal);
@@ -57064,7 +57065,7 @@ function createLinkedAbortController(options) {
57064
57065
  signal.addEventListener("abort", () => controller.abort(), { once: true });
57065
57066
  return controller;
57066
57067
  }
57067
- function getOllamaRequestTimeoutMs(options, env4 = process.env) {
57068
+ function getOllamaRequestTimeoutMs(options, env4 = process.env, model) {
57068
57069
  if (options?.timeoutMs !== undefined || options?.timeout !== undefined) {
57069
57070
  return options.timeoutMs ?? options.timeout ?? DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS;
57070
57071
  }
@@ -57072,7 +57073,16 @@ function getOllamaRequestTimeoutMs(options, env4 = process.env) {
57072
57073
  if (override > 0) {
57073
57074
  return override;
57074
57075
  }
57075
- return isTruthyEnv(env4.UR_CODE_REMOTE) ? REMOTE_OLLAMA_REQUEST_TIMEOUT_MS : DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS;
57076
+ if (isTruthyEnv(env4.UR_CODE_REMOTE)) {
57077
+ return REMOTE_OLLAMA_REQUEST_TIMEOUT_MS;
57078
+ }
57079
+ if (isOllamaCloudModel2(model)) {
57080
+ return CLOUD_OLLAMA_REQUEST_TIMEOUT_MS;
57081
+ }
57082
+ return DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS;
57083
+ }
57084
+ function isOllamaCloudModel2(model) {
57085
+ return model?.trim().toLowerCase().endsWith(":cloud") ?? false;
57076
57086
  }
57077
57087
  function isTruthyEnv(value) {
57078
57088
  if (!value) {
@@ -57473,7 +57483,7 @@ async function* streamURHQEvents(response, params, controller, requestId, option
57473
57483
  }
57474
57484
  return events;
57475
57485
  };
57476
- for await (const chunk of readOllamaChunks(response, controller, getOllamaRequestTimeoutMs(options), options)) {
57486
+ for await (const chunk of readOllamaChunks(response, controller, getOllamaRequestTimeoutMs(options, process.env, params.model), options)) {
57477
57487
  if (chunk.error) {
57478
57488
  throw new Error(chunk.error);
57479
57489
  }
@@ -57920,7 +57930,7 @@ function parseToolInput(input) {
57920
57930
  }
57921
57931
  return parsed ?? {};
57922
57932
  }
57923
- var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, OLLAMA_GATEWAY_TIMEOUT_MESSAGE = "Ollama gateway timed out while waiting for the model to respond. Check the selected Ollama endpoint or increase API_TIMEOUT_MS if the model needs more time.", ollamaModelCapabilitiesCache, ollamaBaseUrlOverride, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT;
57933
+ var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, CLOUD_OLLAMA_REQUEST_TIMEOUT_MS = 120000, OLLAMA_GATEWAY_TIMEOUT_MESSAGE = "Ollama gateway timed out while waiting for the model to respond. Check the selected Ollama endpoint or increase API_TIMEOUT_MS if the model needs more time.", ollamaModelCapabilitiesCache, ollamaBaseUrlOverride, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT;
57924
57934
  var init_ollama = __esm(() => {
57925
57935
  init_urhq_sdk();
57926
57936
  init_ollamaModels();
@@ -61538,8 +61548,9 @@ function __resetOllamaRouteMemoForTests() {
61538
61548
  memoizedRoutedFastModel = undefined;
61539
61549
  }
61540
61550
  function getDefaultOllamaModel() {
61541
- if (process.env.OLLAMA_MODEL) {
61542
- return process.env.OLLAMA_MODEL;
61551
+ const explicitModel = process.env.OLLAMA_MODEL || process.env.UR_MODEL;
61552
+ if (explicitModel) {
61553
+ return explicitModel;
61543
61554
  }
61544
61555
  if (isOllamaAutoRouteEnabled()) {
61545
61556
  if (memoizedRoutedDefaultModel)
@@ -73086,7 +73097,7 @@ var init_auth = __esm(() => {
73086
73097
 
73087
73098
  // src/utils/userAgent.ts
73088
73099
  function getURCodeUserAgent() {
73089
- return `ur/${"1.45.3"}`;
73100
+ return `ur/${"1.45.5"}`;
73090
73101
  }
73091
73102
 
73092
73103
  // src/utils/workloadContext.ts
@@ -73108,7 +73119,7 @@ function getUserAgent() {
73108
73119
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
73109
73120
  const workload = getWorkload();
73110
73121
  const workloadSuffix = workload ? `, workload/${workload}` : "";
73111
- return `ur-cli/${"1.45.3"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
73122
+ return `ur-cli/${"1.45.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
73112
73123
  }
73113
73124
  function getMCPUserAgent() {
73114
73125
  const parts = [];
@@ -73122,7 +73133,7 @@ function getMCPUserAgent() {
73122
73133
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
73123
73134
  }
73124
73135
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
73125
- return `ur/${"1.45.3"}${suffix}`;
73136
+ return `ur/${"1.45.5"}${suffix}`;
73126
73137
  }
73127
73138
  function getWebFetchUserAgent() {
73128
73139
  return `UR-User (${getURCodeUserAgent()})`;
@@ -73260,7 +73271,7 @@ var init_user = __esm(() => {
73260
73271
  deviceId,
73261
73272
  sessionId: getSessionId(),
73262
73273
  email: getEmail(),
73263
- appVersion: "1.45.3",
73274
+ appVersion: "1.45.5",
73264
73275
  platform: getHostPlatformForAnalytics(),
73265
73276
  organizationUuid,
73266
73277
  accountUuid,
@@ -79835,7 +79846,7 @@ var init_metadata = __esm(() => {
79835
79846
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
79836
79847
  WHITESPACE_REGEX = /\s+/;
79837
79848
  getVersionBase = memoize_default(() => {
79838
- const match = "1.45.3".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
79849
+ const match = "1.45.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
79839
79850
  return match ? match[0] : undefined;
79840
79851
  });
79841
79852
  buildEnvContext = memoize_default(async () => {
@@ -79875,7 +79886,7 @@ var init_metadata = __esm(() => {
79875
79886
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
79876
79887
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
79877
79888
  isURAiAuth: isURAISubscriber(),
79878
- version: "1.45.3",
79889
+ version: "1.45.5",
79879
79890
  versionBase: getVersionBase(),
79880
79891
  buildTime: "",
79881
79892
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -80545,7 +80556,7 @@ function initialize1PEventLogging() {
80545
80556
  const platform2 = getPlatform();
80546
80557
  const attributes = {
80547
80558
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
80548
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.45.3"
80559
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.45.5"
80549
80560
  };
80550
80561
  if (platform2 === "wsl") {
80551
80562
  const wslVersion = getWslVersion();
@@ -80572,7 +80583,7 @@ function initialize1PEventLogging() {
80572
80583
  })
80573
80584
  ]
80574
80585
  });
80575
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.45.3");
80586
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.45.5");
80576
80587
  }
80577
80588
  async function reinitialize1PEventLoggingIfConfigChanged() {
80578
80589
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -86497,7 +86508,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
86497
86508
  function formatA2AAgentCard(options = {}, pretty = true) {
86498
86509
  return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
86499
86510
  }
86500
- var urVersion = "1.45.3", coverage, priorityRoadmap;
86511
+ var urVersion = "1.45.5", coverage, priorityRoadmap;
86501
86512
  var init_trends = __esm(() => {
86502
86513
  coverage = [
86503
86514
  {
@@ -88363,7 +88374,7 @@ function getAttributionHeader(fingerprint) {
88363
88374
  if (!isAttributionHeaderEnabled()) {
88364
88375
  return "";
88365
88376
  }
88366
- const version2 = `${"1.45.3"}.${fingerprint}`;
88377
+ const version2 = `${"1.45.5"}.${fingerprint}`;
88367
88378
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
88368
88379
  const cch = "";
88369
88380
  const workload = getWorkload();
@@ -146549,6 +146560,25 @@ var init_projectQuality = __esm(() => {
146549
146560
  });
146550
146561
 
146551
146562
  // src/services/verifier/doneDetector.ts
146563
+ function detectImmediateIntent(text) {
146564
+ const tail = text.trim().slice(-600);
146565
+ const clauses = tail.split(/(?:\n+|(?<=[.!?])\s+)/).map((clause2) => clause2.trim()).filter(Boolean);
146566
+ const clause = clauses.at(-1) ?? "";
146567
+ if (!clause || /^(?:if|when|once|after|before)\b/i.test(clause) || /\b(?:if|when|once|after|unless|until)\b.+$/i.test(clause)) {
146568
+ return null;
146569
+ }
146570
+ const lead = "(?:now[, :]*)?(?:let me|i(?:'ll| will| am going to|'m going to))";
146571
+ if (new RegExp(`\\b${lead}\\s+(?:now\\s+)?${WRITE_INTENT_VERBS}\\b`, "i").test(clause)) {
146572
+ return "write_intent";
146573
+ }
146574
+ if (new RegExp(`\\b${lead}\\s+(?:now\\s+)?${RUN_INTENT_VERBS}\\b`, "i").test(clause)) {
146575
+ return "run_intent";
146576
+ }
146577
+ if (new RegExp(`^${WRITE_INTENT_GERUNDS}\\b.*\\bnow[.!]?$`, "i").test(clause)) {
146578
+ return "write_intent";
146579
+ }
146580
+ return null;
146581
+ }
146552
146582
  function detectDoneClaim(text) {
146553
146583
  if (!text)
146554
146584
  return null;
@@ -146568,7 +146598,7 @@ function detectDoneClaim(text) {
146568
146598
  if (pattern.test(text))
146569
146599
  return "generic_done";
146570
146600
  }
146571
- return null;
146601
+ return detectImmediateIntent(text);
146572
146602
  }
146573
146603
  function evaluateDoneGate(claim, hasMutatingEffect, ranBash) {
146574
146604
  if (claim === "write_claim" || claim === "edit_claim" || claim === "delete_claim") {
@@ -146581,6 +146611,16 @@ function evaluateDoneGate(claim, hasMutatingEffect, ranBash) {
146581
146611
  reminder: "You claimed to have created, edited, or deleted files this turn but no Write / Edit / NotebookEdit / Bash tool call returned successfully. Make the actual tool call now, or correct the statement before continuing."
146582
146612
  };
146583
146613
  }
146614
+ if (claim === "write_intent") {
146615
+ if (hasMutatingEffect)
146616
+ return { ok: true };
146617
+ return {
146618
+ ok: false,
146619
+ claim,
146620
+ reason: "promised file action ended without a mutating tool call",
146621
+ reminder: "You ended by saying you were about to create, edit, or fix files, but no Write / Edit / NotebookEdit / Bash tool call returned successfully. Make the actual tool call now, or explain why you cannot continue."
146622
+ };
146623
+ }
146584
146624
  if (claim === "run_claim") {
146585
146625
  if (ranBash)
146586
146626
  return { ok: true };
@@ -146591,6 +146631,16 @@ function evaluateDoneGate(claim, hasMutatingEffect, ranBash) {
146591
146631
  reminder: "You claimed to have run a command this turn but no Bash tool call returned successfully. Run the command now or correct the statement."
146592
146632
  };
146593
146633
  }
146634
+ if (claim === "run_intent") {
146635
+ if (ranBash)
146636
+ return { ok: true };
146637
+ return {
146638
+ ok: false,
146639
+ claim,
146640
+ reason: "promised command ended without a successful Bash call",
146641
+ reminder: "You ended by saying you were about to run a command, but no Bash tool call returned successfully. Run the command now, or explain why you cannot continue."
146642
+ };
146643
+ }
146594
146644
  if (hasMutatingEffect || ranBash)
146595
146645
  return { ok: true };
146596
146646
  return {
@@ -146600,7 +146650,7 @@ function evaluateDoneGate(claim, hasMutatingEffect, ranBash) {
146600
146650
  reminder: "You declared the task complete but this turn made no Write / Edit / Bash / NotebookEdit tool call. If the task required no edits, say so explicitly. Otherwise, make the tool call now."
146601
146651
  };
146602
146652
  }
146603
- var DONE_PATTERNS;
146653
+ var DONE_PATTERNS, WRITE_INTENT_VERBS = "(?:create|write|edit|update|change|modify|patch|fix|remove|delete|rewrite|implement)", RUN_INTENT_VERBS = "(?:run|execute|test|build)", WRITE_INTENT_GERUNDS = "(?:creating|writing|editing|updating|changing|modifying|patching|fixing|removing|deleting|rewriting|implementing)";
146604
146654
  var init_doneDetector = __esm(() => {
146605
146655
  DONE_PATTERNS = [
146606
146656
  /\b(?:i|i've|i have)\s+(?:created|added|written|wrote|made)\b/i,
@@ -196544,7 +196594,7 @@ function getTelemetryAttributes() {
196544
196594
  attributes["session.id"] = sessionId;
196545
196595
  }
196546
196596
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
196547
- attributes["app.version"] = "1.45.3";
196597
+ attributes["app.version"] = "1.45.5";
196548
196598
  }
196549
196599
  const oauthAccount = getOauthAccountInfo();
196550
196600
  if (oauthAccount) {
@@ -232025,7 +232075,7 @@ function getInstallationEnv() {
232025
232075
  return;
232026
232076
  }
232027
232077
  function getURCodeVersion() {
232028
- return "1.45.3";
232078
+ return "1.45.5";
232029
232079
  }
232030
232080
  async function getInstalledVSCodeExtensionVersion(command) {
232031
232081
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -239407,7 +239457,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
239407
239457
  const client2 = new Client({
239408
239458
  name: "ur",
239409
239459
  title: "UR",
239410
- version: "1.45.3",
239460
+ version: "1.45.5",
239411
239461
  description: "UR-Nexus autonomous engineering workflow engine",
239412
239462
  websiteUrl: PRODUCT_URL
239413
239463
  }, {
@@ -239770,7 +239820,7 @@ var init_client5 = __esm(() => {
239770
239820
  const client2 = new Client({
239771
239821
  name: "ur",
239772
239822
  title: "UR",
239773
- version: "1.45.3",
239823
+ version: "1.45.5",
239774
239824
  description: "UR-Nexus autonomous engineering workflow engine",
239775
239825
  websiteUrl: PRODUCT_URL
239776
239826
  }, {
@@ -246807,9 +246857,9 @@ async function assertMinVersion() {
246807
246857
  if (false) {}
246808
246858
  try {
246809
246859
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
246810
- if (versionConfig.minVersion && lt("1.45.3", versionConfig.minVersion)) {
246860
+ if (versionConfig.minVersion && lt("1.45.5", versionConfig.minVersion)) {
246811
246861
  console.error(`
246812
- It looks like your version of UR (${"1.45.3"}) needs an update.
246862
+ It looks like your version of UR (${"1.45.5"}) needs an update.
246813
246863
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
246814
246864
 
246815
246865
  To update, please run:
@@ -247025,7 +247075,7 @@ async function installGlobalPackage(specificVersion) {
247025
247075
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
247026
247076
  logEvent("tengu_auto_updater_lock_contention", {
247027
247077
  pid: process.pid,
247028
- currentVersion: "1.45.3"
247078
+ currentVersion: "1.45.5"
247029
247079
  });
247030
247080
  return "in_progress";
247031
247081
  }
@@ -247034,7 +247084,7 @@ async function installGlobalPackage(specificVersion) {
247034
247084
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
247035
247085
  logError2(new Error("Windows NPM detected in WSL environment"));
247036
247086
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
247037
- currentVersion: "1.45.3"
247087
+ currentVersion: "1.45.5"
247038
247088
  });
247039
247089
  console.error(`
247040
247090
  Error: Windows NPM detected in WSL
@@ -247569,7 +247619,7 @@ function detectLinuxGlobPatternWarnings() {
247569
247619
  }
247570
247620
  async function getDoctorDiagnostic() {
247571
247621
  const installationType = await getCurrentInstallationType();
247572
- const version2 = typeof MACRO !== "undefined" ? "1.45.3" : "unknown";
247622
+ const version2 = typeof MACRO !== "undefined" ? "1.45.5" : "unknown";
247573
247623
  const installationPath = await getInstallationPath();
247574
247624
  const invokedBinary = getInvokedBinary();
247575
247625
  const multipleInstallations = await detectMultipleInstallations();
@@ -248504,8 +248554,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
248504
248554
  const maxVersion = await getMaxVersion();
248505
248555
  if (maxVersion && gt(version2, maxVersion)) {
248506
248556
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
248507
- if (gte("1.45.3", maxVersion)) {
248508
- logForDebugging(`Native installer: current version ${"1.45.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
248557
+ if (gte("1.45.5", maxVersion)) {
248558
+ logForDebugging(`Native installer: current version ${"1.45.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
248509
248559
  logEvent("tengu_native_update_skipped_max_version", {
248510
248560
  latency_ms: Date.now() - startTime,
248511
248561
  max_version: maxVersion,
@@ -248516,7 +248566,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
248516
248566
  version2 = maxVersion;
248517
248567
  }
248518
248568
  }
248519
- if (!forceReinstall && version2 === "1.45.3" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
248569
+ if (!forceReinstall && version2 === "1.45.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
248520
248570
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
248521
248571
  logEvent("tengu_native_update_complete", {
248522
248572
  latency_ms: Date.now() - startTime,
@@ -346376,7 +346426,7 @@ function Feedback({
346376
346426
  platform: env2.platform,
346377
346427
  gitRepo: envInfo.isGit,
346378
346428
  terminal: env2.terminal,
346379
- version: "1.45.3",
346429
+ version: "1.45.5",
346380
346430
  transcript: normalizeMessagesForAPI(messages),
346381
346431
  errors: sanitizedErrors,
346382
346432
  lastApiRequest: getLastAPIRequest(),
@@ -346568,7 +346618,7 @@ function Feedback({
346568
346618
  ", ",
346569
346619
  env2.terminal,
346570
346620
  ", v",
346571
- "1.45.3"
346621
+ "1.45.5"
346572
346622
  ]
346573
346623
  }, undefined, true, undefined, this)
346574
346624
  ]
@@ -346674,7 +346724,7 @@ ${sanitizedDescription}
346674
346724
  ` + `**Environment Info**
346675
346725
  ` + `- Platform: ${env2.platform}
346676
346726
  ` + `- Terminal: ${env2.terminal}
346677
- ` + `- Version: ${"1.45.3"}
346727
+ ` + `- Version: ${"1.45.5"}
346678
346728
  ` + `- Feedback ID: ${feedbackId}
346679
346729
  ` + `
346680
346730
  **Errors**
@@ -349785,7 +349835,7 @@ function buildPrimarySection() {
349785
349835
  }, undefined, false, undefined, this);
349786
349836
  return [{
349787
349837
  label: "Version",
349788
- value: "1.45.3"
349838
+ value: "1.45.5"
349789
349839
  }, {
349790
349840
  label: "Session name",
349791
349841
  value: nameValue
@@ -353115,7 +353165,7 @@ function Config({
353115
353165
  }
353116
353166
  }, undefined, false, undefined, this)
353117
353167
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
353118
- currentVersion: "1.45.3",
353168
+ currentVersion: "1.45.5",
353119
353169
  onChoice: (choice) => {
353120
353170
  setShowSubmenu(null);
353121
353171
  setTabsHidden(false);
@@ -353127,7 +353177,7 @@ function Config({
353127
353177
  autoUpdatesChannel: "stable"
353128
353178
  };
353129
353179
  if (choice === "stay") {
353130
- newSettings.minimumVersion = "1.45.3";
353180
+ newSettings.minimumVersion = "1.45.5";
353131
353181
  }
353132
353182
  updateSettingsForSource("userSettings", newSettings);
353133
353183
  setSettingsData((prev_27) => ({
@@ -361197,7 +361247,7 @@ function HelpV2(t0) {
361197
361247
  let t6;
361198
361248
  if ($3[31] !== tabs) {
361199
361249
  t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
361200
- title: `UR v${"1.45.3"}`,
361250
+ title: `UR v${"1.45.5"}`,
361201
361251
  color: "professionalBlue",
361202
361252
  defaultTab: "general",
361203
361253
  children: tabs
@@ -361971,7 +362021,7 @@ function buildToolUseContext(tools, readFileStateCache) {
361971
362021
  async function handleInitialize(options2) {
361972
362022
  return {
361973
362023
  name: "UR",
361974
- version: "1.45.3",
362024
+ version: "1.45.5",
361975
362025
  protocolVersion: "0.1.0",
361976
362026
  workspaceRoot: options2.cwd,
361977
362027
  capabilities: {
@@ -382113,7 +382163,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
382113
382163
  return [];
382114
382164
  }
382115
382165
  }
382116
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.45.3") {
382166
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.45.5") {
382117
382167
  if (process.env.USER_TYPE === "ant") {
382118
382168
  const changelog = "";
382119
382169
  if (changelog) {
@@ -382140,7 +382190,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.45.3")
382140
382190
  releaseNotes
382141
382191
  };
382142
382192
  }
382143
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.45.3") {
382193
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.45.5") {
382144
382194
  if (process.env.USER_TYPE === "ant") {
382145
382195
  const changelog = "";
382146
382196
  if (changelog) {
@@ -385232,7 +385282,7 @@ function getRecentActivitySync() {
385232
385282
  return cachedActivity;
385233
385283
  }
385234
385284
  function getLogoDisplayData() {
385235
- const version2 = process.env.DEMO_VERSION ?? "1.45.3";
385285
+ const version2 = process.env.DEMO_VERSION ?? "1.45.5";
385236
385286
  const serverUrl = getDirectConnectServerUrl();
385237
385287
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
385238
385288
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -386116,7 +386166,7 @@ function LogoV2() {
386116
386166
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
386117
386167
  t2 = () => {
386118
386168
  const currentConfig2 = getGlobalConfig();
386119
- if (currentConfig2.lastReleaseNotesSeen === "1.45.3") {
386169
+ if (currentConfig2.lastReleaseNotesSeen === "1.45.5") {
386120
386170
  return;
386121
386171
  }
386122
386172
  saveGlobalConfig(_temp327);
@@ -386801,12 +386851,12 @@ function LogoV2() {
386801
386851
  return t41;
386802
386852
  }
386803
386853
  function _temp327(current) {
386804
- if (current.lastReleaseNotesSeen === "1.45.3") {
386854
+ if (current.lastReleaseNotesSeen === "1.45.5") {
386805
386855
  return current;
386806
386856
  }
386807
386857
  return {
386808
386858
  ...current,
386809
- lastReleaseNotesSeen: "1.45.3"
386859
+ lastReleaseNotesSeen: "1.45.5"
386810
386860
  };
386811
386861
  }
386812
386862
  function _temp243(s_0) {
@@ -604849,7 +604899,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
604849
604899
  smapsRollup,
604850
604900
  platform: process.platform,
604851
604901
  nodeVersion: process.version,
604852
- ccVersion: "1.45.3"
604902
+ ccVersion: "1.45.5"
604853
604903
  };
604854
604904
  }
604855
604905
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -605435,7 +605485,7 @@ var init_bridge_kick = __esm(() => {
605435
605485
  var call143 = async () => {
605436
605486
  return {
605437
605487
  type: "text",
605438
- value: "1.45.3"
605488
+ value: "1.45.5"
605439
605489
  };
605440
605490
  }, version2, version_default;
605441
605491
  var init_version = __esm(() => {
@@ -616545,7 +616595,7 @@ function generateHtmlReport(data, insights) {
616545
616595
  </html>`;
616546
616596
  }
616547
616597
  function buildExportData(data, insights, facets, remoteStats) {
616548
- const version3 = typeof MACRO !== "undefined" ? "1.45.3" : "unknown";
616598
+ const version3 = typeof MACRO !== "undefined" ? "1.45.5" : "unknown";
616549
616599
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
616550
616600
  const facets_summary = {
616551
616601
  total: facets.size,
@@ -620874,7 +620924,7 @@ var init_sessionStorage = __esm(() => {
620874
620924
  init_settings2();
620875
620925
  init_slowOperations();
620876
620926
  init_uuid();
620877
- VERSION5 = typeof MACRO !== "undefined" ? "1.45.3" : "unknown";
620927
+ VERSION5 = typeof MACRO !== "undefined" ? "1.45.5" : "unknown";
620878
620928
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
620879
620929
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
620880
620930
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -622079,7 +622129,7 @@ var init_filesystem = __esm(() => {
622079
622129
  });
622080
622130
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
622081
622131
  const nonce = randomBytes18(16).toString("hex");
622082
- return join211(getURTempDir(), "bundled-skills", "1.45.3", nonce);
622132
+ return join211(getURTempDir(), "bundled-skills", "1.45.5", nonce);
622083
622133
  });
622084
622134
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
622085
622135
  });
@@ -628374,7 +628424,7 @@ function computeFingerprint(messageText2, version3) {
628374
628424
  }
628375
628425
  function computeFingerprintFromMessages(messages) {
628376
628426
  const firstMessageText = extractFirstMessageText(messages);
628377
- return computeFingerprint(firstMessageText, "1.45.3");
628427
+ return computeFingerprint(firstMessageText, "1.45.5");
628378
628428
  }
628379
628429
  var FINGERPRINT_SALT = "59cf53e54c78";
628380
628430
  var init_fingerprint = () => {};
@@ -628762,14 +628812,20 @@ function shouldDeferLspTool(tool) {
628762
628812
  const status2 = getInitializationStatus();
628763
628813
  return status2.status === "pending" || status2.status === "not-started";
628764
628814
  }
628765
- function getNonstreamingFallbackTimeoutMs() {
628766
- const override = parseInt(process.env.API_TIMEOUT_MS || "", 10);
628815
+ function isOllamaCloudRuntime(model, provider = getAPIProvider()) {
628816
+ return provider === "ollama" && model.trim().toLowerCase().endsWith(":cloud");
628817
+ }
628818
+ function getNonstreamingFallbackTimeoutMs(model, env4 = process.env, provider = getAPIProvider()) {
628819
+ const override = parseInt(env4.API_TIMEOUT_MS || "", 10);
628767
628820
  if (override)
628768
628821
  return override;
628769
- return isEnvTruthy(process.env.UR_CODE_REMOTE) ? 120000 : 300000;
628822
+ return isEnvTruthy(env4.UR_CODE_REMOTE) || isOllamaCloudRuntime(model, provider) ? 120000 : 300000;
628823
+ }
628824
+ function shouldSkipOllamaNonStreamingFallback(error40, model, provider = getAPIProvider()) {
628825
+ return isOllamaCloudRuntime(model, provider) && error40 instanceof APIConnectionTimeoutError && error40.message === "Ollama stream timed out";
628770
628826
  }
628771
628827
  async function* executeNonStreamingRequest(clientOptions, retryOptions, paramsFromContext, onAttempt, captureRequest, originatingRequestId) {
628772
- const fallbackTimeoutMs = getNonstreamingFallbackTimeoutMs();
628828
+ const fallbackTimeoutMs = getNonstreamingFallbackTimeoutMs(clientOptions.model);
628773
628829
  const generator = withRetry(() => getURHQClient({
628774
628830
  maxRetries: 0,
628775
628831
  model: clientOptions.model,
@@ -628803,6 +628859,7 @@ async function* executeNonStreamingRequest(clientOptions, retryOptions, paramsFr
628803
628859
  throw err2;
628804
628860
  }
628805
628861
  }, {
628862
+ ...isOllamaCloudRuntime(retryOptions.model) ? { maxRetries: 0 } : {},
628806
628863
  model: retryOptions.model,
628807
628864
  fallbackModel: retryOptions.fallbackModel,
628808
628865
  thinkingConfig: retryOptions.thinkingConfig,
@@ -629282,6 +629339,7 @@ ${deferredToolList}
629282
629339
  streamResponse = result.response;
629283
629340
  return result.data;
629284
629341
  }, {
629342
+ ...isOllamaCloudRuntime(options2.model) ? { maxRetries: 0 } : {},
629285
629343
  model: options2.model,
629286
629344
  fallbackModel: options2.fallbackModel,
629287
629345
  thinkingConfig,
@@ -629626,6 +629684,9 @@ ${deferredToolList}
629626
629684
  throw new APIConnectionTimeoutError({ message: "Request timed out" });
629627
629685
  }
629628
629686
  }
629687
+ if (shouldSkipOllamaNonStreamingFallback(streamingError, options2.model)) {
629688
+ throw streamingError;
629689
+ }
629629
629690
  const disableFallback = isEnvTruthy(process.env.UR_CODE_DISABLE_NONSTREAMING_FALLBACK) || getFeatureValue_CACHED_MAY_BE_STALE("tengu_disable_streaming_to_non_streaming_fallback", false);
629630
629691
  if (disableFallback) {
629631
629692
  logForDebugging(`Error streaming (non-streaming fallback disabled): ${errorMessage2(streamingError)}`, { level: "error" });
@@ -630248,7 +630309,7 @@ async function sideQuery(opts) {
630248
630309
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
630249
630310
  }
630250
630311
  const messageText2 = extractFirstUserMessageText(messages);
630251
- const fingerprint2 = computeFingerprint(messageText2, "1.45.3");
630312
+ const fingerprint2 = computeFingerprint(messageText2, "1.45.5");
630252
630313
  const attributionHeader = getAttributionHeader(fingerprint2);
630253
630314
  const systemBlocks = [
630254
630315
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -634985,7 +635046,7 @@ function buildSystemInitMessage(inputs) {
634985
635046
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
634986
635047
  apiKeySource: getURHQApiKeyWithSource().source,
634987
635048
  betas: getSdkBetas(),
634988
- ur_version: "1.45.3",
635049
+ ur_version: "1.45.5",
634989
635050
  output_style: outputStyle2,
634990
635051
  agents: inputs.agents.map((agent) => agent.agentType),
634991
635052
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -648845,7 +648906,7 @@ var init_useVoiceEnabled = __esm(() => {
648845
648906
  function getSemverPart(version3) {
648846
648907
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
648847
648908
  }
648848
- function useUpdateNotification(updatedVersion, initialVersion = "1.45.3") {
648909
+ function useUpdateNotification(updatedVersion, initialVersion = "1.45.5") {
648849
648910
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
648850
648911
  if (!updatedVersion) {
648851
648912
  return null;
@@ -648894,7 +648955,7 @@ function AutoUpdater({
648894
648955
  return;
648895
648956
  }
648896
648957
  if (false) {}
648897
- const currentVersion = "1.45.3";
648958
+ const currentVersion = "1.45.5";
648898
648959
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
648899
648960
  let latestVersion = await getLatestVersion(channel);
648900
648961
  const isDisabled = isAutoUpdaterDisabled();
@@ -649123,12 +649184,12 @@ function NativeAutoUpdater({
649123
649184
  logEvent("tengu_native_auto_updater_start", {});
649124
649185
  try {
649125
649186
  const maxVersion = await getMaxVersion();
649126
- if (maxVersion && gt("1.45.3", maxVersion)) {
649187
+ if (maxVersion && gt("1.45.5", maxVersion)) {
649127
649188
  const msg = await getMaxVersionMessage();
649128
649189
  setMaxVersionIssue(msg ?? "affects your version");
649129
649190
  }
649130
649191
  const result = await installLatest(channel);
649131
- const currentVersion = "1.45.3";
649192
+ const currentVersion = "1.45.5";
649132
649193
  const latencyMs = Date.now() - startTime;
649133
649194
  if (result.lockFailed) {
649134
649195
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -649265,17 +649326,17 @@ function PackageManagerAutoUpdater(t0) {
649265
649326
  const maxVersion = await getMaxVersion();
649266
649327
  if (maxVersion && latest && gt(latest, maxVersion)) {
649267
649328
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
649268
- if (gte("1.45.3", maxVersion)) {
649269
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.45.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
649329
+ if (gte("1.45.5", maxVersion)) {
649330
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.45.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
649270
649331
  setUpdateAvailable(false);
649271
649332
  return;
649272
649333
  }
649273
649334
  latest = maxVersion;
649274
649335
  }
649275
- const hasUpdate = latest && !gte("1.45.3", latest) && !shouldSkipVersion(latest);
649336
+ const hasUpdate = latest && !gte("1.45.5", latest) && !shouldSkipVersion(latest);
649276
649337
  setUpdateAvailable(!!hasUpdate);
649277
649338
  if (hasUpdate) {
649278
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.45.3"} -> ${latest}`);
649339
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.45.5"} -> ${latest}`);
649279
649340
  }
649280
649341
  };
649281
649342
  $3[0] = t1;
@@ -649309,7 +649370,7 @@ function PackageManagerAutoUpdater(t0) {
649309
649370
  wrap: "truncate",
649310
649371
  children: [
649311
649372
  "currentVersion: ",
649312
- "1.45.3"
649373
+ "1.45.5"
649313
649374
  ]
649314
649375
  }, undefined, true, undefined, this);
649315
649376
  $3[3] = verbose;
@@ -660006,7 +660067,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
660006
660067
  project_dir: getOriginalCwd(),
660007
660068
  added_dirs: addedDirs
660008
660069
  },
660009
- version: "1.45.3",
660070
+ version: "1.45.5",
660010
660071
  output_style: {
660011
660072
  name: outputStyleName
660012
660073
  },
@@ -660089,7 +660150,7 @@ function StatusLineInner({
660089
660150
  const taskValues = Object.values(tasks2);
660090
660151
  const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
660091
660152
  const defaultStatusLineText = buildDefaultStatusBar({
660092
- version: "1.45.3",
660153
+ version: "1.45.5",
660093
660154
  providerLabel: providerRuntime.providerLabel,
660094
660155
  authMode: providerRuntime.authLabel,
660095
660156
  model: providerRuntime.model ?? renderModelName(mainLoopModel),
@@ -672082,7 +672143,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
672082
672143
  } catch {}
672083
672144
  const data = {
672084
672145
  trigger: trigger2,
672085
- version: "1.45.3",
672146
+ version: "1.45.5",
672086
672147
  platform: process.platform,
672087
672148
  transcript,
672088
672149
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -684368,7 +684429,7 @@ function WelcomeV2() {
684368
684429
  dimColor: true,
684369
684430
  children: [
684370
684431
  "v",
684371
- "1.45.3"
684432
+ "1.45.5"
684372
684433
  ]
684373
684434
  }, undefined, true, undefined, this)
684374
684435
  ]
@@ -685628,7 +685689,7 @@ function completeOnboarding() {
685628
685689
  saveGlobalConfig((current) => ({
685629
685690
  ...current,
685630
685691
  hasCompletedOnboarding: true,
685631
- lastOnboardingVersion: "1.45.3"
685692
+ lastOnboardingVersion: "1.45.5"
685632
685693
  }));
685633
685694
  }
685634
685695
  function showDialog(root2, renderer) {
@@ -689975,6 +690036,23 @@ var init_ollamaDiscovery = __esm(() => {
689975
690036
  init_ollamaModels();
689976
690037
  });
689977
690038
 
690039
+ // src/services/providers/startupModelSelection.ts
690040
+ function isNonEmptyModel(value) {
690041
+ return typeof value === "string" && value.trim().length > 0;
690042
+ }
690043
+ function settingsSelectModel(settings) {
690044
+ return isNonEmptyModel(settings?.provider?.model) || isNonEmptyModel(settings?.model);
690045
+ }
690046
+ function shouldRequireStartupModelSelection(context4) {
690047
+ if (context4.isResume || context4.skipsModelExecution)
690048
+ return false;
690049
+ if (context4.explicitModels?.some(isNonEmptyModel))
690050
+ return false;
690051
+ if (context4.workspaceSettings?.some(settingsSelectModel))
690052
+ return false;
690053
+ return true;
690054
+ }
690055
+
689978
690056
  // src/utils/telemetry/skillLoadedEvent.ts
689979
690057
  async function logSkillsLoaded(cwd2, contextWindowTokens) {
689980
690058
  const skills2 = await getSkillToolCommands(cwd2);
@@ -690633,7 +690711,7 @@ function appendToLog(path24, message) {
690633
690711
  cwd: getFsImplementation().cwd(),
690634
690712
  userType: process.env.USER_TYPE,
690635
690713
  sessionId: getSessionId(),
690636
- version: "1.45.3"
690714
+ version: "1.45.5"
690637
690715
  };
690638
690716
  getLogWriter(path24).write(messageWithTimestamp);
690639
690717
  }
@@ -694792,8 +694870,8 @@ async function getEnvLessBridgeConfig() {
694792
694870
  }
694793
694871
  async function checkEnvLessBridgeMinVersion() {
694794
694872
  const cfg = await getEnvLessBridgeConfig();
694795
- if (cfg.min_version && lt("1.45.3", cfg.min_version)) {
694796
- return `Your version of UR (${"1.45.3"}) is too old for Remote Control.
694873
+ if (cfg.min_version && lt("1.45.5", cfg.min_version)) {
694874
+ return `Your version of UR (${"1.45.5"}) is too old for Remote Control.
694797
694875
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
694798
694876
  }
694799
694877
  return null;
@@ -695267,7 +695345,7 @@ async function initBridgeCore(params) {
695267
695345
  const rawApi = createBridgeApiClient({
695268
695346
  baseUrl,
695269
695347
  getAccessToken,
695270
- runnerVersion: "1.45.3",
695348
+ runnerVersion: "1.45.5",
695271
695349
  onDebug: logForDebugging,
695272
695350
  onAuth401,
695273
695351
  getTrustedDeviceToken
@@ -700949,7 +701027,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
700949
701027
  setCwd(cwd3);
700950
701028
  const server2 = new Server({
700951
701029
  name: "ur/tengu",
700952
- version: "1.45.3"
701030
+ version: "1.45.5"
700953
701031
  }, {
700954
701032
  capabilities: {
700955
701033
  tools: {}
@@ -702991,7 +703069,7 @@ async function update() {
702991
703069
  logEvent("tengu_update_check", {});
702992
703070
  const diagnostic = await getDoctorDiagnostic();
702993
703071
  const result = await checkUpgradeStatus({
702994
- currentVersion: "1.45.3",
703072
+ currentVersion: "1.45.5",
702995
703073
  packageName: UR_AGENT_PACKAGE_NAME,
702996
703074
  installationType: diagnostic.installationType,
702997
703075
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -704014,37 +704092,33 @@ ${inputPrompt}` : mainThreadAgentDefinition.initialPrompt;
704014
704092
  effectiveModel = parseUserSpecifiedModel(mainThreadAgentDefinition.model);
704015
704093
  }
704016
704094
  setMainLoopModelOverride(effectiveModel);
704017
- if (getAPIProvider() === "ollama" && !getUserSpecifiedModelSetting()) {
704095
+ const requiresStartupModelSelection = shouldRequireStartupModelSelection({
704096
+ explicitModels: [
704097
+ options2.model,
704098
+ process.env.URHQ_MODEL,
704099
+ process.env.OLLAMA_MODEL,
704100
+ process.env.UR_MODEL,
704101
+ mainThreadAgentDefinition?.model === "inherit" ? undefined : mainThreadAgentDefinition?.model
704102
+ ],
704103
+ workspaceSettings: [
704104
+ getSettingsForSource("projectSettings"),
704105
+ getSettingsForSource("localSettings"),
704106
+ getSettingsForSource("flagSettings"),
704107
+ getSettingsForSource("policySettings")
704108
+ ],
704109
+ isResume: Boolean(options2.continue || options2.resume || options2.fromPr || teleport || remote !== null),
704110
+ skipsModelExecution: initOnly
704111
+ });
704112
+ if (requiresStartupModelSelection && isNonInteractiveSession) {
704113
+ process.stderr.write(source_default.red("Error: No model has been selected for this workspace. Run `ur` interactively to choose a provider and model, or pass `--model <model>` for this run.\n"));
704114
+ process.exit(1);
704115
+ }
704116
+ if (!requiresStartupModelSelection && getAPIProvider() === "ollama" && !getUserSpecifiedModelSetting()) {
704018
704117
  await listOllamaModelNames(AbortSignal.timeout(750)).catch(() => {});
704019
704118
  }
704020
- setInitialMainLoopModel(getUserSpecifiedModelSetting() || null);
704021
- const initialMainLoopModel = getInitialMainLoopModel();
704022
- const resolvedInitialModel = parseUserSpecifiedModel(initialMainLoopModel ?? getDefaultMainLoopModel());
704023
- await refreshOllamaModelMetadata(resolvedInitialModel, {
704024
- timeoutMs: 750
704025
- });
704119
+ let initialMainLoopModel = getInitialMainLoopModel();
704120
+ let resolvedInitialModel;
704026
704121
  let advisorModel;
704027
- if (isAdvisorEnabled()) {
704028
- const advisorOption = canUserConfigureAdvisor() ? options2.advisor : undefined;
704029
- if (advisorOption) {
704030
- logForDebugging(`[AdvisorTool] --advisor ${advisorOption}`);
704031
- if (!modelSupportsAdvisor(resolvedInitialModel)) {
704032
- process.stderr.write(source_default.red(`Error: The model "${resolvedInitialModel}" does not support the advisor tool.
704033
- `));
704034
- process.exit(1);
704035
- }
704036
- const normalizedAdvisorModel = normalizeModelStringForAPI(parseUserSpecifiedModel(advisorOption));
704037
- if (!isValidAdvisorModel(normalizedAdvisorModel)) {
704038
- process.stderr.write(source_default.red(`Error: The model "${advisorOption}" cannot be used as an advisor.
704039
- `));
704040
- process.exit(1);
704041
- }
704042
- }
704043
- advisorModel = canUserConfigureAdvisor() ? advisorOption ?? getInitialAdvisorSetting() : advisorOption;
704044
- if (advisorModel) {
704045
- logForDebugging(`[AdvisorTool] Advisor model: ${advisorModel}`);
704046
- }
704047
- }
704048
704122
  if (isAgentSwarmsEnabled() && storedTeammateOpts?.agentId && storedTeammateOpts?.agentName && storedTeammateOpts?.teamName && storedTeammateOpts?.agentType) {
704049
704123
  const customAgent = agentDefinitions.activeAgents.find((a2) => a2.agentType === storedTeammateOpts.agentType);
704050
704124
  if (customAgent) {
@@ -704159,6 +704233,45 @@ ${customInstructions}` : customInstructions;
704159
704233
  });
704160
704234
  }
704161
704235
  }
704236
+ if (requiresStartupModelSelection) {
704237
+ const selectedModel = await showSetupDialog(root2, (done) => /* @__PURE__ */ jsx_dev_runtime495.jsxDEV(ProviderFirstModelPicker, {
704238
+ initial: null,
704239
+ headerText: "Choose a provider and model for this workspace. The validated choice is saved locally before the first session starts.",
704240
+ onSelect: (model) => {
704241
+ if (model)
704242
+ done(model);
704243
+ }
704244
+ }, undefined, false, undefined, this));
704245
+ effectiveModel = selectedModel;
704246
+ setMainLoopModelOverride(selectedModel);
704247
+ }
704248
+ setInitialMainLoopModel(getUserSpecifiedModelSetting() || null);
704249
+ initialMainLoopModel = getInitialMainLoopModel();
704250
+ resolvedInitialModel = parseUserSpecifiedModel(initialMainLoopModel ?? getDefaultMainLoopModel());
704251
+ await refreshOllamaModelMetadata(resolvedInitialModel, {
704252
+ timeoutMs: 750
704253
+ });
704254
+ if (isAdvisorEnabled()) {
704255
+ const advisorOption = canUserConfigureAdvisor() ? options2.advisor : undefined;
704256
+ if (advisorOption) {
704257
+ logForDebugging(`[AdvisorTool] --advisor ${advisorOption}`);
704258
+ if (!modelSupportsAdvisor(resolvedInitialModel)) {
704259
+ process.stderr.write(source_default.red(`Error: The model "${resolvedInitialModel}" does not support the advisor tool.
704260
+ `));
704261
+ process.exit(1);
704262
+ }
704263
+ const normalizedAdvisorModel = normalizeModelStringForAPI(parseUserSpecifiedModel(advisorOption));
704264
+ if (!isValidAdvisorModel(normalizedAdvisorModel)) {
704265
+ process.stderr.write(source_default.red(`Error: The model "${advisorOption}" cannot be used as an advisor.
704266
+ `));
704267
+ process.exit(1);
704268
+ }
704269
+ }
704270
+ advisorModel = canUserConfigureAdvisor() ? advisorOption ?? getInitialAdvisorSetting() : advisorOption;
704271
+ if (advisorModel) {
704272
+ logForDebugging(`[AdvisorTool] Advisor model: ${advisorModel}`);
704273
+ }
704274
+ }
704162
704275
  const bgRefreshThrottleMs = getFeatureValue_CACHED_MAY_BE_STALE("tengu_cicada_nap_ms", 0);
704163
704276
  const lastPrefetched = getGlobalConfig().startupPrefetchedAt ?? 0;
704164
704277
  const skipStartupPrefetches = isBareMode() || bgRefreshThrottleMs > 0 && Date.now() - lastPrefetched < bgRefreshThrottleMs;
@@ -704267,7 +704380,7 @@ ${customInstructions}` : customInstructions;
704267
704380
  }
704268
704381
  }
704269
704382
  logForDiagnosticsNoPII("info", "started", {
704270
- version: "1.45.3",
704383
+ version: "1.45.5",
704271
704384
  is_native_binary: isInBundledMode()
704272
704385
  });
704273
704386
  registerCleanup(async () => {
@@ -705053,7 +705166,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
705053
705166
  pendingHookMessages
705054
705167
  }, renderAndRun);
705055
705168
  }
705056
- }).version("1.45.3 (UR-Nexus)", "-v, --version", "Output the version number");
705169
+ }).version("1.45.5 (UR-Nexus)", "-v, --version", "Output the version number");
705057
705170
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
705058
705171
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
705059
705172
  if (canUserConfigureAdvisor()) {
@@ -705954,6 +706067,7 @@ var init_main3 = __esm(() => {
705954
706067
  init_createDirectConnectSession();
705955
706068
  init_manager();
705956
706069
  init_promptSuggestion();
706070
+ init_ProviderFirstModelPicker();
705957
706071
  init_AppStateStore();
705958
706072
  init_onChangeAppState();
705959
706073
  init_ids();
@@ -705988,7 +706102,7 @@ if (false) {}
705988
706102
  async function main2() {
705989
706103
  const args = process.argv.slice(2);
705990
706104
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
705991
- console.log(`${"1.45.3"} (UR-Nexus)`);
706105
+ console.log(`${"1.45.5"} (UR-Nexus)`);
705992
706106
  return;
705993
706107
  }
705994
706108
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {