ur-agent 1.40.1 → 1.41.1

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.1"}`;
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.1"} (${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.1"}${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.1",
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.1".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.1",
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.1"
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.1");
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.1", 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.1"}.${fingerprint}`;
85872
85872
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
85873
85873
  const cch = "";
85874
85874
  const workload = getWorkload();
@@ -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.1";
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.1";
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.1",
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.1",
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.1", 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.1"}) 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.1"
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.1"
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.1" : "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.1", maxVersion)) {
243865
+ logForDebugging(`Native installer: current version ${"1.41.1"} 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.1" && 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,
@@ -301849,6 +301849,24 @@ var init_supportedSettings = __esm(() => {
301849
301849
  description: "Enable extended thinking (false to disable)",
301850
301850
  appStateKey: "thinkingEnabled"
301851
301851
  },
301852
+ "sandbox.enabled": {
301853
+ source: "settings",
301854
+ type: "boolean",
301855
+ description: "Enable the OS-level sandbox for Bash/File tool commands",
301856
+ path: ["sandbox", "enabled"]
301857
+ },
301858
+ "sandbox.failIfUnavailable": {
301859
+ source: "settings",
301860
+ type: "boolean",
301861
+ description: "Refuse to start when sandbox.enabled is true but the sandbox cannot start",
301862
+ path: ["sandbox", "failIfUnavailable"]
301863
+ },
301864
+ "sandbox.allowUnsandboxedCommands": {
301865
+ source: "settings",
301866
+ type: "boolean",
301867
+ description: "Allow commands to run unsandboxed when they explicitly request it",
301868
+ path: ["sandbox", "allowUnsandboxedCommands"]
301869
+ },
301852
301870
  "permissions.defaultMode": {
301853
301871
  source: "settings",
301854
301872
  type: "string",
@@ -340826,7 +340844,7 @@ function Feedback({
340826
340844
  platform: env2.platform,
340827
340845
  gitRepo: envInfo.isGit,
340828
340846
  terminal: env2.terminal,
340829
- version: "1.40.1",
340847
+ version: "1.41.1",
340830
340848
  transcript: normalizeMessagesForAPI(messages),
340831
340849
  errors: sanitizedErrors,
340832
340850
  lastApiRequest: getLastAPIRequest(),
@@ -341018,7 +341036,7 @@ function Feedback({
341018
341036
  ", ",
341019
341037
  env2.terminal,
341020
341038
  ", v",
341021
- "1.40.1"
341039
+ "1.41.1"
341022
341040
  ]
341023
341041
  }, undefined, true, undefined, this)
341024
341042
  ]
@@ -341124,7 +341142,7 @@ ${sanitizedDescription}
341124
341142
  ` + `**Environment Info**
341125
341143
  ` + `- Platform: ${env2.platform}
341126
341144
  ` + `- Terminal: ${env2.terminal}
341127
- ` + `- Version: ${"1.40.1"}
341145
+ ` + `- Version: ${"1.41.1"}
341128
341146
  ` + `- Feedback ID: ${feedbackId}
341129
341147
  ` + `
341130
341148
  **Errors**
@@ -344235,7 +344253,7 @@ function buildPrimarySection() {
344235
344253
  }, undefined, false, undefined, this);
344236
344254
  return [{
344237
344255
  label: "Version",
344238
- value: "1.40.1"
344256
+ value: "1.41.1"
344239
344257
  }, {
344240
344258
  label: "Session name",
344241
344259
  value: nameValue
@@ -347536,7 +347554,7 @@ function Config({
347536
347554
  }
347537
347555
  }, undefined, false, undefined, this)
347538
347556
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
347539
- currentVersion: "1.40.1",
347557
+ currentVersion: "1.41.1",
347540
347558
  onChoice: (choice) => {
347541
347559
  setShowSubmenu(null);
347542
347560
  setTabsHidden(false);
@@ -347548,7 +347566,7 @@ function Config({
347548
347566
  autoUpdatesChannel: "stable"
347549
347567
  };
347550
347568
  if (choice === "stay") {
347551
- newSettings.minimumVersion = "1.40.1";
347569
+ newSettings.minimumVersion = "1.41.1";
347552
347570
  }
347553
347571
  updateSettingsForSource("userSettings", newSettings);
347554
347572
  setSettingsData((prev_27) => ({
@@ -355618,7 +355636,7 @@ function HelpV2(t0) {
355618
355636
  let t6;
355619
355637
  if ($3[31] !== tabs) {
355620
355638
  t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
355621
- title: `UR v${"1.40.1"}`,
355639
+ title: `UR v${"1.41.1"}`,
355622
355640
  color: "professionalBlue",
355623
355641
  defaultTab: "general",
355624
355642
  children: tabs
@@ -356364,7 +356382,7 @@ function buildToolUseContext(tools, readFileStateCache) {
356364
356382
  async function handleInitialize(options2) {
356365
356383
  return {
356366
356384
  name: "UR",
356367
- version: "1.40.1",
356385
+ version: "1.41.1",
356368
356386
  protocolVersion: "0.1.0",
356369
356387
  workspaceRoot: options2.cwd,
356370
356388
  capabilities: {
@@ -376506,7 +376524,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
376506
376524
  return [];
376507
376525
  }
376508
376526
  }
376509
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.40.1") {
376527
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.41.1") {
376510
376528
  if (process.env.USER_TYPE === "ant") {
376511
376529
  const changelog = "";
376512
376530
  if (changelog) {
@@ -376533,7 +376551,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.40.1")
376533
376551
  releaseNotes
376534
376552
  };
376535
376553
  }
376536
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.40.1") {
376554
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.41.1") {
376537
376555
  if (process.env.USER_TYPE === "ant") {
376538
376556
  const changelog = "";
376539
376557
  if (changelog) {
@@ -377712,7 +377730,7 @@ function getRecentActivitySync() {
377712
377730
  return cachedActivity;
377713
377731
  }
377714
377732
  function getLogoDisplayData() {
377715
- const version2 = process.env.DEMO_VERSION ?? "1.40.1";
377733
+ const version2 = process.env.DEMO_VERSION ?? "1.41.1";
377716
377734
  const serverUrl = getDirectConnectServerUrl();
377717
377735
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
377718
377736
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -378501,7 +378519,7 @@ function LogoV2() {
378501
378519
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
378502
378520
  t2 = () => {
378503
378521
  const currentConfig2 = getGlobalConfig();
378504
- if (currentConfig2.lastReleaseNotesSeen === "1.40.1") {
378522
+ if (currentConfig2.lastReleaseNotesSeen === "1.41.1") {
378505
378523
  return;
378506
378524
  }
378507
378525
  saveGlobalConfig(_temp326);
@@ -379186,12 +379204,12 @@ function LogoV2() {
379186
379204
  return t41;
379187
379205
  }
379188
379206
  function _temp326(current) {
379189
- if (current.lastReleaseNotesSeen === "1.40.1") {
379207
+ if (current.lastReleaseNotesSeen === "1.41.1") {
379190
379208
  return current;
379191
379209
  }
379192
379210
  return {
379193
379211
  ...current,
379194
- lastReleaseNotesSeen: "1.40.1"
379212
+ lastReleaseNotesSeen: "1.41.1"
379195
379213
  };
379196
379214
  }
379197
379215
  function _temp243(s_0) {
@@ -397255,23 +397273,53 @@ var init_evidence3 = __esm(() => {
397255
397273
  function pad(value, width) {
397256
397274
  return value.padEnd(width, " ");
397257
397275
  }
397276
+ function publicStatus(task) {
397277
+ if (task.status === "pending" || task.status === "ready")
397278
+ return "queued";
397279
+ if (task.status === "blocked" || task.status === "needs-context") {
397280
+ return "needs context";
397281
+ }
397282
+ if (task.status === "needs-scope")
397283
+ return "needs scope";
397284
+ if (task.status === "waiting-approval")
397285
+ return "waiting approval";
397286
+ if (task.status === "paused-review")
397287
+ return "paused for review";
397288
+ if (task.status === "skipped")
397289
+ return "skipped by policy";
397290
+ return task.status;
397291
+ }
397292
+ function isWaiting(task) {
397293
+ return [
397294
+ "blocked",
397295
+ "waiting-approval",
397296
+ "needs-scope",
397297
+ "needs-context",
397298
+ "paused-review"
397299
+ ].includes(task.status);
397300
+ }
397258
397301
  function progressSummary(tasks2) {
397259
397302
  const finished7 = tasks2.filter((task) => task.status === "finished").length;
397260
397303
  const running = tasks2.filter((task) => task.status === "running").length;
397261
- const blocked = tasks2.filter((task) => task.status === "blocked").length;
397304
+ const queued = tasks2.filter((task) => task.status === "pending" || task.status === "ready").length;
397305
+ const waiting = tasks2.filter(isWaiting).length;
397262
397306
  const failed = tasks2.filter((task) => task.status === "failed").length;
397263
- return `Progress: ${finished7}/${tasks2.length} finished, ${running} running, ${blocked} blocked, ${failed} failed`;
397307
+ const skipped = tasks2.filter((task) => task.status === "skipped").length;
397308
+ return `Progress: ${finished7}/${tasks2.length} finished, ${running} running, ${queued} queued, ${waiting} waiting, ${failed} failed, ${skipped} skipped`;
397264
397309
  }
397265
- function renderTaskBoard(planOrTasks) {
397310
+ function renderTaskBoard(planOrTasks, options2 = {}) {
397266
397311
  const tasks2 = Array.isArray(planOrTasks) ? planOrTasks : planOrTasks.tasks;
397267
- const rows = tasks2.map((task, index2) => {
397268
- const status2 = pad(task.status, 8);
397312
+ const activeAgents = options2.activeAgents ?? tasks2.filter((task) => task.status === "running").length;
397313
+ const maxAgents2 = options2.maxAgents ?? (Array.isArray(planOrTasks) ? activeAgents || 1 : planOrTasks.config.maxAgents);
397314
+ const orderedTasks = [...tasks2].sort((a2, b) => a2.order - b.order);
397315
+ const rows = orderedTasks.map((task) => {
397316
+ const status2 = pad(publicStatus(task), 18);
397269
397317
  const agent = pad(String(task.assignedAgent), 8);
397270
- return `${index2 + 1}. ${status2} | ${agent} | ${task.title}`;
397318
+ return `${task.order}. ${status2} | ${agent} | ${task.title}`;
397271
397319
  });
397272
397320
  return [
397273
397321
  "[UR-Nexus Task Board]",
397274
- "",
397322
+ `Agents: ${activeAgents} active / ${maxAgents2} max`,
397275
397323
  ...rows,
397276
397324
  "",
397277
397325
  progressSummary(tasks2)
@@ -397313,8 +397361,20 @@ function extractClaims(output) {
397313
397361
  function validateBeforeExecution(task, context4) {
397314
397362
  const issues = [];
397315
397363
  const knownFiles = normalizeSet(context4.existingFiles);
397316
- if (task.status === "blocked") {
397317
- issues.push(issue2("task_blocked", `${task.id} is blocked before execution.`));
397364
+ if (task.approvalRequired) {
397365
+ issues.push(issue2("approval_required", `${task.id} cannot continue safely without approval: ${task.approvalReason ?? "explicit approval is required"}`));
397366
+ }
397367
+ if (task.status === "blocked" || task.status === "needs-context") {
397368
+ issues.push(issue2("needs_context", `${task.id} needs context before execution.`));
397369
+ }
397370
+ if (task.status === "needs-scope") {
397371
+ issues.push(issue2("needs_scope", `${task.id} needs target scope and authorization confirmation before execution.`));
397372
+ }
397373
+ if (task.status === "paused-review") {
397374
+ issues.push(issue2("paused_for_review", `${task.id} is paused for review.`));
397375
+ }
397376
+ if (task.status === "skipped") {
397377
+ issues.push(issue2("skipped_by_policy", `${task.id} was skipped by policy.`));
397318
397378
  }
397319
397379
  if (task.input.assumptions.length === 0) {
397320
397380
  issues.push(issue2("missing_assumptions", `${task.id} has no explicit assumptions.`));
@@ -397402,7 +397462,10 @@ function cloneTasks(tasks2) {
397402
397462
  targetFiles: [...task.input.targetFiles],
397403
397463
  resources: [...task.input.resources]
397404
397464
  },
397405
- verificationCriteria: [...task.verificationCriteria]
397465
+ verificationCriteria: [...task.verificationCriteria],
397466
+ fileTargets: [...task.fileTargets],
397467
+ approvalPaths: [...task.approvalPaths],
397468
+ outsideWorkspacePaths: [...task.outsideWorkspacePaths]
397406
397469
  }));
397407
397470
  }
397408
397471
  function lockKeys(task) {
@@ -397414,7 +397477,15 @@ function dependenciesFinished(task, tasksById) {
397414
397477
  function dependenciesFailed(task, tasksById) {
397415
397478
  return task.dependencies.some((id) => {
397416
397479
  const status2 = tasksById.get(id)?.status;
397417
- return status2 === "failed" || status2 === "blocked";
397480
+ return [
397481
+ "failed",
397482
+ "blocked",
397483
+ "waiting-approval",
397484
+ "needs-scope",
397485
+ "needs-context",
397486
+ "paused-review",
397487
+ "skipped"
397488
+ ].includes(status2 ?? "");
397418
397489
  });
397419
397490
  }
397420
397491
  function isLocked(task, activeLocks) {
@@ -397428,33 +397499,74 @@ function releaseLocks(task, activeLocks) {
397428
397499
  for (const key of lockKeys(task))
397429
397500
  activeLocks.delete(key);
397430
397501
  }
397431
- function summary(tasks2, records) {
397502
+ function summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed) {
397503
+ const taskResults = tasks2.map((task) => {
397504
+ const record3 = records.get(task.id);
397505
+ if (record3)
397506
+ return record3;
397507
+ return {
397508
+ taskId: task.id,
397509
+ task,
397510
+ actualChangedFiles: [],
397511
+ reportedChangedFiles: [],
397512
+ unreportedChangedFiles: [],
397513
+ observedCommands: [],
397514
+ reportedCommands: [],
397515
+ unverifiedCommandClaims: [],
397516
+ outsideWorkspaceReads: [],
397517
+ outsideWorkspaceWrites: [],
397518
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397519
+ preVerification: { ok: true, blocked: false, issues: [] }
397520
+ };
397521
+ });
397432
397522
  return {
397433
397523
  tasks: tasks2,
397434
397524
  finished: tasks2.filter((task) => task.status === "finished").length,
397435
397525
  failed: tasks2.filter((task) => task.status === "failed").length,
397436
397526
  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
- })
397527
+ waitingApproval: tasks2.filter((task) => [
397528
+ "waiting-approval",
397529
+ "needs-scope",
397530
+ "needs-context",
397531
+ "paused-review"
397532
+ ].includes(task.status)).length,
397533
+ skipped: tasks2.filter((task) => task.status === "skipped").length,
397534
+ maxAgentsAllowed,
397535
+ maxAgentsUsed,
397536
+ approvalDecisions: uniqueApprovalDecisions(taskResults.flatMap((record3) => record3.approvalDecisions)),
397537
+ outsideWorkspaceReads: unique2(taskResults.flatMap((record3) => record3.outsideWorkspaceReads)),
397538
+ outsideWorkspaceWrites: unique2(taskResults.flatMap((record3) => record3.outsideWorkspaceWrites)),
397539
+ taskResults
397453
397540
  };
397454
397541
  }
397455
397542
  function unique2(values2) {
397456
397543
  return [...new Set([...values2].map((value) => value.trim()).filter(Boolean))];
397457
397544
  }
397545
+ function uniqueApprovalDecisions(values2) {
397546
+ const seen = new Set;
397547
+ const decisions = [];
397548
+ for (const value of values2) {
397549
+ const key = `${value.taskId}:${value.status}:${value.action}`;
397550
+ if (seen.has(key))
397551
+ continue;
397552
+ seen.add(key);
397553
+ decisions.push(value);
397554
+ }
397555
+ return decisions;
397556
+ }
397557
+ function approvalDecisionFor(task) {
397558
+ if (!task.approvalRequired)
397559
+ return null;
397560
+ return {
397561
+ taskId: task.id,
397562
+ taskTitle: task.title,
397563
+ status: task.status === "skipped" ? "skipped-by-policy" : "waiting-approval",
397564
+ reason: task.approvalReason ?? "Explicit approval is required before this action can run.",
397565
+ action: task.approvalAction ?? task.description,
397566
+ command: task.approvalCommand,
397567
+ paths: task.approvalPaths
397568
+ };
397569
+ }
397458
397570
  function reportedChangedFiles(result) {
397459
397571
  return unique2([
397460
397572
  ...result?.reportedChangedFiles ?? [],
@@ -397473,20 +397585,70 @@ function reportedCommands(result) {
397473
397585
  function issueValues(issues, code) {
397474
397586
  return unique2(issues.filter((issue3) => issue3.code === code && issue3.value).map((issue3) => issue3.value));
397475
397587
  }
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 });
397588
+ function emitBoard(options2, tasks2, maxAgents2) {
397481
397589
  const config3 = {
397482
397590
  ...DEFAULT_PROMPT_PLANNING_CONFIG,
397483
397591
  ...resolvePromptPlanningConfig(options2.config)
397484
397592
  };
397485
397593
  if (config3.showTaskBoard) {
397486
- options2.onEvent?.({ type: "board", board: renderTaskBoard(tasks2), tasks: tasks2 });
397594
+ options2.onEvent?.({
397595
+ type: "board",
397596
+ board: renderTaskBoard(tasks2, { maxAgents: maxAgents2 }),
397597
+ tasks: tasks2
397598
+ });
397599
+ }
397600
+ }
397601
+ function emitStatus(options2, task, tasks2, lastStatuses, maxAgents2) {
397602
+ if (lastStatuses.get(task.id) === task.status)
397603
+ return;
397604
+ lastStatuses.set(task.id, task.status);
397605
+ options2.onEvent?.({ type: "status", task, tasks: tasks2 });
397606
+ emitBoard(options2, tasks2, maxAgents2);
397607
+ }
397608
+ function waitingStatusFor(task) {
397609
+ if (task.status === "needs-scope")
397610
+ return "needs-scope";
397611
+ if (task.status === "needs-context")
397612
+ return "needs-context";
397613
+ if (task.status === "paused-review")
397614
+ return "paused-review";
397615
+ if (task.status === "skipped")
397616
+ return "skipped";
397617
+ if (task.approvalRequired)
397618
+ return "waiting-approval";
397619
+ return "needs-context";
397620
+ }
397621
+ function runnablePlanningTasks(tasks2) {
397622
+ return tasks2.filter((task) => ["pending", "ready"].includes(task.status));
397623
+ }
397624
+ function independentWidth(tasks2) {
397625
+ const selectedLocks = new Set;
397626
+ let width = 0;
397627
+ for (const task of runnablePlanningTasks(tasks2)) {
397628
+ if (task.dependencies.length > 0)
397629
+ continue;
397630
+ const keys2 = lockKeys(task);
397631
+ if (keys2.length > 0 && keys2.some((key) => selectedLocks.has(key)))
397632
+ continue;
397633
+ for (const key of keys2)
397634
+ selectedLocks.add(key);
397635
+ width += 1;
397636
+ }
397637
+ return width;
397638
+ }
397639
+ function usefulAgentCount(tasks2, config3) {
397640
+ if (!config3.parallelAgents)
397641
+ return 1;
397642
+ const runnable = runnablePlanningTasks(tasks2);
397643
+ if (runnable.length <= 1)
397644
+ return 1;
397645
+ const width = Math.max(1, independentWidth(tasks2));
397646
+ if (runnable.length <= 4) {
397647
+ return Math.max(1, Math.min(config3.maxAgents, 3, width));
397487
397648
  }
397649
+ return Math.max(1, Math.min(config3.maxAgents, width));
397488
397650
  }
397489
- async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397651
+ async function runOneTask(task, tasks2, options2, records, lastStatuses, maxAgents2) {
397490
397652
  const config3 = {
397491
397653
  ...DEFAULT_PROMPT_PLANNING_CONFIG,
397492
397654
  ...resolvePromptPlanningConfig(options2.config)
@@ -397505,17 +397667,21 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397505
397667
  observedCommands: [],
397506
397668
  reportedCommands: [],
397507
397669
  unverifiedCommandClaims: [],
397670
+ outsideWorkspaceReads: [],
397671
+ outsideWorkspaceWrites: [],
397672
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397508
397673
  preVerification: before
397509
397674
  };
397510
397675
  records.set(task.id, record3);
397511
397676
  if (!before.ok) {
397512
- task.status = "blocked";
397677
+ task.status = waitingStatusFor(task);
397678
+ record3.task = task;
397513
397679
  record3.finishedAt = new Date().toISOString();
397514
- emitStatus(options2, task, tasks2, lastStatuses);
397680
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397515
397681
  return;
397516
397682
  }
397517
397683
  task.status = "running";
397518
- emitStatus(options2, task, tasks2, lastStatuses);
397684
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397519
397685
  const workspaceBefore = captureWorkspaceFileState(options2.cwd);
397520
397686
  let result;
397521
397687
  try {
@@ -397534,6 +397700,8 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397534
397700
  const observed = observedCommands(result);
397535
397701
  const reportedFiles = reportedChangedFiles(result);
397536
397702
  const reportedCommandClaims = reportedCommands(result);
397703
+ const outsideWorkspaceReads = unique2(result.outsideWorkspaceReads ?? []);
397704
+ const outsideWorkspaceWrites = unique2(result.outsideWorkspaceWrites ?? []);
397537
397705
  const after = validateAfterExecution(task, result, {
397538
397706
  cwd: options2.cwd,
397539
397707
  strict: config3.strictVerification,
@@ -397548,10 +397716,16 @@ async function runOneTask(task, tasks2, options2, records, lastStatuses) {
397548
397716
  record3.observedCommands = observed;
397549
397717
  record3.reportedCommands = reportedCommandClaims;
397550
397718
  record3.unverifiedCommandClaims = issueValues(after.issues, "unsupported_command_claim");
397719
+ record3.outsideWorkspaceReads = outsideWorkspaceReads;
397720
+ record3.outsideWorkspaceWrites = outsideWorkspaceWrites;
397721
+ record3.approvalDecisions = uniqueApprovalDecisions([
397722
+ ...record3.approvalDecisions,
397723
+ ...result.approvalDecisions ?? []
397724
+ ]);
397551
397725
  record3.postVerification = after;
397552
397726
  record3.finishedAt = new Date().toISOString();
397553
397727
  task.status = result.ok && after.ok ? "finished" : "failed";
397554
- emitStatus(options2, task, tasks2, lastStatuses);
397728
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgents2);
397555
397729
  }
397556
397730
  async function runPromptPlan(plan, options2) {
397557
397731
  const config3 = {
@@ -397564,16 +397738,22 @@ async function runPromptPlan(plan, options2) {
397564
397738
  const activeLocks = new Set;
397565
397739
  const running = new Set;
397566
397740
  const lastStatuses = new Map;
397567
- const maxAgents2 = config3.parallelAgents ? config3.maxAgents : 1;
397741
+ const maxAgentsAllowed = config3.parallelAgents ? config3.maxAgents : 1;
397742
+ const maxAgents2 = usefulAgentCount(tasks2, {
397743
+ parallelAgents: config3.parallelAgents,
397744
+ maxAgents: maxAgentsAllowed
397745
+ });
397746
+ let maxAgentsUsed = 0;
397747
+ emitBoard(options2, tasks2, maxAgentsAllowed);
397568
397748
  while (true) {
397569
397749
  for (const task of tasks2) {
397570
397750
  if (task.status === "pending" && dependenciesFailed(task, tasksById)) {
397571
- task.status = "blocked";
397572
- emitStatus(options2, task, tasks2, lastStatuses);
397751
+ task.status = "needs-context";
397752
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397573
397753
  }
397574
397754
  if (task.status === "pending" && dependenciesFinished(task, tasksById)) {
397575
397755
  task.status = "ready";
397576
- emitStatus(options2, task, tasks2, lastStatuses);
397756
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397577
397757
  }
397578
397758
  }
397579
397759
  const ready = tasks2.filter((task) => task.status === "ready" && running.size < maxAgents2 && !isLocked(task, activeLocks));
@@ -397583,19 +397763,21 @@ async function runPromptPlan(plan, options2) {
397583
397763
  if (isLocked(task, activeLocks))
397584
397764
  continue;
397585
397765
  acquireLocks(task, activeLocks);
397586
- const promise3 = runOneTask(task, tasks2, options2, records, lastStatuses).finally(() => {
397766
+ const promise3 = runOneTask(task, tasks2, options2, records, lastStatuses, maxAgentsAllowed).finally(() => {
397587
397767
  releaseLocks(task, activeLocks);
397588
397768
  running.delete(promise3);
397589
397769
  });
397590
397770
  running.add(promise3);
397771
+ maxAgentsUsed = Math.max(maxAgentsUsed, running.size);
397591
397772
  }
397592
397773
  if (running.size === 0) {
397593
397774
  const open12 = tasks2.some((task) => ["pending", "ready", "running"].includes(task.status));
397594
- if (!open12)
397595
- return summary(tasks2, records);
397775
+ if (!open12) {
397776
+ return summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed);
397777
+ }
397596
397778
  for (const task of tasks2) {
397597
397779
  if (task.status === "pending" || task.status === "ready") {
397598
- task.status = "blocked";
397780
+ task.status = "needs-context";
397599
397781
  records.set(task.id, {
397600
397782
  taskId: task.id,
397601
397783
  task,
@@ -397606,22 +397788,25 @@ async function runPromptPlan(plan, options2) {
397606
397788
  observedCommands: [],
397607
397789
  reportedCommands: [],
397608
397790
  unverifiedCommandClaims: [],
397791
+ outsideWorkspaceReads: [],
397792
+ outsideWorkspaceWrites: [],
397793
+ approvalDecisions: approvalDecisionFor(task) ? [approvalDecisionFor(task)] : [],
397609
397794
  preVerification: {
397610
397795
  ok: false,
397611
397796
  blocked: true,
397612
397797
  issues: [
397613
397798
  {
397614
397799
  code: "unsatisfied_dependencies",
397615
- message: `${task.id} could not run because dependencies did not finish.`,
397800
+ message: `${task.id} cannot continue because dependencies did not finish.`,
397616
397801
  severity: "error"
397617
397802
  }
397618
397803
  ]
397619
397804
  }
397620
397805
  });
397621
- emitStatus(options2, task, tasks2, lastStatuses);
397806
+ emitStatus(options2, task, tasks2, lastStatuses, maxAgentsAllowed);
397622
397807
  }
397623
397808
  }
397624
- return summary(tasks2, records);
397809
+ return summary(tasks2, records, maxAgentsAllowed, maxAgentsUsed);
397625
397810
  }
397626
397811
  await Promise.race(running);
397627
397812
  }
@@ -397633,6 +397818,7 @@ var init_executor = __esm(() => {
397633
397818
  });
397634
397819
 
397635
397820
  // src/services/promptPlanning/planner.ts
397821
+ import { isAbsolute as isAbsolute29 } from "path";
397636
397822
  function compact2(value) {
397637
397823
  return value.replace(/\s+/g, " ").trim();
397638
397824
  }
@@ -397658,6 +397844,12 @@ function extractReferencedFiles(text) {
397658
397844
  continue;
397659
397845
  paths2.push(value.replace(/[),.;:]+$/g, ""));
397660
397846
  }
397847
+ for (const match of text.matchAll(ABSOLUTE_PATH_PATTERN)) {
397848
+ const value = match[1];
397849
+ if (!value)
397850
+ continue;
397851
+ paths2.push(value.replace(/[),.;:]+$/g, ""));
397852
+ }
397661
397853
  return unique3(paths2);
397662
397854
  }
397663
397855
  function splitNumberedOrBulletedLines(prompt) {
@@ -397704,11 +397896,70 @@ function isCriticallyAmbiguous(segment) {
397704
397896
  return true;
397705
397897
  return /^(do|fix|update|improve|change|make|handle|clean up)(\s+(it|this|that|things?|stuff|everything))?\.?$/.test(text);
397706
397898
  }
397899
+ function extractCommand(segment) {
397900
+ const backtickCommand = segment.match(/`([^`]+)`/)?.[1];
397901
+ if (backtickCommand)
397902
+ return compact2(backtickCommand);
397903
+ const runCommand2 = segment.match(/\b(?:run|execute)\s+(.+)$/i)?.[1];
397904
+ if (runCommand2 && /(?:\s|^)(?:rm|curl|wget|nmap|sqlmap|git|npm|bun|ssh|scp|kubectl|terraform)\b/.test(runCommand2)) {
397905
+ return compact2(runCommand2);
397906
+ }
397907
+ if (DESTRUCTIVE_PATTERN.test(segment) || NETWORK_PATTERN.test(segment) || SECURITY_PATTERN.test(segment)) {
397908
+ return compact2(segment);
397909
+ }
397910
+ return;
397911
+ }
397912
+ function isOutsideReadOnly(segment, outsidePaths) {
397913
+ return outsidePaths.length > 0 && READ_PATTERN.test(segment) && !WRITE_PATTERN.test(segment);
397914
+ }
397915
+ function riskSignals(segment, outsidePaths) {
397916
+ const signals2 = [];
397917
+ if (DESTRUCTIVE_PATTERN.test(segment))
397918
+ signals2.push("destructive command");
397919
+ if (NETWORK_PATTERN.test(segment))
397920
+ signals2.push("network or external-system action");
397921
+ if (CREDENTIAL_PATTERN.test(segment))
397922
+ signals2.push("credential-sensitive access");
397923
+ if (SECURITY_PATTERN.test(segment))
397924
+ signals2.push("security research scope");
397925
+ if (outsidePaths.length > 0 && !isOutsideReadOnly(segment, outsidePaths)) {
397926
+ signals2.push("outside-workspace modification");
397927
+ }
397928
+ return signals2;
397929
+ }
397930
+ function riskLevel(signals2, files) {
397931
+ if (signals2.length > 0)
397932
+ return "high";
397933
+ if (files.length > 3)
397934
+ return "medium";
397935
+ return "low";
397936
+ }
397937
+ function approvalReasonFor(segment, signals2, outsidePaths) {
397938
+ if (signals2.length === 0)
397939
+ return;
397940
+ if (SECURITY_PATTERN.test(segment) && !AUTHORIZED_SECURITY_PATTERN.test(segment)) {
397941
+ return "Security research needs target scope and authorization confirmation before execution.";
397942
+ }
397943
+ if (outsidePaths.length > 0 && !isOutsideReadOnly(segment, outsidePaths)) {
397944
+ return "Modifying or deleting outside-workspace paths requires explicit approval.";
397945
+ }
397946
+ if (DESTRUCTIVE_PATTERN.test(segment)) {
397947
+ return "Destructive commands require explicit approval before execution.";
397948
+ }
397949
+ if (NETWORK_PATTERN.test(segment)) {
397950
+ return "Network or external-system actions require explicit approval before execution.";
397951
+ }
397952
+ if (CREDENTIAL_PATTERN.test(segment)) {
397953
+ return "Credential-sensitive access requires explicit approval before execution.";
397954
+ }
397955
+ return "This task requires explicit approval before execution.";
397956
+ }
397707
397957
  function verificationCriteria(segment, files) {
397708
397958
  const criteria = [
397709
397959
  `Result directly addresses: ${compact2(segment)}`,
397710
397960
  "Assumptions are stated before execution when context is incomplete.",
397711
- "Unsupported claims are rejected during verification."
397961
+ "Unsupported claims are rejected during verification.",
397962
+ "Approval-required actions are not executed before approval evidence exists."
397712
397963
  ];
397713
397964
  if (files.length > 0) {
397714
397965
  criteria.push("Referenced files exist before file-specific work starts.");
@@ -397718,17 +397969,24 @@ function verificationCriteria(segment, files) {
397718
397969
  }
397719
397970
  function makeTask(segment, index2, previousTaskId) {
397720
397971
  const files = extractReferencedFiles(segment);
397721
- const blocked = isCriticallyAmbiguous(segment);
397972
+ const outsidePaths = files.filter((file2) => isAbsolute29(file2));
397973
+ const signals2 = riskSignals(segment, outsidePaths);
397974
+ const approvalRequired = signals2.length > 0;
397975
+ const approvalReason = approvalReasonFor(segment, signals2, outsidePaths);
397976
+ const command5 = extractCommand(segment);
397977
+ const needsScope = SECURITY_PATTERN.test(segment) && !AUTHORIZED_SECURITY_PATTERN.test(segment);
397978
+ const needsContext = isCriticallyAmbiguous(segment);
397722
397979
  const dependencies = previousTaskId && needsPreviousTask(segment) ? [previousTaskId] : [];
397723
- const assumptions = blocked ? ["Critical target/context is missing; ask for clarification before execution."] : [
397980
+ const assumptions = needsContext ? ["Critical target/context is missing; ask for clarification before execution."] : [
397724
397981
  "Use the current workspace as the source of truth.",
397725
397982
  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
397983
  ];
397727
397984
  return {
397728
397985
  id: `task-${index2 + 1}`,
397986
+ order: index2 + 1,
397729
397987
  title: titleFromSegment(segment),
397730
397988
  description: compact2(segment) || "Clarify the requested work.",
397731
- status: blocked ? "blocked" : dependencies.length > 0 ? "pending" : "ready",
397989
+ status: needsContext ? "needs-context" : needsScope ? "needs-scope" : approvalRequired ? "waiting-approval" : dependencies.length > 0 ? "pending" : "ready",
397732
397990
  dependencies,
397733
397991
  assignedAgent: inferRole(segment),
397734
397992
  input: {
@@ -397738,8 +397996,16 @@ function makeTask(segment, index2, previousTaskId) {
397738
397996
  targetFiles: files,
397739
397997
  resources: extractUrls(segment)
397740
397998
  },
397741
- expectedOutput: blocked ? "A clarification request naming the missing target or context." : `Completed work for: ${compact2(segment)}`,
397742
- verificationCriteria: verificationCriteria(segment, files)
397999
+ expectedOutput: needsContext ? "A clarification request naming the missing target or context." : `Completed work for: ${compact2(segment)}`,
398000
+ verificationCriteria: verificationCriteria(segment, files),
398001
+ fileTargets: files,
398002
+ riskLevel: riskLevel(signals2, files),
398003
+ approvalRequired,
398004
+ approvalReason,
398005
+ approvalAction: approvalRequired ? compact2(segment) || "Approval-required task" : undefined,
398006
+ approvalCommand: command5,
398007
+ approvalPaths: outsidePaths,
398008
+ outsideWorkspacePaths: outsidePaths
397743
398009
  };
397744
398010
  }
397745
398011
  function decomposePrompt(prompt, config3) {
@@ -397765,11 +398031,19 @@ function decomposePrompt(prompt, config3) {
397765
398031
  config: resolvedConfig
397766
398032
  };
397767
398033
  }
397768
- var URL_PATTERN, PATH_PATTERN;
398034
+ var URL_PATTERN, PATH_PATTERN, ABSOLUTE_PATH_PATTERN, DESTRUCTIVE_PATTERN, WRITE_PATTERN, READ_PATTERN, NETWORK_PATTERN, CREDENTIAL_PATTERN, SECURITY_PATTERN, AUTHORIZED_SECURITY_PATTERN;
397769
398035
  var init_planner = __esm(() => {
397770
398036
  init_config9();
397771
398037
  URL_PATTERN = /\bhttps?:\/\/[^\s)]+/gi;
397772
398038
  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;
398039
+ ABSOLUTE_PATH_PATTERN = /(?:^|[\s"'`(])((?:\/[A-Za-z0-9_.@-]+)+\/?)(?=$|[\s"',.;:)])/g;
398040
+ 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;
398041
+ WRITE_PATTERN = /\b(write|modify|edit|update|delete|remove|rm|move|rename|chmod|chown|overwrite)\b/i;
398042
+ READ_PATTERN = /\b(read|inspect|view|cat|open|list|show)\b/i;
398043
+ 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;
398044
+ CREDENTIAL_PATTERN = /\b(credential|api\s*key|secret|token|password|oauth|\.env)\b/i;
398045
+ 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;
398046
+ 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
398047
  });
397774
398048
 
397775
398049
  // src/services/promptPlanning/index.ts
@@ -397788,6 +398062,7 @@ __export(exports_exec, {
397788
398062
  readPrompts: () => readPrompts,
397789
398063
  formatExecFinalReport: () => formatExecFinalReport,
397790
398064
  execCommandForPrompt: () => execCommandForPrompt,
398065
+ changedFilesSinceBefore: () => changedFilesSinceBefore,
397791
398066
  call: () => call60,
397792
398067
  buildExecFinalReport: () => buildExecFinalReport
397793
398068
  });
@@ -397922,13 +398197,22 @@ async function currentChangedFiles(cwd2) {
397922
398197
  });
397923
398198
  return result.code === 0 ? parseGitStatusFiles(result.stdout) : [];
397924
398199
  }
398200
+ function changedFilesSinceBefore(beforeFiles, afterFiles) {
398201
+ const before = new Set(beforeFiles);
398202
+ return [...afterFiles].filter((file2) => !before.has(file2));
398203
+ }
397925
398204
  function plannedTaskPrompt(task) {
397926
398205
  return [
397927
398206
  `UR-Nexus planned task ${task.id}: ${task.title}`,
398207
+ `Order: ${task.order}`,
398208
+ `Risk level: ${task.riskLevel}`,
398209
+ `Approval required: ${task.approvalRequired ? "yes" : "not required"}`,
398210
+ ...task.approvalReason ? [`Approval reason: ${task.approvalReason}`] : [],
397928
398211
  "",
397929
398212
  task.description,
397930
398213
  "",
397931
398214
  `Assigned role: ${task.assignedAgent}`,
398215
+ `File targets: ${task.fileTargets.length > 0 ? task.fileTargets.join(", ") : "not specified"}`,
397932
398216
  "",
397933
398217
  "Assumptions:",
397934
398218
  ...task.input.assumptions.map((value) => `- ${value}`),
@@ -397943,7 +398227,7 @@ function plannedTaskPrompt(task) {
397943
398227
  function defaultPlannedTaskExecutor(opts) {
397944
398228
  return async (task) => {
397945
398229
  const command5 = execCommandForPrompt(plannedTaskPrompt(task), opts);
397946
- const before = new Set(await currentChangedFiles(opts.cwd));
398230
+ const before = await currentChangedFiles(opts.cwd);
397947
398231
  const result = await execFileNoThrowWithCwd(command5[0], command5.slice(1), {
397948
398232
  cwd: opts.cwd,
397949
398233
  timeout: 10 * 60000,
@@ -397956,13 +398240,13 @@ function defaultPlannedTaskExecutor(opts) {
397956
398240
  }
397957
398241
  });
397958
398242
  const after = await currentChangedFiles(opts.cwd);
397959
- const changedFiles = after.filter((file2) => !before.has(file2));
398243
+ const changedFiles = changedFilesSinceBefore(before, after);
397960
398244
  const output = [result.stdout, result.stderr].filter(Boolean).join(`
397961
398245
  `);
397962
398246
  return {
397963
398247
  ok: result.code === 0,
397964
398248
  output,
397965
- changedFiles: changedFiles.length > 0 ? changedFiles : after,
398249
+ changedFiles,
397966
398250
  commandsRun: [formatCommand3(command5)],
397967
398251
  error: result.code === 0 ? undefined : result.error ?? result.stderr
397968
398252
  };
@@ -397984,6 +398268,15 @@ function taskLine(task) {
397984
398268
  agent: String(task.assignedAgent)
397985
398269
  };
397986
398270
  }
398271
+ function isWaitingTask(task) {
398272
+ return [
398273
+ "blocked",
398274
+ "waiting-approval",
398275
+ "needs-scope",
398276
+ "needs-context",
398277
+ "paused-review"
398278
+ ].includes(task.status);
398279
+ }
397987
398280
  function buildExecFinalReport(run) {
397988
398281
  const issues = run.taskResults.flatMap((record3) => {
397989
398282
  const issues2 = [
@@ -398007,15 +398300,22 @@ function buildExecFinalReport(run) {
398007
398300
  total: run.tasks.length,
398008
398301
  finished: run.finished,
398009
398302
  failed: run.failed,
398010
- blocked: run.blocked
398303
+ waitingApproval: run.waitingApproval,
398304
+ skipped: run.skipped
398011
398305
  },
398306
+ activeAgentsUsed: run.maxAgentsUsed,
398307
+ maxAgentsAllowed: run.maxAgentsAllowed,
398012
398308
  finishedTasks: run.tasks.filter((task) => task.status === "finished").map(taskLine),
398013
398309
  failedTasks: run.tasks.filter((task) => task.status === "failed").map(taskLine),
398014
- blockedTasks: run.tasks.filter((task) => task.status === "blocked").map(taskLine),
398310
+ waitingApprovalTasks: run.tasks.filter(isWaitingTask).map(taskLine),
398311
+ skippedTasks: run.tasks.filter((task) => task.status === "skipped").map(taskLine),
398015
398312
  actualChangedFiles,
398016
398313
  unreportedChangedFiles: unique4(run.taskResults.flatMap((record3) => record3.unreportedChangedFiles)),
398314
+ outsideWorkspaceFilesAccessed: run.outsideWorkspaceReads,
398315
+ outsideWorkspaceFilesModified: run.outsideWorkspaceWrites,
398017
398316
  verifiedCommands,
398018
398317
  unverifiedCommandClaims: unique4(run.taskResults.flatMap((record3) => record3.unverifiedCommandClaims)),
398318
+ approvalDecisions: run.approvalDecisions,
398019
398319
  filesChanged: actualChangedFiles,
398020
398320
  commandsRun: verifiedCommands,
398021
398321
  verificationFailures,
@@ -398030,13 +398330,27 @@ function buildExecFinalReport(run) {
398030
398330
  function formatList(items, empty, render2) {
398031
398331
  return items.length > 0 ? items.map(render2) : [`- ${empty}`];
398032
398332
  }
398333
+ function formatApprovalDecision(decision) {
398334
+ const details = [
398335
+ decision.command ? `command: ${decision.command}` : "",
398336
+ decision.paths.length > 0 ? `paths: ${decision.paths.join(", ")}` : ""
398337
+ ].filter(Boolean);
398338
+ return [
398339
+ `- ${decision.taskId} | ${decision.status} | ${decision.action}`,
398340
+ ` reason: ${decision.reason}`,
398341
+ ...details.length > 0 ? [` ${details.join(" | ")}`] : []
398342
+ ].join(`
398343
+ `);
398344
+ }
398033
398345
  function formatExecFinalReport(report) {
398034
398346
  return [
398035
398347
  "UR-Nexus task summary",
398036
398348
  `Total: ${report.summary.total}`,
398037
398349
  `Finished: ${report.summary.finished}`,
398038
398350
  `Failed: ${report.summary.failed}`,
398039
- `Blocked: ${report.summary.blocked}`,
398351
+ `Waiting approval/input: ${report.summary.waitingApproval}`,
398352
+ `Skipped: ${report.summary.skipped}`,
398353
+ `Agents used: ${report.activeAgentsUsed} active / ${report.maxAgentsAllowed} max`,
398040
398354
  "",
398041
398355
  "Finished tasks:",
398042
398356
  ...formatList(report.finishedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
@@ -398044,12 +398358,21 @@ function formatExecFinalReport(report) {
398044
398358
  "Failed tasks:",
398045
398359
  ...formatList(report.failedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398046
398360
  "",
398047
- "Blocked tasks:",
398048
- ...formatList(report.blockedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398361
+ "Waiting approval/input tasks:",
398362
+ ...formatList(report.waitingApprovalTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398363
+ "",
398364
+ "Skipped tasks:",
398365
+ ...formatList(report.skippedTasks, "none", (task) => `- ${task.id} | ${task.agent} | ${task.title}`),
398049
398366
  "",
398050
398367
  "Actual changed files:",
398051
398368
  ...formatList(report.actualChangedFiles, "none observed", (file2) => `- ${file2}`),
398052
398369
  "",
398370
+ "Outside-workspace files accessed:",
398371
+ ...formatList(report.outsideWorkspaceFilesAccessed, "none observed", (file2) => `- ${file2}`),
398372
+ "",
398373
+ "Outside-workspace files modified:",
398374
+ ...formatList(report.outsideWorkspaceFilesModified, "none observed", (file2) => `- ${file2}`),
398375
+ "",
398053
398376
  "Unreported changed files:",
398054
398377
  ...formatList(report.unreportedChangedFiles, "none", (file2) => `- ${file2}`),
398055
398378
  "",
@@ -398059,6 +398382,9 @@ function formatExecFinalReport(report) {
398059
398382
  "Unverified command claims:",
398060
398383
  ...formatList(report.unverifiedCommandClaims, "none", (command5) => `- ${command5}`),
398061
398384
  "",
398385
+ "Approval decisions:",
398386
+ ...formatList(report.approvalDecisions, "none", formatApprovalDecision),
398387
+ "",
398062
398388
  "Verification failures:",
398063
398389
  ...formatList(report.verificationFailures, "none", (failure) => `- ${failure.taskId} | ${failure.code} | ${failure.message}`),
398064
398390
  "",
@@ -398071,7 +398397,7 @@ function formatExecFinalReport(report) {
398071
398397
  `);
398072
398398
  }
398073
398399
  function aggregateTask(prompt, plan, run, cwd2) {
398074
- const failed = run.failed > 0 || run.blocked > 0;
398400
+ const failed = run.failed > 0 || run.blocked > 0 || run.waitingApproval > 0 || run.skipped > 0;
398075
398401
  const now7 = new Date().toISOString();
398076
398402
  return {
398077
398403
  id: plan.id,
@@ -398115,7 +398441,7 @@ async function runPromptPlans(prompts, opts) {
398115
398441
  }
398116
398442
  });
398117
398443
  const completedPlan = { ...plan, tasks: run.tasks };
398118
- const taskBoard = config3.showTaskBoard ? renderTaskBoard(completedPlan) : undefined;
398444
+ const taskBoard = config3.showTaskBoard ? renderTaskBoard(completedPlan, { maxAgents: run.maxAgentsAllowed }) : undefined;
398119
398445
  const finalReport = buildExecFinalReport(run);
398120
398446
  const command5 = finalReport.commandsRun;
398121
398447
  results[index2] = {
@@ -410506,7 +410832,7 @@ var init_code_index2 = __esm(() => {
410506
410832
 
410507
410833
  // node_modules/typescript/lib/typescript.js
410508
410834
  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";
410835
+ 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
410836
  /*! *****************************************************************************
410511
410837
  Copyright (c) Microsoft Corporation. All rights reserved.
410512
410838
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -579248,7 +579574,7 @@ import {
579248
579574
  statSync as statSync12,
579249
579575
  writeFileSync as writeFileSync45
579250
579576
  } from "fs";
579251
- import { dirname as dirname64, extname as extname17, isAbsolute as isAbsolute29, join as join176, relative as relative37, resolve as resolve46 } from "path";
579577
+ import { dirname as dirname64, extname as extname17, isAbsolute as isAbsolute30, join as join176, relative as relative37, resolve as resolve46 } from "path";
579252
579578
  import { promisify as promisify4 } from "util";
579253
579579
  function repoEditIndexPath(root2) {
579254
579580
  return join176(root2, ".ur", "repo-edit", "index.json");
@@ -579641,7 +579967,7 @@ function formatSearchHits(hits) {
579641
579967
  `);
579642
579968
  }
579643
579969
  function resolveRepoPath(root2, maybePath) {
579644
- const resolved = isAbsolute29(maybePath) ? maybePath : resolve46(root2, maybePath);
579970
+ const resolved = isAbsolute30(maybePath) ? maybePath : resolve46(root2, maybePath);
579645
579971
  const rel = relative37(root2, resolved);
579646
579972
  if (rel.startsWith("..")) {
579647
579973
  throw new Error(`Path escapes repository root: ${maybePath}`);
@@ -581484,9 +581810,9 @@ var init_cite2 = __esm(() => {
581484
581810
 
581485
581811
  // src/ur/fileops.ts
581486
581812
  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";
581813
+ import { extname as extname19, isAbsolute as isAbsolute31, join as join180, relative as relative39, resolve as resolve47 } from "path";
581488
581814
  function readFileSafe2(cwd2, target, maxBytes = 64000) {
581489
- const abs = isAbsolute30(target) ? target : resolve47(cwd2, target);
581815
+ const abs = isAbsolute31(target) ? target : resolve47(cwd2, target);
581490
581816
  if (!existsSync55(abs))
581491
581817
  return { ok: false, error: `not found: ${target}` };
581492
581818
  const st = statSync13(abs);
@@ -581825,12 +582151,12 @@ __export(exports_image, {
581825
582151
  call: () => call108
581826
582152
  });
581827
582153
  import { existsSync as existsSync56, statSync as statSync14 } from "fs";
581828
- import { extname as extname20, isAbsolute as isAbsolute31, resolve as resolve48 } from "path";
582154
+ import { extname as extname20, isAbsolute as isAbsolute32, resolve as resolve48 } from "path";
581829
582155
  var call108 = async (args) => {
581830
582156
  const f = (args ?? "").trim().split(/\s+/)[0] ?? "";
581831
582157
  if (!f)
581832
582158
  return { type: "text", value: "usage: /image <file> [task]" };
581833
- const abs = isAbsolute31(f) ? f : resolve48(getCwd(), f);
582159
+ const abs = isAbsolute32(f) ? f : resolve48(getCwd(), f);
581834
582160
  if (!existsSync56(abs))
581835
582161
  return { type: "text", value: `not found: ${f}` };
581836
582162
  const kb = Math.round(statSync14(abs).size / 1024);
@@ -581873,7 +582199,7 @@ __export(exports_video, {
581873
582199
  call: () => call109
581874
582200
  });
581875
582201
  import { existsSync as existsSync57 } from "fs";
581876
- import { isAbsolute as isAbsolute32, resolve as resolve49 } from "path";
582202
+ import { isAbsolute as isAbsolute33, resolve as resolve49 } from "path";
581877
582203
  var call109 = async (args) => {
581878
582204
  const target = (args ?? "").trim().split(/\s+/)[0] ?? "";
581879
582205
  if (!target)
@@ -581884,7 +582210,7 @@ var call109 = async (args) => {
581884
582210
  return { type: "text", value: `remote video: ${target}
581885
582211
  ${yd}` };
581886
582212
  }
581887
- const abs = isAbsolute32(target) ? target : resolve49(getCwd(), target);
582213
+ const abs = isAbsolute33(target) ? target : resolve49(getCwd(), target);
581888
582214
  if (!existsSync57(abs))
581889
582215
  return { type: "text", value: `not found: ${target}` };
581890
582216
  if (!commandExists("ffprobe")) {
@@ -596040,7 +596366,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
596040
596366
  smapsRollup,
596041
596367
  platform: process.platform,
596042
596368
  nodeVersion: process.version,
596043
- ccVersion: "1.40.1"
596369
+ ccVersion: "1.41.1"
596044
596370
  };
596045
596371
  }
596046
596372
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -596626,7 +596952,7 @@ var init_bridge_kick = __esm(() => {
596626
596952
  var call137 = async () => {
596627
596953
  return {
596628
596954
  type: "text",
596629
- value: "1.40.1"
596955
+ value: "1.41.1"
596630
596956
  };
596631
596957
  }, version2, version_default;
596632
596958
  var init_version = __esm(() => {
@@ -598682,7 +599008,7 @@ var init_advisor2 = __esm(() => {
598682
599008
  // src/skills/bundledSkills.ts
598683
599009
  import { constants as fsConstants5 } from "fs";
598684
599010
  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";
599011
+ import { dirname as dirname68, isAbsolute as isAbsolute34, join as join193, normalize as normalize13, sep as pathSep3 } from "path";
598686
599012
  function registerBundledSkill(definition) {
598687
599013
  const { files: files2 } = definition;
598688
599014
  let skillRoot;
@@ -598769,7 +599095,7 @@ async function safeWriteFile(p2, content) {
598769
599095
  }
598770
599096
  function resolveSkillFilePath(baseDir, relPath) {
598771
599097
  const normalized = normalize13(relPath);
598772
- if (isAbsolute33(normalized) || normalized.split(pathSep3).includes("..") || normalized.split("/").includes("..")) {
599098
+ if (isAbsolute34(normalized) || normalized.split(pathSep3).includes("..") || normalized.split("/").includes("..")) {
598773
599099
  throw new Error(`bundled skill file path escapes skill dir: ${relPath}`);
598774
599100
  }
598775
599101
  return join193(baseDir, normalized);
@@ -600145,6 +600471,11 @@ function ModelPickerWrapper(t0) {
600145
600471
  mainLoopModel: model,
600146
600472
  mainLoopModelForSession: null
600147
600473
  }));
600474
+ if (model && metadata) {
600475
+ setProviderModel(metadata.providerId, model, {
600476
+ modelSource: metadata.modelSource
600477
+ });
600478
+ }
600148
600479
  let message = metadata ? `Selected provider: ${source_default.bold(metadata.providerName)} (${metadata.accessType})
600149
600480
  Selected model: ${source_default.bold(renderModelLabel(model))}
600150
600481
  Model source: ${metadata.modelSource}
@@ -600293,6 +600624,14 @@ function SetModelAndClose({
600293
600624
  }
600294
600625
  } : {}
600295
600626
  }));
600627
+ if (modelValue === null) {
600628
+ updateSettingsForSource("localSettings", {
600629
+ model: undefined,
600630
+ provider: {
600631
+ model: undefined
600632
+ }
600633
+ });
600634
+ }
600296
600635
  let message = `Set model to ${source_default.bold(renderModelLabel(modelValue))}`;
600297
600636
  let wasFastModeToggledOn = undefined;
600298
600637
  if (isFastModeEnabled()) {
@@ -606706,7 +607045,7 @@ function generateHtmlReport(data, insights) {
606706
607045
  </html>`;
606707
607046
  }
606708
607047
  function buildExportData(data, insights, facets, remoteStats) {
606709
- const version3 = typeof MACRO !== "undefined" ? "1.40.1" : "unknown";
607048
+ const version3 = typeof MACRO !== "undefined" ? "1.41.1" : "unknown";
606710
607049
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
606711
607050
  const facets_summary = {
606712
607051
  total: facets.size,
@@ -610986,7 +611325,7 @@ var init_sessionStorage = __esm(() => {
610986
611325
  init_settings2();
610987
611326
  init_slowOperations();
610988
611327
  init_uuid();
610989
- VERSION5 = typeof MACRO !== "undefined" ? "1.40.1" : "unknown";
611328
+ VERSION5 = typeof MACRO !== "undefined" ? "1.41.1" : "unknown";
610990
611329
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
610991
611330
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
610992
611331
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -612191,7 +612530,7 @@ var init_filesystem = __esm(() => {
612191
612530
  });
612192
612531
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
612193
612532
  const nonce = randomBytes18(16).toString("hex");
612194
- return join202(getURTempDir(), "bundled-skills", "1.40.1", nonce);
612533
+ return join202(getURTempDir(), "bundled-skills", "1.41.1", nonce);
612195
612534
  });
612196
612535
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
612197
612536
  });
@@ -618480,7 +618819,7 @@ function computeFingerprint(messageText2, version3) {
618480
618819
  }
618481
618820
  function computeFingerprintFromMessages(messages) {
618482
618821
  const firstMessageText = extractFirstMessageText(messages);
618483
- return computeFingerprint(firstMessageText, "1.40.1");
618822
+ return computeFingerprint(firstMessageText, "1.41.1");
618484
618823
  }
618485
618824
  var FINGERPRINT_SALT = "59cf53e54c78";
618486
618825
  var init_fingerprint = () => {};
@@ -620354,7 +620693,7 @@ async function sideQuery(opts) {
620354
620693
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
620355
620694
  }
620356
620695
  const messageText2 = extractFirstUserMessageText(messages);
620357
- const fingerprint2 = computeFingerprint(messageText2, "1.40.1");
620696
+ const fingerprint2 = computeFingerprint(messageText2, "1.41.1");
620358
620697
  const attributionHeader = getAttributionHeader(fingerprint2);
620359
620698
  const systemBlocks = [
620360
620699
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -625091,7 +625430,7 @@ function buildSystemInitMessage(inputs) {
625091
625430
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
625092
625431
  apiKeySource: getURHQApiKeyWithSource().source,
625093
625432
  betas: getSdkBetas(),
625094
- ur_version: "1.40.1",
625433
+ ur_version: "1.41.1",
625095
625434
  output_style: outputStyle2,
625096
625435
  agents: inputs.agents.map((agent) => agent.agentType),
625097
625436
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -630599,8 +630938,8 @@ function ShimmerLoadingText() {
630599
630938
  }
630600
630939
  return t2;
630601
630940
  }
630602
- function getRiskColor(riskLevel) {
630603
- switch (riskLevel) {
630941
+ function getRiskColor(riskLevel2) {
630942
+ switch (riskLevel2) {
630604
630943
  case "LOW":
630605
630944
  return "success";
630606
630945
  case "MEDIUM":
@@ -630609,8 +630948,8 @@ function getRiskColor(riskLevel) {
630609
630948
  return "error";
630610
630949
  }
630611
630950
  }
630612
- function getRiskLabel(riskLevel) {
630613
- switch (riskLevel) {
630951
+ function getRiskLabel(riskLevel2) {
630952
+ switch (riskLevel2) {
630614
630953
  case "LOW":
630615
630954
  return "Low risk";
630616
630955
  case "MEDIUM":
@@ -639719,7 +640058,7 @@ var init_useVoiceEnabled = __esm(() => {
639719
640058
  function getSemverPart(version3) {
639720
640059
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
639721
640060
  }
639722
- function useUpdateNotification(updatedVersion, initialVersion = "1.40.1") {
640061
+ function useUpdateNotification(updatedVersion, initialVersion = "1.41.1") {
639723
640062
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
639724
640063
  if (!updatedVersion) {
639725
640064
  return null;
@@ -639768,7 +640107,7 @@ function AutoUpdater({
639768
640107
  return;
639769
640108
  }
639770
640109
  if (false) {}
639771
- const currentVersion = "1.40.1";
640110
+ const currentVersion = "1.41.1";
639772
640111
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
639773
640112
  let latestVersion = await getLatestVersion(channel);
639774
640113
  const isDisabled = isAutoUpdaterDisabled();
@@ -639997,12 +640336,12 @@ function NativeAutoUpdater({
639997
640336
  logEvent("tengu_native_auto_updater_start", {});
639998
640337
  try {
639999
640338
  const maxVersion = await getMaxVersion();
640000
- if (maxVersion && gt("1.40.1", maxVersion)) {
640339
+ if (maxVersion && gt("1.41.1", maxVersion)) {
640001
640340
  const msg = await getMaxVersionMessage();
640002
640341
  setMaxVersionIssue(msg ?? "affects your version");
640003
640342
  }
640004
640343
  const result = await installLatest(channel);
640005
- const currentVersion = "1.40.1";
640344
+ const currentVersion = "1.41.1";
640006
640345
  const latencyMs = Date.now() - startTime;
640007
640346
  if (result.lockFailed) {
640008
640347
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -640139,17 +640478,17 @@ function PackageManagerAutoUpdater(t0) {
640139
640478
  const maxVersion = await getMaxVersion();
640140
640479
  if (maxVersion && latest && gt(latest, maxVersion)) {
640141
640480
  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`);
640481
+ if (gte("1.41.1", maxVersion)) {
640482
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.41.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
640144
640483
  setUpdateAvailable(false);
640145
640484
  return;
640146
640485
  }
640147
640486
  latest = maxVersion;
640148
640487
  }
640149
- const hasUpdate = latest && !gte("1.40.1", latest) && !shouldSkipVersion(latest);
640488
+ const hasUpdate = latest && !gte("1.41.1", latest) && !shouldSkipVersion(latest);
640150
640489
  setUpdateAvailable(!!hasUpdate);
640151
640490
  if (hasUpdate) {
640152
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.40.1"} -> ${latest}`);
640491
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.41.1"} -> ${latest}`);
640153
640492
  }
640154
640493
  };
640155
640494
  $3[0] = t1;
@@ -640183,7 +640522,7 @@ function PackageManagerAutoUpdater(t0) {
640183
640522
  wrap: "truncate",
640184
640523
  children: [
640185
640524
  "currentVersion: ",
640186
- "1.40.1"
640525
+ "1.41.1"
640187
640526
  ]
640188
640527
  }, undefined, true, undefined, this);
640189
640528
  $3[3] = verbose;
@@ -652635,7 +652974,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
652635
652974
  project_dir: getOriginalCwd(),
652636
652975
  added_dirs: addedDirs
652637
652976
  },
652638
- version: "1.40.1",
652977
+ version: "1.41.1",
652639
652978
  output_style: {
652640
652979
  name: outputStyleName
652641
652980
  },
@@ -652718,7 +653057,7 @@ function StatusLineInner({
652718
653057
  const taskValues = Object.values(tasks2);
652719
653058
  const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
652720
653059
  const defaultStatusLineText = buildDefaultStatusBar({
652721
- version: "1.40.1",
653060
+ version: "1.41.1",
652722
653061
  providerLabel: providerRuntime.providerLabel,
652723
653062
  authMode: providerRuntime.authLabel,
652724
653063
  model: providerRuntime.model ?? renderModelName(mainLoopModel),
@@ -664206,7 +664545,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
664206
664545
  } catch {}
664207
664546
  const data = {
664208
664547
  trigger: trigger2,
664209
- version: "1.40.1",
664548
+ version: "1.41.1",
664210
664549
  platform: process.platform,
664211
664550
  transcript,
664212
664551
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -669340,7 +669679,7 @@ var init_usePluginAutoupdateNotification = __esm(() => {
669340
669679
  });
669341
669680
 
669342
669681
  // src/utils/plugins/reconciler.ts
669343
- import { isAbsolute as isAbsolute34, resolve as resolve51 } from "path";
669682
+ import { isAbsolute as isAbsolute35, resolve as resolve51 } from "path";
669344
669683
  function diffMarketplaces(declared, materialized, opts) {
669345
669684
  const missing = [];
669346
669685
  const sourceChanged = [];
@@ -669448,7 +669787,7 @@ async function reconcileMarketplaces(opts) {
669448
669787
  return { installed, updated, failed, upToDate: diff3.upToDate, skipped };
669449
669788
  }
669450
669789
  function normalizeSource(source, projectRoot2) {
669451
- if ((source.source === "directory" || source.source === "file") && !isAbsolute34(source.path)) {
669790
+ if ((source.source === "directory" || source.source === "file") && !isAbsolute35(source.path)) {
669452
669791
  const base2 = projectRoot2 ?? getOriginalCwd();
669453
669792
  const canonicalRoot = findCanonicalGitRoot(base2);
669454
669793
  return {
@@ -676091,7 +676430,7 @@ function WelcomeV2() {
676091
676430
  dimColor: true,
676092
676431
  children: [
676093
676432
  "v",
676094
- "1.40.1"
676433
+ "1.41.1"
676095
676434
  ]
676096
676435
  }, undefined, true, undefined, this)
676097
676436
  ]
@@ -677351,7 +677690,7 @@ function completeOnboarding() {
677351
677690
  saveGlobalConfig((current) => ({
677352
677691
  ...current,
677353
677692
  hasCompletedOnboarding: true,
677354
- lastOnboardingVersion: "1.40.1"
677693
+ lastOnboardingVersion: "1.41.1"
677355
677694
  }));
677356
677695
  }
677357
677696
  function showDialog(root2, renderer) {
@@ -682388,7 +682727,7 @@ function appendToLog(path24, message) {
682388
682727
  cwd: getFsImplementation().cwd(),
682389
682728
  userType: process.env.USER_TYPE,
682390
682729
  sessionId: getSessionId(),
682391
- version: "1.40.1"
682730
+ version: "1.41.1"
682392
682731
  };
682393
682732
  getLogWriter(path24).write(messageWithTimestamp);
682394
682733
  }
@@ -686482,8 +686821,8 @@ async function getEnvLessBridgeConfig() {
686482
686821
  }
686483
686822
  async function checkEnvLessBridgeMinVersion() {
686484
686823
  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.
686824
+ if (cfg.min_version && lt("1.41.1", cfg.min_version)) {
686825
+ return `Your version of UR (${"1.41.1"}) is too old for Remote Control.
686487
686826
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
686488
686827
  }
686489
686828
  return null;
@@ -686957,7 +687296,7 @@ async function initBridgeCore(params) {
686957
687296
  const rawApi = createBridgeApiClient({
686958
687297
  baseUrl,
686959
687298
  getAccessToken,
686960
- runnerVersion: "1.40.1",
687299
+ runnerVersion: "1.41.1",
686961
687300
  onDebug: logForDebugging,
686962
687301
  onAuth401,
686963
687302
  getTrustedDeviceToken
@@ -692639,7 +692978,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
692639
692978
  setCwd(cwd3);
692640
692979
  const server2 = new Server({
692641
692980
  name: "ur/tengu",
692642
- version: "1.40.1"
692981
+ version: "1.41.1"
692643
692982
  }, {
692644
692983
  capabilities: {
692645
692984
  tools: {}
@@ -694681,7 +695020,7 @@ async function update() {
694681
695020
  logEvent("tengu_update_check", {});
694682
695021
  const diagnostic = await getDoctorDiagnostic();
694683
695022
  const result = await checkUpgradeStatus({
694684
- currentVersion: "1.40.1",
695023
+ currentVersion: "1.41.1",
694685
695024
  packageName: UR_AGENT_PACKAGE_NAME,
694686
695025
  installationType: diagnostic.installationType,
694687
695026
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -695927,7 +696266,7 @@ ${customInstructions}` : customInstructions;
695927
696266
  }
695928
696267
  }
695929
696268
  logForDiagnosticsNoPII("info", "started", {
695930
- version: "1.40.1",
696269
+ version: "1.41.1",
695931
696270
  is_native_binary: isInBundledMode()
695932
696271
  });
695933
696272
  registerCleanup(async () => {
@@ -696713,7 +697052,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
696713
697052
  pendingHookMessages
696714
697053
  }, renderAndRun);
696715
697054
  }
696716
- }).version("1.40.1 (UR-Nexus)", "-v, --version", "Output the version number");
697055
+ }).version("1.41.1 (UR-Nexus)", "-v, --version", "Output the version number");
696717
697056
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
696718
697057
  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
697058
  if (canUserConfigureAdvisor()) {
@@ -697628,7 +697967,7 @@ if (false) {}
697628
697967
  async function main2() {
697629
697968
  const args = process.argv.slice(2);
697630
697969
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
697631
- console.log(`${"1.40.1"} (UR-Nexus)`);
697970
+ console.log(`${"1.41.1"} (UR-Nexus)`);
697632
697971
  return;
697633
697972
  }
697634
697973
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {