ur-agent 1.78.7 → 1.78.8

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
@@ -107588,7 +107588,7 @@ var init_auth = __esm(() => {
107588
107588
 
107589
107589
  // src/utils/userAgent.ts
107590
107590
  function getURCodeUserAgent() {
107591
- return `ur/${"1.78.7"}`;
107591
+ return `ur/${"1.78.8"}`;
107592
107592
  }
107593
107593
 
107594
107594
  // src/utils/workloadContext.ts
@@ -107610,7 +107610,7 @@ function getUserAgent() {
107610
107610
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
107611
107611
  const workload = getWorkload();
107612
107612
  const workloadSuffix = workload ? `, workload/${workload}` : "";
107613
- return `ur-cli/${"1.78.7"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107613
+ return `ur-cli/${"1.78.8"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107614
107614
  }
107615
107615
  function getMCPUserAgent() {
107616
107616
  const parts = [];
@@ -107624,7 +107624,7 @@ function getMCPUserAgent() {
107624
107624
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
107625
107625
  }
107626
107626
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
107627
- return `ur/${"1.78.7"}${suffix}`;
107627
+ return `ur/${"1.78.8"}${suffix}`;
107628
107628
  }
107629
107629
  function getWebFetchUserAgent() {
107630
107630
  return `UR-User (${getURCodeUserAgent()})`;
@@ -107762,7 +107762,7 @@ var init_user = __esm(() => {
107762
107762
  deviceId,
107763
107763
  sessionId: getSessionId(),
107764
107764
  email: getEmail(),
107765
- appVersion: "1.78.7",
107765
+ appVersion: "1.78.8",
107766
107766
  platform: getHostPlatformForAnalytics(),
107767
107767
  organizationUuid,
107768
107768
  accountUuid,
@@ -115649,7 +115649,7 @@ var init_metadata = __esm(() => {
115649
115649
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
115650
115650
  WHITESPACE_REGEX = /\s+/;
115651
115651
  getVersionBase = memoize_default(() => {
115652
- const match = "1.78.7".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115652
+ const match = "1.78.8".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115653
115653
  return match ? match[0] : undefined;
115654
115654
  });
115655
115655
  buildEnvContext = memoize_default(async () => {
@@ -115689,7 +115689,7 @@ var init_metadata = __esm(() => {
115689
115689
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
115690
115690
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
115691
115691
  isURAiAuth: isURAISubscriber(),
115692
- version: "1.78.7",
115692
+ version: "1.78.8",
115693
115693
  versionBase: getVersionBase(),
115694
115694
  buildTime: "",
115695
115695
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -116359,7 +116359,7 @@ function initialize1PEventLogging() {
116359
116359
  const platform2 = getPlatform();
116360
116360
  const attributes = {
116361
116361
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
116362
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.78.7"
116362
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.78.8"
116363
116363
  };
116364
116364
  if (platform2 === "wsl") {
116365
116365
  const wslVersion = getWslVersion();
@@ -116387,7 +116387,7 @@ function initialize1PEventLogging() {
116387
116387
  })
116388
116388
  ]
116389
116389
  });
116390
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.78.7");
116390
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.78.8");
116391
116391
  }
116392
116392
  async function reinitialize1PEventLoggingIfConfigChanged() {
116393
116393
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -121433,7 +121433,15 @@ var init_headlessAgent = __esm(() => {
121433
121433
  });
121434
121434
 
121435
121435
  // src/services/agents/learning.ts
121436
- import { existsSync as existsSync8, mkdirSync as mkdirSync8, readFileSync as readFileSync13, writeFileSync as writeFileSync8 } from "fs";
121436
+ import { randomUUID as randomUUID15 } from "crypto";
121437
+ import {
121438
+ existsSync as existsSync8,
121439
+ mkdirSync as mkdirSync8,
121440
+ readFileSync as readFileSync13,
121441
+ renameSync as renameSync5,
121442
+ unlinkSync as unlinkSync3,
121443
+ writeFileSync as writeFileSync8
121444
+ } from "fs";
121437
121445
  import { join as join32 } from "path";
121438
121446
  function emptyStats() {
121439
121447
  return {
@@ -121457,9 +121465,12 @@ function foldOutcomes(stats, outcomes) {
121457
121465
  const next = {
121458
121466
  ...stats,
121459
121467
  seen: [...stats.seen],
121460
- models: { ...stats.models },
121461
- categories: { ...stats.categories },
121462
- modelByCategory: { ...stats.modelByCategory },
121468
+ models: cloneTallies(stats.models),
121469
+ categories: cloneTallies(stats.categories),
121470
+ modelByCategory: Object.fromEntries(Object.entries(stats.modelByCategory).map(([model, categories]) => [
121471
+ model,
121472
+ cloneTallies(categories)
121473
+ ])),
121463
121474
  lessons: [...stats.lessons]
121464
121475
  };
121465
121476
  const seen = new Set(next.seen);
@@ -121478,6 +121489,9 @@ function foldOutcomes(stats, outcomes) {
121478
121489
  next.updatedAt = new Date().toISOString();
121479
121490
  return next;
121480
121491
  }
121492
+ function cloneTallies(record2) {
121493
+ return Object.fromEntries(Object.entries(record2).map(([key, value]) => [key, { ...value }]));
121494
+ }
121481
121495
  function mineArtifacts(artifacts) {
121482
121496
  const outcomes = [];
121483
121497
  for (const artifact of artifacts) {
@@ -121528,17 +121542,27 @@ function categoryFromText(text) {
121528
121542
  function taskDifficultyBias(stats, task) {
121529
121543
  return difficultyBias(stats, categoryFromText(task));
121530
121544
  }
121531
- function bestModelForCategory(stats, category, minSamples = 3) {
121545
+ function bestModelForCategory(stats, category, minSamples = 5) {
121532
121546
  let best = null;
121533
121547
  for (const [model, byCat] of Object.entries(stats.modelByCategory)) {
121534
121548
  const t = byCat[category];
121535
121549
  if (!t || t.pass + t.fail < minSamples)
121536
121550
  continue;
121537
121551
  const r = t.pass / (t.pass + t.fail);
121538
- if (!best || r > best.rate)
121539
- best = { model, rate: r };
121552
+ const confidence = wilsonLowerBound(t.pass, t.pass + t.fail);
121553
+ if (!best || confidence > best.confidence || confidence === best.confidence && (r > best.rate || r === best.rate && model < best.model)) {
121554
+ best = { model, rate: r, confidence };
121555
+ }
121540
121556
  }
121541
- return best;
121557
+ return best ? { model: best.model, rate: best.rate } : null;
121558
+ }
121559
+ function wilsonLowerBound(successes, samples) {
121560
+ if (samples <= 0)
121561
+ return 0;
121562
+ const z = 1.96;
121563
+ const rate = successes / samples;
121564
+ const zSquared = z * z;
121565
+ return (rate + zSquared / (2 * samples) - z * Math.sqrt((rate * (1 - rate) + zSquared / (4 * samples)) / samples)) / (1 + zSquared / samples);
121542
121566
  }
121543
121567
  function difficultyBias(stats, category, minSamples = 3) {
121544
121568
  const t = stats.categories[category];
@@ -121557,19 +121581,97 @@ function learningDir(cwd2) {
121557
121581
  function statsPath(cwd2) {
121558
121582
  return join32(learningDir(cwd2), "stats.json");
121559
121583
  }
121584
+ function learningLockPath(cwd2) {
121585
+ return join32(learningDir(cwd2), "stats.mutation-lock");
121586
+ }
121587
+ function withLearningLock(cwd2, operation) {
121588
+ mkdirSync8(learningDir(cwd2), { recursive: true });
121589
+ const path9 = learningLockPath(cwd2);
121590
+ writeFileSync8(path9, "", { flag: "a", mode: 384 });
121591
+ let lastError;
121592
+ for (let attempt = 0;attempt < 21; attempt++) {
121593
+ try {
121594
+ const release = lockSync(path9, { realpath: false, stale: 30000 });
121595
+ try {
121596
+ return operation();
121597
+ } finally {
121598
+ release();
121599
+ }
121600
+ } catch (error40) {
121601
+ lastError = error40;
121602
+ if (error40.code !== "ELOCKED" || attempt === 20) {
121603
+ throw error40;
121604
+ }
121605
+ Atomics.wait(learningLockWaitArray, 0, 0, Math.min(100, 10 + attempt * 5));
121606
+ }
121607
+ }
121608
+ throw lastError;
121609
+ }
121610
+ function asTally(value) {
121611
+ if (!value || typeof value !== "object" || Array.isArray(value))
121612
+ return null;
121613
+ const tally2 = value;
121614
+ if (typeof tally2.pass !== "number" || !Number.isSafeInteger(tally2.pass) || tally2.pass < 0 || typeof tally2.fail !== "number" || !Number.isSafeInteger(tally2.fail) || tally2.fail < 0) {
121615
+ return null;
121616
+ }
121617
+ return { pass: tally2.pass, fail: tally2.fail };
121618
+ }
121619
+ function normalizeTallies(value) {
121620
+ if (!value || typeof value !== "object" || Array.isArray(value))
121621
+ return {};
121622
+ const normalized = {};
121623
+ for (const [key, candidate] of Object.entries(value)) {
121624
+ const tally2 = asTally(candidate);
121625
+ if (tally2)
121626
+ normalized[key] = tally2;
121627
+ }
121628
+ return normalized;
121629
+ }
121630
+ function normalizeStats(value) {
121631
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
121632
+ return emptyStats();
121633
+ }
121634
+ const record2 = value;
121635
+ const modelByCategory = {};
121636
+ if (record2.modelByCategory && typeof record2.modelByCategory === "object" && !Array.isArray(record2.modelByCategory)) {
121637
+ for (const [model, categories] of Object.entries(record2.modelByCategory)) {
121638
+ modelByCategory[model] = normalizeTallies(categories);
121639
+ }
121640
+ }
121641
+ return {
121642
+ version: 1,
121643
+ updatedAt: typeof record2.updatedAt === "string" ? record2.updatedAt : new Date(0).toISOString(),
121644
+ seen: Array.isArray(record2.seen) ? [...new Set(record2.seen.filter((value2) => typeof value2 === "string"))] : [],
121645
+ models: normalizeTallies(record2.models),
121646
+ categories: normalizeTallies(record2.categories),
121647
+ modelByCategory,
121648
+ lessons: Array.isArray(record2.lessons) ? [...new Set(record2.lessons.filter((value2) => typeof value2 === "string"))] : []
121649
+ };
121650
+ }
121560
121651
  function loadStats(cwd2) {
121561
121652
  const path9 = statsPath(cwd2);
121562
121653
  if (!existsSync8(path9))
121563
121654
  return emptyStats();
121564
- const parsed = safeParseJSON(readFileSync13(path9, "utf-8"), false);
121565
- if (!parsed || typeof parsed !== "object")
121655
+ try {
121656
+ return normalizeStats(safeParseJSON(readFileSync13(path9, "utf-8"), false));
121657
+ } catch {
121566
121658
  return emptyStats();
121567
- return { ...emptyStats(), ...parsed };
121659
+ }
121568
121660
  }
121569
121661
  function saveStats(cwd2, stats) {
121570
121662
  mkdirSync8(learningDir(cwd2), { recursive: true });
121571
- writeFileSync8(statsPath(cwd2), `${JSON.stringify(stats, null, 2)}
121572
- `);
121663
+ const destination = statsPath(cwd2);
121664
+ const temporary = `${destination}.${process.pid}.${randomUUID15()}.tmp`;
121665
+ try {
121666
+ writeFileSync8(temporary, `${JSON.stringify(normalizeStats(stats), null, 2)}
121667
+ `, {
121668
+ mode: 384
121669
+ });
121670
+ renameSync5(temporary, destination);
121671
+ } finally {
121672
+ if (existsSync8(temporary))
121673
+ unlinkSync3(temporary);
121674
+ }
121573
121675
  }
121574
121676
  function isAutomaticLearningEnabled() {
121575
121677
  if (isEnvTruthy(process.env.UR_CODE_DISABLE_AUTO_LEARNING)) {
@@ -121578,15 +121680,22 @@ function isAutomaticLearningEnabled() {
121578
121680
  return getInitialSettings().automaticLearningEnabled !== false;
121579
121681
  }
121580
121682
  function recordOutcome(cwd2, input) {
121683
+ recordOutcomes(cwd2, [input]);
121684
+ }
121685
+ function recordOutcomes(cwd2, inputs) {
121581
121686
  if (!isAutomaticLearningEnabled()) {
121582
121687
  return;
121583
121688
  }
121689
+ if (inputs.length === 0)
121690
+ return;
121584
121691
  try {
121585
- saveStats(cwd2, foldOutcomes(loadStats(cwd2), [outcomeFromRun(input)]));
121692
+ withLearningLock(cwd2, () => {
121693
+ saveStats(cwd2, foldOutcomes(loadStats(cwd2), inputs.map(outcomeFromRun)));
121694
+ });
121586
121695
  } catch {}
121587
121696
  }
121588
121697
  function learnedModelForTask(stats, task, options = {}) {
121589
- const best = bestModelForCategory(stats, categoryFromText(task), options.minSamples ?? 3);
121698
+ const best = bestModelForCategory(stats, categoryFromText(task), options.minSamples ?? 5);
121590
121699
  if (!best)
121591
121700
  return null;
121592
121701
  return best.rate >= (options.minRate ?? 0.6) ? best.model : null;
@@ -121625,8 +121734,16 @@ async function runLearn(options) {
121625
121734
  const existing = new Set(stats.lessons);
121626
121735
  stats = { ...stats, lessons: [...stats.lessons, ...newLessons.filter((l) => !existing.has(l))] };
121627
121736
  }
121628
- if (!options.dryRun)
121629
- saveStats(options.cwd, stats);
121737
+ if (!options.dryRun) {
121738
+ stats = withLearningLock(options.cwd, () => {
121739
+ const current = loadStats(options.cwd);
121740
+ const merged = foldOutcomes(current, mined);
121741
+ const lessons = [...new Set([...merged.lessons, ...newLessons])];
121742
+ const next = { ...merged, lessons };
121743
+ saveStats(options.cwd, next);
121744
+ return next;
121745
+ });
121746
+ }
121630
121747
  return { stats, newOutcomes: fresh.length, newLessons };
121631
121748
  }
121632
121749
  function suggestSkillCandidates(stats, existingSkillNames = [], options = {}) {
@@ -121707,7 +121824,7 @@ function formatLearnResult(result, json2) {
121707
121824
  return lines.join(`
121708
121825
  `);
121709
121826
  }
121710
- var TEST_PASS_RE, TEST_FAIL_RE;
121827
+ var TEST_PASS_RE, TEST_FAIL_RE, learningLockWaitArray;
121711
121828
  var init_learning = __esm(() => {
121712
121829
  init_envUtils();
121713
121830
  init_json();
@@ -121717,6 +121834,7 @@ var init_learning = __esm(() => {
121717
121834
  init_intentRouter();
121718
121835
  TEST_PASS_RE = /^passed$/i;
121719
121836
  TEST_FAIL_RE = /^failed/i;
121837
+ learningLockWaitArray = new Int32Array(new SharedArrayBuffer(4));
121720
121838
  });
121721
121839
 
121722
121840
  // src/services/agents/modelRouter.ts
@@ -122014,13 +122132,13 @@ import {
122014
122132
  readFileSync as readFileSync15,
122015
122133
  readSync as readSync4,
122016
122134
  realpathSync as realpathSync5,
122017
- renameSync as renameSync5,
122135
+ renameSync as renameSync6,
122018
122136
  rmSync as rmSync5,
122019
122137
  statSync as statSync5,
122020
122138
  writeFileSync as writeFileSync9
122021
122139
  } from "fs";
122022
122140
  import { isAbsolute as isAbsolute6, join as join34, relative as relative5, resolve as resolve13, sep as sep6 } from "path";
122023
- import { createHash as createHash4, randomUUID as randomUUID15 } from "crypto";
122141
+ import { createHash as createHash4, randomUUID as randomUUID16 } from "crypto";
122024
122142
  function now3() {
122025
122143
  return new Date().toISOString();
122026
122144
  }
@@ -122187,7 +122305,7 @@ function saveManifest2(cwd2, manifest) {
122187
122305
  const root2 = projectRoot(cwd2);
122188
122306
  ensureDirs(root2);
122189
122307
  const path9 = manifestPath2(root2);
122190
- const tempPath = `${path9}.${process.pid}.${randomUUID15()}.tmp`;
122308
+ const tempPath = `${path9}.${process.pid}.${randomUUID16()}.tmp`;
122191
122309
  const content = `${JSON.stringify(manifest, null, 2)}
122192
122310
  `;
122193
122311
  const maxBytes = backgroundLimit(process.env.UR_BACKGROUND_MAX_MANIFEST_BYTES, 16 * 1024 * 1024, 64 * 1024 * 1024);
@@ -122201,7 +122319,7 @@ function saveManifest2(cwd2, manifest) {
122201
122319
  fsyncSync5(fd);
122202
122320
  closeSync7(fd);
122203
122321
  fd = undefined;
122204
- renameSync5(tempPath, path9);
122322
+ renameSync6(tempPath, path9);
122205
122323
  } finally {
122206
122324
  if (fd !== undefined)
122207
122325
  closeSync7(fd);
@@ -122223,7 +122341,7 @@ function updateTask(cwd2, id, fn) {
122223
122341
  });
122224
122342
  }
122225
122343
  function makeId() {
122226
- return `bg_${Date.now().toString(36)}_${randomUUID15().slice(0, 8)}`;
122344
+ return `bg_${Date.now().toString(36)}_${randomUUID16().slice(0, 8)}`;
122227
122345
  }
122228
122346
  function slug2(input) {
122229
122347
  return input.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 36) || "task";
@@ -122286,7 +122404,7 @@ function appendBackgroundFeedback(cwd2, id, text, source) {
122286
122404
  return result.accepted ? getBackgroundTask(cwd2, id) : null;
122287
122405
  }
122288
122406
  function steerBackgroundTask(cwd2, id, text, source) {
122289
- const requestId = source?.requestId ?? randomUUID15();
122407
+ const requestId = source?.requestId ?? randomUUID16();
122290
122408
  if (requestId.length < 1 || requestId.length > 128 || !/^[a-zA-Z0-9_-]+$/u.test(requestId)) {
122291
122409
  return {
122292
122410
  accepted: false,
@@ -122657,7 +122775,7 @@ function streamUserMessage(content, priority = "later") {
122657
122775
  session_id: "",
122658
122776
  message: { role: "user", content },
122659
122777
  parent_tool_use_id: null,
122660
- uuid: randomUUID15(),
122778
+ uuid: randomUUID16(),
122661
122779
  priority
122662
122780
  })}
122663
122781
  `;
@@ -123336,7 +123454,7 @@ __export(exports_delegation, {
123336
123454
  import {
123337
123455
  createHash as createHash5,
123338
123456
  createHmac,
123339
- randomUUID as randomUUID16,
123457
+ randomUUID as randomUUID17,
123340
123458
  timingSafeEqual
123341
123459
  } from "crypto";
123342
123460
  function nowSeconds() {
@@ -123403,7 +123521,7 @@ function mintDelegationToken(secret, options) {
123403
123521
  if (!Number.isSafeInteger(expires)) {
123404
123522
  throw new Error("delegation expiry exceeds the safe integer range");
123405
123523
  }
123406
- const jti = options.jti ?? randomUUID16();
123524
+ const jti = options.jti ?? randomUUID17();
123407
123525
  if (!validClaimString(jti)) {
123408
123526
  throw new Error("delegation token id must be 1-256 characters without NUL bytes");
123409
123527
  }
@@ -123750,10 +123868,10 @@ var init_chunk_F6ACNKFR = __esm(() => {
123750
123868
  });
123751
123869
 
123752
123870
  // node_modules/uuid/dist/esm/native.js
123753
- import { randomUUID as randomUUID17 } from "crypto";
123871
+ import { randomUUID as randomUUID18 } from "crypto";
123754
123872
  var native_default;
123755
123873
  var init_native2 = __esm(() => {
123756
- native_default = { randomUUID: randomUUID17 };
123874
+ native_default = { randomUUID: randomUUID18 };
123757
123875
  });
123758
123876
 
123759
123877
  // node_modules/uuid/dist/esm/rng.js
@@ -124702,14 +124820,14 @@ var init_server = __esm(() => {
124702
124820
  });
124703
124821
 
124704
124822
  // src/services/agents/a2aProtocol.ts
124705
- import { createHash as createHash6, randomUUID as randomUUID18 } from "crypto";
124823
+ import { createHash as createHash6, randomUUID as randomUUID19 } from "crypto";
124706
124824
  import {
124707
124825
  existsSync as existsSync11,
124708
124826
  mkdirSync as mkdirSync10,
124709
124827
  readFileSync as readFileSync16,
124710
- renameSync as renameSync6,
124828
+ renameSync as renameSync7,
124711
124829
  statSync as statSync6,
124712
- unlinkSync as unlinkSync3,
124830
+ unlinkSync as unlinkSync4,
124713
124831
  writeFileSync as writeFileSync10
124714
124832
  } from "fs";
124715
124833
  import { dirname as dirname16, join as join35 } from "path";
@@ -124755,15 +124873,15 @@ function loadProtocolTaskManifest(cwd2) {
124755
124873
  function saveProtocolTaskManifest(cwd2, entries) {
124756
124874
  const destination = protocolManifestPath(cwd2);
124757
124875
  mkdirSync10(dirname16(destination), { recursive: true, mode: 448 });
124758
- const temporary = `${destination}.${process.pid}.${randomUUID18()}.tmp`;
124876
+ const temporary = `${destination}.${process.pid}.${randomUUID19()}.tmp`;
124759
124877
  const tasks = [...entries].slice(-MAX_PERSISTED_PROTOCOL_TASKS);
124760
124878
  try {
124761
124879
  writeFileSync10(temporary, `${JSON.stringify({ version: PROTOCOL_TASK_MANIFEST_VERSION, tasks }, null, 2)}
124762
124880
  `, { mode: 384 });
124763
- renameSync6(temporary, destination);
124881
+ renameSync7(temporary, destination);
124764
124882
  } finally {
124765
124883
  if (existsSync11(temporary))
124766
- unlinkSync3(temporary);
124884
+ unlinkSync4(temporary);
124767
124885
  }
124768
124886
  }
124769
124887
  function ownerFromContext(context3) {
@@ -124996,7 +125114,7 @@ function conformanceScenario(messageId) {
124996
125114
  return;
124997
125115
  }
124998
125116
  function conformanceArtifact(scenario) {
124999
- const artifactId = randomUUID18();
125117
+ const artifactId = randomUUID19();
125000
125118
  switch (scenario) {
125001
125119
  case "artifact-text":
125002
125120
  return {
@@ -125058,7 +125176,7 @@ class UrA2AExecutor {
125058
125176
  eventBus.publish({
125059
125177
  kind: "message",
125060
125178
  role: "agent",
125061
- messageId: randomUUID18(),
125179
+ messageId: randomUUID19(),
125062
125180
  contextId,
125063
125181
  parts: [{ kind: "text", text: "Direct message response" }]
125064
125182
  });
@@ -125072,7 +125190,7 @@ class UrA2AExecutor {
125072
125190
  message: {
125073
125191
  kind: "message",
125074
125192
  role: "agent",
125075
- messageId: randomUUID18(),
125193
+ messageId: randomUUID19(),
125076
125194
  taskId,
125077
125195
  contextId,
125078
125196
  parts: [
@@ -125110,7 +125228,7 @@ class UrA2AExecutor {
125110
125228
  message: {
125111
125229
  kind: "message",
125112
125230
  role: "agent",
125113
- messageId: randomUUID18(),
125231
+ messageId: randomUUID19(),
125114
125232
  taskId,
125115
125233
  contextId,
125116
125234
  parts: [
@@ -125178,7 +125296,7 @@ class UrA2AExecutor {
125178
125296
  append: false,
125179
125297
  lastChunk: true,
125180
125298
  artifact: artifactScenario ? conformanceArtifact(artifactScenario) : {
125181
- artifactId: randomUUID18(),
125299
+ artifactId: randomUUID19(),
125182
125300
  name: "UR result",
125183
125301
  description: "Final output produced by UR for this task.",
125184
125302
  parts: [
@@ -125201,7 +125319,7 @@ class UrA2AExecutor {
125201
125319
  message: {
125202
125320
  kind: "message",
125203
125321
  role: "agent",
125204
- messageId: randomUUID18(),
125322
+ messageId: randomUUID19(),
125205
125323
  taskId,
125206
125324
  contextId,
125207
125325
  parts: [
@@ -126169,7 +126287,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
126169
126287
  function formatA2AAgentCard(options = {}, pretty = true) {
126170
126288
  return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
126171
126289
  }
126172
- var urVersion = "1.78.7", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
126290
+ var urVersion = "1.78.8", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
126173
126291
  var init_trends = __esm(() => {
126174
126292
  init_a2aCardSignature();
126175
126293
  coverage = [
@@ -126581,14 +126699,14 @@ __export(exports_a2aServer, {
126581
126699
  handleA2ARequest: () => handleA2ARequest,
126582
126700
  authorizeRequest: () => authorizeRequest
126583
126701
  });
126584
- import { createHash as createHash9, randomUUID as randomUUID19 } from "crypto";
126702
+ import { createHash as createHash9, randomUUID as randomUUID20 } from "crypto";
126585
126703
  import {
126586
126704
  existsSync as existsSync12,
126587
126705
  mkdirSync as mkdirSync11,
126588
126706
  readFileSync as readFileSync17,
126589
- renameSync as renameSync7,
126707
+ renameSync as renameSync8,
126590
126708
  statSync as statSync7,
126591
- unlinkSync as unlinkSync4,
126709
+ unlinkSync as unlinkSync5,
126592
126710
  writeFileSync as writeFileSync11
126593
126711
  } from "fs";
126594
126712
  import { dirname as dirname17, join as join36 } from "path";
@@ -127182,7 +127300,7 @@ function truncateUtf8(value, maxBytes) {
127182
127300
  function saveA2AManifest(cwd2, manifest) {
127183
127301
  ensureA2ADir(cwd2);
127184
127302
  const destination = manifestPath3(cwd2);
127185
- const temporary = `${destination}.${process.pid}.${randomUUID19()}.tmp`;
127303
+ const temporary = `${destination}.${process.pid}.${randomUUID20()}.tmp`;
127186
127304
  const tasks = manifest.tasks.slice(-MAX_PERSISTED_A2A_TASKS).map((task) => ({
127187
127305
  ...task,
127188
127306
  ...task.result ? {
@@ -127206,14 +127324,14 @@ function saveA2AManifest(cwd2, manifest) {
127206
127324
  writeFileSync11(temporary, serialized, {
127207
127325
  mode: 384
127208
127326
  });
127209
- renameSync7(temporary, destination);
127327
+ renameSync8(temporary, destination);
127210
127328
  } finally {
127211
127329
  if (existsSync12(temporary))
127212
- unlinkSync4(temporary);
127330
+ unlinkSync5(temporary);
127213
127331
  }
127214
127332
  }
127215
127333
  function createA2AId() {
127216
- return `a2a_${Date.now().toString(36)}_${randomUUID19().slice(0, 8)}`;
127334
+ return `a2a_${Date.now().toString(36)}_${randomUUID20().slice(0, 8)}`;
127217
127335
  }
127218
127336
  function mapBackgroundStatus(status) {
127219
127337
  switch (status) {
@@ -128972,7 +129090,7 @@ function getAttributionHeader(fingerprint) {
128972
129090
  if (!isAttributionHeaderEnabled()) {
128973
129091
  return "";
128974
129092
  }
128975
- const version2 = `${"1.78.7"}.${fingerprint}`;
129093
+ const version2 = `${"1.78.8"}.${fingerprint}`;
128976
129094
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
128977
129095
  const cch = "";
128978
129096
  const workload = getWorkload();
@@ -156976,7 +157094,7 @@ var init_projectSafety = __esm(() => {
156976
157094
  function getInstruments() {
156977
157095
  if (instruments)
156978
157096
  return instruments;
156979
- const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.78.7");
157097
+ const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.78.8");
156980
157098
  instruments = {
156981
157099
  operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
156982
157100
  description: "GenAI operation duration.",
@@ -157074,7 +157192,7 @@ function genAiAgentAttributes() {
157074
157192
  "gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
157075
157193
  "gen_ai.provider.name": "ur",
157076
157194
  "gen_ai.agent.name": "UR-Nexus",
157077
- "gen_ai.agent.version": "1.78.7"
157195
+ "gen_ai.agent.version": "1.78.8"
157078
157196
  };
157079
157197
  }
157080
157198
  function genAiWorkflowAttributes(workflowName) {
@@ -157090,7 +157208,7 @@ function genAiWorkflowAttributes(workflowName) {
157090
157208
  function startGenAiWorkflowSpan(workflowName) {
157091
157209
  const attributes = genAiWorkflowAttributes(workflowName);
157092
157210
  const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
157093
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.78.7").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
157211
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.78.8").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
157094
157212
  }
157095
157213
  function endGenAiWorkflowSpan(span, options2 = {}) {
157096
157214
  try {
@@ -157128,7 +157246,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
157128
157246
  if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
157129
157247
  attributes["gen_ai.memory.record.count"] = options2.recordCount;
157130
157248
  }
157131
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.78.7").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
157249
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.78.8").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
157132
157250
  }
157133
157251
  function endGenAiMemorySpan(span, options2 = {}) {
157134
157252
  try {
@@ -157559,14 +157677,14 @@ import {
157559
157677
  openSync as openSync8,
157560
157678
  readFileSync as readFileSync21,
157561
157679
  readdirSync as readdirSync3,
157562
- renameSync as renameSync8,
157680
+ renameSync as renameSync9,
157563
157681
  rmSync as rmSync7,
157564
157682
  statSync as statSync11,
157565
- unlinkSync as unlinkSync5,
157683
+ unlinkSync as unlinkSync6,
157566
157684
  writeSync as writeSync4,
157567
157685
  writeFileSync as writeFileSync14
157568
157686
  } from "fs";
157569
- import { createHash as createHash13, randomUUID as randomUUID20 } from "crypto";
157687
+ import { createHash as createHash13, randomUUID as randomUUID21 } from "crypto";
157570
157688
  import { dirname as dirname28, join as join52, relative as relative11 } from "path";
157571
157689
  function contextDir(cwd2) {
157572
157690
  return join52(cwd2, ".ur", "context");
@@ -158089,7 +158207,7 @@ function appendTaskMemory(cwd2, kind, text, meta) {
158089
158207
  }
158090
158208
  const entry = {
158091
158209
  schemaVersion: TASK_MEMORY_SCHEMA_VERSION,
158092
- id: randomUUID20(),
158210
+ id: randomUUID21(),
158093
158211
  at,
158094
158212
  kind,
158095
158213
  text,
@@ -158144,9 +158262,9 @@ function readTaskMemory(cwd2) {
158144
158262
  }
158145
158263
  function replaceTaskMemoryWithBackup(cwd2, replacement, label) {
158146
158264
  const path10 = taskMemoryPath(cwd2);
158147
- const suffix = `${new Date().toISOString().replaceAll(/[:.]/g, "-")}.${randomUUID20()}`;
158265
+ const suffix = `${new Date().toISOString().replaceAll(/[:.]/g, "-")}.${randomUUID21()}`;
158148
158266
  const backup = join52(dirname28(path10), `task-memory.${label}.${suffix}.jsonl`);
158149
- const temporary = `${path10}.${process.pid}.${randomUUID20()}.tmp`;
158267
+ const temporary = `${path10}.${process.pid}.${randomUUID21()}.tmp`;
158150
158268
  let backedUp = false;
158151
158269
  try {
158152
158270
  writeFileSync14(temporary, replacement, {
@@ -158160,20 +158278,20 @@ function replaceTaskMemoryWithBackup(cwd2, replacement, label) {
158160
158278
  } finally {
158161
158279
  closeSync8(descriptor);
158162
158280
  }
158163
- renameSync8(path10, backup);
158281
+ renameSync9(path10, backup);
158164
158282
  backedUp = true;
158165
- renameSync8(temporary, path10);
158283
+ renameSync9(temporary, path10);
158166
158284
  chmodSync5(path10, 384);
158167
158285
  chmodSync5(backup, 384);
158168
158286
  return backup;
158169
158287
  } catch (error40) {
158170
158288
  if (backedUp && !existsSync20(path10) && existsSync20(backup)) {
158171
- renameSync8(backup, path10);
158289
+ renameSync9(backup, path10);
158172
158290
  }
158173
158291
  throw error40;
158174
158292
  } finally {
158175
158293
  try {
158176
- unlinkSync5(temporary);
158294
+ unlinkSync6(temporary);
158177
158295
  } catch {}
158178
158296
  }
158179
158297
  }
@@ -159197,7 +159315,7 @@ import {
159197
159315
  unlink as unlink3,
159198
159316
  writeFile as writeFile5
159199
159317
  } from "fs/promises";
159200
- import { randomUUID as randomUUID21 } from "crypto";
159318
+ import { randomUUID as randomUUID22 } from "crypto";
159201
159319
  import { join as join57 } from "path";
159202
159320
  function setLeaderTeamName(teamName) {
159203
159321
  if (leaderTeamName === teamName)
@@ -159275,7 +159393,7 @@ async function archiveActiveTaskListUnsafe(taskListId, generationId) {
159275
159393
  if (highestId > currentMark)
159276
159394
  await writeHighWaterMark(taskListId, highestId);
159277
159395
  }
159278
- const archiveId = `${Date.now().toString(36)}-${randomUUID21()}`;
159396
+ const archiveId = `${Date.now().toString(36)}-${randomUUID22()}`;
159279
159397
  const archivedAt = new Date().toISOString();
159280
159398
  const archiveDir = join57(getTaskHistoryDir(taskListId), archiveId);
159281
159399
  await mkdir6(archiveDir, { recursive: true });
@@ -159574,7 +159692,7 @@ async function updateTaskUnsafe(taskListId, taskId, updates) {
159574
159692
  return updated;
159575
159693
  }
159576
159694
  async function writeFileAtomically(path10, content) {
159577
- const temporaryPath = `${path10}.${process.pid}.${randomUUID21().replaceAll("-", "")}.tmp`;
159695
+ const temporaryPath = `${path10}.${process.pid}.${randomUUID22().replaceAll("-", "")}.tmp`;
159578
159696
  let handle;
159579
159697
  let renamed = false;
159580
159698
  try {
@@ -250794,7 +250912,7 @@ function getTelemetryAttributes() {
250794
250912
  attributes["session.id"] = sessionId;
250795
250913
  }
250796
250914
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
250797
- attributes["app.version"] = "1.78.7";
250915
+ attributes["app.version"] = "1.78.8";
250798
250916
  }
250799
250917
  const oauthAccount = getOauthAccountInfo();
250800
250918
  if (oauthAccount) {
@@ -254043,7 +254161,7 @@ __export(exports_commitAttribution, {
254043
254161
  buildSurfaceKey: () => buildSurfaceKey,
254044
254162
  attributionRestoreStateFromLog: () => attributionRestoreStateFromLog
254045
254163
  });
254046
- import { createHash as createHash16, randomUUID as randomUUID22 } from "crypto";
254164
+ import { createHash as createHash16, randomUUID as randomUUID23 } from "crypto";
254047
254165
  import { stat as stat15 } from "fs/promises";
254048
254166
  import { isAbsolute as isAbsolute14, join as join58, relative as relative13, sep as sep12 } from "path";
254049
254167
  function getAttributionRepoRoot() {
@@ -254457,7 +254575,7 @@ function incrementPromptCount(attribution, saveSnapshot) {
254457
254575
  ...attribution,
254458
254576
  promptCount: attribution.promptCount + 1
254459
254577
  };
254460
- const snapshot2 = stateToSnapshotMessage(newAttribution, randomUUID22());
254578
+ const snapshot2 = stateToSnapshotMessage(newAttribution, randomUUID23());
254461
254579
  saveSnapshot(snapshot2);
254462
254580
  return newAttribution;
254463
254581
  }
@@ -259806,7 +259924,7 @@ var init_queryHelpers = __esm(() => {
259806
259924
  });
259807
259925
 
259808
259926
  // src/services/PromptSuggestion/speculation.ts
259809
- import { randomUUID as randomUUID23 } from "crypto";
259927
+ import { randomUUID as randomUUID24 } from "crypto";
259810
259928
  import { rm as rm2 } from "fs";
259811
259929
  import { appendFile as appendFile4, copyFile, mkdir as mkdir7 } from "fs/promises";
259812
259930
  import { dirname as dirname30, isAbsolute as isAbsolute16, join as join59, relative as relative14 } from "path";
@@ -259996,7 +260114,7 @@ async function startSpeculation(suggestionText, context3, setAppState, isPipelin
259996
260114
  if (!isSpeculationEnabled())
259997
260115
  return;
259998
260116
  abortSpeculation(setAppState);
259999
- const id = randomUUID23().slice(0, 8);
260117
+ const id = randomUUID24().slice(0, 8);
260000
260118
  const abortController = createChildAbortController(context3.toolUseContext.abortController);
260001
260119
  if (abortController.signal.aborted)
260002
260120
  return;
@@ -260377,7 +260495,7 @@ var init_speculation = __esm(() => {
260377
260495
  });
260378
260496
 
260379
260497
  // src/utils/sdkEventQueue.ts
260380
- import { randomUUID as randomUUID24 } from "crypto";
260498
+ import { randomUUID as randomUUID25 } from "crypto";
260381
260499
  function enqueueSdkEvent(event) {
260382
260500
  if (!getIsNonInteractiveSession()) {
260383
260501
  return;
@@ -260394,7 +260512,7 @@ function drainSdkEvents() {
260394
260512
  const events = queue.splice(0);
260395
260513
  return events.map((e) => ({
260396
260514
  ...e,
260397
- uuid: randomUUID24(),
260515
+ uuid: randomUUID25(),
260398
260516
  session_id: getSessionId()
260399
260517
  }));
260400
260518
  }
@@ -293448,7 +293566,7 @@ var init_xaaIdpLogin = __esm(() => {
293448
293566
  });
293449
293567
 
293450
293568
  // src/services/mcp/auth.ts
293451
- import { createHash as createHash19, randomBytes as randomBytes6, randomUUID as randomUUID25 } from "crypto";
293569
+ import { createHash as createHash19, randomBytes as randomBytes6, randomUUID as randomUUID26 } from "crypto";
293452
293570
  import { mkdir as mkdir8 } from "fs/promises";
293453
293571
  import { createServer as createServer3 } from "http";
293454
293572
  import { join as join66 } from "path";
@@ -293866,7 +293984,7 @@ async function performMCPOAuthFlow(serverName, serverConfig, onAuthorizationUrl,
293866
293984
  scope: cachedStepUpScope,
293867
293985
  resourceMetadataUrl
293868
293986
  };
293869
- const flowAttemptId = randomUUID25();
293987
+ const flowAttemptId = randomUUID26();
293870
293988
  logEvent("tengu_mcp_oauth_flow_start", {
293871
293989
  flowAttemptId,
293872
293990
  isOAuthFlow: true,
@@ -297301,7 +297419,7 @@ function getInstallationEnv() {
297301
297419
  return;
297302
297420
  }
297303
297421
  function getURCodeVersion() {
297304
- return "1.78.7";
297422
+ return "1.78.8";
297305
297423
  }
297306
297424
  async function getInstalledVSCodeExtensionVersion(command) {
297307
297425
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -304632,7 +304750,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
304632
304750
  const client2 = new Client({
304633
304751
  name: "ur",
304634
304752
  title: "UR",
304635
- version: "1.78.7",
304753
+ version: "1.78.8",
304636
304754
  description: "UR-Nexus autonomous engineering workflow engine",
304637
304755
  websiteUrl: PRODUCT_URL
304638
304756
  }, {
@@ -304992,7 +305110,7 @@ var init_client5 = __esm(() => {
304992
305110
  const client2 = new Client({
304993
305111
  name: "ur",
304994
305112
  title: "UR",
304995
- version: "1.78.7",
305113
+ version: "1.78.8",
304996
305114
  description: "UR-Nexus autonomous engineering workflow engine",
304997
305115
  websiteUrl: PRODUCT_URL
304998
305116
  }, {
@@ -308547,48 +308665,87 @@ function isDeliberation(paragraph2) {
308547
308665
  return false;
308548
308666
  return DELIBERATION_OPENERS.test(trimmed) || SELF_QUESTION.test(trimmed);
308549
308667
  }
308550
- function splitLeadingDeliberation(text) {
308668
+ function isInternalPlanning(paragraph2) {
308669
+ const trimmed = paragraph2.trim();
308670
+ if (!trimmed || isStructure(trimmed))
308671
+ return false;
308672
+ const signals2 = [...trimmed.matchAll(INTERNAL_PLANNING_SIGNAL)].length;
308673
+ return isDeliberation(trimmed) || signals2 >= 2 || signals2 >= 1 && trimmed.length >= 180;
308674
+ }
308675
+ function splitDeliberationRegion(text) {
308551
308676
  const paragraphs = text.split(/\n{2,}/);
308552
308677
  if (paragraphs.length < MIN_RUN) {
308553
- return { deliberation: "", visible: text };
308678
+ return { before: "", deliberation: "", after: text };
308554
308679
  }
308555
- let lastDeliberation = -1;
308556
- let deliberationCount = 0;
308680
+ let start = -1;
308681
+ let count4 = 0;
308682
+ let last2 = -1;
308557
308683
  let gap = 0;
308558
- for (let i3 = 0;i3 < paragraphs.length; i3++) {
308559
- const paragraph2 = paragraphs[i3];
308560
- if (isStructure(paragraph2))
308561
- break;
308562
- if (isDeliberation(paragraph2)) {
308563
- lastDeliberation = i3;
308564
- deliberationCount++;
308565
- gap = 0;
308566
- continue;
308567
- }
308568
- gap++;
308569
- if (gap > 1)
308570
- break;
308571
- }
308572
- if (deliberationCount < MIN_RUN || lastDeliberation < 0 || lastDeliberation >= paragraphs.length - 1) {
308573
- return { deliberation: "", visible: text };
308574
- }
308575
- return {
308576
- deliberation: paragraphs.slice(0, lastDeliberation + 1).join(`
308684
+ const resultForCandidate = () => {
308685
+ if (count4 < MIN_RUN || start < 0 || last2 < start)
308686
+ return null;
308687
+ if (start === 0 && last2 === paragraphs.length - 1)
308688
+ return null;
308689
+ return {
308690
+ before: paragraphs.slice(0, start).join(`
308691
+
308692
+ `),
308693
+ deliberation: paragraphs.slice(start, last2 + 1).join(`
308577
308694
 
308578
308695
  `),
308579
- visible: paragraphs.slice(lastDeliberation + 1).join(`
308696
+ after: paragraphs.slice(last2 + 1).join(`
308580
308697
 
308581
308698
  `)
308699
+ };
308700
+ };
308701
+ const resetCandidate = () => {
308702
+ start = -1;
308703
+ count4 = 0;
308704
+ last2 = -1;
308705
+ gap = 0;
308582
308706
  };
308707
+ for (let index2 = 0;index2 < paragraphs.length; index2++) {
308708
+ const paragraph2 = paragraphs[index2];
308709
+ if (isStructure(paragraph2)) {
308710
+ const result2 = resultForCandidate();
308711
+ if (result2)
308712
+ return result2;
308713
+ resetCandidate();
308714
+ continue;
308715
+ }
308716
+ if (isInternalPlanning(paragraph2)) {
308717
+ if (start < 0)
308718
+ start = index2;
308719
+ count4 += 1;
308720
+ last2 = index2;
308721
+ gap = 0;
308722
+ continue;
308723
+ }
308724
+ if (start >= 0) {
308725
+ gap += 1;
308726
+ if (gap > 1) {
308727
+ const result2 = resultForCandidate();
308728
+ if (result2)
308729
+ return result2;
308730
+ resetCandidate();
308731
+ }
308732
+ }
308733
+ }
308734
+ const result = resultForCandidate();
308735
+ if (result)
308736
+ return result;
308737
+ return { before: "", deliberation: "", after: text };
308583
308738
  }
308584
308739
  function describeCollapsedDeliberation(deliberation) {
308585
308740
  const count4 = deliberation.split(/\n{2,}/).filter((part) => part.trim()).length;
308586
- return `*(${count4} paragraphs of reasoning collapsed)*`;
308741
+ const activity = /\b(?:plan|task|approach|guidance)\b/i.test(deliberation) ? "planning approach and task order" : /\b(?:test|verify|validation)\b/i.test(deliberation) ? "evaluating implementation and verification choices" : "working through implementation choices";
308742
+ return `> \u2234 **Reasoning condensed** \xB7 ${count4} paragraphs \xB7 ${activity} \xB7 \`ctrl+o\` to expand`;
308587
308743
  }
308588
- var DELIBERATION_OPENERS, SELF_QUESTION, MIN_RUN = 3;
308744
+ var DELIBERATION_OPENERS, SELF_QUESTION, INTERNAL_PLANNING_SIGNAL, MIN_RUN = 3;
308589
308745
  var init_deliberationText = __esm(() => {
308590
308746
  DELIBERATION_OPENERS = /^(wait|hmm+|hold on|actually|maybe|perhaps|possibly|possibility|could it be|could be|might be|what if|what about|another (thought|possibility|angle|option|idea)|let me (think|reconsider|check|see|read|inspect|look)|let's (think|consider|reconsider|say|try|look)|i (wonder|suspect|think maybe|need to see|could)|but (wait|maybe|then|actually)|unless|alternatively|on second thought|or maybe|why would|so why|is it possible|that would|if so|hmm)\b/i;
308591
308747
  SELF_QUESTION = /^[^.!]{0,160}\?\s*$/;
308748
+ INTERNAL_PLANNING_SIGNAL = /\b(?:i should|i think|i need to|i can proceed|i will implement|let me|let's|the (?:system |tool |prompt )?guidance says|per guidance|should i|do i need|plan mode|askuserquestion|taskcreate|enterplanmode)\b/gi;
308592
308749
  });
308593
308750
 
308594
308751
  // src/utils/systemReminderFilter.ts
@@ -317601,7 +317758,7 @@ async function createRuntime() {
317601
317758
  bootstrapTelemetry();
317602
317759
  const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
317603
317760
  [import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
317604
- [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.78.7"
317761
+ [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.78.8"
317605
317762
  }));
317606
317763
  const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
317607
317764
  resource,
@@ -317634,11 +317791,11 @@ async function createRuntime() {
317634
317791
  setMeterProvider(meterProvider);
317635
317792
  setLoggerProvider(loggerProvider);
317636
317793
  if (meterProvider) {
317637
- const meter = meterProvider.getMeter("ur-agent", "1.78.7");
317794
+ const meter = meterProvider.getMeter("ur-agent", "1.78.8");
317638
317795
  setMeter(meter, (name, options2) => meter.createCounter(name, options2));
317639
317796
  }
317640
317797
  if (loggerProvider) {
317641
- setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.78.7"));
317798
+ setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.78.8"));
317642
317799
  }
317643
317800
  if (!cleanupRegistered2) {
317644
317801
  cleanupRegistered2 = true;
@@ -318300,9 +318457,9 @@ async function assertMinVersion() {
318300
318457
  if (false) {}
318301
318458
  try {
318302
318459
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
318303
- if (versionConfig.minVersion && lt("1.78.7", versionConfig.minVersion)) {
318460
+ if (versionConfig.minVersion && lt("1.78.8", versionConfig.minVersion)) {
318304
318461
  console.error(`
318305
- It looks like your version of UR (${"1.78.7"}) needs an update.
318462
+ It looks like your version of UR (${"1.78.8"}) needs an update.
318306
318463
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
318307
318464
 
318308
318465
  To update, please run:
@@ -318518,7 +318675,7 @@ async function installGlobalPackage(specificVersion) {
318518
318675
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
318519
318676
  logEvent("tengu_auto_updater_lock_contention", {
318520
318677
  pid: process.pid,
318521
- currentVersion: "1.78.7"
318678
+ currentVersion: "1.78.8"
318522
318679
  });
318523
318680
  return "in_progress";
318524
318681
  }
@@ -318527,7 +318684,7 @@ async function installGlobalPackage(specificVersion) {
318527
318684
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
318528
318685
  logError2(new Error("Windows NPM detected in WSL environment"));
318529
318686
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
318530
- currentVersion: "1.78.7"
318687
+ currentVersion: "1.78.8"
318531
318688
  });
318532
318689
  console.error(`
318533
318690
  Error: Windows NPM detected in WSL
@@ -319062,7 +319219,7 @@ function detectLinuxGlobPatternWarnings() {
319062
319219
  }
319063
319220
  async function getDoctorDiagnostic() {
319064
319221
  const installationType = await getCurrentInstallationType();
319065
- const version2 = typeof MACRO !== "undefined" ? "1.78.7" : "unknown";
319222
+ const version2 = typeof MACRO !== "undefined" ? "1.78.8" : "unknown";
319066
319223
  const installationPath = await getInstallationPath();
319067
319224
  const invokedBinary = getInvokedBinary();
319068
319225
  const multipleInstallations = await detectMultipleInstallations();
@@ -319997,8 +320154,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
319997
320154
  const maxVersion = await getMaxVersion();
319998
320155
  if (maxVersion && gt(version2, maxVersion)) {
319999
320156
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
320000
- if (gte("1.78.7", maxVersion)) {
320001
- logForDebugging(`Native installer: current version ${"1.78.7"} is already at or above maxVersion ${maxVersion}, skipping update`);
320157
+ if (gte("1.78.8", maxVersion)) {
320158
+ logForDebugging(`Native installer: current version ${"1.78.8"} is already at or above maxVersion ${maxVersion}, skipping update`);
320002
320159
  logEvent("tengu_native_update_skipped_max_version", {
320003
320160
  latency_ms: Date.now() - startTime,
320004
320161
  max_version: maxVersion,
@@ -320009,7 +320166,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
320009
320166
  version2 = maxVersion;
320010
320167
  }
320011
320168
  }
320012
- if (!forceReinstall && version2 === "1.78.7" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
320169
+ if (!forceReinstall && version2 === "1.78.8" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
320013
320170
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
320014
320171
  logEvent("tengu_native_update_complete", {
320015
320172
  latency_ms: Date.now() - startTime,
@@ -322710,6 +322867,22 @@ var init_ink3 = __esm(() => {
322710
322867
  });
322711
322868
 
322712
322869
  // src/components/Spinner/SpinnerAnimationRow.tsx
322870
+ function spinnerActivityStatus(mode) {
322871
+ switch (String(mode)) {
322872
+ case "thinking":
322873
+ return "thinking";
322874
+ case "requesting":
322875
+ return "requesting";
322876
+ case "responding":
322877
+ return "responding";
322878
+ case "tool-input":
322879
+ return "preparing tool";
322880
+ case "tool-use":
322881
+ return "working";
322882
+ default:
322883
+ return "working";
322884
+ }
322885
+ }
322713
322886
  function SpinnerAnimationRow({
322714
322887
  mode,
322715
322888
  reducedMotion,
@@ -322759,14 +322932,14 @@ function SpinnerAnimationRow({
322759
322932
  const tokenCount = totalTokens !== undefined ? formatNumber(totalTokens) : null;
322760
322933
  const tokensText = tokenCount === null ? "" : hasRunningTeammates ? `${tokenCount} tokens` : `${figures_default.arrowDown} ${tokenCount} tokens`;
322761
322934
  const tokensWidth = stringWidth(tokensText);
322762
- let thinkingText = thinkingStatus === "thinking" ? `thinking${effortSuffix}` : typeof thinkingStatus === "number" ? `thought for ${Math.max(1, Math.round(thinkingStatus / 1000))}s` : null;
322935
+ let thinkingText = thinkingStatus === "thinking" ? `thinking${effortSuffix}` : typeof thinkingStatus === "number" ? `thought for ${Math.max(1, Math.round(thinkingStatus / 1000))}s` : spinnerActivityStatus(mode);
322763
322936
  let thinkingWidthValue = thinkingText ? stringWidth(thinkingText) : 0;
322764
322937
  const messageWidth = glimmerMessageWidth + 2;
322765
322938
  const sep13 = SEP_WIDTH;
322766
- const wantsThinking = thinkingStatus !== null;
322939
+ const wantsThinking = true;
322767
322940
  const wantsTimerAndTokens = verbose || hasRunningTeammates || effectiveElapsedMs > SHOW_TOKENS_AFTER_MS;
322768
322941
  const availableSpace = columns - messageWidth - 5;
322769
- let showThinking = wantsThinking && availableSpace > thinkingWidthValue;
322942
+ let showThinking = wantsThinking;
322770
322943
  if (!showThinking && wantsThinking && thinkingStatus === "thinking" && effortSuffix) {
322771
322944
  if (availableSpace > THINKING_BARE_WIDTH) {
322772
322945
  thinkingText = "thinking";
@@ -330149,7 +330322,7 @@ __export(exports_api, {
330149
330322
  CodeSessionSchema: () => CodeSessionSchema,
330150
330323
  CCR_BYOC_BETA: () => CCR_BYOC_BETA
330151
330324
  });
330152
- import { randomUUID as randomUUID26 } from "crypto";
330325
+ import { randomUUID as randomUUID27 } from "crypto";
330153
330326
  function isTransientNetworkError(error40) {
330154
330327
  if (!axios_default.isAxiosError(error40)) {
330155
330328
  return false;
@@ -330292,7 +330465,7 @@ async function sendEventToRemoteSession(sessionId, messageContent, opts) {
330292
330465
  "x-organization-uuid": orgUUID
330293
330466
  };
330294
330467
  const userEvent = {
330295
- uuid: opts?.uuid ?? randomUUID26(),
330468
+ uuid: opts?.uuid ?? randomUUID27(),
330296
330469
  session_id: sessionId,
330297
330470
  type: "user",
330298
330471
  parent_tool_use_id: null,
@@ -330941,7 +331114,7 @@ function InvalidApiKeyMessage() {
330941
331114
  return t1;
330942
331115
  }
330943
331116
  function AssistantTextMessage(t0) {
330944
- const $2 = import_compiler_runtime63.c(34);
331117
+ const $2 = import_compiler_runtime63.c(39);
330945
331118
  const {
330946
331119
  param: t1,
330947
331120
  addMargin,
@@ -330952,11 +331125,26 @@ function AssistantTextMessage(t0) {
330952
331125
  const {
330953
331126
  text: rawText
330954
331127
  } = t1;
330955
- const strippedText = stripSystemReminders2(rawText);
330956
- const split = verbose ? null : splitLeadingDeliberation(strippedText);
330957
- const text = split && split.deliberation ? `${describeCollapsedDeliberation(split.deliberation)}
331128
+ let strippedText;
331129
+ if ($2[34] !== rawText) {
331130
+ strippedText = stripSystemReminders2(rawText);
331131
+ $2[34] = rawText;
331132
+ $2[35] = strippedText;
331133
+ } else {
331134
+ strippedText = $2[35];
331135
+ }
331136
+ let text;
331137
+ if ($2[36] !== strippedText || $2[37] !== verbose) {
331138
+ const split = verbose ? null : splitDeliberationRegion(strippedText);
331139
+ text = split && split.deliberation ? [split.before, describeCollapsedDeliberation(split.deliberation), split.after].filter(Boolean).join(`
330958
331140
 
330959
- ${split.visible}` : strippedText;
331141
+ `) : strippedText;
331142
+ $2[36] = strippedText;
331143
+ $2[37] = verbose;
331144
+ $2[38] = text;
331145
+ } else {
331146
+ text = $2[38];
331147
+ }
330960
331148
  const isSelected = import_react65.useContext(MessageActionsSelectedContext);
330961
331149
  if (isEmptyMessageText(text)) {
330962
331150
  return null;
@@ -340286,7 +340474,7 @@ __export(exports_processSlashCommand, {
340286
340474
  looksLikeCommand: () => looksLikeCommand,
340287
340475
  formatSkillLoadingMetadata: () => formatSkillLoadingMetadata
340288
340476
  });
340289
- import { randomUUID as randomUUID27 } from "crypto";
340477
+ import { randomUUID as randomUUID28 } from "crypto";
340290
340478
  async function executeForkedSlashCommand(command, args, context5, precedingInputBlocks, setToolJSX, canUseTool) {
340291
340479
  const agentId = createAgentId();
340292
340480
  const pluginMarketplace = command.pluginInfo ? parsePluginIdentifier(command.pluginInfo.repository).marketplace : undefined;
@@ -340330,7 +340518,7 @@ async function executeForkedSlashCommand(command, args, context5, precedingInput
340330
340518
  parentToolUseID,
340331
340519
  toolUseID: `${parentToolUseID}-${toolUseCounter}`,
340332
340520
  timestamp: new Date().toISOString(),
340333
- uuid: randomUUID27()
340521
+ uuid: randomUUID28()
340334
340522
  };
340335
340523
  };
340336
340524
  const updateProgress = () => {
@@ -340455,7 +340643,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
340455
340643
  resultText: unknownMessage
340456
340644
  };
340457
340645
  }
340458
- const promptId = randomUUID27();
340646
+ const promptId = randomUUID28();
340459
340647
  setPromptId(promptId);
340460
340648
  logEvent("tengu_input_prompt", {});
340461
340649
  logOTelEvent("user_prompt", {
@@ -340885,7 +341073,7 @@ var init_processSlashCommand = __esm(() => {
340885
341073
  });
340886
341074
 
340887
341075
  // src/tools/AgentTool/runAgent.ts
340888
- import { randomUUID as randomUUID28 } from "crypto";
341076
+ import { randomUUID as randomUUID29 } from "crypto";
340889
341077
  async function initializeAgentMcpServers(agentDefinition, parentClients) {
340890
341078
  if (!agentDefinition.mcpServers?.length) {
340891
341079
  return {
@@ -341077,7 +341265,7 @@ async function* runAgent({
341077
341265
  type: "hook_additional_context",
341078
341266
  content: additionalContexts,
341079
341267
  hookName: "SubagentStart",
341080
- toolUseID: randomUUID28(),
341268
+ toolUseID: randomUUID29(),
341081
341269
  hookEvent: "SubagentStart"
341082
341270
  });
341083
341271
  initialMessages.push(contextMessage);
@@ -341435,6 +341623,26 @@ var init_agentSummary = __esm(() => {
341435
341623
  init_sessionStorage();
341436
341624
  });
341437
341625
 
341626
+ // src/services/agents/parallelPolicy.ts
341627
+ function isClearlyReadOnlyWork(description) {
341628
+ const text = description.trim();
341629
+ if (!text)
341630
+ return false;
341631
+ if (EXPLICIT_READ_ONLY.test(text) && READ_ONLY_SIGNAL.test(text))
341632
+ return true;
341633
+ return READ_ONLY_START.test(text) && !MUTATION_SIGNAL.test(text);
341634
+ }
341635
+ function isDelegationConcurrencySafe(input) {
341636
+ return input.isolation === "worktree" || input.isolation === "remote" || isClearlyReadOnlyWork(input.prompt);
341637
+ }
341638
+ var READ_ONLY_START, READ_ONLY_SIGNAL, MUTATION_SIGNAL, EXPLICIT_READ_ONLY;
341639
+ var init_parallelPolicy = __esm(() => {
341640
+ READ_ONLY_START = /^\s*(?:analy[sz]e|audit|compare|explain|explore|find|inspect|investigate|list|plan|read|research|review|search|summari[sz]e|trace)\b/i;
341641
+ READ_ONLY_SIGNAL = /\b(?:analy[sz]e|audit|compare|explain|explore|inspect|investigate|read|research|review|search|trace)\b/i;
341642
+ MUTATION_SIGNAL = /\b(?:add|apply|build|bump|change|commit|correct|create|delete|deploy|edit|fix|format|generate|implement|install|integrate|modify|move|optimi[sz]e|patch|publish|refactor|remove|rename|repair|resolve|ship|update|write)\b/i;
341643
+ EXPLICIT_READ_ONLY = /\b(?:read[- ]only|do not|don't|must not|without)\s+(?:edit|modify|mutate|write|change|implement|patch|create|delete|remove)\b/i;
341644
+ });
341645
+
341438
341646
  // src/utils/todo/types.ts
341439
341647
  var TodoStatusSchema, TodoItemSchema, TodoListSchema;
341440
341648
  var init_types10 = __esm(() => {
@@ -344070,7 +344278,7 @@ var init_words = __esm(() => {
344070
344278
  });
344071
344279
 
344072
344280
  // src/utils/plans.ts
344073
- import { randomUUID as randomUUID29 } from "crypto";
344281
+ import { randomUUID as randomUUID30 } from "crypto";
344074
344282
  import { copyFile as copyFile4, writeFile as writeFile18 } from "fs/promises";
344075
344283
  import { join as join87, resolve as resolve28, sep as sep15 } from "path";
344076
344284
  function getPlanSlug(sessionId) {
@@ -344253,7 +344461,7 @@ async function persistFileSnapshotIfRemote() {
344253
344461
  level: "info",
344254
344462
  isMeta: true,
344255
344463
  timestamp: new Date().toISOString(),
344256
- uuid: randomUUID29(),
344464
+ uuid: randomUUID30(),
344257
344465
  snapshotFiles
344258
344466
  };
344259
344467
  const { recordTranscript: recordTranscript2 } = await Promise.resolve().then(() => (init_sessionStorage(), exports_sessionStorage));
@@ -345193,7 +345401,7 @@ var init_conversationRecovery = __esm(() => {
345193
345401
  });
345194
345402
 
345195
345403
  // src/services/api/filesApi.ts
345196
- import { randomUUID as randomUUID30 } from "crypto";
345404
+ import { randomUUID as randomUUID31 } from "crypto";
345197
345405
  import { constants as fsConstants4 } from "fs";
345198
345406
  import * as fs3 from "fs/promises";
345199
345407
  import * as path10 from "path";
@@ -345473,7 +345681,7 @@ async function uploadFile(filePath, relativePath, config2, opts) {
345473
345681
  success: false
345474
345682
  };
345475
345683
  }
345476
- const boundary = `----FormBoundary${randomUUID30()}`;
345684
+ const boundary = `----FormBoundary${randomUUID31()}`;
345477
345685
  const filename = path10.basename(relativePath);
345478
345686
  const bodyParts = [];
345479
345687
  bodyParts.push(Buffer.from(`--${boundary}\r
@@ -345611,11 +345819,11 @@ var init_filesApi = __esm(() => {
345611
345819
  });
345612
345820
 
345613
345821
  // src/utils/tempfile.ts
345614
- import { createHash as createHash26, randomUUID as randomUUID31 } from "crypto";
345822
+ import { createHash as createHash26, randomUUID as randomUUID32 } from "crypto";
345615
345823
  import { tmpdir as tmpdir6 } from "os";
345616
345824
  import { join as join91 } from "path";
345617
345825
  function generateTempFilePath(prefix = "ur-prompt", extension = ".md", options2) {
345618
- const id = options2?.contentHash ? createHash26("sha256").update(options2.contentHash).digest("hex").slice(0, 16) : randomUUID31();
345826
+ const id = options2?.contentHash ? createHash26("sha256").update(options2.contentHash).digest("hex").slice(0, 16) : randomUUID32();
345619
345827
  return join91(tmpdir6(), `${prefix}-${id}${extension}`);
345620
345828
  }
345621
345829
  var init_tempfile = () => {};
@@ -345790,7 +345998,7 @@ __export(exports_teleport, {
345790
345998
  checkOutTeleportedSessionBranch: () => checkOutTeleportedSessionBranch,
345791
345999
  archiveRemoteSession: () => archiveRemoteSession
345792
346000
  });
345793
- import { randomUUID as randomUUID32 } from "crypto";
346001
+ import { randomUUID as randomUUID33 } from "crypto";
345794
346002
  function createTeleportResumeSystemMessage(branchError) {
345795
346003
  if (branchError === null) {
345796
346004
  return createSystemMessage("Session resumed", "suggestion");
@@ -346507,7 +346715,7 @@ async function teleportToRemote(options2) {
346507
346715
  type: "event",
346508
346716
  data: {
346509
346717
  type: "control_request",
346510
- request_id: `set-mode-${randomUUID32()}`,
346718
+ request_id: `set-mode-${randomUUID33()}`,
346511
346719
  request: {
346512
346720
  subtype: "set_permission_mode",
346513
346721
  mode: options2.permissionMode,
@@ -346520,7 +346728,7 @@ async function teleportToRemote(options2) {
346520
346728
  events2.push({
346521
346729
  type: "event",
346522
346730
  data: {
346523
- uuid: randomUUID32(),
346731
+ uuid: randomUUID33(),
346524
346732
  session_id: "",
346525
346733
  type: "user",
346526
346734
  parent_tool_use_id: null,
@@ -347835,12 +348043,12 @@ ${result.result}`
347835
348043
  });
347836
348044
 
347837
348045
  // src/services/lsp/LSPDiagnosticRegistry.ts
347838
- import { randomUUID as randomUUID33 } from "crypto";
348046
+ import { randomUUID as randomUUID34 } from "crypto";
347839
348047
  function registerPendingLSPDiagnostic({
347840
348048
  serverName,
347841
348049
  files
347842
348050
  }) {
347843
- const diagnosticId = randomUUID33();
348051
+ const diagnosticId = randomUUID34();
347844
348052
  logForDebugging(`LSP Diagnostics: Registering ${files.length} diagnostic file(s) from ${serverName} (ID: ${diagnosticId})`);
347845
348053
  pendingDiagnostics.set(diagnosticId, {
347846
348054
  serverName,
@@ -354120,7 +354328,7 @@ var init_powershellProvider = __esm(() => {
354120
354328
 
354121
354329
  // src/utils/Shell.ts
354122
354330
  import { execFileSync as execFileSync2, spawn as spawn9 } from "child_process";
354123
- import { constants as fsConstants5, readFileSync as readFileSync25, unlinkSync as unlinkSync6 } from "fs";
354331
+ import { constants as fsConstants5, readFileSync as readFileSync25, unlinkSync as unlinkSync7 } from "fs";
354124
354332
  import { mkdir as mkdir20, open as open11, realpath as realpath10 } from "fs/promises";
354125
354333
  import { isAbsolute as isAbsolute21, resolve as resolve32 } from "path";
354126
354334
  import { join as posixJoin3 } from "path/posix";
@@ -354314,7 +354522,7 @@ async function exec3(command, abortSignal, shellType, options2) {
354314
354522
  }
354315
354523
  }
354316
354524
  try {
354317
- unlinkSync6(nativeCwdFilePath);
354525
+ unlinkSync7(nativeCwdFilePath);
354318
354526
  } catch {}
354319
354527
  });
354320
354528
  return shellCommand;
@@ -361487,7 +361695,7 @@ var init_PowerShellTool = __esm(() => {
361487
361695
  });
361488
361696
 
361489
361697
  // src/utils/promptShellExecution.ts
361490
- import { randomUUID as randomUUID34 } from "crypto";
361698
+ import { randomUUID as randomUUID35 } from "crypto";
361491
361699
  async function executeShellCommandsInPrompt(text, context5, slashCommandName, shell) {
361492
361700
  let result = text;
361493
361701
  const shellTool = shell === "powershell" && isPowerShellToolEnabled() ? getPowerShellTool() : BashTool;
@@ -361503,7 +361711,7 @@ async function executeShellCommandsInPrompt(text, context5, slashCommandName, sh
361503
361711
  throw new MalformedCommandError(`Shell command permission check failed for pattern "${match[0]}": ${permissionResult.message || "Permission denied"}`);
361504
361712
  }
361505
361713
  const { data } = await shellTool.call({ command }, context5);
361506
- const toolResultBlock = await processToolResultBlock(shellTool, data, randomUUID34());
361714
+ const toolResultBlock = await processToolResultBlock(shellTool, data, randomUUID35());
361507
361715
  const output = typeof toolResultBlock.content === "string" ? toolResultBlock.content : formatBashOutput(data.stdout, data.stderr);
361508
361716
  result = result.replace(match[0], () => output);
361509
361717
  } catch (e) {
@@ -361582,15 +361790,15 @@ import {
361582
361790
  readlinkSync as readlinkSync2,
361583
361791
  readdirSync as readdirSync5,
361584
361792
  realpathSync as realpathSync9,
361585
- renameSync as renameSync9,
361586
- unlinkSync as unlinkSync7,
361793
+ renameSync as renameSync10,
361794
+ unlinkSync as unlinkSync8,
361587
361795
  writeFileSync as writeFileSync17
361588
361796
  } from "fs";
361589
361797
  import {
361590
361798
  createHash as createHash27,
361591
361799
  createPrivateKey as createPrivateKey2,
361592
361800
  createPublicKey as createPublicKey2,
361593
- randomUUID as randomUUID35,
361801
+ randomUUID as randomUUID36,
361594
361802
  sign as sign2,
361595
361803
  verify
361596
361804
  } from "crypto";
@@ -361936,7 +362144,7 @@ function signSkillDirectory(options2) {
361936
362144
  signedAt: options2.signedAt ?? new Date().toISOString()
361937
362145
  };
361938
362146
  const path13 = join95(inspected.canonicalPath, SKILL_INTEGRITY_MANIFEST);
361939
- const temporary = `${path13}.${process.pid}.${randomUUID35()}.tmp`;
362147
+ const temporary = `${path13}.${process.pid}.${randomUUID36()}.tmp`;
361940
362148
  try {
361941
362149
  writeFileSync17(temporary, `${JSON.stringify(manifest, null, 2)}
361942
362150
  `, {
@@ -361944,11 +362152,11 @@ function signSkillDirectory(options2) {
361944
362152
  flag: "wx",
361945
362153
  mode: 384
361946
362154
  });
361947
- renameSync9(temporary, path13);
362155
+ renameSync10(temporary, path13);
361948
362156
  chmodSync6(path13, 384);
361949
362157
  } finally {
361950
362158
  try {
361951
- unlinkSync7(temporary);
362159
+ unlinkSync8(temporary);
361952
362160
  } catch {}
361953
362161
  }
361954
362162
  return inspectSkillProvenance({
@@ -379440,7 +379648,7 @@ function isHumanTurn(m) {
379440
379648
 
379441
379649
  // src/utils/taskListRunContext.ts
379442
379650
  import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
379443
- import { randomUUID as randomUUID36 } from "crypto";
379651
+ import { randomUUID as randomUUID37 } from "crypto";
379444
379652
  function runWithTaskListRun(run2, fn) {
379445
379653
  return taskListRunStorage.run({ run: run2 }, fn);
379446
379654
  }
@@ -379470,6 +379678,15 @@ function requestsAppendToCurrentTaskList(input) {
379470
379678
  return false;
379471
379679
  return /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized) || /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active)\s+tasks\b/u.test(normalized) || /\b(?:add|append|put|queue)\s+(?:this|it)\s+(?:to|on)\s+(?:my|the|your)\s+(?:current\s+)?(?:task\s+)?list\b/u.test(normalized) || /\b(?:current|existing|active|same)\s+(?:task\s+)?list\b.{0,100}\b(?:add|append|put|queue)\b/u.test(normalized) || /\b(?:keep|continue|use)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized);
379472
379680
  }
379681
+ function requestsContinueCurrentTaskList(input) {
379682
+ const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase().replace(/[.!?]+$/gu, "").trim();
379683
+ if (!normalized || normalized.length > 80)
379684
+ return false;
379685
+ return /^(?:ok(?:ay)?|yes|yep|yup|sure|approved|i approve|looks good|sounds good)$/u.test(normalized) || /^(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized) || /^(?:ok(?:ay)?|yes|sure|approved|i approve)[, ]+(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized);
379686
+ }
379687
+ function shouldKeepCurrentTaskList(input) {
379688
+ return requestsAppendToCurrentTaskList(input) || requestsContinueCurrentTaskList(input);
379689
+ }
379473
379690
  function getTaskListRunForCommand(command, options2 = {}) {
379474
379691
  if (!command || command.mode !== "prompt" || command.isMeta)
379475
379692
  return;
@@ -379478,8 +379695,8 @@ function getTaskListRunForCommand(command, options2 = {}) {
379478
379695
  return;
379479
379696
  }
379480
379697
  return {
379481
- generationId: String(command.uuid ?? randomUUID36()),
379482
- appendToCurrent: requestsAppendToCurrentTaskList(text)
379698
+ generationId: String(command.uuid ?? randomUUID37()),
379699
+ appendToCurrent: shouldKeepCurrentTaskList(text)
379483
379700
  };
379484
379701
  }
379485
379702
  function getTaskListRunFromMessages(messages) {
@@ -379489,7 +379706,7 @@ function getTaskListRunFromMessages(messages) {
379489
379706
  }
379490
379707
  return {
379491
379708
  generationId: message.uuid,
379492
- appendToCurrent: requestsAppendToCurrentTaskList(textFromMessage(message))
379709
+ appendToCurrent: shouldKeepCurrentTaskList(textFromMessage(message))
379493
379710
  };
379494
379711
  }
379495
379712
  var taskListRunStorage;
@@ -379535,8 +379752,8 @@ EXCEPTION: none of the "skip" rules apply when the user explicitly asks for an i
379535
379752
  - **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
379536
379753
  - **description**: What needs to be done
379537
379754
  - **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., "Fixing authentication bug"). If omitted, the spinner shows the subject instead.
379538
- - **blocks** / **addBlocks** (optional): Task IDs this task blocks
379539
- - **blockedBy** / **addBlockedBy** (optional): Task IDs that block this task
379755
+ - **blocks** / **addBlocks** (optional): Existing task IDs this task blocks
379756
+ - **blockedBy** / **addBlockedBy** (optional): Existing task IDs that block this task
379540
379757
  - **addToCurrentList** (optional): Set to \`true\` only when the user explicitly asks to append to the current/existing task list. A normal new prompt starts a fresh list and archives the previous list as history.
379541
379758
 
379542
379759
  All tasks are created with status \`pending\`.
@@ -379544,7 +379761,8 @@ All tasks are created with status \`pending\`.
379544
379761
  ## Tips
379545
379762
 
379546
379763
  - Create tasks with clear, specific subjects that describe the outcome
379547
- - Provide dependencies during creation when known, or use TaskUpdate later to adjust them
379764
+ - Never guess task IDs or reference a task that has not been created yet. For a multi-task plan, create tasks without forward edges, wait for their real IDs, then use TaskUpdate to add dependency edges.
379765
+ - A task can depend only on an existing different task; never add a self-dependency.
379548
379766
  ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
379549
379767
  - Use TaskUpdate, not TaskCreate, for status or ownership changes
379550
379768
  - Do not set \`addToCurrentList\` merely because earlier tasks exist; it is reserved for explicit user intent such as "add this to the current list"
@@ -381146,7 +381364,7 @@ var init_systemPrompt = __esm(() => {
381146
381364
  });
381147
381365
 
381148
381366
  // src/tools/AgentTool/forkSubagent.ts
381149
- import { randomUUID as randomUUID37 } from "crypto";
381367
+ import { randomUUID as randomUUID38 } from "crypto";
381150
381368
  function isForkSubagentEnabled() {
381151
381369
  if (false) {}
381152
381370
  return false;
@@ -381164,7 +381382,7 @@ function isInForkChild(messages) {
381164
381382
  function buildForkedMessages(directive, assistantMessage) {
381165
381383
  const fullAssistantMessage = {
381166
381384
  ...assistantMessage,
381167
- uuid: randomUUID37(),
381385
+ uuid: randomUUID38(),
381168
381386
  message: {
381169
381387
  ...assistantMessage.message,
381170
381388
  content: [...assistantMessage.message.content]
@@ -383407,7 +383625,7 @@ async function getPrompt9(agentDefinitions, isCoordinator, allowedAgentTypes) {
383407
383625
 
383408
383626
  Fork yourself (omit \`subagent_type\`) when the intermediate tool output isn't worth keeping in your context. The criterion is qualitative \u2014 "will I need this output again" \u2014 not task size.
383409
383627
  - **Research**: fork open-ended questions. If research can be broken into independent questions, launch parallel forks in one message. A fork beats a fresh subagent for this \u2014 it inherits context and shares your cache.
383410
- - **Implementation**: prefer to fork implementation work that requires more than a couple of edits. Do research before jumping to implementation.
383628
+ - **Implementation**: fork only a bounded branch with explicit file scope. Parallel implementation forks must use isolated worktrees based on the exact clean starting revision; otherwise keep shared-checkout writers sequential. Do research before jumping to implementation.
383411
383629
 
383412
383630
  Forks are cheap because they share your prompt cache. Don't set \`model\` on a fork \u2014 a different model can't reuse the parent's cache. Pass a short \`name\` (one or two words, lowercase) so the user can see the fork in the teams panel and steer it mid-run.
383413
383631
 
@@ -383415,6 +383633,8 @@ Forks are cheap because they share your prompt cache. Don't set \`model\` on a f
383415
383633
 
383416
383634
  **Don't race.** After launching, you know nothing about what the fork found. Never fabricate or predict fork results in any format \u2014 not as prose, summary, or structured output. The notification arrives as a user-role message in a later turn; it is never something you write yourself. If the user asks a follow-up before the notification lands, tell them the fork is still running \u2014 give status, not a guess.
383417
383635
 
383636
+ **Parallelism policy.** Launch one agent per ready independent branch, with a useful default width of 2-3. Read-only branches can share the checkout. Unknown or mutating shared-checkout branches serialize, even when their descriptions sound independent. Do not mark the parent task complete until the result has returned and its acceptance evidence is verified.
383637
+
383418
383638
  **Writing a fork prompt.** Since the fork inherits your context, the prompt is a *directive* \u2014 what to do, not what the situation is. Be specific about scope: what's in, what's out, what another agent is handling. Don't re-explain background.
383419
383639
  ` : "";
383420
383640
  const writingThePromptSection = `
@@ -383586,6 +383806,7 @@ var init_AgentTool = __esm(() => {
383586
383806
  init_prompts4();
383587
383807
  init_coordinatorMode();
383588
383808
  init_agentSummary();
383809
+ init_parallelPolicy();
383589
383810
  init_growthbook();
383590
383811
  init_analytics();
383591
383812
  init_dumpPrompts();
@@ -383735,6 +383956,9 @@ var init_AgentTool = __esm(() => {
383735
383956
  throw new Error("In-process teammates cannot spawn background agents. Use run_in_background=false for synchronous subagents.");
383736
383957
  }
383737
383958
  if (teamName && name) {
383959
+ if (isolation || cwd2) {
383960
+ throw new Error("Team-spawned agents do not support `isolation` or `cwd` yet. Omit `name` to launch an isolated subagent, or omit isolation/cwd and keep shared-workspace writers serialized.");
383961
+ }
383738
383962
  const agentDef = subagent_type ? toolUseContext.options.agentDefinitions.activeAgents.find((a2) => a2.agentType === subagent_type) : undefined;
383739
383963
  if (agentDef?.color) {
383740
383964
  setAgentColor(subagent_type, agentDef.color);
@@ -384411,8 +384635,8 @@ ${finalMessage}`;
384411
384635
  const prefix = tags.length > 0 ? `(${tags.join(", ")}): ` : ": ";
384412
384636
  return `${prefix}${i3.prompt}`;
384413
384637
  },
384414
- isConcurrencySafe() {
384415
- return true;
384638
+ isConcurrencySafe(input) {
384639
+ return isDelegationConcurrencySafe(input);
384416
384640
  },
384417
384641
  userFacingName: userFacingName2,
384418
384642
  userFacingNameBackgroundColor,
@@ -389730,7 +389954,7 @@ function isAnyTracingEnabled() {
389730
389954
  return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
389731
389955
  }
389732
389956
  function getTracer() {
389733
- return import_api39.trace.getTracer("ur-agent.gen_ai", "1.78.7");
389957
+ return import_api39.trace.getTracer("ur-agent.gen_ai", "1.78.8");
389734
389958
  }
389735
389959
  function createSpanAttributes(spanType, customAttributes = {}) {
389736
389960
  const baseAttributes = getTelemetryAttributes();
@@ -394708,13 +394932,13 @@ var init_config7 = __esm(() => {
394708
394932
  });
394709
394933
 
394710
394934
  // src/query/deps.ts
394711
- import { randomUUID as randomUUID38 } from "crypto";
394935
+ import { randomUUID as randomUUID39 } from "crypto";
394712
394936
  function productionDeps() {
394713
394937
  return {
394714
394938
  callModel: queryModelWithStreaming,
394715
394939
  microcompact: microcompactMessages,
394716
394940
  autocompact: autoCompactIfNeeded,
394717
- uuid: randomUUID38
394941
+ uuid: randomUUID39
394718
394942
  };
394719
394943
  }
394720
394944
  var init_deps = __esm(() => {
@@ -396152,7 +396376,7 @@ function createDenialTrackingState() {
396152
396376
  var init_denialTracking = () => {};
396153
396377
 
396154
396378
  // src/utils/forkedAgent.ts
396155
- import { randomUUID as randomUUID39 } from "crypto";
396379
+ import { randomUUID as randomUUID40 } from "crypto";
396156
396380
  function saveCacheSafeParams(params) {
396157
396381
  lastCacheSafeParams = params;
396158
396382
  }
@@ -396261,7 +396485,7 @@ function createSubagentContext(parentContext, overrides) {
396261
396485
  agentId: overrides?.agentId ?? createAgentId(),
396262
396486
  agentType: overrides?.agentType,
396263
396487
  queryTracking: {
396264
- chainId: randomUUID39(),
396488
+ chainId: randomUUID40(),
396265
396489
  depth: (parentContext.queryTracking?.depth ?? -1) + 1
396266
396490
  },
396267
396491
  fileReadingLimits: parentContext.fileReadingLimits,
@@ -399392,7 +399616,7 @@ var init_toolSearch = __esm(() => {
399392
399616
  });
399393
399617
 
399394
399618
  // src/services/vcr.ts
399395
- import { createHash as createHash34, randomUUID as randomUUID40 } from "crypto";
399619
+ import { createHash as createHash34, randomUUID as randomUUID41 } from "crypto";
399396
399620
  import { mkdir as mkdir24, readFile as readFile33, writeFile as writeFile24 } from "fs/promises";
399397
399621
  import { dirname as dirname47, join as join114 } from "path";
399398
399622
  function shouldUseVCR() {
@@ -399445,7 +399669,7 @@ async function withVCR(messages, f) {
399445
399669
  try {
399446
399670
  const cached5 = jsonParse(await readFile33(filename, { encoding: "utf8" }));
399447
399671
  cached5.output.forEach(addCachedCostToTotalSessionCost);
399448
- return cached5.output.map((message, index2) => mapMessage(message, hydrateValue, index2, randomUUID40()));
399672
+ return cached5.output.map((message, index2) => mapMessage(message, hydrateValue, index2, randomUUID41()));
399449
399673
  } catch (e) {
399450
399674
  const code = getErrnoCode(e);
399451
399675
  if (code !== "ENOENT") {
@@ -399859,7 +400083,7 @@ var init_tokenEstimation = __esm(() => {
399859
400083
  });
399860
400084
 
399861
400085
  // src/utils/pdf.ts
399862
- import { randomUUID as randomUUID41 } from "crypto";
400086
+ import { randomUUID as randomUUID42 } from "crypto";
399863
400087
  import { mkdir as mkdir25, readdir as readdir16, readFile as readFile34 } from "fs/promises";
399864
400088
  import { join as join115 } from "path";
399865
400089
  async function readPDF(filePath) {
@@ -399970,7 +400194,7 @@ async function extractPDFPages(filePath, options2) {
399970
400194
  }
399971
400195
  };
399972
400196
  }
399973
- const uuid3 = randomUUID41();
400197
+ const uuid3 = randomUUID42();
399974
400198
  const outputDir = join115(getToolResultsDir(), `pdf-${uuid3}`);
399975
400199
  await mkdir25(outputDir, { recursive: true });
399976
400200
  const prefix = join115(outputDir, "page");
@@ -401611,7 +401835,7 @@ var init_findRelevantMemories = __esm(() => {
401611
401835
  // src/utils/attachments.ts
401612
401836
  import { readdir as readdir18, stat as stat32 } from "fs/promises";
401613
401837
  import { dirname as dirname48, parse as parse13, relative as relative29, resolve as resolve40 } from "path";
401614
- import { randomUUID as randomUUID42 } from "crypto";
401838
+ import { randomUUID as randomUUID43 } from "crypto";
401615
401839
  function isAttachment(value) {
401616
401840
  return typeof value === "object" && value !== null && "type" in value;
401617
401841
  }
@@ -402775,7 +402999,7 @@ function createAttachmentMessage(attachment) {
402775
402999
  return {
402776
403000
  attachment,
402777
403001
  type: "attachment",
402778
- uuid: randomUUID42(),
403002
+ uuid: randomUUID43(),
402779
403003
  timestamp: new Date().toISOString()
402780
403004
  };
402781
403005
  }
@@ -408643,7 +408867,7 @@ ${EXPLANATORY_FEATURE_PROMPT}`
408643
408867
  });
408644
408868
 
408645
408869
  // src/utils/messages.ts
408646
- import { randomUUID as randomUUID43 } from "crypto";
408870
+ import { randomUUID as randomUUID44 } from "crypto";
408647
408871
  function getTeammateMailbox() {
408648
408872
  return init_teammateMailbox(), __toCommonJS(exports_teammateMailbox);
408649
408873
  }
@@ -408706,10 +408930,10 @@ function baseCreateAssistantMessage({
408706
408930
  }) {
408707
408931
  return {
408708
408932
  type: "assistant",
408709
- uuid: randomUUID43(),
408933
+ uuid: randomUUID44(),
408710
408934
  timestamp: new Date().toISOString(),
408711
408935
  message: {
408712
- id: randomUUID43(),
408936
+ id: randomUUID44(),
408713
408937
  container: null,
408714
408938
  model: SYNTHETIC_MODEL,
408715
408939
  role: "assistant",
@@ -408790,7 +409014,7 @@ function createUserMessage({
408790
409014
  isVirtual,
408791
409015
  isCompactSummary,
408792
409016
  summarizeMetadata,
408793
- uuid: uuid3 || randomUUID43(),
409017
+ uuid: uuid3 || randomUUID44(),
408794
409018
  timestamp: timestamp ?? new Date().toISOString(),
408795
409019
  toolUseResult,
408796
409020
  mcpMeta,
@@ -408859,7 +409083,7 @@ function createProgressMessage({
408859
409083
  data,
408860
409084
  toolUseID,
408861
409085
  parentToolUseID,
408862
- uuid: randomUUID43(),
409086
+ uuid: randomUUID44(),
408863
409087
  timestamp: new Date().toISOString()
408864
409088
  };
408865
409089
  }
@@ -411231,7 +411455,7 @@ function createSystemMessage(content, level, toolUseID, preventContinuation) {
411231
411455
  content,
411232
411456
  isMeta: false,
411233
411457
  timestamp: new Date().toISOString(),
411234
- uuid: randomUUID43(),
411458
+ uuid: randomUUID44(),
411235
411459
  toolUseID,
411236
411460
  level,
411237
411461
  ...preventContinuation && { preventContinuation }
@@ -411246,7 +411470,7 @@ function createPermissionRetryMessage(commands) {
411246
411470
  level: "info",
411247
411471
  isMeta: false,
411248
411472
  timestamp: new Date().toISOString(),
411249
- uuid: randomUUID43()
411473
+ uuid: randomUUID44()
411250
411474
  };
411251
411475
  }
411252
411476
  function createStopHookSummaryMessage(hookCount, hookInfos, hookErrors, preventedContinuation, stopReason, hasOutput, level, toolUseID, hookLabel, totalDurationMs) {
@@ -411261,7 +411485,7 @@ function createStopHookSummaryMessage(hookCount, hookInfos, hookErrors, prevente
411261
411485
  hasOutput,
411262
411486
  level,
411263
411487
  timestamp: new Date().toISOString(),
411264
- uuid: randomUUID43(),
411488
+ uuid: randomUUID44(),
411265
411489
  toolUseID,
411266
411490
  hookLabel,
411267
411491
  totalDurationMs
@@ -411277,7 +411501,7 @@ function createTurnDurationMessage(durationMs, budget, messageCount) {
411277
411501
  budgetNudges: budget?.nudges,
411278
411502
  messageCount,
411279
411503
  timestamp: new Date().toISOString(),
411280
- uuid: randomUUID43(),
411504
+ uuid: randomUUID44(),
411281
411505
  isMeta: false
411282
411506
  };
411283
411507
  }
@@ -411287,7 +411511,7 @@ function createMemorySavedMessage(writtenPaths) {
411287
411511
  subtype: "memory_saved",
411288
411512
  writtenPaths,
411289
411513
  timestamp: new Date().toISOString(),
411290
- uuid: randomUUID43(),
411514
+ uuid: randomUUID44(),
411291
411515
  isMeta: false
411292
411516
  };
411293
411517
  }
@@ -411296,7 +411520,7 @@ function createAgentsKilledMessage() {
411296
411520
  type: "system",
411297
411521
  subtype: "agents_killed",
411298
411522
  timestamp: new Date().toISOString(),
411299
- uuid: randomUUID43(),
411523
+ uuid: randomUUID44(),
411300
411524
  isMeta: false
411301
411525
  };
411302
411526
  }
@@ -411307,7 +411531,7 @@ function createCommandInputMessage(content) {
411307
411531
  content,
411308
411532
  level: "info",
411309
411533
  timestamp: new Date().toISOString(),
411310
- uuid: randomUUID43(),
411534
+ uuid: randomUUID44(),
411311
411535
  isMeta: false
411312
411536
  };
411313
411537
  }
@@ -411318,7 +411542,7 @@ function createCompactBoundaryMessage(trigger, preTokens, lastPreCompactMessageU
411318
411542
  content: `Conversation compacted`,
411319
411543
  isMeta: false,
411320
411544
  timestamp: new Date().toISOString(),
411321
- uuid: randomUUID43(),
411545
+ uuid: randomUUID44(),
411322
411546
  level: "info",
411323
411547
  compactMetadata: {
411324
411548
  trigger,
@@ -411342,7 +411566,7 @@ function createSystemAPIErrorMessage(error40, retryInMs, retryAttempt, maxRetrie
411342
411566
  retryAttempt,
411343
411567
  maxRetries,
411344
411568
  timestamp: new Date().toISOString(),
411345
- uuid: randomUUID43()
411569
+ uuid: randomUUID44()
411346
411570
  };
411347
411571
  }
411348
411572
  function isCompactBoundaryMessage(message) {
@@ -411611,7 +411835,7 @@ function createToolUseSummaryMessage(summary, precedingToolUseIds) {
411611
411835
  type: "tool_use_summary",
411612
411836
  summary,
411613
411837
  precedingToolUseIds,
411614
- uuid: randomUUID43(),
411838
+ uuid: randomUUID44(),
411615
411839
  timestamp: new Date().toISOString()
411616
411840
  };
411617
411841
  }
@@ -419308,7 +419532,7 @@ var init_sideQuestion = __esm(() => {
419308
419532
  });
419309
419533
 
419310
419534
  // src/services/sideChats/sideChatStore.ts
419311
- import { createHash as createHash37, randomUUID as randomUUID44 } from "crypto";
419535
+ import { createHash as createHash37, randomUUID as randomUUID45 } from "crypto";
419312
419536
  import { existsSync as existsSync32, lstatSync as lstatSync9, readdirSync as readdirSync6 } from "fs";
419313
419537
  import { join as join132 } from "path";
419314
419538
  function digest2(value) {
@@ -419398,7 +419622,7 @@ function createSideChat(input) {
419398
419622
  const now5 = new Date().toISOString();
419399
419623
  const chat = {
419400
419624
  version: 1,
419401
- id: randomUUID44(),
419625
+ id: randomUUID45(),
419402
419626
  title,
419403
419627
  status: "open",
419404
419628
  parentSessionId: input.parentSessionId,
@@ -419478,7 +419702,7 @@ function appendSideChatExchange(id, userContent, assistantContent, options2 = {}
419478
419702
  ]) {
419479
419703
  const unsigned = {
419480
419704
  version: 1,
419481
- id: randomUUID44(),
419705
+ id: randomUUID45(),
419482
419706
  role,
419483
419707
  content,
419484
419708
  at: new Date().toISOString(),
@@ -419956,7 +420180,7 @@ function Feedback({
419956
420180
  platform: env2.platform,
419957
420181
  gitRepo: envInfo.isGit,
419958
420182
  terminal: env2.terminal,
419959
- version: "1.78.7",
420183
+ version: "1.78.8",
419960
420184
  transcript: normalizeMessagesForAPI(messages),
419961
420185
  errors: sanitizedErrors,
419962
420186
  lastApiRequest: getLastAPIRequest(),
@@ -420148,7 +420372,7 @@ function Feedback({
420148
420372
  ", ",
420149
420373
  env2.terminal,
420150
420374
  ", v",
420151
- "1.78.7"
420375
+ "1.78.8"
420152
420376
  ]
420153
420377
  }, undefined, true, undefined, this)
420154
420378
  ]
@@ -420254,7 +420478,7 @@ ${sanitizedDescription}
420254
420478
  ` + `**Environment Info**
420255
420479
  ` + `- Platform: ${env2.platform}
420256
420480
  ` + `- Terminal: ${env2.terminal}
420257
- ` + `- Version: ${"1.78.7"}
420481
+ ` + `- Version: ${"1.78.8"}
420258
420482
  ` + `- Feedback ID: ${feedbackId}
420259
420483
  ` + `
420260
420484
  **Errors**
@@ -421453,7 +421677,7 @@ var exports_conversation = {};
421453
421677
  __export(exports_conversation, {
421454
421678
  clearConversation: () => clearConversation
421455
421679
  });
421456
- import { randomUUID as randomUUID45 } from "crypto";
421680
+ import { randomUUID as randomUUID46 } from "crypto";
421457
421681
  async function clearConversation({
421458
421682
  setMessages,
421459
421683
  readFileState,
@@ -421495,7 +421719,7 @@ async function clearConversation({
421495
421719
  setMessages(() => []);
421496
421720
  if (false) {}
421497
421721
  if (setConversationId) {
421498
- setConversationId(randomUUID45());
421722
+ setConversationId(randomUUID46());
421499
421723
  }
421500
421724
  clearSessionCaches(preservedAgentIds);
421501
421725
  setCwd(getOriginalCwd());
@@ -423364,7 +423588,7 @@ function buildPrimarySection() {
423364
423588
  }, undefined, false, undefined, this);
423365
423589
  return [{
423366
423590
  label: "Version",
423367
- value: "1.78.7"
423591
+ value: "1.78.8"
423368
423592
  }, {
423369
423593
  label: "Session name",
423370
423594
  value: nameValue
@@ -426746,7 +426970,7 @@ function Config({
426746
426970
  }
426747
426971
  }, undefined, false, undefined, this)
426748
426972
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
426749
- currentVersion: "1.78.7",
426973
+ currentVersion: "1.78.8",
426750
426974
  onChoice: (choice) => {
426751
426975
  setShowSubmenu(null);
426752
426976
  setTabsHidden(false);
@@ -426758,7 +426982,7 @@ function Config({
426758
426982
  autoUpdatesChannel: "stable"
426759
426983
  };
426760
426984
  if (choice === "stay") {
426761
- newSettings.minimumVersion = "1.78.7";
426985
+ newSettings.minimumVersion = "1.78.8";
426762
426986
  }
426763
426987
  updateSettingsForSource("userSettings", newSettings);
426764
426988
  setSettingsData((prev_27) => ({
@@ -434822,7 +435046,7 @@ function HelpV2(t0) {
434822
435046
  let t6;
434823
435047
  if ($2[31] !== tabs) {
434824
435048
  t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
434825
- title: `UR v${"1.78.7"}`,
435049
+ title: `UR v${"1.78.8"}`,
434826
435050
  color: "professionalBlue",
434827
435051
  defaultTab: "general",
434828
435052
  children: tabs
@@ -435625,7 +435849,7 @@ __export(exports_acpServer, {
435625
435849
  handleAcpRequest: () => handleAcpRequest,
435626
435850
  getAcpServerPort: () => getAcpServerPort
435627
435851
  });
435628
- import { randomUUID as randomUUID46 } from "crypto";
435852
+ import { randomUUID as randomUUID47 } from "crypto";
435629
435853
  import { realpath as realpath13, stat as stat39 } from "fs/promises";
435630
435854
  import { isAbsolute as isAbsolute31, relative as relative34, resolve as resolve48, sep as sep32 } from "path";
435631
435855
  function jsonResponse2(status, body) {
@@ -435656,7 +435880,7 @@ function rpcError(id, code, message, data) {
435656
435880
  return { jsonrpc: "2.0", id, error: { code, message, data } };
435657
435881
  }
435658
435882
  function createAcpId() {
435659
- return `acp_${Date.now().toString(36)}_${randomUUID46().slice(0, 8)}`;
435883
+ return `acp_${Date.now().toString(36)}_${randomUUID47().slice(0, 8)}`;
435660
435884
  }
435661
435885
  function now6() {
435662
435886
  return new Date().toISOString();
@@ -435755,7 +435979,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
435755
435979
  async function handleInitialize(options2) {
435756
435980
  return {
435757
435981
  name: "UR",
435758
- version: "1.78.7",
435982
+ version: "1.78.8",
435759
435983
  protocolVersion: "0.1.0",
435760
435984
  workspaceRoot: options2.cwd,
435761
435985
  capabilities: {
@@ -435783,7 +436007,7 @@ async function handleSessionNew(params, options2) {
435783
436007
  reserveSessionCapacity();
435784
436008
  const createdAt = now6();
435785
436009
  const session = {
435786
- id: `sess_${randomUUID46()}`,
436010
+ id: `sess_${randomUUID47()}`,
435787
436011
  cwd: cwd2,
435788
436012
  createdAt,
435789
436013
  lastUsedAt: createdAt,
@@ -435913,7 +436137,7 @@ async function handleToolsCall(params, _options) {
435913
436137
  throw new AcpRpcError(-32602, `invalid input: ${validationResult.message}`);
435914
436138
  }
435915
436139
  const parentMessage = createAssistantMessage({ content: [] });
435916
- const permissionDecision = await hasPermissionsToUseTool(tool, parsedArgs, context6, parentMessage, randomUUID46());
436140
+ const permissionDecision = await hasPermissionsToUseTool(tool, parsedArgs, context6, parentMessage, randomUUID47());
435917
436141
  if (permissionDecision.behavior !== "allow") {
435918
436142
  throw new AcpRpcError(-32003, permissionDecision.message || `tool ${name} requires interactive approval, which is unavailable over ACP`);
435919
436143
  }
@@ -452863,7 +453087,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
452863
453087
  return [];
452864
453088
  }
452865
453089
  }
452866
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.78.7") {
453090
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.78.8") {
452867
453091
  if (process.env.USER_TYPE === "ant") {
452868
453092
  const changelog = "";
452869
453093
  if (changelog) {
@@ -452890,7 +453114,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.78.7")
452890
453114
  releaseNotes
452891
453115
  };
452892
453116
  }
452893
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.78.7") {
453117
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.78.8") {
452894
453118
  if (process.env.USER_TYPE === "ant") {
452895
453119
  const changelog = "";
452896
453120
  if (changelog) {
@@ -455756,7 +455980,7 @@ function getRecentActivitySync() {
455756
455980
  return cachedActivity;
455757
455981
  }
455758
455982
  function getLogoDisplayData() {
455759
- const version2 = process.env.DEMO_VERSION ?? "1.78.7";
455983
+ const version2 = process.env.DEMO_VERSION ?? "1.78.8";
455760
455984
  const serverUrl = getDirectConnectServerUrl();
455761
455985
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
455762
455986
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -456623,7 +456847,7 @@ function LogoV2() {
456623
456847
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
456624
456848
  t2 = () => {
456625
456849
  const currentConfig2 = getGlobalConfig();
456626
- if (currentConfig2.lastReleaseNotesSeen === "1.78.7") {
456850
+ if (currentConfig2.lastReleaseNotesSeen === "1.78.8") {
456627
456851
  return;
456628
456852
  }
456629
456853
  saveGlobalConfig(_temp325);
@@ -457308,12 +457532,12 @@ function LogoV2() {
457308
457532
  return t41;
457309
457533
  }
457310
457534
  function _temp325(current) {
457311
- if (current.lastReleaseNotesSeen === "1.78.7") {
457535
+ if (current.lastReleaseNotesSeen === "1.78.8") {
457312
457536
  return current;
457313
457537
  }
457314
457538
  return {
457315
457539
  ...current,
457316
- lastReleaseNotesSeen: "1.78.7"
457540
+ lastReleaseNotesSeen: "1.78.8"
457317
457541
  };
457318
457542
  }
457319
457543
  function _temp241(s_0) {
@@ -463577,7 +463801,7 @@ var init_resume2 = __esm(() => {
463577
463801
  });
463578
463802
 
463579
463803
  // src/utils/sessionImport.ts
463580
- import { randomUUID as randomUUID47 } from "crypto";
463804
+ import { randomUUID as randomUUID48 } from "crypto";
463581
463805
  import {
463582
463806
  copyFileSync as copyFileSync2,
463583
463807
  existsSync as existsSync34,
@@ -463637,9 +463861,9 @@ function importSessionFile(sourcePath) {
463637
463861
  - ${validation.errors.join(`
463638
463862
  - `)}`);
463639
463863
  }
463640
- let sessionId = randomUUID47();
463864
+ let sessionId = randomUUID48();
463641
463865
  while (sessionIdExists(sessionId))
463642
- sessionId = randomUUID47();
463866
+ sessionId = randomUUID48();
463643
463867
  const target = getTranscriptPathForSession(sessionId);
463644
463868
  mkdirSync21(dirname64(target), { recursive: true });
463645
463869
  copyFileSync2(source, target);
@@ -467965,7 +468189,7 @@ var init_InProcessTeammateDetailDialog = __esm(() => {
467965
468189
  });
467966
468190
 
467967
468191
  // src/utils/messages/mappers.ts
467968
- import { randomUUID as randomUUID48 } from "crypto";
468192
+ import { randomUUID as randomUUID49 } from "crypto";
467969
468193
  function toInternalMessages(messages) {
467970
468194
  return messages.flatMap((message) => {
467971
468195
  switch (message.type) {
@@ -467984,7 +468208,7 @@ function toInternalMessages(messages) {
467984
468208
  {
467985
468209
  type: "user",
467986
468210
  message: message.message,
467987
- uuid: message.uuid ?? randomUUID48(),
468211
+ uuid: message.uuid ?? randomUUID49(),
467988
468212
  timestamp: message.timestamp ?? new Date().toISOString(),
467989
468213
  isMeta: message.isSynthetic
467990
468214
  }
@@ -473178,7 +473402,7 @@ var init_guardrails = __esm(() => {
473178
473402
  });
473179
473403
 
473180
473404
  // src/services/agents/agenticCi.ts
473181
- import { createHash as createHash38, randomUUID as randomUUID49 } from "crypto";
473405
+ import { createHash as createHash38, randomUUID as randomUUID50 } from "crypto";
473182
473406
  import {
473183
473407
  existsSync as existsSync41,
473184
473408
  mkdtempSync,
@@ -473830,7 +474054,7 @@ async function runAgenticCi(options2) {
473830
474054
  ...args
473831
474055
  ] : args, commandCwd, timeoutMs, env4);
473832
474056
  const outputRoot = safeOutputRoot(cwd2, options2.outputDir);
473833
- const runId = `${Date.now().toString(36)}-${randomUUID49().slice(0, 8)}`;
474057
+ const runId = `${Date.now().toString(36)}-${randomUUID50().slice(0, 8)}`;
473834
474058
  const manifestPath5 = manifestPathFor(outputRoot, runId);
473835
474059
  const eventDecision = options2.event !== undefined ? decideAgenticCiEvent(options2.spec, options2.event, options2.eventName) : undefined;
473836
474060
  const publishContract = buildPublishContract(options2.spec, eventDecision);
@@ -474127,7 +474351,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
474127
474351
  if (spec.name !== specName) {
474128
474352
  throw new Error("Agentic CI workflow spec name does not match");
474129
474353
  }
474130
- const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.78.7" : "1.78.7");
474354
+ const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.78.8" : "1.78.8");
474131
474355
  if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
474132
474356
  throw new Error("invalid ur-agent package version");
474133
474357
  }
@@ -475120,7 +475344,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
475120
475344
  path: ".github/workflows/ur.yml",
475121
475345
  root: "project",
475122
475346
  content: compileAgenticCiWorkflow("default", {
475123
- packageVersion: typeof MACRO !== "undefined" ? "1.78.7" : "1.78.7"
475347
+ packageVersion: typeof MACRO !== "undefined" ? "1.78.8" : "1.78.8"
475124
475348
  })
475125
475349
  },
475126
475350
  {
@@ -475183,7 +475407,7 @@ function value(tokens, flag) {
475183
475407
  return index2 >= 0 ? tokens[index2 + 1] : undefined;
475184
475408
  }
475185
475409
  function cliVersion() {
475186
- return typeof MACRO !== "undefined" ? "1.78.7" : "1.78.7";
475410
+ return typeof MACRO !== "undefined" ? "1.78.8" : "1.78.8";
475187
475411
  }
475188
475412
  function workflowPath(cwd2) {
475189
475413
  return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
@@ -480054,7 +480278,7 @@ import {
480054
480278
  mkdtempSync as mkdtempSync2,
480055
480279
  readdirSync as readdirSync11,
480056
480280
  readFileSync as readFileSync44,
480057
- renameSync as renameSync10,
480281
+ renameSync as renameSync11,
480058
480282
  rmSync as rmSync11,
480059
480283
  statSync as statSync17,
480060
480284
  writeFileSync as writeFileSync29
@@ -480063,7 +480287,7 @@ import { tmpdir as tmpdir13 } from "os";
480063
480287
  import { isAbsolute as isAbsolute35, join as join160 } from "path";
480064
480288
  import { Readable as Readable6, Writable as Writable4 } from "stream";
480065
480289
  import { StringDecoder as StringDecoder3 } from "string_decoder";
480066
- import { randomUUID as randomUUID50 } from "crypto";
480290
+ import { randomUUID as randomUUID51 } from "crypto";
480067
480291
  function invalidParams2(message) {
480068
480292
  throw RequestError.invalidParams(undefined, message);
480069
480293
  }
@@ -480282,7 +480506,7 @@ function persistAcpSession(sessionId, state, storeRoot) {
480282
480506
  createdAt: state.createdAt,
480283
480507
  updatedAt: state.updatedAt
480284
480508
  };
480285
- const temporary = `${path22}.${process.pid}.${randomUUID50()}.tmp`;
480509
+ const temporary = `${path22}.${process.pid}.${randomUUID51()}.tmp`;
480286
480510
  try {
480287
480511
  writeFileSync29(temporary, `${JSON.stringify(record3, null, 2)}
480288
480512
  `, {
@@ -480290,7 +480514,7 @@ function persistAcpSession(sessionId, state, storeRoot) {
480290
480514
  flag: "wx",
480291
480515
  mode: 384
480292
480516
  });
480293
- renameSync10(temporary, path22);
480517
+ renameSync11(temporary, path22);
480294
480518
  chmodSync7(path22, 384);
480295
480519
  } finally {
480296
480520
  rmSync11(temporary, { force: true });
@@ -480675,7 +480899,7 @@ function createRuntime2(deps) {
480675
480899
  };
480676
480900
  const newSession = (cwd2 = deps.cwd, mcpServers = [], additionalDirectories = []) => {
480677
480901
  assertCapacity();
480678
- const sessionId = randomUUID50();
480902
+ const sessionId = randomUUID51();
480679
480903
  const now7 = new Date().toISOString();
480680
480904
  const state = {
480681
480905
  cwd: validateSessionCwd(cwd2),
@@ -480794,7 +481018,7 @@ function createRuntime2(deps) {
480794
481018
  }
480795
481019
  recordHistory(sessionId, session2, {
480796
481020
  sessionUpdate: "user_message_chunk",
480797
- messageId: randomUUID50(),
481021
+ messageId: randomUUID51(),
480798
481022
  content: { type: "text", text }
480799
481023
  });
480800
481024
  await client2.onUpdate({
@@ -480802,7 +481026,7 @@ function createRuntime2(deps) {
480802
481026
  title: session2.title,
480803
481027
  updatedAt: session2.updatedAt
480804
481028
  });
480805
- const agentMessageId = randomUUID50();
481029
+ const agentMessageId = randomUUID51();
480806
481030
  const emitAndRecord = async (update) => {
480807
481031
  recordHistory(sessionId, session2, update);
480808
481032
  await client2.onUpdate(update);
@@ -481039,7 +481263,7 @@ function createAcpStdioApp(deps) {
481039
481263
  }
481040
481264
  },
481041
481265
  authMethods: [],
481042
- agentInfo: { name: "UR-Nexus", version: "1.78.7" }
481266
+ agentInfo: { name: "UR-Nexus", version: "1.78.8" }
481043
481267
  })).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
481044
481268
  const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
481045
481269
  await runtime2.announce({
@@ -481136,7 +481360,7 @@ function createAcpStdioAgent(deps) {
481136
481360
  }
481137
481361
  },
481138
481362
  authMethods: [],
481139
- agentInfo: { name: "UR-Nexus", version: "1.78.7" }
481363
+ agentInfo: { name: "UR-Nexus", version: "1.78.8" }
481140
481364
  });
481141
481365
  return;
481142
481366
  case "authenticate":
@@ -481486,7 +481710,7 @@ var MAX_STDERR_CHARS, MAX_STREAM_LINE_CHARS, DEFAULT_PROMPT_TIMEOUT_MS, MAX_ADDI
481486
481710
  });
481487
481711
  writeChildMessage({
481488
481712
  type: "control_request",
481489
- request_id: randomUUID50(),
481713
+ request_id: randomUUID51(),
481490
481714
  request: { subtype: "initialize" }
481491
481715
  });
481492
481716
  writeChildMessage({
@@ -481894,7 +482118,7 @@ var init_connect2 = __esm(() => {
481894
482118
 
481895
482119
  // src/services/agents/scheduler.ts
481896
482120
  import { createHash as createHash39 } from "crypto";
481897
- import { existsSync as existsSync45, mkdirSync as mkdirSync31, unlinkSync as unlinkSync8, writeFileSync as writeFileSync30 } from "fs";
482121
+ import { existsSync as existsSync45, mkdirSync as mkdirSync31, unlinkSync as unlinkSync9, writeFileSync as writeFileSync30 } from "fs";
481898
482122
  import { homedir as homedir31 } from "os";
481899
482123
  import { join as join161 } from "path";
481900
482124
  function defaultBin() {
@@ -482048,7 +482272,7 @@ function uninstallScheduler(cwd2, platform5 = detectPlatform()) {
482048
482272
  const path22 = launchdPlistPath(cwd2);
482049
482273
  const existed = existsSync45(path22);
482050
482274
  if (existed)
482051
- unlinkSync8(path22);
482275
+ unlinkSync9(path22);
482052
482276
  return {
482053
482277
  platform: platform5,
482054
482278
  installed: false,
@@ -482063,7 +482287,7 @@ function uninstallScheduler(cwd2, platform5 = detectPlatform()) {
482063
482287
  const removed = [];
482064
482288
  for (const p2 of [servicePath, timerPath]) {
482065
482289
  if (existsSync45(p2)) {
482066
- unlinkSync8(p2);
482290
+ unlinkSync9(p2);
482067
482291
  removed.push(p2);
482068
482292
  }
482069
482293
  }
@@ -482135,7 +482359,7 @@ import {
482135
482359
  mkdirSync as mkdirSync32,
482136
482360
  readdirSync as readdirSync12,
482137
482361
  readFileSync as readFileSync46,
482138
- unlinkSync as unlinkSync9,
482362
+ unlinkSync as unlinkSync10,
482139
482363
  writeFileSync as writeFileSync31
482140
482364
  } from "fs";
482141
482365
  import { join as join162 } from "path";
@@ -482484,7 +482708,7 @@ Expected a 5-field cron expression with a next run in the next year.`
482484
482708
  if (!existsSync46(path22)) {
482485
482709
  return { type: "text", value: `Automation not found: ${sanitizeName3(name)}` };
482486
482710
  }
482487
- unlinkSync9(path22);
482711
+ unlinkSync10(path22);
482488
482712
  return { type: "text", value: `Deleted automation ${sanitizeName3(name)}` };
482489
482713
  }
482490
482714
  return { type: "text", value: usage7() };
@@ -482847,7 +483071,7 @@ function isClearlyReadOnlyTask(task) {
482847
483071
  const description = `${task.title}
482848
483072
  ${task.description}
482849
483073
  ${task.input.prompt}`;
482850
- return READ_ONLY_TASK_PATTERN.test(description) && !MUTATING_TASK_PATTERN.test(description);
483074
+ return isClearlyReadOnlyWork(description);
482851
483075
  }
482852
483076
  function canonicalLockKey(cwd2, value2) {
482853
483077
  const absolute = resolve56(cwd2, value2);
@@ -483315,17 +483539,26 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses, maxAgen
483315
483539
  }
483316
483540
  task.status = "running";
483317
483541
  emitStatus(options2, task, tasks2, lastStatuses, maxAgents2, config3, boardState);
483318
- const workspaceBefore = captureWorkspaceFileState(options2.cwd);
483542
+ let workspaceBefore;
483543
+ let workspaceAfter;
483319
483544
  let result;
483320
- try {
483321
- result = normalizeExecutionResult(await options2.executeTask(task));
483322
- } catch (error40) {
483323
- result = {
483324
- ok: false,
483325
- error: error40 instanceof Error ? error40.message : String(error40)
483326
- };
483545
+ const executeWithEvidence = async () => {
483546
+ workspaceBefore = captureWorkspaceFileState(options2.cwd);
483547
+ try {
483548
+ result = normalizeExecutionResult(await options2.executeTask(task));
483549
+ } catch (error40) {
483550
+ result = {
483551
+ ok: false,
483552
+ error: error40 instanceof Error ? error40.message : String(error40)
483553
+ };
483554
+ }
483555
+ workspaceAfter = captureWorkspaceFileState(options2.cwd);
483556
+ };
483557
+ if (options2.executionGate) {
483558
+ await options2.executionGate(task, executeWithEvidence);
483559
+ } else {
483560
+ await executeWithEvidence();
483327
483561
  }
483328
- const workspaceAfter = captureWorkspaceFileState(options2.cwd);
483329
483562
  const actualChangedFiles = unique2([
483330
483563
  ...diffWorkspaceFileState(workspaceBefore, workspaceAfter),
483331
483564
  ...result.observedChangedFiles ?? []
@@ -483466,13 +483699,12 @@ async function runPromptPlan(plan, options2) {
483466
483699
  await Promise.race(running);
483467
483700
  }
483468
483701
  }
483469
- var READ_ONLY_TASK_PATTERN, MUTATING_TASK_PATTERN, EXECUTION_STRING_ARRAY_FIELDS;
483702
+ var EXECUTION_STRING_ARRAY_FIELDS;
483470
483703
  var init_executor2 = __esm(() => {
483471
483704
  init_config10();
483472
483705
  init_evidence3();
483473
483706
  init_validation5();
483474
- READ_ONLY_TASK_PATTERN = /^\s*(?:analy[sz]e|audit|compare|explain|inspect|list|plan|read|review)\b/i;
483475
- MUTATING_TASK_PATTERN = /\b(?:add|address|apply|build|bump|changes?|correct|create|delete|deploy|edit|enhance|execute|export|fix|format|generate|harden|implement|improve|install|modify|move|optimi[sz]e|patch|publish|refactor|remove|rename|repair|resolve|run|save|scaffold|update|write)\b/i;
483707
+ init_parallelPolicy();
483476
483708
  EXECUTION_STRING_ARRAY_FIELDS = [
483477
483709
  "changedFiles",
483478
483710
  "reportedChangedFiles",
@@ -483486,7 +483718,7 @@ var init_executor2 = __esm(() => {
483486
483718
  });
483487
483719
 
483488
483720
  // src/services/promptPlanning/planner.ts
483489
- import { randomUUID as randomUUID51 } from "crypto";
483721
+ import { randomUUID as randomUUID52 } from "crypto";
483490
483722
  import { isAbsolute as isAbsolute37, relative as relative42, resolve as resolve57, sep as sep41 } from "path";
483491
483723
  function compact2(value2) {
483492
483724
  return value2.replace(/\s+/g, " ").trim();
@@ -483511,7 +483743,11 @@ function extractReferencedFiles(text) {
483511
483743
  continue;
483512
483744
  if (value2.includes("://"))
483513
483745
  continue;
483514
- paths2.push(value2.replace(/[),.;:]+$/g, ""));
483746
+ const candidate = value2.replace(/[),.;:]+$/g, "");
483747
+ const firstSegment = candidate.replace(/^\.{0,2}\//, "").split("/")[0];
483748
+ const looksLikePath = candidate.startsWith(".") || candidate.includes(".") || /^(?:README|CHANGELOG|RELEASE|SECURITY|CONTRIBUTING|QUALITY|LICENSE)$/i.test(candidate) || firstSegment !== undefined && PATH_ROOT_HINTS.has(firstSegment);
483749
+ if (looksLikePath)
483750
+ paths2.push(candidate);
483515
483751
  }
483516
483752
  for (const match of text.matchAll(ABSOLUTE_PATH_PATTERN)) {
483517
483753
  const value2 = match[1];
@@ -483569,12 +483805,18 @@ function splitLongPrompt(prompt) {
483569
483805
  if (bulletSegments.length > 0)
483570
483806
  return boundTaskCount(bulletSegments);
483571
483807
  const trimmed = compact2(prompt);
483572
- if (trimmed.length < 220 && !/[;\n]/.test(prompt))
483808
+ const hasInlineDirectiveBoundary = /[.!?]\s+(?=(?:then|after|once|next|finally|before|verify|validate|test|run|create|add|update|fix|implement|build|bump|publish|report|summari[sz]e)\b)/i.test(trimmed);
483809
+ if (trimmed.length < 220 && !/[;\n]/.test(prompt) && !hasInlineDirectiveBoundary) {
483573
483810
  return [trimmed];
483811
+ }
483574
483812
  const lines = prompt.split(/\r?\n+/).map(compact2).filter(Boolean);
483575
483813
  if (lines.length >= 2)
483576
483814
  return boundTaskCount(lines);
483577
- const sentenceSegments = trimmed.split(/(?<=[.!?])\s+(?=[A-Z0-9])/).map(compact2).filter(Boolean);
483815
+ const semicolonSegments = trimmed.split(/\s*;\s*/).map(compact2).filter(Boolean);
483816
+ if (semicolonSegments.length >= 2) {
483817
+ return boundTaskCount(semicolonSegments);
483818
+ }
483819
+ const sentenceSegments = trimmed.split(/(?<=[.!?])\s+(?=[A-Za-z0-9])/).map(compact2).filter(Boolean);
483578
483820
  if (sentenceSegments.length >= 2)
483579
483821
  return boundTaskCount(sentenceSegments);
483580
483822
  const directiveSegments = trimmed.split(/\s+(?:then|also|next|finally)\s+/i).map(compact2).filter(Boolean);
@@ -483741,7 +483983,7 @@ function decomposePrompt(prompt, config3, workspaceRoot) {
483741
483983
  return task;
483742
483984
  });
483743
483985
  return {
483744
- id: `plan-${randomUUID51()}`,
483986
+ id: `plan-${randomUUID52()}`,
483745
483987
  originalPrompt,
483746
483988
  tasks: tasks2,
483747
483989
  assumptions: unique3(tasks2.flatMap((task) => task.input.assumptions)),
@@ -483749,7 +483991,7 @@ function decomposePrompt(prompt, config3, workspaceRoot) {
483749
483991
  config: resolvedConfig
483750
483992
  };
483751
483993
  }
483752
- var URL_PATTERN, PATH_PATTERN, ABSOLUTE_PATH_PATTERN, DESTRUCTIVE_PATTERN, WRITE_PATTERN, READ_PATTERN, NETWORK_PATTERN, CREDENTIAL_PATTERN, SECURITY_PATTERN, AUTHORIZED_SECURITY_PATTERN, CREATE_TARGET_PATTERN, STANDALONE_DIRECTIVE_PATTERN, MAX_PLANNED_TASKS = 12;
483994
+ var URL_PATTERN, PATH_PATTERN, ABSOLUTE_PATH_PATTERN, DESTRUCTIVE_PATTERN, WRITE_PATTERN, READ_PATTERN, NETWORK_PATTERN, CREDENTIAL_PATTERN, SECURITY_PATTERN, AUTHORIZED_SECURITY_PATTERN, CREATE_TARGET_PATTERN, STANDALONE_DIRECTIVE_PATTERN, MAX_PLANNED_TASKS = 12, PATH_ROOT_HINTS;
483753
483995
  var init_planner = __esm(() => {
483754
483996
  init_config10();
483755
483997
  URL_PATTERN = /\bhttps?:\/\/[^\s)]+/gi;
@@ -483764,6 +484006,24 @@ var init_planner = __esm(() => {
483764
484006
  AUTHORIZED_SECURITY_PATTERN = /\b(authorized|authorization|owned|own\s+system|my\s+(?:app|site|server|service)|localhost|127\.0\.0\.1|::1|lab|sandbox|ctf|test\s+target)\b/i;
483765
484007
  CREATE_TARGET_PATTERN = /\b(?:create|generate|scaffold)\b|^\s*(?:add|write)\s+(?:a|an|new)\b/i;
483766
484008
  STANDALONE_DIRECTIVE_PATTERN = /^(?:then|after|once|next|finally|before|verify|validate|test|run|create|add|update|fix|implement|build|bump|publish|report|summari[sz]e)\b/i;
484009
+ PATH_ROOT_HINTS = new Set([
484010
+ "app",
484011
+ "apps",
484012
+ "bin",
484013
+ "config",
484014
+ "docs",
484015
+ "documentation",
484016
+ "examples",
484017
+ "lib",
484018
+ "packages",
484019
+ "plugins",
484020
+ "public",
484021
+ "scripts",
484022
+ "src",
484023
+ "test",
484024
+ "tests",
484025
+ "technical"
484026
+ ]);
483767
484027
  });
483768
484028
 
483769
484029
  // src/services/promptPlanning/index.ts
@@ -484167,6 +484427,7 @@ function aggregateTask(prompt, plan, run3, cwd2) {
484167
484427
  async function runPromptPlans(prompts, opts) {
484168
484428
  const config3 = resolvePromptPlanningConfig(opts.planning);
484169
484429
  const executeTask = opts.executePlannedTask ?? defaultPlannedTaskExecutor(opts);
484430
+ const executionGate = createSharedWorkspaceExecutionGate();
484170
484431
  const results = new Array(prompts.length);
484171
484432
  let nextIndex = 0;
484172
484433
  const workers = Array.from({ length: Math.min(Math.max(1, opts.concurrency), prompts.length) }, async () => {
@@ -484182,6 +484443,7 @@ async function runPromptPlans(prompts, opts) {
484182
484443
  cwd: opts.cwd,
484183
484444
  config: config3,
484184
484445
  executeTask,
484446
+ executionGate,
484185
484447
  onEvent: (event) => {
484186
484448
  if (event.type === "board") {
484187
484449
  boardHistory.push(event.board);
@@ -484191,6 +484453,13 @@ async function runPromptPlans(prompts, opts) {
484191
484453
  opts.onPlanningEvent?.(event);
484192
484454
  }
484193
484455
  });
484456
+ recordOutcomes(opts.cwd, run3.taskResults.filter((record3) => record3.execution !== undefined).map((record3) => ({
484457
+ id: `exec:${plan.id}:${record3.taskId}`,
484458
+ task: record3.task.input.prompt,
484459
+ model: opts.model ?? null,
484460
+ pass: record3.task.status === "finished" && record3.postVerification?.ok === true,
484461
+ detail: `planned task ${record3.task.status}: ${record3.task.title}`
484462
+ })));
484194
484463
  const completedPlan = { ...plan, tasks: run3.tasks };
484195
484464
  const taskBoard = config3.showTaskBoard ? renderTaskBoard(completedPlan, { maxAgents: run3.maxAgentsAllowed }) : undefined;
484196
484465
  const finalReport = buildExecFinalReport(run3);
@@ -484215,6 +484484,42 @@ async function runPromptPlans(prompts, opts) {
484215
484484
  await Promise.all(workers);
484216
484485
  return results;
484217
484486
  }
484487
+ function createSharedWorkspaceExecutionGate() {
484488
+ const queue2 = [];
484489
+ let activeReaders = 0;
484490
+ let writerActive = false;
484491
+ const pump2 = () => {
484492
+ if (writerActive || queue2.length === 0)
484493
+ return;
484494
+ if (!queue2[0].readOnly) {
484495
+ if (activeReaders > 0)
484496
+ return;
484497
+ writerActive = true;
484498
+ queue2.shift().start();
484499
+ return;
484500
+ }
484501
+ while (queue2[0]?.readOnly && !writerActive) {
484502
+ activeReaders += 1;
484503
+ queue2.shift().start();
484504
+ }
484505
+ };
484506
+ return async (task, execute) => {
484507
+ const readOnly2 = isClearlyReadOnlyTask(task);
484508
+ await new Promise((resolve58) => {
484509
+ queue2.push({ readOnly: readOnly2, start: resolve58 });
484510
+ pump2();
484511
+ });
484512
+ try {
484513
+ return await execute();
484514
+ } finally {
484515
+ if (readOnly2)
484516
+ activeReaders -= 1;
484517
+ else
484518
+ writerActive = false;
484519
+ pump2();
484520
+ }
484521
+ };
484522
+ }
484218
484523
  async function runExecPool(prompts, opts) {
484219
484524
  if (prompts.length === 0) {
484220
484525
  return [];
@@ -484374,6 +484679,7 @@ var init_exec2 = __esm(() => {
484374
484679
  init_argumentSubstitution();
484375
484680
  init_cwd2();
484376
484681
  init_promptPlanning();
484682
+ init_learning();
484377
484683
  init_execFileNoThrow();
484378
484684
  init_git();
484379
484685
  });
@@ -486712,15 +487018,15 @@ var exports_skill = {};
486712
487018
  __export(exports_skill, {
486713
487019
  call: () => call70
486714
487020
  });
486715
- import { generateKeyPairSync as generateKeyPairSync2, randomUUID as randomUUID52 } from "crypto";
487021
+ import { generateKeyPairSync as generateKeyPairSync2, randomUUID as randomUUID53 } from "crypto";
486716
487022
  import {
486717
487023
  chmodSync as chmodSync8,
486718
487024
  existsSync as existsSync53,
486719
487025
  lstatSync as lstatSync14,
486720
487026
  mkdirSync as mkdirSync38,
486721
487027
  readFileSync as readFileSync51,
486722
- renameSync as renameSync11,
486723
- unlinkSync as unlinkSync10,
487028
+ renameSync as renameSync12,
487029
+ unlinkSync as unlinkSync11,
486724
487030
  writeFileSync as writeFileSync37
486725
487031
  } from "fs";
486726
487032
  import { homedir as homedir32 } from "os";
@@ -486793,18 +487099,18 @@ function readPrivateKey(path22) {
486793
487099
  function writeTrustedKeys(keys2) {
486794
487100
  const path22 = trustedSkillKeysPath();
486795
487101
  mkdirSync38(dirname70(path22), { recursive: true, mode: 448 });
486796
- const temporary = `${path22}.${process.pid}.${randomUUID52()}.tmp`;
487102
+ const temporary = `${path22}.${process.pid}.${randomUUID53()}.tmp`;
486797
487103
  try {
486798
487104
  writeFileSync37(temporary, `${JSON.stringify(keys2, null, 2)}
486799
487105
  `, {
486800
487106
  flag: "wx",
486801
487107
  mode: 384
486802
487108
  });
486803
- renameSync11(temporary, path22);
487109
+ renameSync12(temporary, path22);
486804
487110
  chmodSync8(path22, 384);
486805
487111
  } finally {
486806
487112
  try {
486807
- unlinkSync10(temporary);
487113
+ unlinkSync11(temporary);
486808
487114
  } catch {}
486809
487115
  }
486810
487116
  }
@@ -486904,9 +487210,9 @@ Keep the private key secret and backed up.`
486904
487210
  };
486905
487211
  } catch (error40) {
486906
487212
  if (createdPublic)
486907
- unlinkSync10(publicPath);
487213
+ unlinkSync11(publicPath);
486908
487214
  if (createdPrivate)
486909
- unlinkSync10(privatePath);
487215
+ unlinkSync11(privatePath);
486910
487216
  return {
486911
487217
  type: "text",
486912
487218
  value: `Key generation failed: ${error40 instanceof Error ? error40.message : error40}`
@@ -487723,7 +488029,7 @@ var init_recipe2 = __esm(() => {
487723
488029
  });
487724
488030
 
487725
488031
  // src/services/agents/arena.ts
487726
- import { createHash as createHash41, randomUUID as randomUUID53 } from "crypto";
488032
+ import { createHash as createHash41, randomUUID as randomUUID54 } from "crypto";
487727
488033
  import {
487728
488034
  existsSync as existsSync58,
487729
488035
  mkdirSync as mkdirSync40,
@@ -488298,7 +488604,7 @@ async function runArena(task, options2) {
488298
488604
  const baseSha = validBase ? base2.stdout.trim() : "";
488299
488605
  const agents = requestedAgents;
488300
488606
  const runner2 = options2.runner ?? (options2.dryRun ? makeDryHeadlessRunner() : defaultHeadlessRunner());
488301
- const runId = `${Date.now().toString(36)}-${randomUUID53().slice(0, 8)}`;
488607
+ const runId = `${Date.now().toString(36)}-${randomUUID54().slice(0, 8)}`;
488302
488608
  const prompt = `${cleanTask}
488303
488609
 
488304
488610
  Implement this fully and correctly. Make focused changes. End your reply with VERDICT: PASS or VERDICT: FAIL.`;
@@ -488482,7 +488788,7 @@ var init_arena = __esm(() => {
488482
488788
  });
488483
488789
 
488484
488790
  // src/services/agents/cloudManagedRunner.ts
488485
- import { randomUUID as randomUUID54 } from "crypto";
488791
+ import { randomUUID as randomUUID55 } from "crypto";
488486
488792
  function resultOutput(result) {
488487
488793
  if (result.subtype === "success")
488488
488794
  return result.result ?? "";
@@ -488572,7 +488878,7 @@ function createDefaultManagedCloudClient() {
488572
488878
  async steer(sessionId, message, requestId) {
488573
488879
  const { sendEventToRemoteSession: sendEventToRemoteSession2 } = await Promise.resolve().then(() => (init_api2(), exports_api));
488574
488880
  return sendEventToRemoteSession2(sessionId, message, {
488575
- uuid: requestId || randomUUID54()
488881
+ uuid: requestId || randomUUID55()
488576
488882
  });
488577
488883
  },
488578
488884
  async cancel(sessionId) {
@@ -488584,7 +488890,7 @@ function createDefaultManagedCloudClient() {
488584
488890
  var init_cloudManagedRunner = () => {};
488585
488891
 
488586
488892
  // src/services/agents/cloudTasks.ts
488587
- import { createHash as createHash42, randomUUID as randomUUID55 } from "crypto";
488893
+ import { createHash as createHash42, randomUUID as randomUUID56 } from "crypto";
488588
488894
  import { spawn as spawn14 } from "child_process";
488589
488895
  import {
488590
488896
  appendFileSync as appendFileSync7,
@@ -488594,9 +488900,9 @@ import {
488594
488900
  mkdirSync as mkdirSync41,
488595
488901
  openSync as openSync10,
488596
488902
  readFileSync as readFileSync55,
488597
- renameSync as renameSync12,
488903
+ renameSync as renameSync13,
488598
488904
  statSync as statSync19,
488599
- unlinkSync as unlinkSync11,
488905
+ unlinkSync as unlinkSync12,
488600
488906
  writeFileSync as writeFileSync41
488601
488907
  } from "fs";
488602
488908
  import { join as join176 } from "path";
@@ -488781,7 +489087,7 @@ function saveManifest4(cwd2, manifest) {
488781
489087
  }
488782
489088
  const destination = manifestPath5(cwd2);
488783
489089
  assertSafeStateNode(destination, "file");
488784
- const temporary = `${destination}.${process.pid}.${randomUUID55()}.tmp`;
489090
+ const temporary = `${destination}.${process.pid}.${randomUUID56()}.tmp`;
488785
489091
  const serialized = `${JSON.stringify(manifest, null, 2)}
488786
489092
  `;
488787
489093
  if (Buffer.byteLength(serialized, "utf8") > MAX_CLOUD_MANIFEST_BYTES) {
@@ -488791,10 +489097,10 @@ function saveManifest4(cwd2, manifest) {
488791
489097
  writeFileSync41(temporary, serialized, {
488792
489098
  mode: 384
488793
489099
  });
488794
- renameSync12(temporary, destination);
489100
+ renameSync13(temporary, destination);
488795
489101
  } finally {
488796
489102
  if (existsSync59(temporary))
488797
- unlinkSync11(temporary);
489103
+ unlinkSync12(temporary);
488798
489104
  }
488799
489105
  }
488800
489106
  function withManifestMutation(cwd2, operation) {
@@ -488860,7 +489166,7 @@ function createCloudTask(cwd2, input) {
488860
489166
  const attempts = boundedAttempts(input.attempts);
488861
489167
  const runner2 = input.runner ?? "local";
488862
489168
  const task = {
488863
- id: `cl-${Date.now().toString(36)}-${randomUUID55().slice(0, 8)}`,
489169
+ id: `cl-${Date.now().toString(36)}-${randomUUID56().slice(0, 8)}`,
488864
489170
  task: taskText,
488865
489171
  attempts,
488866
489172
  status: "queued",
@@ -489230,7 +489536,7 @@ ${safeOutput}`.trim()) : persisted.output;
489230
489536
  return settleManagedTask(cwd2, id);
489231
489537
  }
489232
489538
  async function steerCloudTask(cwd2, id, message, options2 = {}) {
489233
- const requestId = options2.requestId ?? randomUUID55();
489539
+ const requestId = options2.requestId ?? randomUUID56();
489234
489540
  if (!isSafeTaskId2(requestId)) {
489235
489541
  return {
489236
489542
  accepted: false,
@@ -489448,7 +489754,7 @@ async function runCloudWorker(cwd2, id, options2 = {}) {
489448
489754
  completed = true;
489449
489755
  });
489450
489756
  if (!completed) {
489451
- unlinkSync11(resultDestination);
489757
+ unlinkSync12(resultDestination);
489452
489758
  return;
489453
489759
  }
489454
489760
  recordOutcome(cwd2, {
@@ -491066,7 +491372,7 @@ import {
491066
491372
  mkdirSync as mkdirSync45,
491067
491373
  readFileSync as readFileSync61,
491068
491374
  readdirSync as readdirSync24,
491069
- renameSync as renameSync13,
491375
+ renameSync as renameSync14,
491070
491376
  statSync as statSync24,
491071
491377
  writeFileSync as writeFileSync45
491072
491378
  } from "fs";
@@ -491209,7 +491515,7 @@ function quarantineMemoryStore(dir, now8 = new Date) {
491209
491515
  if (!existsSync65(from))
491210
491516
  continue;
491211
491517
  const to = join184(quarantineDir, entry.file.replace(/[/\\]/g, "__"));
491212
- renameSync13(from, to);
491518
+ renameSync14(from, to);
491213
491519
  quarantined.push(entry.file);
491214
491520
  }
491215
491521
  recordManifest(dir);
@@ -492457,17 +492763,20 @@ var init_knowledge3 = __esm(() => {
492457
492763
  });
492458
492764
 
492459
492765
  // src/services/agents/crew.ts
492460
- import { createHash as createHash44, randomUUID as randomUUID56 } from "crypto";
492766
+ import { createHash as createHash44, randomUUID as randomUUID57 } from "crypto";
492461
492767
  import {
492462
492768
  existsSync as existsSync67,
492463
492769
  mkdirSync as mkdirSync48,
492464
492770
  readdirSync as readdirSync26,
492465
492771
  readFileSync as readFileSync63,
492466
- renameSync as renameSync14,
492467
- unlinkSync as unlinkSync12,
492772
+ renameSync as renameSync15,
492773
+ unlinkSync as unlinkSync13,
492468
492774
  writeFileSync as writeFileSync48
492469
492775
  } from "fs";
492470
492776
  import { join as join188 } from "path";
492777
+ function isCrewTaskReadOnly(task) {
492778
+ return isClearlyReadOnlyWork(task.title);
492779
+ }
492471
492780
  function crewDir(cwd2) {
492472
492781
  return join188(cwd2, ".ur", "crew");
492473
492782
  }
@@ -492531,16 +492840,16 @@ function withCrewLock(cwd2, name, operation) {
492531
492840
  function writeCrew(cwd2, spec) {
492532
492841
  mkdirSync48(crewDir(cwd2), { recursive: true });
492533
492842
  const destination = crewPath(cwd2, spec.name);
492534
- const temporary = `${destination}.${process.pid}.${randomUUID56()}.tmp`;
492843
+ const temporary = `${destination}.${process.pid}.${randomUUID57()}.tmp`;
492535
492844
  try {
492536
492845
  writeFileSync48(temporary, `${JSON.stringify(spec, null, 2)}
492537
492846
  `, {
492538
492847
  mode: 384
492539
492848
  });
492540
- renameSync14(temporary, destination);
492849
+ renameSync15(temporary, destination);
492541
492850
  } finally {
492542
492851
  if (existsSync67(temporary))
492543
- unlinkSync12(temporary);
492852
+ unlinkSync13(temporary);
492544
492853
  }
492545
492854
  }
492546
492855
  function saveCrew(cwd2, spec) {
@@ -492551,7 +492860,7 @@ function deleteCrew(cwd2, name) {
492551
492860
  const path22 = crewPath(cwd2, name);
492552
492861
  if (!existsSync67(path22))
492553
492862
  return false;
492554
- unlinkSync12(path22);
492863
+ unlinkSync13(path22);
492555
492864
  return true;
492556
492865
  });
492557
492866
  }
@@ -492660,7 +492969,7 @@ function addCrewTask(cwd2, name, instruction) {
492660
492969
  return updated;
492661
492970
  });
492662
492971
  }
492663
- function claimNextTaskUnlocked(cwd2, name, worker, maxAttempts = Number.MAX_SAFE_INTEGER) {
492972
+ function claimNextTaskUnlocked(cwd2, name, worker, maxAttempts = Number.MAX_SAFE_INTEGER, policy = {}) {
492664
492973
  const spec = loadCrew(cwd2, name);
492665
492974
  if (!spec)
492666
492975
  return null;
@@ -492696,7 +493005,8 @@ function claimNextTaskUnlocked(cwd2, name, worker, maxAttempts = Number.MAX_SAFE
492696
493005
  boardChanged = true;
492697
493006
  }
492698
493007
  }
492699
- const task = spec.tasks.find((item) => item.status === "todo" && (item.dependsOn ?? []).every((dep) => byId.get(dep)?.status === "done"));
493008
+ const activeClaims = spec.tasks.filter((item) => item.status === "claimed");
493009
+ const task = spec.tasks.find((item) => item.status === "todo" && (item.dependsOn ?? []).every((dep) => byId.get(dep)?.status === "done") && (!policy.serializeSharedMutations || policy.isolatedWrites || activeClaims.every((active3) => isCrewTaskReadOnly(item) && isCrewTaskReadOnly(active3))));
492700
493010
  if (!task && !spec.tasks.some((item) => item.status === "claimed")) {
492701
493011
  const stranded = spec.tasks.filter((item) => item.status === "todo");
492702
493012
  if (stranded.length > 0) {
@@ -492728,8 +493038,8 @@ function claimNextTaskUnlocked(cwd2, name, worker, maxAttempts = Number.MAX_SAFE
492728
493038
  writeCrew(cwd2, spec);
492729
493039
  return task;
492730
493040
  }
492731
- function claimNextTask(cwd2, name, worker, maxAttempts = Number.MAX_SAFE_INTEGER) {
492732
- return withCrewLock(cwd2, name, () => claimNextTaskUnlocked(cwd2, name, worker, maxAttempts));
493041
+ function claimNextTask(cwd2, name, worker, maxAttempts = Number.MAX_SAFE_INTEGER, policy = {}) {
493042
+ return withCrewLock(cwd2, name, () => claimNextTaskUnlocked(cwd2, name, worker, maxAttempts, policy));
492733
493043
  }
492734
493044
  function completeTaskUnlocked(cwd2, name, taskId, result) {
492735
493045
  const spec = loadCrew(cwd2, name);
@@ -492934,7 +493244,10 @@ async function runCrew(name, options2) {
492934
493244
  let count5 = 0;
492935
493245
  let cancellationEmitted = false;
492936
493246
  while (!options2.signal?.aborted) {
492937
- let task = claimNextTask(cwd2, name, workerId, maxAttempts);
493247
+ let task = claimNextTask(cwd2, name, workerId, maxAttempts, {
493248
+ serializeSharedMutations: true,
493249
+ isolatedWrites: options2.dryRun === true || options2.worktrees === true && !options2.runnerFor
493250
+ });
492938
493251
  if (!task)
492939
493252
  break;
492940
493253
  options2.onEvent?.({
@@ -493142,6 +493455,15 @@ async function runCrew(name, options2) {
493142
493455
  throw workerFailures[0];
493143
493456
  }
493144
493457
  const finalSpec = loadCrew(cwd2, name) ?? baseSpec;
493458
+ if (!options2.dryRun) {
493459
+ recordOutcomes(cwd2, finalSpec.tasks.filter((task) => task.status === "done" || task.status === "failed").map((task) => ({
493460
+ id: `crew:${baseSpec.createdAt}:${task.id}:attempt-${task.attempts ?? 1}`,
493461
+ task: task.title,
493462
+ model: null,
493463
+ pass: task.status === "done" && task.verdict !== "FAIL",
493464
+ detail: `crew ${name} ${task.status}: ${task.title}`
493465
+ })));
493466
+ }
493145
493467
  return { name, workers: spawned, progress: crewProgress(finalSpec), handled };
493146
493468
  }
493147
493469
  function formatCrewList(crews, json2) {
@@ -493204,6 +493526,8 @@ var init_crew = __esm(() => {
493204
493526
  init_execFileNoThrow();
493205
493527
  init_json();
493206
493528
  init_cliStepRunner();
493529
+ init_learning();
493530
+ init_parallelPolicy();
493207
493531
  crewLockWaitArray = new Int32Array(new SharedArrayBuffer(4));
493208
493532
  });
493209
493533
 
@@ -493250,6 +493574,66 @@ function inferTests(goal) {
493250
493574
  tests.push("existing test suite");
493251
493575
  return tests;
493252
493576
  }
493577
+ function validatedModelTasks(value2) {
493578
+ if (!Array.isArray(value2) || value2.length === 0)
493579
+ return null;
493580
+ if (value2.length > MAX_DECOMPOSED_TASKS)
493581
+ return null;
493582
+ const raw = value2;
493583
+ const ids = new Set;
493584
+ for (const task of raw) {
493585
+ if (!task || typeof task !== "object" || Array.isArray(task))
493586
+ return null;
493587
+ if (typeof task.id !== "string" || !task.id.trim() || ids.has(task.id)) {
493588
+ return null;
493589
+ }
493590
+ if (typeof task.goal !== "string" || !task.goal.trim())
493591
+ return null;
493592
+ ids.add(task.id);
493593
+ }
493594
+ const dependencies = new Map;
493595
+ for (const task of raw) {
493596
+ const taskId = task.id;
493597
+ const values2 = task.dependsOn === undefined ? [] : task.dependsOn;
493598
+ if (!Array.isArray(values2) || values2.some((dependency) => typeof dependency !== "string" || dependency === taskId || !ids.has(dependency))) {
493599
+ return null;
493600
+ }
493601
+ dependencies.set(taskId, [...new Set(values2)]);
493602
+ }
493603
+ const visiting = new Set;
493604
+ const visited = new Set;
493605
+ const visit2 = (id) => {
493606
+ if (visiting.has(id))
493607
+ return false;
493608
+ if (visited.has(id))
493609
+ return true;
493610
+ visiting.add(id);
493611
+ for (const dependency of dependencies.get(id) ?? []) {
493612
+ if (!visit2(dependency))
493613
+ return false;
493614
+ }
493615
+ visiting.delete(id);
493616
+ visited.add(id);
493617
+ return true;
493618
+ };
493619
+ if ([...ids].some((id) => !visit2(id)))
493620
+ return null;
493621
+ return raw.map((task) => {
493622
+ const goal = task.goal.trim();
493623
+ const filesTouched = Array.isArray(task.filesTouched) ? task.filesTouched.filter((file2) => typeof file2 === "string" && file2.trim() !== "") : [];
493624
+ const testsRequired = Array.isArray(task.testsRequired) ? task.testsRequired.filter((test2) => typeof test2 === "string" && test2.trim() !== "") : [];
493625
+ const risk = task.risk === "low" || task.risk === "medium" || task.risk === "high" ? task.risk : riskLevelFromKeywords(goal, filesTouched);
493626
+ return {
493627
+ id: task.id,
493628
+ goal,
493629
+ dependsOn: dependencies.get(task.id),
493630
+ filesTouched,
493631
+ risk,
493632
+ testsRequired: testsRequired.length > 0 ? testsRequired : inferTests(goal),
493633
+ rollbackPoint: typeof task.rollbackPoint === "string" && task.rollbackPoint.trim() ? task.rollbackPoint : "HEAD"
493634
+ };
493635
+ });
493636
+ }
493253
493637
  function decomposePrompt2(goal) {
493254
493638
  return [
493255
493639
  "Decompose the following engineering goal into atomic subtasks.",
@@ -493294,15 +493678,17 @@ async function decomposeTask(goal, options2) {
493294
493678
  maxTurns: 10
493295
493679
  });
493296
493680
  const parsed = safeParseJSON(out.output, false);
493297
- if (parsed && typeof parsed === "object" && Array.isArray(parsed.tasks)) {
493298
- const tasks2 = parsed.tasks;
493681
+ if (parsed && typeof parsed === "object") {
493682
+ const tasks2 = validatedModelTasks(parsed.tasks);
493683
+ if (!tasks2)
493684
+ return deterministicDecomposition(goal, rollbackPoint);
493299
493685
  return tasks2.map((t) => ({
493300
493686
  ...t,
493301
- dependsOn: Array.isArray(t.dependsOn) ? [...new Set(t.dependsOn.filter((dep) => typeof dep === "string" && dep !== t.id))] : [],
493302
- rollbackPoint: t.rollbackPoint ?? rollbackPoint,
493303
- filesTouched: Array.isArray(t.filesTouched) ? t.filesTouched : [],
493304
- testsRequired: Array.isArray(t.testsRequired) ? t.testsRequired : inferTests(t.goal),
493305
- risk: ["low", "medium", "high"].includes(t.risk) ? t.risk : riskLevelFromKeywords(t.goal, t.filesTouched)
493687
+ dependsOn: t.dependsOn ?? [],
493688
+ rollbackPoint: !t.rollbackPoint || t.rollbackPoint === "HEAD" ? rollbackPoint : t.rollbackPoint,
493689
+ filesTouched: t.filesTouched,
493690
+ testsRequired: t.testsRequired,
493691
+ risk: t.risk
493306
493692
  }));
493307
493693
  }
493308
493694
  return deterministicDecomposition(goal, rollbackPoint);
@@ -493328,7 +493714,7 @@ function formatDecomposition(result, json2) {
493328
493714
  return lines.join(`
493329
493715
  `);
493330
493716
  }
493331
- var HIGH_RISK_KEYWORDS, MEDIUM_RISK_KEYWORDS, LOW_RISK_KEYWORDS;
493717
+ var MAX_DECOMPOSED_TASKS = 12, HIGH_RISK_KEYWORDS, MEDIUM_RISK_KEYWORDS, LOW_RISK_KEYWORDS;
493332
493718
  var init_decomposer = __esm(() => {
493333
493719
  init_execFileNoThrow();
493334
493720
  init_json();
@@ -493526,7 +493912,7 @@ var init_crew3 = __esm(() => {
493526
493912
  });
493527
493913
 
493528
493914
  // src/services/agents/goals.ts
493529
- import { existsSync as existsSync68, mkdirSync as mkdirSync49, readdirSync as readdirSync27, readFileSync as readFileSync64, unlinkSync as unlinkSync13, writeFileSync as writeFileSync49 } from "fs";
493915
+ import { existsSync as existsSync68, mkdirSync as mkdirSync49, readdirSync as readdirSync27, readFileSync as readFileSync64, unlinkSync as unlinkSync14, writeFileSync as writeFileSync49 } from "fs";
493530
493916
  import { join as join189 } from "path";
493531
493917
  function goalsDir(cwd2) {
493532
493918
  return join189(cwd2, ".ur", "goals");
@@ -493599,7 +493985,7 @@ function deleteGoal(cwd2, name) {
493599
493985
  const path22 = goalPath(cwd2, name);
493600
493986
  if (!existsSync68(path22))
493601
493987
  return false;
493602
- unlinkSync13(path22);
493988
+ unlinkSync14(path22);
493603
493989
  return true;
493604
493990
  }
493605
493991
  function formatGoalList(goals, json2) {
@@ -495448,7 +495834,7 @@ import {
495448
495834
  chmodSync as chmodSync10,
495449
495835
  existsSync as existsSync73,
495450
495836
  lstatSync as lstatSync16,
495451
- renameSync as renameSync15
495837
+ renameSync as renameSync16
495452
495838
  } from "fs";
495453
495839
  import { join as join194 } from "path";
495454
495840
  function learningDir2(cwd2) {
@@ -495614,7 +496000,7 @@ function learnedWorkflowLoop(workflow2) {
495614
496000
  maxIterations: 2
495615
496001
  };
495616
496002
  }
495617
- function wilsonLowerBound(pass, total) {
496003
+ function wilsonLowerBound2(pass, total) {
495618
496004
  if (total <= 0)
495619
496005
  return 0;
495620
496006
  const z = 1.959963984540054;
@@ -495649,7 +496035,7 @@ function mineLearnedPlaybooks(cwd2, options2 = {}) {
495649
496035
  const generated = [];
495650
496036
  for (const [fingerprint2, group] of grouped) {
495651
496037
  const successful = group.filter((run3) => run3.passed);
495652
- const lower = wilsonLowerBound(successful.length, group.length);
496038
+ const lower = wilsonLowerBound2(successful.length, group.length);
495653
496039
  if (successful.length < minSuccessfulRuns || lower < minWilson)
495654
496040
  continue;
495655
496041
  const category = routeIntent(group[0].task).category || "general";
@@ -495818,7 +496204,7 @@ function disableLearnedPlaybook(cwd2, id, options2 = {}) {
495818
496204
  }
495819
496205
  if (!options2.dryRun) {
495820
496206
  ensurePrivateDirectory(learningDir2(cwd2), archiveDir);
495821
- renameSync15(promotedPath, archivePath);
496207
+ renameSync16(promotedPath, archivePath);
495822
496208
  chmodSync10(archivePath, 384);
495823
496209
  }
495824
496210
  }
@@ -496930,10 +497316,10 @@ import {
496930
497316
  readdirSync as readdirSync29,
496931
497317
  rmSync as rmSync16,
496932
497318
  statSync as statSync26,
496933
- unlinkSync as unlinkSync14,
497319
+ unlinkSync as unlinkSync15,
496934
497320
  writeFileSync as writeFileSync54
496935
497321
  } from "fs";
496936
- import { randomUUID as randomUUID57 } from "crypto";
497322
+ import { randomUUID as randomUUID58 } from "crypto";
496937
497323
  import {
496938
497324
  basename as basename47,
496939
497325
  extname as extname17,
@@ -497110,7 +497496,7 @@ function collectEvidence(runDir, warnings) {
497110
497496
  for (const entry of [...entries]) {
497111
497497
  if (entry.sizeBytes <= MAX_EVIDENCE_FILE_BYTES)
497112
497498
  continue;
497113
- unlinkSync14(entry.file);
497499
+ unlinkSync15(entry.file);
497114
497500
  entries.splice(entries.indexOf(entry), 1);
497115
497501
  warnings.push(`Removed oversized ${entry.role} evidence (${entry.sizeBytes} bytes; limit 256 MiB).`);
497116
497502
  }
@@ -497118,7 +497504,7 @@ function collectEvidence(runDir, warnings) {
497118
497504
  for (const entry of [...entries].sort((a2, b) => b.sizeBytes - a2.sizeBytes)) {
497119
497505
  if (total <= MAX_EVIDENCE_TOTAL_BYTES)
497120
497506
  break;
497121
- unlinkSync14(entry.file);
497507
+ unlinkSync15(entry.file);
497122
497508
  entries.splice(entries.indexOf(entry), 1);
497123
497509
  total -= entry.sizeBytes;
497124
497510
  warnings.push(`Removed ${entry.role} evidence to stay within the 512 MiB run limit.`);
@@ -497139,7 +497525,7 @@ async function runDesktopQaFixture(cwd2, input, options2 = {}) {
497139
497525
  throw new Error(`Fixture requests ${fixture.driver}, but the injected driver is ${driver.name}`);
497140
497526
  }
497141
497527
  validateDesktopQaLaunchPolicy(cwd2, fixture, options2.allowOutsideWorkspace ?? false);
497142
- const id = safeRunId(options2.runId ?? randomUUID57());
497528
+ const id = safeRunId(options2.runId ?? randomUUID58());
497143
497529
  const runDir = join197(cwd2, ".ur", "desktop-qa", "runs", id);
497144
497530
  if (existsSync76(runDir)) {
497145
497531
  throw new Error(`Desktop QA run directory already exists: ${runDir}`);
@@ -499939,7 +500325,7 @@ import {
499939
500325
  rmSync as rmSync17,
499940
500326
  writeFileSync as writeFileSync58
499941
500327
  } from "fs";
499942
- import { randomUUID as randomUUID58 } from "crypto";
500328
+ import { randomUUID as randomUUID59 } from "crypto";
499943
500329
  import { join as join201 } from "path";
499944
500330
  function evaluateEvalGate(report, thresholds, baseline) {
499945
500331
  const checks4 = [];
@@ -500544,7 +500930,7 @@ async function createEvalWorktree(cwd2, caseId) {
500544
500930
  }
500545
500931
  const safeId2 = caseId.replace(/[^a-z0-9_-]/gi, "-").slice(0, 40);
500546
500932
  const root2 = join201(cwd2, ".ur", "evals", ".worktrees");
500547
- const path22 = join201(root2, `${safeId2}-${randomUUID58().slice(0, 8)}`);
500933
+ const path22 = join201(root2, `${safeId2}-${randomUUID59().slice(0, 8)}`);
500548
500934
  ensurePrivateDirectory(join201(cwd2, ".ur"), root2);
500549
500935
  const created = await execFileNoThrowWithCwd("git", [
500550
500936
  ...SAFE_EVAL_GIT_ARGS,
@@ -502584,7 +502970,7 @@ var init_os2 = __esm(() => {
502584
502970
  });
502585
502971
 
502586
502972
  // src/services/agents/workspaceCoordinator.ts
502587
- import { createHash as createHash47, randomUUID as randomUUID59 } from "crypto";
502973
+ import { createHash as createHash47, randomUUID as randomUUID60 } from "crypto";
502588
502974
  import { existsSync as existsSync83, lstatSync as lstatSync19, realpathSync as realpathSync15, rmSync as rmSync18 } from "fs";
502589
502975
  import { tmpdir as tmpdir16 } from "os";
502590
502976
  import { dirname as dirname76, isAbsolute as isAbsolute43, join as join204, relative as relative49, resolve as resolve66 } from "path";
@@ -503072,7 +503458,7 @@ async function runWorkspace(cwd2, name, options3 = {}) {
503072
503458
  if (prior?.status === "running") {
503073
503459
  throw new Error("Workspace already has a running state; use --resume");
503074
503460
  }
503075
- const runId = randomUUID59();
503461
+ const runId = randomUUID60();
503076
503462
  const now8 = new Date().toISOString();
503077
503463
  state = {
503078
503464
  version: 1,
@@ -503192,7 +503578,7 @@ async function runVerificationCommand(command5, cwd2, runner2 = defaultCommandRu
503192
503578
  return process.platform === "win32" ? runner2("cmd.exe", ["/d", "/s", "/c", command5], cwd2) : runner2("/bin/sh", ["-lc", command5], cwd2);
503193
503579
  }
503194
503580
  async function workspaceTreeDigest(worktree2) {
503195
- const temporaryIndex = join204(tmpdir16(), `ur-workspace-index-${process.pid}-${randomUUID59()}`);
503581
+ const temporaryIndex = join204(tmpdir16(), `ur-workspace-index-${process.pid}-${randomUUID60()}`);
503196
503582
  const env4 = {
503197
503583
  ...strictSubprocessEnv(),
503198
503584
  GIT_INDEX_FILE: temporaryIndex
@@ -674171,13 +674557,13 @@ import {
674171
674557
  mkdirSync as mkdirSync63,
674172
674558
  readFileSync as readFileSync80,
674173
674559
  realpathSync as realpathSync16,
674174
- renameSync as renameSync16,
674560
+ renameSync as renameSync17,
674175
674561
  rmSync as rmSync19,
674176
674562
  rmdirSync as rmdirSync2,
674177
674563
  statSync as statSync30,
674178
674564
  writeFileSync as writeFileSync63
674179
674565
  } from "fs";
674180
- import { randomUUID as randomUUID60 } from "crypto";
674566
+ import { randomUUID as randomUUID61 } from "crypto";
674181
674567
  function groupByFile2(edits) {
674182
674568
  const groups = new Map;
674183
674569
  for (const edit2 of edits) {
@@ -674246,10 +674632,10 @@ function workspaceRelativePath(root2, file2) {
674246
674632
  }
674247
674633
  function atomicWrite(path22, content, mode) {
674248
674634
  mkdirSync63(dirname79(path22), { recursive: true });
674249
- const temp = resolve68(dirname79(path22), `.${randomUUID60()}.ur-repo-edit.tmp`);
674635
+ const temp = resolve68(dirname79(path22), `.${randomUUID61()}.ur-repo-edit.tmp`);
674250
674636
  try {
674251
674637
  writeFileSync63(temp, content, { flag: "wx", ...mode !== undefined ? { mode } : {} });
674252
- renameSync16(temp, path22);
674638
+ renameSync17(temp, path22);
674253
674639
  if (mode !== undefined)
674254
674640
  chmodSync11(path22, mode);
674255
674641
  } finally {
@@ -684049,7 +684435,7 @@ __export(exports_branch, {
684049
684435
  deriveFirstPrompt: () => deriveFirstPrompt,
684050
684436
  call: () => call146
684051
684437
  });
684052
- import { randomUUID as randomUUID61 } from "crypto";
684438
+ import { randomUUID as randomUUID62 } from "crypto";
684053
684439
  import { mkdir as mkdir35, readFile as readFile48, writeFile as writeFile39 } from "fs/promises";
684054
684440
  function deriveFirstPrompt(firstUserMessage) {
684055
684441
  if (firstUserMessage?.type !== "user")
@@ -684063,7 +684449,7 @@ function deriveFirstPrompt(firstUserMessage) {
684063
684449
  return raw.replace(/\s+/g, " ").trim().slice(0, 100) || "Branched conversation";
684064
684450
  }
684065
684451
  async function createFork(customTitle) {
684066
- const forkSessionId = randomUUID61();
684452
+ const forkSessionId = randomUUID62();
684067
684453
  const originalSessionId = getSessionId();
684068
684454
  const projectDir = getProjectDir2(getOriginalCwd());
684069
684455
  const forkSessionPath = getTranscriptPathForSession(forkSessionId);
@@ -690596,7 +690982,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
690596
690982
  smapsRollup,
690597
690983
  platform: process.platform,
690598
690984
  nodeVersion: process.version,
690599
- ccVersion: "1.78.7"
690985
+ ccVersion: "1.78.8"
690600
690986
  };
690601
690987
  }
690602
690988
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -691176,7 +691562,7 @@ var init_bridge_kick = __esm(() => {
691176
691562
  var call154 = async () => {
691177
691563
  return {
691178
691564
  type: "text",
691179
- value: "1.78.7"
691565
+ value: "1.78.8"
691180
691566
  };
691181
691567
  }, version2, version_default;
691182
691568
  var init_version = __esm(() => {
@@ -702443,7 +702829,7 @@ function generateHtmlReport(data, insights) {
702443
702829
  </html>`;
702444
702830
  }
702445
702831
  function buildExportData(data, insights, facets, remoteStats) {
702446
- const version3 = typeof MACRO !== "undefined" ? "1.78.7" : "unknown";
702832
+ const version3 = typeof MACRO !== "undefined" ? "1.78.8" : "unknown";
702447
702833
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
702448
702834
  const facets_summary = {
702449
702835
  total: facets.size,
@@ -706757,7 +707143,7 @@ var init_sessionStorage = __esm(() => {
706757
707143
  init_settings2();
706758
707144
  init_slowOperations();
706759
707145
  init_uuid();
706760
- VERSION7 = typeof MACRO !== "undefined" ? "1.78.7" : "unknown";
707146
+ VERSION7 = typeof MACRO !== "undefined" ? "1.78.8" : "unknown";
706761
707147
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
706762
707148
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
706763
707149
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -707972,7 +708358,7 @@ var init_filesystem = __esm(() => {
707972
708358
  });
707973
708359
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
707974
708360
  const nonce = randomBytes20(16).toString("hex");
707975
- return join232(getURTempDir(), "bundled-skills", "1.78.7", nonce);
708361
+ return join232(getURTempDir(), "bundled-skills", "1.78.8", nonce);
707976
708362
  });
707977
708363
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
707978
708364
  });
@@ -708760,9 +709146,9 @@ var init_hookHelpers = __esm(() => {
708760
709146
  });
708761
709147
 
708762
709148
  // src/utils/hooks/execPromptHook.ts
708763
- import { randomUUID as randomUUID62 } from "crypto";
709149
+ import { randomUUID as randomUUID63 } from "crypto";
708764
709150
  async function execPromptHook(hook, hookName, hookEvent, jsonInput, signal, toolUseContext, messages, toolUseID) {
708765
- const effectiveToolUseID = toolUseID || `hook-${randomUUID62()}`;
709151
+ const effectiveToolUseID = toolUseID || `hook-${randomUUID63()}`;
708766
709152
  try {
708767
709153
  const processedPrompt = addArgumentsToPrompt(hook.prompt, jsonInput);
708768
709154
  logForDebugging(`Hooks: Processing prompt hook with prompt: ${processedPrompt}`);
@@ -708916,9 +709302,9 @@ var init_execPromptHook = __esm(() => {
708916
709302
  });
708917
709303
 
708918
709304
  // src/utils/hooks/execAgentHook.ts
708919
- import { randomUUID as randomUUID63 } from "crypto";
709305
+ import { randomUUID as randomUUID64 } from "crypto";
708920
709306
  async function execAgentHook(hook, hookName, hookEvent, jsonInput, signal, toolUseContext, toolUseID, _messages, agentName) {
708921
- const effectiveToolUseID = toolUseID || `hook-${randomUUID63()}`;
709307
+ const effectiveToolUseID = toolUseID || `hook-${randomUUID64()}`;
708922
709308
  const transcriptPath = toolUseContext.agentId ? getAgentTranscriptPath(toolUseContext.agentId) : getTranscriptPath();
708923
709309
  const hookStartTime = Date.now();
708924
709310
  try {
@@ -708953,7 +709339,7 @@ When done, return your result using the ${SYNTHETIC_OUTPUT_TOOL_NAME} tool with:
708953
709339
  ]);
708954
709340
  const model = hook.model ?? getSmallFastModel();
708955
709341
  const MAX_AGENT_TURNS = 50;
708956
- const hookAgentId = asAgentId(`hook-agent-${randomUUID63()}`);
709342
+ const hookAgentId = asAgentId(`hook-agent-${randomUUID64()}`);
708957
709343
  const agentToolUseContext = {
708958
709344
  ...toolUseContext,
708959
709345
  agentId: hookAgentId,
@@ -709453,7 +709839,7 @@ __export(exports_hooks2, {
709453
709839
  });
709454
709840
  import { basename as basename52 } from "path";
709455
709841
  import { spawn as spawn15 } from "child_process";
709456
- import { randomUUID as randomUUID64 } from "crypto";
709842
+ import { randomUUID as randomUUID65 } from "crypto";
709457
709843
  function getSessionEndHookTimeoutMs() {
709458
709844
  const raw = process.env.UR_CODE_SESSIONEND_HOOKS_TIMEOUT_MS;
709459
709845
  const parsed = raw ? parseInt(raw, 10) : NaN;
@@ -710491,7 +710877,7 @@ async function* executeHooks({
710491
710877
  parentToolUseID: toolUseID,
710492
710878
  toolUseID,
710493
710879
  timestamp: new Date().toISOString(),
710494
- uuid: randomUUID64()
710880
+ uuid: randomUUID65()
710495
710881
  }
710496
710882
  };
710497
710883
  }
@@ -710553,7 +710939,7 @@ async function* executeHooks({
710553
710939
  const { signal: abortSignal, cleanup } = createCombinedAbortSignal(signal, {
710554
710940
  timeoutMs: commandTimeoutMs
710555
710941
  });
710556
- const hookId = randomUUID64();
710942
+ const hookId = randomUUID65();
710557
710943
  const hookStartMs = Date.now();
710558
710944
  const hookCommand = getHookDisplayText(hook);
710559
710945
  try {
@@ -711201,7 +711587,7 @@ async function executeHooksOutsideREPL({
711201
711587
  const callbackTimeoutMs = hook.timeout ? hook.timeout * 1000 : timeoutMs;
711202
711588
  const { signal: abortSignal2, cleanup: cleanup2 } = createCombinedAbortSignal(signal, { timeoutMs: callbackTimeoutMs });
711203
711589
  try {
711204
- const toolUseID = randomUUID64();
711590
+ const toolUseID = randomUUID65();
711205
711591
  const json2 = await hook.callback(hookInput, toolUseID, abortSignal2, hookIndex);
711206
711592
  cleanup2?.();
711207
711593
  if (isAsyncHookJSONOutput(json2)) {
@@ -711312,7 +711698,7 @@ async function executeHooksOutsideREPL({
711312
711698
  const commandTimeoutMs = hook.timeout ? hook.timeout * 1000 : timeoutMs;
711313
711699
  const { signal: abortSignal, cleanup } = createCombinedAbortSignal(signal, { timeoutMs: commandTimeoutMs });
711314
711700
  try {
711315
- const result = await execCommandHook(hook, hookEvent, hookName, jsonInput, abortSignal, randomUUID64(), hookIndex, pluginRoot, pluginId);
711701
+ const result = await execCommandHook(hook, hookEvent, hookName, jsonInput, abortSignal, randomUUID65(), hookIndex, pluginRoot, pluginId);
711316
711702
  cleanup?.();
711317
711703
  if (result.aborted) {
711318
711704
  logForDebugging(`${hookName} [${hook.command}] cancelled`);
@@ -711513,7 +711899,7 @@ async function* executeStopHooks(permissionMode, signal, timeoutMs = TOOL_HOOK_E
711513
711899
  };
711514
711900
  yield* executeHooks({
711515
711901
  hookInput,
711516
- toolUseID: randomUUID64(),
711902
+ toolUseID: randomUUID65(),
711517
711903
  signal,
711518
711904
  timeoutMs,
711519
711905
  toolUseContext,
@@ -711530,7 +711916,7 @@ async function* executeTeammateIdleHooks(teammateName, teamName, permissionMode,
711530
711916
  };
711531
711917
  yield* executeHooks({
711532
711918
  hookInput,
711533
- toolUseID: randomUUID64(),
711919
+ toolUseID: randomUUID65(),
711534
711920
  signal,
711535
711921
  timeoutMs
711536
711922
  });
@@ -711547,7 +711933,7 @@ async function* executeTaskCreatedHooks(taskId, taskSubject, taskDescription, te
711547
711933
  };
711548
711934
  yield* executeHooks({
711549
711935
  hookInput,
711550
- toolUseID: randomUUID64(),
711936
+ toolUseID: randomUUID65(),
711551
711937
  signal,
711552
711938
  timeoutMs,
711553
711939
  toolUseContext
@@ -711565,7 +711951,7 @@ async function* executeTaskCompletedHooks(taskId, taskSubject, taskDescription,
711565
711951
  };
711566
711952
  yield* executeHooks({
711567
711953
  hookInput,
711568
- toolUseID: randomUUID64(),
711954
+ toolUseID: randomUUID65(),
711569
711955
  signal,
711570
711956
  timeoutMs,
711571
711957
  toolUseContext
@@ -711584,7 +711970,7 @@ async function* executeUserPromptSubmitHooks(prompt, permissionMode, toolUseCont
711584
711970
  };
711585
711971
  yield* executeHooks({
711586
711972
  hookInput,
711587
- toolUseID: randomUUID64(),
711973
+ toolUseID: randomUUID65(),
711588
711974
  signal: toolUseContext.abortController.signal,
711589
711975
  timeoutMs: TOOL_HOOK_EXECUTION_TIMEOUT_MS,
711590
711976
  toolUseContext,
@@ -711601,7 +711987,7 @@ async function* executeSessionStartHooks(source, sessionId, agentType, model, si
711601
711987
  };
711602
711988
  yield* executeHooks({
711603
711989
  hookInput,
711604
- toolUseID: randomUUID64(),
711990
+ toolUseID: randomUUID65(),
711605
711991
  matchQuery: source,
711606
711992
  signal,
711607
711993
  timeoutMs,
@@ -711616,7 +712002,7 @@ async function* executeSetupHooks(trigger2, signal, timeoutMs = TOOL_HOOK_EXECUT
711616
712002
  };
711617
712003
  yield* executeHooks({
711618
712004
  hookInput,
711619
- toolUseID: randomUUID64(),
712005
+ toolUseID: randomUUID65(),
711620
712006
  matchQuery: trigger2,
711621
712007
  signal,
711622
712008
  timeoutMs,
@@ -711632,7 +712018,7 @@ async function* executeSubagentStartHooks(agentId, agentType, signal, timeoutMs
711632
712018
  };
711633
712019
  yield* executeHooks({
711634
712020
  hookInput,
711635
- toolUseID: randomUUID64(),
712021
+ toolUseID: randomUUID65(),
711636
712022
  matchQuery: agentType,
711637
712023
  signal,
711638
712024
  timeoutMs
@@ -711995,7 +712381,7 @@ async function executeStatusLineCommand(statusLineInput, signal, timeoutMs = 500
711995
712381
  const abortSignal = signal || AbortSignal.timeout(timeoutMs);
711996
712382
  try {
711997
712383
  const jsonInput = jsonStringify(statusLineInput);
711998
- const result = await execCommandHook(statusLine, "StatusLine", "statusLine", jsonInput, abortSignal, randomUUID64());
712384
+ const result = await execCommandHook(statusLine, "StatusLine", "statusLine", jsonInput, abortSignal, randomUUID65());
711999
712385
  if (result.aborted) {
712000
712386
  return;
712001
712387
  }
@@ -712039,7 +712425,7 @@ async function executeFileSuggestionCommand(fileSuggestionInput, signal, timeout
712039
712425
  try {
712040
712426
  const jsonInput = jsonStringify(fileSuggestionInput);
712041
712427
  const hook = { type: "command", command: fileSuggestion.command };
712042
- const result = await execCommandHook(hook, "FileSuggestion", "FileSuggestion", jsonInput, abortSignal, randomUUID64());
712428
+ const result = await execCommandHook(hook, "FileSuggestion", "FileSuggestion", jsonInput, abortSignal, randomUUID65());
712043
712429
  if (result.aborted || result.status !== 0) {
712044
712430
  return [];
712045
712431
  }
@@ -712295,7 +712681,7 @@ async function executeBeforeCommandHooks(command8, shellType, cwd2, toolUseConte
712295
712681
  const results = [];
712296
712682
  for await (const result of executeHooks({
712297
712683
  hookInput,
712298
- toolUseID: options4?.toolUseID ?? randomUUID64(),
712684
+ toolUseID: options4?.toolUseID ?? randomUUID65(),
712299
712685
  matchQuery: command8,
712300
712686
  signal: options4?.signal,
712301
712687
  timeoutMs: options4?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
@@ -712334,7 +712720,7 @@ async function executeAfterCommandHooks(command8, shellType, cwd2, exitCode, std
712334
712720
  const results = [];
712335
712721
  for await (const result of executeHooks({
712336
712722
  hookInput,
712337
- toolUseID: options4?.toolUseID ?? randomUUID64(),
712723
+ toolUseID: options4?.toolUseID ?? randomUUID65(),
712338
712724
  matchQuery: command8,
712339
712725
  signal: options4?.signal,
712340
712726
  timeoutMs: options4?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
@@ -712370,7 +712756,7 @@ async function executeBeforeCommitHooks(command8, toolUseContext, options4) {
712370
712756
  const results = [];
712371
712757
  for await (const result of executeHooks({
712372
712758
  hookInput,
712373
- toolUseID: options4?.toolUseID ?? randomUUID64(),
712759
+ toolUseID: options4?.toolUseID ?? randomUUID65(),
712374
712760
  matchQuery: command8,
712375
712761
  signal: options4?.signal,
712376
712762
  timeoutMs: options4?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
@@ -712410,7 +712796,7 @@ async function executeOnFailureHooks2(error40, stage, toolUseContext, options4)
712410
712796
  const results = [];
712411
712797
  for await (const result of executeHooks({
712412
712798
  hookInput,
712413
- toolUseID: options4?.toolUseID ?? randomUUID64(),
712799
+ toolUseID: options4?.toolUseID ?? randomUUID65(),
712414
712800
  matchQuery: stage,
712415
712801
  signal: options4?.signal,
712416
712802
  timeoutMs: options4?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
@@ -712640,7 +713026,10 @@ async function getOrCreateWorktree(repoRoot, slug5, options4) {
712640
713026
  const fetchEnv = { ...process.env, ...GIT_NO_PROMPT_ENV2 };
712641
713027
  let baseBranch;
712642
713028
  let baseSha = null;
712643
- if (options4?.prNumber) {
713029
+ if (options4?.baseRef) {
713030
+ baseBranch = options4.baseRef;
713031
+ baseSha = options4.baseRef;
713032
+ } else if (options4?.prNumber) {
712644
713033
  const { code: prFetchCode, stderr: prFetchStderr } = await execFileNoThrowWithCwd(gitExe(), ["fetch", "origin", `pull/${options4.prNumber}/head`], { cwd: repoRoot, stdin: "ignore", env: fetchEnv });
712645
713034
  if (prFetchCode !== 0) {
712646
713035
  throw new Error(`Failed to fetch PR #${options4.prNumber}: ${prFetchStderr.trim() || 'PR may not exist or the repository may not have a remote named "origin"'}`);
@@ -712998,7 +713387,21 @@ async function createAgentWorktree(slug5) {
712998
713387
  if (!gitRoot) {
712999
713388
  throw new Error("Cannot create agent worktree: not in a git repository and no WorktreeCreate hooks are configured. Configure WorktreeCreate/WorktreeRemove hooks in settings.json to use worktree isolation with other VCS systems.");
713000
713389
  }
713001
- const { worktreePath, worktreeBranch, headCommit, existed } = await getOrCreateWorktree(gitRoot, slug5);
713390
+ const sourceCwd = getCwd();
713391
+ const status2 = await execFileNoThrowWithCwd(gitExe(), ["status", "--porcelain", "--untracked-files=normal"], { cwd: sourceCwd });
713392
+ if (status2.code !== 0) {
713393
+ throw new Error("Cannot verify the source checkout before creating an agent worktree.");
713394
+ }
713395
+ if (status2.stdout.trim()) {
713396
+ throw new Error("Cannot create a safe parallel agent worktree from a dirty checkout because uncommitted changes would be missing. Commit or deliberately snapshot the required changes, or keep implementation agents serialized in the shared checkout.");
713397
+ }
713398
+ const sourceHead = await execFileNoThrowWithCwd(gitExe(), ["rev-parse", "HEAD"], { cwd: sourceCwd });
713399
+ if (sourceHead.code !== 0 || !sourceHead.stdout.trim()) {
713400
+ throw new Error("Cannot resolve the current checkout revision for agent isolation.");
713401
+ }
713402
+ const { worktreePath, worktreeBranch, headCommit, existed } = await getOrCreateWorktree(gitRoot, slug5, {
713403
+ baseRef: sourceHead.stdout.trim()
713404
+ });
713002
713405
  if (!existed) {
713003
713406
  logForDebugging(`Created agent worktree at: ${worktreePath} on branch: ${worktreeBranch}`);
713004
713407
  await performPostCreationSetup(gitRoot, worktreePath);
@@ -713397,13 +713800,13 @@ function getTaskToolGuidance(enabledTools) {
713397
713800
  const canUpdate = enabledTools.has(TASK_UPDATE_TOOL_NAME);
713398
713801
  const canList = enabledTools.has(TASK_LIST_TOOL_NAME);
713399
713802
  if (canCreate && canUpdate) {
713400
- return `For every actionable request with two or more distinct implementation or verification outcomes, you MUST use ${TASK_CREATE_TOOL_NAME} before making changes; do not omit the task list. Create dependency-ordered tasks, one per concrete outcome, and declare independent branches without dependencies so they can run in parallel. A new user request starts a fresh list unless the user explicitly asks to add to the current list. Skip task creation only for a direct answer or genuinely single-step action. Use ${TASK_UPDATE_TOOL_NAME} to mark each unblocked task in_progress when work starts and completed immediately after implementation and relevant verification succeed; use failed for attempted work that did not finish, skipped only for explicitly inapplicable work, and leave dependency-blocked work open with its blocker recorded.${canList ? ` Use ${TASK_LIST_TOOL_NAME} to select the next unblocked task; when all work succeeds, show the final list with every task completed before finishing.` : ""}`;
713803
+ return `For every actionable request with two or more distinct implementation or verification outcomes, you MUST use ${TASK_CREATE_TOOL_NAME} before making changes; do not omit the task list. Decompose a large request into 2-8 bounded outcomes (never more than 12), each with one observable result, likely file scope, and acceptance evidence. Create tasks first without guessed or forward dependency IDs. After each real ID is returned, use ${TASK_UPDATE_TOOL_NAME} to add dependencies only to tasks that already exist; never reference a future task, and never create a self-dependency. Keep the final graph dependency-ordered; independent branches stay dependency-free. A new user request starts a fresh list unless the user explicitly asks to add to the current list. Skip task creation only for a direct answer or genuinely single-step action. Mark each unblocked task in_progress when work starts and completed immediately after implementation and relevant verification succeed; use failed for attempted work that did not finish, skipped only for explicitly inapplicable work, and leave dependency-blocked work open with its blocker recorded.${canList ? ` Use ${TASK_LIST_TOOL_NAME} to select the next unblocked task; when all work succeeds, show the final list with every task completed before finishing.` : ""}`;
713401
713804
  }
713402
713805
  if (canUpdate) {
713403
713806
  return `Keep assigned tasks current with ${TASK_UPDATE_TOOL_NAME}: mark the task in_progress when starting, completed only after implementation and relevant verification succeed, and leave blocked or partial work open with its blocker recorded.${canList ? ` Use ${TASK_LIST_TOOL_NAME} to select the next unblocked task.` : ""}`;
713404
713807
  }
713405
713808
  if (canCreate) {
713406
- return `For every actionable request with two or more distinct outcomes, you MUST use ${TASK_CREATE_TOOL_NAME} before implementation to record concrete outcomes and their dependency order. A new user request starts a fresh list unless the user explicitly asks to append to the current one; skip the list only for a direct answer or genuinely single-step action.`;
713809
+ return `For every actionable request with two or more distinct outcomes, you MUST use ${TASK_CREATE_TOOL_NAME} before implementation to record 2-8 bounded outcomes (never more than 12). Create them without guessed or forward task IDs; dependencies may name only tasks whose real IDs have already been returned. A new user request starts a fresh list unless the user explicitly asks to append to the current one; skip the list only for a direct answer or genuinely single-step action.`;
713407
713810
  }
713408
713811
  if (enabledTools.has(TODO_WRITE_TOOL_NAME)) {
713409
713812
  return `Track multi-step work with ${TODO_WRITE_TOOL_NAME}. Keep items dependency-ordered and mark each item completed immediately after its implementation and relevant verification succeed.`;
@@ -713559,7 +713962,8 @@ function getOllamaToolDisciplineSection() {
713559
713962
  `);
713560
713963
  }
713561
713964
  function getAgentToolSection() {
713562
- return isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its tool output out of your context \u2014 so you can keep chatting with the user while it works. Reach for it when research or multi-step implementation work would otherwise fill your context with raw output you won't need again. **If you ARE the fork** \u2014 execute directly; do not re-delegate.` : `Use the ${AGENT_TOOL_NAME} tool with specialized agents when the task at hand matches the agent's description, and reach for it by default whenever a request contains parts that do not depend on each other. Concretely: exploring several areas of a codebase, researching more than one question, or investigating independent leads are each one ${AGENT_TOOL_NAME} call per part, issued together in a single message so they run at once. Doing that work yourself, one step after another, is slower and fills your context with output you will not need again \u2014 so the bar for delegating is "are these parts independent", not "is this too big for me". Two exceptions: work that must happen in order stays sequential, and edits to the same file stay with you, since parallel writers conflict. Never repeat work you have delegated \u2014 if a subagent is researching something, do not also search for it yourself.`;
713965
+ const launch = isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its raw tool output out of your context. **If you ARE the fork**, execute your bounded assignment directly; do not re-delegate.` : `Use ${AGENT_TOOL_NAME} with the specialized agent whose description best matches each bounded assignment.`;
713966
+ return `${launch} For a large request, first create a bounded task list, then delegate at most one ready independent branch per agent. Launch independent read-only research, audits, or exploration together. Shared-checkout writers, unknown scopes, dependencies, and overlapping file targets must run sequentially. Parallel writers require separate worktrees based on the exact clean starting revision; if the current required state is dirty or unsnapshotted, keep those writers serial in the shared checkout. Keep tiny dependent steps with the parent when delegation overhead is larger than the work. The parent owns task status, integration, and final verification: do not duplicate delegated work, do not mark a delegated task complete from a launch acknowledgement, and do not finish until the returned result and acceptance evidence have been checked.`;
713563
713967
  }
713564
713968
  function getDiscoverSkillsGuidance() {
713565
713969
  if (false) {}
@@ -714329,7 +714733,7 @@ function computeFingerprint(messageText2, version3) {
714329
714733
  }
714330
714734
  function computeFingerprintFromMessages(messages) {
714331
714735
  const firstMessageText = extractFirstMessageText(messages);
714332
- return computeFingerprint(firstMessageText, "1.78.7");
714736
+ return computeFingerprint(firstMessageText, "1.78.8");
714333
714737
  }
714334
714738
  var FINGERPRINT_SALT = "59cf53e54c78";
714335
714739
  var init_fingerprint = () => {};
@@ -714442,7 +714846,7 @@ function insertBlockAfterToolResults(content, block2) {
714442
714846
  }
714443
714847
 
714444
714848
  // src/services/api/ur.ts
714445
- import { randomUUID as randomUUID65 } from "crypto";
714849
+ import { randomUUID as randomUUID66 } from "crypto";
714446
714850
  function isProviderStreamHandle(value2) {
714447
714851
  return Boolean(value2 && typeof value2 === "object" && "withResponse" in value2 && typeof value2.withResponse === "function");
714448
714852
  }
@@ -715236,7 +715640,7 @@ ${deferredToolList}
715236
715640
  if (!options4.agentId) {
715237
715641
  headlessProfilerCheckpoint("api_request_sent");
715238
715642
  }
715239
- clientRequestId = isFirstPartyRuntime() && isFirstPartyURHQBaseUrl() ? randomUUID65() : undefined;
715643
+ clientRequestId = isFirstPartyRuntime() && isFirstPartyURHQBaseUrl() ? randomUUID66() : undefined;
715240
715644
  const streamHandle = urhq.beta.messages.create({ ...params, stream: true }, {
715241
715645
  signal,
715242
715646
  ...clientRequestId && {
@@ -715485,7 +715889,7 @@ ${deferredToolList}
715485
715889
  },
715486
715890
  requestId: streamRequestId ?? undefined,
715487
715891
  type: "assistant",
715488
- uuid: randomUUID65(),
715892
+ uuid: randomUUID66(),
715489
715893
  timestamp: new Date().toISOString(),
715490
715894
  ...process.env.USER_TYPE === "ant" && research2 !== undefined && { research: research2 },
715491
715895
  ...advisorModel && { advisorModel }
@@ -715671,7 +716075,7 @@ ${deferredToolList}
715671
716075
  },
715672
716076
  requestId: streamRequestId ?? undefined,
715673
716077
  type: "assistant",
715674
- uuid: randomUUID65(),
716078
+ uuid: randomUUID66(),
715675
716079
  timestamp: new Date().toISOString(),
715676
716080
  ...process.env.USER_TYPE === "ant" && research2 !== undefined && {
715677
716081
  research: research2
@@ -715725,7 +716129,7 @@ ${deferredToolList}
715725
716129
  },
715726
716130
  requestId: streamRequestId ?? undefined,
715727
716131
  type: "assistant",
715728
- uuid: randomUUID65(),
716132
+ uuid: randomUUID66(),
715729
716133
  timestamp: new Date().toISOString(),
715730
716134
  ...process.env.USER_TYPE === "ant" && research2 !== undefined && { research: research2 },
715731
716135
  ...advisorModel && { advisorModel }
@@ -716251,7 +716655,7 @@ async function sideQuery(opts) {
716251
716655
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
716252
716656
  }
716253
716657
  const messageText2 = extractFirstUserMessageText(messages);
716254
- const fingerprint2 = computeFingerprint(messageText2, "1.78.7");
716658
+ const fingerprint2 = computeFingerprint(messageText2, "1.78.8");
716255
716659
  const attributionHeader = getAttributionHeader(fingerprint2);
716256
716660
  const systemBlocks = [
716257
716661
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -721066,7 +721470,7 @@ var init_inboundMessages = __esm(() => {
721066
721470
  });
721067
721471
 
721068
721472
  // src/utils/messages/systemInit.ts
721069
- import { randomUUID as randomUUID66 } from "crypto";
721473
+ import { randomUUID as randomUUID67 } from "crypto";
721070
721474
  function sdkCompatToolName(name) {
721071
721475
  return name === AGENT_TOOL_NAME ? LEGACY_AGENT_TOOL_NAME : name;
721072
721476
  }
@@ -721088,7 +721492,7 @@ function buildSystemInitMessage(inputs) {
721088
721492
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
721089
721493
  apiKeySource: getURHQApiKeyWithSource().source,
721090
721494
  betas: getSdkBetas(),
721091
- ur_version: "1.78.7",
721495
+ ur_version: "1.78.8",
721092
721496
  output_style: outputStyle2,
721093
721497
  agents: inputs.agents.map((agent2) => agent2.agentType),
721094
721498
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -721097,7 +721501,7 @@ function buildSystemInitMessage(inputs) {
721097
721501
  path: plugin2.path,
721098
721502
  source: plugin2.source
721099
721503
  })),
721100
- uuid: randomUUID66()
721504
+ uuid: randomUUID67()
721101
721505
  };
721102
721506
  if (false) {}
721103
721507
  initMessage.fast_mode_state = getFastModeState(inputs.model, inputs.fastMode);
@@ -721181,7 +721585,7 @@ __export(exports_MessageSelector, {
721181
721585
  messagesAfterAreOnlySynthetic: () => messagesAfterAreOnlySynthetic,
721182
721586
  MessageSelector: () => MessageSelector
721183
721587
  });
721184
- import { randomUUID as randomUUID67 } from "crypto";
721588
+ import { randomUUID as randomUUID68 } from "crypto";
721185
721589
  import * as path22 from "path";
721186
721590
  function isTextBlock3(block2) {
721187
721591
  return block2.type === "text";
@@ -721201,7 +721605,7 @@ function MessageSelector({
721201
721605
  const fileHistory = useAppState((s) => s.fileHistory);
721202
721606
  const [error40, setError] = import_react195.useState(undefined);
721203
721607
  const isFileHistoryEnabled = fileHistoryEnabled();
721204
- const currentUUID = import_react195.useMemo(randomUUID67, []);
721608
+ const currentUUID = import_react195.useMemo(randomUUID68, []);
721205
721609
  const messageOptions = import_react195.useMemo(() => [...messages.filter(selectableUserMessagesFilter), {
721206
721610
  ...createUserMessage({
721207
721611
  content: ""
@@ -726294,7 +726698,7 @@ var init_FileEditToolDiff = __esm(() => {
726294
726698
  });
726295
726699
 
726296
726700
  // src/hooks/useDiffInIDE.ts
726297
- import { randomUUID as randomUUID68 } from "crypto";
726701
+ import { randomUUID as randomUUID69 } from "crypto";
726298
726702
  import { basename as basename55 } from "path";
726299
726703
  function useDiffInIDE({
726300
726704
  onChange,
@@ -726305,7 +726709,7 @@ function useDiffInIDE({
726305
726709
  }) {
726306
726710
  const isUnmounted = import_react206.useRef(false);
726307
726711
  const [hasError, setHasError] = import_react206.useState(false);
726308
- const sha = import_react206.useMemo(() => randomUUID68().slice(0, 6), []);
726712
+ const sha = import_react206.useMemo(() => randomUUID69().slice(0, 6), []);
726309
726713
  const tabName = import_react206.useMemo(() => `\u2302 [UR] ${basename55(filePath)} (${sha}) \u29C9`, [filePath, sha]);
726310
726714
  const shouldShowDiffInIDE = hasAccessToIDEExtensionDiffFeature(toolUseContext.options.mcpClients) && getGlobalConfig().diffTool === "auto" && !filePath.endsWith(".ipynb");
726311
726715
  const ideName = getConnectedIdeName(toolUseContext.options.mcpClients) ?? "IDE";
@@ -734960,7 +735364,7 @@ var init_useVoiceEnabled = __esm(() => {
734960
735364
  function getSemverPart(version3) {
734961
735365
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
734962
735366
  }
734963
- function useUpdateNotification(updatedVersion, initialVersion = "1.78.7") {
735367
+ function useUpdateNotification(updatedVersion, initialVersion = "1.78.8") {
734964
735368
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react223.useState(() => getSemverPart(initialVersion));
734965
735369
  if (!updatedVersion) {
734966
735370
  return null;
@@ -735009,7 +735413,7 @@ function AutoUpdater({
735009
735413
  return;
735010
735414
  }
735011
735415
  if (false) {}
735012
- const currentVersion = "1.78.7";
735416
+ const currentVersion = "1.78.8";
735013
735417
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
735014
735418
  let latestVersion = await getLatestVersion(channel);
735015
735419
  const isDisabled = isAutoUpdaterDisabled();
@@ -735238,12 +735642,12 @@ function NativeAutoUpdater({
735238
735642
  logEvent("tengu_native_auto_updater_start", {});
735239
735643
  try {
735240
735644
  const maxVersion = await getMaxVersion();
735241
- if (maxVersion && gt("1.78.7", maxVersion)) {
735645
+ if (maxVersion && gt("1.78.8", maxVersion)) {
735242
735646
  const msg = await getMaxVersionMessage();
735243
735647
  setMaxVersionIssue(msg ?? "affects your version");
735244
735648
  }
735245
735649
  const result = await installLatest(channel);
735246
- const currentVersion = "1.78.7";
735650
+ const currentVersion = "1.78.8";
735247
735651
  const latencyMs = Date.now() - startTime;
735248
735652
  if (result.lockFailed) {
735249
735653
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -735380,17 +735784,17 @@ function PackageManagerAutoUpdater(t0) {
735380
735784
  const maxVersion = await getMaxVersion();
735381
735785
  if (maxVersion && latest && gt(latest, maxVersion)) {
735382
735786
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
735383
- if (gte("1.78.7", maxVersion)) {
735384
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.78.7"} is already at or above maxVersion ${maxVersion}, skipping update`);
735787
+ if (gte("1.78.8", maxVersion)) {
735788
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.78.8"} is already at or above maxVersion ${maxVersion}, skipping update`);
735385
735789
  setUpdateAvailable(false);
735386
735790
  return;
735387
735791
  }
735388
735792
  latest = maxVersion;
735389
735793
  }
735390
- const hasUpdate = latest && !gte("1.78.7", latest) && !shouldSkipVersion(latest);
735794
+ const hasUpdate = latest && !gte("1.78.8", latest) && !shouldSkipVersion(latest);
735391
735795
  setUpdateAvailable(!!hasUpdate);
735392
735796
  if (hasUpdate) {
735393
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.78.7"} -> ${latest}`);
735797
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.78.8"} -> ${latest}`);
735394
735798
  }
735395
735799
  };
735396
735800
  $2[0] = t1;
@@ -735424,7 +735828,7 @@ function PackageManagerAutoUpdater(t0) {
735424
735828
  wrap: "truncate",
735425
735829
  children: [
735426
735830
  "currentVersion: ",
735427
- "1.78.7"
735831
+ "1.78.8"
735428
735832
  ]
735429
735833
  }, undefined, true, undefined, this);
735430
735834
  $2[3] = verbose;
@@ -744005,7 +744409,7 @@ var init_teamDiscovery = __esm(() => {
744005
744409
  });
744006
744410
 
744007
744411
  // src/components/teams/TeamsDialog.tsx
744008
- import { randomUUID as randomUUID69 } from "crypto";
744412
+ import { randomUUID as randomUUID70 } from "crypto";
744009
744413
  function TeamsDialog({
744010
744414
  initialTeams,
744011
744415
  onDone
@@ -744629,7 +745033,7 @@ async function killTeammate(paneId, backendType, teamName, teammateId, teammateN
744629
745033
  },
744630
745034
  inbox: {
744631
745035
  messages: [...prev.inbox.messages, {
744632
- id: randomUUID69(),
745036
+ id: randomUUID70(),
744633
745037
  from: "system",
744634
745038
  text: jsonStringify({
744635
745039
  type: "teammate_terminated",
@@ -746224,7 +746628,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
746224
746628
  project_dir: getOriginalCwd(),
746225
746629
  added_dirs: addedDirs
746226
746630
  },
746227
- version: "1.78.7",
746631
+ version: "1.78.8",
746228
746632
  output_style: {
746229
746633
  name: outputStyleName
746230
746634
  },
@@ -746359,7 +746763,7 @@ function StatusLineInner({
746359
746763
  const attention = customStatusError ?? taskAttention;
746360
746764
  const terminalSize = React132.useContext(TerminalSizeContext);
746361
746765
  const defaultStatusLineText = buildDefaultStatusBar({
746362
- version: "1.78.7",
746766
+ version: "1.78.8",
746363
746767
  providerLabel: providerRuntime.providerLabel,
746364
746768
  authMode: providerRuntime.authLabel,
746365
746769
  model: renderModelName(mainLoopModel) || providerRuntime.model || "",
@@ -750646,7 +751050,7 @@ function normalizeControlMessageKeys(obj) {
750646
751050
  }
750647
751051
 
750648
751052
  // src/bridge/bridgeMessaging.ts
750649
- import { randomUUID as randomUUID70 } from "crypto";
751053
+ import { randomUUID as randomUUID71 } from "crypto";
750650
751054
  function isSDKMessage(value2) {
750651
751055
  return value2 !== null && typeof value2 === "object" && "type" in value2 && typeof value2.type === "string";
750652
751056
  }
@@ -750854,7 +751258,7 @@ function makeResultMessage(sessionId) {
750854
751258
  modelUsage: {},
750855
751259
  permission_denials: [],
750856
751260
  session_id: sessionId,
750857
- uuid: randomUUID70()
751261
+ uuid: randomUUID71()
750858
751262
  };
750859
751263
  }
750860
751264
 
@@ -750898,7 +751302,7 @@ var init_bridgeMessaging = __esm(() => {
750898
751302
  });
750899
751303
 
750900
751304
  // src/remote/SessionsWebSocket.ts
750901
- import { randomUUID as randomUUID71 } from "crypto";
751305
+ import { randomUUID as randomUUID72 } from "crypto";
750902
751306
  function buildSessionsWebSocketUrl(baseUrl, sessionId, orgUuid) {
750903
751307
  const url3 = new URL(baseUrl);
750904
751308
  if (url3.protocol === "http:") {
@@ -751128,7 +751532,7 @@ class SessionsWebSocket {
751128
751532
  if (typeof response.response === "object" && response.response !== null && "request_id" in response.response && typeof response.response.request_id === "string") {
751129
751533
  return response.response.request_id;
751130
751534
  }
751131
- return randomUUID71();
751535
+ return randomUUID72();
751132
751536
  }
751133
751537
  enqueueControlResponse(key, payload) {
751134
751538
  const payloadBytes = Buffer.byteLength(payload, "utf8");
@@ -751203,7 +751607,7 @@ class SessionsWebSocket {
751203
751607
  }
751204
751608
  const controlRequest = {
751205
751609
  type: "control_request",
751206
- request_id: randomUUID71(),
751610
+ request_id: randomUUID72(),
751207
751611
  request
751208
751612
  };
751209
751613
  logForDebugging(`[SessionsWebSocket] Sending control request: ${request.subtype}`);
@@ -751444,11 +751848,11 @@ var init_RemoteSessionManager = __esm(() => {
751444
751848
  });
751445
751849
 
751446
751850
  // src/remote/remotePermissionBridge.ts
751447
- import { randomUUID as randomUUID72 } from "crypto";
751851
+ import { randomUUID as randomUUID73 } from "crypto";
751448
751852
  function createSyntheticAssistantMessage(request, requestId) {
751449
751853
  return {
751450
751854
  type: "assistant",
751451
- uuid: randomUUID72(),
751855
+ uuid: randomUUID73(),
751452
751856
  message: {
751453
751857
  id: `remote-${requestId}`,
751454
751858
  type: "message",
@@ -752296,7 +752700,7 @@ var init_useDirectConnect = __esm(() => {
752296
752700
  });
752297
752701
 
752298
752702
  // src/hooks/useSSHSession.ts
752299
- import { randomUUID as randomUUID73 } from "crypto";
752703
+ import { randomUUID as randomUUID74 } from "crypto";
752300
752704
  function useSSHSession({
752301
752705
  session: session2,
752302
752706
  setMessages,
@@ -752394,7 +752798,7 @@ function useSSHSession({
752394
752798
  subtype: "informational",
752395
752799
  content: `SSH connection dropped \u2014 reconnecting (attempt ${attempt}/${max2})...`,
752396
752800
  timestamp: new Date().toISOString(),
752397
- uuid: randomUUID73(),
752801
+ uuid: randomUUID74(),
752398
752802
  level: "warning"
752399
752803
  };
752400
752804
  setMessages((prev) => [...prev, msg]);
@@ -754444,7 +754848,7 @@ var init_PermissionContext = __esm(() => {
754444
754848
  });
754445
754849
 
754446
754850
  // src/hooks/toolPermission/handlers/interactiveHandler.ts
754447
- import { randomUUID as randomUUID74 } from "crypto";
754851
+ import { randomUUID as randomUUID75 } from "crypto";
754448
754852
  function handleInteractivePermission(params, resolve72) {
754449
754853
  const {
754450
754854
  ctx,
@@ -754458,7 +754862,7 @@ function handleInteractivePermission(params, resolve72) {
754458
754862
  let userInteracted = false;
754459
754863
  let checkmarkTransitionTimer;
754460
754864
  let checkmarkAbortHandler;
754461
- const bridgeRequestId = bridgeCallbacks ? randomUUID74() : undefined;
754865
+ const bridgeRequestId = bridgeCallbacks ? randomUUID75() : undefined;
754462
754866
  let channelUnsubscribe;
754463
754867
  const permissionPromptStartTimeMs = Date.now();
754464
754868
  const displayInput = result.updatedInput ?? ctx.input;
@@ -754852,9 +755256,9 @@ function matchesKeepGoingKeyword(input) {
754852
755256
  }
754853
755257
 
754854
755258
  // src/utils/processUserInput/processTextPrompt.ts
754855
- import { randomUUID as randomUUID75 } from "crypto";
755259
+ import { randomUUID as randomUUID76 } from "crypto";
754856
755260
  function processTextPrompt(input, imageContentBlocks, imagePasteIds, attachmentMessages, uuid3, permissionMode, isMeta) {
754857
- const promptId = randomUUID75();
755261
+ const promptId = randomUUID76();
754858
755262
  setPromptId(promptId);
754859
755263
  const userPromptText = typeof input === "string" ? input : input.find((block2) => block2.type === "text")?.text || "";
754860
755264
  startInteractionSpan(userPromptText);
@@ -754988,7 +755392,7 @@ var exports_processBashCommand = {};
754988
755392
  __export(exports_processBashCommand, {
754989
755393
  processBashCommand: () => processBashCommand
754990
755394
  });
754991
- import { randomUUID as randomUUID76 } from "crypto";
755395
+ import { randomUUID as randomUUID77 } from "crypto";
754992
755396
  async function processBashCommand(inputString, precedingInputBlocks, attachmentMessages, context6, setToolJSX) {
754993
755397
  const usePowerShell = isPowerShellToolEnabled() && resolveDefaultShell() === "powershell";
754994
755398
  logEvent("tengu_input_bash", {
@@ -755052,7 +755456,7 @@ async function processBashCommand(inputString, precedingInputBlocks, attachmentM
755052
755456
  const mapped = await processToolResultBlock(shellTool, {
755053
755457
  ...data,
755054
755458
  stderr: ""
755055
- }, randomUUID76());
755459
+ }, randomUUID77());
755056
755460
  const stdout = typeof mapped.content === "string" ? mapped.content : escapeXml(data.stdout);
755057
755461
  return {
755058
755462
  messages: [createSyntheticUserCaveatMessage(), userMessage, ...attachmentMessages, createUserMessage({
@@ -755101,7 +755505,7 @@ var init_processBashCommand = __esm(() => {
755101
755505
  });
755102
755506
 
755103
755507
  // src/utils/processUserInput/processUserInput.ts
755104
- import { randomUUID as randomUUID77 } from "crypto";
755508
+ import { randomUUID as randomUUID78 } from "crypto";
755105
755509
  async function processUserInput({
755106
755510
  input,
755107
755511
  preExpansionInput,
@@ -755163,7 +755567,7 @@ Original prompt: ${input}`, "warning")
755163
755567
  type: "hook_additional_context",
755164
755568
  content: hookResult.additionalContexts.map(applyTruncation),
755165
755569
  hookName: "UserPromptSubmit",
755166
- toolUseID: `hook-${randomUUID77()}`,
755570
+ toolUseID: `hook-${randomUUID78()}`,
755167
755571
  hookEvent: "UserPromptSubmit"
755168
755572
  }));
755169
755573
  }
@@ -757334,7 +757738,7 @@ var init_sessionRestore = __esm(() => {
757334
757738
  });
757335
757739
 
757336
757740
  // src/hooks/useInboxPoller.ts
757337
- import { randomUUID as randomUUID78 } from "crypto";
757741
+ import { randomUUID as randomUUID79 } from "crypto";
757338
757742
  function getAgentNameToPoll(appState) {
757339
757743
  if (isInProcessTeammate()) {
757340
757744
  return;
@@ -757751,7 +758155,7 @@ function useInboxPoller({
757751
758155
  messages: [
757752
758156
  ...prev.inbox.messages,
757753
758157
  {
757754
- id: randomUUID78(),
758158
+ id: randomUUID79(),
757755
758159
  from: "system",
757756
758160
  text: jsonStringify({
757757
758161
  type: "teammate_terminated",
@@ -757791,7 +758195,7 @@ ${messageContent}
757791
758195
  messages: [
757792
758196
  ...prev.inbox.messages,
757793
758197
  ...regularMessages.map((m) => ({
757794
- id: randomUUID78(),
758198
+ id: randomUUID79(),
757795
758199
  from: m.from,
757796
758200
  text: m.text,
757797
758201
  timestamp: m.timestamp,
@@ -758644,7 +759048,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
758644
759048
  } catch {}
758645
759049
  const data = {
758646
759050
  trigger: trigger2,
758647
- version: "1.78.7",
759051
+ version: "1.78.8",
758648
759052
  platform: process.platform,
758649
759053
  transcript,
758650
759054
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -758681,7 +759085,7 @@ var init_submitTranscriptShare = __esm(() => {
758681
759085
  });
758682
759086
 
758683
759087
  // src/components/FeedbackSurvey/useSurveyState.tsx
758684
- import { randomUUID as randomUUID79 } from "crypto";
759088
+ import { randomUUID as randomUUID80 } from "crypto";
758685
759089
  function useSurveyState({
758686
759090
  hideThanksAfterMs,
758687
759091
  onOpen,
@@ -758692,7 +759096,7 @@ function useSurveyState({
758692
759096
  }) {
758693
759097
  const [state2, setState] = import_react288.useState("closed");
758694
759098
  const [lastResponse, setLastResponse] = import_react288.useState(null);
758695
- const appearanceId = import_react288.useRef(randomUUID79());
759099
+ const appearanceId = import_react288.useRef(randomUUID80());
758696
759100
  const lastResponseRef = import_react288.useRef(null);
758697
759101
  const showThanksThenClose = import_react288.useCallback(() => {
758698
759102
  setState("thanks");
@@ -758710,7 +759114,7 @@ function useSurveyState({
758710
759114
  return;
758711
759115
  }
758712
759116
  setState("open");
758713
- appearanceId.current = randomUUID79();
759117
+ appearanceId.current = randomUUID80();
758714
759118
  onOpen(appearanceId.current);
758715
759119
  }, [state2, onOpen]);
758716
759120
  const handleSelect = import_react288.useCallback((selected) => {
@@ -761585,7 +761989,7 @@ var init_ndjsonSafeStringify = __esm(() => {
761585
761989
  });
761586
761990
 
761587
761991
  // src/cli/structuredIO.ts
761588
- import { randomUUID as randomUUID80 } from "crypto";
761992
+ import { randomUUID as randomUUID81 } from "crypto";
761589
761993
  function serializeDecisionReason(reason) {
761590
761994
  if (!reason) {
761591
761995
  return;
@@ -761833,7 +762237,7 @@ class StructuredIO {
761833
762237
  writeToStdout(ndjsonSafeStringify(message) + `
761834
762238
  `);
761835
762239
  }
761836
- async sendRequest(request, schema, signal, requestId = randomUUID80()) {
762240
+ async sendRequest(request, schema, signal, requestId = randomUUID81()) {
761837
762241
  const message = {
761838
762242
  type: "control_request",
761839
762243
  request_id: requestId,
@@ -761899,7 +762303,7 @@ class StructuredIO {
761899
762303
  parentSignal.addEventListener("abort", onParentAbort, { once: true });
761900
762304
  try {
761901
762305
  const hookPromise = executePermissionRequestHooksForSDK(tool.name, toolUseID, input, toolUseContext, mainPermissionResult.suggestions).then((decision) => ({ source: "hook", decision }));
761902
- const requestId = randomUUID80();
762306
+ const requestId = randomUUID81();
761903
762307
  onPermissionPrompt?.(buildRequiresActionDetails(tool, input, toolUseID, requestId));
761904
762308
  const sdkPromise = this.sendRequest({
761905
762309
  subtype: "can_use_tool",
@@ -761979,7 +762383,7 @@ class StructuredIO {
761979
762383
  subtype: "can_use_tool",
761980
762384
  tool_name: SANDBOX_NETWORK_ACCESS_TOOL_NAME,
761981
762385
  input: { host: hostPattern.host },
761982
- tool_use_id: randomUUID80(),
762386
+ tool_use_id: randomUUID81(),
761983
762387
  description: `Allow network connection to ${hostPattern.host}?`
761984
762388
  }, outputSchema40());
761985
762389
  return result.behavior === "allow";
@@ -766377,7 +766781,7 @@ __export(exports_REPL, {
766377
766781
  import { dirname as dirname88, join as join243 } from "path";
766378
766782
  import { tmpdir as tmpdir20 } from "os";
766379
766783
  import { writeFile as writeFile47 } from "fs/promises";
766380
- import { randomUUID as randomUUID81 } from "crypto";
766784
+ import { randomUUID as randomUUID82 } from "crypto";
766381
766785
  function TranscriptModeFooter(t0) {
766382
766786
  const $2 = import_compiler_runtime341.c(9);
766383
766787
  const {
@@ -767116,7 +767520,7 @@ function REPL({
767116
767520
  const [isMessageSelectorVisible, setIsMessageSelectorVisible] = import_react315.useState(false);
767117
767521
  const [messageSelectorPreselect, setMessageSelectorPreselect] = import_react315.useState(undefined);
767118
767522
  const [showCostDialog, setShowCostDialog] = import_react315.useState(false);
767119
- const [conversationId, setConversationId] = import_react315.useState(randomUUID81());
767523
+ const [conversationId, setConversationId] = import_react315.useState(randomUUID82());
767120
767524
  const [idleReturnPending, setIdleReturnPending] = import_react315.useState(null);
767121
767525
  const skipIdleCheckRef = import_react315.useRef(false);
767122
767526
  const lastQueryCompletionTimeRef = import_react315.useRef(lastQueryCompletionTime);
@@ -767817,7 +768221,7 @@ Error: sandbox required but unavailable: ${reason}
767817
768221
  } else {
767818
768222
  setMessages(() => [newMessage]);
767819
768223
  }
767820
- setConversationId(randomUUID81());
768224
+ setConversationId(randomUUID82());
767821
768225
  if (false) {}
767822
768226
  } else if (newMessage.type === "progress" && isEphemeralToolProgress(newMessage.data.type)) {
767823
768227
  setMessages((oldMessages) => {
@@ -767893,7 +768297,7 @@ Error: sandbox required but unavailable: ${reason}
767893
768297
  });
767894
768298
  if (!shouldQuery) {
767895
768299
  if (newMessages.some(isCompactBoundaryMessage)) {
767896
- setConversationId(randomUUID81());
768300
+ setConversationId(randomUUID82());
767897
768301
  if (false) {}
767898
768302
  }
767899
768303
  resetLoadingState();
@@ -768502,7 +768906,7 @@ Error: sandbox required but unavailable: ${reason}
768502
768906
  rewindToMessageIndex: messageIndex
768503
768907
  });
768504
768908
  setMessages(prev.slice(0, messageIndex));
768505
- setConversationId(randomUUID81());
768909
+ setConversationId(randomUUID82());
768506
768910
  resetMicrocompactState();
768507
768911
  if (false) {}
768508
768912
  setAppState((prev2) => ({
@@ -769690,7 +770094,7 @@ Note: ctrl + z now suspends UR, ctrl + _ undoes input.
769690
770094
  setMessages(postCompact);
769691
770095
  }
769692
770096
  if (false) {}
769693
- setConversationId(randomUUID81());
770097
+ setConversationId(randomUUID82());
769694
770098
  runPostCompactCleanup(context6.options.querySource);
769695
770099
  if (direction === "from") {
769696
770100
  const r = textForResubmit(message);
@@ -771018,7 +771422,7 @@ function WelcomeV2() {
771018
771422
  dimColor: true,
771019
771423
  children: [
771020
771424
  "v",
771021
- "1.78.7"
771425
+ "1.78.8"
771022
771426
  ]
771023
771427
  }, undefined, true, undefined, this)
771024
771428
  ]
@@ -772278,7 +772682,7 @@ function completeOnboarding() {
772278
772682
  saveGlobalConfig((current) => ({
772279
772683
  ...current,
772280
772684
  hasCompletedOnboarding: true,
772281
- lastOnboardingVersion: "1.78.7"
772685
+ lastOnboardingVersion: "1.78.8"
772282
772686
  }));
772283
772687
  }
772284
772688
  function showDialog(root2, renderer) {
@@ -777322,7 +777726,7 @@ function appendToLog(path24, message) {
777322
777726
  cwd: getFsImplementation().cwd(),
777323
777727
  userType: process.env.USER_TYPE,
777324
777728
  sessionId: getSessionId(),
777325
- version: "1.78.7"
777729
+ version: "1.78.8"
777326
777730
  };
777327
777731
  getLogWriter(path24).write(messageWithTimestamp);
777328
777732
  }
@@ -778431,7 +778835,7 @@ function coalescePatches(base2, overlay) {
778431
778835
  var init_WorkerStateUploader = () => {};
778432
778836
 
778433
778837
  // src/cli/transports/ccrClient.ts
778434
- import { randomUUID as randomUUID82 } from "crypto";
778838
+ import { randomUUID as randomUUID83 } from "crypto";
778435
778839
  function alwaysValidStatus() {
778436
778840
  return true;
778437
778841
  }
@@ -778794,7 +779198,7 @@ class CCRClient {
778794
779198
  return {
778795
779199
  payload: {
778796
779200
  ...msg,
778797
- uuid: typeof msg.uuid === "string" ? msg.uuid : randomUUID82()
779201
+ uuid: typeof msg.uuid === "string" ? msg.uuid : randomUUID83()
778798
779202
  }
778799
779203
  };
778800
779204
  }
@@ -778818,7 +779222,7 @@ class CCRClient {
778818
779222
  payload: {
778819
779223
  type: eventType,
778820
779224
  ...payload,
778821
- uuid: typeof payload.uuid === "string" ? payload.uuid : randomUUID82()
779225
+ uuid: typeof payload.uuid === "string" ? payload.uuid : randomUUID83()
778822
779226
  },
778823
779227
  ...isCompaction && { is_compaction: true },
778824
779228
  ...agentId && { agent_id: agentId }
@@ -780362,7 +780766,7 @@ var init_queryContext = __esm(() => {
780362
780766
  });
780363
780767
 
780364
780768
  // src/QueryEngine.ts
780365
- import { randomUUID as randomUUID83 } from "crypto";
780769
+ import { randomUUID as randomUUID84 } from "crypto";
780366
780770
 
780367
780771
  class QueryEngine {
780368
780772
  config;
@@ -780659,7 +781063,7 @@ class QueryEngine {
780659
781063
  modelUsage: getModelUsage(),
780660
781064
  permission_denials: this.permissionDenials,
780661
781065
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
780662
- uuid: randomUUID83()
781066
+ uuid: randomUUID84()
780663
781067
  };
780664
781068
  return;
780665
781069
  }
@@ -780772,7 +781176,7 @@ class QueryEngine {
780772
781176
  event: message.event,
780773
781177
  session_id: getSessionId(),
780774
781178
  parent_tool_use_id: null,
780775
- uuid: randomUUID83()
781179
+ uuid: randomUUID84()
780776
781180
  };
780777
781181
  }
780778
781182
  break;
@@ -780804,7 +781208,7 @@ class QueryEngine {
780804
781208
  modelUsage: getModelUsage(),
780805
781209
  permission_denials: this.permissionDenials,
780806
781210
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
780807
- uuid: randomUUID83(),
781211
+ uuid: randomUUID84(),
780808
781212
  errors: [
780809
781213
  `Reached maximum number of turns (${message.attachment.maxTurns})`
780810
781214
  ]
@@ -780899,7 +781303,7 @@ class QueryEngine {
780899
781303
  modelUsage: getModelUsage(),
780900
781304
  permission_denials: this.permissionDenials,
780901
781305
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
780902
- uuid: randomUUID83(),
781306
+ uuid: randomUUID84(),
780903
781307
  errors: [`Reached maximum budget ($${maxBudgetUsd})`]
780904
781308
  };
780905
781309
  return;
@@ -780928,7 +781332,7 @@ class QueryEngine {
780928
781332
  modelUsage: getModelUsage(),
780929
781333
  permission_denials: this.permissionDenials,
780930
781334
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
780931
- uuid: randomUUID83(),
781335
+ uuid: randomUUID84(),
780932
781336
  errors: [
780933
781337
  `Failed to provide valid structured output after ${maxRetries} attempts`
780934
781338
  ]
@@ -780960,7 +781364,7 @@ class QueryEngine {
780960
781364
  modelUsage: getModelUsage(),
780961
781365
  permission_denials: this.permissionDenials,
780962
781366
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
780963
- uuid: randomUUID83(),
781367
+ uuid: randomUUID84(),
780964
781368
  errors: (() => {
780965
781369
  const all4 = getInMemoryErrors();
780966
781370
  const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
@@ -780997,7 +781401,7 @@ class QueryEngine {
780997
781401
  permission_denials: this.permissionDenials,
780998
781402
  structured_output: structuredOutputFromTool,
780999
781403
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
781000
- uuid: randomUUID83()
781404
+ uuid: randomUUID84()
781001
781405
  };
781002
781406
  }
781003
781407
  interrupt() {
@@ -781173,7 +781577,7 @@ var init_idleTimeout = __esm(() => {
781173
781577
  });
781174
781578
 
781175
781579
  // src/bridge/inboundAttachments.ts
781176
- import { randomUUID as randomUUID84 } from "crypto";
781580
+ import { randomUUID as randomUUID85 } from "crypto";
781177
781581
  import { mkdir as mkdir46, writeFile as writeFile49 } from "fs/promises";
781178
781582
  import { basename as basename67, join as join247 } from "path";
781179
781583
  function debug(msg) {
@@ -781218,7 +781622,7 @@ async function resolveOne(att) {
781218
781622
  return;
781219
781623
  }
781220
781624
  const safeName = sanitizeFileName(att.file_name);
781221
- const prefix = (att.file_uuid.slice(0, 8) || randomUUID84().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
781625
+ const prefix = (att.file_uuid.slice(0, 8) || randomUUID85().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
781222
781626
  const dir = uploadsDir();
781223
781627
  const outPath = join247(dir, `${prefix}-${safeName}`);
781224
781628
  try {
@@ -781282,11 +781686,11 @@ var init_inboundAttachments = __esm(() => {
781282
781686
  });
781283
781687
 
781284
781688
  // src/utils/sessionUrl.ts
781285
- import { randomUUID as randomUUID85 } from "crypto";
781689
+ import { randomUUID as randomUUID86 } from "crypto";
781286
781690
  function parseSessionIdentifier(resumeIdentifier) {
781287
781691
  if (resumeIdentifier.toLowerCase().endsWith(".jsonl")) {
781288
781692
  return {
781289
- sessionId: randomUUID85(),
781693
+ sessionId: randomUUID86(),
781290
781694
  ingressUrl: null,
781291
781695
  isUrl: false,
781292
781696
  jsonlFile: resumeIdentifier,
@@ -781305,7 +781709,7 @@ function parseSessionIdentifier(resumeIdentifier) {
781305
781709
  try {
781306
781710
  const url3 = new URL(resumeIdentifier);
781307
781711
  return {
781308
- sessionId: randomUUID85(),
781712
+ sessionId: randomUUID86(),
781309
781713
  ingressUrl: url3.href,
781310
781714
  isUrl: true,
781311
781715
  jsonlFile: null,
@@ -781481,8 +781885,8 @@ async function getEnvLessBridgeConfig() {
781481
781885
  }
781482
781886
  async function checkEnvLessBridgeMinVersion() {
781483
781887
  const cfg = await getEnvLessBridgeConfig();
781484
- if (cfg.min_version && lt("1.78.7", cfg.min_version)) {
781485
- return `Your version of UR (${"1.78.7"}) is too old for Remote Control.
781888
+ if (cfg.min_version && lt("1.78.8", cfg.min_version)) {
781889
+ return `Your version of UR (${"1.78.8"}) is too old for Remote Control.
781486
781890
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
781487
781891
  }
781488
781892
  return null;
@@ -781914,7 +782318,7 @@ var init_bridgePointer = __esm(() => {
781914
782318
  });
781915
782319
 
781916
782320
  // src/bridge/replBridge.ts
781917
- import { randomUUID as randomUUID86 } from "crypto";
782321
+ import { randomUUID as randomUUID87 } from "crypto";
781918
782322
  async function initBridgeCore(params) {
781919
782323
  const {
781920
782324
  dir,
@@ -781956,7 +782360,7 @@ async function initBridgeCore(params) {
781956
782360
  const rawApi = createBridgeApiClient({
781957
782361
  baseUrl,
781958
782362
  getAccessToken,
781959
- runnerVersion: "1.78.7",
782363
+ runnerVersion: "1.78.8",
781960
782364
  onDebug: logForDebugging,
781961
782365
  onAuth401,
781962
782366
  getTrustedDeviceToken
@@ -781971,9 +782375,9 @@ async function initBridgeCore(params) {
781971
782375
  spawnMode: "single-session",
781972
782376
  verbose: false,
781973
782377
  sandbox: false,
781974
- bridgeId: randomUUID86(),
782378
+ bridgeId: randomUUID87(),
781975
782379
  workerType,
781976
- environmentId: randomUUID86(),
782380
+ environmentId: randomUUID87(),
781977
782381
  reuseEnvironmentId: prior?.environmentId,
781978
782382
  apiBaseUrl: baseUrl,
781979
782383
  sessionIngressUrl
@@ -783823,7 +784227,7 @@ __export(exports_print, {
783823
784227
  import { readFile as readFile58, stat as stat52, writeFile as writeFile51 } from "fs/promises";
783824
784228
  import { dirname as dirname92 } from "path";
783825
784229
  import { cwd as cwd2 } from "process";
783826
- import { randomUUID as randomUUID87 } from "crypto";
784230
+ import { randomUUID as randomUUID88 } from "crypto";
783827
784231
  function trackReceivedMessageUuid(uuid3) {
783828
784232
  if (receivedMessageUuids.has(uuid3)) {
783829
784233
  return false;
@@ -783945,7 +784349,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
783945
784349
  hook_id: event.hookId,
783946
784350
  hook_name: event.hookName,
783947
784351
  hook_event: event.hookEvent,
783948
- uuid: randomUUID87(),
784352
+ uuid: randomUUID88(),
783949
784353
  session_id: getSessionId()
783950
784354
  };
783951
784355
  case "progress":
@@ -783958,7 +784362,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
783958
784362
  stdout: event.stdout,
783959
784363
  stderr: event.stderr,
783960
784364
  output: event.output,
783961
- uuid: randomUUID87(),
784365
+ uuid: randomUUID88(),
783962
784366
  session_id: getSessionId()
783963
784367
  };
783964
784368
  case "response":
@@ -783973,7 +784377,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
783973
784377
  stderr: event.stderr,
783974
784378
  exit_code: event.exitCode,
783975
784379
  outcome: event.outcome,
783976
- uuid: randomUUID87(),
784380
+ uuid: randomUUID88(),
783977
784381
  session_id: getSessionId()
783978
784382
  };
783979
784383
  }
@@ -784186,7 +784590,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784186
784590
  subtype: "status",
784187
784591
  status: null,
784188
784592
  permissionMode: newMode,
784189
- uuid: randomUUID87(),
784593
+ uuid: randomUUID88(),
784190
784594
  session_id: getSessionId()
784191
784595
  });
784192
784596
  }
@@ -784207,7 +784611,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784207
784611
  isAuthenticating: status2.isAuthenticating,
784208
784612
  output: status2.output,
784209
784613
  error: status2.error,
784210
- uuid: randomUUID87(),
784614
+ uuid: randomUUID88(),
784211
784615
  session_id: getSessionId()
784212
784616
  });
784213
784617
  });
@@ -784218,7 +784622,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784218
784622
  output.enqueue({
784219
784623
  type: "rate_limit_event",
784220
784624
  rate_limit_info: rateLimitInfo,
784221
- uuid: randomUUID87(),
784625
+ uuid: randomUUID88(),
784222
784626
  session_id: getSessionId()
784223
784627
  });
784224
784628
  }
@@ -784234,7 +784638,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784234
784638
  enqueue({
784235
784639
  mode: "prompt",
784236
784640
  value: turnInterruptionState.message.message.content,
784237
- uuid: randomUUID87()
784641
+ uuid: randomUUID88()
784238
784642
  });
784239
784643
  }
784240
784644
  const modelOptions = getModelOptions();
@@ -784327,7 +784731,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784327
784731
  subtype: "elicitation_complete",
784328
784732
  mcp_server_name: serverName,
784329
784733
  elicitation_id: elicitationId,
784330
- uuid: randomUUID87(),
784734
+ uuid: randomUUID88(),
784331
784735
  session_id: getSessionId()
784332
784736
  });
784333
784737
  });
@@ -784672,7 +785076,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784672
785076
  duration_ms: durationMsMatch ? parseInt(durationMsMatch[1], 10) : 0
784673
785077
  } : undefined,
784674
785078
  session_id: getSessionId(),
784675
- uuid: randomUUID87()
785079
+ uuid: randomUUID88()
784676
785080
  });
784677
785081
  }
784678
785082
  }
@@ -784746,7 +785150,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784746
785150
  subtype: "status",
784747
785151
  status: status2,
784748
785152
  session_id: getSessionId(),
784749
- uuid: randomUUID87()
785153
+ uuid: randomUUID88()
784750
785154
  });
784751
785155
  }
784752
785156
  })) {
@@ -784794,7 +785198,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784794
785198
  const suggestionMsg = {
784795
785199
  type: "prompt_suggestion",
784796
785200
  suggestion: result.suggestion,
784797
- uuid: randomUUID87(),
785201
+ uuid: randomUUID88(),
784798
785202
  session_id: getSessionId()
784799
785203
  };
784800
785204
  const lastEmittedEntry = {
@@ -784884,7 +785288,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
784884
785288
  usage: EMPTY_USAGE2,
784885
785289
  modelUsage: {},
784886
785290
  permission_denials: [],
784887
- uuid: randomUUID87(),
785291
+ uuid: randomUUID88(),
784888
785292
  errors: [
784889
785293
  errorMessage2(error40),
784890
785294
  ...getInMemoryErrors().map((_) => _.error)
@@ -784968,7 +785372,7 @@ ${m.text}
784968
785372
  enqueue({
784969
785373
  mode: "prompt",
784970
785374
  value: formatted,
784971
- uuid: randomUUID87()
785375
+ uuid: randomUUID88()
784972
785376
  });
784973
785377
  run3();
784974
785378
  return;
@@ -784979,7 +785383,7 @@ ${m.text}
784979
785383
  enqueue({
784980
785384
  mode: "prompt",
784981
785385
  value: SHUTDOWN_TEAM_PROMPT,
784982
- uuid: randomUUID87()
785386
+ uuid: randomUUID88()
784983
785387
  });
784984
785388
  run3();
784985
785389
  return;
@@ -785003,7 +785407,7 @@ ${m.text}
785003
785407
  enqueue({
785004
785408
  mode: "prompt",
785005
785409
  value: SHUTDOWN_TEAM_PROMPT,
785006
- uuid: randomUUID87()
785410
+ uuid: randomUUID88()
785007
785411
  });
785008
785412
  run3();
785009
785413
  } else {
@@ -785752,7 +786156,7 @@ ${m.text}
785752
786156
  subtype: "bridge_state",
785753
786157
  state: state2,
785754
786158
  detail,
785755
- uuid: randomUUID87(),
786159
+ uuid: randomUUID88(),
785756
786160
  session_id: getSessionId()
785757
786161
  });
785758
786162
  },
@@ -786064,7 +786468,7 @@ async function handleInitializeRequest(request, requestId, initialized5, output,
786064
786468
  isAuthenticating: status2.isAuthenticating,
786065
786469
  output: status2.output,
786066
786470
  error: status2.error,
786067
- uuid: randomUUID87(),
786471
+ uuid: randomUUID88(),
786068
786472
  session_id: getSessionId()
786069
786473
  });
786070
786474
  }
@@ -786252,7 +786656,7 @@ function emitLoadError(message, outputFormat) {
786252
786656
  usage: EMPTY_USAGE2,
786253
786657
  modelUsage: {},
786254
786658
  permission_denials: [],
786255
- uuid: randomUUID87(),
786659
+ uuid: randomUUID88(),
786256
786660
  errors: [message]
786257
786661
  };
786258
786662
  process.stdout.write(jsonStringify(errorResult) + `
@@ -790849,7 +791253,7 @@ var init_dist8 = __esm(() => {
790849
791253
 
790850
791254
  // src/services/agents/agUi.ts
790851
791255
  import { spawn as spawn17 } from "child_process";
790852
- import { randomUUID as randomUUID88 } from "crypto";
791256
+ import { randomUUID as randomUUID89 } from "crypto";
790853
791257
  import { StringDecoder as StringDecoder4 } from "string_decoder";
790854
791258
  function isRecord7(value2) {
790855
791259
  return Boolean(value2) && typeof value2 === "object" && !Array.isArray(value2);
@@ -791122,7 +791526,7 @@ var MAX_ID_CHARS2 = 256, MAX_MESSAGES = 500, MAX_CONTEXT_ITEMS = 64, MAX_MESSAGE
791122
791526
  context6.permissionMode,
791123
791527
  "--no-session-persistence",
791124
791528
  "--session-id",
791125
- randomUUID88()
791529
+ randomUUID89()
791126
791530
  ];
791127
791531
  const timeoutMs = readPositiveInteger(process.env.UR_AG_UI_PROMPT_TIMEOUT_MS, DEFAULT_PROMPT_TIMEOUT_MS2, 2 * 60 * 60 * 1000);
791128
791532
  const maxOutputChars = readPositiveInteger(process.env.UR_AG_UI_MAX_OUTPUT_CHARS, 10 * 1024 * 1024, 100 * 1024 * 1024);
@@ -791263,7 +791667,7 @@ var MAX_ID_CHARS2 = 256, MAX_MESSAGES = 500, MAX_CONTEXT_ITEMS = 64, MAX_MESSAGE
791263
791667
  });
791264
791668
  writeChild({
791265
791669
  type: "control_request",
791266
- request_id: randomUUID88(),
791670
+ request_id: randomUUID89(),
791267
791671
  request: { subtype: "initialize" }
791268
791672
  });
791269
791673
  writeChild({
@@ -791429,7 +791833,7 @@ function getAgUiCapabilities() {
791429
791833
  name: "UR-Nexus",
791430
791834
  type: "ur-nexus",
791431
791835
  description: "Provider-flexible, local-first autonomous engineering workflow agent.",
791432
- version: "1.78.7",
791836
+ version: "1.78.8",
791433
791837
  provider: "UR",
791434
791838
  documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
791435
791839
  },
@@ -792548,7 +792952,7 @@ __export(exports_mcp2, {
792548
792952
  startMCPServer: () => startMCPServer,
792549
792953
  createMCPServer: () => createMCPServer
792550
792954
  });
792551
- import { randomUUID as randomUUID89 } from "crypto";
792955
+ import { randomUUID as randomUUID90 } from "crypto";
792552
792956
  function createMCPServer(cwd4, debug2, verbose) {
792553
792957
  const READ_FILE_STATE_CACHE_SIZE2 = 100;
792554
792958
  const readFileStateCache = createFileStateCacheWithSizeLimit(READ_FILE_STATE_CACHE_SIZE2);
@@ -792569,7 +792973,7 @@ function createMCPServer(cwd4, debug2, verbose) {
792569
792973
  };
792570
792974
  const server2 = new Server({
792571
792975
  name: "ur-nexus",
792572
- version: "1.78.7"
792976
+ version: "1.78.8"
792573
792977
  }, {
792574
792978
  capabilities: {
792575
792979
  tools: {}
@@ -792630,7 +793034,7 @@ function createMCPServer(cwd4, debug2, verbose) {
792630
793034
  throw new Error(`Tool ${name} input is invalid: ${validationResult.message}`);
792631
793035
  }
792632
793036
  const parentMessage = createAssistantMessage({ content: [] });
792633
- const permissionDecision = await hasPermissionsToUseTool(tool, parsedArgs, toolUseContext, parentMessage, randomUUID89());
793037
+ const permissionDecision = await hasPermissionsToUseTool(tool, parsedArgs, toolUseContext, parentMessage, randomUUID90());
792634
793038
  if (permissionDecision.behavior !== "allow") {
792635
793039
  throw new Error(permissionDecision.message || `Tool ${name} requires interactive approval, which is unavailable over MCP`);
792636
793040
  }
@@ -792713,7 +793117,7 @@ var init_mcp4 = __esm(() => {
792713
793117
  });
792714
793118
 
792715
793119
  // src/services/mcp/mcp2026.ts
792716
- import { randomUUID as randomUUID90 } from "crypto";
793120
+ import { randomUUID as randomUUID91 } from "crypto";
792717
793121
  import {
792718
793122
  chmodSync as chmodSync12,
792719
793123
  closeSync as closeSync11,
@@ -792724,9 +793128,9 @@ import {
792724
793128
  mkdirSync as mkdirSync70,
792725
793129
  openSync as openSync12,
792726
793130
  readFileSync as readFileSync87,
792727
- renameSync as renameSync17,
793131
+ renameSync as renameSync18,
792728
793132
  statSync as statSync33,
792729
- unlinkSync as unlinkSync15,
793133
+ unlinkSync as unlinkSync16,
792730
793134
  writeFileSync as writeFileSync70
792731
793135
  } from "fs";
792732
793136
  import { join as join250 } from "path";
@@ -792765,8 +793169,8 @@ function taskManifestPath(cwd4) {
792765
793169
  return join250(cwd4, ".ur", "mcp-2026", "tasks.json");
792766
793170
  }
792767
793171
  function quarantineTaskManifest(path24) {
792768
- const destination = `${path24}.corrupt.${new Date().toISOString().replaceAll(/[:.]/g, "-")}.${randomUUID90()}`;
792769
- renameSync17(path24, destination);
793172
+ const destination = `${path24}.corrupt.${new Date().toISOString().replaceAll(/[:.]/g, "-")}.${randomUUID91()}`;
793173
+ renameSync18(path24, destination);
792770
793174
  chmodSync12(destination, 384);
792771
793175
  return destination;
792772
793176
  }
@@ -792857,7 +793261,7 @@ class DurableMcp2026TaskStore {
792857
793261
  prepareTaskDirectory(this.#cwd);
792858
793262
  const destination = taskManifestPath(this.#cwd);
792859
793263
  assertNotSymlink(destination);
792860
- const temporary = `${destination}.${process.pid}.${randomUUID90()}.tmp`;
793264
+ const temporary = `${destination}.${process.pid}.${randomUUID91()}.tmp`;
792861
793265
  const entries = [...this.#tasks.values()].slice(-MAX_TASKS2);
792862
793266
  const encoded = entries.map((entry, index2) => ({
792863
793267
  entry,
@@ -792895,11 +793299,11 @@ class DurableMcp2026TaskStore {
792895
793299
  } finally {
792896
793300
  closeSync11(descriptor);
792897
793301
  }
792898
- renameSync17(temporary, destination);
793302
+ renameSync18(temporary, destination);
792899
793303
  chmodSync12(destination, 384);
792900
793304
  } finally {
792901
793305
  if (existsSync99(temporary))
792902
- unlinkSync15(temporary);
793306
+ unlinkSync16(temporary);
792903
793307
  }
792904
793308
  }
792905
793309
  async#mutate(operation) {
@@ -792921,7 +793325,7 @@ class DurableMcp2026TaskStore {
792921
793325
  return this.#mutate(() => {
792922
793326
  const timestamp2 = new Date().toISOString();
792923
793327
  const task2 = {
792924
- taskId: randomUUID90(),
793328
+ taskId: randomUUID91(),
792925
793329
  status: "working",
792926
793330
  statusMessage: "UR is executing the requested tool.",
792927
793331
  createdAt: timestamp2,
@@ -793727,7 +794131,7 @@ function thrownResponse(error40) {
793727
794131
  }
793728
794132
  async function createUrMcp2026Runtime(options4) {
793729
794133
  const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
793730
- const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.78.7" }, { capabilities: {} });
794134
+ const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.78.8" }, { capabilities: {} });
793731
794135
  const [clientTransport, serverTransport] = createLinkedTransportPair();
793732
794136
  try {
793733
794137
  await server2.connect(serverTransport);
@@ -793738,7 +794142,7 @@ async function createUrMcp2026Runtime(options4) {
793738
794142
  }
793739
794143
  const runtime2 = new Mcp2026Runtime({
793740
794144
  cwd: options4.cwd,
793741
- version: "1.78.7",
794145
+ version: "1.78.8",
793742
794146
  backend: {
793743
794147
  listTools: async () => {
793744
794148
  const listed = await client2.listTools();
@@ -795879,7 +796283,7 @@ async function update() {
795879
796283
  logEvent("tengu_update_check", {});
795880
796284
  const diagnostic2 = await getDoctorDiagnostic();
795881
796285
  const result = await checkUpgradeStatus({
795882
- currentVersion: "1.78.7",
796286
+ currentVersion: "1.78.8",
795883
796287
  packageName: UR_AGENT_PACKAGE_NAME,
795884
796288
  installationType: diagnostic2.installationType,
795885
796289
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -797195,7 +797599,7 @@ ${customInstructions}` : customInstructions;
797195
797599
  }
797196
797600
  }
797197
797601
  logForDiagnosticsNoPII("info", "started", {
797198
- version: "1.78.7",
797602
+ version: "1.78.8",
797199
797603
  is_native_binary: isInBundledMode()
797200
797604
  });
797201
797605
  registerCleanup(async () => {
@@ -797981,7 +798385,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
797981
798385
  pendingHookMessages
797982
798386
  }, renderAndRun);
797983
798387
  }
797984
- }).version("1.78.7 (UR-Nexus)", "-v, --version", "Output the version number");
798388
+ }).version("1.78.8 (UR-Nexus)", "-v, --version", "Output the version number");
797985
798389
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
797986
798390
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
797987
798391
  if (canUserConfigureAdvisor()) {
@@ -799033,7 +799437,7 @@ if (false) {}
799033
799437
  async function main2() {
799034
799438
  const args = process.argv.slice(2);
799035
799439
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
799036
- console.log(`${"1.78.7"} (UR-Nexus)`);
799440
+ console.log(`${"1.78.8"} (UR-Nexus)`);
799037
799441
  return;
799038
799442
  }
799039
799443
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {