ur-agent 1.80.3 → 1.80.4

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
@@ -107784,7 +107784,7 @@ var init_auth = __esm(() => {
107784
107784
 
107785
107785
  // src/utils/userAgent.ts
107786
107786
  function getURCodeUserAgent() {
107787
- return `ur/${"1.80.3"}`;
107787
+ return `ur/${"1.80.4"}`;
107788
107788
  }
107789
107789
 
107790
107790
  // src/utils/workloadContext.ts
@@ -107806,7 +107806,7 @@ function getUserAgent() {
107806
107806
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
107807
107807
  const workload = getWorkload();
107808
107808
  const workloadSuffix = workload ? `, workload/${workload}` : "";
107809
- return `ur-cli/${"1.80.3"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107809
+ return `ur-cli/${"1.80.4"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107810
107810
  }
107811
107811
  function getMCPUserAgent() {
107812
107812
  const parts = [];
@@ -107820,7 +107820,7 @@ function getMCPUserAgent() {
107820
107820
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
107821
107821
  }
107822
107822
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
107823
- return `ur/${"1.80.3"}${suffix}`;
107823
+ return `ur/${"1.80.4"}${suffix}`;
107824
107824
  }
107825
107825
  function getWebFetchUserAgent() {
107826
107826
  return `UR-User (${getURCodeUserAgent()})`;
@@ -107958,7 +107958,7 @@ var init_user = __esm(() => {
107958
107958
  deviceId,
107959
107959
  sessionId: getSessionId(),
107960
107960
  email: getEmail(),
107961
- appVersion: "1.80.3",
107961
+ appVersion: "1.80.4",
107962
107962
  platform: getHostPlatformForAnalytics(),
107963
107963
  organizationUuid,
107964
107964
  accountUuid,
@@ -115845,7 +115845,7 @@ var init_metadata = __esm(() => {
115845
115845
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
115846
115846
  WHITESPACE_REGEX = /\s+/;
115847
115847
  getVersionBase = memoize_default(() => {
115848
- const match = "1.80.3".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115848
+ const match = "1.80.4".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115849
115849
  return match ? match[0] : undefined;
115850
115850
  });
115851
115851
  buildEnvContext = memoize_default(async () => {
@@ -115885,7 +115885,7 @@ var init_metadata = __esm(() => {
115885
115885
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
115886
115886
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
115887
115887
  isURAiAuth: isURAISubscriber(),
115888
- version: "1.80.3",
115888
+ version: "1.80.4",
115889
115889
  versionBase: getVersionBase(),
115890
115890
  buildTime: "",
115891
115891
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -116555,7 +116555,7 @@ function initialize1PEventLogging() {
116555
116555
  const platform2 = getPlatform();
116556
116556
  const attributes = {
116557
116557
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
116558
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.80.3"
116558
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.80.4"
116559
116559
  };
116560
116560
  if (platform2 === "wsl") {
116561
116561
  const wslVersion = getWslVersion();
@@ -116583,7 +116583,7 @@ function initialize1PEventLogging() {
116583
116583
  })
116584
116584
  ]
116585
116585
  });
116586
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.80.3");
116586
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.80.4");
116587
116587
  }
116588
116588
  async function reinitialize1PEventLoggingIfConfigChanged() {
116589
116589
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -126304,6 +126304,7 @@ var init_a2aCardSignature = () => {};
126304
126304
  var exports_trends = {};
126305
126305
  __export(exports_trends, {
126306
126306
  formatAgentTrendReport: () => formatAgentTrendReport,
126307
+ formatA2AV1AgentCard: () => formatA2AV1AgentCard,
126307
126308
  formatA2AAgentCard: () => formatA2AAgentCard,
126308
126309
  buildAgentTrendReport: () => buildAgentTrendReport,
126309
126310
  buildA2AV1AgentCard: () => buildA2AV1AgentCard,
@@ -126542,7 +126543,10 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
126542
126543
  function formatA2AAgentCard(options = {}, pretty = true) {
126543
126544
  return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
126544
126545
  }
126545
- var urVersion = "1.80.3", researchSnapshotDate = "2026-08-10", coverage, priorityRoadmap;
126546
+ function formatA2AV1AgentCard(options = {}, pretty = true) {
126547
+ return JSON.stringify(buildA2AV1AgentCard(options), null, pretty ? 2 : 0);
126548
+ }
126549
+ var urVersion = "1.80.4", researchSnapshotDate = "2026-08-10", coverage, priorityRoadmap;
126546
126550
  var init_trends = __esm(() => {
126547
126551
  init_a2aCardSignature();
126548
126552
  coverage = [
@@ -129432,7 +129436,7 @@ function getAttributionHeader(fingerprint) {
129432
129436
  if (!isAttributionHeaderEnabled()) {
129433
129437
  return "";
129434
129438
  }
129435
- const version2 = `${"1.80.3"}.${fingerprint}`;
129439
+ const version2 = `${"1.80.4"}.${fingerprint}`;
129436
129440
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
129437
129441
  const cch = "";
129438
129442
  const workload = getWorkload();
@@ -168090,6 +168094,7 @@ Usage notes:
168090
168094
  - When using fetched content in your final answer, mention the fetched URL or domain as the source
168091
168095
  - Results may be summarized if the content is very large
168092
168096
  - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
168097
+ - A permanent HTTP 4xx response means the URL cannot be fetched as written. Do not retry that URL with the same or a different prompt; use WebSearch, fetch a parent/index page, or choose another source.
168093
168098
  - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
168094
168099
  - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
168095
168100
  `;
@@ -184625,7 +184630,7 @@ var init_projectSafety = __esm(() => {
184625
184630
  function getInstruments() {
184626
184631
  if (instruments)
184627
184632
  return instruments;
184628
- const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.3");
184633
+ const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.4");
184629
184634
  instruments = {
184630
184635
  operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
184631
184636
  description: "GenAI operation duration.",
@@ -184723,7 +184728,7 @@ function genAiAgentAttributes() {
184723
184728
  "gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
184724
184729
  "gen_ai.provider.name": "ur",
184725
184730
  "gen_ai.agent.name": "UR-Nexus",
184726
- "gen_ai.agent.version": "1.80.3"
184731
+ "gen_ai.agent.version": "1.80.4"
184727
184732
  };
184728
184733
  }
184729
184734
  function genAiWorkflowAttributes(workflowName, workflowRunId) {
@@ -184744,7 +184749,7 @@ function genAiWorkflowAttributes(workflowName, workflowRunId) {
184744
184749
  function startGenAiWorkflowSpan(workflowName, workflowRunId) {
184745
184750
  const attributes = genAiWorkflowAttributes(workflowName, workflowRunId);
184746
184751
  const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
184747
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.3").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
184752
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.4").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
184748
184753
  }
184749
184754
  function endGenAiWorkflowSpan(span, options2 = {}) {
184750
184755
  try {
@@ -184782,7 +184787,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
184782
184787
  if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
184783
184788
  attributes["gen_ai.memory.record.count"] = options2.recordCount;
184784
184789
  }
184785
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.3").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
184790
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.4").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
184786
184791
  }
184787
184792
  function endGenAiMemorySpan(span, options2 = {}) {
184788
184793
  try {
@@ -278497,7 +278502,7 @@ function getTelemetryAttributes() {
278497
278502
  attributes["session.id"] = sessionId;
278498
278503
  }
278499
278504
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
278500
- attributes["app.version"] = "1.80.3";
278505
+ attributes["app.version"] = "1.80.4";
278501
278506
  }
278502
278507
  const oauthAccount = getOauthAccountInfo();
278503
278508
  if (oauthAccount) {
@@ -319488,7 +319493,7 @@ function getInstallationEnv() {
319488
319493
  return;
319489
319494
  }
319490
319495
  function getURCodeVersion() {
319491
- return "1.80.3";
319496
+ return "1.80.4";
319492
319497
  }
319493
319498
  async function getInstalledVSCodeExtensionVersion(command) {
319494
319499
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -326858,7 +326863,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
326858
326863
  const client2 = new Client({
326859
326864
  name: "ur",
326860
326865
  title: "UR",
326861
- version: "1.80.3",
326866
+ version: "1.80.4",
326862
326867
  description: "UR-Nexus autonomous engineering workflow engine",
326863
326868
  websiteUrl: PRODUCT_URL
326864
326869
  }, {
@@ -327219,7 +327224,7 @@ var init_client5 = __esm(() => {
327219
327224
  const client2 = new Client({
327220
327225
  name: "ur",
327221
327226
  title: "UR",
327222
- version: "1.80.3",
327227
+ version: "1.80.4",
327223
327228
  description: "UR-Nexus autonomous engineering workflow engine",
327224
327229
  websiteUrl: PRODUCT_URL
327225
327230
  }, {
@@ -339957,7 +339962,7 @@ async function createRuntime() {
339957
339962
  bootstrapTelemetry();
339958
339963
  const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
339959
339964
  [import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
339960
- [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.3"
339965
+ [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.4"
339961
339966
  }));
339962
339967
  const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
339963
339968
  resource,
@@ -339990,11 +339995,11 @@ async function createRuntime() {
339990
339995
  setMeterProvider(meterProvider);
339991
339996
  setLoggerProvider(loggerProvider);
339992
339997
  if (meterProvider) {
339993
- const meter = meterProvider.getMeter("ur-agent", "1.80.3");
339998
+ const meter = meterProvider.getMeter("ur-agent", "1.80.4");
339994
339999
  setMeter(meter, (name, options2) => meter.createCounter(name, options2));
339995
340000
  }
339996
340001
  if (loggerProvider) {
339997
- setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.3"));
340002
+ setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.4"));
339998
340003
  }
339999
340004
  if (!cleanupRegistered3) {
340000
340005
  cleanupRegistered3 = true;
@@ -340656,9 +340661,9 @@ async function assertMinVersion() {
340656
340661
  if (false) {}
340657
340662
  try {
340658
340663
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
340659
- if (versionConfig.minVersion && lt("1.80.3", versionConfig.minVersion)) {
340664
+ if (versionConfig.minVersion && lt("1.80.4", versionConfig.minVersion)) {
340660
340665
  console.error(`
340661
- It looks like your version of UR (${"1.80.3"}) needs an update.
340666
+ It looks like your version of UR (${"1.80.4"}) needs an update.
340662
340667
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
340663
340668
 
340664
340669
  To update, please run:
@@ -340874,7 +340879,7 @@ async function installGlobalPackage(specificVersion) {
340874
340879
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
340875
340880
  logEvent("tengu_auto_updater_lock_contention", {
340876
340881
  pid: process.pid,
340877
- currentVersion: "1.80.3"
340882
+ currentVersion: "1.80.4"
340878
340883
  });
340879
340884
  return "in_progress";
340880
340885
  }
@@ -340883,7 +340888,7 @@ async function installGlobalPackage(specificVersion) {
340883
340888
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
340884
340889
  logError2(new Error("Windows NPM detected in WSL environment"));
340885
340890
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
340886
- currentVersion: "1.80.3"
340891
+ currentVersion: "1.80.4"
340887
340892
  });
340888
340893
  console.error(`
340889
340894
  Error: Windows NPM detected in WSL
@@ -341418,7 +341423,7 @@ function detectLinuxGlobPatternWarnings() {
341418
341423
  }
341419
341424
  async function getDoctorDiagnostic() {
341420
341425
  const installationType = await getCurrentInstallationType();
341421
- const version2 = typeof MACRO !== "undefined" ? "1.80.3" : "unknown";
341426
+ const version2 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
341422
341427
  const installationPath = await getInstallationPath();
341423
341428
  const invokedBinary = getInvokedBinary();
341424
341429
  const multipleInstallations = await detectMultipleInstallations();
@@ -342353,8 +342358,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
342353
342358
  const maxVersion = await getMaxVersion();
342354
342359
  if (maxVersion && gt(version2, maxVersion)) {
342355
342360
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
342356
- if (gte("1.80.3", maxVersion)) {
342357
- logForDebugging(`Native installer: current version ${"1.80.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
342361
+ if (gte("1.80.4", maxVersion)) {
342362
+ logForDebugging(`Native installer: current version ${"1.80.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
342358
342363
  logEvent("tengu_native_update_skipped_max_version", {
342359
342364
  latency_ms: Date.now() - startTime,
342360
342365
  max_version: maxVersion,
@@ -342365,7 +342370,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
342365
342370
  version2 = maxVersion;
342366
342371
  }
342367
342372
  }
342368
- if (!forceReinstall && version2 === "1.80.3" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
342373
+ if (!forceReinstall && version2 === "1.80.4" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
342369
342374
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
342370
342375
  logEvent("tengu_native_update_complete", {
342371
342376
  latency_ms: Date.now() - startTime,
@@ -391965,100 +391970,281 @@ var init_preapproved = __esm(() => {
391965
391970
  })());
391966
391971
  });
391967
391972
 
391968
- // src/tools/WebFetchTool/UI.tsx
391969
- function renderToolUseMessage15({
391970
- url: url3,
391971
- prompt
391972
- }, {
391973
- verbose
391974
- }) {
391975
- if (!url3) {
391976
- return null;
391973
+ // src/utils/messagePredicates.ts
391974
+ function isHumanTurn(m) {
391975
+ return m.type === "user" && !m.isMeta && m.toolUseResult === undefined;
391976
+ }
391977
+
391978
+ // src/services/tools/repeatedFailureGuard.ts
391979
+ import { createHash as createHash30 } from "crypto";
391980
+ function writeFramedText(hash3, value) {
391981
+ hash3.update(`${value.length}:`);
391982
+ for (let offset = 0;offset < value.length; ) {
391983
+ const end = Math.min(offset + HASH_CHUNK_CODE_UNITS, value.length);
391984
+ hash3.update(value.slice(offset, end), "utf16le");
391985
+ offset = end;
391977
391986
  }
391978
- if (verbose) {
391979
- return `url: "${url3}"${verbose && prompt ? `, prompt: "${prompt}"` : ""}`;
391987
+ }
391988
+ function writeToken(hash3, kind, value = "") {
391989
+ writeFramedText(hash3, kind);
391990
+ writeFramedText(hash3, value);
391991
+ }
391992
+ function visitCanonical(value, state, depth) {
391993
+ state.nodesVisited++;
391994
+ if (state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes || depth > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalDepth) {
391995
+ throw new CanonicalTraversalLimitError;
391996
+ }
391997
+ if (value === null) {
391998
+ writeToken(state.hash, "null");
391999
+ return;
392000
+ }
392001
+ switch (typeof value) {
392002
+ case "string":
392003
+ state.textCodeUnitsVisited += value.length;
392004
+ if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
392005
+ throw new CanonicalTraversalLimitError;
392006
+ }
392007
+ writeToken(state.hash, "string", value);
392008
+ return;
392009
+ case "number":
392010
+ writeToken(state.hash, "number", Object.is(value, -0) ? "-0" : String(value));
392011
+ return;
392012
+ case "boolean":
392013
+ writeToken(state.hash, "boolean", String(value));
392014
+ return;
392015
+ case "undefined":
392016
+ writeToken(state.hash, "undefined");
392017
+ return;
392018
+ case "bigint":
392019
+ writeToken(state.hash, "bigint", value.toString());
392020
+ return;
392021
+ case "symbol": {
392022
+ const description = String(value.description ?? "");
392023
+ state.textCodeUnitsVisited += description.length;
392024
+ if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
392025
+ throw new CanonicalTraversalLimitError;
392026
+ }
392027
+ writeToken(state.hash, "symbol", description);
392028
+ return;
392029
+ }
392030
+ case "function": {
392031
+ const name = value.name || "<anonymous>";
392032
+ state.textCodeUnitsVisited += name.length;
392033
+ if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
392034
+ throw new CanonicalTraversalLimitError;
392035
+ }
392036
+ writeToken(state.hash, "function", name);
392037
+ return;
392038
+ }
392039
+ case "object": {
392040
+ const object4 = value;
392041
+ const existingReference = state.seen.get(object4);
392042
+ if (existingReference !== undefined) {
392043
+ writeToken(state.hash, "reference", String(existingReference));
392044
+ return;
392045
+ }
392046
+ const reference = state.nextReference++;
392047
+ state.seen.set(object4, reference);
392048
+ if (Array.isArray(value)) {
392049
+ if (value.length + state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes) {
392050
+ throw new CanonicalTraversalLimitError;
392051
+ }
392052
+ writeToken(state.hash, "array", String(value.length));
392053
+ for (let index2 = 0;index2 < value.length; index2++) {
392054
+ if (!(index2 in value)) {
392055
+ writeToken(state.hash, "hole");
392056
+ continue;
392057
+ }
392058
+ visitCanonical(value[index2], state, depth + 1);
392059
+ }
392060
+ return;
392061
+ }
392062
+ const record3 = value;
392063
+ const keys2 = Object.keys(record3);
392064
+ if (keys2.length + state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes) {
392065
+ throw new CanonicalTraversalLimitError;
392066
+ }
392067
+ keys2.sort();
392068
+ writeToken(state.hash, "object", String(keys2.length));
392069
+ for (const key of keys2) {
392070
+ state.textCodeUnitsVisited += key.length;
392071
+ if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
392072
+ throw new CanonicalTraversalLimitError;
392073
+ }
392074
+ writeToken(state.hash, "key", key);
392075
+ visitCanonical(record3[key], state, depth + 1);
392076
+ }
392077
+ return;
392078
+ }
391980
392079
  }
391981
- return url3;
391982
392080
  }
391983
- function renderToolUseProgressMessage8() {
391984
- return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
391985
- height: 1,
391986
- children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
391987
- dimColor: true,
391988
- children: "Fetching\u2026"
391989
- }, undefined, false, undefined, this)
391990
- }, undefined, false, undefined, this);
392081
+ function digestText(domain2, value) {
392082
+ const hash3 = createHash30("sha256");
392083
+ writeToken(hash3, "domain", domain2);
392084
+ writeToken(hash3, "value", value);
392085
+ return hash3.digest("hex");
391991
392086
  }
391992
- function renderToolResultMessage14({
391993
- bytes,
391994
- code,
391995
- codeText,
391996
- result
391997
- }, _progressMessagesForMessage, {
391998
- verbose
391999
- }) {
392000
- const formattedSize = formatFileSize(bytes);
392001
- if (verbose) {
392002
- return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedBox_default, {
392003
- flexDirection: "column",
392004
- children: [
392005
- /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
392006
- height: 1,
392007
- children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392008
- children: [
392009
- "Received ",
392010
- /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392011
- bold: true,
392012
- children: formattedSize
392013
- }, undefined, false, undefined, this),
392014
- " (",
392015
- code,
392016
- " ",
392017
- codeText,
392018
- ")"
392019
- ]
392020
- }, undefined, true, undefined, this)
392021
- }, undefined, false, undefined, this),
392022
- /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedBox_default, {
392023
- flexDirection: "column",
392024
- children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392025
- children: result
392026
- }, undefined, false, undefined, this)
392027
- }, undefined, false, undefined, this)
392028
- ]
392029
- }, undefined, true, undefined, this);
392087
+ function canonicalInputDigest(input) {
392088
+ const hash3 = createHash30("sha256");
392089
+ writeToken(hash3, "domain", "repeated-failure-input-v2");
392090
+ visitCanonical(input, {
392091
+ hash: hash3,
392092
+ nextReference: 0,
392093
+ nodesVisited: 0,
392094
+ textCodeUnitsVisited: 0,
392095
+ seen: new WeakMap
392096
+ }, 0);
392097
+ return hash3.digest("hex");
392098
+ }
392099
+ function uniqueSerializationFailureDigest() {
392100
+ serializationFailureNonce++;
392101
+ return digestText("repeated-failure-unserializable-v2", serializationFailureNonce.toString());
392102
+ }
392103
+ function scopeDigest(scope) {
392104
+ return scope ? digestText("repeated-failure-scope-v2", scope) : UNSCOPED_DIGEST;
392105
+ }
392106
+ function callSignature(toolName, input, scope) {
392107
+ let inputDigest;
392108
+ try {
392109
+ inputDigest = canonicalInputDigest(input);
392110
+ } catch {
392111
+ inputDigest = uniqueSerializationFailureDigest();
392030
392112
  }
392031
- return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
392032
- height: 1,
392033
- children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392034
- children: [
392035
- "Received ",
392036
- /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392037
- bold: true,
392038
- children: formattedSize
392039
- }, undefined, false, undefined, this),
392040
- " (",
392041
- code,
392042
- " ",
392043
- codeText,
392044
- ")"
392045
- ]
392046
- }, undefined, true, undefined, this)
392047
- }, undefined, false, undefined, this);
392113
+ return [
392114
+ SIGNATURE_VERSION,
392115
+ scopeDigest(scope),
392116
+ digestText("repeated-failure-tool-v2", toolName),
392117
+ inputDigest
392118
+ ].join(":");
392048
392119
  }
392049
- function getToolUseSummary6(input) {
392050
- if (!input?.url) {
392051
- return null;
392120
+ function isSha256Digest(value) {
392121
+ return value?.length === SHA256_HEX_LENGTH && /^[0-9a-f]+$/.test(value);
392122
+ }
392123
+ function signatureStorageIdentity(signature) {
392124
+ if (signature.length === UNSCOPED_SIGNATURE_LENGTH || signature.length === SCOPED_SIGNATURE_LENGTH) {
392125
+ const parts = signature.split(":");
392126
+ if (parts.length === 4 && parts[0] === SIGNATURE_VERSION && (parts[1] === UNSCOPED_DIGEST || isSha256Digest(parts[1])) && isSha256Digest(parts[2]) && isSha256Digest(parts[3])) {
392127
+ return { key: signature, scope: parts[1] };
392128
+ }
392052
392129
  }
392053
- return truncate3(input.url, TOOL_SUMMARY_MAX_LENGTH);
392130
+ return {
392131
+ key: `${SIGNATURE_VERSION}:legacy:${digestText("repeated-failure-legacy-signature-v2", signature)}`,
392132
+ scope: UNSCOPED_DIGEST
392133
+ };
392054
392134
  }
392055
- var jsx_dev_runtime140;
392056
- var init_UI14 = __esm(() => {
392057
- init_MessageResponse();
392058
- init_toolLimits();
392059
- init_ink2();
392060
- init_format2();
392061
- jsx_dev_runtime140 = __toESM(require_jsx_dev_runtime(), 1);
392135
+ function pruneExpiredFailures(now5) {
392136
+ for (const [signature, record3] of failureCounts) {
392137
+ if (now5 >= record3.lastFailureAt && now5 - record3.lastFailureAt >= REPEATED_FAILURE_GUARD_LIMITS.entryTtlMs) {
392138
+ failureCounts.delete(signature);
392139
+ }
392140
+ }
392141
+ }
392142
+ function enforceFailureBounds(scope) {
392143
+ let entriesInScope = 0;
392144
+ for (const record3 of failureCounts.values()) {
392145
+ if (record3.scopeDigest === scope)
392146
+ entriesInScope++;
392147
+ }
392148
+ let scopeOverflow = entriesInScope - REPEATED_FAILURE_GUARD_LIMITS.maxEntriesPerScope;
392149
+ if (scopeOverflow > 0) {
392150
+ for (const [signature, record3] of failureCounts) {
392151
+ if (record3.scopeDigest !== scope)
392152
+ continue;
392153
+ failureCounts.delete(signature);
392154
+ scopeOverflow--;
392155
+ if (scopeOverflow === 0)
392156
+ break;
392157
+ }
392158
+ }
392159
+ while (failureCounts.size > REPEATED_FAILURE_GUARD_LIMITS.maxEntries) {
392160
+ const oldest = failureCounts.keys().next().value;
392161
+ if (oldest === undefined)
392162
+ break;
392163
+ failureCounts.delete(oldest);
392164
+ }
392165
+ }
392166
+ function recordCallFailure(signature) {
392167
+ const now5 = repeatedFailureNow();
392168
+ pruneExpiredFailures(now5);
392169
+ const identity5 = signatureStorageIdentity(signature);
392170
+ const existing2 = failureCounts.get(identity5.key);
392171
+ const next = (existing2?.failures ?? 0) + 1;
392172
+ const signatureScope = existing2?.scopeDigest ?? identity5.scope;
392173
+ failureCounts.delete(identity5.key);
392174
+ failureCounts.set(identity5.key, {
392175
+ failures: next,
392176
+ lastFailureAt: now5,
392177
+ scopeDigest: signatureScope
392178
+ });
392179
+ enforceFailureBounds(signatureScope);
392180
+ return next;
392181
+ }
392182
+ function recordCallSuccess(signature) {
392183
+ failureCounts.delete(signatureStorageIdentity(signature).key);
392184
+ }
392185
+ function clearRepeatedFailuresForScope(scope) {
392186
+ const target = scopeDigest(scope);
392187
+ let cleared = 0;
392188
+ for (const [signature, record3] of failureCounts) {
392189
+ if (record3.scopeDigest !== target)
392190
+ continue;
392191
+ failureCounts.delete(signature);
392192
+ cleared++;
392193
+ }
392194
+ return cleared;
392195
+ }
392196
+ function clearRepeatedFailuresForQuery(queryChainId) {
392197
+ return clearRepeatedFailuresForScope(`query:${queryChainId}`);
392198
+ }
392199
+ function checkRepeatedFailure(signature, config3 = REPEATED_FAILURE_DEFAULTS) {
392200
+ if (!config3.enabled)
392201
+ return { action: "allow" };
392202
+ const now5 = repeatedFailureNow();
392203
+ pruneExpiredFailures(now5);
392204
+ const failures = failureCounts.get(signatureStorageIdentity(signature).key)?.failures ?? 0;
392205
+ if (failures >= config3.abortAfter) {
392206
+ return {
392207
+ action: "abort",
392208
+ reason: `This exact call has failed ${failures} times and is still being ` + `repeated. Stopping the turn rather than continuing to loop.`
392209
+ };
392210
+ }
392211
+ if (failures >= config3.limit) {
392212
+ return {
392213
+ action: "refuse",
392214
+ reason: `This exact call has already failed ${failures} times with the same ` + `arguments, so it will fail again. Do not retry it unchanged. Either ` + `fix the arguments, use a different tool, or tell the user what is ` + `blocking you and stop.`
392215
+ };
392216
+ }
392217
+ return { action: "allow" };
392218
+ }
392219
+ var REPEATED_FAILURE_DEFAULTS, REPEATED_FAILURE_GUARD_LIMITS, SIGNATURE_VERSION = "rf2", UNSCOPED_DIGEST = "-", SHA256_HEX_LENGTH = 64, HASH_CHUNK_CODE_UNITS, UNSCOPED_SIGNATURE_LENGTH, SCOPED_SIGNATURE_LENGTH, failureCounts, serializationFailureNonce = 0n, repeatedFailureNow, CanonicalTraversalLimitError, RepeatedToolFailureAbort;
392220
+ var init_repeatedFailureGuard = __esm(() => {
392221
+ REPEATED_FAILURE_DEFAULTS = {
392222
+ enabled: false,
392223
+ limit: 3,
392224
+ abortAfter: 6
392225
+ };
392226
+ REPEATED_FAILURE_GUARD_LIMITS = {
392227
+ maxEntries: 2048,
392228
+ maxEntriesPerScope: 256,
392229
+ entryTtlMs: 30 * 60 * 1000,
392230
+ maxCanonicalNodes: 50000,
392231
+ maxCanonicalDepth: 128,
392232
+ maxCanonicalTextCodeUnits: 1e6
392233
+ };
392234
+ HASH_CHUNK_CODE_UNITS = 16 * 1024;
392235
+ UNSCOPED_SIGNATURE_LENGTH = SIGNATURE_VERSION.length + 3 + 1 + SHA256_HEX_LENGTH * 2;
392236
+ SCOPED_SIGNATURE_LENGTH = SIGNATURE_VERSION.length + 3 + SHA256_HEX_LENGTH * 3;
392237
+ failureCounts = new Map;
392238
+ repeatedFailureNow = Date.now;
392239
+ CanonicalTraversalLimitError = class CanonicalTraversalLimitError extends Error {
392240
+ };
392241
+ RepeatedToolFailureAbort = class RepeatedToolFailureAbort extends Error {
392242
+ constructor(message) {
392243
+ super(message);
392244
+ this.name = "RepeatedToolFailureAbort";
392245
+ Object.setPrototypeOf(this, new.target.prototype);
392246
+ }
392247
+ };
392062
392248
  });
392063
392249
 
392064
392250
  // src/tools/WebFetchTool/utils.ts
@@ -392068,6 +392254,7 @@ __export(exports_utils2, {
392068
392254
  isPrivateAddress: () => isPrivateAddress,
392069
392255
  isPreapprovedUrl: () => isPreapprovedUrl,
392070
392256
  isPermittedRedirect: () => isPermittedRedirect,
392257
+ isPermanentWebFetchStatus: () => isPermanentWebFetchStatus,
392071
392258
  getWithPermittedRedirects: () => getWithPermittedRedirects,
392072
392259
  getURLMarkdownContent: () => getURLMarkdownContent,
392073
392260
  clearWebFetchCache: () => clearWebFetchCache,
@@ -392075,10 +392262,14 @@ __export(exports_utils2, {
392075
392262
  assertPublicUrl: () => assertPublicUrl,
392076
392263
  applyPromptToMarkdown: () => applyPromptToMarkdown,
392077
392264
  UnsafeUrlError: () => UnsafeUrlError,
392265
+ PermanentWebFetchHttpError: () => PermanentWebFetchHttpError,
392078
392266
  MAX_MARKDOWN_LENGTH: () => MAX_MARKDOWN_LENGTH
392079
392267
  });
392080
392268
  import { lookup } from "dns/promises";
392081
392269
  import { isIP as isIP6 } from "net";
392270
+ function isPermanentWebFetchStatus(status) {
392271
+ return status >= 400 && status < 500 && ![408, 409, 425, 429].includes(status);
392272
+ }
392082
392273
  function clearWebFetchCache() {
392083
392274
  URL_CACHE.clear();
392084
392275
  DOMAIN_CHECK_CACHE.clear();
@@ -392273,6 +392464,9 @@ async function getWithPermittedRedirects(url3, signal, redirectChecker, depth =
392273
392464
  const hostname3 = new URL(url3).hostname;
392274
392465
  throw new EgressBlockedError(hostname3);
392275
392466
  }
392467
+ if (axios_default.isAxiosError(error40) && error40.response && isPermanentWebFetchStatus(error40.response.status)) {
392468
+ throw new PermanentWebFetchHttpError(error40.response.status);
392469
+ }
392276
392470
  throw error40;
392277
392471
  }
392278
392472
  }
@@ -392402,7 +392596,7 @@ async function applyPromptToMarkdown(prompt, markdownContent, signal, isNonInter
392402
392596
  }
392403
392597
  return "No response from model";
392404
392598
  }
392405
- var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, UnsafeUrlError, CACHE_TTL_MS2, MAX_CACHE_SIZE_BYTES, URL_CACHE, DOMAIN_CHECK_CACHE, turndownServicePromise, MAX_URL_LENGTH = 2000, MAX_HTTP_CONTENT_LENGTH = 10485760, FETCH_TIMEOUT_MS3 = 60000, MAX_REDIRECTS = 10, MAX_MARKDOWN_LENGTH = 1e5;
392599
+ var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, UnsafeUrlError, PermanentWebFetchHttpError, CACHE_TTL_MS2, MAX_CACHE_SIZE_BYTES, URL_CACHE, DOMAIN_CHECK_CACHE, turndownServicePromise, MAX_URL_LENGTH = 2000, MAX_HTTP_CONTENT_LENGTH = 10485760, FETCH_TIMEOUT_MS3 = 60000, MAX_REDIRECTS = 10, MAX_MARKDOWN_LENGTH = 1e5;
392406
392600
  var init_utils11 = __esm(() => {
392407
392601
  init_axios2();
392408
392602
  init_index_min();
@@ -392444,6 +392638,15 @@ var init_utils11 = __esm(() => {
392444
392638
  this.name = "UnsafeUrlError";
392445
392639
  }
392446
392640
  };
392641
+ PermanentWebFetchHttpError = class PermanentWebFetchHttpError extends Error {
392642
+ status;
392643
+ constructor(status) {
392644
+ super(`WebFetch received permanent HTTP ${status}. Do not retry this URL unchanged, even with a different prompt. Use WebSearch, fetch a parent/index page, or choose another source.`);
392645
+ this.status = status;
392646
+ this.name = "PermanentWebFetchHttpError";
392647
+ Object.setPrototypeOf(this, new.target.prototype);
392648
+ }
392649
+ };
392447
392650
  CACHE_TTL_MS2 = 15 * 60 * 1000;
392448
392651
  MAX_CACHE_SIZE_BYTES = 50 * 1024 * 1024;
392449
392652
  URL_CACHE = new I({
@@ -392456,6 +392659,164 @@ var init_utils11 = __esm(() => {
392456
392659
  });
392457
392660
  });
392458
392661
 
392662
+ // src/tools/WebFetchTool/permanentFailureCircuit.ts
392663
+ function normalizedFailureUrl(url3) {
392664
+ try {
392665
+ const parsed = new URL(url3);
392666
+ if (parsed.protocol === "http:")
392667
+ parsed.protocol = "https:";
392668
+ parsed.hash = "";
392669
+ return parsed.toString();
392670
+ } catch {
392671
+ return url3;
392672
+ }
392673
+ }
392674
+ function webFetchPermanentFailureScope(context5) {
392675
+ if (context5.queryTracking?.chainId) {
392676
+ return `query:${context5.queryTracking.chainId}`;
392677
+ }
392678
+ const latestHumanTurn = context5.messages.findLast(isHumanTurn)?.uuid;
392679
+ return `session:${getSessionId()}:agent:${context5.agentId ?? "main"}:` + `turn:${latestHumanTurn ?? "untracked"}`;
392680
+ }
392681
+ function webFetchPermanentFailureSignature(scope, url3) {
392682
+ return callSignature("WebFetchPermanentURL", { url: normalizedFailureUrl(url3) }, scope);
392683
+ }
392684
+ function circuitMessage(decision) {
392685
+ const recovery = "Do not fetch this URL again in this turn, even with a different prompt. " + "Use WebSearch, fetch a parent/index page, or choose another source.";
392686
+ if (decision.action === "abort") {
392687
+ return `Repeated permanent WebFetch failure. ${recovery} Stopping the turn instead of continuing the loop.`;
392688
+ }
392689
+ return `WebFetch circuit breaker: this URL already returned a permanent HTTP client error. ${recovery}`;
392690
+ }
392691
+ async function withWebFetchPermanentFailureCircuit(url3, scope, operation) {
392692
+ const signature = webFetchPermanentFailureSignature(scope, url3);
392693
+ const decision = checkRepeatedFailure(signature, WEB_FETCH_PERMANENT_FAILURE_POLICY);
392694
+ if (decision.action === "abort") {
392695
+ throw new RepeatedToolFailureAbort(circuitMessage(decision));
392696
+ }
392697
+ if (decision.action === "refuse") {
392698
+ recordCallFailure(signature);
392699
+ throw new Error(circuitMessage(decision));
392700
+ }
392701
+ try {
392702
+ const result = await operation();
392703
+ recordCallSuccess(signature);
392704
+ return result;
392705
+ } catch (error40) {
392706
+ if (error40 instanceof PermanentWebFetchHttpError) {
392707
+ recordCallFailure(signature);
392708
+ }
392709
+ throw error40;
392710
+ }
392711
+ }
392712
+ var WEB_FETCH_PERMANENT_FAILURE_POLICY;
392713
+ var init_permanentFailureCircuit = __esm(() => {
392714
+ init_state();
392715
+ init_repeatedFailureGuard();
392716
+ init_utils11();
392717
+ WEB_FETCH_PERMANENT_FAILURE_POLICY = {
392718
+ enabled: true,
392719
+ limit: 1,
392720
+ abortAfter: 2
392721
+ };
392722
+ });
392723
+
392724
+ // src/tools/WebFetchTool/UI.tsx
392725
+ function renderToolUseMessage15({
392726
+ url: url3,
392727
+ prompt
392728
+ }, {
392729
+ verbose
392730
+ }) {
392731
+ if (!url3) {
392732
+ return null;
392733
+ }
392734
+ if (verbose) {
392735
+ return `url: "${url3}"${verbose && prompt ? `, prompt: "${prompt}"` : ""}`;
392736
+ }
392737
+ return url3;
392738
+ }
392739
+ function renderToolUseProgressMessage8() {
392740
+ return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
392741
+ height: 1,
392742
+ children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392743
+ dimColor: true,
392744
+ children: "Fetching\u2026"
392745
+ }, undefined, false, undefined, this)
392746
+ }, undefined, false, undefined, this);
392747
+ }
392748
+ function renderToolResultMessage14({
392749
+ bytes,
392750
+ code,
392751
+ codeText,
392752
+ result
392753
+ }, _progressMessagesForMessage, {
392754
+ verbose
392755
+ }) {
392756
+ const formattedSize = formatFileSize(bytes);
392757
+ if (verbose) {
392758
+ return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedBox_default, {
392759
+ flexDirection: "column",
392760
+ children: [
392761
+ /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
392762
+ height: 1,
392763
+ children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392764
+ children: [
392765
+ "Received ",
392766
+ /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392767
+ bold: true,
392768
+ children: formattedSize
392769
+ }, undefined, false, undefined, this),
392770
+ " (",
392771
+ code,
392772
+ " ",
392773
+ codeText,
392774
+ ")"
392775
+ ]
392776
+ }, undefined, true, undefined, this)
392777
+ }, undefined, false, undefined, this),
392778
+ /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedBox_default, {
392779
+ flexDirection: "column",
392780
+ children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392781
+ children: result
392782
+ }, undefined, false, undefined, this)
392783
+ }, undefined, false, undefined, this)
392784
+ ]
392785
+ }, undefined, true, undefined, this);
392786
+ }
392787
+ return /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(MessageResponse, {
392788
+ height: 1,
392789
+ children: /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392790
+ children: [
392791
+ "Received ",
392792
+ /* @__PURE__ */ jsx_dev_runtime140.jsxDEV(ThemedText, {
392793
+ bold: true,
392794
+ children: formattedSize
392795
+ }, undefined, false, undefined, this),
392796
+ " (",
392797
+ code,
392798
+ " ",
392799
+ codeText,
392800
+ ")"
392801
+ ]
392802
+ }, undefined, true, undefined, this)
392803
+ }, undefined, false, undefined, this);
392804
+ }
392805
+ function getToolUseSummary6(input) {
392806
+ if (!input?.url) {
392807
+ return null;
392808
+ }
392809
+ return truncate3(input.url, TOOL_SUMMARY_MAX_LENGTH);
392810
+ }
392811
+ var jsx_dev_runtime140;
392812
+ var init_UI14 = __esm(() => {
392813
+ init_MessageResponse();
392814
+ init_toolLimits();
392815
+ init_ink2();
392816
+ init_format2();
392817
+ jsx_dev_runtime140 = __toESM(require_jsx_dev_runtime(), 1);
392818
+ });
392819
+
392459
392820
  // src/tools/WebFetchTool/WebFetchTool.ts
392460
392821
  function webFetchToolInputToPermissionRuleContent(input) {
392461
392822
  try {
@@ -392488,6 +392849,7 @@ var init_WebFetchTool = __esm(() => {
392488
392849
  init_format2();
392489
392850
  init_permissions2();
392490
392851
  init_preapproved();
392852
+ init_permanentFailureCircuit();
392491
392853
  init_UI14();
392492
392854
  init_utils11();
392493
392855
  inputSchema18 = lazySchema(() => exports_external.strictObject({
@@ -392618,9 +392980,10 @@ ${DESCRIPTION5}`;
392618
392980
  renderToolUseMessage: renderToolUseMessage15,
392619
392981
  renderToolUseProgressMessage: renderToolUseProgressMessage8,
392620
392982
  renderToolResultMessage: renderToolResultMessage14,
392621
- async call({ url: url3, prompt }, { abortController, options: { isNonInteractiveSession } }) {
392983
+ async call({ url: url3, prompt }, context5) {
392622
392984
  const start = Date.now();
392623
- const response = await getURLMarkdownContent(url3, abortController);
392985
+ const { abortController, options: { isNonInteractiveSession } } = context5;
392986
+ const response = await withWebFetchPermanentFailureCircuit(url3, webFetchPermanentFailureScope(context5), () => getURLMarkdownContent(url3, abortController));
392624
392987
  if ("type" in response && response.type === "redirect") {
392625
392988
  const statusText = response.statusCode === 301 ? "Moved Permanently" : response.statusCode === 308 ? "Permanent Redirect" : response.statusCode === 307 ? "Temporary Redirect" : "Found";
392626
392989
  const message = `REDIRECT DETECTED: The URL redirects to a different host.
@@ -396801,7 +397164,7 @@ var init_embeddings = __esm(() => {
396801
397164
  });
396802
397165
 
396803
397166
  // src/utils/codeIndex/store.ts
396804
- import { createHash as createHash30 } from "crypto";
397167
+ import { createHash as createHash31 } from "crypto";
396805
397168
  import { mkdir as mkdir22, readFile as readFile26, writeFile as writeFile22 } from "fs/promises";
396806
397169
  import { dirname as dirname49, join as join113 } from "path";
396807
397170
  function codeIndexDir(root2) {
@@ -396811,7 +397174,7 @@ function indexPath(root2) {
396811
397174
  return join113(codeIndexDir(root2), "index.json");
396812
397175
  }
396813
397176
  function sha1(content) {
396814
- return createHash30("sha1").update(content).digest("hex");
397177
+ return createHash31("sha1").update(content).digest("hex");
396815
397178
  }
396816
397179
  function cosineSimilarity(a2, b) {
396817
397180
  if (a2.length === 0 || a2.length !== b.length) {
@@ -397360,11 +397723,11 @@ var init_graph = __esm(() => {
397360
397723
  });
397361
397724
 
397362
397725
  // src/utils/codeIndex/repoIndex.ts
397363
- import { createHash as createHash31 } from "crypto";
397726
+ import { createHash as createHash32 } from "crypto";
397364
397727
  import { existsSync as existsSync29, mkdirSync as mkdirSync19, readFileSync as readFileSync34, writeFileSync as writeFileSync22 } from "fs";
397365
397728
  import { join as join115, posix as posix8 } from "path";
397366
397729
  function sha12(content) {
397367
- return createHash31("sha1").update(content).digest("hex");
397730
+ return createHash32("sha1").update(content).digest("hex");
397368
397731
  }
397369
397732
  function posixExt(file2) {
397370
397733
  const dot = file2.lastIndexOf(".");
@@ -399602,7 +399965,8 @@ In plan mode, you'll:
399602
399965
  3. Design an implementation approach
399603
399966
  4. Present your plan to the user for approval
399604
399967
  5. Use ${ASK_USER_QUESTION_TOOL_NAME} if you need to clarify approaches
399605
- 6. Exit plan mode with ExitPlanMode when ready to implement
399968
+ 6. Create the visible implementation tasks with TaskCreate when that tool is available; updating a plan is not a substitute for the task list
399969
+ 7. Exit plan mode with ExitPlanMode when ready to implement
399606
399970
 
399607
399971
  `;
399608
399972
  });
@@ -399721,7 +400085,7 @@ var init_EnterPlanModeTool = __esm(() => {
399721
400085
  }));
399722
400086
  return {
399723
400087
  data: {
399724
- message: "Entered plan mode. You should now focus on exploring the codebase and designing an implementation approach."
400088
+ message: "Entered plan mode. Explore the codebase, design the approach, and create the visible implementation tasks with TaskCreate before attempting any workspace changes."
399725
400089
  }
399726
400090
  };
399727
400091
  },
@@ -399736,7 +400100,8 @@ In plan mode, you should:
399736
400100
  3. Consider multiple approaches and their trade-offs
399737
400101
  4. Use AskUserQuestion if you need to clarify the approach
399738
400102
  5. Design a concrete implementation strategy
399739
- 6. When ready, use ExitPlanMode to present your plan for approval
400103
+ 6. If TaskCreate is available, create the visible implementation tasks before ExitPlanMode; updating a plan does not create the task list
400104
+ 7. When ready, use ExitPlanMode to present your plan for approval
399740
400105
 
399741
400106
  Remember: DO NOT write or edit any files yet. This is a read-only exploration and planning phase.`;
399742
400107
  return {
@@ -402049,11 +402414,6 @@ var init_ConfigTool = __esm(() => {
402049
402414
  });
402050
402415
  });
402051
402416
 
402052
- // src/utils/messagePredicates.ts
402053
- function isHumanTurn(m) {
402054
- return m.type === "user" && !m.isMeta && m.toolUseResult === undefined;
402055
- }
402056
-
402057
402417
  // src/utils/taskListRunContext.ts
402058
402418
  import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
402059
402419
  import { randomUUID as randomUUID40 } from "crypto";
@@ -412140,7 +412500,7 @@ var init_stream3 = __esm(() => {
412140
412500
  });
412141
412501
 
412142
412502
  // src/utils/telemetry/betaSessionTracing.ts
412143
- import { createHash as createHash32 } from "crypto";
412503
+ import { createHash as createHash33 } from "crypto";
412144
412504
  function clearBetaTracingState() {
412145
412505
  seenHashes.clear();
412146
412506
  lastReportedMessageHash.clear();
@@ -412167,7 +412527,7 @@ function truncateContent(content, maxSize = MAX_CONTENT_SIZE) {
412167
412527
  };
412168
412528
  }
412169
412529
  function shortHash(content) {
412170
- return createHash32("sha256").update(content).digest("hex").slice(0, 12);
412530
+ return createHash33("sha256").update(content).digest("hex").slice(0, 12);
412171
412531
  }
412172
412532
  function hashSystemPrompt(systemPrompt) {
412173
412533
  return `sp_${shortHash(systemPrompt)}`;
@@ -412443,7 +412803,7 @@ function isAnyTracingEnabled() {
412443
412803
  return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
412444
412804
  }
412445
412805
  function getTracer() {
412446
- return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.3");
412806
+ return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.4");
412447
412807
  }
412448
412808
  function createSpanAttributes(spanType, customAttributes = {}) {
412449
412809
  const baseAttributes = getTelemetryAttributes();
@@ -413140,10 +413500,11 @@ function checkTaskListGate(input) {
413140
413500
  const unclassifiedAllowanceExpired = input.requiresTaskList === undefined && input.readsSoFar >= config3.freeReads;
413141
413501
  const gateRequired = inherentlyRequiresTaskList || classifiedRequirement || forceEveryMutation || unclassifiedAllowanceExpired;
413142
413502
  const requirementContext = input.requirementReason ? ` This turn requires task tracking because it contains ${input.requirementReason}.` : "";
413503
+ const planningRecovery = input.requirementReason === "planning workflow" ? " EnterPlanMode and plan updates do not create the visible task list." : "";
413143
413504
  if (input.taskCount === null) {
413144
413505
  return {
413145
413506
  allowed: false,
413146
- reason: `The task list could not be read, so ${input.toolName} was not allowed ` + `to change state without a verifiable plan.${requirementContext} Retry TaskList or ` + `TaskCreate, then retry this call. Disable with ` + `tasks.requireBeforeChanges.enabled=false in settings.`
413507
+ reason: `The task list could not be read, so ${input.toolName} was not allowed ` + `to change state without a verifiable plan.${requirementContext}${planningRecovery} Retry TaskList or ` + `TaskCreate, then retry this call. Disable with ` + `tasks.requireBeforeChanges.enabled=false in settings.`
413147
413508
  };
413148
413509
  }
413149
413510
  if (!gateRequired)
@@ -413156,7 +413517,7 @@ function checkTaskListGate(input) {
413156
413517
  }
413157
413518
  return {
413158
413519
  allowed: false,
413159
- reason: `No task list exists, and ${input.toolName} changes the workspace. ` + `${requirementContext.trim()}${requirementContext ? " " : ""}` + `Call TaskCreate first with the steps you intend to take, then retry ` + `this call. Reads are unrestricted, so investigate as much as you need ` + `before writing the list. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
413520
+ reason: `No task list exists, and ${input.toolName} changes the workspace. ` + `${requirementContext.trim()}${requirementContext ? " " : ""}` + `${planningRecovery.trim()}${planningRecovery ? " " : ""}` + `Call TaskCreate first with the steps you intend to take, then retry ` + `this call. Reads are unrestricted, so investigate as much as you need ` + `before writing the list. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
413160
413521
  };
413161
413522
  }
413162
413523
  var TASK_LIST_GATE_DEFAULTS, KNOWN_MUTATING_TOOLS, GATE_EXEMPT_TOOLS, ALWAYS_REQUIRE_PLAN_TOOLS;
@@ -413193,278 +413554,6 @@ var init_taskListGate = __esm(() => {
413193
413554
  ]);
413194
413555
  });
413195
413556
 
413196
- // src/services/tools/repeatedFailureGuard.ts
413197
- import { createHash as createHash33 } from "crypto";
413198
- function writeFramedText(hash3, value) {
413199
- hash3.update(`${value.length}:`);
413200
- for (let offset = 0;offset < value.length; ) {
413201
- const end = Math.min(offset + HASH_CHUNK_CODE_UNITS, value.length);
413202
- hash3.update(value.slice(offset, end), "utf16le");
413203
- offset = end;
413204
- }
413205
- }
413206
- function writeToken(hash3, kind, value = "") {
413207
- writeFramedText(hash3, kind);
413208
- writeFramedText(hash3, value);
413209
- }
413210
- function visitCanonical(value, state, depth) {
413211
- state.nodesVisited++;
413212
- if (state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes || depth > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalDepth) {
413213
- throw new CanonicalTraversalLimitError;
413214
- }
413215
- if (value === null) {
413216
- writeToken(state.hash, "null");
413217
- return;
413218
- }
413219
- switch (typeof value) {
413220
- case "string":
413221
- state.textCodeUnitsVisited += value.length;
413222
- if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
413223
- throw new CanonicalTraversalLimitError;
413224
- }
413225
- writeToken(state.hash, "string", value);
413226
- return;
413227
- case "number":
413228
- writeToken(state.hash, "number", Object.is(value, -0) ? "-0" : String(value));
413229
- return;
413230
- case "boolean":
413231
- writeToken(state.hash, "boolean", String(value));
413232
- return;
413233
- case "undefined":
413234
- writeToken(state.hash, "undefined");
413235
- return;
413236
- case "bigint":
413237
- writeToken(state.hash, "bigint", value.toString());
413238
- return;
413239
- case "symbol": {
413240
- const description = String(value.description ?? "");
413241
- state.textCodeUnitsVisited += description.length;
413242
- if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
413243
- throw new CanonicalTraversalLimitError;
413244
- }
413245
- writeToken(state.hash, "symbol", description);
413246
- return;
413247
- }
413248
- case "function": {
413249
- const name = value.name || "<anonymous>";
413250
- state.textCodeUnitsVisited += name.length;
413251
- if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
413252
- throw new CanonicalTraversalLimitError;
413253
- }
413254
- writeToken(state.hash, "function", name);
413255
- return;
413256
- }
413257
- case "object": {
413258
- const object4 = value;
413259
- const existingReference = state.seen.get(object4);
413260
- if (existingReference !== undefined) {
413261
- writeToken(state.hash, "reference", String(existingReference));
413262
- return;
413263
- }
413264
- const reference = state.nextReference++;
413265
- state.seen.set(object4, reference);
413266
- if (Array.isArray(value)) {
413267
- if (value.length + state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes) {
413268
- throw new CanonicalTraversalLimitError;
413269
- }
413270
- writeToken(state.hash, "array", String(value.length));
413271
- for (let index2 = 0;index2 < value.length; index2++) {
413272
- if (!(index2 in value)) {
413273
- writeToken(state.hash, "hole");
413274
- continue;
413275
- }
413276
- visitCanonical(value[index2], state, depth + 1);
413277
- }
413278
- return;
413279
- }
413280
- const record3 = value;
413281
- const keys2 = Object.keys(record3);
413282
- if (keys2.length + state.nodesVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalNodes) {
413283
- throw new CanonicalTraversalLimitError;
413284
- }
413285
- keys2.sort();
413286
- writeToken(state.hash, "object", String(keys2.length));
413287
- for (const key of keys2) {
413288
- state.textCodeUnitsVisited += key.length;
413289
- if (state.textCodeUnitsVisited > REPEATED_FAILURE_GUARD_LIMITS.maxCanonicalTextCodeUnits) {
413290
- throw new CanonicalTraversalLimitError;
413291
- }
413292
- writeToken(state.hash, "key", key);
413293
- visitCanonical(record3[key], state, depth + 1);
413294
- }
413295
- return;
413296
- }
413297
- }
413298
- }
413299
- function digestText(domain2, value) {
413300
- const hash3 = createHash33("sha256");
413301
- writeToken(hash3, "domain", domain2);
413302
- writeToken(hash3, "value", value);
413303
- return hash3.digest("hex");
413304
- }
413305
- function canonicalInputDigest(input) {
413306
- const hash3 = createHash33("sha256");
413307
- writeToken(hash3, "domain", "repeated-failure-input-v2");
413308
- visitCanonical(input, {
413309
- hash: hash3,
413310
- nextReference: 0,
413311
- nodesVisited: 0,
413312
- textCodeUnitsVisited: 0,
413313
- seen: new WeakMap
413314
- }, 0);
413315
- return hash3.digest("hex");
413316
- }
413317
- function uniqueSerializationFailureDigest() {
413318
- serializationFailureNonce++;
413319
- return digestText("repeated-failure-unserializable-v2", serializationFailureNonce.toString());
413320
- }
413321
- function scopeDigest(scope) {
413322
- return scope ? digestText("repeated-failure-scope-v2", scope) : UNSCOPED_DIGEST;
413323
- }
413324
- function callSignature(toolName, input, scope) {
413325
- let inputDigest;
413326
- try {
413327
- inputDigest = canonicalInputDigest(input);
413328
- } catch {
413329
- inputDigest = uniqueSerializationFailureDigest();
413330
- }
413331
- return [
413332
- SIGNATURE_VERSION,
413333
- scopeDigest(scope),
413334
- digestText("repeated-failure-tool-v2", toolName),
413335
- inputDigest
413336
- ].join(":");
413337
- }
413338
- function isSha256Digest(value) {
413339
- return value?.length === SHA256_HEX_LENGTH && /^[0-9a-f]+$/.test(value);
413340
- }
413341
- function signatureStorageIdentity(signature) {
413342
- if (signature.length === UNSCOPED_SIGNATURE_LENGTH || signature.length === SCOPED_SIGNATURE_LENGTH) {
413343
- const parts = signature.split(":");
413344
- if (parts.length === 4 && parts[0] === SIGNATURE_VERSION && (parts[1] === UNSCOPED_DIGEST || isSha256Digest(parts[1])) && isSha256Digest(parts[2]) && isSha256Digest(parts[3])) {
413345
- return { key: signature, scope: parts[1] };
413346
- }
413347
- }
413348
- return {
413349
- key: `${SIGNATURE_VERSION}:legacy:${digestText("repeated-failure-legacy-signature-v2", signature)}`,
413350
- scope: UNSCOPED_DIGEST
413351
- };
413352
- }
413353
- function pruneExpiredFailures(now5) {
413354
- for (const [signature, record3] of failureCounts) {
413355
- if (now5 >= record3.lastFailureAt && now5 - record3.lastFailureAt >= REPEATED_FAILURE_GUARD_LIMITS.entryTtlMs) {
413356
- failureCounts.delete(signature);
413357
- }
413358
- }
413359
- }
413360
- function enforceFailureBounds(scope) {
413361
- let entriesInScope = 0;
413362
- for (const record3 of failureCounts.values()) {
413363
- if (record3.scopeDigest === scope)
413364
- entriesInScope++;
413365
- }
413366
- let scopeOverflow = entriesInScope - REPEATED_FAILURE_GUARD_LIMITS.maxEntriesPerScope;
413367
- if (scopeOverflow > 0) {
413368
- for (const [signature, record3] of failureCounts) {
413369
- if (record3.scopeDigest !== scope)
413370
- continue;
413371
- failureCounts.delete(signature);
413372
- scopeOverflow--;
413373
- if (scopeOverflow === 0)
413374
- break;
413375
- }
413376
- }
413377
- while (failureCounts.size > REPEATED_FAILURE_GUARD_LIMITS.maxEntries) {
413378
- const oldest = failureCounts.keys().next().value;
413379
- if (oldest === undefined)
413380
- break;
413381
- failureCounts.delete(oldest);
413382
- }
413383
- }
413384
- function recordCallFailure(signature) {
413385
- const now5 = repeatedFailureNow();
413386
- pruneExpiredFailures(now5);
413387
- const identity5 = signatureStorageIdentity(signature);
413388
- const existing2 = failureCounts.get(identity5.key);
413389
- const next = (existing2?.failures ?? 0) + 1;
413390
- const signatureScope = existing2?.scopeDigest ?? identity5.scope;
413391
- failureCounts.delete(identity5.key);
413392
- failureCounts.set(identity5.key, {
413393
- failures: next,
413394
- lastFailureAt: now5,
413395
- scopeDigest: signatureScope
413396
- });
413397
- enforceFailureBounds(signatureScope);
413398
- return next;
413399
- }
413400
- function recordCallSuccess(signature) {
413401
- failureCounts.delete(signatureStorageIdentity(signature).key);
413402
- }
413403
- function clearRepeatedFailuresForScope(scope) {
413404
- const target = scopeDigest(scope);
413405
- let cleared = 0;
413406
- for (const [signature, record3] of failureCounts) {
413407
- if (record3.scopeDigest !== target)
413408
- continue;
413409
- failureCounts.delete(signature);
413410
- cleared++;
413411
- }
413412
- return cleared;
413413
- }
413414
- function clearRepeatedFailuresForQuery(queryChainId) {
413415
- return clearRepeatedFailuresForScope(`query:${queryChainId}`);
413416
- }
413417
- function checkRepeatedFailure(signature, config3 = REPEATED_FAILURE_DEFAULTS) {
413418
- if (!config3.enabled)
413419
- return { action: "allow" };
413420
- const now5 = repeatedFailureNow();
413421
- pruneExpiredFailures(now5);
413422
- const failures = failureCounts.get(signatureStorageIdentity(signature).key)?.failures ?? 0;
413423
- if (failures >= config3.abortAfter) {
413424
- return {
413425
- action: "abort",
413426
- reason: `This exact call has failed ${failures} times and is still being ` + `repeated. Stopping the turn rather than continuing to loop.`
413427
- };
413428
- }
413429
- if (failures >= config3.limit) {
413430
- return {
413431
- action: "refuse",
413432
- reason: `This exact call has already failed ${failures} times with the same ` + `arguments, so it will fail again. Do not retry it unchanged. Either ` + `fix the arguments, use a different tool, or tell the user what is ` + `blocking you and stop.`
413433
- };
413434
- }
413435
- return { action: "allow" };
413436
- }
413437
- var REPEATED_FAILURE_DEFAULTS, REPEATED_FAILURE_GUARD_LIMITS, SIGNATURE_VERSION = "rf2", UNSCOPED_DIGEST = "-", SHA256_HEX_LENGTH = 64, HASH_CHUNK_CODE_UNITS, UNSCOPED_SIGNATURE_LENGTH, SCOPED_SIGNATURE_LENGTH, failureCounts, serializationFailureNonce = 0n, repeatedFailureNow, CanonicalTraversalLimitError, RepeatedToolFailureAbort;
413438
- var init_repeatedFailureGuard = __esm(() => {
413439
- REPEATED_FAILURE_DEFAULTS = {
413440
- enabled: false,
413441
- limit: 3,
413442
- abortAfter: 6
413443
- };
413444
- REPEATED_FAILURE_GUARD_LIMITS = {
413445
- maxEntries: 2048,
413446
- maxEntriesPerScope: 256,
413447
- entryTtlMs: 30 * 60 * 1000,
413448
- maxCanonicalNodes: 50000,
413449
- maxCanonicalDepth: 128,
413450
- maxCanonicalTextCodeUnits: 1e6
413451
- };
413452
- HASH_CHUNK_CODE_UNITS = 16 * 1024;
413453
- UNSCOPED_SIGNATURE_LENGTH = SIGNATURE_VERSION.length + 3 + 1 + SHA256_HEX_LENGTH * 2;
413454
- SCOPED_SIGNATURE_LENGTH = SIGNATURE_VERSION.length + 3 + SHA256_HEX_LENGTH * 3;
413455
- failureCounts = new Map;
413456
- repeatedFailureNow = Date.now;
413457
- CanonicalTraversalLimitError = class CanonicalTraversalLimitError extends Error {
413458
- };
413459
- RepeatedToolFailureAbort = class RepeatedToolFailureAbort extends Error {
413460
- constructor(message) {
413461
- super(message);
413462
- this.name = "RepeatedToolFailureAbort";
413463
- Object.setPrototypeOf(this, new.target.prototype);
413464
- }
413465
- };
413466
- });
413467
-
413468
413557
  // src/stability/types.ts
413469
413558
  var DEFAULT_LIMITS;
413470
413559
  var init_types12 = __esm(() => {
@@ -415360,6 +415449,8 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
415360
415449
  error: errorMessage2(error40)
415361
415450
  });
415362
415451
  endToolSpan();
415452
+ if (error40 instanceof RepeatedToolFailureAbort)
415453
+ throw error40;
415363
415454
  if (error40 instanceof McpAuthError) {
415364
415455
  toolUseContext.setAppState((prevState) => {
415365
415456
  const serverName = error40.serverName;
@@ -442891,7 +442982,7 @@ function Feedback({
442891
442982
  platform: env2.platform,
442892
442983
  gitRepo: envInfo.isGit,
442893
442984
  terminal: env2.terminal,
442894
- version: "1.80.3",
442985
+ version: "1.80.4",
442895
442986
  transcript: normalizeMessagesForAPI(messages),
442896
442987
  errors: sanitizedErrors,
442897
442988
  lastApiRequest: getLastAPIRequest(),
@@ -443083,7 +443174,7 @@ function Feedback({
443083
443174
  ", ",
443084
443175
  env2.terminal,
443085
443176
  ", v",
443086
- "1.80.3"
443177
+ "1.80.4"
443087
443178
  ]
443088
443179
  }, undefined, true, undefined, this)
443089
443180
  ]
@@ -443189,7 +443280,7 @@ ${sanitizedDescription}
443189
443280
  ` + `**Environment Info**
443190
443281
  ` + `- Platform: ${env2.platform}
443191
443282
  ` + `- Terminal: ${env2.terminal}
443192
- ` + `- Version: ${"1.80.3"}
443283
+ ` + `- Version: ${"1.80.4"}
443193
443284
  ` + `- Feedback ID: ${feedbackId}
443194
443285
  ` + `
443195
443286
  **Errors**
@@ -446299,7 +446390,7 @@ function buildPrimarySection() {
446299
446390
  }, undefined, false, undefined, this);
446300
446391
  return [{
446301
446392
  label: "Version",
446302
- value: "1.80.3"
446393
+ value: "1.80.4"
446303
446394
  }, {
446304
446395
  label: "Session name",
446305
446396
  value: nameValue
@@ -449681,7 +449772,7 @@ function Config({
449681
449772
  }
449682
449773
  }, undefined, false, undefined, this)
449683
449774
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
449684
- currentVersion: "1.80.3",
449775
+ currentVersion: "1.80.4",
449685
449776
  onChoice: (choice) => {
449686
449777
  setShowSubmenu(null);
449687
449778
  setTabsHidden(false);
@@ -449693,7 +449784,7 @@ function Config({
449693
449784
  autoUpdatesChannel: "stable"
449694
449785
  };
449695
449786
  if (choice === "stay") {
449696
- newSettings.minimumVersion = "1.80.3";
449787
+ newSettings.minimumVersion = "1.80.4";
449697
449788
  }
449698
449789
  updateSettingsForSource("userSettings", newSettings);
449699
449790
  setSettingsData((prev_27) => ({
@@ -450870,6 +450961,9 @@ var init_Settings = __esm(() => {
450870
450961
  });
450871
450962
 
450872
450963
  // src/commands/config/configAssignments.ts
450964
+ function resolveConfigAssignmentKey(rawKey) {
450965
+ return KEY_ALIASES[rawKey.replaceAll("-", "").toLowerCase()];
450966
+ }
450873
450967
  function booleanValue(value) {
450874
450968
  if (value === "true" || value === "on" || value === "enabled")
450875
450969
  return true;
@@ -450885,9 +450979,9 @@ function parseConfigAssignments(input) {
450885
450979
  if (separator <= 0 || separator === token.length - 1) {
450886
450980
  return { error: `Invalid assignment '${token}'. Expected key=value.` };
450887
450981
  }
450888
- const rawKey = token.slice(0, separator).replaceAll("-", "").toLowerCase();
450982
+ const rawKey = token.slice(0, separator);
450889
450983
  const rawValue = token.slice(separator + 1).toLowerCase();
450890
- const key = KEY_ALIASES[rawKey];
450984
+ const key = resolveConfigAssignmentKey(rawKey);
450891
450985
  if (!key)
450892
450986
  return { error: `Unknown setting '${token.slice(0, separator)}'.` };
450893
450987
  if (key === "editor") {
@@ -450915,10 +451009,115 @@ function parseConfigAssignments(input) {
450915
451009
  }
450916
451010
  return { assignments };
450917
451011
  }
451012
+ function applyConfigAssignments(assignments, effects2 = {}) {
451013
+ const applied = [];
451014
+ for (const assignment of assignments) {
451015
+ switch (assignment.key) {
451016
+ case "thinking": {
451017
+ const value = assignment.value;
451018
+ const result = updateSettingsForSource("userSettings", {
451019
+ alwaysThinkingEnabled: value ? undefined : false
451020
+ });
451021
+ if (result.error) {
451022
+ return { error: `Could not update thinking: ${result.error.message}` };
451023
+ }
451024
+ effects2.thinking?.(value);
451025
+ applied.push(`thinking=${value}`);
451026
+ break;
451027
+ }
451028
+ case "screenReader": {
451029
+ const value = assignment.value;
451030
+ const result = updateSettingsForSource("localSettings", {
451031
+ screenReaderMode: value
451032
+ });
451033
+ if (result.error) {
451034
+ return {
451035
+ error: `Could not update screen reader mode: ${result.error.message}`
451036
+ };
451037
+ }
451038
+ effects2.screenReader?.(value);
451039
+ applied.push(`screenReader=${value}`);
451040
+ break;
451041
+ }
451042
+ case "reducedMotion": {
451043
+ const value = assignment.value;
451044
+ const result = updateSettingsForSource("localSettings", {
451045
+ prefersReducedMotion: value
451046
+ });
451047
+ if (result.error) {
451048
+ return {
451049
+ error: `Could not update reduced motion: ${result.error.message}`
451050
+ };
451051
+ }
451052
+ effects2.reducedMotion?.(value);
451053
+ applied.push(`reducedMotion=${value}`);
451054
+ break;
451055
+ }
451056
+ case "verbose": {
451057
+ const value = assignment.value;
451058
+ const result = updateSettingsForSource("userSettings", {
451059
+ verbose: value
451060
+ });
451061
+ if (result.error) {
451062
+ return {
451063
+ error: `Could not update verbose output: ${result.error.message}`
451064
+ };
451065
+ }
451066
+ effects2.verbose?.(value);
451067
+ applied.push(`verbose=${value}`);
451068
+ break;
451069
+ }
451070
+ case "autoCompact": {
451071
+ const value = assignment.value;
451072
+ saveGlobalConfig((previous) => ({
451073
+ ...previous,
451074
+ autoCompactEnabled: value
451075
+ }));
451076
+ applied.push(`autoCompact=${value}`);
451077
+ break;
451078
+ }
451079
+ case "editor": {
451080
+ const value = assignment.value;
451081
+ saveGlobalConfig((previous) => ({ ...previous, editorMode: value }));
451082
+ applied.push(`editor=${value}`);
451083
+ break;
451084
+ }
451085
+ case "vimEscape": {
451086
+ const value = assignment.value;
451087
+ saveGlobalConfig((previous) => ({
451088
+ ...previous,
451089
+ vimInsertModeEscapeSequence: value || undefined
451090
+ }));
451091
+ applied.push(`vimEscape=${value || "off"}`);
451092
+ break;
451093
+ }
451094
+ }
451095
+ }
451096
+ return { applied };
451097
+ }
451098
+ function getConfigAssignmentValues() {
451099
+ const settings = getInitialSettings();
451100
+ const global3 = getGlobalConfig();
451101
+ return [
451102
+ { key: "thinking", value: settings.alwaysThinkingEnabled !== false },
451103
+ { key: "screenReader", value: settings.screenReaderMode === true },
451104
+ { key: "reducedMotion", value: settings.prefersReducedMotion === true },
451105
+ { key: "verbose", value: settings.verbose === true },
451106
+ { key: "autoCompact", value: global3.autoCompactEnabled },
451107
+ { key: "editor", value: global3.editorMode ?? "normal" },
451108
+ {
451109
+ key: "vimEscape",
451110
+ value: global3.vimInsertModeEscapeSequence || "off"
451111
+ }
451112
+ ];
451113
+ }
450918
451114
  var CONFIG_ASSIGNMENT_HELP, KEY_ALIASES;
450919
451115
  var init_configAssignments = __esm(() => {
451116
+ init_config();
451117
+ init_settings2();
450920
451118
  CONFIG_ASSIGNMENT_HELP = [
450921
451119
  "Usage: /config <key>=<value> [key=value ...]",
451120
+ "CLI: ur config set <key> <value>",
450922
451121
  "",
450923
451122
  "Supported settings:",
450924
451123
  " thinking=true|false Enable or disable model thinking",
@@ -450980,90 +451179,35 @@ ${CONFIG_ASSIGNMENT_HELP}`,
450980
451179
  onDone
450981
451180
  }, undefined, false, undefined, this);
450982
451181
  }
450983
- const applied = [];
450984
- for (const assignment of parsed.assignments) {
450985
- switch (assignment.key) {
450986
- case "thinking": {
450987
- const value = assignment.value;
450988
- const result = updateSettingsForSource("userSettings", { alwaysThinkingEnabled: value ? undefined : false });
450989
- if (result.error)
450990
- return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
450991
- message: `Could not update thinking: ${result.error.message}`,
450992
- onDone
450993
- }, undefined, false, undefined, this);
450994
- context5.setAppState((previous) => ({ ...previous, thinkingEnabled: value }));
450995
- applied.push(`thinking=${value}`);
450996
- break;
450997
- }
450998
- case "screenReader": {
450999
- const value = assignment.value;
451000
- const result = updateSettingsForSource("localSettings", { screenReaderMode: value });
451001
- if (result.error)
451002
- return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
451003
- message: `Could not update screen reader mode: ${result.error.message}`,
451004
- onDone
451005
- }, undefined, false, undefined, this);
451006
- if (value)
451007
- enableScreenReaderMode();
451008
- else
451009
- disableScreenReaderMode();
451010
- setScreenReaderRendering(value);
451011
- context5.setAppState((previous) => ({
451012
- ...previous,
451013
- settings: { ...previous.settings, screenReaderMode: value }
451014
- }));
451015
- applied.push(`screenReader=${value}`);
451016
- break;
451017
- }
451018
- case "reducedMotion": {
451019
- const value = assignment.value;
451020
- const result = updateSettingsForSource("localSettings", { prefersReducedMotion: value });
451021
- if (result.error)
451022
- return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
451023
- message: `Could not update reduced motion: ${result.error.message}`,
451024
- onDone
451025
- }, undefined, false, undefined, this);
451026
- context5.setAppState((previous) => ({ ...previous, settings: { ...previous.settings, prefersReducedMotion: value } }));
451027
- applied.push(`reducedMotion=${value}`);
451028
- break;
451029
- }
451030
- case "verbose": {
451031
- const value = assignment.value;
451032
- const result = updateSettingsForSource("userSettings", { verbose: value });
451033
- if (result.error)
451034
- return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
451035
- message: `Could not update verbose output: ${result.error.message}`,
451036
- onDone
451037
- }, undefined, false, undefined, this);
451038
- context5.setAppState((previous) => ({ ...previous, verbose: value }));
451039
- applied.push(`verbose=${value}`);
451040
- break;
451041
- }
451042
- case "autoCompact": {
451043
- const value = assignment.value;
451044
- saveGlobalConfig((previous) => ({ ...previous, autoCompactEnabled: value }));
451045
- applied.push(`autoCompact=${value}`);
451046
- break;
451047
- }
451048
- case "editor": {
451049
- const value = assignment.value;
451050
- saveGlobalConfig((previous) => ({ ...previous, editorMode: value }));
451051
- applied.push(`editor=${value}`);
451052
- break;
451053
- }
451054
- case "vimEscape": {
451055
- const value = assignment.value;
451056
- saveGlobalConfig((previous) => ({
451057
- ...previous,
451058
- vimInsertModeEscapeSequence: value || undefined
451059
- }));
451060
- applied.push(`vimEscape=${value || "off"}`);
451061
- break;
451062
- }
451182
+ const result = applyConfigAssignments(parsed.assignments, {
451183
+ thinking(value) {
451184
+ context5.setAppState((previous) => ({ ...previous, thinkingEnabled: value }));
451185
+ },
451186
+ screenReader(value) {
451187
+ if (value)
451188
+ enableScreenReaderMode();
451189
+ else
451190
+ disableScreenReaderMode();
451191
+ setScreenReaderRendering(value);
451192
+ context5.setAppState((previous) => ({
451193
+ ...previous,
451194
+ settings: { ...previous.settings, screenReaderMode: value }
451195
+ }));
451196
+ },
451197
+ reducedMotion(value) {
451198
+ context5.setAppState((previous) => ({ ...previous, settings: { ...previous.settings, prefersReducedMotion: value } }));
451199
+ },
451200
+ verbose(value) {
451201
+ context5.setAppState((previous) => ({ ...previous, verbose: value }));
451063
451202
  }
451064
- }
451203
+ });
451204
+ if (result.error)
451205
+ return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
451206
+ message: result.error,
451207
+ onDone
451208
+ }, undefined, false, undefined, this);
451065
451209
  return /* @__PURE__ */ jsx_dev_runtime183.jsxDEV(ConfigResult, {
451066
- message: `Updated ${applied.join(", ")}.`,
451210
+ message: `Updated ${result.applied.join(", ")}.`,
451067
451211
  onDone
451068
451212
  }, undefined, false, undefined, this);
451069
451213
  };
@@ -451071,9 +451215,7 @@ var init_config8 = __esm(() => {
451071
451215
  init_Settings();
451072
451216
  init_ink2();
451073
451217
  init_root();
451074
- init_config();
451075
451218
  init_screenReader();
451076
- init_settings2();
451077
451219
  init_configAssignments();
451078
451220
  import_react110 = __toESM(require_react(), 1);
451079
451221
  jsx_dev_runtime183 = __toESM(require_jsx_dev_runtime(), 1);
@@ -457951,7 +458093,7 @@ function HelpV2(t0) {
457951
458093
  let t6;
457952
458094
  if ($2[31] !== tabs) {
457953
458095
  t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
457954
- title: `UR v${"1.80.3"}`,
458096
+ title: `UR v${"1.80.4"}`,
457955
458097
  color: "professionalBlue",
457956
458098
  defaultTab: "general",
457957
458099
  children: tabs
@@ -458884,7 +459026,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
458884
459026
  async function handleInitialize(options2) {
458885
459027
  return {
458886
459028
  name: "UR",
458887
- version: "1.80.3",
459029
+ version: "1.80.4",
458888
459030
  protocolVersion: "0.1.0",
458889
459031
  workspaceRoot: options2.cwd,
458890
459032
  capabilities: {
@@ -475992,7 +476134,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
475992
476134
  return [];
475993
476135
  }
475994
476136
  }
475995
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.3") {
476137
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.4") {
475996
476138
  if (process.env.USER_TYPE === "ant") {
475997
476139
  const changelog = "";
475998
476140
  if (changelog) {
@@ -476019,7 +476161,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.3")
476019
476161
  releaseNotes
476020
476162
  };
476021
476163
  }
476022
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.3") {
476164
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.4") {
476023
476165
  if (process.env.USER_TYPE === "ant") {
476024
476166
  const changelog = "";
476025
476167
  if (changelog) {
@@ -478924,7 +479066,7 @@ function getRecentActivitySync() {
478924
479066
  return cachedActivity;
478925
479067
  }
478926
479068
  function getLogoDisplayData() {
478927
- const version2 = process.env.DEMO_VERSION ?? "1.80.3";
479069
+ const version2 = process.env.DEMO_VERSION ?? "1.80.4";
478928
479070
  const serverUrl = getDirectConnectServerUrl();
478929
479071
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
478930
479072
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -479792,7 +479934,7 @@ function LogoV2() {
479792
479934
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
479793
479935
  t2 = () => {
479794
479936
  const currentConfig = getGlobalConfig();
479795
- if (currentConfig.lastReleaseNotesSeen === "1.80.3") {
479937
+ if (currentConfig.lastReleaseNotesSeen === "1.80.4") {
479796
479938
  return;
479797
479939
  }
479798
479940
  saveGlobalConfig(_temp325);
@@ -480477,12 +480619,12 @@ function LogoV2() {
480477
480619
  return t41;
480478
480620
  }
480479
480621
  function _temp325(current) {
480480
- if (current.lastReleaseNotesSeen === "1.80.3") {
480622
+ if (current.lastReleaseNotesSeen === "1.80.4") {
480481
480623
  return current;
480482
480624
  }
480483
480625
  return {
480484
480626
  ...current,
480485
- lastReleaseNotesSeen: "1.80.3"
480627
+ lastReleaseNotesSeen: "1.80.4"
480486
480628
  };
480487
480629
  }
480488
480630
  function _temp241(s_0) {
@@ -491931,7 +492073,7 @@ function ShellDetailDialog(t0) {
491931
492073
  const isMonitor = shell.kind === "monitor";
491932
492074
  let t8;
491933
492075
  if ($2[17] !== shell.command) {
491934
- t8 = truncateToWidth(shell.command, 280);
492076
+ t8 = truncateToWidth(formatCommandForDisplay(shell.command), 280);
491935
492077
  $2[17] = shell.command;
491936
492078
  $2[18] = t8;
491937
492079
  } else {
@@ -496574,7 +496716,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
496574
496716
  if (spec.name !== specName) {
496575
496717
  throw new Error("Agentic CI workflow spec name does not match");
496576
496718
  }
496577
- const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.3" : "1.80.3");
496719
+ const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4");
496578
496720
  if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
496579
496721
  throw new Error("invalid ur-agent package version");
496580
496722
  }
@@ -497567,7 +497709,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
497567
497709
  path: ".github/workflows/ur.yml",
497568
497710
  root: "project",
497569
497711
  content: compileAgenticCiWorkflow("default", {
497570
- packageVersion: typeof MACRO !== "undefined" ? "1.80.3" : "1.80.3"
497712
+ packageVersion: typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4"
497571
497713
  })
497572
497714
  },
497573
497715
  {
@@ -497630,7 +497772,7 @@ function value(tokens, flag) {
497630
497772
  return index2 >= 0 ? tokens[index2 + 1] : undefined;
497631
497773
  }
497632
497774
  function cliVersion() {
497633
- return typeof MACRO !== "undefined" ? "1.80.3" : "1.80.3";
497775
+ return typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4";
497634
497776
  }
497635
497777
  function workflowPath(cwd2) {
497636
497778
  return join168(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
@@ -503486,7 +503628,7 @@ function createAcpStdioApp(deps) {
503486
503628
  }
503487
503629
  },
503488
503630
  authMethods: [],
503489
- agentInfo: { name: "UR-Nexus", version: "1.80.3" }
503631
+ agentInfo: { name: "UR-Nexus", version: "1.80.4" }
503490
503632
  })).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
503491
503633
  const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
503492
503634
  await runtime2.announce({
@@ -503583,7 +503725,7 @@ function createAcpStdioAgent(deps) {
503583
503725
  }
503584
503726
  },
503585
503727
  authMethods: [],
503586
- agentInfo: { name: "UR-Nexus", version: "1.80.3" }
503728
+ agentInfo: { name: "UR-Nexus", version: "1.80.4" }
503587
503729
  });
503588
503730
  return;
503589
503731
  case "authenticate":
@@ -714809,7 +714951,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
714809
714951
  smapsRollup,
714810
714952
  platform: process.platform,
714811
714953
  nodeVersion: process.version,
714812
- ccVersion: "1.80.3"
714954
+ ccVersion: "1.80.4"
714813
714955
  };
714814
714956
  }
714815
714957
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -715398,7 +715540,7 @@ var init_bridge_kick = __esm(() => {
715398
715540
  var call154 = async () => {
715399
715541
  return {
715400
715542
  type: "text",
715401
- value: "1.80.3"
715543
+ value: "1.80.4"
715402
715544
  };
715403
715545
  }, version2, version_default;
715404
715546
  var init_version = __esm(() => {
@@ -726641,7 +726783,7 @@ function generateHtmlReport(data, insights) {
726641
726783
  </html>`;
726642
726784
  }
726643
726785
  function buildExportData(data, insights, facets, remoteStats) {
726644
- const version3 = typeof MACRO !== "undefined" ? "1.80.3" : "unknown";
726786
+ const version3 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
726645
726787
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
726646
726788
  const facets_summary = {
726647
726789
  total: facets.size,
@@ -730954,7 +731096,7 @@ var init_sessionStorage = __esm(() => {
730954
731096
  init_settings2();
730955
731097
  init_slowOperations();
730956
731098
  init_uuid();
730957
- VERSION7 = typeof MACRO !== "undefined" ? "1.80.3" : "unknown";
731099
+ VERSION7 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
730958
731100
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
730959
731101
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
730960
731102
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -732169,7 +732311,7 @@ var init_filesystem = __esm(() => {
732169
732311
  });
732170
732312
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
732171
732313
  const nonce = randomBytes24(16).toString("hex");
732172
- return join243(getURTempDir(), "bundled-skills", "1.80.3", nonce);
732314
+ return join243(getURTempDir(), "bundled-skills", "1.80.4", nonce);
732173
732315
  });
732174
732316
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
732175
732317
  });
@@ -738558,7 +738700,7 @@ function computeFingerprint(messageText2, version3) {
738558
738700
  }
738559
738701
  function computeFingerprintFromMessages(messages) {
738560
738702
  const firstMessageText = extractFirstMessageText(messages);
738561
- return computeFingerprint(firstMessageText, "1.80.3");
738703
+ return computeFingerprint(firstMessageText, "1.80.4");
738562
738704
  }
738563
738705
  var FINGERPRINT_SALT = "59cf53e54c78";
738564
738706
  var init_fingerprint = () => {};
@@ -740483,7 +740625,7 @@ async function sideQuery(opts) {
740483
740625
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
740484
740626
  }
740485
740627
  const messageText2 = extractFirstUserMessageText(messages);
740486
- const fingerprint2 = computeFingerprint(messageText2, "1.80.3");
740628
+ const fingerprint2 = computeFingerprint(messageText2, "1.80.4");
740487
740629
  const attributionHeader = getAttributionHeader(fingerprint2);
740488
740630
  const systemBlocks = [
740489
740631
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -745317,7 +745459,7 @@ function buildSystemInitMessage(inputs) {
745317
745459
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
745318
745460
  apiKeySource: getURHQApiKeyWithSource().source,
745319
745461
  betas: getSdkBetas(),
745320
- ur_version: "1.80.3",
745462
+ ur_version: "1.80.4",
745321
745463
  output_style: outputStyle,
745322
745464
  agents: inputs.agents.map((agent2) => agent2.agentType),
745323
745465
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -759153,7 +759295,7 @@ var init_useVoiceEnabled = __esm(() => {
759153
759295
  function getSemverPart(version3) {
759154
759296
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
759155
759297
  }
759156
- function useUpdateNotification(updatedVersion, initialVersion = "1.80.3") {
759298
+ function useUpdateNotification(updatedVersion, initialVersion = "1.80.4") {
759157
759299
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
759158
759300
  if (!updatedVersion) {
759159
759301
  return null;
@@ -759202,7 +759344,7 @@ function AutoUpdater({
759202
759344
  return;
759203
759345
  }
759204
759346
  if (false) {}
759205
- const currentVersion = "1.80.3";
759347
+ const currentVersion = "1.80.4";
759206
759348
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
759207
759349
  let latestVersion = await getLatestVersion(channel);
759208
759350
  const isDisabled = isAutoUpdaterDisabled();
@@ -759431,12 +759573,12 @@ function NativeAutoUpdater({
759431
759573
  logEvent("tengu_native_auto_updater_start", {});
759432
759574
  try {
759433
759575
  const maxVersion = await getMaxVersion();
759434
- if (maxVersion && gt("1.80.3", maxVersion)) {
759576
+ if (maxVersion && gt("1.80.4", maxVersion)) {
759435
759577
  const msg = await getMaxVersionMessage();
759436
759578
  setMaxVersionIssue(msg ?? "affects your version");
759437
759579
  }
759438
759580
  const result = await installLatest(channel);
759439
- const currentVersion = "1.80.3";
759581
+ const currentVersion = "1.80.4";
759440
759582
  const latencyMs = Date.now() - startTime;
759441
759583
  if (result.lockFailed) {
759442
759584
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -759573,17 +759715,17 @@ function PackageManagerAutoUpdater(t0) {
759573
759715
  const maxVersion = await getMaxVersion();
759574
759716
  if (maxVersion && latest && gt(latest, maxVersion)) {
759575
759717
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
759576
- if (gte("1.80.3", maxVersion)) {
759577
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
759718
+ if (gte("1.80.4", maxVersion)) {
759719
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
759578
759720
  setUpdateAvailable(false);
759579
759721
  return;
759580
759722
  }
759581
759723
  latest = maxVersion;
759582
759724
  }
759583
- const hasUpdate = latest && !gte("1.80.3", latest) && !shouldSkipVersion(latest);
759725
+ const hasUpdate = latest && !gte("1.80.4", latest) && !shouldSkipVersion(latest);
759584
759726
  setUpdateAvailable(!!hasUpdate);
759585
759727
  if (hasUpdate) {
759586
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.3"} -> ${latest}`);
759728
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.4"} -> ${latest}`);
759587
759729
  }
759588
759730
  };
759589
759731
  $2[0] = t1;
@@ -759617,7 +759759,7 @@ function PackageManagerAutoUpdater(t0) {
759617
759759
  wrap: "truncate",
759618
759760
  children: [
759619
759761
  "currentVersion: ",
759620
- "1.80.3"
759762
+ "1.80.4"
759621
759763
  ]
759622
759764
  }, undefined, true, undefined, this);
759623
759765
  $2[3] = verbose;
@@ -770470,7 +770612,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
770470
770612
  project_dir: getOriginalCwd(),
770471
770613
  added_dirs: addedDirs
770472
770614
  },
770473
- version: "1.80.3",
770615
+ version: "1.80.4",
770474
770616
  output_style: {
770475
770617
  name: outputStyleName
770476
770618
  },
@@ -770605,7 +770747,7 @@ function StatusLineInner({
770605
770747
  const attention = customStatusError ?? taskAttention;
770606
770748
  const terminalSize = React133.useContext(TerminalSizeContext);
770607
770749
  const defaultStatusLineText = buildDefaultStatusBar({
770608
- version: "1.80.3",
770750
+ version: "1.80.4",
770609
770751
  providerLabel: providerRuntime.providerLabel,
770610
770752
  authMode: providerRuntime.authLabel,
770611
770753
  model: renderModelName(mainLoopModel) || providerRuntime.model || "",
@@ -782860,7 +783002,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
782860
783002
  } catch {}
782861
783003
  const data = {
782862
783004
  trigger: trigger2,
782863
- version: "1.80.3",
783005
+ version: "1.80.4",
782864
783006
  platform: process.platform,
782865
783007
  transcript,
782866
783008
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -795229,7 +795371,7 @@ function WelcomeV2() {
795229
795371
  dimColor: true,
795230
795372
  children: [
795231
795373
  "v",
795232
- "1.80.3"
795374
+ "1.80.4"
795233
795375
  ]
795234
795376
  }, undefined, true, undefined, this)
795235
795377
  ]
@@ -796489,7 +796631,7 @@ function completeOnboarding() {
796489
796631
  saveGlobalConfig((current) => ({
796490
796632
  ...current,
796491
796633
  hasCompletedOnboarding: true,
796492
- lastOnboardingVersion: "1.80.3"
796634
+ lastOnboardingVersion: "1.80.4"
796493
796635
  }));
796494
796636
  }
796495
796637
  function showDialog(root2, renderer) {
@@ -801635,7 +801777,7 @@ function appendToLog(path28, message) {
801635
801777
  cwd: getFsImplementation().cwd(),
801636
801778
  userType: process.env.USER_TYPE,
801637
801779
  sessionId: getSessionId(),
801638
- version: "1.80.3"
801780
+ version: "1.80.4"
801639
801781
  };
801640
801782
  getLogWriter(path28).write(messageWithTimestamp);
801641
801783
  }
@@ -805799,8 +805941,8 @@ async function getEnvLessBridgeConfig() {
805799
805941
  }
805800
805942
  async function checkEnvLessBridgeMinVersion() {
805801
805943
  const cfg = await getEnvLessBridgeConfig();
805802
- if (cfg.min_version && lt("1.80.3", cfg.min_version)) {
805803
- return `Your version of UR (${"1.80.3"}) is too old for Remote Control.
805944
+ if (cfg.min_version && lt("1.80.4", cfg.min_version)) {
805945
+ return `Your version of UR (${"1.80.4"}) is too old for Remote Control.
805804
805946
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
805805
805947
  }
805806
805948
  return null;
@@ -806274,7 +806416,7 @@ async function initBridgeCore(params) {
806274
806416
  const rawApi = createBridgeApiClient({
806275
806417
  baseUrl,
806276
806418
  getAccessToken,
806277
- runnerVersion: "1.80.3",
806419
+ runnerVersion: "1.80.4",
806278
806420
  onDebug: logForDebugging,
806279
806421
  onAuth401,
806280
806422
  getTrustedDeviceToken
@@ -815747,7 +815889,7 @@ function getAgUiCapabilities() {
815747
815889
  name: "UR-Nexus",
815748
815890
  type: "ur-nexus",
815749
815891
  description: "Provider-flexible, local-first autonomous engineering workflow agent.",
815750
- version: "1.80.3",
815892
+ version: "1.80.4",
815751
815893
  provider: "UR",
815752
815894
  documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
815753
815895
  },
@@ -816184,6 +816326,102 @@ var init_agUi3 = __esm(() => {
816184
816326
  init_errors();
816185
816327
  });
816186
816328
 
816329
+ // src/cli/handlers/session.ts
816330
+ var exports_session2 = {};
816331
+ __export(exports_session2, {
816332
+ sessionStatusHandler: () => sessionStatusHandler,
816333
+ selectCliSessionStatus: () => selectCliSessionStatus
816334
+ });
816335
+ import { writeSync as writeSync6 } from "fs";
816336
+ import { join as join261, resolve as resolve79 } from "path";
816337
+ function activeStatus(log2) {
816338
+ const sessionId = getSessionIdFromLog(log2);
816339
+ if (!sessionId || !log2.projectPath || !log2.fullPath)
816340
+ return;
816341
+ return {
816342
+ sessionId,
816343
+ status: "resumable",
816344
+ title: log2.customTitle || log2.summary || log2.firstPrompt || null,
816345
+ projectPath: log2.projectPath,
816346
+ storagePath: null,
816347
+ transcriptPath: log2.fullPath,
816348
+ createdAt: log2.created.toISOString(),
816349
+ modifiedAt: log2.modified.toISOString(),
816350
+ archivedAt: null
816351
+ };
816352
+ }
816353
+ function archivedStatus(session2) {
816354
+ return {
816355
+ sessionId: session2.sessionId,
816356
+ status: "archived",
816357
+ title: null,
816358
+ projectPath: null,
816359
+ storagePath: join261(session2.projectDir, ".session-archive", session2.sessionId),
816360
+ transcriptPath: join261(session2.projectDir, ".session-archive", session2.sessionId, "transcript.jsonl"),
816361
+ createdAt: null,
816362
+ modifiedAt: null,
816363
+ archivedAt: session2.archivedAt
816364
+ };
816365
+ }
816366
+ function selectCliSessionStatus(active3, archived, sessionId, cwd4) {
816367
+ if (sessionId) {
816368
+ const activeMatch = active3.find((log2) => getSessionIdFromLog(log2) === sessionId);
816369
+ if (activeMatch)
816370
+ return activeStatus(activeMatch);
816371
+ const archivedMatch = archived.find((item) => item.sessionId === sessionId);
816372
+ return archivedMatch ? archivedStatus(archivedMatch) : undefined;
816373
+ }
816374
+ const projectRoot2 = resolve79(cwd4);
816375
+ const latest = active3.find((log2) => log2.projectPath && resolve79(log2.projectPath) === projectRoot2);
816376
+ return latest ? activeStatus(latest) : undefined;
816377
+ }
816378
+ function writeOutput(text2) {
816379
+ writeSync6(1, text2.endsWith(`
816380
+ `) ? text2 : `${text2}
816381
+ `);
816382
+ }
816383
+ function writeError(text2) {
816384
+ writeSync6(2, text2.endsWith(`
816385
+ `) ? text2 : `${text2}
816386
+ `);
816387
+ }
816388
+ function formatSessionStatus(status2) {
816389
+ const lines = [
816390
+ `Session: ${status2.sessionId}`,
816391
+ `Status: ${status2.status}`
816392
+ ];
816393
+ if (status2.projectPath)
816394
+ lines.push(`Project: ${status2.projectPath}`);
816395
+ if (status2.storagePath)
816396
+ lines.push(`Archive storage: ${status2.storagePath}`);
816397
+ lines.push(`Transcript: ${status2.transcriptPath}`);
816398
+ if (status2.title)
816399
+ lines.push(`Title: ${status2.title.replace(/\s+/gu, " ").slice(0, 120)}`);
816400
+ if (status2.modifiedAt)
816401
+ lines.push(`Last updated: ${status2.modifiedAt}`);
816402
+ if (status2.archivedAt)
816403
+ lines.push(`Archived: ${status2.archivedAt}`);
816404
+ return lines.join(`
816405
+ `);
816406
+ }
816407
+ async function sessionStatusHandler(sessionId, options5 = {}) {
816408
+ const [active3, archived] = await Promise.all([
816409
+ loadAllProjectsMessageLogs(),
816410
+ listArchivedSessions()
816411
+ ]);
816412
+ const status2 = selectCliSessionStatus(active3, archived, sessionId, process.cwd());
816413
+ if (!status2) {
816414
+ writeError(sessionId ? `Session ${sessionId} was not found.` : 'No resumable session was found for the current project. Run "ur session list" to inspect all sessions.');
816415
+ process.exit(1);
816416
+ }
816417
+ writeOutput(options5.json ? JSON.stringify(status2, null, 2) : formatSessionStatus(status2));
816418
+ process.exit(0);
816419
+ }
816420
+ var init_session3 = __esm(() => {
816421
+ init_sessionArchive();
816422
+ init_sessionStorage();
816423
+ });
816424
+
816187
816425
  // src/components/MCPServerDesktopImportDialog.tsx
816188
816426
  function MCPServerDesktopImportDialog(t0) {
816189
816427
  const $2 = import_compiler_runtime359.c(36);
@@ -816878,7 +817116,7 @@ function createMCPServer(cwd4, debug2, verbose) {
816878
817116
  };
816879
817117
  const server2 = new Server({
816880
817118
  name: "ur-nexus",
816881
- version: "1.80.3"
817119
+ version: "1.80.4"
816882
817120
  }, {
816883
817121
  capabilities: {
816884
817122
  tools: {}
@@ -817038,7 +817276,7 @@ import {
817038
817276
  unlinkSync as unlinkSync17,
817039
817277
  writeFileSync as writeFileSync75
817040
817278
  } from "fs";
817041
- import { join as join261 } from "path";
817279
+ import { join as join262 } from "path";
817042
817280
  function isRecord8(value2) {
817043
817281
  return Boolean(value2) && typeof value2 === "object" && !Array.isArray(value2);
817044
817282
  }
@@ -817071,7 +817309,7 @@ function isTask2(value2) {
817071
817309
  return typeof value2.taskId === "string" && ["working", "input_required", "completed", "failed", "cancelled"].includes(String(value2.status)) && typeof value2.createdAt === "string" && typeof value2.lastUpdatedAt === "string" && Number.isFinite(createdAt) && Number.isFinite(lastUpdatedAt) && (value2.ttlMs === null || typeof value2.ttlMs === "number" && Number.isSafeInteger(value2.ttlMs) && value2.ttlMs >= 0);
817072
817310
  }
817073
817311
  function taskManifestPath(cwd4) {
817074
- return join261(cwd4, ".ur", "mcp-2026", "tasks.json");
817312
+ return join262(cwd4, ".ur", "mcp-2026", "tasks.json");
817075
817313
  }
817076
817314
  function quarantineTaskManifest(path28) {
817077
817315
  const destination = `${path28}.corrupt.${new Date().toISOString().replaceAll(/[:.]/g, "-")}.${randomUUID96()}`;
@@ -817085,8 +817323,8 @@ function assertNotSymlink(path28) {
817085
817323
  }
817086
817324
  }
817087
817325
  function prepareTaskDirectory(cwd4) {
817088
- const urDir = join261(cwd4, ".ur");
817089
- const mcpDir = join261(urDir, "mcp-2026");
817326
+ const urDir = join262(cwd4, ".ur");
817327
+ const mcpDir = join262(urDir, "mcp-2026");
817090
817328
  assertNotSymlink(urDir);
817091
817329
  mkdirSync73(urDir, { recursive: true, mode: 448 });
817092
817330
  assertNotSymlink(urDir);
@@ -817214,8 +817452,8 @@ class DurableMcp2026TaskStore {
817214
817452
  async#mutate(operation) {
817215
817453
  const previous = this.#mutationTail;
817216
817454
  let release4;
817217
- this.#mutationTail = new Promise((resolve79) => {
817218
- release4 = resolve79;
817455
+ this.#mutationTail = new Promise((resolve80) => {
817456
+ release4 = resolve80;
817219
817457
  });
817220
817458
  await previous;
817221
817459
  try {
@@ -818082,7 +818320,7 @@ function thrownResponse(error40) {
818082
818320
  }
818083
818321
  async function createUrMcp2026Runtime(options5) {
818084
818322
  const server2 = createMCPServer(options5.cwd, options5.debug === true, options5.verbose === true);
818085
- const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.3" }, { capabilities: {} });
818323
+ const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.4" }, { capabilities: {} });
818086
818324
  const [clientTransport, serverTransport] = createLinkedTransportPair();
818087
818325
  try {
818088
818326
  await server2.connect(serverTransport);
@@ -818093,7 +818331,7 @@ async function createUrMcp2026Runtime(options5) {
818093
818331
  }
818094
818332
  const runtime2 = new Mcp2026Runtime({
818095
818333
  cwd: options5.cwd,
818096
- version: "1.80.3",
818334
+ version: "1.80.4",
818097
818335
  backend: {
818098
818336
  listTools: async () => {
818099
818337
  const listed = await client2.listTools();
@@ -818249,10 +818487,10 @@ async function serveMcp2026(options5) {
818249
818487
  fetch: handler
818250
818488
  });
818251
818489
  console.log(`MCP ${MCP_2026_PROTOCOL_VERSION} server listening on http://${options5.host}:${server2.port}/mcp`);
818252
- await new Promise((resolve79) => {
818253
- shutdown = resolve79;
818490
+ await new Promise((resolve80) => {
818491
+ shutdown = resolve80;
818254
818492
  for (const signal of signals2)
818255
- process.once(signal, resolve79);
818493
+ process.once(signal, resolve80);
818256
818494
  });
818257
818495
  } finally {
818258
818496
  if (shutdown) {
@@ -818280,14 +818518,14 @@ __export(exports_urDesktop, {
818280
818518
  });
818281
818519
  import { readdir as readdir34, readFile as readFile60, stat as stat54 } from "fs/promises";
818282
818520
  import { homedir as homedir45 } from "os";
818283
- import { join as join262 } from "path";
818521
+ import { join as join263 } from "path";
818284
818522
  async function getURDesktopConfigPath() {
818285
818523
  const platform7 = getPlatform();
818286
818524
  if (!SUPPORTED_PLATFORMS.includes(platform7)) {
818287
818525
  throw new Error(`Unsupported platform: ${platform7} - UR Desktop integration only works on macOS and WSL.`);
818288
818526
  }
818289
818527
  if (platform7 === "macos") {
818290
- return join262(homedir45(), "Library", "Application Support", "UR", "ur_desktop_config.json");
818528
+ return join263(homedir45(), "Library", "Application Support", "UR", "ur_desktop_config.json");
818291
818529
  }
818292
818530
  const windowsHome = process.env.USERPROFILE ? process.env.USERPROFILE.replace(/\\/g, "/") : null;
818293
818531
  if (windowsHome) {
@@ -818306,7 +818544,7 @@ async function getURDesktopConfigPath() {
818306
818544
  if (user.name === "Public" || user.name === "Default" || user.name === "Default User" || user.name === "All Users") {
818307
818545
  continue;
818308
818546
  }
818309
- const potentialConfigPath = join262(usersDir, user.name, "AppData", "Roaming", "UR", "ur_desktop_config.json");
818547
+ const potentialConfigPath = join263(usersDir, user.name, "AppData", "Roaming", "UR", "ur_desktop_config.json");
818310
818548
  try {
818311
818549
  await stat54(potentialConfigPath);
818312
818550
  return potentialConfigPath;
@@ -818732,29 +818970,30 @@ __export(exports_providers, {
818732
818970
  providerModelsHandler: () => providerModelsHandler,
818733
818971
  providerListHandler: () => providerListHandler,
818734
818972
  providerDoctorHandler: () => providerDoctorHandler,
818973
+ providerConfigSetHandler: () => providerConfigSetHandler,
818735
818974
  providerAuthHandler: () => providerAuthHandler,
818736
- configSetHandler: () => configSetHandler
818975
+ PROVIDER_CONFIG_KEYS: () => PROVIDER_CONFIG_KEYS
818737
818976
  });
818738
- import { writeSync as writeSync6 } from "fs";
818739
- function writeOutput(text2) {
818740
- writeSync6(1, text2.endsWith(`
818977
+ import { writeSync as writeSync7 } from "fs";
818978
+ function writeOutput2(text2) {
818979
+ writeSync7(1, text2.endsWith(`
818741
818980
  `) ? text2 : `${text2}
818742
818981
  `);
818743
818982
  }
818744
- function writeError(text2) {
818745
- writeSync6(2, text2.endsWith(`
818983
+ function writeError2(text2) {
818984
+ writeSync7(2, text2.endsWith(`
818746
818985
  `) ? text2 : `${text2}
818747
818986
  `);
818748
818987
  }
818749
818988
  async function providerListHandler(options5 = {}) {
818750
- writeOutput(formatProviderList(Boolean(options5.json)));
818989
+ writeOutput2(formatProviderList(Boolean(options5.json)));
818751
818990
  process.exit(0);
818752
818991
  }
818753
818992
  async function providerStatusHandler(options5 = {}) {
818754
818993
  const settings = getInitialSettings();
818755
818994
  const active3 = getActiveProviderSettings(settings).active ?? "ollama";
818756
818995
  const result = await doctorProvider(active3, { settings });
818757
- writeOutput(formatProviderStatus(result, Boolean(options5.json)));
818996
+ writeOutput2(formatProviderStatus(result, Boolean(options5.json)));
818758
818997
  process.exit(result.ok ? 0 : 1);
818759
818998
  }
818760
818999
  async function providerDoctorHandler(providerArg, options5 = {}) {
@@ -818762,7 +819001,7 @@ async function providerDoctorHandler(providerArg, options5 = {}) {
818762
819001
  if (providerArg) {
818763
819002
  const resolved = resolveProviderId(providerArg);
818764
819003
  if (!resolved) {
818765
- writeError(`Unknown provider "${providerArg}". Run: ur provider list`);
819004
+ writeError2(`Unknown provider "${providerArg}". Run: ur provider list`);
818766
819005
  process.exit(1);
818767
819006
  }
818768
819007
  provider = resolved;
@@ -818770,7 +819009,7 @@ async function providerDoctorHandler(providerArg, options5 = {}) {
818770
819009
  const settings = getInitialSettings();
818771
819010
  const active3 = getActiveProviderSettings(settings).active ?? "ollama";
818772
819011
  const result = await doctorProvider(provider ?? active3, { settings });
818773
- writeOutput(formatProviderDoctor(result, Boolean(options5.json)));
819012
+ writeOutput2(formatProviderDoctor(result, Boolean(options5.json)));
818774
819013
  process.exit(result.ok ? 0 : 1);
818775
819014
  }
818776
819015
  async function providerModelsHandler(providerArg, options5 = {}) {
@@ -818778,7 +819017,7 @@ async function providerModelsHandler(providerArg, options5 = {}) {
818778
819017
  const active3 = getActiveProviderSettings(settings).active ?? "ollama";
818779
819018
  const provider = providerArg ? resolveProviderId(providerArg) : active3;
818780
819019
  if (!provider) {
818781
- writeError(`Unknown provider "${providerArg}". Run: ur provider list`);
819020
+ writeError2(`Unknown provider "${providerArg}". Run: ur provider list`);
818782
819021
  process.exit(1);
818783
819022
  }
818784
819023
  const result = await listModelsForProviderWithSource(provider, { settings });
@@ -818791,10 +819030,10 @@ async function providerModelsHandler(providerArg, options5 = {}) {
818791
819030
  models: result.models
818792
819031
  };
818793
819032
  if (options5.json) {
818794
- writeOutput(JSON.stringify(payload, null, 2));
819033
+ writeOutput2(JSON.stringify(payload, null, 2));
818795
819034
  } else {
818796
819035
  const warning = result.warning ? [`Warning: ${result.warning}`] : [];
818797
- writeOutput([
819036
+ writeOutput2([
818798
819037
  `Provider: ${definition.displayName} (${provider})`,
818799
819038
  `Model source: ${result.source}`,
818800
819039
  ...warning,
@@ -818810,9 +819049,9 @@ async function providerSelectModelHandler(providerArg, values2, options5 = {}) {
818810
819049
  if (!provider) {
818811
819050
  const message = `Unknown provider "${providerArg}". Run: ur provider list`;
818812
819051
  if (options5.json)
818813
- writeOutput(JSON.stringify({ ok: false, message }, null, 2));
819052
+ writeOutput2(JSON.stringify({ ok: false, message }, null, 2));
818814
819053
  else
818815
- writeError(message);
819054
+ writeError2(message);
818816
819055
  process.exit(1);
818817
819056
  }
818818
819057
  const settings = getInitialSettings();
@@ -818822,16 +819061,16 @@ async function providerSelectModelHandler(providerArg, values2, options5 = {}) {
818822
819061
  modelSource: discovered.source
818823
819062
  });
818824
819063
  if (options5.json) {
818825
- writeOutput(JSON.stringify({
819064
+ writeOutput2(JSON.stringify({
818826
819065
  ...result,
818827
819066
  warning: discovered.warning
818828
819067
  }, null, 2));
818829
819068
  } else if (result.ok) {
818830
- writeOutput(result.message);
819069
+ writeOutput2(result.message);
818831
819070
  if (discovered.warning)
818832
- writeError(`Warning: ${discovered.warning}`);
819071
+ writeError2(`Warning: ${discovered.warning}`);
818833
819072
  } else {
818834
- writeError(result.message);
819073
+ writeError2(result.message);
818835
819074
  }
818836
819075
  process.exit(result.ok ? 0 : 1);
818837
819076
  }
@@ -818841,18 +819080,18 @@ async function providerAuthHandler(alias2, options5 = {}) {
818841
819080
  dryRun: options5.dryRun
818842
819081
  });
818843
819082
  if (options5.json) {
818844
- writeOutput(JSON.stringify(result, null, 2));
819083
+ writeOutput2(JSON.stringify(result, null, 2));
818845
819084
  } else if (result.ok) {
818846
- writeOutput(result.message);
819085
+ writeOutput2(result.message);
818847
819086
  } else {
818848
- writeError(result.message);
819087
+ writeError2(result.message);
818849
819088
  }
818850
819089
  process.exit(result.ok ? 0 : 1);
818851
819090
  }
818852
- async function configSetHandler(key, values2) {
819091
+ async function providerConfigSetHandler(key, values2) {
818853
819092
  const value2 = Array.isArray(values2) ? values2.join(" ") : values2;
818854
- if (key !== "provider" && key !== "provider.fallback" && key !== "provider.command_path" && key !== "openai_transport" && key !== "responses.store" && key !== "responses.compact_threshold" && key !== "responses.tool_search" && key !== "model" && key !== "base_url") {
818855
- writeError(`Unsupported config key "${key}". Supported: provider, provider.fallback, provider.command_path, openai_transport, responses.store, responses.compact_threshold, responses.tool_search, model, base_url`);
819093
+ if (!PROVIDER_CONFIG_KEYS.includes(key)) {
819094
+ writeError2(`Unsupported provider config key "${key}". Supported: ${PROVIDER_CONFIG_KEYS.join(", ")}`);
818856
819095
  process.exit(1);
818857
819096
  }
818858
819097
  if (key === "model") {
@@ -818864,7 +819103,7 @@ async function configSetHandler(key, values2) {
818864
819103
  settings
818865
819104
  });
818866
819105
  if (validation.valid === false) {
818867
- writeError(`Invalid model for current provider:
819106
+ writeError2(`Invalid model for current provider:
818868
819107
  Selected provider: ${currentProvider}
818869
819108
  Selected model: ${value2}
818870
819109
  Valid models for ${currentProvider}: ${validation.validModels.join(", ") || "(no models discovered)"}
@@ -818887,7 +819126,7 @@ async function configSetHandler(key, values2) {
818887
819126
  if (validation.valid === false) {
818888
819127
  const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
818889
819128
  const suggestedModel = validation.suggestedModel ?? "<model-name>";
818890
- writeError(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}" and will be cleared.
819129
+ writeError2(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}" and will be cleared.
818891
819130
  Valid models for ${newProvider}: ${validModelsStr}
818892
819131
  After changing provider, run /model or: ur config set model ${suggestedModel}`);
818893
819132
  }
@@ -818896,15 +819135,147 @@ async function configSetHandler(key, values2) {
818896
819135
  }
818897
819136
  const result = setSafeProviderConfig(key, value2);
818898
819137
  if (result.ok) {
818899
- writeOutput(result.message);
819138
+ writeOutput2(result.message);
818900
819139
  process.exit(0);
818901
819140
  }
818902
- writeError(result.message);
819141
+ writeError2(result.message);
818903
819142
  process.exit(1);
818904
819143
  }
819144
+ var PROVIDER_CONFIG_KEYS;
818905
819145
  var init_providers2 = __esm(() => {
818906
819146
  init_providerRegistry();
818907
819147
  init_settings2();
819148
+ PROVIDER_CONFIG_KEYS = [
819149
+ "provider",
819150
+ "provider.fallback",
819151
+ "provider.command_path",
819152
+ "openai_transport",
819153
+ "responses.store",
819154
+ "responses.compact_threshold",
819155
+ "responses.tool_search",
819156
+ "model",
819157
+ "base_url"
819158
+ ];
819159
+ });
819160
+
819161
+ // src/cli/handlers/config.ts
819162
+ var exports_config3 = {};
819163
+ __export(exports_config3, {
819164
+ listCliConfigEntries: () => listCliConfigEntries,
819165
+ configSetHandler: () => configSetHandler,
819166
+ configListHandler: () => configListHandler,
819167
+ configGetHandler: () => configGetHandler
819168
+ });
819169
+ import { writeSync as writeSync8 } from "fs";
819170
+ function writeOutput3(text2) {
819171
+ writeSync8(1, text2.endsWith(`
819172
+ `) ? text2 : `${text2}
819173
+ `);
819174
+ }
819175
+ function writeError3(text2) {
819176
+ writeSync8(2, text2.endsWith(`
819177
+ `) ? text2 : `${text2}
819178
+ `);
819179
+ }
819180
+ function providerConfigEntries() {
819181
+ const settings = getInitialSettings();
819182
+ const active3 = getActiveProviderSettings(settings);
819183
+ const configured = settings.provider ?? {};
819184
+ return [
819185
+ { key: "provider", value: active3.active ?? "ollama", category: "provider" },
819186
+ {
819187
+ key: "provider.fallback",
819188
+ value: active3.fallback ?? null,
819189
+ category: "provider"
819190
+ },
819191
+ {
819192
+ key: "provider.command_path",
819193
+ value: active3.commandPath ?? null,
819194
+ category: "provider"
819195
+ },
819196
+ {
819197
+ key: "openai_transport",
819198
+ value: configured.openaiTransport ?? null,
819199
+ category: "provider"
819200
+ },
819201
+ {
819202
+ key: "responses.store",
819203
+ value: configured.responses?.store ?? null,
819204
+ category: "provider"
819205
+ },
819206
+ {
819207
+ key: "responses.compact_threshold",
819208
+ value: configured.responses?.compactThreshold ?? null,
819209
+ category: "provider"
819210
+ },
819211
+ {
819212
+ key: "responses.tool_search",
819213
+ value: configured.responses?.toolSearch ?? null,
819214
+ category: "provider"
819215
+ },
819216
+ { key: "model", value: active3.model ?? null, category: "provider" },
819217
+ { key: "base_url", value: active3.baseUrl ?? null, category: "provider" }
819218
+ ];
819219
+ }
819220
+ function listCliConfigEntries() {
819221
+ return [
819222
+ ...getConfigAssignmentValues().map((entry) => ({
819223
+ ...entry,
819224
+ category: "agent"
819225
+ })),
819226
+ ...providerConfigEntries()
819227
+ ];
819228
+ }
819229
+ function textValue(value2) {
819230
+ return value2 === null ? "(not set)" : String(value2);
819231
+ }
819232
+ function findEntry(key) {
819233
+ const assignmentKey = resolveConfigAssignmentKey(key);
819234
+ const canonical = assignmentKey ?? key.toLowerCase();
819235
+ return listCliConfigEntries().find((entry) => entry.key === canonical);
819236
+ }
819237
+ async function configSetHandler(key, values2) {
819238
+ const value2 = Array.isArray(values2) ? values2.join(" ") : values2;
819239
+ if (resolveConfigAssignmentKey(key)) {
819240
+ const parsed = parseConfigAssignments(`${key}=${value2}`);
819241
+ if (parsed.error) {
819242
+ writeError3(parsed.error);
819243
+ process.exit(1);
819244
+ }
819245
+ const result = applyConfigAssignments(parsed.assignments);
819246
+ if (result.error) {
819247
+ writeError3(result.error);
819248
+ process.exit(1);
819249
+ }
819250
+ writeOutput3(`Updated ${result.applied.join(", ")}.`);
819251
+ process.exit(0);
819252
+ }
819253
+ if (!PROVIDER_CONFIG_KEYS.includes(key)) {
819254
+ writeError3(`Unsupported config key "${key}". Run "ur config list" to see supported settings.`);
819255
+ process.exit(1);
819256
+ }
819257
+ await providerConfigSetHandler(key, value2);
819258
+ }
819259
+ function configGetHandler(key, options5 = {}) {
819260
+ const entry = findEntry(key);
819261
+ if (!entry) {
819262
+ writeError3(`Unknown config key "${key}". Run "ur config list" to see supported settings.`);
819263
+ process.exit(1);
819264
+ }
819265
+ writeOutput3(options5.json ? JSON.stringify(entry, null, 2) : `${entry.key}=${textValue(entry.value)}`);
819266
+ process.exit(0);
819267
+ }
819268
+ function configListHandler(options5 = {}) {
819269
+ const entries = listCliConfigEntries();
819270
+ writeOutput3(options5.json ? JSON.stringify(entries, null, 2) : entries.map((entry) => `${entry.key}=${textValue(entry.value)}`).join(`
819271
+ `));
819272
+ process.exit(0);
819273
+ }
819274
+ var init_config11 = __esm(() => {
819275
+ init_configAssignments();
819276
+ init_providerRegistry();
819277
+ init_settings2();
819278
+ init_providers2();
818908
819279
  });
818909
819280
 
818910
819281
  // src/utils/plugins/pluginDiscovery.ts
@@ -819267,9 +819638,9 @@ var init_pluginDiscovery = __esm(() => {
819267
819638
 
819268
819639
  // src/utils/plugins/pluginDoctor.ts
819269
819640
  import { existsSync as existsSync105, readdirSync as readdirSync42, readFileSync as readFileSync95, statSync as statSync39 } from "fs";
819270
- import { basename as basename68, join as join263 } from "path";
819641
+ import { basename as basename68, join as join264 } from "path";
819271
819642
  function manifestPathFor3(dir) {
819272
- const p2 = join263(dir, ".ur-plugin", "plugin.json");
819643
+ const p2 = join264(dir, ".ur-plugin", "plugin.json");
819273
819644
  return existsSync105(p2) ? p2 : null;
819274
819645
  }
819275
819646
  function discoverPluginDirs(roots) {
@@ -819295,7 +819666,7 @@ function discoverPluginDirs(roots) {
819295
819666
  continue;
819296
819667
  }
819297
819668
  for (const entry of entries) {
819298
- const full = join263(root2, entry);
819669
+ const full = join264(root2, entry);
819299
819670
  try {
819300
819671
  if (statSync39(full).isDirectory() && manifestPathFor3(full))
819301
819672
  add(full);
@@ -819428,7 +819799,7 @@ __export(exports_plugins, {
819428
819799
  VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
819429
819800
  VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
819430
819801
  });
819431
- import { basename as basename69, dirname as dirname103, join as join264, resolve as resolve79 } from "path";
819802
+ import { basename as basename69, dirname as dirname103, join as join265, resolve as resolve80 } from "path";
819432
819803
  function handleMarketplaceError(error40, action3) {
819433
819804
  logError2(error40);
819434
819805
  cliError(`${figures_default.cross} Failed to ${action3}: ${errorMessage2(error40)}`);
@@ -819509,8 +819880,8 @@ function printValidationResult(result) {
819509
819880
  async function pluginDoctorHandler(options5) {
819510
819881
  const roots = [];
819511
819882
  if (options5.path)
819512
- roots.push(resolve79(options5.path));
819513
- roots.push(join264(process.cwd(), ".ur", "plugins"));
819883
+ roots.push(resolve80(options5.path));
819884
+ roots.push(join265(process.cwd(), ".ur", "plugins"));
819514
819885
  try {
819515
819886
  const data = loadInstalledPluginsV2();
819516
819887
  for (const installations of Object.values(data.plugins ?? {})) {
@@ -820059,12 +820430,12 @@ __export(exports_install, {
820059
820430
  install: () => install
820060
820431
  });
820061
820432
  import { homedir as homedir46 } from "os";
820062
- import { join as join265 } from "path";
820433
+ import { join as join266 } from "path";
820063
820434
  function getInstallationPath2() {
820064
820435
  const isWindows2 = env2.platform === "win32";
820065
820436
  const homeDir = homedir46();
820066
820437
  if (isWindows2) {
820067
- const windowsPath = join265(homeDir, ".local", "bin", "ur.exe");
820438
+ const windowsPath = join266(homeDir, ".local", "bin", "ur.exe");
820068
820439
  return windowsPath.replace(/\//g, "\\");
820069
820440
  }
820070
820441
  return "~/.local/bin/ur";
@@ -820425,7 +820796,7 @@ async function setupTokenHandler(root2) {
820425
820796
  const {
820426
820797
  ConsoleOAuthFlow: ConsoleOAuthFlow2
820427
820798
  } = await Promise.resolve().then(() => (init_ConsoleOAuthFlow(), exports_ConsoleOAuthFlow));
820428
- await new Promise((resolve80) => {
820799
+ await new Promise((resolve81) => {
820429
820800
  root2.render(/* @__PURE__ */ jsx_dev_runtime483.jsxDEV(AppStateProvider, {
820430
820801
  onChangeAppState,
820431
820802
  children: /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(KeybindingSetup, {
@@ -820449,7 +820820,7 @@ async function setupTokenHandler(root2) {
820449
820820
  }, undefined, true, undefined, this),
820450
820821
  /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(ConsoleOAuthFlow2, {
820451
820822
  onDone: () => {
820452
- resolve80();
820823
+ resolve81();
820453
820824
  },
820454
820825
  mode: "setup-token",
820455
820826
  startingMessage: "This will guide you through long-lived (1-year) auth token setup for your UR account. UR subscription required."
@@ -820485,7 +820856,7 @@ function DoctorWithPlugins(t0) {
820485
820856
  }
820486
820857
  async function doctorHandler(root2) {
820487
820858
  logEvent("tengu_doctor_command", {});
820488
- await new Promise((resolve80) => {
820859
+ await new Promise((resolve81) => {
820489
820860
  root2.render(/* @__PURE__ */ jsx_dev_runtime483.jsxDEV(AppStateProvider, {
820490
820861
  children: /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(KeybindingSetup, {
820491
820862
  children: /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(MCPConnectionManager, {
@@ -820493,7 +820864,7 @@ async function doctorHandler(root2) {
820493
820864
  isStrictMcpConfig: false,
820494
820865
  children: /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(DoctorWithPlugins, {
820495
820866
  onDone: () => {
820496
- resolve80();
820867
+ resolve81();
820497
820868
  }
820498
820869
  }, undefined, false, undefined, this)
820499
820870
  }, undefined, false, undefined, this)
@@ -820511,14 +820882,14 @@ async function installHandler(target, options5) {
820511
820882
  const {
820512
820883
  install: install2
820513
820884
  } = await Promise.resolve().then(() => (init_install(), exports_install));
820514
- await new Promise((resolve80) => {
820885
+ await new Promise((resolve81) => {
820515
820886
  const args = [];
820516
820887
  if (target)
820517
820888
  args.push(target);
820518
820889
  if (options5.force)
820519
820890
  args.push("--force");
820520
820891
  install2.call((result) => {
820521
- resolve80();
820892
+ resolve81();
820522
820893
  process.exit(result.includes("failed") ? 1 : 0);
820523
820894
  }, {}, args);
820524
820895
  });
@@ -820695,7 +821066,7 @@ async function update() {
820695
821066
  logEvent("tengu_update_check", {});
820696
821067
  const diagnostic2 = await getDoctorDiagnostic();
820697
821068
  const result = await checkUpgradeStatus({
820698
- currentVersion: "1.80.3",
821069
+ currentVersion: "1.80.4",
820699
821070
  packageName: UR_AGENT_PACKAGE_NAME,
820700
821071
  installationType: diagnostic2.installationType,
820701
821072
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -820723,7 +821094,7 @@ __export(exports_main, {
820723
821094
  main: () => main
820724
821095
  });
820725
821096
  import { readFileSync as readFileSync96 } from "fs";
820726
- import { resolve as resolve80 } from "path";
821097
+ import { resolve as resolve81 } from "path";
820727
821098
  function logManagedSettings() {
820728
821099
  try {
820729
821100
  const policySettings = getSettingsForSource("policySettings");
@@ -821302,12 +821673,12 @@ ${getTmuxInstallInstructions2()}
821302
821673
  process.exit(1);
821303
821674
  }
821304
821675
  try {
821305
- const filePath = resolve80(options5.systemPromptFile);
821676
+ const filePath = resolve81(options5.systemPromptFile);
821306
821677
  systemPrompt = readFileSync96(filePath, "utf8");
821307
821678
  } catch (error40) {
821308
821679
  const code = getErrnoCode(error40);
821309
821680
  if (code === "ENOENT") {
821310
- process.stderr.write(source_default.red(`Error: System prompt file not found: ${resolve80(options5.systemPromptFile)}
821681
+ process.stderr.write(source_default.red(`Error: System prompt file not found: ${resolve81(options5.systemPromptFile)}
821311
821682
  `));
821312
821683
  process.exit(1);
821313
821684
  }
@@ -821324,12 +821695,12 @@ ${getTmuxInstallInstructions2()}
821324
821695
  process.exit(1);
821325
821696
  }
821326
821697
  try {
821327
- const filePath = resolve80(options5.appendSystemPromptFile);
821698
+ const filePath = resolve81(options5.appendSystemPromptFile);
821328
821699
  appendSystemPrompt = readFileSync96(filePath, "utf8");
821329
821700
  } catch (error40) {
821330
821701
  const code = getErrnoCode(error40);
821331
821702
  if (code === "ENOENT") {
821332
- process.stderr.write(source_default.red(`Error: Append system prompt file not found: ${resolve80(options5.appendSystemPromptFile)}
821703
+ process.stderr.write(source_default.red(`Error: Append system prompt file not found: ${resolve81(options5.appendSystemPromptFile)}
821333
821704
  `));
821334
821705
  process.exit(1);
821335
821706
  }
@@ -821375,7 +821746,7 @@ ${addendum}` : addendum;
821375
821746
  errors4 = result.errors;
821376
821747
  }
821377
821748
  } else {
821378
- const configPath2 = resolve80(configItem);
821749
+ const configPath2 = resolve81(configItem);
821379
821750
  const result = parseMcpConfigFromFilePath({
821380
821751
  filePath: configPath2,
821381
821752
  expandVars: true,
@@ -822023,7 +822394,7 @@ ${customInstructions}` : customInstructions;
822023
822394
  }
822024
822395
  }
822025
822396
  logForDiagnosticsNoPII("info", "started", {
822026
- version: "1.80.3",
822397
+ version: "1.80.4",
822027
822398
  is_native_binary: isInBundledMode()
822028
822399
  });
822029
822400
  registerCleanup(async () => {
@@ -822228,8 +822599,8 @@ ${customInstructions}` : customInstructions;
822228
822599
  return connectMcpBatch(dedupedURAi, "urai");
822229
822600
  });
822230
822601
  let uraiTimer;
822231
- const uraiTimedOut = await Promise.race([uraiConnect.then(() => false), new Promise((resolve81) => {
822232
- uraiTimer = setTimeout((r) => r(true), UR_AI_MCP_TIMEOUT_MS, resolve81);
822602
+ const uraiTimedOut = await Promise.race([uraiConnect.then(() => false), new Promise((resolve82) => {
822603
+ uraiTimer = setTimeout((r) => r(true), UR_AI_MCP_TIMEOUT_MS, resolve82);
822233
822604
  })]);
822234
822605
  if (uraiTimer)
822235
822606
  clearTimeout(uraiTimer);
@@ -822810,7 +823181,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
822810
823181
  pendingHookMessages
822811
823182
  }, renderAndRun);
822812
823183
  }
822813
- }).version("1.80.3 (UR-Nexus)", "-v, --version", "Output the version number");
823184
+ }).version("1.80.4 (UR-Nexus)", "-v, --version", "Output the version number");
822814
823185
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
822815
823186
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
822816
823187
  if (canUserConfigureAdvisor()) {
@@ -822862,7 +823233,13 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
822862
823233
  permissionMode
822863
823234
  });
822864
823235
  });
822865
- const sessionCli = program2.command("session").description("List, archive, and restore local conversation sessions").configureHelp(createSortedHelpConfig());
823236
+ const sessionCli = program2.command("session").description("Inspect, list, archive, and restore local conversation sessions").configureHelp(createSortedHelpConfig());
823237
+ sessionCli.command("status [session-id]").description("Show a session, or the latest resumable session for this project").option("--json", "Output structured JSON").action(async (sessionId, options5) => {
823238
+ const {
823239
+ sessionStatusHandler: sessionStatusHandler2
823240
+ } = await Promise.resolve().then(() => (init_session3(), exports_session2));
823241
+ await sessionStatusHandler2(sessionId, options5);
823242
+ });
822866
823243
  sessionCli.command("list").description("List resumable and archived conversations").option("--json", "Output structured JSON").action(async ({
822867
823244
  json: json2
822868
823245
  }) => {
@@ -823061,12 +823438,24 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
823061
823438
  await providerSelectModelHandler2(providerArg, model, options5);
823062
823439
  });
823063
823440
  const configCmd = program2.command("config").description("Manage safe UR-Nexus settings").configureHelp(createSortedHelpConfig());
823064
- configCmd.command("set <key> <value...>").description("Set a safe non-secret setting: provider, provider.fallback, provider.command_path, model, or base_url").action(async (key, value2) => {
823441
+ configCmd.command("set <key> <value...>").description("Set a validated agent, accessibility, editor, or provider setting").action(async (key, value2) => {
823065
823442
  const {
823066
823443
  configSetHandler: configSetHandler2
823067
- } = await Promise.resolve().then(() => (init_providers2(), exports_providers));
823444
+ } = await Promise.resolve().then(() => (init_config11(), exports_config3));
823068
823445
  await configSetHandler2(key, value2);
823069
823446
  });
823447
+ configCmd.command("get <key>").description("Show one effective safe setting").option("--json", "Output structured JSON").action(async (key, options5) => {
823448
+ const {
823449
+ configGetHandler: configGetHandler2
823450
+ } = await Promise.resolve().then(() => (init_config11(), exports_config3));
823451
+ configGetHandler2(key, options5);
823452
+ });
823453
+ configCmd.command("list").description("List effective safe settings and their current values").option("--json", "Output structured JSON").action(async (options5) => {
823454
+ const {
823455
+ configListHandler: configListHandler2
823456
+ } = await Promise.resolve().then(() => (init_config11(), exports_config3));
823457
+ configListHandler2(options5);
823458
+ });
823070
823459
  program2.command("connect [action] [provider]").description("Connect a provider account: subscription login (Codex, Claude, Gemini) or store an API key").option("--key <key>", "API key to store for an API provider").option("--json", "Output as JSON").action(async (action3, providerArg, opts) => {
823071
823460
  const args = [action3 ? quoteLocalCommandArg(action3) : undefined, providerArg ? quoteLocalCommandArg(providerArg) : undefined, opts.key ? `--key ${quoteLocalCommandArg(opts.key)}` : undefined, opts.json ? "--json" : undefined].filter(Boolean).join(" ");
823072
823461
  await runLocalTextCommand(() => Promise.resolve().then(() => (init_connect(), exports_connect)), args);
@@ -823474,11 +823863,12 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
823474
823863
  await runLocalTextCommand(() => Promise.resolve().then(() => (init_role_mode(), exports_role_mode)), args);
823475
823864
  });
823476
823865
  const a2a = program2.command("a2a").description("Agent-to-Agent interoperability, discovery, and delegation utilities").configureHelp(createSortedHelpConfig());
823477
- a2a.command("card").description("Print an A2A Agent Card preview").option("--base-url <url>", "Base URL to use for the Agent Card endpoint").option("--compact", "Output compact JSON").action(async (opts) => {
823866
+ a2a.command("card").description("Print an A2A Agent Card preview").option("--base-url <url>", "Base URL to use for the Agent Card endpoint").option("--v1", "Print the current A2A 1.0 Agent Card instead of the legacy 0.3 card").option("--compact", "Output compact JSON").action(async (opts) => {
823478
823867
  const {
823479
- formatA2AAgentCard: formatA2AAgentCard2
823868
+ formatA2AAgentCard: formatA2AAgentCard2,
823869
+ formatA2AV1AgentCard: formatA2AV1AgentCard2
823480
823870
  } = await Promise.resolve().then(() => (init_trends(), exports_trends));
823481
- console.log(formatA2AAgentCard2({
823871
+ console.log((opts.v1 ? formatA2AV1AgentCard2 : formatA2AAgentCard2)({
823482
823872
  baseUrl: opts.baseUrl
823483
823873
  }, !opts.compact));
823484
823874
  process.exit(0);
@@ -823918,7 +824308,7 @@ if (false) {}
823918
824308
  async function main2() {
823919
824309
  const args = process.argv.slice(2);
823920
824310
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
823921
- console.log(`${"1.80.3"} (UR-Nexus)`);
824311
+ console.log(`${"1.80.4"} (UR-Nexus)`);
823922
824312
  return;
823923
824313
  }
823924
824314
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {