ur-agent 1.65.11 → 1.65.12

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
@@ -57328,6 +57328,7 @@ __export(exports_ollama, {
57328
57328
  mergeToolCalls: () => mergeToolCalls,
57329
57329
  isOllamaCloudModel: () => isOllamaCloudModel2,
57330
57330
  getOllamaRequestTimeoutMs: () => getOllamaRequestTimeoutMs,
57331
+ getOllamaModelDefaultTimeoutMs: () => getOllamaModelDefaultTimeoutMs,
57331
57332
  getEffectiveOllamaBaseUrl: () => getEffectiveOllamaBaseUrl,
57332
57333
  createOllamaURHQClient: () => createOllamaURHQClient,
57333
57334
  consumePendingProviderNotice: () => consumePendingProviderNotice,
@@ -57480,14 +57481,21 @@ function getOllamaRequestTimeoutMs(options, env4 = process.env, model) {
57480
57481
  if (isTruthyEnv(env4.UR_CODE_REMOTE)) {
57481
57482
  return REMOTE_OLLAMA_REQUEST_TIMEOUT_MS;
57482
57483
  }
57484
+ return getOllamaModelDefaultTimeoutMs(model);
57485
+ }
57486
+ function isOllamaCloudModel2(model) {
57487
+ return model?.trim().toLowerCase().endsWith(":cloud") ?? false;
57488
+ }
57489
+ function getOllamaModelDefaultTimeoutMs(model) {
57490
+ const normalized = model?.trim().toLowerCase() ?? "";
57491
+ if (/^kimi-k2\.7(?:[-.:]|$)/.test(normalized) && isOllamaCloudModel2(model)) {
57492
+ return KIMI_CLOUD_REQUEST_TIMEOUT_MS;
57493
+ }
57483
57494
  if (isOllamaCloudModel2(model)) {
57484
57495
  return CLOUD_OLLAMA_REQUEST_TIMEOUT_MS;
57485
57496
  }
57486
57497
  return DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS;
57487
57498
  }
57488
- function isOllamaCloudModel2(model) {
57489
- return model?.trim().toLowerCase().endsWith(":cloud") ?? false;
57490
- }
57491
57499
  function isTruthyEnv(value) {
57492
57500
  if (!value) {
57493
57501
  return false;
@@ -58416,7 +58424,7 @@ function parseToolInput(input) {
58416
58424
  }
58417
58425
  return normalized;
58418
58426
  }
58419
- 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, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT, pendingProviderNotice = null, LEVELED_THINK_MODEL_RE;
58427
+ var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, CLOUD_OLLAMA_REQUEST_TIMEOUT_MS = 120000, KIMI_CLOUD_REQUEST_TIMEOUT_MS = 300000, 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, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT, pendingProviderNotice = null, LEVELED_THINK_MODEL_RE;
58420
58428
  var init_ollama = __esm(() => {
58421
58429
  init_urhq_sdk();
58422
58430
  init_ollamaModels();
@@ -75436,7 +75444,7 @@ var init_auth = __esm(() => {
75436
75444
 
75437
75445
  // src/utils/userAgent.ts
75438
75446
  function getURCodeUserAgent() {
75439
- return `ur/${"1.65.11"}`;
75447
+ return `ur/${"1.65.12"}`;
75440
75448
  }
75441
75449
 
75442
75450
  // src/utils/workloadContext.ts
@@ -75458,7 +75466,7 @@ function getUserAgent() {
75458
75466
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
75459
75467
  const workload = getWorkload();
75460
75468
  const workloadSuffix = workload ? `, workload/${workload}` : "";
75461
- return `ur-cli/${"1.65.11"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
75469
+ return `ur-cli/${"1.65.12"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
75462
75470
  }
75463
75471
  function getMCPUserAgent() {
75464
75472
  const parts = [];
@@ -75472,7 +75480,7 @@ function getMCPUserAgent() {
75472
75480
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
75473
75481
  }
75474
75482
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
75475
- return `ur/${"1.65.11"}${suffix}`;
75483
+ return `ur/${"1.65.12"}${suffix}`;
75476
75484
  }
75477
75485
  function getWebFetchUserAgent() {
75478
75486
  return `UR-User (${getURCodeUserAgent()})`;
@@ -75610,7 +75618,7 @@ var init_user = __esm(() => {
75610
75618
  deviceId,
75611
75619
  sessionId: getSessionId(),
75612
75620
  email: getEmail(),
75613
- appVersion: "1.65.11",
75621
+ appVersion: "1.65.12",
75614
75622
  platform: getHostPlatformForAnalytics(),
75615
75623
  organizationUuid,
75616
75624
  accountUuid,
@@ -83810,7 +83818,7 @@ var init_metadata = __esm(() => {
83810
83818
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
83811
83819
  WHITESPACE_REGEX = /\s+/;
83812
83820
  getVersionBase = memoize_default(() => {
83813
- const match = "1.65.11".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
83821
+ const match = "1.65.12".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
83814
83822
  return match ? match[0] : undefined;
83815
83823
  });
83816
83824
  buildEnvContext = memoize_default(async () => {
@@ -83850,7 +83858,7 @@ var init_metadata = __esm(() => {
83850
83858
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
83851
83859
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
83852
83860
  isURAiAuth: isURAISubscriber(),
83853
- version: "1.65.11",
83861
+ version: "1.65.12",
83854
83862
  versionBase: getVersionBase(),
83855
83863
  buildTime: "",
83856
83864
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -84520,7 +84528,7 @@ function initialize1PEventLogging() {
84520
84528
  const platform2 = getPlatform();
84521
84529
  const attributes = {
84522
84530
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
84523
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.65.11"
84531
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.65.12"
84524
84532
  };
84525
84533
  if (platform2 === "wsl") {
84526
84534
  const wslVersion = getWslVersion();
@@ -84548,7 +84556,7 @@ function initialize1PEventLogging() {
84548
84556
  })
84549
84557
  ]
84550
84558
  });
84551
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.65.11");
84559
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.65.12");
84552
84560
  }
84553
84561
  async function reinitialize1PEventLoggingIfConfigChanged() {
84554
84562
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -94436,7 +94444,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
94436
94444
  function formatA2AAgentCard(options = {}, pretty = true) {
94437
94445
  return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
94438
94446
  }
94439
- var urVersion = "1.65.11", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
94447
+ var urVersion = "1.65.12", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
94440
94448
  var init_trends = __esm(() => {
94441
94449
  init_a2aCardSignature();
94442
94450
  coverage = [
@@ -97239,7 +97247,7 @@ function getAttributionHeader(fingerprint) {
97239
97247
  if (!isAttributionHeaderEnabled()) {
97240
97248
  return "";
97241
97249
  }
97242
- const version2 = `${"1.65.11"}.${fingerprint}`;
97250
+ const version2 = `${"1.65.12"}.${fingerprint}`;
97243
97251
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
97244
97252
  const cch = "";
97245
97253
  const workload = getWorkload();
@@ -155112,7 +155120,7 @@ var init_projectSafety = __esm(() => {
155112
155120
  function getInstruments() {
155113
155121
  if (instruments)
155114
155122
  return instruments;
155115
- const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.65.11");
155123
+ const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.65.12");
155116
155124
  instruments = {
155117
155125
  operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
155118
155126
  description: "GenAI operation duration.",
@@ -155210,7 +155218,7 @@ function genAiAgentAttributes() {
155210
155218
  "gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
155211
155219
  "gen_ai.provider.name": "ur",
155212
155220
  "gen_ai.agent.name": "UR-Nexus",
155213
- "gen_ai.agent.version": "1.65.11"
155221
+ "gen_ai.agent.version": "1.65.12"
155214
155222
  };
155215
155223
  }
155216
155224
  function genAiWorkflowAttributes(workflowName) {
@@ -155226,7 +155234,7 @@ function genAiWorkflowAttributes(workflowName) {
155226
155234
  function startGenAiWorkflowSpan(workflowName) {
155227
155235
  const attributes = genAiWorkflowAttributes(workflowName);
155228
155236
  const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
155229
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.11").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
155237
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.12").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
155230
155238
  }
155231
155239
  function endGenAiWorkflowSpan(span, options2 = {}) {
155232
155240
  try {
@@ -155264,7 +155272,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
155264
155272
  if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
155265
155273
  attributes["gen_ai.memory.record.count"] = options2.recordCount;
155266
155274
  }
155267
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.11").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
155275
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.12").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
155268
155276
  }
155269
155277
  function endGenAiMemorySpan(span, options2 = {}) {
155270
155278
  try {
@@ -248747,7 +248755,7 @@ function getTelemetryAttributes() {
248747
248755
  attributes["session.id"] = sessionId;
248748
248756
  }
248749
248757
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
248750
- attributes["app.version"] = "1.65.11";
248758
+ attributes["app.version"] = "1.65.12";
248751
248759
  }
248752
248760
  const oauthAccount = getOauthAccountInfo();
248753
248761
  if (oauthAccount) {
@@ -295291,7 +295299,7 @@ function getInstallationEnv() {
295291
295299
  return;
295292
295300
  }
295293
295301
  function getURCodeVersion() {
295294
- return "1.65.11";
295302
+ return "1.65.12";
295295
295303
  }
295296
295304
  async function getInstalledVSCodeExtensionVersion(command) {
295297
295305
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -302622,7 +302630,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
302622
302630
  const client2 = new Client({
302623
302631
  name: "ur",
302624
302632
  title: "UR",
302625
- version: "1.65.11",
302633
+ version: "1.65.12",
302626
302634
  description: "UR-Nexus autonomous engineering workflow engine",
302627
302635
  websiteUrl: PRODUCT_URL
302628
302636
  }, {
@@ -302982,7 +302990,7 @@ var init_client5 = __esm(() => {
302982
302990
  const client2 = new Client({
302983
302991
  name: "ur",
302984
302992
  title: "UR",
302985
- version: "1.65.11",
302993
+ version: "1.65.12",
302986
302994
  description: "UR-Nexus autonomous engineering workflow engine",
302987
302995
  websiteUrl: PRODUCT_URL
302988
302996
  }, {
@@ -315521,7 +315529,7 @@ async function createRuntime() {
315521
315529
  bootstrapTelemetry();
315522
315530
  const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
315523
315531
  [import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
315524
- [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.65.11"
315532
+ [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.65.12"
315525
315533
  }));
315526
315534
  const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
315527
315535
  resource,
@@ -315554,11 +315562,11 @@ async function createRuntime() {
315554
315562
  setMeterProvider(meterProvider);
315555
315563
  setLoggerProvider(loggerProvider);
315556
315564
  if (meterProvider) {
315557
- const meter = meterProvider.getMeter("ur-agent", "1.65.11");
315565
+ const meter = meterProvider.getMeter("ur-agent", "1.65.12");
315558
315566
  setMeter(meter, (name, options2) => meter.createCounter(name, options2));
315559
315567
  }
315560
315568
  if (loggerProvider) {
315561
- setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.65.11"));
315569
+ setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.65.12"));
315562
315570
  }
315563
315571
  if (!cleanupRegistered2) {
315564
315572
  cleanupRegistered2 = true;
@@ -316220,9 +316228,9 @@ async function assertMinVersion() {
316220
316228
  if (false) {}
316221
316229
  try {
316222
316230
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
316223
- if (versionConfig.minVersion && lt("1.65.11", versionConfig.minVersion)) {
316231
+ if (versionConfig.minVersion && lt("1.65.12", versionConfig.minVersion)) {
316224
316232
  console.error(`
316225
- It looks like your version of UR (${"1.65.11"}) needs an update.
316233
+ It looks like your version of UR (${"1.65.12"}) needs an update.
316226
316234
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
316227
316235
 
316228
316236
  To update, please run:
@@ -316438,7 +316446,7 @@ async function installGlobalPackage(specificVersion) {
316438
316446
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
316439
316447
  logEvent("tengu_auto_updater_lock_contention", {
316440
316448
  pid: process.pid,
316441
- currentVersion: "1.65.11"
316449
+ currentVersion: "1.65.12"
316442
316450
  });
316443
316451
  return "in_progress";
316444
316452
  }
@@ -316447,7 +316455,7 @@ async function installGlobalPackage(specificVersion) {
316447
316455
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
316448
316456
  logError2(new Error("Windows NPM detected in WSL environment"));
316449
316457
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
316450
- currentVersion: "1.65.11"
316458
+ currentVersion: "1.65.12"
316451
316459
  });
316452
316460
  console.error(`
316453
316461
  Error: Windows NPM detected in WSL
@@ -316982,7 +316990,7 @@ function detectLinuxGlobPatternWarnings() {
316982
316990
  }
316983
316991
  async function getDoctorDiagnostic() {
316984
316992
  const installationType = await getCurrentInstallationType();
316985
- const version2 = typeof MACRO !== "undefined" ? "1.65.11" : "unknown";
316993
+ const version2 = typeof MACRO !== "undefined" ? "1.65.12" : "unknown";
316986
316994
  const installationPath = await getInstallationPath();
316987
316995
  const invokedBinary = getInvokedBinary();
316988
316996
  const multipleInstallations = await detectMultipleInstallations();
@@ -317917,8 +317925,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
317917
317925
  const maxVersion = await getMaxVersion();
317918
317926
  if (maxVersion && gt(version2, maxVersion)) {
317919
317927
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
317920
- if (gte("1.65.11", maxVersion)) {
317921
- logForDebugging(`Native installer: current version ${"1.65.11"} is already at or above maxVersion ${maxVersion}, skipping update`);
317928
+ if (gte("1.65.12", maxVersion)) {
317929
+ logForDebugging(`Native installer: current version ${"1.65.12"} is already at or above maxVersion ${maxVersion}, skipping update`);
317922
317930
  logEvent("tengu_native_update_skipped_max_version", {
317923
317931
  latency_ms: Date.now() - startTime,
317924
317932
  max_version: maxVersion,
@@ -317929,7 +317937,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
317929
317937
  version2 = maxVersion;
317930
317938
  }
317931
317939
  }
317932
- if (!forceReinstall && version2 === "1.65.11" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
317940
+ if (!forceReinstall && version2 === "1.65.12" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
317933
317941
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
317934
317942
  logEvent("tengu_native_update_complete", {
317935
317943
  latency_ms: Date.now() - startTime,
@@ -363397,30 +363405,48 @@ function findSearchAnchor(fileContent, searchString) {
363397
363405
  occurrencesByLine.set(normalized, { firstIndex: index2, count: 1 });
363398
363406
  }
363399
363407
  }
363400
- let repeatedMatch = null;
363401
- for (const searchLine of searchString.split(`
363402
- `)) {
363408
+ const candidates = [];
363409
+ const searchLines = searchString.split(`
363410
+ `);
363411
+ for (let searchIndex = 0;searchIndex < searchLines.length; searchIndex++) {
363412
+ const searchLine = searchLines[searchIndex];
363403
363413
  const normalized = normalizeLineForMatch(searchLine);
363404
363414
  if (normalized.trim().length === 0)
363405
363415
  continue;
363406
363416
  const occurrence = occurrencesByLine.get(normalized);
363407
363417
  if (!occurrence)
363408
363418
  continue;
363409
- if (occurrence.count === 1) {
363410
- return { fileLine: occurrence.firstIndex + 1, unique: true };
363411
- }
363412
- repeatedMatch ??= {
363419
+ candidates.push({
363413
363420
  fileLine: occurrence.firstIndex + 1,
363414
- unique: false
363415
- };
363421
+ unique: occurrence.count === 1,
363422
+ searchLine: normalized,
363423
+ searchLineNumber: searchIndex + 1,
363424
+ occurrenceCount: occurrence.count,
363425
+ distinctiveCharacterCount: normalized.replace(/[^A-Za-z0-9_$]/g, "").length
363426
+ });
363416
363427
  }
363417
- return repeatedMatch;
363428
+ candidates.sort((left, right) => {
363429
+ if (left.unique !== right.unique)
363430
+ return left.unique ? -1 : 1;
363431
+ if (left.occurrenceCount !== right.occurrenceCount) {
363432
+ return left.occurrenceCount - right.occurrenceCount;
363433
+ }
363434
+ if (left.distinctiveCharacterCount !== right.distinctiveCharacterCount) {
363435
+ return right.distinctiveCharacterCount - left.distinctiveCharacterCount;
363436
+ }
363437
+ if (left.searchLine.length !== right.searchLine.length) {
363438
+ return right.searchLine.length - left.searchLine.length;
363439
+ }
363440
+ return left.searchLineNumber - right.searchLineNumber;
363441
+ });
363442
+ return candidates[0] ?? null;
363418
363443
  }
363419
363444
  function formatStringNotFoundMessage(fileContent, searchString) {
363420
363445
  const lineCount = searchString.split(`
363421
363446
  `).length;
363422
363447
  const anchor = findSearchAnchor(fileContent, searchString);
363423
- const location = anchor ? `A line from old_string ${anchor.unique ? "uniquely " : ""}matches the current file at line ${anchor.fileLine}, but the complete ${lineCount}-line block is not contiguous there.` : "No complete non-empty line from old_string matches the current file.";
363448
+ const anchorPreview = anchor ? JSON.stringify(anchor.searchLine.length > 160 ? `${anchor.searchLine.slice(0, 160)}\u2026` : anchor.searchLine) : null;
363449
+ const location = anchor ? `The verified anchor ${anchorPreview} from old_string line ${anchor.searchLineNumber} ${anchor.unique ? "uniquely " : ""}matches the current file at line ${anchor.fileLine}, but the complete ${lineCount}-line block is not contiguous there.` : "No complete non-empty line from old_string matches the current file.";
363424
363450
  const recovery = anchor ? `Re-read the target around line ${anchor.fileLine}, then retry with the smallest unique contiguous old_string copied from the current Read output (usually 2-4 lines).` : "Search for a short distinctive fragment, re-read the current target region, then retry with the smallest unique contiguous old_string (usually 2-4 lines).";
363425
363451
  const preview = searchString.length > STRING_NOT_FOUND_PREVIEW_CHARS ? `${searchString.slice(0, STRING_NOT_FOUND_PREVIEW_CHARS)}
363426
363452
  \u2026 [old_string preview truncated; ${searchString.length} characters total]` : searchString;
@@ -377997,6 +378023,117 @@ var init_TaskGetTool = __esm(() => {
377997
378023
  });
377998
378024
  });
377999
378025
 
378026
+ // src/tools/TaskUpdateTool/completionEvidence.ts
378027
+ function messageBlocks(message) {
378028
+ const content = message.message?.content;
378029
+ return Array.isArray(content) ? content : [];
378030
+ }
378031
+ function successfulCalls(messages) {
378032
+ if (!Array.isArray(messages))
378033
+ return [];
378034
+ const toolUses = new Map;
378035
+ const calls = [];
378036
+ let sequence = 0;
378037
+ for (const [messageIndex, candidate] of messages.entries()) {
378038
+ if (typeof candidate !== "object" || candidate === null)
378039
+ continue;
378040
+ const message = candidate;
378041
+ for (const block2 of messageBlocks(message)) {
378042
+ sequence++;
378043
+ if (typeof block2 !== "object" || block2 === null)
378044
+ continue;
378045
+ const value = block2;
378046
+ if (value.type === "tool_use" && typeof value.id === "string" && typeof value.name === "string") {
378047
+ toolUses.set(value.id, {
378048
+ name: value.name,
378049
+ input: typeof value.input === "object" && value.input !== null ? value.input : {},
378050
+ sequence,
378051
+ assistantMessage: messageIndex
378052
+ });
378053
+ continue;
378054
+ }
378055
+ if (value.type !== "tool_result" || typeof value.tool_use_id !== "string") {
378056
+ continue;
378057
+ }
378058
+ const toolUse = toolUses.get(value.tool_use_id);
378059
+ if (!toolUse)
378060
+ continue;
378061
+ calls.push({
378062
+ ...toolUse,
378063
+ succeeded: value.is_error !== true
378064
+ });
378065
+ }
378066
+ }
378067
+ return calls.sort((left, right) => left.sequence - right.sequence);
378068
+ }
378069
+ function sameTaskId(value, taskId) {
378070
+ return (typeof value === "string" || typeof value === "number") && String(value) === taskId;
378071
+ }
378072
+ function mutationTarget(call6) {
378073
+ for (const key of ["file_path", "notebook_path", "path"]) {
378074
+ const value = call6.input[key];
378075
+ if (typeof value === "string" && value.trim() !== "")
378076
+ return value;
378077
+ }
378078
+ return;
378079
+ }
378080
+ function evaluateCompletionEvidence(input) {
378081
+ const calls = successfulCalls(input.messages);
378082
+ let startedAt = -1;
378083
+ for (const call6 of calls) {
378084
+ if (call6.succeeded && call6.name === "TaskUpdate" && sameTaskId(call6.input.taskId, input.taskId) && call6.input.status === "in_progress") {
378085
+ startedAt = call6.sequence;
378086
+ }
378087
+ }
378088
+ if (startedAt < 0)
378089
+ return { defer: false };
378090
+ let latestMutation;
378091
+ let hasEvidenceAfterMutation = false;
378092
+ for (const call6 of calls) {
378093
+ if (!call6.succeeded || call6.sequence <= startedAt)
378094
+ continue;
378095
+ if (FILE_MUTATION_TOOLS.has(call6.name)) {
378096
+ latestMutation = call6;
378097
+ hasEvidenceAfterMutation = false;
378098
+ continue;
378099
+ }
378100
+ if (latestMutation && call6.assistantMessage > latestMutation.assistantMessage && COMPLETION_EVIDENCE_TOOLS.has(call6.name)) {
378101
+ hasEvidenceAfterMutation = true;
378102
+ }
378103
+ }
378104
+ if (!latestMutation || hasEvidenceAfterMutation) {
378105
+ return { defer: false };
378106
+ }
378107
+ return {
378108
+ defer: true,
378109
+ mutationTool: latestMutation.name,
378110
+ target: mutationTarget(latestMutation)
378111
+ };
378112
+ }
378113
+ var FILE_MUTATION_TOOLS, COMPLETION_EVIDENCE_TOOLS;
378114
+ var init_completionEvidence = __esm(() => {
378115
+ FILE_MUTATION_TOOLS = new Set([
378116
+ "Write",
378117
+ "Edit",
378118
+ "MultiEdit",
378119
+ "NotebookEdit"
378120
+ ]);
378121
+ COMPLETION_EVIDENCE_TOOLS = new Set([
378122
+ "Read",
378123
+ "Grep",
378124
+ "Glob",
378125
+ "LSP",
378126
+ "Bash",
378127
+ "PowerShell",
378128
+ "TestRunner",
378129
+ "Browser",
378130
+ "Computer",
378131
+ "TaskOutput",
378132
+ "Agent",
378133
+ "Task"
378134
+ ]);
378135
+ });
378136
+
378000
378137
  // src/tools/TaskUpdateTool/prompt.ts
378001
378138
  var DESCRIPTION16 = "Update a task in the task list", PROMPT7 = `Use this tool to update a task in the task list.
378002
378139
 
@@ -378008,6 +378145,12 @@ var DESCRIPTION16 = "Update a task in the task list", PROMPT7 = `Use this tool t
378008
378145
  - After completion, call TaskList to find the next unblocked task
378009
378146
 
378010
378147
  - ONLY mark a task as completed when you have FULLY accomplished it
378148
+ - After changing a file, run a relevant observable check in a later tool turn
378149
+ before completing the final actionable task. A Write/Edit result proves only
378150
+ that bytes changed, not that the result works.
378151
+ - If that final completion has no successful post-change check, TaskUpdate
378152
+ keeps the same task in_progress and names the next verification action. Run
378153
+ it and retry completion; do not create a duplicate task.
378011
378154
  - If you encounter errors, blockers, or cannot finish, keep the task as in_progress
378012
378155
  - When blocked, record the blocking work as a dependency or notify the owner
378013
378156
  - Never mark a task as completed if:
@@ -378072,6 +378215,7 @@ var init_TaskUpdateTool = __esm(() => {
378072
378215
  init_teammateMailbox();
378073
378216
  init_constants2();
378074
378217
  init_taskIdInput();
378218
+ init_completionEvidence();
378075
378219
  inputSchema40 = lazySchema(() => {
378076
378220
  const TaskUpdateStatusSchema = TaskStatusSchema2().or(exports_external.literal("deleted"));
378077
378221
  const TaskIdSchema = taskIdInputSchema("The ID of the task to update. Positive integer JSON values are accepted and normalized to strings.");
@@ -378096,7 +378240,10 @@ var init_TaskUpdateTool = __esm(() => {
378096
378240
  from: exports_external.string(),
378097
378241
  to: exports_external.string()
378098
378242
  }).optional(),
378099
- verificationNudgeNeeded: exports_external.boolean().optional()
378243
+ verificationNudgeNeeded: exports_external.boolean().optional(),
378244
+ completionDeferred: exports_external.boolean().optional(),
378245
+ completionMutationTool: exports_external.string().optional(),
378246
+ completionVerificationTarget: exports_external.string().optional()
378100
378247
  }));
378101
378248
  TaskUpdateTool = buildTool({
378102
378249
  name: TASK_UPDATE_TOOL_NAME,
@@ -378192,6 +378339,9 @@ var init_TaskUpdateTool = __esm(() => {
378192
378339
  };
378193
378340
  }
378194
378341
  const updatedFields = [];
378342
+ let completionDeferred = false;
378343
+ let completionMutationTool;
378344
+ let completionVerificationTarget;
378195
378345
  const updates = {};
378196
378346
  if (subject !== undefined && subject !== existingTask.subject) {
378197
378347
  updates.subject = subject;
@@ -378262,27 +378412,43 @@ var init_TaskUpdateTool = __esm(() => {
378262
378412
  }
378263
378413
  };
378264
378414
  }
378265
- const blockingErrors = [];
378266
- const generator = executeTaskCompletedHooks(taskId, existingTask.subject, existingTask.description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
378267
- for await (const result of generator) {
378268
- if (result.blockingError) {
378269
- blockingErrors.push(getTaskCompletedHookMessage(result.blockingError));
378415
+ const otherActionableTasks = [...tasksById.values()].filter((task) => task.id !== taskId && !task.metadata?._internal && (task.status === "pending" || task.status === "in_progress"));
378416
+ if (existingTask.status === "in_progress" && otherActionableTasks.length === 0) {
378417
+ const evidence = evaluateCompletionEvidence({
378418
+ messages: context5.messages,
378419
+ taskId
378420
+ });
378421
+ if (evidence.defer) {
378422
+ completionDeferred = true;
378423
+ completionMutationTool = evidence.mutationTool;
378424
+ completionVerificationTarget = evidence.target;
378425
+ }
378426
+ }
378427
+ if (!completionDeferred) {
378428
+ const blockingErrors = [];
378429
+ const generator = executeTaskCompletedHooks(taskId, existingTask.subject, existingTask.description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
378430
+ for await (const result of generator) {
378431
+ if (result.blockingError) {
378432
+ blockingErrors.push(getTaskCompletedHookMessage(result.blockingError));
378433
+ }
378270
378434
  }
378271
- }
378272
- if (blockingErrors.length > 0) {
378273
- return {
378274
- data: {
378275
- success: false,
378276
- taskId,
378277
- updatedFields: [],
378278
- error: blockingErrors.join(`
378435
+ if (blockingErrors.length > 0) {
378436
+ return {
378437
+ data: {
378438
+ success: false,
378439
+ taskId,
378440
+ updatedFields: [],
378441
+ error: blockingErrors.join(`
378279
378442
  `)
378280
- }
378281
- };
378443
+ }
378444
+ };
378445
+ }
378282
378446
  }
378283
378447
  }
378284
- updates.status = status;
378285
- updatedFields.push("status");
378448
+ if (!completionDeferred) {
378449
+ updates.status = status;
378450
+ updatedFields.push("status");
378451
+ }
378286
378452
  }
378287
378453
  }
378288
378454
  const newBlocks = (normalizedAddBlocks ?? []).filter((id) => !existingTask.blocks.includes(id));
@@ -378329,7 +378495,10 @@ var init_TaskUpdateTool = __esm(() => {
378329
378495
  taskId,
378330
378496
  updatedFields,
378331
378497
  statusChange: updates.status !== undefined ? { from: existingTask.status, to: updates.status } : undefined,
378332
- verificationNudgeNeeded
378498
+ verificationNudgeNeeded,
378499
+ completionDeferred: completionDeferred || undefined,
378500
+ completionMutationTool,
378501
+ completionVerificationTarget
378333
378502
  }
378334
378503
  };
378335
378504
  },
@@ -378340,7 +378509,10 @@ var init_TaskUpdateTool = __esm(() => {
378340
378509
  updatedFields,
378341
378510
  error: error40,
378342
378511
  statusChange,
378343
- verificationNudgeNeeded
378512
+ verificationNudgeNeeded,
378513
+ completionDeferred,
378514
+ completionMutationTool,
378515
+ completionVerificationTarget
378344
378516
  } = content;
378345
378517
  if (!success2) {
378346
378518
  return {
@@ -378350,6 +378522,14 @@ var init_TaskUpdateTool = __esm(() => {
378350
378522
  is_error: true
378351
378523
  };
378352
378524
  }
378525
+ if (completionDeferred) {
378526
+ const target = completionVerificationTarget ? ` to ${completionVerificationTarget}` : "";
378527
+ return {
378528
+ tool_use_id: toolUseID,
378529
+ type: "tool_result",
378530
+ content: `Task #${taskId} remains in_progress. ` + `${completionMutationTool ?? "A file tool"} made the latest change` + `${target}, but no successful observable check ran afterward. ` + `Run the smallest relevant verification now, fix any failure, then ` + `retry TaskUpdate with status completed. For a browser UI, load it ` + `and inspect runtime/console behavior. Do not create a duplicate ` + `task; this task is still actionable.`
378531
+ };
378532
+ }
378353
378533
  let resultContent = `Updated task #${taskId} ${updatedFields.join(", ")}`;
378354
378534
  if (statusChange?.to === "completed" && getAgentId() && isAgentSwarmsEnabled()) {
378355
378535
  resultContent += `
@@ -387805,7 +387985,7 @@ function isAnyTracingEnabled() {
387805
387985
  return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
387806
387986
  }
387807
387987
  function getTracer() {
387808
- return import_api39.trace.getTracer("ur-agent.gen_ai", "1.65.11");
387988
+ return import_api39.trace.getTracer("ur-agent.gen_ai", "1.65.12");
387809
387989
  }
387810
387990
  function createSpanAttributes(spanType, customAttributes = {}) {
387811
387991
  const baseAttributes = getTelemetryAttributes();
@@ -388595,9 +388775,65 @@ var init_toolErrors = __esm(() => {
388595
388775
  });
388596
388776
 
388597
388777
  // src/services/tools/taskListGate.ts
388778
+ import { dirname as dirname45 } from "path";
388779
+ function isShellOperator(token, operator) {
388780
+ return typeof token === "object" && token !== null && "op" in token && token.op === operator;
388781
+ }
388782
+ function isPlanDirectoryBootstrapForGate(input) {
388783
+ if (typeof input.toolInput !== "object" || input.toolInput === null) {
388784
+ return false;
388785
+ }
388786
+ const candidate = input.toolInput;
388787
+ if (typeof candidate.command !== "string" || candidate.run_in_background === true || candidate.dangerouslyDisableSandbox === true || candidate._simulatedSedEdit !== undefined) {
388788
+ return false;
388789
+ }
388790
+ const command = candidate.command;
388791
+ if (command.includes("$") || command.includes("`") || command.includes("\\") || command.includes(`
388792
+ `) || command.includes("\r") || command.includes("\x00") || hasUnbalancedQuotes(command)) {
388793
+ return false;
388794
+ }
388795
+ const parsed = tryParseShellCommand(command);
388796
+ if (!parsed.success)
388797
+ return false;
388798
+ const tokens = parsed.tokens;
388799
+ let expectedPlanDirectory;
388800
+ try {
388801
+ expectedPlanDirectory = dirname45(expandPath(input.expectedPlanFile));
388802
+ } catch {
388803
+ return false;
388804
+ }
388805
+ const isPlanDirectory = (token) => {
388806
+ if (typeof token !== "string" || token.trim() === "")
388807
+ return false;
388808
+ try {
388809
+ return expandPath(token) === expectedPlanDirectory;
388810
+ } catch {
388811
+ return false;
388812
+ }
388813
+ };
388814
+ const isMkdir = tokens.length === 3 && tokens[0] === "mkdir" && tokens[1] === "-p" && isPlanDirectory(tokens[2]);
388815
+ if (isMkdir)
388816
+ return true;
388817
+ const hasSilentStderr = tokens[3] === "2" && isShellOperator(tokens[4], ">") && tokens[5] === "/dev/null";
388818
+ const guardOperatorIndex = hasSilentStderr ? 6 : 3;
388819
+ const mkdirIndex = guardOperatorIndex + 1;
388820
+ const hasGuardedMkdir = tokens[0] === "ls" && tokens[1] === "-la" && isPlanDirectory(tokens[2]) && isShellOperator(tokens[guardOperatorIndex], "||") && tokens[mkdirIndex] === "mkdir" && tokens[mkdirIndex + 1] === "-p" && isPlanDirectory(tokens[mkdirIndex + 2]);
388821
+ if (!hasGuardedMkdir)
388822
+ return false;
388823
+ const afterMkdir = mkdirIndex + 3;
388824
+ if (tokens.length === afterMkdir)
388825
+ return true;
388826
+ return tokens.length === afterMkdir + 4 && isShellOperator(tokens[afterMkdir], "&&") && tokens[afterMkdir + 1] === "ls" && tokens[afterMkdir + 2] === "-la" && isPlanDirectory(tokens[afterMkdir + 3]);
388827
+ }
388598
388828
  function isPlanArtifactMutationForGate(input) {
388599
388829
  if (!input.isPlanMode)
388600
388830
  return false;
388831
+ if (input.toolName === "Bash") {
388832
+ return isPlanDirectoryBootstrapForGate({
388833
+ toolInput: input.toolInput,
388834
+ expectedPlanFile: input.expectedPlanFile
388835
+ });
388836
+ }
388601
388837
  if (!PLAN_ARTIFACT_MUTATING_TOOLS.has(input.toolName))
388602
388838
  return false;
388603
388839
  if (typeof input.toolInput !== "object" || input.toolInput === null || !("file_path" in input.toolInput)) {
@@ -389141,7 +389377,7 @@ var init_rootcause = __esm(() => {
389141
389377
 
389142
389378
  // src/stability/ledger.ts
389143
389379
  import { appendFileSync as appendFileSync4, existsSync as existsSync29, mkdirSync as mkdirSync19, readFileSync as readFileSync31 } from "fs";
389144
- import { dirname as dirname45, join as join109 } from "path";
389380
+ import { dirname as dirname46, join as join109 } from "path";
389145
389381
  function ledgerPath(cwd2) {
389146
389382
  return join109(cwd2, ".ur", "actions.jsonl");
389147
389383
  }
@@ -389169,7 +389405,7 @@ function filesFromArgs(args) {
389169
389405
  function recordAction(cwd2, record3) {
389170
389406
  try {
389171
389407
  const file2 = ledgerPath(cwd2);
389172
- mkdirSync19(dirname45(file2), { recursive: true });
389408
+ mkdirSync19(dirname46(file2), { recursive: true });
389173
389409
  appendFileSync4(file2, JSON.stringify(record3) + `
389174
389410
  `);
389175
389411
  } catch {}
@@ -389816,7 +390052,7 @@ async function countTasksForGate(toolUseContext) {
389816
390052
  }
389817
390053
  }
389818
390054
  function isCurrentPlanArtifactMutation(toolName, input, toolUseContext) {
389819
- if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME && toolName !== "MultiEdit") {
390055
+ if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME && toolName !== "MultiEdit" && toolName !== BASH_TOOL_NAME) {
389820
390056
  return false;
389821
390057
  }
389822
390058
  try {
@@ -391552,6 +391788,292 @@ var init_StreamingToolExecutor = __esm(() => {
391552
391788
  init_toolExecution();
391553
391789
  });
391554
391790
 
391791
+ // src/utils/explicitChoiceRecovery.ts
391792
+ function objectValue4(value) {
391793
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
391794
+ }
391795
+ function hasOnlyKeys(value, required2, optional3 = []) {
391796
+ const allowed = new Set([...required2, ...optional3]);
391797
+ const keys2 = Object.keys(value);
391798
+ return required2.every((key) => Object.prototype.hasOwnProperty.call(value, key)) && keys2.every((key) => allowed.has(key));
391799
+ }
391800
+ function hasCanonicalAskShape(value) {
391801
+ const input = objectValue4(value);
391802
+ if (!input || !hasOnlyKeys(input, ["questions"], ["metadata"]) || !Array.isArray(input.questions) || input.questions.length < 1 || input.questions.length > MAX_QUESTIONS2) {
391803
+ return false;
391804
+ }
391805
+ if (input.metadata !== undefined && !objectValue4(input.metadata)) {
391806
+ return false;
391807
+ }
391808
+ return input.questions.every((questionValue) => {
391809
+ const question = objectValue4(questionValue);
391810
+ if (!question || !hasOnlyKeys(question, ["question", "header", "options"], ["multiSelect"]) || typeof question.question !== "string" || typeof question.header !== "string" || !Array.isArray(question.options) || question.options.length < 2 || question.options.length > MAX_OPTIONS2 || question.multiSelect !== undefined && typeof question.multiSelect !== "boolean") {
391811
+ return false;
391812
+ }
391813
+ return question.options.every((optionValue) => {
391814
+ const option = objectValue4(optionValue);
391815
+ return Boolean(option && hasOnlyKeys(option, ["label"], ["description", "preview"]) && typeof option.label === "string" && (option.description === undefined || typeof option.description === "string") && (option.preview === undefined || typeof option.preview === "string"));
391816
+ });
391817
+ });
391818
+ }
391819
+ function findJsonObjectEnd2(text, start) {
391820
+ let depth = 0;
391821
+ let inString = false;
391822
+ let escaped = false;
391823
+ for (let index2 = start;index2 < text.length; index2++) {
391824
+ const character = text[index2];
391825
+ if (inString) {
391826
+ if (escaped) {
391827
+ escaped = false;
391828
+ } else if (character === "\\") {
391829
+ escaped = true;
391830
+ } else if (character === '"') {
391831
+ inString = false;
391832
+ }
391833
+ continue;
391834
+ }
391835
+ if (character === '"') {
391836
+ inString = true;
391837
+ } else if (character === "{") {
391838
+ depth++;
391839
+ } else if (character === "}") {
391840
+ depth--;
391841
+ if (depth === 0)
391842
+ return index2 + 1;
391843
+ if (depth < 0)
391844
+ return null;
391845
+ }
391846
+ }
391847
+ return null;
391848
+ }
391849
+ function hasExplicitAskToolIntent(prefix) {
391850
+ const nearby = prefix.slice(-1000);
391851
+ if (/\b(?:for example|example|sample|illustration|schema)\b/i.test(nearby.slice(-240))) {
391852
+ return false;
391853
+ }
391854
+ return /\b(?:use|using|call|calling|invoke|invoking|emit|emitting)\b[\s\S]{0,100}\bAskUserQuestion\b/i.test(nearby) || /\bAskUserQuestion\b[\s\S]{0,100}\b(?:tool|call|invoke)\b/i.test(nearby);
391855
+ }
391856
+ function parseFinalReasoningAskJson(reasoning) {
391857
+ if (reasoning.length === 0 || reasoning.length > MAX_REASONING_CHARS) {
391858
+ return null;
391859
+ }
391860
+ const trimmed = reasoning.trimEnd();
391861
+ if (!trimmed.endsWith("}"))
391862
+ return null;
391863
+ const candidates2 = [];
391864
+ for (let start = trimmed.indexOf("{");start !== -1; start = trimmed.indexOf("{", start + 1)) {
391865
+ const end = findJsonObjectEnd2(trimmed, start);
391866
+ if (end !== trimmed.length)
391867
+ continue;
391868
+ try {
391869
+ const parsed = JSON.parse(trimmed.slice(start));
391870
+ if (hasCanonicalAskShape(parsed)) {
391871
+ candidates2.push({ start, input: parsed });
391872
+ }
391873
+ } catch {}
391874
+ }
391875
+ if (candidates2.length !== 1)
391876
+ return null;
391877
+ const candidate = candidates2[0];
391878
+ const prefix = trimmed.slice(0, candidate.start);
391879
+ if (prefix.includes("```") || !hasExplicitAskToolIntent(prefix))
391880
+ return null;
391881
+ return candidate.input;
391882
+ }
391883
+ function headerFromQuestion3(question) {
391884
+ const stopWords = new Set([
391885
+ "a",
391886
+ "about",
391887
+ "also",
391888
+ "an",
391889
+ "are",
391890
+ "be",
391891
+ "do",
391892
+ "does",
391893
+ "for",
391894
+ "is",
391895
+ "or",
391896
+ "should",
391897
+ "support",
391898
+ "that",
391899
+ "the",
391900
+ "this",
391901
+ "to",
391902
+ "want",
391903
+ "we",
391904
+ "what",
391905
+ "which",
391906
+ "with",
391907
+ "without",
391908
+ "you"
391909
+ ]);
391910
+ const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !stopWords.has(part.toLowerCase()));
391911
+ const header = word ?? "Choice";
391912
+ return (header.slice(0, 1).toLocaleUpperCase() + header.slice(1)).slice(0, 12);
391913
+ }
391914
+ function parseExplicitChoicePrompt(text) {
391915
+ if (!text || text.length > MAX_MENU_CHARS || /```|[{}]/.test(text)) {
391916
+ return null;
391917
+ }
391918
+ const lines = text.replace(/\r\n?/g, `
391919
+ `).split(`
391920
+ `).map((line) => line.trim()).filter(Boolean);
391921
+ const questionIndexes = lines.flatMap((line, index2) => /^\*\*[^*\n]+\?\*\*$/.test(line) ? [index2] : []);
391922
+ if (questionIndexes.length !== 1)
391923
+ return null;
391924
+ const questionIndex = questionIndexes[0];
391925
+ const preamble = lines.slice(0, questionIndex);
391926
+ if (preamble.length > 2 || preamble.some((line) => line.length > 500 || line.includes("?") || /^[-*+#>]/.test(line))) {
391927
+ return null;
391928
+ }
391929
+ const questionMatch = lines[questionIndex].match(/^\*\*([^*\n]+\?)\*\*$/);
391930
+ const question = questionMatch?.[1];
391931
+ if (!question || question.length > MAX_QUESTION_CHARS2)
391932
+ return null;
391933
+ const options2 = [];
391934
+ let lineIndex = questionIndex + 1;
391935
+ while (lineIndex < lines.length) {
391936
+ const match = lines[lineIndex].match(/^-\s+\*\*([^*\n]+)\*\*\s+[\u2013\u2014]\s+(.+)$/);
391937
+ if (!match)
391938
+ break;
391939
+ const label = match[1];
391940
+ const description = match[2];
391941
+ const normalizedLabel = label.toLocaleLowerCase();
391942
+ if (label.length > MAX_LABEL_CHARS2 || description.length > MAX_DESCRIPTION_CHARS2 || normalizedLabel === "other" || normalizedLabel === "__other__") {
391943
+ return null;
391944
+ }
391945
+ options2.push({ label, description });
391946
+ lineIndex++;
391947
+ }
391948
+ if (options2.length < 2 || options2.length > MAX_OPTIONS2)
391949
+ return null;
391950
+ if (new Set(options2.map((option) => option.label.toLocaleLowerCase())).size !== options2.length) {
391951
+ return null;
391952
+ }
391953
+ const trailing = lines.slice(lineIndex);
391954
+ if (trailing.length !== 1 || trailing[0].includes("?") || !/^(?:please\s+)?(?:select|choose|pick)\b.{0,120}\b(?:option|choice)\b/i.test(trailing[0])) {
391955
+ return null;
391956
+ }
391957
+ return {
391958
+ input: {
391959
+ questions: [
391960
+ {
391961
+ question,
391962
+ header: headerFromQuestion3(question),
391963
+ options: options2
391964
+ }
391965
+ ]
391966
+ },
391967
+ source: "markdown_menu",
391968
+ remainingText: preamble.join(`
391969
+ `)
391970
+ };
391971
+ }
391972
+ function collectExplicitChoiceCandidates({
391973
+ thinkingBlocks,
391974
+ textBlocks
391975
+ }) {
391976
+ const candidates2 = [];
391977
+ const reasoningCandidates = thinkingBlocks.map(parseFinalReasoningAskJson).filter((input) => input !== null);
391978
+ if (reasoningCandidates.length === 1) {
391979
+ candidates2.push({
391980
+ input: reasoningCandidates[0],
391981
+ source: "thinking_json",
391982
+ remainingText: ""
391983
+ });
391984
+ }
391985
+ const menuCandidates = textBlocks.map(parseExplicitChoicePrompt).filter((candidate) => candidate !== null);
391986
+ if (menuCandidates.length === 1) {
391987
+ candidates2.push(menuCandidates[0]);
391988
+ }
391989
+ return candidates2;
391990
+ }
391991
+ var MAX_REASONING_CHARS, MAX_MENU_CHARS, MAX_QUESTION_CHARS2 = 500, MAX_LABEL_CHARS2 = 80, MAX_DESCRIPTION_CHARS2 = 500, MAX_OPTIONS2 = 8, MAX_QUESTIONS2 = 4;
391992
+ var init_explicitChoiceRecovery = __esm(() => {
391993
+ MAX_REASONING_CHARS = 64 * 1024;
391994
+ MAX_MENU_CHARS = 4 * 1024;
391995
+ });
391996
+
391997
+ // src/services/tools/explicitChoiceRecovery.ts
391998
+ import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
391999
+ function recoverExplicitChoiceToolUse({
392000
+ assistantMessages,
392001
+ tools,
392002
+ agentId,
392003
+ isNonInteractiveSession,
392004
+ uuid: uuid3
392005
+ }) {
392006
+ if (assistantMessages.length === 0 || agentId !== undefined || isNonInteractiveSession || assistantMessages.some((message) => {
392007
+ const content = message.message?.content;
392008
+ return message.isApiErrorMessage || Array.isArray(content) && content.some((block2) => block2.type === "tool_use");
392009
+ })) {
392010
+ return null;
392011
+ }
392012
+ const sourceMessage = assistantMessages.at(-1);
392013
+ if (!sourceMessage?.message || sourceMessage.message.stop_reason !== "end_turn") {
392014
+ return null;
392015
+ }
392016
+ const askTool = findToolByName(tools, ASK_USER_QUESTION_TOOL_NAME);
392017
+ if (!askTool)
392018
+ return null;
392019
+ try {
392020
+ if (!askTool.isEnabled())
392021
+ return null;
392022
+ } catch {
392023
+ return null;
392024
+ }
392025
+ const thinkingBlocks = [];
392026
+ const textBlocks = [];
392027
+ for (const assistantMessage of assistantMessages) {
392028
+ const content = assistantMessage.message?.content;
392029
+ if (!Array.isArray(content))
392030
+ continue;
392031
+ for (const block2 of content) {
392032
+ if (block2.type === "thinking" && typeof block2.thinking === "string") {
392033
+ thinkingBlocks.push(block2.thinking);
392034
+ } else if (block2.type === "text" && typeof block2.text === "string") {
392035
+ textBlocks.push(block2.text);
392036
+ }
392037
+ }
392038
+ }
392039
+ for (const candidate of collectExplicitChoiceCandidates({
392040
+ thinkingBlocks,
392041
+ textBlocks
392042
+ })) {
392043
+ const parsed = askTool.inputSchema.safeParse(candidate.input);
392044
+ if (!parsed.success || !isDeepStrictEqual3(parsed.data, candidate.input)) {
392045
+ continue;
392046
+ }
392047
+ const idSuffix = uuid3().replace(/[^A-Za-z0-9]/g, "");
392048
+ const toolUse = {
392049
+ type: "tool_use",
392050
+ id: `toolu_recovered_${idSuffix}`,
392051
+ name: ASK_USER_QUESTION_TOOL_NAME,
392052
+ input: parsed.data
392053
+ };
392054
+ const assistantMessage = {
392055
+ ...sourceMessage,
392056
+ uuid: uuid3(),
392057
+ message: {
392058
+ ...sourceMessage.message,
392059
+ content: [toolUse],
392060
+ stop_reason: "tool_use"
392061
+ }
392062
+ };
392063
+ return {
392064
+ assistantMessage,
392065
+ source: candidate.source,
392066
+ toolUse
392067
+ };
392068
+ }
392069
+ return null;
392070
+ }
392071
+ var init_explicitChoiceRecovery2 = __esm(() => {
392072
+ init_Tool();
392073
+ init_prompt9();
392074
+ init_explicitChoiceRecovery();
392075
+ });
392076
+
391555
392077
  // src/utils/queryProfiler.ts
391556
392078
  function startQueryProfile() {
391557
392079
  if (!ENABLED)
@@ -392651,7 +393173,7 @@ import {
392651
393173
  unlinkSync as unlinkSync8,
392652
393174
  writeFileSync as writeFileSync20
392653
393175
  } from "fs";
392654
- import { isAbsolute as isAbsolute30, dirname as dirname46, join as join111, relative as relative29, sep as sep25 } from "path";
393176
+ import { isAbsolute as isAbsolute30, dirname as dirname47, join as join111, relative as relative29, sep as sep25 } from "path";
392655
393177
  function readJsonl(file2) {
392656
393178
  if (!file2 || !existsSync30(file2))
392657
393179
  return [];
@@ -392679,7 +393201,7 @@ function append2(file2, rec) {
392679
393201
  });
392680
393202
  }
392681
393203
  function writeAtomic(file2, content) {
392682
- mkdirSync20(dirname46(file2), { recursive: true });
393204
+ mkdirSync20(dirname47(file2), { recursive: true });
392683
393205
  const temporary = `${file2}.${process.pid}.${Date.now()}.tmp`;
392684
393206
  try {
392685
393207
  writeFileSync20(temporary, content, { mode: 384 });
@@ -393705,6 +394227,25 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
393705
394227
  logAntError("Query error", error40);
393706
394228
  return { reason: "model_error", error: error40 };
393707
394229
  }
394230
+ if (!toolUseContext.abortController.signal.aborted) {
394231
+ const recoveredChoice = recoverExplicitChoiceToolUse({
394232
+ assistantMessages,
394233
+ tools: toolUseContext.options.tools,
394234
+ agentId: toolUseContext.agentId,
394235
+ isNonInteractiveSession: Boolean(toolUseContext.options.isNonInteractiveSession),
394236
+ uuid: deps.uuid
394237
+ });
394238
+ if (recoveredChoice) {
394239
+ assistantMessages.push(recoveredChoice.assistantMessage);
394240
+ toolUseBlocks.push(recoveredChoice.toolUse);
394241
+ needsFollowUp = true;
394242
+ logForDebugging(`Recovered explicit AskUserQuestion call from ${recoveredChoice.source}`);
394243
+ yield recoveredChoice.assistantMessage;
394244
+ if (streamingToolExecutor && !toolUseContext.abortController.signal.aborted) {
394245
+ streamingToolExecutor.addTool(recoveredChoice.toolUse, recoveredChoice.assistantMessage);
394246
+ }
394247
+ }
394248
+ }
393708
394249
  if (assistantMessages.length > 0) {
393709
394250
  executePostSamplingHooks([...messagesForQuery, ...assistantMessages], systemPrompt, userContext, systemContext, toolUseContext, querySource);
393710
394251
  }
@@ -394211,6 +394752,7 @@ var init_query = __esm(() => {
394211
394752
  init_dumpPrompts();
394212
394753
  init_verifier();
394213
394754
  init_StreamingToolExecutor();
394755
+ init_explicitChoiceRecovery2();
394214
394756
  init_queryProfiler();
394215
394757
  init_toolOrchestration();
394216
394758
  init_repeatedFailureGuard();
@@ -397963,7 +398505,7 @@ var init_toolSearch = __esm(() => {
397963
398505
  // src/services/vcr.ts
397964
398506
  import { createHash as createHash34, randomUUID as randomUUID39 } from "crypto";
397965
398507
  import { mkdir as mkdir24, readFile as readFile33, writeFile as writeFile24 } from "fs/promises";
397966
- import { dirname as dirname47, join as join114 } from "path";
398508
+ import { dirname as dirname48, join as join114 } from "path";
397967
398509
  function shouldUseVCR() {
397968
398510
  if (false) {}
397969
398511
  if (process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.FORCE_VCR)) {
@@ -397990,7 +398532,7 @@ async function withFixture(input, fixtureName, f) {
397990
398532
  throw new Error(`Fixture missing: ${filename}. Re-run tests with VCR_RECORD=1, then commit the result.`);
397991
398533
  }
397992
398534
  const result = await f();
397993
- await mkdir24(dirname47(filename), { recursive: true });
398535
+ await mkdir24(dirname48(filename), { recursive: true });
397994
398536
  await writeFile24(filename, jsonStringify(result, null, 2), {
397995
398537
  encoding: "utf8"
397996
398538
  });
@@ -398029,7 +398571,7 @@ ${jsonStringify(dehydratedInput, null, 2)}`);
398029
398571
  if (env2.isCI && !isEnvTruthy(process.env.VCR_RECORD)) {
398030
398572
  return results;
398031
398573
  }
398032
- await mkdir24(dirname47(filename), { recursive: true });
398574
+ await mkdir24(dirname48(filename), { recursive: true });
398033
398575
  await writeFile24(filename, jsonStringify({
398034
398576
  input: dehydratedInput,
398035
398577
  output: results.map((message, index2) => mapMessage(message, dehydrateValue, index2))
@@ -400174,7 +400716,7 @@ var init_findRelevantMemories = __esm(() => {
400174
400716
 
400175
400717
  // src/utils/attachments.ts
400176
400718
  import { readdir as readdir18, stat as stat32 } from "fs/promises";
400177
- import { dirname as dirname48, parse as parse13, relative as relative30, resolve as resolve40 } from "path";
400719
+ import { dirname as dirname49, parse as parse13, relative as relative30, resolve as resolve40 } from "path";
400178
400720
  import { randomUUID as randomUUID41 } from "crypto";
400179
400721
  function isAttachment(value) {
400180
400722
  return typeof value === "object" && value !== null && "type" in value;
@@ -400567,21 +401109,21 @@ async function getSelectedLinesFromIDE(ideSelection, toolUseContext) {
400567
401109
  ];
400568
401110
  }
400569
401111
  function getDirectoriesToProcess(targetPath, originalCwd) {
400570
- const targetDir = dirname48(resolve40(targetPath));
401112
+ const targetDir = dirname49(resolve40(targetPath));
400571
401113
  const nestedDirs = [];
400572
401114
  let currentDir = targetDir;
400573
401115
  while (currentDir !== originalCwd && currentDir !== parse13(currentDir).root) {
400574
401116
  if (currentDir.startsWith(originalCwd)) {
400575
401117
  nestedDirs.push(currentDir);
400576
401118
  }
400577
- currentDir = dirname48(currentDir);
401119
+ currentDir = dirname49(currentDir);
400578
401120
  }
400579
401121
  nestedDirs.reverse();
400580
401122
  const cwdLevelDirs = [];
400581
401123
  currentDir = originalCwd;
400582
401124
  while (currentDir !== parse13(currentDir).root) {
400583
401125
  cwdLevelDirs.push(currentDir);
400584
- currentDir = dirname48(currentDir);
401126
+ currentDir = dirname49(currentDir);
400585
401127
  }
400586
401128
  cwdLevelDirs.reverse();
400587
401129
  return { nestedDirs, cwdLevelDirs };
@@ -401827,21 +402369,21 @@ var init_attachments2 = __esm(() => {
401827
402369
  });
401828
402370
 
401829
402371
  // src/utils/plugins/loadPluginCommands.ts
401830
- import { basename as basename32, dirname as dirname49, join as join117 } from "path";
402372
+ import { basename as basename32, dirname as dirname50, join as join117 } from "path";
401831
402373
  function isSkillFile2(filePath) {
401832
402374
  return /^skill\.md$/i.test(basename32(filePath));
401833
402375
  }
401834
402376
  function getCommandNameFromFile(filePath, baseDir, pluginName) {
401835
402377
  const isSkill = isSkillFile2(filePath);
401836
402378
  if (isSkill) {
401837
- const skillDirectory = dirname49(filePath);
401838
- const parentOfSkillDir = dirname49(skillDirectory);
402379
+ const skillDirectory = dirname50(filePath);
402380
+ const parentOfSkillDir = dirname50(skillDirectory);
401839
402381
  const commandBaseName = basename32(skillDirectory);
401840
402382
  const relativePath = parentOfSkillDir.startsWith(baseDir) ? parentOfSkillDir.slice(baseDir.length).replace(/^\//, "") : "";
401841
402383
  const namespace = relativePath ? relativePath.split("/").join(":") : "";
401842
402384
  return namespace ? `${pluginName}:${namespace}:${commandBaseName}` : `${pluginName}:${commandBaseName}`;
401843
402385
  } else {
401844
- const fileDirectory = dirname49(filePath);
402386
+ const fileDirectory = dirname50(filePath);
401845
402387
  const commandBaseName = basename32(filePath).replace(/\.md$/, "");
401846
402388
  const relativePath = fileDirectory.startsWith(baseDir) ? fileDirectory.slice(baseDir.length).replace(/^\//, "") : "";
401847
402389
  const namespace = relativePath ? relativePath.split("/").join(":") : "";
@@ -401868,7 +402410,7 @@ async function collectMarkdownFiles(dirPath, baseDir, loadedPaths) {
401868
402410
  function transformPluginSkillFiles(files) {
401869
402411
  const filesByDir = new Map;
401870
402412
  for (const file2 of files) {
401871
- const dir = dirname49(file2.filePath);
402413
+ const dir = dirname50(file2.filePath);
401872
402414
  const dirFiles = filesByDir.get(dir) ?? [];
401873
402415
  dirFiles.push(file2);
401874
402416
  filesByDir.set(dir, dirFiles);
@@ -401957,7 +402499,7 @@ function createPluginCommand(commandName, file2, sourceName, pluginManifest, plu
401957
402499
  return displayName || commandName;
401958
402500
  },
401959
402501
  async getPromptForCommand(args, context5) {
401960
- let finalContent = config2.isSkillMode ? `Base directory for this skill: ${dirname49(file2.filePath)}
402502
+ let finalContent = config2.isSkillMode ? `Base directory for this skill: ${dirname50(file2.filePath)}
401961
402503
 
401962
402504
  ${content}` : content;
401963
402505
  finalContent = substituteArguments(finalContent, args, true, argumentNames);
@@ -401969,7 +402511,7 @@ ${content}` : content;
401969
402511
  finalContent = substituteUserConfigInContent(finalContent, loadPluginOptions(sourceName), pluginManifest.userConfig);
401970
402512
  }
401971
402513
  if (config2.isSkillMode) {
401972
- const rawSkillDir = dirname49(file2.filePath);
402514
+ const rawSkillDir = dirname50(file2.filePath);
401973
402515
  const skillDir = process.platform === "win32" ? rawSkillDir.replace(/\\/g, "/") : rawSkillDir;
401974
402516
  finalContent = finalContent.replace(/\$\{UR_SKILL_DIR\}/g, skillDir);
401975
402517
  }
@@ -402029,7 +402571,7 @@ async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, plugi
402029
402571
  const skillName = `${pluginName}:${basename32(skillsPath)}`;
402030
402572
  const file2 = {
402031
402573
  filePath: directSkillPath,
402032
- baseDir: dirname49(directSkillPath),
402574
+ baseDir: dirname50(directSkillPath),
402033
402575
  frontmatter,
402034
402576
  content: markdownContent
402035
402577
  };
@@ -402078,7 +402620,7 @@ async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, plugi
402078
402620
  const skillName = `${pluginName}:${entry.name}`;
402079
402621
  const file2 = {
402080
402622
  filePath: skillFilePath,
402081
- baseDir: dirname49(skillFilePath),
402623
+ baseDir: dirname50(skillFilePath),
402082
402624
  frontmatter,
402083
402625
  content: markdownContent
402084
402626
  };
@@ -402191,7 +402733,7 @@ var init_loadPluginCommands = __esm(() => {
402191
402733
  } : frontmatter;
402192
402734
  const file2 = {
402193
402735
  filePath: commandPath,
402194
- baseDir: dirname49(commandPath),
402736
+ baseDir: dirname50(commandPath),
402195
402737
  frontmatter: finalFrontmatter,
402196
402738
  content: markdownContent
402197
402739
  };
@@ -402454,7 +402996,7 @@ import {
402454
402996
  writeFile as writeFile25
402455
402997
  } from "fs/promises";
402456
402998
  import { tmpdir as tmpdir9 } from "os";
402457
- import { basename as basename34, dirname as dirname51, join as join119 } from "path";
402999
+ import { basename as basename34, dirname as dirname52, join as join119 } from "path";
402458
403000
  function isPluginZipCacheEnabled() {
402459
403001
  return isEnvTruthy(process.env.UR_CODE_PLUGIN_USE_ZIP_CACHE);
402460
403002
  }
@@ -402517,7 +403059,7 @@ async function cleanupSessionPluginCache() {
402517
403059
  }
402518
403060
  }
402519
403061
  async function atomicWriteToZipCache(targetPath, data) {
402520
- const dir = dirname51(targetPath);
403062
+ const dir = dirname52(targetPath);
402521
403063
  await getFsImplementation().mkdir(dir);
402522
403064
  const tmpName = `.${basename34(targetPath)}.tmp.${randomBytes13(4).toString("hex")}`;
402523
403065
  const tmpPath = join119(dir, tmpName);
@@ -402614,7 +403156,7 @@ async function extractZipToDirectory(zipPath, targetDir) {
402614
403156
  continue;
402615
403157
  }
402616
403158
  const fullPath = join119(targetDir, relPath);
402617
- await getFsImplementation().mkdir(dirname51(fullPath));
403159
+ await getFsImplementation().mkdir(dirname52(fullPath));
402618
403160
  await writeFile25(fullPath, data);
402619
403161
  const mode = modes[relPath];
402620
403162
  if (mode && mode & 73) {
@@ -403110,7 +403652,7 @@ var init_marketplaceHelpers = __esm(() => {
403110
403652
 
403111
403653
  // src/utils/plugins/officialMarketplaceGcs.ts
403112
403654
  import { chmod as chmod9, mkdir as mkdir26, readFile as readFile36, rename as rename5, rm as rm7, writeFile as writeFile27 } from "fs/promises";
403113
- import { dirname as dirname52, join as join121, resolve as resolve41, sep as sep26 } from "path";
403655
+ import { dirname as dirname53, join as join121, resolve as resolve41, sep as sep26 } from "path";
403114
403656
  async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCacheDir) {
403115
403657
  if (!GCS_BASE) {
403116
403658
  return null;
@@ -403160,7 +403702,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
403160
403702
  if (!rel || rel.endsWith("/"))
403161
403703
  continue;
403162
403704
  const dest = join121(staging, rel);
403163
- await mkdir26(dirname52(dest), { recursive: true });
403705
+ await mkdir26(dirname53(dest), { recursive: true });
403164
403706
  await writeFile27(dest, data);
403165
403707
  const mode = modes[arcPath];
403166
403708
  if (mode && mode & 73) {
@@ -403239,7 +403781,7 @@ var init_officialMarketplaceGcs = __esm(() => {
403239
403781
 
403240
403782
  // src/utils/plugins/marketplaceManager.ts
403241
403783
  import { writeFile as writeFile28 } from "fs/promises";
403242
- import { basename as basename35, dirname as dirname53, isAbsolute as isAbsolute31, join as join122, resolve as resolve42, sep as sep27 } from "path";
403784
+ import { basename as basename35, dirname as dirname54, isAbsolute as isAbsolute31, join as join122, resolve as resolve42, sep as sep27 } from "path";
403243
403785
  function getKnownMarketplacesFile() {
403244
403786
  return join122(getPluginsDirectory(), "known_marketplaces.json");
403245
403787
  }
@@ -403919,7 +404461,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
403919
404461
  case "file": {
403920
404462
  const absPath = resolve42(source.path);
403921
404463
  marketplacePath = absPath;
403922
- temporaryCachePath = dirname53(dirname53(absPath));
404464
+ temporaryCachePath = dirname54(dirname54(absPath));
403923
404465
  cleanupNeeded = false;
403924
404466
  break;
403925
404467
  }
@@ -403934,7 +404476,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
403934
404476
  temporaryCachePath = join122(cacheDir, source.name);
403935
404477
  marketplacePath = join122(temporaryCachePath, ".ur-plugin", "marketplace.json");
403936
404478
  cleanupNeeded = false;
403937
- await fs4.mkdir(dirname53(marketplacePath));
404479
+ await fs4.mkdir(dirname54(marketplacePath));
403938
404480
  await writeFile28(marketplacePath, jsonStringify({
403939
404481
  name: source.name,
403940
404482
  owner: source.owner ?? { name: "settings" },
@@ -404429,7 +404971,7 @@ var init_marketplaceManager = __esm(() => {
404429
404971
  });
404430
404972
 
404431
404973
  // src/utils/plugins/installedPluginsManager.ts
404432
- import { dirname as dirname54, join as join123 } from "path";
404974
+ import { dirname as dirname55, join as join123 } from "path";
404433
404975
  function getInstalledPluginsFilePath() {
404434
404976
  return join123(getPluginsDirectory(), "installed_plugins.json");
404435
404977
  }
@@ -404995,7 +405537,7 @@ var init_pluginVersioning = __esm(() => {
404995
405537
  // src/utils/plugins/pluginInstallationHelpers.ts
404996
405538
  import { randomBytes as randomBytes14 } from "crypto";
404997
405539
  import { rename as rename6, rm as rm8 } from "fs/promises";
404998
- import { dirname as dirname55, join as join124, resolve as resolve43, sep as sep28 } from "path";
405540
+ import { dirname as dirname56, join as join124, resolve as resolve43, sep as sep28 } from "path";
404999
405541
  function getCurrentTimestamp() {
405000
405542
  return new Date().toISOString();
405001
405543
  }
@@ -405019,14 +405561,14 @@ async function cacheAndRegisterPlugin(pluginId, entry, scope = "user", projectPa
405019
405561
  const versionedPath = getVersionedCachePath(pluginId, version2);
405020
405562
  let finalPath = cacheResult.path;
405021
405563
  if (cacheResult.path !== versionedPath) {
405022
- await getFsImplementation().mkdir(dirname55(versionedPath));
405564
+ await getFsImplementation().mkdir(dirname56(versionedPath));
405023
405565
  await rm8(versionedPath, { recursive: true, force: true });
405024
405566
  const normalizedCachePath = cacheResult.path.endsWith(sep28) ? cacheResult.path : cacheResult.path + sep28;
405025
405567
  const isSubdirectory = versionedPath.startsWith(normalizedCachePath);
405026
405568
  if (isSubdirectory) {
405027
- const tempPath = join124(dirname55(cacheResult.path), `.ur-plugin-temp-${Date.now()}-${randomBytes14(4).toString("hex")}`);
405569
+ const tempPath = join124(dirname56(cacheResult.path), `.ur-plugin-temp-${Date.now()}-${randomBytes14(4).toString("hex")}`);
405028
405570
  await rename6(cacheResult.path, tempPath);
405029
- await getFsImplementation().mkdir(dirname55(versionedPath));
405571
+ await getFsImplementation().mkdir(dirname56(versionedPath));
405030
405572
  await rename6(tempPath, versionedPath);
405031
405573
  } else {
405032
405574
  await rename6(cacheResult.path, versionedPath);
@@ -405255,7 +405797,7 @@ import {
405255
405797
  stat as stat35,
405256
405798
  symlink as symlink3
405257
405799
  } from "fs/promises";
405258
- import { basename as basename36, dirname as dirname56, join as join125, relative as relative31, resolve as resolve44, sep as sep29 } from "path";
405800
+ import { basename as basename36, dirname as dirname57, join as join125, relative as relative31, resolve as resolve44, sep as sep29 } from "path";
405259
405801
  function getPluginCachePath() {
405260
405802
  return join125(getPluginsDirectory(), "cache");
405261
405803
  }
@@ -405285,7 +405827,7 @@ async function probeSeedCache(pluginId, version2) {
405285
405827
  }
405286
405828
  async function probeSeedCacheAnyVersion(pluginId) {
405287
405829
  for (const seedDir of getPluginSeedDirs()) {
405288
- const pluginDir = dirname56(getVersionedCachePathIn(seedDir, pluginId, "_"));
405830
+ const pluginDir = dirname57(getVersionedCachePathIn(seedDir, pluginId, "_"));
405289
405831
  try {
405290
405832
  const versions2 = await readdir21(pluginDir);
405291
405833
  if (versions2.length !== 1)
@@ -405327,7 +405869,7 @@ async function copyDir(src, dest) {
405327
405869
  if (resolvedTarget.startsWith(srcPrefix) || resolvedTarget === resolvedSrc) {
405328
405870
  const targetRelativeToSrc = relative31(resolvedSrc, resolvedTarget);
405329
405871
  const destTargetPath = join125(dest, targetRelativeToSrc);
405330
- const relativeLinkPath = relative31(dirname56(destPath), destTargetPath);
405872
+ const relativeLinkPath = relative31(dirname57(destPath), destTargetPath);
405331
405873
  await symlink3(relativeLinkPath, destPath);
405332
405874
  } else {
405333
405875
  await symlink3(resolvedTarget, destPath);
@@ -405358,7 +405900,7 @@ async function copyPluginToVersionedCache(sourcePath, pluginId, version2, entry,
405358
405900
  logForDebugging(`Using seed cache for ${pluginId}@${version2} at ${seedPath}`);
405359
405901
  return seedPath;
405360
405902
  }
405361
- await getFsImplementation().mkdir(dirname56(cachePath));
405903
+ await getFsImplementation().mkdir(dirname57(cachePath));
405362
405904
  if (entry && typeof entry.source === "string" && marketplaceDir) {
405363
405905
  const sourceDir = validatePathWithinBase(marketplaceDir, entry.source);
405364
405906
  logForDebugging(`Copying source directory ${entry.source} for plugin ${pluginId}`);
@@ -413794,7 +414336,7 @@ __export(exports_terminalSetup, {
413794
414336
  import { randomBytes as randomBytes16 } from "crypto";
413795
414337
  import { copyFile as copyFile8, mkdir as mkdir27, readFile as readFile38, writeFile as writeFile29 } from "fs/promises";
413796
414338
  import { homedir as homedir28, platform as platform4 } from "os";
413797
- import { dirname as dirname57, join as join128 } from "path";
414339
+ import { dirname as dirname58, join as join128 } from "path";
413798
414340
  import { pathToFileURL as pathToFileURL7 } from "url";
413799
414341
  function isVSCodeRemoteSSH() {
413800
414342
  const askpassMain = process.env.VSCODE_GIT_ASKPASS_MAIN ?? "";
@@ -414116,7 +414658,7 @@ chars = "\\u001B\\r"`;
414116
414658
  return `${color("warning", theme)("Error backing up existing Alacritty config. Bailing out.")}${EOL5}${source_default.dim(`See ${formatPathLink(configPath)}`)}${EOL5}${source_default.dim(`Backup path: ${formatPathLink(backupPath)}`)}${EOL5}`;
414117
414659
  }
414118
414660
  } else {
414119
- await mkdir27(dirname57(configPath), {
414661
+ await mkdir27(dirname58(configPath), {
414120
414662
  recursive: true
414121
414663
  });
414122
414664
  }
@@ -416563,7 +417105,7 @@ var init_TextInput = __esm(() => {
416563
417105
  });
416564
417106
 
416565
417107
  // src/utils/suggestions/directoryCompletion.ts
416566
- import { basename as basename40, dirname as dirname58, join as join131, sep as sep30 } from "path";
417108
+ import { basename as basename40, dirname as dirname59, join as join131, sep as sep30 } from "path";
416567
417109
  function parsePartialPath(partialPath, basePath) {
416568
417110
  if (!partialPath) {
416569
417111
  const directory2 = basePath || getCwd();
@@ -416573,7 +417115,7 @@ function parsePartialPath(partialPath, basePath) {
416573
417115
  if (partialPath.endsWith("/") || partialPath.endsWith(sep30)) {
416574
417116
  return { directory: resolved, prefix: "" };
416575
417117
  }
416576
- const directory = dirname58(resolved);
417118
+ const directory = dirname59(resolved);
416577
417119
  const prefix = basename40(partialPath);
416578
417120
  return { directory, prefix };
416579
417121
  }
@@ -418502,7 +419044,7 @@ function Feedback({
418502
419044
  platform: env2.platform,
418503
419045
  gitRepo: envInfo.isGit,
418504
419046
  terminal: env2.terminal,
418505
- version: "1.65.11",
419047
+ version: "1.65.12",
418506
419048
  transcript: normalizeMessagesForAPI(messages),
418507
419049
  errors: sanitizedErrors,
418508
419050
  lastApiRequest: getLastAPIRequest(),
@@ -418694,7 +419236,7 @@ function Feedback({
418694
419236
  ", ",
418695
419237
  env2.terminal,
418696
419238
  ", v",
418697
- "1.65.11"
419239
+ "1.65.12"
418698
419240
  ]
418699
419241
  }, undefined, true, undefined, this)
418700
419242
  ]
@@ -418800,7 +419342,7 @@ ${sanitizedDescription}
418800
419342
  ` + `**Environment Info**
418801
419343
  ` + `- Platform: ${env2.platform}
418802
419344
  ` + `- Terminal: ${env2.terminal}
418803
- ` + `- Version: ${"1.65.11"}
419345
+ ` + `- Version: ${"1.65.12"}
418804
419346
  ` + `- Feedback ID: ${feedbackId}
418805
419347
  ` + `
418806
419348
  **Errors**
@@ -421910,7 +422452,7 @@ function buildPrimarySection() {
421910
422452
  }, undefined, false, undefined, this);
421911
422453
  return [{
421912
422454
  label: "Version",
421913
- value: "1.65.11"
422455
+ value: "1.65.12"
421914
422456
  }, {
421915
422457
  label: "Session name",
421916
422458
  value: nameValue
@@ -425240,7 +425782,7 @@ function Config({
425240
425782
  }
425241
425783
  }, undefined, false, undefined, this)
425242
425784
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
425243
- currentVersion: "1.65.11",
425785
+ currentVersion: "1.65.12",
425244
425786
  onChoice: (choice) => {
425245
425787
  setShowSubmenu(null);
425246
425788
  setTabsHidden(false);
@@ -425252,7 +425794,7 @@ function Config({
425252
425794
  autoUpdatesChannel: "stable"
425253
425795
  };
425254
425796
  if (choice === "stay") {
425255
- newSettings.minimumVersion = "1.65.11";
425797
+ newSettings.minimumVersion = "1.65.12";
425256
425798
  }
425257
425799
  updateSettingsForSource("userSettings", newSettings);
425258
425800
  setSettingsData((prev_27) => ({
@@ -433316,7 +433858,7 @@ function HelpV2(t0) {
433316
433858
  let t6;
433317
433859
  if ($2[31] !== tabs) {
433318
433860
  t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
433319
- title: `UR v${"1.65.11"}`,
433861
+ title: `UR v${"1.65.12"}`,
433320
433862
  color: "professionalBlue",
433321
433863
  defaultTab: "general",
433322
433864
  children: tabs
@@ -434249,7 +434791,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
434249
434791
  async function handleInitialize(options2) {
434250
434792
  return {
434251
434793
  name: "UR",
434252
- version: "1.65.11",
434794
+ version: "1.65.12",
434253
434795
  protocolVersion: "0.1.0",
434254
434796
  workspaceRoot: options2.cwd,
434255
434797
  capabilities: {
@@ -436291,7 +436833,7 @@ __export(exports_keybindings, {
436291
436833
  call: () => call24
436292
436834
  });
436293
436835
  import { mkdir as mkdir32, writeFile as writeFile34 } from "fs/promises";
436294
- import { dirname as dirname60 } from "path";
436836
+ import { dirname as dirname61 } from "path";
436295
436837
  async function call24() {
436296
436838
  if (!isKeybindingCustomizationEnabled()) {
436297
436839
  return {
@@ -436301,7 +436843,7 @@ async function call24() {
436301
436843
  }
436302
436844
  const keybindingsPath = getKeybindingsPath();
436303
436845
  let fileExists = false;
436304
- await mkdir32(dirname60(keybindingsPath), { recursive: true });
436846
+ await mkdir32(dirname61(keybindingsPath), { recursive: true });
436305
436847
  try {
436306
436848
  await writeFile34(keybindingsPath, generateKeybindingsTemplate(), {
436307
436849
  encoding: "utf-8",
@@ -443928,7 +444470,7 @@ var init_DiscoverPlugins = __esm(() => {
443928
444470
  });
443929
444471
 
443930
444472
  // src/services/plugins/pluginOperations.ts
443931
- import { dirname as dirname61, join as join142 } from "path";
444473
+ import { dirname as dirname62, join as join142 } from "path";
443932
444474
  function assertInstallableScope(scope) {
443933
444475
  if (!VALID_INSTALLABLE_SCOPES.includes(scope)) {
443934
444476
  throw new Error(`Invalid scope "${scope}". Must be one of: ${VALID_INSTALLABLE_SCOPES.join(", ")}`);
@@ -444405,7 +444947,7 @@ async function performPluginUpdate({
444405
444947
  }
444406
444948
  throw e;
444407
444949
  }
444408
- const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname61(marketplaceInstallLocation);
444950
+ const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname62(marketplaceInstallLocation);
444409
444951
  sourcePath = join142(marketplaceDir, entry.source);
444410
444952
  try {
444411
444953
  await fs4.stat(sourcePath);
@@ -451237,7 +451779,7 @@ ${args ? "Additional user input: " + args : ""}
451237
451779
 
451238
451780
  // src/utils/releaseNotes.ts
451239
451781
  import { mkdir as mkdir33, readFile as readFile45, writeFile as writeFile37 } from "fs/promises";
451240
- import { dirname as dirname63, join as join146 } from "path";
451782
+ import { dirname as dirname64, join as join146 } from "path";
451241
451783
  function getChangelogCachePath() {
451242
451784
  return join146(getURConfigHomeDir(), "cache", "changelog.md");
451243
451785
  }
@@ -451248,7 +451790,7 @@ async function migrateChangelogFromConfig() {
451248
451790
  }
451249
451791
  const cachePath = getChangelogCachePath();
451250
451792
  try {
451251
- await mkdir33(dirname63(cachePath), { recursive: true });
451793
+ await mkdir33(dirname64(cachePath), { recursive: true });
451252
451794
  await writeFile37(cachePath, config3.cachedChangelog, {
451253
451795
  encoding: "utf-8",
451254
451796
  flag: "wx"
@@ -451270,7 +451812,7 @@ async function fetchAndStoreChangelog() {
451270
451812
  return;
451271
451813
  }
451272
451814
  const cachePath = getChangelogCachePath();
451273
- await mkdir33(dirname63(cachePath), { recursive: true });
451815
+ await mkdir33(dirname64(cachePath), { recursive: true });
451274
451816
  await writeFile37(cachePath, changelogContent, { encoding: "utf-8" });
451275
451817
  changelogMemoryCache = changelogContent;
451276
451818
  const changelogLastFetched = Date.now();
@@ -451357,7 +451899,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
451357
451899
  return [];
451358
451900
  }
451359
451901
  }
451360
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.11") {
451902
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.12") {
451361
451903
  if (process.env.USER_TYPE === "ant") {
451362
451904
  const changelog = "";
451363
451905
  if (changelog) {
@@ -451384,7 +451926,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.11")
451384
451926
  releaseNotes
451385
451927
  };
451386
451928
  }
451387
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.65.11") {
451929
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.65.12") {
451388
451930
  if (process.env.USER_TYPE === "ant") {
451389
451931
  const changelog = "";
451390
451932
  if (changelog) {
@@ -454250,7 +454792,7 @@ function getRecentActivitySync() {
454250
454792
  return cachedActivity;
454251
454793
  }
454252
454794
  function getLogoDisplayData() {
454253
- const version2 = process.env.DEMO_VERSION ?? "1.65.11";
454795
+ const version2 = process.env.DEMO_VERSION ?? "1.65.12";
454254
454796
  const serverUrl = getDirectConnectServerUrl();
454255
454797
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
454256
454798
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -455117,7 +455659,7 @@ function LogoV2() {
455117
455659
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
455118
455660
  t2 = () => {
455119
455661
  const currentConfig2 = getGlobalConfig();
455120
- if (currentConfig2.lastReleaseNotesSeen === "1.65.11") {
455662
+ if (currentConfig2.lastReleaseNotesSeen === "1.65.12") {
455121
455663
  return;
455122
455664
  }
455123
455665
  saveGlobalConfig(_temp325);
@@ -455802,12 +456344,12 @@ function LogoV2() {
455802
456344
  return t41;
455803
456345
  }
455804
456346
  function _temp325(current) {
455805
- if (current.lastReleaseNotesSeen === "1.65.11") {
456347
+ if (current.lastReleaseNotesSeen === "1.65.12") {
455806
456348
  return current;
455807
456349
  }
455808
456350
  return {
455809
456351
  ...current,
455810
- lastReleaseNotesSeen: "1.65.11"
456352
+ lastReleaseNotesSeen: "1.65.12"
455811
456353
  };
455812
456354
  }
455813
456355
  function _temp241(s_0) {
@@ -462079,7 +462621,7 @@ import {
462079
462621
  readFileSync as readFileSync34,
462080
462622
  statSync as statSync14
462081
462623
  } from "fs";
462082
- import { dirname as dirname64, isAbsolute as isAbsolute33, resolve as resolve51 } from "path";
462624
+ import { dirname as dirname65, isAbsolute as isAbsolute33, resolve as resolve51 } from "path";
462083
462625
  function validateTranscriptContent(content) {
462084
462626
  const errors4 = [];
462085
462627
  let messageCount = 0;
@@ -462135,7 +462677,7 @@ function importSessionFile(sourcePath) {
462135
462677
  while (sessionIdExists(sessionId))
462136
462678
  sessionId = randomUUID46();
462137
462679
  const target = getTranscriptPathForSession(sessionId);
462138
- mkdirSync21(dirname64(target), { recursive: true });
462680
+ mkdirSync21(dirname65(target), { recursive: true });
462139
462681
  copyFileSync2(source, target);
462140
462682
  return { sessionId, path: target, messageCount: validation.messageCount };
462141
462683
  }
@@ -469770,7 +470312,7 @@ var init_attackSurface = __esm(() => {
469770
470312
 
469771
470313
  // src/security/findings.ts
469772
470314
  import * as fs7 from "fs";
469773
- import { dirname as dirname65, join as join151 } from "path";
470315
+ import { dirname as dirname66, join as join151 } from "path";
469774
470316
  function severityRank(s) {
469775
470317
  return ORDER.indexOf(s);
469776
470318
  }
@@ -469788,7 +470330,7 @@ class FindingStore {
469788
470330
  }
469789
470331
  }
469790
470332
  persist() {
469791
- fs7.mkdirSync(dirname65(this.file), { recursive: true });
470333
+ fs7.mkdirSync(dirname66(this.file), { recursive: true });
469792
470334
  fs7.writeFileSync(this.file, JSON.stringify(this.findings, null, 2));
469793
470335
  }
469794
470336
  add(items) {
@@ -471808,7 +472350,7 @@ import {
471808
472350
  writeFileSync as writeFileSync26
471809
472351
  } from "fs";
471810
472352
  import { tmpdir as tmpdir12 } from "os";
471811
- import { dirname as dirname66, isAbsolute as isAbsolute35, join as join157, relative as relative40, resolve as resolve55, sep as sep39 } from "path";
472353
+ import { dirname as dirname67, isAbsolute as isAbsolute35, join as join157, relative as relative40, resolve as resolve55, sep as sep39 } from "path";
471812
472354
  function positiveInteger(value, min, max2) {
471813
472355
  return typeof value === "number" && Number.isInteger(value) && value >= min && value <= max2;
471814
472356
  }
@@ -472339,7 +472881,7 @@ function manifestPathFor(dir, runId) {
472339
472881
  return join157(dir, runId, "manifest.json");
472340
472882
  }
472341
472883
  function writeAgenticCiResult(result) {
472342
- mkdirSync27(dirname66(result.manifestPath), { recursive: true });
472884
+ mkdirSync27(dirname67(result.manifestPath), { recursive: true });
472343
472885
  writeFileSync26(result.manifestPath, `${JSON.stringify(result, null, 2)}
472344
472886
  `, {
472345
472887
  mode: 384
@@ -472635,7 +473177,7 @@ async function runAgenticCi(options2) {
472635
473177
  let patch;
472636
473178
  if (diff2.trim() && violations.length === 0) {
472637
473179
  const digest3 = sha2562(diff2);
472638
- const runDir = dirname66(manifestPath5);
473180
+ const runDir = dirname67(manifestPath5);
472639
473181
  mkdirSync27(runDir, { recursive: true });
472640
473182
  const patchPath = join157(runDir, `patch-${digest3}.diff`);
472641
473183
  writeFileSync26(patchPath, diff2, { mode: 384 });
@@ -472731,7 +473273,7 @@ function saveAgenticCiSpec(cwd2, spec, options2 = {}) {
472731
473273
  if (!validation.valid)
472732
473274
  throw new Error(validation.errors.join("; "));
472733
473275
  const path22 = agenticCiSpecPath(cwd2, spec.name);
472734
- mkdirSync27(dirname66(path22), { recursive: true });
473276
+ mkdirSync27(dirname67(path22), { recursive: true });
472735
473277
  if (existsSync41(path22) && !options2.force)
472736
473278
  return { path: path22, created: false };
472737
473279
  writeFileSync26(path22, import_yaml3.stringify(spec), { mode: 384 });
@@ -472747,7 +473289,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
472747
473289
  if (spec.name !== specName) {
472748
473290
  throw new Error("Agentic CI workflow spec name does not match");
472749
473291
  }
472750
- const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.65.11" : "1.65.11");
473292
+ const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.65.12" : "1.65.12");
472751
473293
  if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
472752
473294
  throw new Error("invalid ur-agent package version");
472753
473295
  }
@@ -473086,12 +473628,12 @@ var init_agenticCi = __esm(() => {
473086
473628
 
473087
473629
  // src/services/agents/featureScaffolds.ts
473088
473630
  import { existsSync as existsSync42, mkdirSync as mkdirSync28, writeFileSync as writeFileSync27 } from "fs";
473089
- import { dirname as dirname67, join as join158 } from "path";
473631
+ import { dirname as dirname68, join as join158 } from "path";
473090
473632
  function writeSeedFile(root2, file2, result, force) {
473091
- const baseRoot = file2.root === "project" ? dirname67(root2) : root2;
473633
+ const baseRoot = file2.root === "project" ? dirname68(root2) : root2;
473092
473634
  const fullPath = join158(baseRoot, file2.path);
473093
473635
  const displayPath = file2.path;
473094
- mkdirSync28(dirname67(fullPath), { recursive: true });
473636
+ mkdirSync28(dirname68(fullPath), { recursive: true });
473095
473637
  if (!force && existsSync42(fullPath)) {
473096
473638
  result.skipped.push(displayPath);
473097
473639
  return;
@@ -473740,7 +474282,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
473740
474282
  path: ".github/workflows/ur.yml",
473741
474283
  root: "project",
473742
474284
  content: compileAgenticCiWorkflow("default", {
473743
- packageVersion: typeof MACRO !== "undefined" ? "1.65.11" : "1.65.11"
474285
+ packageVersion: typeof MACRO !== "undefined" ? "1.65.12" : "1.65.12"
473744
474286
  })
473745
474287
  },
473746
474288
  {
@@ -473804,13 +474346,13 @@ __export(exports_agent_ci, {
473804
474346
  call: () => call56
473805
474347
  });
473806
474348
  import { existsSync as existsSync43, mkdirSync as mkdirSync29, writeFileSync as writeFileSync28 } from "fs";
473807
- import { dirname as dirname68, join as join159 } from "path";
474349
+ import { dirname as dirname69, join as join159 } from "path";
473808
474350
  function value(tokens, flag) {
473809
474351
  const index2 = tokens.indexOf(flag);
473810
474352
  return index2 >= 0 ? tokens[index2 + 1] : undefined;
473811
474353
  }
473812
474354
  function cliVersion() {
473813
- return typeof MACRO !== "undefined" ? "1.65.11" : "1.65.11";
474355
+ return typeof MACRO !== "undefined" ? "1.65.12" : "1.65.12";
473814
474356
  }
473815
474357
  function workflowPath(cwd2) {
473816
474358
  return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
@@ -473868,7 +474410,7 @@ var call56 = async (args) => {
473868
474410
  const target = workflowPath(cwd2);
473869
474411
  let workflowCreated = false;
473870
474412
  if (!existsSync43(target) || force) {
473871
- mkdirSync29(dirname68(target), { recursive: true });
474413
+ mkdirSync29(dirname69(target), { recursive: true });
473872
474414
  writeFileSync28(target, compileAgenticCiWorkflow(name, {
473873
474415
  packageVersion: cliVersion(),
473874
474416
  spec: compiledSpec
@@ -473913,7 +474455,7 @@ Use --force to replace it.`
473913
474455
  value: json2 ? JSON.stringify(result, null, 2) : `${result.replacing ? "Would replace" : "Would write"} hardened workflow at ${target}`
473914
474456
  };
473915
474457
  }
473916
- mkdirSync29(dirname68(target), { recursive: true });
474458
+ mkdirSync29(dirname69(target), { recursive: true });
473917
474459
  writeFileSync28(target, compileAgenticCiWorkflow(name, {
473918
474460
  packageVersion: cliVersion(),
473919
474461
  spec: workflowSpec
@@ -479675,7 +480217,7 @@ function createAcpStdioApp(deps) {
479675
480217
  }
479676
480218
  },
479677
480219
  authMethods: [],
479678
- agentInfo: { name: "UR-Nexus", version: "1.65.11" }
480220
+ agentInfo: { name: "UR-Nexus", version: "1.65.12" }
479679
480221
  })).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
479680
480222
  const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
479681
480223
  await runtime2.announce({
@@ -479772,7 +480314,7 @@ function createAcpStdioAgent(deps) {
479772
480314
  }
479773
480315
  },
479774
480316
  authMethods: [],
479775
- agentInfo: { name: "UR-Nexus", version: "1.65.11" }
480317
+ agentInfo: { name: "UR-Nexus", version: "1.65.12" }
479776
480318
  });
479777
480319
  return;
479778
480320
  case "authenticate":
@@ -481545,7 +482087,7 @@ var init_validation5 = () => {};
481545
482087
 
481546
482088
  // src/services/promptPlanning/executor.ts
481547
482089
  import { realpathSync as realpathSync13 } from "fs";
481548
- import { basename as basename45, dirname as dirname69, resolve as resolve56 } from "path";
482090
+ import { basename as basename45, dirname as dirname70, resolve as resolve56 } from "path";
481549
482091
  function cloneTasks(tasks2) {
481550
482092
  return tasks2.map((task) => ({
481551
482093
  ...task,
@@ -481577,7 +482119,7 @@ function canonicalLockKey(cwd2, value2) {
481577
482119
  const suffix = [];
481578
482120
  let current = absolute;
481579
482121
  for (;; ) {
481580
- const parent2 = dirname69(current);
482122
+ const parent2 = dirname70(current);
481581
482123
  if (parent2 === current)
481582
482124
  return absolute;
481583
482125
  suffix.unshift(basename45(current));
@@ -486196,7 +486738,7 @@ import {
486196
486738
  writeFileSync as writeFileSync36
486197
486739
  } from "fs";
486198
486740
  import { homedir as homedir32 } from "os";
486199
- import { dirname as dirname70, isAbsolute as isAbsolute39, join as join171, resolve as resolve58, sep as pathSep3 } from "path";
486741
+ import { dirname as dirname71, isAbsolute as isAbsolute39, join as join171, resolve as resolve58, sep as pathSep3 } from "path";
486200
486742
  function parseCommandTokens(tokens) {
486201
486743
  const positional = [];
486202
486744
  const flags = new Set;
@@ -486264,7 +486806,7 @@ function readPrivateKey(path22) {
486264
486806
  }
486265
486807
  function writeTrustedKeys(keys2) {
486266
486808
  const path22 = trustedSkillKeysPath();
486267
- mkdirSync37(dirname70(path22), { recursive: true, mode: 448 });
486809
+ mkdirSync37(dirname71(path22), { recursive: true, mode: 448 });
486268
486810
  const temporary = `${path22}.${process.pid}.${randomUUID52()}.tmp`;
486269
486811
  try {
486270
486812
  writeFileSync36(temporary, `${JSON.stringify(keys2, null, 2)}
@@ -486347,7 +486889,7 @@ var VALUE_OPTIONS, call70 = async (args) => {
486347
486889
  const { privateKey, publicKey } = generateKeyPairSync2("ed25519");
486348
486890
  const privatePem = privateKey.export({ type: "pkcs8", format: "pem" });
486349
486891
  const publicPem = publicKey.export({ type: "spki", format: "pem" }).toString();
486350
- mkdirSync37(dirname70(privatePath), { recursive: true, mode: 448 });
486892
+ mkdirSync37(dirname71(privatePath), { recursive: true, mode: 448 });
486351
486893
  writeFileSync36(privatePath, privatePem, { flag: "wx", mode: 384 });
486352
486894
  createdPrivate = true;
486353
486895
  writeFileSync36(publicPath, publicPem, { flag: "wx", mode: 420 });
@@ -487317,7 +487859,7 @@ import {
487317
487859
  writeFileSync as writeFileSync39
487318
487860
  } from "fs";
487319
487861
  import { tmpdir as tmpdir14 } from "os";
487320
- import { dirname as dirname71, join as join175 } from "path";
487862
+ import { dirname as dirname72, join as join175 } from "path";
487321
487863
  function redactArenaText(value2) {
487322
487864
  return redactAgenticCiText(value2);
487323
487865
  }
@@ -487791,7 +488333,7 @@ async function applyWinner(cwd2, baseSha, runId, winner) {
487791
488333
  }
487792
488334
  const digest3 = sha2563(winner.diff);
487793
488335
  const patch = join175(cwd2, ".ur", "arena", runId, `winner-${digest3}.patch`);
487794
- mkdirSync39(dirname71(patch), { recursive: true });
488336
+ mkdirSync39(dirname72(patch), { recursive: true });
487795
488337
  writeFileSync39(patch, winner.diff, { mode: 384 });
487796
488338
  const check3 = await git4(cwd2, ["apply", "--check", "--3way", patch]);
487797
488339
  if (check3.code !== 0) {
@@ -490530,17 +491072,17 @@ __export(exports_agent_inspect, {
490530
491072
  call: () => call78
490531
491073
  });
490532
491074
  import { readdirSync as readdirSync23, statSync as statSync23 } from "fs";
490533
- import { dirname as dirname72, join as join183 } from "path";
491075
+ import { dirname as dirname73, join as join183 } from "path";
490534
491076
  function resolveSessionSubagentsDir() {
490535
491077
  let live;
490536
491078
  try {
490537
- live = dirname72(getAgentTranscriptPath("probe"));
491079
+ live = dirname73(getAgentTranscriptPath("probe"));
490538
491080
  } catch {
490539
491081
  return null;
490540
491082
  }
490541
491083
  if (hasTranscripts(live))
490542
491084
  return live;
490543
- const projectDir = dirname72(dirname72(live));
491085
+ const projectDir = dirname73(dirname73(live));
490544
491086
  let sessions;
490545
491087
  try {
490546
491088
  sessions = readdirSync23(projectDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join183(projectDir, entry.name, "subagents")).filter(hasTranscripts);
@@ -490884,7 +491426,7 @@ var init_memoryIntegrity = __esm(() => {
490884
491426
  });
490885
491427
 
490886
491428
  // src/memdir/teamMemPaths.ts
490887
- import { dirname as dirname73, join as join185, resolve as resolve60, sep as sep43 } from "path";
491429
+ import { dirname as dirname74, join as join185, resolve as resolve60, sep as sep43 } from "path";
490888
491430
  function getTeamMemPath() {
490889
491431
  return (join185(getAutoMemPath(), "team") + sep43).normalize("NFC");
490890
491432
  }
@@ -497165,7 +497707,7 @@ import {
497165
497707
  writeFileSync as writeFileSync54
497166
497708
  } from "fs";
497167
497709
  import {
497168
- dirname as dirname74,
497710
+ dirname as dirname75,
497169
497711
  isAbsolute as isAbsolute43,
497170
497712
  join as join198,
497171
497713
  relative as relative48,
@@ -497210,7 +497752,7 @@ function existingAncestor(path22) {
497210
497752
  for (;; ) {
497211
497753
  if (existsSync77(current))
497212
497754
  return realpathSync15(current);
497213
- const parent2 = dirname74(current);
497755
+ const parent2 = dirname75(current);
497214
497756
  if (parent2 === current)
497215
497757
  return current;
497216
497758
  current = parent2;
@@ -497220,7 +497762,7 @@ function initTargetAllowed(cwd2, path22, allowExternal) {
497220
497762
  if (allowExternal)
497221
497763
  return true;
497222
497764
  const workspace = realpathSync15(cwd2);
497223
- return pathIsWithin4(workspace, resolve64(path22)) && pathIsWithin4(workspace, existingAncestor(dirname74(path22)));
497765
+ return pathIsWithin4(workspace, resolve64(path22)) && pathIsWithin4(workspace, existingAncestor(dirname75(path22)));
497224
497766
  }
497225
497767
  async function runDesktopQaCommand(args, cwd2, dependencies = {}) {
497226
497768
  const runFixture = dependencies.runFixture ?? runDesktopQaFixture;
@@ -497310,7 +497852,7 @@ async function runDesktopQaCommand(args, cwd2, dependencies = {}) {
497310
497852
  value: `Fixture already exists: ${path22} (use --force to replace it).`
497311
497853
  };
497312
497854
  }
497313
- mkdirSync54(dirname74(path22), { recursive: true, mode: 448 });
497855
+ mkdirSync54(dirname75(path22), { recursive: true, mode: 448 });
497314
497856
  writeFileSync54(path22, `${JSON.stringify(EXAMPLE_FIXTURE, null, 2)}
497315
497857
  `, {
497316
497858
  mode: 384
@@ -498194,7 +498736,7 @@ import {
498194
498736
  readFileSync as readFileSync72,
498195
498737
  writeFileSync as writeFileSync55
498196
498738
  } from "fs";
498197
- import { dirname as dirname75, join as join199, relative as relative49 } from "path";
498739
+ import { dirname as dirname76, join as join199, relative as relative49 } from "path";
498198
498740
  function defaultTraceDir(cwd2) {
498199
498741
  return join199(cwd2, ".ur", "test-first", "traces");
498200
498742
  }
@@ -498247,7 +498789,7 @@ function mergeStringArray(existing2, additions) {
498247
498789
  }
498248
498790
  function installTestFirstGates(cwd2, stack = detectTestFirstStack(cwd2)) {
498249
498791
  const path22 = join199(cwd2, ".ur", "verify.json");
498250
- mkdirSync55(dirname75(path22), { recursive: true });
498792
+ mkdirSync55(dirname76(path22), { recursive: true });
498251
498793
  const commands = stack.commands.map((command5) => command5.command);
498252
498794
  const existing2 = readExistingVerifyConfig(path22);
498253
498795
  const next = {
@@ -502658,7 +503200,7 @@ var init_os2 = __esm(() => {
502658
503200
  import { createHash as createHash47, randomUUID as randomUUID59 } from "crypto";
502659
503201
  import { existsSync as existsSync83, lstatSync as lstatSync20, realpathSync as realpathSync16, rmSync as rmSync18 } from "fs";
502660
503202
  import { tmpdir as tmpdir16 } from "os";
502661
- import { dirname as dirname76, isAbsolute as isAbsolute44, join as join204, relative as relative50, resolve as resolve66 } from "path";
503203
+ import { dirname as dirname77, isAbsolute as isAbsolute44, join as join204, relative as relative50, resolve as resolve66 } from "path";
502662
503204
  function workspaceDir(cwd2) {
502663
503205
  return join204(cwd2, ".ur", "workspaces");
502664
503206
  }
@@ -503067,7 +503609,7 @@ async function prepareRepositoryState(cwd2, spec2, validation, runId, options3)
503067
503609
  if (filters.code !== 0 && filters.code !== 1) {
503068
503610
  throw new Error(`Could not inspect ${repo.id} Git filters`);
503069
503611
  }
503070
- ensurePrivateDirectory(workspaceDir(cwd2), dirname76(worktree2));
503612
+ ensurePrivateDirectory(workspaceDir(cwd2), dirname77(worktree2));
503071
503613
  const created = await git7(details.root, ["worktree", "add", "-b", branch, worktree2, repo.baseRef], options3.commandRunner);
503072
503614
  if (created.code !== 0) {
503073
503615
  throw new Error(`Could not create ${repo.id} worktree: ${created.stderr || created.error || created.stdout}`);
@@ -503164,7 +503706,7 @@ async function runWorkspace(cwd2, name, options3 = {}) {
503164
503706
  const persist = () => {
503165
503707
  state.updatedAt = new Date().toISOString();
503166
503708
  if (!options3.dryRun) {
503167
- ensurePrivateDirectory(workspaceDir(cwd2), dirname76(workspaceStatePath(cwd2, name)));
503709
+ ensurePrivateDirectory(workspaceDir(cwd2), dirname77(workspaceStatePath(cwd2, name)));
503168
503710
  withPrivateStateLock(workspaceDir(cwd2), `state-${name}`, () => saveState(cwd2, state));
503169
503711
  }
503170
503712
  };
@@ -503825,7 +504367,7 @@ import {
503825
504367
  readdirSync as readdirSync32,
503826
504368
  writeFileSync as writeFileSync59
503827
504369
  } from "fs";
503828
- import { dirname as dirname77, join as join205 } from "path";
504370
+ import { dirname as dirname78, join as join205 } from "path";
503829
504371
  function memoryDir(cwd2) {
503830
504372
  return join205(cwd2, ".ur", "memory");
503831
504373
  }
@@ -503860,7 +504402,7 @@ function saveMemoryRetentionPolicy(cwd2, patch) {
503860
504402
  decayDays: patch.decayDays === undefined ? current.decayDays : validPositive(patch.decayDays),
503861
504403
  updatedAt: new Date().toISOString()
503862
504404
  };
503863
- mkdirSync59(dirname77(policyPath2(cwd2)), { recursive: true });
504405
+ mkdirSync59(dirname78(policyPath2(cwd2)), { recursive: true });
503864
504406
  writeFileSync59(policyPath2(cwd2), `${JSON.stringify(next, null, 2)}
503865
504407
  `);
503866
504408
  return next;
@@ -673551,7 +674093,7 @@ import {
673551
674093
  statSync as statSync29,
673552
674094
  writeFileSync as writeFileSync61
673553
674095
  } from "fs";
673554
- import { dirname as dirname78, extname as extname19, isAbsolute as isAbsolute45, join as join207, relative as relative52, resolve as resolve67 } from "path";
674096
+ import { dirname as dirname79, extname as extname19, isAbsolute as isAbsolute45, join as join207, relative as relative52, resolve as resolve67 } from "path";
673555
674097
  import { promisify as promisify4 } from "util";
673556
674098
  function repoEditIndexPath(root2) {
673557
674099
  return join207(root2, ".ur", "repo-edit", "index.json");
@@ -673691,7 +674233,7 @@ ${content}`),
673691
674233
  builtAt: new Date().toISOString(),
673692
674234
  files
673693
674235
  };
673694
- mkdirSync61(dirname78(repoEditIndexPath(root2)), { recursive: true });
674236
+ mkdirSync61(dirname79(repoEditIndexPath(root2)), { recursive: true });
673695
674237
  writeFileSync61(repoEditIndexPath(root2), `${JSON.stringify(index2, null, 2)}
673696
674238
  `);
673697
674239
  return index2;
@@ -674368,7 +674910,7 @@ var init_diagnostics = __esm(() => {
674368
674910
  });
674369
674911
 
674370
674912
  // src/services/repoEditing/ast/workspaceEdit.ts
674371
- import { dirname as dirname79, isAbsolute as isAbsolute46, relative as relative53, resolve as resolve68, sep as sep47 } from "path";
674913
+ import { dirname as dirname80, isAbsolute as isAbsolute46, relative as relative53, resolve as resolve68, sep as sep47 } from "path";
674372
674914
  import {
674373
674915
  chmodSync as chmodSync11,
674374
674916
  existsSync as existsSync87,
@@ -674419,7 +674961,7 @@ function realpathForMissing(path22) {
674419
674961
  const suffix = [];
674420
674962
  let cursor = path22;
674421
674963
  while (!existsSync87(cursor)) {
674422
- const parent2 = dirname79(cursor);
674964
+ const parent2 = dirname80(cursor);
674423
674965
  if (parent2 === cursor)
674424
674966
  return path22;
674425
674967
  suffix.unshift(cursor.slice(parent2.length + (parent2.endsWith(sep47) ? 0 : 1)));
@@ -674449,8 +674991,8 @@ function workspaceRelativePath(root2, file2) {
674449
674991
  return relative53(realpathSync17(root2), resolveWorkspaceFile(root2, file2)).split(sep47).join("/");
674450
674992
  }
674451
674993
  function atomicWrite(path22, content, mode) {
674452
- mkdirSync62(dirname79(path22), { recursive: true });
674453
- const temp = resolve68(dirname79(path22), `.${randomUUID60()}.ur-repo-edit.tmp`);
674994
+ mkdirSync62(dirname80(path22), { recursive: true });
674995
+ const temp = resolve68(dirname80(path22), `.${randomUUID60()}.ur-repo-edit.tmp`);
674454
674996
  try {
674455
674997
  writeFileSync62(temp, content, { flag: "wx", ...mode !== undefined ? { mode } : {} });
674456
674998
  renameSync17(temp, path22);
@@ -674499,14 +675041,14 @@ function rollbackWorkspaceEdit(root2, snapshots) {
674499
675041
  continue;
674500
675042
  }
674501
675043
  rmSync19(abs, { force: true, recursive: true });
674502
- let parent2 = dirname79(abs);
675044
+ let parent2 = dirname80(abs);
674503
675045
  while (parent2 !== realRoot && isWithin(realRoot, parent2)) {
674504
675046
  try {
674505
675047
  rmdirSync2(parent2);
674506
675048
  } catch {
674507
675049
  break;
674508
675050
  }
674509
- parent2 = dirname79(parent2);
675051
+ parent2 = dirname80(parent2);
674510
675052
  }
674511
675053
  }
674512
675054
  }
@@ -674654,7 +675196,7 @@ var init_lspEditEngine = __esm(() => {
674654
675196
  });
674655
675197
 
674656
675198
  // src/services/repoEditing/ast/typescriptEngine.ts
674657
- import { dirname as dirname80, join as join209, relative as relative54 } from "path";
675199
+ import { dirname as dirname81, join as join209, relative as relative54 } from "path";
674658
675200
  import { existsSync as existsSync88, readFileSync as readFileSync81 } from "fs";
674659
675201
  function loadProgram(root2, files) {
674660
675202
  const configPath2 = import_typescript3.default.findConfigFile(root2, import_typescript3.default.sys.fileExists, "tsconfig.json");
@@ -674915,11 +675457,11 @@ function normalizePath4(value2) {
674915
675457
  function resolveRelativeImport(importingFileRel, specifier) {
674916
675458
  if (!specifier.startsWith("."))
674917
675459
  return;
674918
- const base2 = normalizePath4(join209(dirname80(importingFileRel), specifier));
675460
+ const base2 = normalizePath4(join209(dirname81(importingFileRel), specifier));
674919
675461
  return stripKnownExtension(base2);
674920
675462
  }
674921
675463
  function moduleSpecifierBetween(importingFileRel, targetFileRel) {
674922
- let specifier = normalizePath4(relative54(dirname80(importingFileRel), stripKnownExtension(targetFileRel)));
675464
+ let specifier = normalizePath4(relative54(dirname81(importingFileRel), stripKnownExtension(targetFileRel)));
674923
675465
  if (!specifier.startsWith("."))
674924
675466
  specifier = `./${specifier}`;
674925
675467
  return specifier;
@@ -690932,7 +691474,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
690932
691474
  smapsRollup,
690933
691475
  platform: process.platform,
690934
691476
  nodeVersion: process.version,
690935
- ccVersion: "1.65.11"
691477
+ ccVersion: "1.65.12"
690936
691478
  };
690937
691479
  }
690938
691480
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -691512,7 +692054,7 @@ var init_bridge_kick = __esm(() => {
691512
692054
  var call153 = async () => {
691513
692055
  return {
691514
692056
  type: "text",
691515
- value: "1.65.11"
692057
+ value: "1.65.12"
691516
692058
  };
691517
692059
  }, version2, version_default;
691518
692060
  var init_version = __esm(() => {
@@ -693699,7 +694241,7 @@ var init_advisor2 = __esm(() => {
693699
694241
  // src/skills/bundledSkills.ts
693700
694242
  import { constants as fsConstants6 } from "fs";
693701
694243
  import { mkdir as mkdir38, open as open15 } from "fs/promises";
693702
- import { dirname as dirname81, isAbsolute as isAbsolute52, join as join223, normalize as normalize16, sep as pathSep4 } from "path";
694244
+ import { dirname as dirname82, isAbsolute as isAbsolute52, join as join223, normalize as normalize16, sep as pathSep4 } from "path";
693703
694245
  function registerBundledSkill(definition) {
693704
694246
  const { files: files2 } = definition;
693705
694247
  let skillRoot;
@@ -693763,7 +694305,7 @@ async function writeSkillFiles(dir, files2) {
693763
694305
  const byParent = new Map;
693764
694306
  for (const [relPath, content] of Object.entries(files2)) {
693765
694307
  const target = resolveSkillFilePath(dir, relPath);
693766
- const parent2 = dirname81(target);
694308
+ const parent2 = dirname82(target);
693767
694309
  const entry = [target, content];
693768
694310
  const group = byParent.get(parent2);
693769
694311
  if (group)
@@ -694146,7 +694688,7 @@ var init_exit2 = __esm(() => {
694146
694688
  // src/utils/exportPath.ts
694147
694689
  import { existsSync as existsSync99, lstatSync as lstatSync23, realpathSync as realpathSync22 } from "fs";
694148
694690
  import {
694149
- dirname as dirname82,
694691
+ dirname as dirname83,
694150
694692
  extname as extname23,
694151
694693
  isAbsolute as isAbsolute53,
694152
694694
  relative as relative61,
@@ -694184,7 +694726,7 @@ function resolveExportPath(cwd2, input) {
694184
694726
  const root2 = realpathSync22(cwd2);
694185
694727
  const filename = normalizeExportFilename(trimmed);
694186
694728
  const target = resolve73(root2, filename);
694187
- const parent2 = realpathSync22(dirname82(target));
694729
+ const parent2 = realpathSync22(dirname83(target));
694188
694730
  if (escapes(root2, parent2)) {
694189
694731
  throw new Error("Export path resolves outside the workspace");
694190
694732
  }
@@ -702692,7 +703234,7 @@ function generateHtmlReport(data, insights) {
702692
703234
  </html>`;
702693
703235
  }
702694
703236
  function buildExportData(data, insights, facets, remoteStats) {
702695
- const version3 = typeof MACRO !== "undefined" ? "1.65.11" : "unknown";
703237
+ const version3 = typeof MACRO !== "undefined" ? "1.65.12" : "unknown";
702696
703238
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
702697
703239
  const facets_summary = {
702698
703240
  total: facets.size,
@@ -704154,7 +704696,7 @@ import {
704154
704696
  unlink as unlink23,
704155
704697
  writeFile as writeFile44
704156
704698
  } from "fs/promises";
704157
- import { basename as basename51, dirname as dirname84, join as join228 } from "path";
704699
+ import { basename as basename51, dirname as dirname85, join as join228 } from "path";
704158
704700
  function isTranscriptMessage(entry) {
704159
704701
  const t = entry.type;
704160
704702
  return t === "user" || t === "assistant" || t === "attachment" || t === "system";
@@ -704203,7 +704745,7 @@ function getAgentMetadataPath(agentId) {
704203
704745
  }
704204
704746
  async function writeAgentMetadata(agentId, metadata) {
704205
704747
  const path22 = getAgentMetadataPath(agentId);
704206
- await mkdir41(dirname84(path22), { recursive: true });
704748
+ await mkdir41(dirname85(path22), { recursive: true });
704207
704749
  await writeFile44(path22, JSON.stringify(metadata));
704208
704750
  }
704209
704751
  async function readAgentMetadata(agentId) {
@@ -704226,7 +704768,7 @@ function getRemoteAgentMetadataPath(taskId) {
704226
704768
  }
704227
704769
  async function writeRemoteAgentMetadata(taskId, metadata) {
704228
704770
  const path22 = getRemoteAgentMetadataPath(taskId);
704229
- await mkdir41(dirname84(path22), { recursive: true });
704771
+ await mkdir41(dirname85(path22), { recursive: true });
704230
704772
  await writeFile44(path22, JSON.stringify(metadata));
704231
704773
  }
704232
704774
  async function readRemoteAgentMetadata(taskId) {
@@ -704434,7 +704976,7 @@ class Project {
704434
704976
  try {
704435
704977
  await fsAppendFile(filePath, data, { mode: 384 });
704436
704978
  } catch {
704437
- await mkdir41(dirname84(filePath), { recursive: true, mode: 448 });
704979
+ await mkdir41(dirname85(filePath), { recursive: true, mode: 448 });
704438
704980
  await fsAppendFile(filePath, data, { mode: 384 });
704439
704981
  }
704440
704982
  }
@@ -705048,7 +705590,7 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
705048
705590
  }
705049
705591
  for (const [agentId, entries] of byAgent) {
705050
705592
  const agentFile = getAgentTranscriptPath(asAgentId(agentId));
705051
- await mkdir41(dirname84(agentFile), { recursive: true, mode: 448 });
705593
+ await mkdir41(dirname85(agentFile), { recursive: true, mode: 448 });
705052
705594
  const agentContent = entries.map((p2) => jsonStringify(p2) + `
705053
705595
  `).join("");
705054
705596
  await writeFile44(agentFile, agentContent, {
@@ -705585,7 +706127,7 @@ function appendEntryToFile(fullPath, entry) {
705585
706127
  try {
705586
706128
  fs12.appendFileSync(fullPath, line, { mode: 384 });
705587
706129
  } catch {
705588
- fs12.mkdirSync(dirname84(fullPath), { mode: 448 });
706130
+ fs12.mkdirSync(dirname85(fullPath), { mode: 448 });
705589
706131
  fs12.appendFileSync(fullPath, line, { mode: 384 });
705590
706132
  }
705591
706133
  }
@@ -707019,7 +707561,7 @@ var init_sessionStorage = __esm(() => {
707019
707561
  init_settings2();
707020
707562
  init_slowOperations();
707021
707563
  init_uuid();
707022
- VERSION7 = typeof MACRO !== "undefined" ? "1.65.11" : "unknown";
707564
+ VERSION7 = typeof MACRO !== "undefined" ? "1.65.12" : "unknown";
707023
707565
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
707024
707566
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
707025
707567
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -708234,7 +708776,7 @@ var init_filesystem = __esm(() => {
708234
708776
  });
708235
708777
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
708236
708778
  const nonce = randomBytes20(16).toString("hex");
708237
- return join230(getURTempDir(), "bundled-skills", "1.65.11", nonce);
708779
+ return join230(getURTempDir(), "bundled-skills", "1.65.12", nonce);
708238
708780
  });
708239
708781
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
708240
708782
  });
@@ -712802,7 +713344,7 @@ import {
712802
713344
  symlink as symlink5,
712803
713345
  utimes as utimes2
712804
713346
  } from "fs/promises";
712805
- import { basename as basename53, dirname as dirname85, join as join232 } from "path";
713347
+ import { basename as basename53, dirname as dirname86, join as join232 } from "path";
712806
713348
  function validateWorktreeSlug(slug5) {
712807
713349
  if (slug5.length > MAX_WORKTREE_SLUG_LENGTH) {
712808
713350
  throw new Error(`Invalid worktree name: must be ${MAX_WORKTREE_SLUG_LENGTH} characters or fewer (got ${slug5.length})`);
@@ -712998,7 +713540,7 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
712998
713540
  const srcPath = join232(repoRoot, relativePath3);
712999
713541
  const destPath = join232(worktreePath, relativePath3);
713000
713542
  try {
713001
- await mkdir43(dirname85(destPath), { recursive: true });
713543
+ await mkdir43(dirname86(destPath), { recursive: true });
713002
713544
  await copyFile10(srcPath, destPath);
713003
713545
  copied.push(relativePath3);
713004
713546
  } catch (e) {
@@ -713015,7 +713557,7 @@ async function performPostCreationSetup(repoRoot, worktreePath) {
713015
713557
  const sourceSettingsLocal = join232(repoRoot, localSettingsRelativePath);
713016
713558
  try {
713017
713559
  const destSettingsLocal = join232(worktreePath, localSettingsRelativePath);
713018
- await mkdirRecursive(dirname85(destSettingsLocal));
713560
+ await mkdirRecursive(dirname86(destSettingsLocal));
713019
713561
  await copyFile10(sourceSettingsLocal, destSettingsLocal);
713020
713562
  logForDebugging(`Copied settings.local.json to worktree: ${destSettingsLocal}`);
713021
713563
  } catch (e) {
@@ -714562,7 +715104,7 @@ function computeFingerprint(messageText2, version3) {
714562
715104
  }
714563
715105
  function computeFingerprintFromMessages(messages) {
714564
715106
  const firstMessageText = extractFirstMessageText(messages);
714565
- return computeFingerprint(firstMessageText, "1.65.11");
715107
+ return computeFingerprint(firstMessageText, "1.65.12");
714566
715108
  }
714567
715109
  var FINGERPRINT_SALT = "59cf53e54c78";
714568
715110
  var init_fingerprint = () => {};
@@ -714957,7 +715499,9 @@ function getNonstreamingFallbackTimeoutMs(model, env4 = process.env, provider =
714957
715499
  const override = parseInt(env4.API_TIMEOUT_MS || "", 10);
714958
715500
  if (override)
714959
715501
  return override;
714960
- return isEnvTruthy(env4.UR_CODE_REMOTE) || isOllamaCloudRuntime(model, provider) ? 120000 : 300000;
715502
+ if (isEnvTruthy(env4.UR_CODE_REMOTE))
715503
+ return 120000;
715504
+ return provider === "ollama" ? getOllamaModelDefaultTimeoutMs(model) : 300000;
714961
715505
  }
714962
715506
  function shouldSkipOllamaNonStreamingFallback(error40, model, provider = getAPIProvider()) {
714963
715507
  return isOllamaCloudRuntime(model, provider) && error40 instanceof APIConnectionTimeoutError && error40.message === "Ollama stream timed out";
@@ -716415,6 +716959,7 @@ var init_ur2 = __esm(() => {
716415
716959
  init_utils3();
716416
716960
  init_vcr();
716417
716961
  init_client2();
716962
+ init_ollama();
716418
716963
  init_errors6();
716419
716964
  init_logging();
716420
716965
  init_promptCacheBreakDetection();
@@ -716458,7 +717003,7 @@ async function sideQuery(opts) {
716458
717003
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
716459
717004
  }
716460
717005
  const messageText2 = extractFirstUserMessageText(messages);
716461
- const fingerprint2 = computeFingerprint(messageText2, "1.65.11");
717006
+ const fingerprint2 = computeFingerprint(messageText2, "1.65.12");
716462
717007
  const attributionHeader = getAttributionHeader(fingerprint2);
716463
717008
  const systemBlocks = [
716464
717009
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -721245,7 +721790,7 @@ function buildSystemInitMessage(inputs) {
721245
721790
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
721246
721791
  apiKeySource: getURHQApiKeyWithSource().source,
721247
721792
  betas: getSdkBetas(),
721248
- ur_version: "1.65.11",
721793
+ ur_version: "1.65.12",
721249
721794
  output_style: outputStyle2,
721250
721795
  agents: inputs.agents.map((agent2) => agent2.agentType),
721251
721796
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -735196,7 +735741,7 @@ var init_useVoiceEnabled = __esm(() => {
735196
735741
  function getSemverPart(version3) {
735197
735742
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
735198
735743
  }
735199
- function useUpdateNotification(updatedVersion, initialVersion = "1.65.11") {
735744
+ function useUpdateNotification(updatedVersion, initialVersion = "1.65.12") {
735200
735745
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react222.useState(() => getSemverPart(initialVersion));
735201
735746
  if (!updatedVersion) {
735202
735747
  return null;
@@ -735245,7 +735790,7 @@ function AutoUpdater({
735245
735790
  return;
735246
735791
  }
735247
735792
  if (false) {}
735248
- const currentVersion = "1.65.11";
735793
+ const currentVersion = "1.65.12";
735249
735794
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
735250
735795
  let latestVersion = await getLatestVersion(channel);
735251
735796
  const isDisabled = isAutoUpdaterDisabled();
@@ -735474,12 +736019,12 @@ function NativeAutoUpdater({
735474
736019
  logEvent("tengu_native_auto_updater_start", {});
735475
736020
  try {
735476
736021
  const maxVersion = await getMaxVersion();
735477
- if (maxVersion && gt("1.65.11", maxVersion)) {
736022
+ if (maxVersion && gt("1.65.12", maxVersion)) {
735478
736023
  const msg = await getMaxVersionMessage();
735479
736024
  setMaxVersionIssue(msg ?? "affects your version");
735480
736025
  }
735481
736026
  const result = await installLatest(channel);
735482
- const currentVersion = "1.65.11";
736027
+ const currentVersion = "1.65.12";
735483
736028
  const latencyMs = Date.now() - startTime;
735484
736029
  if (result.lockFailed) {
735485
736030
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -735616,17 +736161,17 @@ function PackageManagerAutoUpdater(t0) {
735616
736161
  const maxVersion = await getMaxVersion();
735617
736162
  if (maxVersion && latest && gt(latest, maxVersion)) {
735618
736163
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
735619
- if (gte("1.65.11", maxVersion)) {
735620
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.65.11"} is already at or above maxVersion ${maxVersion}, skipping update`);
736164
+ if (gte("1.65.12", maxVersion)) {
736165
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.65.12"} is already at or above maxVersion ${maxVersion}, skipping update`);
735621
736166
  setUpdateAvailable(false);
735622
736167
  return;
735623
736168
  }
735624
736169
  latest = maxVersion;
735625
736170
  }
735626
- const hasUpdate = latest && !gte("1.65.11", latest) && !shouldSkipVersion(latest);
736171
+ const hasUpdate = latest && !gte("1.65.12", latest) && !shouldSkipVersion(latest);
735627
736172
  setUpdateAvailable(!!hasUpdate);
735628
736173
  if (hasUpdate) {
735629
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.65.11"} -> ${latest}`);
736174
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.65.12"} -> ${latest}`);
735630
736175
  }
735631
736176
  };
735632
736177
  $2[0] = t1;
@@ -735660,7 +736205,7 @@ function PackageManagerAutoUpdater(t0) {
735660
736205
  wrap: "truncate",
735661
736206
  children: [
735662
736207
  "currentVersion: ",
735663
- "1.65.11"
736208
+ "1.65.12"
735664
736209
  ]
735665
736210
  }, undefined, true, undefined, this);
735666
736211
  $2[3] = verbose;
@@ -746380,7 +746925,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
746380
746925
  project_dir: getOriginalCwd(),
746381
746926
  added_dirs: addedDirs
746382
746927
  },
746383
- version: "1.65.11",
746928
+ version: "1.65.12",
746384
746929
  output_style: {
746385
746930
  name: outputStyleName
746386
746931
  },
@@ -746458,7 +747003,7 @@ function StatusLineInner({
746458
747003
  const taskValues = Object.values(tasks2);
746459
747004
  const taskRunningCount = countActiveBackgroundTasks(taskValues);
746460
747005
  const defaultStatusLineText = buildDefaultStatusBar({
746461
- version: "1.65.11",
747006
+ version: "1.65.12",
746462
747007
  providerLabel: providerRuntime.providerLabel,
746463
747008
  authMode: providerRuntime.authLabel,
746464
747009
  model: renderModelName(mainLoopModel) || providerRuntime.model || "",
@@ -756992,7 +757537,7 @@ __export(exports_asciicast, {
756992
757537
  _resetRecordingStateForTesting: () => _resetRecordingStateForTesting
756993
757538
  });
756994
757539
  import { appendFile as appendFile7, rename as rename11 } from "fs/promises";
756995
- import { basename as basename66, dirname as dirname86, join as join238 } from "path";
757540
+ import { basename as basename66, dirname as dirname87, join as join238 } from "path";
756996
757541
  function getRecordFilePath() {
756997
757542
  if (recordingState.filePath !== null) {
756998
757543
  return recordingState.filePath;
@@ -757074,7 +757619,7 @@ function installAsciicastRecorder() {
757074
757619
  }
757075
757620
  });
757076
757621
  try {
757077
- getFsImplementation().mkdirSync(dirname86(filePath));
757622
+ getFsImplementation().mkdirSync(dirname87(filePath));
757078
757623
  } catch {}
757079
757624
  getFsImplementation().appendFileSync(filePath, header + `
757080
757625
  `, { mode: 384 });
@@ -757143,7 +757688,7 @@ var init_asciicast = __esm(() => {
757143
757688
  });
757144
757689
 
757145
757690
  // src/utils/sessionRestore.ts
757146
- import { dirname as dirname87 } from "path";
757691
+ import { dirname as dirname88 } from "path";
757147
757692
  function extractTodosFromTranscript(messages) {
757148
757693
  for (let i3 = messages.length - 1;i3 >= 0; i3--) {
757149
757694
  const msg = messages[i3];
@@ -757268,7 +757813,7 @@ async function processResumedConversation(result, opts, context6) {
757268
757813
  if (!opts.forkSession) {
757269
757814
  const sid = opts.sessionIdOverride ?? result.sessionId;
757270
757815
  if (sid) {
757271
- switchSession(asSessionId(sid), opts.transcriptPath ? dirname87(opts.transcriptPath) : null);
757816
+ switchSession(asSessionId(sid), opts.transcriptPath ? dirname88(opts.transcriptPath) : null);
757272
757817
  await renameRecordingForSession();
757273
757818
  await resetSessionFilePointer();
757274
757819
  restoreCostStateForSession(sid);
@@ -758638,7 +759183,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
758638
759183
  } catch {}
758639
759184
  const data = {
758640
759185
  trigger: trigger2,
758641
- version: "1.65.11",
759186
+ version: "1.65.12",
758642
759187
  platform: process.platform,
758643
759188
  transcript,
758644
759189
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -766368,7 +766913,7 @@ var exports_REPL = {};
766368
766913
  __export(exports_REPL, {
766369
766914
  REPL: () => REPL
766370
766915
  });
766371
- import { dirname as dirname88, join as join241 } from "path";
766916
+ import { dirname as dirname89, join as join241 } from "path";
766372
766917
  import { tmpdir as tmpdir20 } from "os";
766373
766918
  import { writeFile as writeFile47 } from "fs/promises";
766374
766919
  import { randomUUID as randomUUID83 } from "crypto";
@@ -767308,7 +767853,7 @@ function REPL({
767308
767853
  const targetSessionCosts = getStoredSessionCosts(sessionId);
767309
767854
  saveCurrentSessionCosts();
767310
767855
  resetCostState();
767311
- switchSession(asSessionId(sessionId), log2.fullPath ? dirname88(log2.fullPath) : null);
767856
+ switchSession(asSessionId(sessionId), log2.fullPath ? dirname89(log2.fullPath) : null);
767312
767857
  const {
767313
767858
  renameRecordingForSession: renameRecordingForSession2
767314
767859
  } = await Promise.resolve().then(() => (init_asciicast(), exports_asciicast));
@@ -771003,7 +771548,7 @@ function WelcomeV2() {
771003
771548
  dimColor: true,
771004
771549
  children: [
771005
771550
  "v",
771006
- "1.65.11"
771551
+ "1.65.12"
771007
771552
  ]
771008
771553
  }, undefined, true, undefined, this)
771009
771554
  ]
@@ -772263,7 +772808,7 @@ function completeOnboarding() {
772263
772808
  saveGlobalConfig((current) => ({
772264
772809
  ...current,
772265
772810
  hasCompletedOnboarding: true,
772266
- lastOnboardingVersion: "1.65.11"
772811
+ lastOnboardingVersion: "1.65.12"
772267
772812
  }));
772268
772813
  }
772269
772814
  function showDialog(root2, renderer) {
@@ -773407,7 +773952,7 @@ var exports_ResumeConversation = {};
773407
773952
  __export(exports_ResumeConversation, {
773408
773953
  ResumeConversation: () => ResumeConversation
773409
773954
  });
773410
- import { dirname as dirname89 } from "path";
773955
+ import { dirname as dirname90 } from "path";
773411
773956
  function parsePrIdentifier(value2) {
773412
773957
  const directNumber = parseInt(value2, 10);
773413
773958
  if (!isNaN(directNumber) && directNumber > 0) {
@@ -773539,7 +774084,7 @@ function ResumeConversation({
773539
774084
  }
773540
774085
  if (false) {}
773541
774086
  if (result_3.sessionId && !forkSession) {
773542
- switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname89(log_0.fullPath) : null);
774087
+ switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname90(log_0.fullPath) : null);
773543
774088
  await renameRecordingForSession();
773544
774089
  await resetSessionFilePointer();
773545
774090
  restoreCostStateForSession(result_3.sessionId);
@@ -777258,7 +777803,7 @@ var init_createDirectConnectSession = __esm(() => {
777258
777803
  });
777259
777804
 
777260
777805
  // src/utils/errorLogSink.ts
777261
- import { dirname as dirname90, join as join242 } from "path";
777806
+ import { dirname as dirname91, join as join242 } from "path";
777262
777807
  function getErrorsPath() {
777263
777808
  return join242(CACHE_PATHS.errors(), DATE + ".jsonl");
777264
777809
  }
@@ -777279,7 +777824,7 @@ function createJsonlWriter(options4) {
777279
777824
  function getLogWriter(path24) {
777280
777825
  let writer = logWriters.get(path24);
777281
777826
  if (!writer) {
777282
- const dir = dirname90(path24);
777827
+ const dir = dirname91(path24);
777283
777828
  writer = createJsonlWriter({
777284
777829
  writeFn: (content) => {
777285
777830
  try {
@@ -777307,7 +777852,7 @@ function appendToLog(path24, message) {
777307
777852
  cwd: getFsImplementation().cwd(),
777308
777853
  userType: process.env.USER_TYPE,
777309
777854
  sessionId: getSessionId(),
777310
- version: "1.65.11"
777855
+ version: "1.65.12"
777311
777856
  };
777312
777857
  getLogWriter(path24).write(messageWithTimestamp);
777313
777858
  }
@@ -781471,8 +782016,8 @@ async function getEnvLessBridgeConfig() {
781471
782016
  }
781472
782017
  async function checkEnvLessBridgeMinVersion() {
781473
782018
  const cfg = await getEnvLessBridgeConfig();
781474
- if (cfg.min_version && lt("1.65.11", cfg.min_version)) {
781475
- return `Your version of UR (${"1.65.11"}) is too old for Remote Control.
782019
+ if (cfg.min_version && lt("1.65.12", cfg.min_version)) {
782020
+ return `Your version of UR (${"1.65.12"}) is too old for Remote Control.
781476
782021
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
781477
782022
  }
781478
782023
  return null;
@@ -781800,14 +782345,14 @@ __export(exports_bridgePointer, {
781800
782345
  BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
781801
782346
  });
781802
782347
  import { mkdir as mkdir47, readFile as readFile57, stat as stat51, unlink as unlink27, writeFile as writeFile50 } from "fs/promises";
781803
- import { dirname as dirname91, join as join247 } from "path";
782348
+ import { dirname as dirname92, join as join247 } from "path";
781804
782349
  function getBridgePointerPath(dir) {
781805
782350
  return join247(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
781806
782351
  }
781807
782352
  async function writeBridgePointer(dir, pointer) {
781808
782353
  const path24 = getBridgePointerPath(dir);
781809
782354
  try {
781810
- await mkdir47(dirname91(path24), { recursive: true });
782355
+ await mkdir47(dirname92(path24), { recursive: true });
781811
782356
  await writeFile50(path24, jsonStringify(pointer), "utf8");
781812
782357
  logForDebugging(`[bridge:pointer] wrote ${path24}`);
781813
782358
  } catch (err2) {
@@ -781946,7 +782491,7 @@ async function initBridgeCore(params) {
781946
782491
  const rawApi = createBridgeApiClient({
781947
782492
  baseUrl,
781948
782493
  getAccessToken,
781949
- runnerVersion: "1.65.11",
782494
+ runnerVersion: "1.65.12",
781950
782495
  onDebug: logForDebugging,
781951
782496
  onAuth401,
781952
782497
  getTrustedDeviceToken
@@ -783811,7 +784356,7 @@ __export(exports_print, {
783811
784356
  canBatchWith: () => canBatchWith
783812
784357
  });
783813
784358
  import { readFile as readFile58, stat as stat52, writeFile as writeFile51 } from "fs/promises";
783814
- import { dirname as dirname92 } from "path";
784359
+ import { dirname as dirname93 } from "path";
783815
784360
  import { cwd as cwd2 } from "process";
783816
784361
  import { randomUUID as randomUUID89 } from "crypto";
783817
784362
  function trackReceivedMessageUuid(uuid3) {
@@ -786268,7 +786813,7 @@ async function loadInitialMessages(setAppState, options4) {
786268
786813
  if (false) {}
786269
786814
  if (!options4.forkSession) {
786270
786815
  if (result.sessionId) {
786271
- switchSession(asSessionId(result.sessionId), result.fullPath ? dirname92(result.fullPath) : null);
786816
+ switchSession(asSessionId(result.sessionId), result.fullPath ? dirname93(result.fullPath) : null);
786272
786817
  if (persistSession) {
786273
786818
  await resetSessionFilePointer();
786274
786819
  }
@@ -786366,7 +786911,7 @@ async function loadInitialMessages(setAppState, options4) {
786366
786911
  }
786367
786912
  if (false) {}
786368
786913
  if (!options4.forkSession && result.sessionId) {
786369
- switchSession(asSessionId(result.sessionId), result.fullPath ? dirname92(result.fullPath) : null);
786914
+ switchSession(asSessionId(result.sessionId), result.fullPath ? dirname93(result.fullPath) : null);
786370
786915
  if (persistSession) {
786371
786916
  await resetSessionFilePointer();
786372
786917
  }
@@ -791419,7 +791964,7 @@ function getAgUiCapabilities() {
791419
791964
  name: "UR-Nexus",
791420
791965
  type: "ur-nexus",
791421
791966
  description: "Provider-flexible, local-first autonomous engineering workflow agent.",
791422
- version: "1.65.11",
791967
+ version: "1.65.12",
791423
791968
  provider: "UR",
791424
791969
  documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
791425
791970
  },
@@ -792559,7 +793104,7 @@ function createMCPServer(cwd4, debug2, verbose) {
792559
793104
  };
792560
793105
  const server2 = new Server({
792561
793106
  name: "ur-nexus",
792562
- version: "1.65.11"
793107
+ version: "1.65.12"
792563
793108
  }, {
792564
793109
  capabilities: {
792565
793110
  tools: {}
@@ -793717,7 +794262,7 @@ function thrownResponse(error40) {
793717
794262
  }
793718
794263
  async function createUrMcp2026Runtime(options4) {
793719
794264
  const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
793720
- const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.65.11" }, { capabilities: {} });
794265
+ const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.65.12" }, { capabilities: {} });
793721
794266
  const [clientTransport, serverTransport] = createLinkedTransportPair();
793722
794267
  try {
793723
794268
  await server2.connect(serverTransport);
@@ -793728,7 +794273,7 @@ async function createUrMcp2026Runtime(options4) {
793728
794273
  }
793729
794274
  const runtime2 = new Mcp2026Runtime({
793730
794275
  cwd: options4.cwd,
793731
- version: "1.65.11",
794276
+ version: "1.65.12",
793732
794277
  backend: {
793733
794278
  listTools: async () => {
793734
794279
  const listed = await client2.listTools();
@@ -794691,7 +795236,7 @@ __export(exports_plugins, {
794691
795236
  VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
794692
795237
  VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
794693
795238
  });
794694
- import { basename as basename69, dirname as dirname94, join as join251, resolve as resolve76 } from "path";
795239
+ import { basename as basename69, dirname as dirname95, join as join251, resolve as resolve76 } from "path";
794695
795240
  function handleMarketplaceError(error40, action3) {
794696
795241
  logError2(error40);
794697
795242
  cliError(`${figures_default.cross} Failed to ${action3}: ${errorMessage2(error40)}`);
@@ -794744,9 +795289,9 @@ async function pluginValidateHandler(manifestPath6, options4) {
794744
795289
  printValidationResult(result);
794745
795290
  let contentResults = [];
794746
795291
  if (result.fileType === "plugin") {
794747
- const manifestDir = dirname94(result.filePath);
795292
+ const manifestDir = dirname95(result.filePath);
794748
795293
  if (basename69(manifestDir) === ".ur-plugin") {
794749
- contentResults = await validatePluginContents(dirname94(manifestDir));
795294
+ contentResults = await validatePluginContents(dirname95(manifestDir));
794750
795295
  for (const r of contentResults) {
794751
795296
  console.log(`Validating ${r.fileType}: ${r.filePath}
794752
795297
  `);
@@ -795861,7 +796406,7 @@ async function update() {
795861
796406
  logEvent("tengu_update_check", {});
795862
796407
  const diagnostic2 = await getDoctorDiagnostic();
795863
796408
  const result = await checkUpgradeStatus({
795864
- currentVersion: "1.65.11",
796409
+ currentVersion: "1.65.12",
795865
796410
  packageName: UR_AGENT_PACKAGE_NAME,
795866
796411
  installationType: diagnostic2.installationType,
795867
796412
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -797177,7 +797722,7 @@ ${customInstructions}` : customInstructions;
797177
797722
  }
797178
797723
  }
797179
797724
  logForDiagnosticsNoPII("info", "started", {
797180
- version: "1.65.11",
797725
+ version: "1.65.12",
797181
797726
  is_native_binary: isInBundledMode()
797182
797727
  });
797183
797728
  registerCleanup(async () => {
@@ -797963,7 +798508,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
797963
798508
  pendingHookMessages
797964
798509
  }, renderAndRun);
797965
798510
  }
797966
- }).version("1.65.11 (UR-Nexus)", "-v, --version", "Output the version number");
798511
+ }).version("1.65.12 (UR-Nexus)", "-v, --version", "Output the version number");
797967
798512
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
797968
798513
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
797969
798514
  if (canUserConfigureAdvisor()) {
@@ -799022,7 +799567,7 @@ if (false) {}
799022
799567
  async function main2() {
799023
799568
  const args = process.argv.slice(2);
799024
799569
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
799025
- console.log(`${"1.65.11"} (UR-Nexus)`);
799570
+ console.log(`${"1.65.12"} (UR-Nexus)`);
799026
799571
  return;
799027
799572
  }
799028
799573
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {