ur-agent 1.40.1 → 1.41.0

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
@@ -71146,7 +71146,7 @@ var init_auth = __esm(() => {
71146
71146
 
71147
71147
  // src/utils/userAgent.ts
71148
71148
  function getURCodeUserAgent() {
71149
- return `ur/${"1.40.1"}`;
71149
+ return `ur/${"1.41.0"}`;
71150
71150
  }
71151
71151
 
71152
71152
  // src/utils/workloadContext.ts
@@ -71168,7 +71168,7 @@ function getUserAgent() {
71168
71168
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
71169
71169
  const workload = getWorkload();
71170
71170
  const workloadSuffix = workload ? `, workload/${workload}` : "";
71171
- return `ur-cli/${"1.40.1"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
71171
+ return `ur-cli/${"1.41.0"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
71172
71172
  }
71173
71173
  function getMCPUserAgent() {
71174
71174
  const parts = [];
@@ -71182,7 +71182,7 @@ function getMCPUserAgent() {
71182
71182
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
71183
71183
  }
71184
71184
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
71185
- return `ur/${"1.40.1"}${suffix}`;
71185
+ return `ur/${"1.41.0"}${suffix}`;
71186
71186
  }
71187
71187
  function getWebFetchUserAgent() {
71188
71188
  return `UR-User (${getURCodeUserAgent()})`;
@@ -71320,7 +71320,7 @@ var init_user = __esm(() => {
71320
71320
  deviceId,
71321
71321
  sessionId: getSessionId(),
71322
71322
  email: getEmail(),
71323
- appVersion: "1.40.1",
71323
+ appVersion: "1.41.0",
71324
71324
  platform: getHostPlatformForAnalytics(),
71325
71325
  organizationUuid,
71326
71326
  accountUuid,
@@ -77837,7 +77837,7 @@ var init_metadata = __esm(() => {
77837
77837
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
77838
77838
  WHITESPACE_REGEX = /\s+/;
77839
77839
  getVersionBase = memoize_default(() => {
77840
- const match = "1.40.1".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
77840
+ const match = "1.41.0".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
77841
77841
  return match ? match[0] : undefined;
77842
77842
  });
77843
77843
  buildEnvContext = memoize_default(async () => {
@@ -77877,7 +77877,7 @@ var init_metadata = __esm(() => {
77877
77877
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
77878
77878
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
77879
77879
  isURAiAuth: isURAISubscriber(),
77880
- version: "1.40.1",
77880
+ version: "1.41.0",
77881
77881
  versionBase: getVersionBase(),
77882
77882
  buildTime: "",
77883
77883
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -78547,7 +78547,7 @@ function initialize1PEventLogging() {
78547
78547
  const platform2 = getPlatform();
78548
78548
  const attributes = {
78549
78549
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
78550
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.40.1"
78550
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.41.0"
78551
78551
  };
78552
78552
  if (platform2 === "wsl") {
78553
78553
  const wslVersion = getWslVersion();
@@ -78574,7 +78574,7 @@ function initialize1PEventLogging() {
78574
78574
  })
78575
78575
  ]
78576
78576
  });
78577
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.40.1");
78577
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.41.0");
78578
78578
  }
78579
78579
  async function reinitialize1PEventLoggingIfConfigChanged() {
78580
78580
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -83873,7 +83873,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
83873
83873
  function formatA2AAgentCard(options = {}, pretty = true) {
83874
83874
  return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
83875
83875
  }
83876
- var urVersion = "1.40.1", coverage, priorityRoadmap;
83876
+ var urVersion = "1.41.0", coverage, priorityRoadmap;
83877
83877
  var init_trends = __esm(() => {
83878
83878
  coverage = [
83879
83879
  {
@@ -85868,7 +85868,7 @@ function getAttributionHeader(fingerprint) {
85868
85868
  if (!isAttributionHeaderEnabled()) {
85869
85869
  return "";
85870
85870
  }
85871
- const version2 = `${"1.40.1"}.${fingerprint}`;
85871
+ const version2 = `${"1.41.0"}.${fingerprint}`;
85872
85872
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
85873
85873
  const cch = "";
85874
85874
  const workload = getWorkload();
@@ -127181,10 +127181,10 @@ async function detectWorktreeMainRepoPath(cwd2) {
127181
127181
  function getSandboxEnabledSetting() {
127182
127182
  try {
127183
127183
  const settings = getSettings_DEPRECATED();
127184
- return settings?.sandbox?.enabled ?? false;
127184
+ return settings?.sandbox?.enabled ?? true;
127185
127185
  } catch (error40) {
127186
127186
  logForDebugging(`Failed to get settings for sandbox check: ${error40}`);
127187
- return false;
127187
+ return true;
127188
127188
  }
127189
127189
  }
127190
127190
  function isAutoAllowBashIfSandboxedEnabled() {
@@ -193771,7 +193771,7 @@ function getTelemetryAttributes() {
193771
193771
  attributes["session.id"] = sessionId;
193772
193772
  }
193773
193773
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
193774
- attributes["app.version"] = "1.40.1";
193774
+ attributes["app.version"] = "1.41.0";
193775
193775
  }
193776
193776
  const oauthAccount = getOauthAccountInfo();
193777
193777
  if (oauthAccount) {
@@ -229157,7 +229157,7 @@ function getInstallationEnv() {
229157
229157
  return;
229158
229158
  }
229159
229159
  function getURCodeVersion() {
229160
- return "1.40.1";
229160
+ return "1.41.0";
229161
229161
  }
229162
229162
  async function getInstalledVSCodeExtensionVersion(command) {
229163
229163
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -231996,7 +231996,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
231996
231996
  const client2 = new Client({
231997
231997
  name: "ur",
231998
231998
  title: "UR",
231999
- version: "1.40.1",
231999
+ version: "1.41.0",
232000
232000
  description: "UR-Nexus autonomous engineering workflow engine",
232001
232001
  websiteUrl: PRODUCT_URL
232002
232002
  }, {
@@ -232350,7 +232350,7 @@ var init_client5 = __esm(() => {
232350
232350
  const client2 = new Client({
232351
232351
  name: "ur",
232352
232352
  title: "UR",
232353
- version: "1.40.1",
232353
+ version: "1.41.0",
232354
232354
  description: "UR-Nexus autonomous engineering workflow engine",
232355
232355
  websiteUrl: PRODUCT_URL
232356
232356
  }, {
@@ -242164,9 +242164,9 @@ async function assertMinVersion() {
242164
242164
  if (false) {}
242165
242165
  try {
242166
242166
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
242167
- if (versionConfig.minVersion && lt("1.40.1", versionConfig.minVersion)) {
242167
+ if (versionConfig.minVersion && lt("1.41.0", versionConfig.minVersion)) {
242168
242168
  console.error(`
242169
- It looks like your version of UR (${"1.40.1"}) needs an update.
242169
+ It looks like your version of UR (${"1.41.0"}) needs an update.
242170
242170
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
242171
242171
 
242172
242172
  To update, please run:
@@ -242382,7 +242382,7 @@ async function installGlobalPackage(specificVersion) {
242382
242382
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
242383
242383
  logEvent("tengu_auto_updater_lock_contention", {
242384
242384
  pid: process.pid,
242385
- currentVersion: "1.40.1"
242385
+ currentVersion: "1.41.0"
242386
242386
  });
242387
242387
  return "in_progress";
242388
242388
  }
@@ -242391,7 +242391,7 @@ async function installGlobalPackage(specificVersion) {
242391
242391
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
242392
242392
  logError2(new Error("Windows NPM detected in WSL environment"));
242393
242393
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
242394
- currentVersion: "1.40.1"
242394
+ currentVersion: "1.41.0"
242395
242395
  });
242396
242396
  console.error(`
242397
242397
  Error: Windows NPM detected in WSL
@@ -242926,7 +242926,7 @@ function detectLinuxGlobPatternWarnings() {
242926
242926
  }
242927
242927
  async function getDoctorDiagnostic() {
242928
242928
  const installationType = await getCurrentInstallationType();
242929
- const version2 = typeof MACRO !== "undefined" ? "1.40.1" : "unknown";
242929
+ const version2 = typeof MACRO !== "undefined" ? "1.41.0" : "unknown";
242930
242930
  const installationPath = await getInstallationPath();
242931
242931
  const invokedBinary = getInvokedBinary();
242932
242932
  const multipleInstallations = await detectMultipleInstallations();
@@ -243861,8 +243861,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
243861
243861
  const maxVersion = await getMaxVersion();
243862
243862
  if (maxVersion && gt(version2, maxVersion)) {
243863
243863
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
243864
- if (gte("1.40.1", maxVersion)) {
243865
- logForDebugging(`Native installer: current version ${"1.40.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
243864
+ if (gte("1.41.0", maxVersion)) {
243865
+ logForDebugging(`Native installer: current version ${"1.41.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
243866
243866
  logEvent("tengu_native_update_skipped_max_version", {
243867
243867
  latency_ms: Date.now() - startTime,
243868
243868
  max_version: maxVersion,
@@ -243873,7 +243873,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
243873
243873
  version2 = maxVersion;
243874
243874
  }
243875
243875
  }
243876
- if (!forceReinstall && version2 === "1.40.1" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
243876
+ if (!forceReinstall && version2 === "1.41.0" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
243877
243877
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
243878
243878
  logEvent("tengu_native_update_complete", {
243879
243879
  latency_ms: Date.now() - startTime,
@@ -340826,7 +340826,7 @@ function Feedback({
340826
340826
  platform: env2.platform,
340827
340827
  gitRepo: envInfo.isGit,
340828
340828
  terminal: env2.terminal,
340829
- version: "1.40.1",
340829
+ version: "1.41.0",
340830
340830
  transcript: normalizeMessagesForAPI(messages),
340831
340831
  errors: sanitizedErrors,
340832
340832
  lastApiRequest: getLastAPIRequest(),
@@ -341018,7 +341018,7 @@ function Feedback({
341018
341018
  ", ",
341019
341019
  env2.terminal,
341020
341020
  ", v",
341021
- "1.40.1"
341021
+ "1.41.0"
341022
341022
  ]
341023
341023
  }, undefined, true, undefined, this)
341024
341024
  ]
@@ -341124,7 +341124,7 @@ ${sanitizedDescription}
341124
341124
  ` + `**Environment Info**
341125
341125
  ` + `- Platform: ${env2.platform}
341126
341126
  ` + `- Terminal: ${env2.terminal}
341127
- ` + `- Version: ${"1.40.1"}
341127
+ ` + `- Version: ${"1.41.0"}
341128
341128
  ` + `- Feedback ID: ${feedbackId}
341129
341129
  ` + `
341130
341130
  **Errors**
@@ -344235,7 +344235,7 @@ function buildPrimarySection() {
344235
344235
  }, undefined, false, undefined, this);
344236
344236
  return [{
344237
344237
  label: "Version",
344238
- value: "1.40.1"
344238
+ value: "1.41.0"
344239
344239
  }, {
344240
344240
  label: "Session name",
344241
344241
  value: nameValue
@@ -347536,7 +347536,7 @@ function Config({
347536
347536
  }
347537
347537
  }, undefined, false, undefined, this)
347538
347538
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
347539
- currentVersion: "1.40.1",
347539
+ currentVersion: "1.41.0",
347540
347540
  onChoice: (choice) => {
347541
347541
  setShowSubmenu(null);
347542
347542
  setTabsHidden(false);
@@ -347548,7 +347548,7 @@ function Config({
347548
347548
  autoUpdatesChannel: "stable"
347549
347549
  };
347550
347550
  if (choice === "stay") {
347551
- newSettings.minimumVersion = "1.40.1";
347551
+ newSettings.minimumVersion = "1.41.0";
347552
347552
  }
347553
347553
  updateSettingsForSource("userSettings", newSettings);
347554
347554
  setSettingsData((prev_27) => ({
@@ -355618,7 +355618,7 @@ function HelpV2(t0) {
355618
355618
  let t6;
355619
355619
  if ($3[31] !== tabs) {
355620
355620
  t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
355621
- title: `UR v${"1.40.1"}`,
355621
+ title: `UR v${"1.41.0"}`,
355622
355622
  color: "professionalBlue",
355623
355623
  defaultTab: "general",
355624
355624
  children: tabs
@@ -356364,7 +356364,7 @@ function buildToolUseContext(tools, readFileStateCache) {
356364
356364
  async function handleInitialize(options2) {
356365
356365
  return {
356366
356366
  name: "UR",
356367
- version: "1.40.1",
356367
+ version: "1.41.0",
356368
356368
  protocolVersion: "0.1.0",
356369
356369
  workspaceRoot: options2.cwd,
356370
356370
  capabilities: {
@@ -376506,7 +376506,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
376506
376506
  return [];
376507
376507
  }
376508
376508
  }
376509
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.40.1") {
376509
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.41.0") {
376510
376510
  if (process.env.USER_TYPE === "ant") {
376511
376511
  const changelog = "";
376512
376512
  if (changelog) {
@@ -376533,7 +376533,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.40.1")
376533
376533
  releaseNotes
376534
376534
  };
376535
376535
  }
376536
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.40.1") {
376536
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.41.0") {
376537
376537
  if (process.env.USER_TYPE === "ant") {
376538
376538
  const changelog = "";
376539
376539
  if (changelog) {
@@ -377712,7 +377712,7 @@ function getRecentActivitySync() {
377712
377712
  return cachedActivity;
377713
377713
  }
377714
377714
  function getLogoDisplayData() {
377715
- const version2 = process.env.DEMO_VERSION ?? "1.40.1";
377715
+ const version2 = process.env.DEMO_VERSION ?? "1.41.0";
377716
377716
  const serverUrl = getDirectConnectServerUrl();
377717
377717
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
377718
377718
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -378501,7 +378501,7 @@ function LogoV2() {
378501
378501
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
378502
378502
  t2 = () => {
378503
378503
  const currentConfig2 = getGlobalConfig();
378504
- if (currentConfig2.lastReleaseNotesSeen === "1.40.1") {
378504
+ if (currentConfig2.lastReleaseNotesSeen === "1.41.0") {
378505
378505
  return;
378506
378506
  }
378507
378507
  saveGlobalConfig(_temp326);
@@ -379186,12 +379186,12 @@ function LogoV2() {
379186
379186
  return t41;
379187
379187
  }
379188
379188
  function _temp326(current) {
379189
- if (current.lastReleaseNotesSeen === "1.40.1") {
379189
+ if (current.lastReleaseNotesSeen === "1.41.0") {
379190
379190
  return current;
379191
379191
  }
379192
379192
  return {
379193
379193
  ...current,
379194
- lastReleaseNotesSeen: "1.40.1"
379194
+ lastReleaseNotesSeen: "1.41.0"
379195
379195
  };
379196
379196
  }
379197
379197
  function _temp243(s_0) {
@@ -397255,23 +397255,53 @@ var init_evidence3 = __esm(() => {
397255
397255
  function pad(value, width) {
397256
397256
  return value.padEnd(width, " ");
397257
397257
  }
397258
+ function publicStatus(task) {
397259
+ if (task.status === "pending" || task.status === "ready")
397260
+ return "queued";
397261
+ if (task.status === "blocked" || task.status === "needs-context") {
397262
+ return "needs context";
397263
+ }
397264
+ if (task.status === "needs-scope")
397265
+ return "needs scope";
397266
+ if (task.status === "waiting-approval")
397267
+ return "waiting approval";
397268
+ if (task.status === "paused-review")
397269
+ return "paused for review";
397270
+ if (task.status === "skipped")
397271
+ return "skipped by policy";
397272
+ return task.status;
397273
+ }
397274
+ function isWaiting(task) {
397275
+ return [
397276
+ "blocked",
397277
+ "waiting-approval",
397278
+ "needs-scope",
397279
+ "needs-context",
397280
+ "paused-review"
397281
+ ].includes(task.status);
397282
+ }
397258
397283
  function progressSummary(tasks2) {
397259
397284
  const finished7 = tasks2.filter((task) => task.status === "finished").length;
397260
397285
  const running = tasks2.filter((task) => task.status === "running").length;
397261
- const blocked = tasks2.filter((task) => task.status === "blocked").length;
397286
+ const queued = tasks2.filter((task) => task.status === "pending" || task.status === "ready").length;
397287
+ const waiting = tasks2.filter(isWaiting).length;
397262
397288
  const failed = tasks2.filter((task) => task.status === "failed").length;
397263
- return `Progress: ${finished7}/${tasks2.length} finished, ${running} running, ${blocked} blocked, ${failed} failed`;
397289
+ const skipped = tasks2.filter((task) => task.status === "skipped").length;
397290
+ return `Progress: ${finished7}/${tasks2.length} finished, ${running} running, ${queued} queued, ${waiting} waiting, ${failed} failed, ${skipped} skipped`;
397264
397291
  }
397265
- function renderTaskBoard(planOrTasks) {
397292
+ function renderTaskBoard(planOrTasks, options2 = {}) {
397266
397293
  const tasks2 = Array.isArray(planOrTasks) ? planOrTasks : planOrTasks.tasks;
397267
- const rows = tasks2.map((task, index2) => {
397268
- const status2 = pad(task.status, 8);
397294
+ const activeAgents = options2.activeAgents ?? tasks2.filter((task) => task.status === "running").length;
397295
+ const maxAgents2 = options2.maxAgents ?? (Array.isArray(planOrTasks) ? activeAgents || 1 : planOrTasks.config.maxAgents);
397296
+ const orderedTasks = [...tasks2].sort((a2, b) => a2.order - b.order);
397297
+ const rows = orderedTasks.map((task) => {
397298
+ const status2 = pad(publicStatus(task), 18);
397269
397299
  const agent = pad(String(task.assignedAgent), 8);
397270
- return `${index2 + 1}. ${status2} | ${agent} | ${task.title}`;
397300
+ return `${task.order}. ${status2} | ${agent} | ${task.title}`;
397271
397301
  });
397272
397302
  return [
397273
397303
  "[UR-Nexus Task Board]",
397274
- "",
397304
+ `Agents: ${activeAgents} active / ${maxAgents2} max`,
397275
397305
  ...rows,
397276
397306
  "",
397277
397307
  progressSummary(tasks2)
@@ -397313,8 +397343,20 @@ function extractClaims(output) {
397313
397343
  function validateBeforeExecution(task, context4) {
397314
397344
  const issues = [];
397315
397345
  const knownFiles = normalizeSet(context4.existingFiles);
397316
- if (task.status === "blocked") {
397317
- issues.push(issue2("task_blocked", `${task.id} is blocked before execution.`));
397346
+ if (task.approvalRequired) {
397347
+ issues.push(issue2("approval_required", `${task.id} cannot continue safely without approval: ${task.approvalReason ?? "explicit approval is required"}`));
397348
+ }
397349
+ if (task.status === "blocked" || task.status === "needs-context") {
397350
+ issues.push(issue2("needs_context", `${task.id} needs context before execution.`));
397351
+ }
397352
+ if (task.status === "needs-scope") {
397353
+ issues.push(issue2("needs_scope", `${task.id} needs target scope and authorization confirmation before execution.`));
397354
+ }
397355
+ if (task.status === "paused-review") {
397356
+ issues.push(issue2("paused_for_review", `${task.id} is paused for review.`));
397357
+ }
397358
+ if (task.status === "skipped") {
397359
+ issues.push(issue2("skipped_by_policy", `${task.id} was skipped by policy.`));
397318
397360
  }
397319
397361
  if (task.input.assumptions.length === 0) {
397320
397362
  issues.push(issue2("missing_assumptions", `${task.id} has no explicit assumptions.`));
@@ -397402,7 +397444,10 @@ function cloneTasks(tasks2) {
397402
397444
  targetFiles: [...task.input.targetFiles],
397403
397445
  resources: [...task.input.resources]
397404
397446
  },
397405
- verificationCriteria: [...task.verificationCriteria]
397447
+ verificationCriteria: [...task.verificationCriteria],
397448
+ fileTargets: [...task.fileTargets],
397449
+ approvalPaths: [...task.approvalPaths],
397450
+ outsideWorkspacePaths: [...task.outsideWorkspacePaths]
397406
397451
  }));
397407
397452
  }
397408
397453
  function lockKeys(task) {
@@ -397414,7 +397459,15 @@ function dependenciesFinished(task, tasksById) {
397414
397459
  function dependenciesFailed(task, tasksById) {
397415
397460
  return task.dependencies.some((id) => {
397416
397461
  const status2 = tasksById.get(id)?.status;
397417
- return status2 === "failed" || status2 === "blocked";
397462
+ return [
397463
+ "failed",
397464
+ "blocked",
397465
+ "waiting-approval",
397466
+ "needs-scope",
397467
+ "needs-context",
397468
+ "paused-review",
397469
+ "skipped"
397470
+ ].includes(status2 ?? "");
397418
397471
  });
397419
397472
  }
397420
397473
  function isLocked(task, activeLocks) {
@@ -397428,33 +397481,74 @@ function releaseLocks(task, activeLocks) {
397428
397481
  for (const key of lockKeys(task))
397429
397482
  activeLocks.delete(key);
397430
397483
  }
397431
- function summary(tasks2, records) {
397484
+ function summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed) {
397485
+ const taskResults = tasks2.map((task) => {
397486
+ const record3 = records.get(task.id);
397487
+ if (record3)
397488
+ return record3;
397489
+ return {
397490
+ taskId: task.id,
397491
+ task,
397492
+ actualChangedFiles: [],
397493
+ reportedChangedFiles: [],
397494
+ unreportedChangedFiles: [],
397495
+ observedCommands: [],
397496
+ reportedCommands: [],
397497
+ unverifiedCommandClaims: [],
397498
+ outsideWorkspaceReads: [],
397499
+ outsideWorkspaceWrites: [],
397500
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397501
+ preVerification: { ok: true, blocked: false, issues: [] }
397502
+ };
397503
+ });
397432
397504
  return {
397433
397505
  tasks: tasks2,
397434
397506
  finished: tasks2.filter((task) => task.status === "finished").length,
397435
397507
  failed: tasks2.filter((task) => task.status === "failed").length,
397436
397508
  blocked: tasks2.filter((task) => task.status === "blocked").length,
397437
- taskResults: tasks2.map((task) => {
397438
- const record3 = records.get(task.id);
397439
- if (record3)
397440
- return record3;
397441
- return {
397442
- taskId: task.id,
397443
- task,
397444
- actualChangedFiles: [],
397445
- reportedChangedFiles: [],
397446
- unreportedChangedFiles: [],
397447
- observedCommands: [],
397448
- reportedCommands: [],
397449
- unverifiedCommandClaims: [],
397450
- preVerification: { ok: true, blocked: false, issues: [] }
397451
- };
397452
- })
397509
+ waitingApproval: tasks2.filter((task) => [
397510
+ "waiting-approval",
397511
+ "needs-scope",
397512
+ "needs-context",
397513
+ "paused-review"
397514
+ ].includes(task.status)).length,
397515
+ skipped: tasks2.filter((task) => task.status === "skipped").length,
397516
+ maxAgentsAllowed,
397517
+ maxAgentsUsed,
397518
+ approvalDecisions: uniqueApprovalDecisions(taskResults.flatMap((record3) => record3.approvalDecisions)),
397519
+ outsideWorkspaceReads: unique2(taskResults.flatMap((record3) => record3.outsideWorkspaceReads)),
397520
+ outsideWorkspaceWrites: unique2(taskResults.flatMap((record3) => record3.outsideWorkspaceWrites)),
397521
+ taskResults
397453
397522
  };
397454
397523
  }
397455
397524
  function unique2(values2) {
397456
397525
  return [...new Set([...values2].map((value) => value.trim()).filter(Boolean))];
397457
397526
  }
397527
+ function uniqueApprovalDecisions(values2) {
397528
+ const seen = new Set;
397529
+ const decisions = [];
397530
+ for (const value of values2) {
397531
+ const key = `${value.taskId}:${value.status}:${value.action}`;
397532
+ if (seen.has(key))
397533
+ continue;
397534
+ seen.add(key);
397535
+ decisions.push(value);
397536
+ }
397537
+ return decisions;
397538
+ }
397539
+ function approvalDecisionFor(task) {
397540
+ if (!task.approvalRequired)
397541
+ return null;
397542
+ return {
397543
+ taskId: task.id,
397544
+ taskTitle: task.title,
397545
+ status: task.status === "skipped" ? "skipped-by-policy" : "waiting-approval",
397546
+ reason: task.approvalReason ?? "Explicit approval is required before this action can run.",
397547
+ action: task.approvalAction ?? task.description,
397548
+ command: task.approvalCommand,
397549
+ paths: task.approvalPaths
397550
+ };
397551
+ }
397458
397552
  function reportedChangedFiles(result) {
397459
397553
  return unique2([
397460
397554
  ...result?.reportedChangedFiles ?? [],
@@ -397473,20 +397567,70 @@ function reportedCommands(result) {
397473
397567
  function issueValues(issues, code) {
397474
397568
  return unique2(issues.filter((issue3) => issue3.code === code && issue3.value).map((issue3) => issue3.value));
397475
397569
  }
397476
- function emitStatus(options2, task, tasks2, lastStatuses) {
397477
- if (lastStatuses.get(task.id) === task.status)
397478
- return;
397479
- lastStatuses.set(task.id, task.status);
397480
- options2.onEvent?.({ type: "status", task, tasks: tasks2 });
397570
+ function emitBoard(options2, tasks2, maxAgents2) {
397481
397571
  const config3 = {
397482
397572
  ...DEFAULT_PROMPT_PLANNING_CONFIG,
397483
397573
  ...resolvePromptPlanningConfig(options2.config)
397484
397574
  };
397485
397575
  if (config3.showTaskBoard) {
397486
- options2.onEvent?.({ type: "board", board: renderTaskBoard(tasks2), tasks: tasks2 });
397576
+ options2.onEvent?.({
397577
+ type: "board",
397578
+ board: renderTaskBoard(tasks2, { maxAgents: maxAgents2 }),
397579
+ tasks: tasks2
397580
+ });
397487
397581
  }
397488
397582
  }
397489
- async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397583
+ function emitStatus(options2, task, tasks2, lastStatuses, maxAgents2) {
397584
+ if (lastStatuses.get(task.id) === task.status)
397585
+ return;
397586
+ lastStatuses.set(task.id, task.status);
397587
+ options2.onEvent?.({ type: "status", task, tasks: tasks2 });
397588
+ emitBoard(options2, tasks2, maxAgents2);
397589
+ }
397590
+ function waitingStatusFor(task) {
397591
+ if (task.status === "needs-scope")
397592
+ return "needs-scope";
397593
+ if (task.status === "needs-context")
397594
+ return "needs-context";
397595
+ if (task.status === "paused-review")
397596
+ return "paused-review";
397597
+ if (task.status === "skipped")
397598
+ return "skipped";
397599
+ if (task.approvalRequired)
397600
+ return "waiting-approval";
397601
+ return "needs-context";
397602
+ }
397603
+ function runnablePlanningTasks(tasks2) {
397604
+ return tasks2.filter((task) => ["pending", "ready"].includes(task.status));
397605
+ }
397606
+ function independentWidth(tasks2) {
397607
+ const selectedLocks = new Set;
397608
+ let width = 0;
397609
+ for (const task of runnablePlanningTasks(tasks2)) {
397610
+ if (task.dependencies.length > 0)
397611
+ continue;
397612
+ const keys2 = lockKeys(task);
397613
+ if (keys2.length > 0 && keys2.some((key) => selectedLocks.has(key)))
397614
+ continue;
397615
+ for (const key of keys2)
397616
+ selectedLocks.add(key);
397617
+ width += 1;
397618
+ }
397619
+ return width;
397620
+ }
397621
+ function usefulAgentCount(tasks2, config3) {
397622
+ if (!config3.parallelAgents)
397623
+ return 1;
397624
+ const runnable = runnablePlanningTasks(tasks2);
397625
+ if (runnable.length <= 1)
397626
+ return 1;
397627
+ const width = Math.max(1, independentWidth(tasks2));
397628
+ if (runnable.length <= 4) {
397629
+ return Math.max(1, Math.min(config3.maxAgents, 3, width));
397630
+ }
397631
+ return Math.max(1, Math.min(config3.maxAgents, width));
397632
+ }
397633
+ async function runOneTask(task, tasks2, options2, records, lastStatuses, maxAgents2) {
397490
397634
  const config3 = {
397491
397635
  ...DEFAULT_PROMPT_PLANNING_CONFIG,
397492
397636
  ...resolvePromptPlanningConfig(options2.config)
@@ -397505,17 +397649,21 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397505
397649
  observedCommands: [],
397506
397650
  reportedCommands: [],
397507
397651
  unverifiedCommandClaims: [],
397652
+ outsideWorkspaceReads: [],
397653
+ outsideWorkspaceWrites: [],
397654
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397508
397655
  preVerification: before
397509
397656
  };
397510
397657
  records.set(task.id, record3);
397511
397658
  if (!before.ok) {
397512
- task.status = "blocked";
397659
+ task.status = waitingStatusFor(task);
397660
+ record3.task = task;
397513
397661
  record3.finishedAt = new Date().toISOString();
397514
- emitStatus(options2, task, tasks2, lastStatuses);
397662
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397515
397663
  return;
397516
397664
  }
397517
397665
  task.status = "running";
397518
- emitStatus(options2, task, tasks2, lastStatuses);
397666
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397519
397667
  const workspaceBefore = captureWorkspaceFileState(options2.cwd);
397520
397668
  let result;
397521
397669
  try {
@@ -397534,6 +397682,8 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397534
397682
  const observed = observedCommands(result);
397535
397683
  const reportedFiles = reportedChangedFiles(result);
397536
397684
  const reportedCommandClaims = reportedCommands(result);
397685
+ const outsideWorkspaceReads = unique2(result.outsideWorkspaceReads ?? []);
397686
+ const outsideWorkspaceWrites = unique2(result.outsideWorkspaceWrites ?? []);
397537
397687
  const after = validateAfterExecution(task, result, {
397538
397688
  cwd: options2.cwd,
397539
397689
  strict: config3.strictVerification,
@@ -397548,10 +397698,16 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397548
397698
  record3.observedCommands = observed;
397549
397699
  record3.reportedCommands = reportedCommandClaims;
397550
397700
  record3.unverifiedCommandClaims = issueValues(after.issues, "unsupported_command_claim");
397701
+ record3.outsideWorkspaceReads = outsideWorkspaceReads;
397702
+ record3.outsideWorkspaceWrites = outsideWorkspaceWrites;
397703
+ record3.approvalDecisions = uniqueApprovalDecisions([
397704
+ ...record3.approvalDecisions,
397705
+ ...result.approvalDecisions ?? []
397706
+ ]);
397551
397707
  record3.postVerification = after;
397552
397708
  record3.finishedAt = new Date().toISOString();
397553
397709
  task.status = result.ok && after.ok ? "finished" : "failed";
397554
- emitStatus(options2, task, tasks2, lastStatuses);
397710
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397555
397711
  }
397556
397712
  async function runPromptPlan(plan, options2) {
397557
397713
  const config3 = {
@@ -397564,16 +397720,22 @@ async function runPromptPlan(plan, options2) {
397564
397720
  const activeLocks = new Set;
397565
397721
  const running = new Set;
397566
397722
  const lastStatuses = new Map;
397567
- const maxAgents2 = config3.parallelAgents ? config3.maxAgents : 1;
397723
+ const maxAgentsAllowed = config3.parallelAgents ? config3.maxAgents : 1;
397724
+ const maxAgents2 = usefulAgentCount(tasks2, {
397725
+ parallelAgents: config3.parallelAgents,
397726
+ maxAgents: maxAgentsAllowed
397727
+ });
397728
+ let maxAgentsUsed = 0;
397729
+ emitBoard(options2, tasks2, maxAgentsAllowed);
397568
397730
  while (true) {
397569
397731
  for (const task of tasks2) {
397570
397732
  if (task.status === "pending" && dependenciesFailed(task, tasksById)) {
397571
- task.status = "blocked";
397572
- emitStatus(options2, task, tasks2, lastStatuses);
397733
+ task.status = "needs-context";
397734
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397573
397735
  }
397574
397736
  if (task.status === "pending" && dependenciesFinished(task, tasksById)) {
397575
397737
  task.status = "ready";
397576
- emitStatus(options2, task, tasks2, lastStatuses);
397738
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397577
397739
  }
397578
397740
  }
397579
397741
  const ready = tasks2.filter((task) => task.status === "ready" && running.size < maxAgents2 && !isLocked(task, activeLocks));
@@ -397583,19 +397745,21 @@ async function runPromptPlan(plan, options2) {
397583
397745
  if (isLocked(task, activeLocks))
397584
397746
  continue;
397585
397747
  acquireLocks(task, activeLocks);
397586
- const promise3 = runOneTask(task, tasks2, options2, records, lastStatuses).finally(() => {
397748
+ const promise3 = runOneTask(task, tasks2, options2, records, lastStatuses, maxAgentsAllowed).finally(() => {
397587
397749
  releaseLocks(task, activeLocks);
397588
397750
  running.delete(promise3);
397589
397751
  });
397590
397752
  running.add(promise3);
397753
+ maxAgentsUsed = Math.max(maxAgentsUsed, running.size);
397591
397754
  }
397592
397755
  if (running.size === 0) {
397593
397756
  const open12 = tasks2.some((task) => ["pending", "ready", "running"].includes(task.status));
397594
- if (!open12)
397595
- return summary(tasks2, records);
397757
+ if (!open12) {
397758
+ return summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed);
397759
+ }
397596
397760
  for (const task of tasks2) {
397597
397761
  if (task.status === "pending" || task.status === "ready") {
397598
- task.status = "blocked";
397762
+ task.status = "needs-context";
397599
397763
  records.set(task.id, {
397600
397764
  taskId: task.id,
397601
397765
  task,
@@ -397606,22 +397770,25 @@ async function runPromptPlan(plan, options2) {
397606
397770
  observedCommands: [],
397607
397771
  reportedCommands: [],
397608
397772
  unverifiedCommandClaims: [],
397773
+ outsideWorkspaceReads: [],
397774
+ outsideWorkspaceWrites: [],
397775
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397609
397776
  preVerification: {
397610
397777
  ok: false,
397611
397778
  blocked: true,
397612
397779
  issues: [
397613
397780
  {
397614
397781
  code: "unsatisfied_dependencies",
397615
- message: `${task.id} could not run because dependencies did not finish.`,
397782
+ message: `${task.id} cannot continue because dependencies did not finish.`,
397616
397783
  severity: "error"
397617
397784
  }
397618
397785
  ]
397619
397786
  }
397620
397787
  });
397621
- emitStatus(options2, task, tasks2, lastStatuses);
397788
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397622
397789
  }
397623
397790
  }
397624
- return summary(tasks2, records);
397791
+ return summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed);
397625
397792
  }
397626
397793
  await Promise.race(running);
397627
397794
  }
@@ -397633,6 +397800,7 @@ var init_executor = __esm(() => {
397633
397800
  });
397634
397801
 
397635
397802
  // src/services/promptPlanning/planner.ts
397803
+ import { isAbsolute as isAbsolute29 } from "path";
397636
397804
  function compact2(value) {
397637
397805
  return value.replace(/\s+/g, " ").trim();
397638
397806
  }
@@ -397658,6 +397826,12 @@ function extractReferencedFiles(text) {
397658
397826
  continue;
397659
397827
  paths2.push(value.replace(/[),.;:]+$/g, ""));
397660
397828
  }
397829
+ for (const match of text.matchAll(ABSOLUTE_PATH_PATTERN)) {
397830
+ const value = match[1];
397831
+ if (!value)
397832
+ continue;
397833
+ paths2.push(value.replace(/[),.;:]+$/g, ""));
397834
+ }
397661
397835
  return unique3(paths2);
397662
397836
  }
397663
397837
  function splitNumberedOrBulletedLines(prompt) {
@@ -397704,11 +397878,70 @@ function isCriticallyAmbiguous(segment) {
397704
397878
  return true;
397705
397879
  return /^(do|fix|update|improve|change|make|handle|clean up)(\s+(it|this|that|things?|stuff|everything))?\.?$/.test(text);
397706
397880
  }
397881
+ function extractCommand(segment) {
397882
+ const backtickCommand = segment.match(/`([^`]+)`/)?.[1];
397883
+ if (backtickCommand)
397884
+ return compact2(backtickCommand);
397885
+ const runCommand2 = segment.match(/\b(?:run|execute)\s+(.+)$/i)?.[1];
397886
+ if (runCommand2 && /(?:\s|^)(?:rm|curl|wget|nmap|sqlmap|git|npm|bun|ssh|scp|kubectl|terraform)\b/.test(runCommand2)) {
397887
+ return compact2(runCommand2);
397888
+ }
397889
+ if (DESTRUCTIVE_PATTERN.test(segment) || NETWORK_PATTERN.test(segment) || SECURITY_PATTERN.test(segment)) {
397890
+ return compact2(segment);
397891
+ }
397892
+ return;
397893
+ }
397894
+ function isOutsideReadOnly(segment, outsidePaths) {
397895
+ return outsidePaths.length > 0 && READ_PATTERN.test(segment) && !WRITE_PATTERN.test(segment);
397896
+ }
397897
+ function riskSignals(segment, outsidePaths) {
397898
+ const signals2 = [];
397899
+ if (DESTRUCTIVE_PATTERN.test(segment))
397900
+ signals2.push("destructive command");
397901
+ if (NETWORK_PATTERN.test(segment))
397902
+ signals2.push("network or external-system action");
397903
+ if (CREDENTIAL_PATTERN.test(segment))
397904
+ signals2.push("credential-sensitive access");
397905
+ if (SECURITY_PATTERN.test(segment))
397906
+ signals2.push("security research scope");
397907
+ if (outsidePaths.length > 0 && !isOutsideReadOnly(segment, outsidePaths)) {
397908
+ signals2.push("outside-workspace modification");
397909
+ }
397910
+ return signals2;
397911
+ }
397912
+ function riskLevel(signals2, files) {
397913
+ if (signals2.length > 0)
397914
+ return "high";
397915
+ if (files.length > 3)
397916
+ return "medium";
397917
+ return "low";
397918
+ }
397919
+ function approvalReasonFor(segment, signals2, outsidePaths) {
397920
+ if (signals2.length === 0)
397921
+ return;
397922
+ if (SECURITY_PATTERN.test(segment) && !AUTHORIZED_SECURITY_PATTERN.test(segment)) {
397923
+ return "Security research needs target scope and authorization confirmation before execution.";
397924
+ }
397925
+ if (outsidePaths.length > 0 && !isOutsideReadOnly(segment, outsidePaths)) {
397926
+ return "Modifying or deleting outside-workspace paths requires explicit approval.";
397927
+ }
397928
+ if (DESTRUCTIVE_PATTERN.test(segment)) {
397929
+ return "Destructive commands require explicit approval before execution.";
397930
+ }
397931
+ if (NETWORK_PATTERN.test(segment)) {
397932
+ return "Network or external-system actions require explicit approval before execution.";
397933
+ }
397934
+ if (CREDENTIAL_PATTERN.test(segment)) {
397935
+ return "Credential-sensitive access requires explicit approval before execution.";
397936
+ }
397937
+ return "This task requires explicit approval before execution.";
397938
+ }
397707
397939
  function verificationCriteria(segment, files) {
397708
397940
  const criteria = [
397709
397941
  `Result directly addresses: ${compact2(segment)}`,
397710
397942
  "Assumptions are stated before execution when context is incomplete.",
397711
- "Unsupported claims are rejected during verification."
397943
+ "Unsupported claims are rejected during verification.",
397944
+ "Approval-required actions are not executed before approval evidence exists."
397712
397945
  ];
397713
397946
  if (files.length > 0) {
397714
397947
  criteria.push("Referenced files exist before file-specific work starts.");
@@ -397718,17 +397951,24 @@ function verificationCriteria(segment, files) {
397718
397951
  }
397719
397952
  function makeTask(segment, index2, previousTaskId) {
397720
397953
  const files = extractReferencedFiles(segment);
397721
- const blocked = isCriticallyAmbiguous(segment);
397954
+ const outsidePaths = files.filter((file2) => isAbsolute29(file2));
397955
+ const signals2 = riskSignals(segment, outsidePaths);
397956
+ const approvalRequired = signals2.length > 0;
397957
+ const approvalReason = approvalReasonFor(segment, signals2, outsidePaths);
397958
+ const command5 = extractCommand(segment);
397959
+ const needsScope = SECURITY_PATTERN.test(segment) && !AUTHORIZED_SECURITY_PATTERN.test(segment);
397960
+ const needsContext = isCriticallyAmbiguous(segment);
397722
397961
  const dependencies = previousTaskId && needsPreviousTask(segment) ? [previousTaskId] : [];
397723
- const assumptions = blocked ? ["Critical target/context is missing; ask for clarification before execution."] : [
397962
+ const assumptions = needsContext ? ["Critical target/context is missing; ask for clarification before execution."] : [
397724
397963
  "Use the current workspace as the source of truth.",
397725
397964
  files.length === 0 ? "No specific files were named; discover relevant files before changing code." : "Only touch referenced files unless repository inspection proves another file is required."
397726
397965
  ];
397727
397966
  return {
397728
397967
  id: `task-${index2 + 1}`,
397968
+ order: index2 + 1,
397729
397969
  title: titleFromSegment(segment),
397730
397970
  description: compact2(segment) || "Clarify the requested work.",
397731
- status: blocked ? "blocked" : dependencies.length > 0 ? "pending" : "ready",
397971
+ status: needsContext ? "needs-context" : needsScope ? "needs-scope" : approvalRequired ? "waiting-approval" : dependencies.length > 0 ? "pending" : "ready",
397732
397972
  dependencies,
397733
397973
  assignedAgent: inferRole(segment),
397734
397974
  input: {
@@ -397738,8 +397978,16 @@ function makeTask(segment, index2, previousTaskId) {
397738
397978
  targetFiles: files,
397739
397979
  resources: extractUrls(segment)
397740
397980
  },
397741
- expectedOutput: blocked ? "A clarification request naming the missing target or context." : `Completed work for: ${compact2(segment)}`,
397742
- verificationCriteria: verificationCriteria(segment, files)
397981
+ expectedOutput: needsContext ? "A clarification request naming the missing target or context." : `Completed work for: ${compact2(segment)}`,
397982
+ verificationCriteria: verificationCriteria(segment, files),
397983
+ fileTargets: files,
397984
+ riskLevel: riskLevel(signals2, files),
397985
+ approvalRequired,
397986
+ approvalReason,
397987
+ approvalAction: approvalRequired ? compact2(segment) || "Approval-required task" : undefined,
397988
+ approvalCommand: command5,
397989
+ approvalPaths: outsidePaths,
397990
+ outsideWorkspacePaths: outsidePaths
397743
397991
  };
397744
397992
  }
397745
397993
  function decomposePrompt(prompt, config3) {
@@ -397765,11 +398013,19 @@ function decomposePrompt(prompt, config3) {
397765
398013
  config: resolvedConfig
397766
398014
  };
397767
398015
  }
397768
- var URL_PATTERN, PATH_PATTERN;
398016
+ var URL_PATTERN, PATH_PATTERN, ABSOLUTE_PATH_PATTERN, DESTRUCTIVE_PATTERN, WRITE_PATTERN, READ_PATTERN, NETWORK_PATTERN, CREDENTIAL_PATTERN, SECURITY_PATTERN, AUTHORIZED_SECURITY_PATTERN;
397769
398017
  var init_planner = __esm(() => {
397770
398018
  init_config9();
397771
398019
  URL_PATTERN = /\bhttps?:\/\/[^\s)]+/gi;
397772
398020
  PATH_PATTERN = /(?:^|[\s"'`(])((?:\.{0,2}\/)?(?:[A-Za-z0-9_.@-]+\/)+[A-Za-z0-9_.@/-]+|(?:README|CHANGELOG|RELEASE|SECURITY|CONTRIBUTING|QUALITY|LICENSE)(?:\.[A-Za-z0-9]+)?)\b/g;
398021
+ ABSOLUTE_PATH_PATTERN = /(?:^|[\s"'`(])((?:\/[A-Za-z0-9_.@-]+)+\/?)(?=$|[\s"',.;:)])/g;
398022
+ DESTRUCTIVE_PATTERN = /\b(rm\s+-[A-Za-z]*r|rm\s+-[A-Za-z]*f|delete|remove|wipe|destroy|drop\s+(?:database|table)|git\s+reset\s+--hard|mkfs|chmod\s+-R\s+777|chown\s+-R)\b/i;
398023
+ WRITE_PATTERN = /\b(write|modify|edit|update|delete|remove|rm|move|rename|chmod|chown|overwrite)\b/i;
398024
+ READ_PATTERN = /\b(read|inspect|view|cat|open|list|show)\b/i;
398025
+ NETWORK_PATTERN = /\b(curl|wget|ssh|scp|rsync|git\s+push|npm\s+(?:publish|install)|bun\s+add|kubectl|terraform\s+apply|deploy|production|cloud)\b/i;
398026
+ CREDENTIAL_PATTERN = /\b(credential|api\s*key|secret|token|password|oauth|\.env)\b/i;
398027
+ SECURITY_PATTERN = /\b(pentest|penetration\s+test|exploit|sqlmap|nmap|metasploit|payload|vulnerabilit(?:y|ies)|cve|xss|csrf|rce|security\s+scan|attack)\b/i;
398028
+ 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;
397773
398029
  });
397774
398030
 
397775
398031
  // src/services/promptPlanning/index.ts
@@ -397788,6 +398044,7 @@ __export(exports_exec, {
397788
398044
  readPrompts: () => readPrompts,
397789
398045
  formatExecFinalReport: () => formatExecFinalReport,
397790
398046
  execCommandForPrompt: () => execCommandForPrompt,
398047
+ changedFilesSinceBefore: () => changedFilesSinceBefore,
397791
398048
  call: () => call60,
397792
398049
  buildExecFinalReport: () => buildExecFinalReport
397793
398050
  });
@@ -397922,13 +398179,22 @@ async function currentChangedFiles(cwd2) {
397922
398179
  });
397923
398180
  return result.code === 0 ? parseGitStatusFiles(result.stdout) : [];
397924
398181
  }
398182
+ function changedFilesSinceBefore(beforeFiles, afterFiles) {
398183
+ const before = new Set(beforeFiles);
398184
+ return [...afterFiles].filter((file2) => !before.has(file2));
398185
+ }
397925
398186
  function plannedTaskPrompt(task) {
397926
398187
  return [
397927
398188
  `UR-Nexus planned task ${task.id}: ${task.title}`,
398189
+ `Order: ${task.order}`,
398190
+ `Risk level: ${task.riskLevel}`,
398191
+ `Approval required: ${task.approvalRequired ? "yes" : "not required"}`,
398192
+ ...task.approvalReason ? [`Approval reason: ${task.approvalReason}`] : [],
397928
398193
  "",
397929
398194
  task.description,
397930
398195
  "",
397931
398196
  `Assigned role: ${task.assignedAgent}`,
398197
+ `File targets: ${task.fileTargets.length > 0 ? task.fileTargets.join(", ") : "not specified"}`,
397932
398198
  "",
397933
398199
  "Assumptions:",
397934
398200
  ...task.input.assumptions.map((value) => `- ${value}`),
@@ -397943,7 +398209,7 @@ function plannedTaskPrompt(task) {
397943
398209
  function defaultPlannedTaskExecutor(opts) {
397944
398210
  return async (task) => {
397945
398211
  const command5 = execCommandForPrompt(plannedTaskPrompt(task), opts);
397946
- const before = new Set(await currentChangedFiles(opts.cwd));
398212
+ const before = await currentChangedFiles(opts.cwd);
397947
398213
  const result = await execFileNoThrowWithCwd(command5[0], command5.slice(1), {
397948
398214
  cwd: opts.cwd,
397949
398215
  timeout: 10 * 60000,
@@ -397956,13 +398222,13 @@ function defaultPlannedTaskExecutor(opts) {
397956
398222
  }
397957
398223
  });
397958
398224
  const after = await currentChangedFiles(opts.cwd);
397959
- const changedFiles = after.filter((file2) => !before.has(file2));
398225
+ const changedFiles = changedFilesSinceBefore(before, after);
397960
398226
  const output = [result.stdout, result.stderr].filter(Boolean).join(`
397961
398227
  `);
397962
398228
  return {
397963
398229
  ok: result.code === 0,
397964
398230
  output,
397965
- changedFiles: changedFiles.length > 0 ? changedFiles : after,
398231
+ changedFiles,
397966
398232
  commandsRun: [formatCommand3(command5)],
397967
398233
  error: result.code === 0 ? undefined : result.error ?? result.stderr
397968
398234
  };
@@ -397984,6 +398250,15 @@ function taskLine(task) {
397984
398250
  agent: String(task.assignedAgent)
397985
398251
  };
397986
398252
  }
398253
+ function isWaitingTask(task) {
398254
+ return [
398255
+ "blocked",
398256
+ "waiting-approval",
398257
+ "needs-scope",
398258
+ "needs-context",
398259
+ "paused-review"
398260
+ ].includes(task.status);
398261
+ }
397987
398262
  function buildExecFinalReport(run) {
397988
398263
  const issues = run.taskResults.flatMap((record3) => {
397989
398264
  const issues2 = [
@@ -398007,15 +398282,22 @@ function buildExecFinalReport(run) {
398007
398282
  total: run.tasks.length,
398008
398283
  finished: run.finished,
398009
398284
  failed: run.failed,
398010
- blocked: run.blocked
398285
+ waitingApproval: run.waitingApproval,
398286
+ skipped: run.skipped
398011
398287
  },
398288
+ activeAgentsUsed: run.maxAgentsUsed,
398289
+ maxAgentsAllowed: run.maxAgentsAllowed,
398012
398290
  finishedTasks: run.tasks.filter((task) => task.status === "finished").map(taskLine),
398013
398291
  failedTasks: run.tasks.filter((task) => task.status === "failed").map(taskLine),
398014
- blockedTasks: run.tasks.filter((task) => task.status === "blocked").map(taskLine),
398292
+ waitingApprovalTasks: run.tasks.filter(isWaitingTask).map(taskLine),
398293
+ skippedTasks: run.tasks.filter((task) => task.status === "skipped").map(taskLine),
398015
398294
  actualChangedFiles,
398016
398295
  unreportedChangedFiles: unique4(run.taskResults.flatMap((record3) => record3.unreportedChangedFiles)),
398296
+ outsideWorkspaceFilesAccessed: run.outsideWorkspaceReads,
398297
+ outsideWorkspaceFilesModified: run.outsideWorkspaceWrites,
398017
398298
  verifiedCommands,
398018
398299
  unverifiedCommandClaims: unique4(run.taskResults.flatMap((record3) => record3.unverifiedCommandClaims)),
398300
+ approvalDecisions: run.approvalDecisions,
398019
398301
  filesChanged: actualChangedFiles,
398020
398302
  commandsRun: verifiedCommands,
398021
398303
  verificationFailures,
@@ -398030,13 +398312,27 @@ function buildExecFinalReport(run) {
398030
398312
  function formatList(items, empty, render2) {
398031
398313
  return items.length > 0 ? items.map(render2) : [`- ${empty}`];
398032
398314
  }
398315
+ function formatApprovalDecision(decision) {
398316
+ const details = [
398317
+ decision.command ? `command: ${decision.command}` : "",
398318
+ decision.paths.length > 0 ? `paths: ${decision.paths.join(", ")}` : ""
398319
+ ].filter(Boolean);
398320
+ return [
398321
+ `- ${decision.taskId} | ${decision.status} | ${decision.action}`,
398322
+ ` reason: ${decision.reason}`,
398323
+ ...details.length > 0 ? [` ${details.join(" | ")}`] : []
398324
+ ].join(`
398325
+ `);
398326
+ }
398033
398327
  function formatExecFinalReport(report) {
398034
398328
  return [
398035
398329
  "UR-Nexus task summary",
398036
398330
  `Total: ${report.summary.total}`,
398037
398331
  `Finished: ${report.summary.finished}`,
398038
398332
  `Failed: ${report.summary.failed}`,
398039
- `Blocked: ${report.summary.blocked}`,
398333
+ `Waiting approval/input: ${report.summary.waitingApproval}`,
398334
+ `Skipped: ${report.summary.skipped}`,
398335
+ `Agents used: ${report.activeAgentsUsed} active / ${report.maxAgentsAllowed} max`,
398040
398336
  "",
398041
398337
  "Finished tasks:",
398042
398338
  ...formatList(report.finishedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
@@ -398044,12 +398340,21 @@ function formatExecFinalReport(report) {
398044
398340
  "Failed tasks:",
398045
398341
  ...formatList(report.failedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398046
398342
  "",
398047
- "Blocked tasks:",
398048
- ...formatList(report.blockedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398343
+ "Waiting approval/input tasks:",
398344
+ ...formatList(report.waitingApprovalTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398345
+ "",
398346
+ "Skipped tasks:",
398347
+ ...formatList(report.skippedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398049
398348
  "",
398050
398349
  "Actual changed files:",
398051
398350
  ...formatList(report.actualChangedFiles, "none observed", (file2) => `- ${file2}`),
398052
398351
  "",
398352
+ "Outside-workspace files accessed:",
398353
+ ...formatList(report.outsideWorkspaceFilesAccessed, "none observed", (file2) => `- ${file2}`),
398354
+ "",
398355
+ "Outside-workspace files modified:",
398356
+ ...formatList(report.outsideWorkspaceFilesModified, "none observed", (file2) => `- ${file2}`),
398357
+ "",
398053
398358
  "Unreported changed files:",
398054
398359
  ...formatList(report.unreportedChangedFiles, "none", (file2) => `- ${file2}`),
398055
398360
  "",
@@ -398059,6 +398364,9 @@ function formatExecFinalReport(report) {
398059
398364
  "Unverified command claims:",
398060
398365
  ...formatList(report.unverifiedCommandClaims, "none", (command5) => `- ${command5}`),
398061
398366
  "",
398367
+ "Approval decisions:",
398368
+ ...formatList(report.approvalDecisions, "none", formatApprovalDecision),
398369
+ "",
398062
398370
  "Verification failures:",
398063
398371
  ...formatList(report.verificationFailures, "none", (failure) => `- ${failure.taskId} | ${failure.code} | ${failure.message}`),
398064
398372
  "",
@@ -398071,7 +398379,7 @@ function formatExecFinalReport(report) {
398071
398379
  `);
398072
398380
  }
398073
398381
  function aggregateTask(prompt, plan, run, cwd2) {
398074
- const failed = run.failed > 0 || run.blocked > 0;
398382
+ const failed = run.failed > 0 || run.blocked > 0 || run.waitingApproval > 0 || run.skipped > 0;
398075
398383
  const now7 = new Date().toISOString();
398076
398384
  return {
398077
398385
  id: plan.id,
@@ -398115,7 +398423,7 @@ async function runPromptPlans(prompts, opts) {
398115
398423
  }
398116
398424
  });
398117
398425
  const completedPlan = { ...plan, tasks: run.tasks };
398118
- const taskBoard = config3.showTaskBoard ? renderTaskBoard(completedPlan) : undefined;
398426
+ const taskBoard = config3.showTaskBoard ? renderTaskBoard(completedPlan, { maxAgents: run.maxAgentsAllowed }) : undefined;
398119
398427
  const finalReport = buildExecFinalReport(run);
398120
398428
  const command5 = finalReport.commandsRun;
398121
398429
  results[index2] = {
@@ -410506,7 +410814,7 @@ var init_code_index2 = __esm(() => {
410506
410814
 
410507
410815
  // node_modules/typescript/lib/typescript.js
410508
410816
  var require_typescript2 = __commonJS((exports, module) => {
410509
- var __dirname = "/sessions/brave-exciting-keller/mnt/UR-1.37.2/node_modules/typescript/lib", __filename = "/sessions/brave-exciting-keller/mnt/UR-1.37.2/node_modules/typescript/lib/typescript.js";
410817
+ var __dirname = "/Users/maith/Desktop/ur3-dev/UR-1.41.0/node_modules/typescript/lib", __filename = "/Users/maith/Desktop/ur3-dev/UR-1.41.0/node_modules/typescript/lib/typescript.js";
410510
410818
  /*! *****************************************************************************
410511
410819
  Copyright (c) Microsoft Corporation. All rights reserved.
410512
410820
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -579248,7 +579556,7 @@ import {
579248
579556
  statSync as statSync12,
579249
579557
  writeFileSync as writeFileSync45
579250
579558
  } from "fs";
579251
- import { dirname as dirname64, extname as extname17, isAbsolute as isAbsolute29, join as join176, relative as relative37, resolve as resolve46 } from "path";
579559
+ import { dirname as dirname64, extname as extname17, isAbsolute as isAbsolute30, join as join176, relative as relative37, resolve as resolve46 } from "path";
579252
579560
  import { promisify as promisify4 } from "util";
579253
579561
  function repoEditIndexPath(root2) {
579254
579562
  return join176(root2, ".ur", "repo-edit", "index.json");
@@ -579641,7 +579949,7 @@ function formatSearchHits(hits) {
579641
579949
  `);
579642
579950
  }
579643
579951
  function resolveRepoPath(root2, maybePath) {
579644
- const resolved = isAbsolute29(maybePath) ? maybePath : resolve46(root2, maybePath);
579952
+ const resolved = isAbsolute30(maybePath) ? maybePath : resolve46(root2, maybePath);
579645
579953
  const rel = relative37(root2, resolved);
579646
579954
  if (rel.startsWith("..")) {
579647
579955
  throw new Error(`Path escapes repository root: ${maybePath}`);
@@ -581484,9 +581792,9 @@ var init_cite2 = __esm(() => {
581484
581792
 
581485
581793
  // src/ur/fileops.ts
581486
581794
  import { existsSync as existsSync55, mkdirSync as mkdirSync48, readdirSync as readdirSync23, readFileSync as readFileSync62, statSync as statSync13, writeFileSync as writeFileSync47 } from "fs";
581487
- import { extname as extname19, isAbsolute as isAbsolute30, join as join180, relative as relative39, resolve as resolve47 } from "path";
581795
+ import { extname as extname19, isAbsolute as isAbsolute31, join as join180, relative as relative39, resolve as resolve47 } from "path";
581488
581796
  function readFileSafe2(cwd2, target, maxBytes = 64000) {
581489
- const abs = isAbsolute30(target) ? target : resolve47(cwd2, target);
581797
+ const abs = isAbsolute31(target) ? target : resolve47(cwd2, target);
581490
581798
  if (!existsSync55(abs))
581491
581799
  return { ok: false, error: `not found: ${target}` };
581492
581800
  const st = statSync13(abs);
@@ -581825,12 +582133,12 @@ __export(exports_image, {
581825
582133
  call: () => call108
581826
582134
  });
581827
582135
  import { existsSync as existsSync56, statSync as statSync14 } from "fs";
581828
- import { extname as extname20, isAbsolute as isAbsolute31, resolve as resolve48 } from "path";
582136
+ import { extname as extname20, isAbsolute as isAbsolute32, resolve as resolve48 } from "path";
581829
582137
  var call108 = async (args) => {
581830
582138
  const f = (args ?? "").trim().split(/\s+/)[0] ?? "";
581831
582139
  if (!f)
581832
582140
  return { type: "text", value: "usage: /image <file> [task]" };
581833
- const abs = isAbsolute31(f) ? f : resolve48(getCwd(), f);
582141
+ const abs = isAbsolute32(f) ? f : resolve48(getCwd(), f);
581834
582142
  if (!existsSync56(abs))
581835
582143
  return { type: "text", value: `not found: ${f}` };
581836
582144
  const kb = Math.round(statSync14(abs).size / 1024);
@@ -581873,7 +582181,7 @@ __export(exports_video, {
581873
582181
  call: () => call109
581874
582182
  });
581875
582183
  import { existsSync as existsSync57 } from "fs";
581876
- import { isAbsolute as isAbsolute32, resolve as resolve49 } from "path";
582184
+ import { isAbsolute as isAbsolute33, resolve as resolve49 } from "path";
581877
582185
  var call109 = async (args) => {
581878
582186
  const target = (args ?? "").trim().split(/\s+/)[0] ?? "";
581879
582187
  if (!target)
@@ -581884,7 +582192,7 @@ var call109 = async (args) => {
581884
582192
  return { type: "text", value: `remote video: ${target}
581885
582193
  ${yd}` };
581886
582194
  }
581887
- const abs = isAbsolute32(target) ? target : resolve49(getCwd(), target);
582195
+ const abs = isAbsolute33(target) ? target : resolve49(getCwd(), target);
581888
582196
  if (!existsSync57(abs))
581889
582197
  return { type: "text", value: `not found: ${target}` };
581890
582198
  if (!commandExists("ffprobe")) {
@@ -596040,7 +596348,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
596040
596348
  smapsRollup,
596041
596349
  platform: process.platform,
596042
596350
  nodeVersion: process.version,
596043
- ccVersion: "1.40.1"
596351
+ ccVersion: "1.41.0"
596044
596352
  };
596045
596353
  }
596046
596354
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -596626,7 +596934,7 @@ var init_bridge_kick = __esm(() => {
596626
596934
  var call137 = async () => {
596627
596935
  return {
596628
596936
  type: "text",
596629
- value: "1.40.1"
596937
+ value: "1.41.0"
596630
596938
  };
596631
596939
  }, version2, version_default;
596632
596940
  var init_version = __esm(() => {
@@ -598682,7 +598990,7 @@ var init_advisor2 = __esm(() => {
598682
598990
  // src/skills/bundledSkills.ts
598683
598991
  import { constants as fsConstants5 } from "fs";
598684
598992
  import { mkdir as mkdir37, open as open13 } from "fs/promises";
598685
- import { dirname as dirname68, isAbsolute as isAbsolute33, join as join193, normalize as normalize13, sep as pathSep3 } from "path";
598993
+ import { dirname as dirname68, isAbsolute as isAbsolute34, join as join193, normalize as normalize13, sep as pathSep3 } from "path";
598686
598994
  function registerBundledSkill(definition) {
598687
598995
  const { files: files2 } = definition;
598688
598996
  let skillRoot;
@@ -598769,7 +599077,7 @@ async function safeWriteFile(p2, content) {
598769
599077
  }
598770
599078
  function resolveSkillFilePath(baseDir, relPath) {
598771
599079
  const normalized = normalize13(relPath);
598772
- if (isAbsolute33(normalized) || normalized.split(pathSep3).includes("..") || normalized.split("/").includes("..")) {
599080
+ if (isAbsolute34(normalized) || normalized.split(pathSep3).includes("..") || normalized.split("/").includes("..")) {
598773
599081
  throw new Error(`bundled skill file path escapes skill dir: ${relPath}`);
598774
599082
  }
598775
599083
  return join193(baseDir, normalized);
@@ -600145,6 +600453,11 @@ function ModelPickerWrapper(t0) {
600145
600453
  mainLoopModel: model,
600146
600454
  mainLoopModelForSession: null
600147
600455
  }));
600456
+ if (model && metadata) {
600457
+ setProviderModel(metadata.providerId, model, {
600458
+ modelSource: metadata.modelSource
600459
+ });
600460
+ }
600148
600461
  let message = metadata ? `Selected provider: ${source_default.bold(metadata.providerName)} (${metadata.accessType})
600149
600462
  Selected model: ${source_default.bold(renderModelLabel(model))}
600150
600463
  Model source: ${metadata.modelSource}
@@ -600293,6 +600606,14 @@ function SetModelAndClose({
600293
600606
  }
600294
600607
  } : {}
600295
600608
  }));
600609
+ if (modelValue === null) {
600610
+ updateSettingsForSource("localSettings", {
600611
+ model: undefined,
600612
+ provider: {
600613
+ model: undefined
600614
+ }
600615
+ });
600616
+ }
600296
600617
  let message = `Set model to ${source_default.bold(renderModelLabel(modelValue))}`;
600297
600618
  let wasFastModeToggledOn = undefined;
600298
600619
  if (isFastModeEnabled()) {
@@ -606706,7 +607027,7 @@ function generateHtmlReport(data, insights) {
606706
607027
  </html>`;
606707
607028
  }
606708
607029
  function buildExportData(data, insights, facets, remoteStats) {
606709
- const version3 = typeof MACRO !== "undefined" ? "1.40.1" : "unknown";
607030
+ const version3 = typeof MACRO !== "undefined" ? "1.41.0" : "unknown";
606710
607031
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
606711
607032
  const facets_summary = {
606712
607033
  total: facets.size,
@@ -610986,7 +611307,7 @@ var init_sessionStorage = __esm(() => {
610986
611307
  init_settings2();
610987
611308
  init_slowOperations();
610988
611309
  init_uuid();
610989
- VERSION5 = typeof MACRO !== "undefined" ? "1.40.1" : "unknown";
611310
+ VERSION5 = typeof MACRO !== "undefined" ? "1.41.0" : "unknown";
610990
611311
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
610991
611312
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
610992
611313
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -612191,7 +612512,7 @@ var init_filesystem = __esm(() => {
612191
612512
  });
612192
612513
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
612193
612514
  const nonce = randomBytes18(16).toString("hex");
612194
- return join202(getURTempDir(), "bundled-skills", "1.40.1", nonce);
612515
+ return join202(getURTempDir(), "bundled-skills", "1.41.0", nonce);
612195
612516
  });
612196
612517
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
612197
612518
  });
@@ -618480,7 +618801,7 @@ function computeFingerprint(messageText2, version3) {
618480
618801
  }
618481
618802
  function computeFingerprintFromMessages(messages) {
618482
618803
  const firstMessageText = extractFirstMessageText(messages);
618483
- return computeFingerprint(firstMessageText, "1.40.1");
618804
+ return computeFingerprint(firstMessageText, "1.41.0");
618484
618805
  }
618485
618806
  var FINGERPRINT_SALT = "59cf53e54c78";
618486
618807
  var init_fingerprint = () => {};
@@ -620354,7 +620675,7 @@ async function sideQuery(opts) {
620354
620675
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
620355
620676
  }
620356
620677
  const messageText2 = extractFirstUserMessageText(messages);
620357
- const fingerprint2 = computeFingerprint(messageText2, "1.40.1");
620678
+ const fingerprint2 = computeFingerprint(messageText2, "1.41.0");
620358
620679
  const attributionHeader = getAttributionHeader(fingerprint2);
620359
620680
  const systemBlocks = [
620360
620681
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -625091,7 +625412,7 @@ function buildSystemInitMessage(inputs) {
625091
625412
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
625092
625413
  apiKeySource: getURHQApiKeyWithSource().source,
625093
625414
  betas: getSdkBetas(),
625094
- ur_version: "1.40.1",
625415
+ ur_version: "1.41.0",
625095
625416
  output_style: outputStyle2,
625096
625417
  agents: inputs.agents.map((agent) => agent.agentType),
625097
625418
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -630599,8 +630920,8 @@ function ShimmerLoadingText() {
630599
630920
  }
630600
630921
  return t2;
630601
630922
  }
630602
- function getRiskColor(riskLevel) {
630603
- switch (riskLevel) {
630923
+ function getRiskColor(riskLevel2) {
630924
+ switch (riskLevel2) {
630604
630925
  case "LOW":
630605
630926
  return "success";
630606
630927
  case "MEDIUM":
@@ -630609,8 +630930,8 @@ function getRiskColor(riskLevel) {
630609
630930
  return "error";
630610
630931
  }
630611
630932
  }
630612
- function getRiskLabel(riskLevel) {
630613
- switch (riskLevel) {
630933
+ function getRiskLabel(riskLevel2) {
630934
+ switch (riskLevel2) {
630614
630935
  case "LOW":
630615
630936
  return "Low risk";
630616
630937
  case "MEDIUM":
@@ -639719,7 +640040,7 @@ var init_useVoiceEnabled = __esm(() => {
639719
640040
  function getSemverPart(version3) {
639720
640041
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
639721
640042
  }
639722
- function useUpdateNotification(updatedVersion, initialVersion = "1.40.1") {
640043
+ function useUpdateNotification(updatedVersion, initialVersion = "1.41.0") {
639723
640044
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
639724
640045
  if (!updatedVersion) {
639725
640046
  return null;
@@ -639768,7 +640089,7 @@ function AutoUpdater({
639768
640089
  return;
639769
640090
  }
639770
640091
  if (false) {}
639771
- const currentVersion = "1.40.1";
640092
+ const currentVersion = "1.41.0";
639772
640093
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
639773
640094
  let latestVersion = await getLatestVersion(channel);
639774
640095
  const isDisabled = isAutoUpdaterDisabled();
@@ -639997,12 +640318,12 @@ function NativeAutoUpdater({
639997
640318
  logEvent("tengu_native_auto_updater_start", {});
639998
640319
  try {
639999
640320
  const maxVersion = await getMaxVersion();
640000
- if (maxVersion && gt("1.40.1", maxVersion)) {
640321
+ if (maxVersion && gt("1.41.0", maxVersion)) {
640001
640322
  const msg = await getMaxVersionMessage();
640002
640323
  setMaxVersionIssue(msg ?? "affects your version");
640003
640324
  }
640004
640325
  const result = await installLatest(channel);
640005
- const currentVersion = "1.40.1";
640326
+ const currentVersion = "1.41.0";
640006
640327
  const latencyMs = Date.now() - startTime;
640007
640328
  if (result.lockFailed) {
640008
640329
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -640139,17 +640460,17 @@ function PackageManagerAutoUpdater(t0) {
640139
640460
  const maxVersion = await getMaxVersion();
640140
640461
  if (maxVersion && latest && gt(latest, maxVersion)) {
640141
640462
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
640142
- if (gte("1.40.1", maxVersion)) {
640143
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.40.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
640463
+ if (gte("1.41.0", maxVersion)) {
640464
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.41.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
640144
640465
  setUpdateAvailable(false);
640145
640466
  return;
640146
640467
  }
640147
640468
  latest = maxVersion;
640148
640469
  }
640149
- const hasUpdate = latest && !gte("1.40.1", latest) && !shouldSkipVersion(latest);
640470
+ const hasUpdate = latest && !gte("1.41.0", latest) && !shouldSkipVersion(latest);
640150
640471
  setUpdateAvailable(!!hasUpdate);
640151
640472
  if (hasUpdate) {
640152
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.40.1"} -> ${latest}`);
640473
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.41.0"} -> ${latest}`);
640153
640474
  }
640154
640475
  };
640155
640476
  $3[0] = t1;
@@ -640183,7 +640504,7 @@ function PackageManagerAutoUpdater(t0) {
640183
640504
  wrap: "truncate",
640184
640505
  children: [
640185
640506
  "currentVersion: ",
640186
- "1.40.1"
640507
+ "1.41.0"
640187
640508
  ]
640188
640509
  }, undefined, true, undefined, this);
640189
640510
  $3[3] = verbose;
@@ -652635,7 +652956,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
652635
652956
  project_dir: getOriginalCwd(),
652636
652957
  added_dirs: addedDirs
652637
652958
  },
652638
- version: "1.40.1",
652959
+ version: "1.41.0",
652639
652960
  output_style: {
652640
652961
  name: outputStyleName
652641
652962
  },
@@ -652718,7 +653039,7 @@ function StatusLineInner({
652718
653039
  const taskValues = Object.values(tasks2);
652719
653040
  const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
652720
653041
  const defaultStatusLineText = buildDefaultStatusBar({
652721
- version: "1.40.1",
653042
+ version: "1.41.0",
652722
653043
  providerLabel: providerRuntime.providerLabel,
652723
653044
  authMode: providerRuntime.authLabel,
652724
653045
  model: providerRuntime.model ?? renderModelName(mainLoopModel),
@@ -664206,7 +664527,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
664206
664527
  } catch {}
664207
664528
  const data = {
664208
664529
  trigger: trigger2,
664209
- version: "1.40.1",
664530
+ version: "1.41.0",
664210
664531
  platform: process.platform,
664211
664532
  transcript,
664212
664533
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -669340,7 +669661,7 @@ var init_usePluginAutoupdateNotification = __esm(() => {
669340
669661
  });
669341
669662
 
669342
669663
  // src/utils/plugins/reconciler.ts
669343
- import { isAbsolute as isAbsolute34, resolve as resolve51 } from "path";
669664
+ import { isAbsolute as isAbsolute35, resolve as resolve51 } from "path";
669344
669665
  function diffMarketplaces(declared, materialized, opts) {
669345
669666
  const missing = [];
669346
669667
  const sourceChanged = [];
@@ -669448,7 +669769,7 @@ async function reconcileMarketplaces(opts) {
669448
669769
  return { installed, updated, failed, upToDate: diff3.upToDate, skipped };
669449
669770
  }
669450
669771
  function normalizeSource(source, projectRoot2) {
669451
- if ((source.source === "directory" || source.source === "file") && !isAbsolute34(source.path)) {
669772
+ if ((source.source === "directory" || source.source === "file") && !isAbsolute35(source.path)) {
669452
669773
  const base2 = projectRoot2 ?? getOriginalCwd();
669453
669774
  const canonicalRoot = findCanonicalGitRoot(base2);
669454
669775
  return {
@@ -676091,7 +676412,7 @@ function WelcomeV2() {
676091
676412
  dimColor: true,
676092
676413
  children: [
676093
676414
  "v",
676094
- "1.40.1"
676415
+ "1.41.0"
676095
676416
  ]
676096
676417
  }, undefined, true, undefined, this)
676097
676418
  ]
@@ -677351,7 +677672,7 @@ function completeOnboarding() {
677351
677672
  saveGlobalConfig((current) => ({
677352
677673
  ...current,
677353
677674
  hasCompletedOnboarding: true,
677354
- lastOnboardingVersion: "1.40.1"
677675
+ lastOnboardingVersion: "1.41.0"
677355
677676
  }));
677356
677677
  }
677357
677678
  function showDialog(root2, renderer) {
@@ -682388,7 +682709,7 @@ function appendToLog(path24, message) {
682388
682709
  cwd: getFsImplementation().cwd(),
682389
682710
  userType: process.env.USER_TYPE,
682390
682711
  sessionId: getSessionId(),
682391
- version: "1.40.1"
682712
+ version: "1.41.0"
682392
682713
  };
682393
682714
  getLogWriter(path24).write(messageWithTimestamp);
682394
682715
  }
@@ -686482,8 +686803,8 @@ async function getEnvLessBridgeConfig() {
686482
686803
  }
686483
686804
  async function checkEnvLessBridgeMinVersion() {
686484
686805
  const cfg = await getEnvLessBridgeConfig();
686485
- if (cfg.min_version && lt("1.40.1", cfg.min_version)) {
686486
- return `Your version of UR (${"1.40.1"}) is too old for Remote Control.
686806
+ if (cfg.min_version && lt("1.41.0", cfg.min_version)) {
686807
+ return `Your version of UR (${"1.41.0"}) is too old for Remote Control.
686487
686808
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
686488
686809
  }
686489
686810
  return null;
@@ -686957,7 +687278,7 @@ async function initBridgeCore(params) {
686957
687278
  const rawApi = createBridgeApiClient({
686958
687279
  baseUrl,
686959
687280
  getAccessToken,
686960
- runnerVersion: "1.40.1",
687281
+ runnerVersion: "1.41.0",
686961
687282
  onDebug: logForDebugging,
686962
687283
  onAuth401,
686963
687284
  getTrustedDeviceToken
@@ -692639,7 +692960,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
692639
692960
  setCwd(cwd3);
692640
692961
  const server2 = new Server({
692641
692962
  name: "ur/tengu",
692642
- version: "1.40.1"
692963
+ version: "1.41.0"
692643
692964
  }, {
692644
692965
  capabilities: {
692645
692966
  tools: {}
@@ -694681,7 +695002,7 @@ async function update() {
694681
695002
  logEvent("tengu_update_check", {});
694682
695003
  const diagnostic = await getDoctorDiagnostic();
694683
695004
  const result = await checkUpgradeStatus({
694684
- currentVersion: "1.40.1",
695005
+ currentVersion: "1.41.0",
694685
695006
  packageName: UR_AGENT_PACKAGE_NAME,
694686
695007
  installationType: diagnostic.installationType,
694687
695008
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -695927,7 +696248,7 @@ ${customInstructions}` : customInstructions;
695927
696248
  }
695928
696249
  }
695929
696250
  logForDiagnosticsNoPII("info", "started", {
695930
- version: "1.40.1",
696251
+ version: "1.41.0",
695931
696252
  is_native_binary: isInBundledMode()
695932
696253
  });
695933
696254
  registerCleanup(async () => {
@@ -696713,7 +697034,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
696713
697034
  pendingHookMessages
696714
697035
  }, renderAndRun);
696715
697036
  }
696716
- }).version("1.40.1 (UR-Nexus)", "-v, --version", "Output the version number");
697037
+ }).version("1.41.0 (UR-Nexus)", "-v, --version", "Output the version number");
696717
697038
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
696718
697039
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
696719
697040
  if (canUserConfigureAdvisor()) {
@@ -697628,7 +697949,7 @@ if (false) {}
697628
697949
  async function main2() {
697629
697950
  const args = process.argv.slice(2);
697630
697951
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
697631
- console.log(`${"1.40.1"} (UR-Nexus)`);
697952
+ console.log(`${"1.41.0"} (UR-Nexus)`);
697632
697953
  return;
697633
697954
  }
697634
697955
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {