ur-agent 1.80.4 → 1.80.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -107784,7 +107784,7 @@ var init_auth = __esm(() => {
107784
107784
 
107785
107785
  // src/utils/userAgent.ts
107786
107786
  function getURCodeUserAgent() {
107787
- return `ur/${"1.80.4"}`;
107787
+ return `ur/${"1.80.5"}`;
107788
107788
  }
107789
107789
 
107790
107790
  // src/utils/workloadContext.ts
@@ -107806,7 +107806,7 @@ function getUserAgent() {
107806
107806
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
107807
107807
  const workload = getWorkload();
107808
107808
  const workloadSuffix = workload ? `, workload/${workload}` : "";
107809
- return `ur-cli/${"1.80.4"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107809
+ return `ur-cli/${"1.80.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
107810
107810
  }
107811
107811
  function getMCPUserAgent() {
107812
107812
  const parts = [];
@@ -107820,7 +107820,7 @@ function getMCPUserAgent() {
107820
107820
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
107821
107821
  }
107822
107822
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
107823
- return `ur/${"1.80.4"}${suffix}`;
107823
+ return `ur/${"1.80.5"}${suffix}`;
107824
107824
  }
107825
107825
  function getWebFetchUserAgent() {
107826
107826
  return `UR-User (${getURCodeUserAgent()})`;
@@ -107958,7 +107958,7 @@ var init_user = __esm(() => {
107958
107958
  deviceId,
107959
107959
  sessionId: getSessionId(),
107960
107960
  email: getEmail(),
107961
- appVersion: "1.80.4",
107961
+ appVersion: "1.80.5",
107962
107962
  platform: getHostPlatformForAnalytics(),
107963
107963
  organizationUuid,
107964
107964
  accountUuid,
@@ -115845,7 +115845,7 @@ var init_metadata = __esm(() => {
115845
115845
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
115846
115846
  WHITESPACE_REGEX = /\s+/;
115847
115847
  getVersionBase = memoize_default(() => {
115848
- const match = "1.80.4".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115848
+ const match = "1.80.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
115849
115849
  return match ? match[0] : undefined;
115850
115850
  });
115851
115851
  buildEnvContext = memoize_default(async () => {
@@ -115885,7 +115885,7 @@ var init_metadata = __esm(() => {
115885
115885
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
115886
115886
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
115887
115887
  isURAiAuth: isURAISubscriber(),
115888
- version: "1.80.4",
115888
+ version: "1.80.5",
115889
115889
  versionBase: getVersionBase(),
115890
115890
  buildTime: "",
115891
115891
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -116555,7 +116555,7 @@ function initialize1PEventLogging() {
116555
116555
  const platform2 = getPlatform();
116556
116556
  const attributes = {
116557
116557
  [import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
116558
- [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.80.4"
116558
+ [import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.80.5"
116559
116559
  };
116560
116560
  if (platform2 === "wsl") {
116561
116561
  const wslVersion = getWslVersion();
@@ -116583,7 +116583,7 @@ function initialize1PEventLogging() {
116583
116583
  })
116584
116584
  ]
116585
116585
  });
116586
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.80.4");
116586
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.80.5");
116587
116587
  }
116588
116588
  async function reinitialize1PEventLoggingIfConfigChanged() {
116589
116589
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -126546,7 +126546,7 @@ function formatA2AAgentCard(options = {}, pretty = true) {
126546
126546
  function formatA2AV1AgentCard(options = {}, pretty = true) {
126547
126547
  return JSON.stringify(buildA2AV1AgentCard(options), null, pretty ? 2 : 0);
126548
126548
  }
126549
- var urVersion = "1.80.4", researchSnapshotDate = "2026-08-10", coverage, priorityRoadmap;
126549
+ var urVersion = "1.80.5", researchSnapshotDate = "2026-08-10", coverage, priorityRoadmap;
126550
126550
  var init_trends = __esm(() => {
126551
126551
  init_a2aCardSignature();
126552
126552
  coverage = [
@@ -129436,7 +129436,7 @@ function getAttributionHeader(fingerprint) {
129436
129436
  if (!isAttributionHeaderEnabled()) {
129437
129437
  return "";
129438
129438
  }
129439
- const version2 = `${"1.80.4"}.${fingerprint}`;
129439
+ const version2 = `${"1.80.5"}.${fingerprint}`;
129440
129440
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
129441
129441
  const cch = "";
129442
129442
  const workload = getWorkload();
@@ -184630,7 +184630,7 @@ var init_projectSafety = __esm(() => {
184630
184630
  function getInstruments() {
184631
184631
  if (instruments)
184632
184632
  return instruments;
184633
- const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.4");
184633
+ const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.5");
184634
184634
  instruments = {
184635
184635
  operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
184636
184636
  description: "GenAI operation duration.",
@@ -184728,7 +184728,7 @@ function genAiAgentAttributes() {
184728
184728
  "gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
184729
184729
  "gen_ai.provider.name": "ur",
184730
184730
  "gen_ai.agent.name": "UR-Nexus",
184731
- "gen_ai.agent.version": "1.80.4"
184731
+ "gen_ai.agent.version": "1.80.5"
184732
184732
  };
184733
184733
  }
184734
184734
  function genAiWorkflowAttributes(workflowName, workflowRunId) {
@@ -184749,7 +184749,7 @@ function genAiWorkflowAttributes(workflowName, workflowRunId) {
184749
184749
  function startGenAiWorkflowSpan(workflowName, workflowRunId) {
184750
184750
  const attributes = genAiWorkflowAttributes(workflowName, workflowRunId);
184751
184751
  const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
184752
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.4").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
184752
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.5").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
184753
184753
  }
184754
184754
  function endGenAiWorkflowSpan(span, options2 = {}) {
184755
184755
  try {
@@ -184787,7 +184787,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
184787
184787
  if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
184788
184788
  attributes["gen_ai.memory.record.count"] = options2.recordCount;
184789
184789
  }
184790
- return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.4").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
184790
+ return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.5").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
184791
184791
  }
184792
184792
  function endGenAiMemorySpan(span, options2 = {}) {
184793
184793
  try {
@@ -278502,7 +278502,7 @@ function getTelemetryAttributes() {
278502
278502
  attributes["session.id"] = sessionId;
278503
278503
  }
278504
278504
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
278505
- attributes["app.version"] = "1.80.4";
278505
+ attributes["app.version"] = "1.80.5";
278506
278506
  }
278507
278507
  const oauthAccount = getOauthAccountInfo();
278508
278508
  if (oauthAccount) {
@@ -319493,7 +319493,7 @@ function getInstallationEnv() {
319493
319493
  return;
319494
319494
  }
319495
319495
  function getURCodeVersion() {
319496
- return "1.80.4";
319496
+ return "1.80.5";
319497
319497
  }
319498
319498
  async function getInstalledVSCodeExtensionVersion(command) {
319499
319499
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -326863,7 +326863,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
326863
326863
  const client2 = new Client({
326864
326864
  name: "ur",
326865
326865
  title: "UR",
326866
- version: "1.80.4",
326866
+ version: "1.80.5",
326867
326867
  description: "UR-Nexus autonomous engineering workflow engine",
326868
326868
  websiteUrl: PRODUCT_URL
326869
326869
  }, {
@@ -327224,7 +327224,7 @@ var init_client5 = __esm(() => {
327224
327224
  const client2 = new Client({
327225
327225
  name: "ur",
327226
327226
  title: "UR",
327227
- version: "1.80.4",
327227
+ version: "1.80.5",
327228
327228
  description: "UR-Nexus autonomous engineering workflow engine",
327229
327229
  websiteUrl: PRODUCT_URL
327230
327230
  }, {
@@ -339962,7 +339962,7 @@ async function createRuntime() {
339962
339962
  bootstrapTelemetry();
339963
339963
  const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
339964
339964
  [import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
339965
- [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.4"
339965
+ [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.5"
339966
339966
  }));
339967
339967
  const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
339968
339968
  resource,
@@ -339995,11 +339995,11 @@ async function createRuntime() {
339995
339995
  setMeterProvider(meterProvider);
339996
339996
  setLoggerProvider(loggerProvider);
339997
339997
  if (meterProvider) {
339998
- const meter = meterProvider.getMeter("ur-agent", "1.80.4");
339998
+ const meter = meterProvider.getMeter("ur-agent", "1.80.5");
339999
339999
  setMeter(meter, (name, options2) => meter.createCounter(name, options2));
340000
340000
  }
340001
340001
  if (loggerProvider) {
340002
- setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.4"));
340002
+ setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.5"));
340003
340003
  }
340004
340004
  if (!cleanupRegistered3) {
340005
340005
  cleanupRegistered3 = true;
@@ -340661,9 +340661,9 @@ async function assertMinVersion() {
340661
340661
  if (false) {}
340662
340662
  try {
340663
340663
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
340664
- if (versionConfig.minVersion && lt("1.80.4", versionConfig.minVersion)) {
340664
+ if (versionConfig.minVersion && lt("1.80.5", versionConfig.minVersion)) {
340665
340665
  console.error(`
340666
- It looks like your version of UR (${"1.80.4"}) needs an update.
340666
+ It looks like your version of UR (${"1.80.5"}) needs an update.
340667
340667
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
340668
340668
 
340669
340669
  To update, please run:
@@ -340879,7 +340879,7 @@ async function installGlobalPackage(specificVersion) {
340879
340879
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
340880
340880
  logEvent("tengu_auto_updater_lock_contention", {
340881
340881
  pid: process.pid,
340882
- currentVersion: "1.80.4"
340882
+ currentVersion: "1.80.5"
340883
340883
  });
340884
340884
  return "in_progress";
340885
340885
  }
@@ -340888,7 +340888,7 @@ async function installGlobalPackage(specificVersion) {
340888
340888
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
340889
340889
  logError2(new Error("Windows NPM detected in WSL environment"));
340890
340890
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
340891
- currentVersion: "1.80.4"
340891
+ currentVersion: "1.80.5"
340892
340892
  });
340893
340893
  console.error(`
340894
340894
  Error: Windows NPM detected in WSL
@@ -341423,7 +341423,7 @@ function detectLinuxGlobPatternWarnings() {
341423
341423
  }
341424
341424
  async function getDoctorDiagnostic() {
341425
341425
  const installationType = await getCurrentInstallationType();
341426
- const version2 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
341426
+ const version2 = typeof MACRO !== "undefined" ? "1.80.5" : "unknown";
341427
341427
  const installationPath = await getInstallationPath();
341428
341428
  const invokedBinary = getInvokedBinary();
341429
341429
  const multipleInstallations = await detectMultipleInstallations();
@@ -342358,8 +342358,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
342358
342358
  const maxVersion = await getMaxVersion();
342359
342359
  if (maxVersion && gt(version2, maxVersion)) {
342360
342360
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
342361
- if (gte("1.80.4", maxVersion)) {
342362
- logForDebugging(`Native installer: current version ${"1.80.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
342361
+ if (gte("1.80.5", maxVersion)) {
342362
+ logForDebugging(`Native installer: current version ${"1.80.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
342363
342363
  logEvent("tengu_native_update_skipped_max_version", {
342364
342364
  latency_ms: Date.now() - startTime,
342365
342365
  max_version: maxVersion,
@@ -342370,7 +342370,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
342370
342370
  version2 = maxVersion;
342371
342371
  }
342372
342372
  }
342373
- if (!forceReinstall && version2 === "1.80.4" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
342373
+ if (!forceReinstall && version2 === "1.80.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
342374
342374
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
342375
342375
  logEvent("tengu_native_update_complete", {
342376
342376
  latency_ms: Date.now() - startTime,
@@ -396172,9 +396172,12 @@ var init_prompt15 = __esm(() => {
396172
396172
 
396173
396173
  ## How This Tool Works
396174
396174
  - You should have already written your plan to the plan file specified in the plan mode system message
396175
+ - Writing or editing that exact plan file is allowed without an existing task list
396176
+ - TaskCreate, TaskUpdate, TaskList, and TaskGet remain available during planning
396175
396177
  - This tool does NOT take the plan content as a parameter - it will read the plan from the file you wrote
396176
396178
  - This tool simply signals that you're done planning and ready for the user to review and approve
396177
396179
  - The user will see the contents of your plan file when they review it
396180
+ - After approval, this tool preserves any existing visible tasks or creates a bounded implementation and verification task list before coding begins
396178
396181
 
396179
396182
  ## When to Use This Tool
396180
396183
  IMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.
@@ -396194,6 +396197,551 @@ Ensure your plan is complete and unambiguous:
396194
396197
  `;
396195
396198
  });
396196
396199
 
396200
+ // src/services/tools/taskListGate.ts
396201
+ function getTaskListGateConfig() {
396202
+ const configured = getInitialSettings()?.tasks?.requireBeforeChanges;
396203
+ if (!configured)
396204
+ return TASK_LIST_GATE_DEFAULTS;
396205
+ return {
396206
+ enabled: typeof configured.enabled === "boolean" ? configured.enabled : TASK_LIST_GATE_DEFAULTS.enabled,
396207
+ freeReads: typeof configured.freeReads === "number" && Number.isInteger(configured.freeReads) && configured.freeReads >= 0 ? configured.freeReads : TASK_LIST_GATE_DEFAULTS.freeReads
396208
+ };
396209
+ }
396210
+ function isMutatingTool2(toolName) {
396211
+ return !GATE_EXEMPT_TOOLS.has(toolName) && KNOWN_MUTATING_TOOLS.has(toolName);
396212
+ }
396213
+ function isTaskListGateExempt(toolName) {
396214
+ return GATE_EXEMPT_TOOLS.has(toolName);
396215
+ }
396216
+ function countActionableTasksForGate(tasks) {
396217
+ return tasks.filter((task) => !task.metadata?._internal && !isAutomaticPromptTask(task) && (task.status === "pending" || task.status === "in_progress")).length;
396218
+ }
396219
+ function checkTaskListGate(input) {
396220
+ const config3 = input.config ?? getTaskListGateConfig();
396221
+ if (!config3.enabled)
396222
+ return { allowed: true };
396223
+ if (input.taskListWriterAvailable === false)
396224
+ return { allowed: true };
396225
+ if (isTaskListGateExempt(input.toolName))
396226
+ return { allowed: true };
396227
+ if (input.isPlanningArtifact === true)
396228
+ return { allowed: true };
396229
+ const isMutating = input.isMutating ?? isMutatingTool2(input.toolName);
396230
+ if (!isMutating)
396231
+ return { allowed: true };
396232
+ if (input.taskCount !== null && input.taskCount > 0) {
396233
+ return { allowed: true };
396234
+ }
396235
+ const inherentlyRequiresTaskList = input.isSubagent || ALWAYS_REQUIRE_PLAN_TOOLS.has(input.toolName);
396236
+ const classifiedRequirement = input.requiresTaskList === true;
396237
+ const forceEveryMutation = config3.freeReads === 0;
396238
+ const unclassifiedAllowanceExpired = input.requiresTaskList === undefined && input.readsSoFar >= config3.freeReads;
396239
+ const gateRequired = inherentlyRequiresTaskList || classifiedRequirement || forceEveryMutation || unclassifiedAllowanceExpired;
396240
+ const requirementContext = input.requirementReason ? ` This turn requires task tracking because it contains ${input.requirementReason}.` : "";
396241
+ const planningRecovery = input.requirementReason === "planning workflow" ? " EnterPlanMode and plan updates do not create the visible task list." : "";
396242
+ if (input.taskCount === null) {
396243
+ return {
396244
+ allowed: false,
396245
+ reason: `The task list could not be read, so ${input.toolName} was not allowed ` + `to change state without a verifiable plan.${requirementContext}${planningRecovery} Retry TaskList or ` + `TaskCreate, then retry this call. Disable with ` + `tasks.requireBeforeChanges.enabled=false in settings.`
396246
+ };
396247
+ }
396248
+ if (!gateRequired)
396249
+ return { allowed: true };
396250
+ if (inherentlyRequiresTaskList) {
396251
+ return {
396252
+ allowed: false,
396253
+ reason: `No actionable parent task exists for ${input.toolName}. Call ` + `TaskCreate before delegating or changing state, then retry this call. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
396254
+ };
396255
+ }
396256
+ return {
396257
+ allowed: false,
396258
+ reason: `No task list exists, and ${input.toolName} changes the workspace. ` + `${requirementContext.trim()}${requirementContext ? " " : ""}` + `${planningRecovery.trim()}${planningRecovery ? " " : ""}` + `Call TaskCreate first with the steps you intend to take, then retry ` + `this call. Reads are unrestricted, so investigate as much as you need ` + `before writing the list. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
396259
+ };
396260
+ }
396261
+ var TASK_LIST_GATE_DEFAULTS, KNOWN_MUTATING_TOOLS, GATE_EXEMPT_TOOLS, ALWAYS_REQUIRE_PLAN_TOOLS;
396262
+ var init_taskListGate = __esm(() => {
396263
+ init_settings2();
396264
+ init_tasks();
396265
+ TASK_LIST_GATE_DEFAULTS = {
396266
+ enabled: true,
396267
+ freeReads: 3
396268
+ };
396269
+ KNOWN_MUTATING_TOOLS = new Set([
396270
+ "Edit",
396271
+ "MultiEdit",
396272
+ "Write",
396273
+ "NotebookEdit",
396274
+ "Bash",
396275
+ "Shell",
396276
+ "PowerShell",
396277
+ "Computer",
396278
+ "Agent",
396279
+ "Task",
396280
+ "REPL"
396281
+ ]);
396282
+ GATE_EXEMPT_TOOLS = new Set([
396283
+ "TaskCreate",
396284
+ "TaskUpdate",
396285
+ "TaskList",
396286
+ "TaskGet",
396287
+ "TodoWrite",
396288
+ "ExitPlanMode"
396289
+ ]);
396290
+ ALWAYS_REQUIRE_PLAN_TOOLS = new Set([
396291
+ "Agent",
396292
+ "Task"
396293
+ ]);
396294
+ });
396295
+
396296
+ // src/utils/taskListRunContext.ts
396297
+ import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
396298
+ import { randomUUID as randomUUID40 } from "crypto";
396299
+ function runWithTaskListRun(run2, fn) {
396300
+ return taskListRunStorage.run({ run: run2 }, fn);
396301
+ }
396302
+ function getTaskListRunContext() {
396303
+ return taskListRunStorage.getStore()?.run;
396304
+ }
396305
+ function textFromQueuedCommand(command) {
396306
+ if (command.preExpansionValue)
396307
+ return command.preExpansionValue;
396308
+ if (typeof command.value === "string")
396309
+ return command.value;
396310
+ return command.value.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
396311
+ `);
396312
+ }
396313
+ function textFromMessage(message) {
396314
+ const content = message.message?.content;
396315
+ if (typeof content === "string")
396316
+ return content;
396317
+ if (!Array.isArray(content))
396318
+ return "";
396319
+ return content.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
396320
+ `);
396321
+ }
396322
+ function requestsAppendToCurrentTaskList(input) {
396323
+ const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
396324
+ if (!normalized)
396325
+ return false;
396326
+ return /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized) || /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active)\s+tasks\b/u.test(normalized) || /\b(?:add|append|put|queue)\s+(?:this|it)\s+(?:to|on)\s+(?:my|the|your)\s+(?:current\s+)?(?:task\s+)?list\b/u.test(normalized) || /\b(?:current|existing|active|same)\s+(?:task\s+)?list\b.{0,100}\b(?:add|append|put|queue)\b/u.test(normalized) || /\b(?:keep|continue|use)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized);
396327
+ }
396328
+ function requestsContinueCurrentTaskList(input) {
396329
+ const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase().replace(/[.!?]+$/gu, "").trim();
396330
+ if (!normalized || normalized.length > 80)
396331
+ return false;
396332
+ return /^(?:ok(?:ay)?|yes|yep|yup|sure|approved|i approve|looks good|sounds good)$/u.test(normalized) || /^(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized) || /^(?:ok(?:ay)?|yes|sure|approved|i approve)[, ]+(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized);
396333
+ }
396334
+ function requestsRevisionOfCurrentTaskList(input) {
396335
+ const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
396336
+ if (!normalized || normalized.length > 500)
396337
+ return false;
396338
+ return /^(?:no|also|and|but|actually|instead|still|again|not yet|(?:it|this|that)\s+still)\b/u.test(normalized) || /\b(?:why did (?:you|u)|i (?:said|asked|meant)|you (?:removed|deleted|changed|forgot|missed))\b/u.test(normalized) || /^(?:please\s+)?(?:fix|change|update|restore|keep|remove|add)\s+(?:it|that|this)\b/u.test(normalized) || /^(?:please\s+)?(?:do not|don't)\s+(?:remove|delete|change|replace|forget)\b/u.test(normalized);
396339
+ }
396340
+ function shouldKeepCurrentTaskList(input) {
396341
+ return requestsAppendToCurrentTaskList(input) || requestsContinueCurrentTaskList(input) || requestsRevisionOfCurrentTaskList(input);
396342
+ }
396343
+ function withoutCode(input) {
396344
+ return input.replace(/```[\s\S]*?```/gu, " ").replace(/`[^`\n]*`/gu, " ");
396345
+ }
396346
+ function proseOnly(input) {
396347
+ return withoutCode(input).replace(/\s+/gu, " ").trim();
396348
+ }
396349
+ function taskListRequirementReason(input) {
396350
+ const text2 = proseOnly(input);
396351
+ if (!text2)
396352
+ return;
396353
+ const optsOut = /\b(?:do not|don't)\s+(?:(?:create|make|maintain|show|start|use)\s+)?(?:a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2) || /\bwithout\s+(?:(?:creating|making|maintaining|showing|starting|using)\s+)?(?:a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2) || /\b(?:skip|no)\s+(?:the\s+|a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2);
396354
+ if (optsOut)
396355
+ return;
396356
+ if (/\b(?:create|make|maintain|show|start|use|keep|track|add|append|put|queue)\b[^.!?]{0,100}\b(?:task|todo)\s+(?:list|board)\b/iu.test(text2) || /\b(?:add|append|put|queue)\s+(?:this|it)?\s*(?:to|on)?\s*(?:my|the|your)?\s*(?:tasks?|todos?)\b/iu.test(text2) || /\b(?:add|append|put|queue)\s+(?:this|it)\s+(?:to|on)\s+(?:the\s+|your\s+|my\s+)?(?:current|existing)\s+list\b/iu.test(text2) || /\b(?:create|make|use|track)\s+(?:the\s+|a\s+|your\s+)?(?:tasks?|todos?)\b/iu.test(text2) || /\b(?:tasks?|todos?)\s+first\b/iu.test(text2)) {
396357
+ return "explicit task tracking request";
396358
+ }
396359
+ if (/^\/plan(?:\s|$)/iu.test(text2) || /\b(?:enter|start|use|switch\s+to)\s+plan\s+mode\b/iu.test(text2) || /\bplan\s+(?:this|the\s+work|first)\b/iu.test(text2)) {
396360
+ return "planning workflow";
396361
+ }
396362
+ if (/\b(?:delegate|delegation|sub[ -]?agents?|parallel\s+agents?|agent\s+team|team\s+of\s+agents?|fan[ -]?out)\b/iu.test(text2)) {
396363
+ return "delegation or parallel agent work";
396364
+ }
396365
+ const hasAction = new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(text2);
396366
+ if (hasAction && /\b(?:publish|release|deploy|production|migrat(?:e|ion)|database\s+schema|credentials?|secrets?|permissions?|sandbox|security|authentication|authorization|payments?|billing|version\s+bump|git\s+tag)\b/iu.test(text2)) {
396367
+ return "release, security, migration, or production risk";
396368
+ }
396369
+ const structuralText = withoutCode(input);
396370
+ const enumeratedItems = structuralText.match(/(?:^|\n)\s*(?:[-*+]\s+|\d+[.)]\s+)\S/gu);
396371
+ const actionLines = structuralText.split(/\r?\n/gu).filter((line) => new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(line));
396372
+ if ((enumeratedItems?.length ?? 0) >= 2 || actionLines.length >= 2 || SEQUENCED_ACTION_RE.test(text2)) {
396373
+ return "multiple requested outcomes";
396374
+ }
396375
+ const targetList = new RegExp(String.raw`\b${ACTION_WORD}\b[^.!?]{0,120}\b(?:docs?|tests?|code|implementation|configuration|config|workflow|release notes?|technical docs?|readme|ui|api|cli|database|schema|sandbox|permissions?)\b[^.!?]{0,80}(?:,|\band\b|\bplus\b)[^.!?]{0,80}\b(?:docs?|tests?|code|implementation|configuration|config|workflow|release notes?|technical docs?|readme|ui|api|cli|database|schema|sandbox|permissions?)\b`, "iu");
396376
+ if (targetList.test(text2))
396377
+ return "multiple requested outcomes";
396378
+ const projectScope = /\b(?:app|application|agent|system|platform|website|dashboard|service|integration|workflow|codebase|project|plugin|extension|3d\s+(?:scene|design|pipeline))\b/iu;
396379
+ const projectAction = /\b(?:build(?:ing|s)?|built|creat(?:e|ed|es|ing)|design(?:ed|ing|s)?|implement(?:ed|ing|s)?|integrat(?:e|ed|es|ing)|refactor(?:ed|ing|s)?|rewrit(?:e|ing|ten)|overhaul(?:ed|ing|s)?|audit(?:ed|ing|s)?|research(?:ed|es|ing)?)\b/iu;
396380
+ if (projectScope.test(text2) && projectAction.test(text2)) {
396381
+ return "large project scope";
396382
+ }
396383
+ ACTION_RE.lastIndex = 0;
396384
+ if (text2.length >= 600 && ACTION_RE.test(text2)) {
396385
+ return "detailed multi-step request";
396386
+ }
396387
+ return;
396388
+ }
396389
+ function getTaskListRunForCommand(command, options2 = {}) {
396390
+ if (!command || command.mode !== "prompt" || command.isMeta)
396391
+ return;
396392
+ const text2 = textFromQueuedCommand(command);
396393
+ if (!options2.allowSlashCommand && !command.skipSlashCommands && text2.trimStart().startsWith("/")) {
396394
+ return;
396395
+ }
396396
+ const requirementReason = taskListRequirementReason(text2);
396397
+ return {
396398
+ generationId: String(command.uuid ?? randomUUID40()),
396399
+ appendToCurrent: shouldKeepCurrentTaskList(text2),
396400
+ requiresTaskList: requirementReason !== undefined,
396401
+ ...requirementReason ? { requirementReason } : {}
396402
+ };
396403
+ }
396404
+ function getTaskListRunFromMessages(messages) {
396405
+ const message = messages.findLast(isHumanTurn);
396406
+ if (!message || typeof message.uuid !== "string" || !message.uuid) {
396407
+ return;
396408
+ }
396409
+ const text2 = textFromMessage(message);
396410
+ const requirementReason = taskListRequirementReason(text2);
396411
+ return {
396412
+ generationId: message.uuid,
396413
+ appendToCurrent: shouldKeepCurrentTaskList(text2),
396414
+ requiresTaskList: requirementReason !== undefined,
396415
+ ...requirementReason ? { requirementReason } : {}
396416
+ };
396417
+ }
396418
+ var taskListRunStorage, ACTION_WORD, ACTION_RE, SEQUENCED_ACTION_RE;
396419
+ var init_taskListRunContext = __esm(() => {
396420
+ taskListRunStorage = new AsyncLocalStorage5;
396421
+ ACTION_WORD = String.raw`(?:add(?:ed|ing|s)?|audit(?:ed|ing|s)?|build(?:ing|s)?|built|bump(?:ed|ing|s)?|chang(?:e|ed|es|ing)|clean(?:ed|ing|s)?|creat(?:e|ed|es|ing)|debug(?:ged|ging|s)?|delet(?:e|ed|es|ing)|deploy(?:ed|ing|s)?|design(?:ed|ing|s)?|document(?:ed|ing|s)?|fix(?:ed|es|ing)?|implement(?:ed|ing|s)?|integrat(?:e|ed|es|ing)|migrat(?:e|ed|es|ing)|publish(?:ed|es|ing)?|push(?:ed|es|ing)?|refactor(?:ed|ing|s)?|releas(?:e|ed|es|ing)|remov(?:e|ed|es|ing)|renam(?:e|ed|es|ing)|repair(?:ed|ing|s)?|research(?:ed|es|ing)?|review(?:ed|ing|s)?|secur(?:e|ed|es|ing)|test(?:ed|ing|s)?|updat(?:e|ed|es|ing)|upgrad(?:e|ed|es|ing)|verif(?:y|ied|ies|ying)|writ(?:e|es|ing)|wrote)`;
396422
+ ACTION_RE = new RegExp(String.raw`\b${ACTION_WORD}\b`, "giu");
396423
+ SEQUENCED_ACTION_RE = new RegExp(String.raw`\b${ACTION_WORD}\b[^.!?\n]{0,180}(?:\band\b|\bthen\b|\balso\b|\bplus\b|;|\n)[^.!?\n]{0,100}\b${ACTION_WORD}\b`, "iu");
396424
+ });
396425
+
396426
+ // src/tools/TaskCreateTool/prompt.ts
396427
+ function getPrompt4() {
396428
+ const teammateContext = isAgentSwarmsEnabled() ? " and potentially assigned to teammates" : "";
396429
+ const teammateTips = isAgentSwarmsEnabled() ? `- Include enough detail in the description for another agent to understand and complete the task
396430
+ - New tasks are created with status 'pending' and no owner - use TaskUpdate with the \`owner\` parameter to assign them
396431
+ ` : "";
396432
+ return `Use this tool to create a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
396433
+ It also helps the user understand the progress of the task and overall progress of their requests.
396434
+
396435
+ ## When to Use This Tool
396436
+
396437
+ Use this tool proactively in these scenarios:
396438
+
396439
+ - Multi-outcome work - When a request has 2 or more distinct requested outcomes, deliverables, or sequenced actions
396440
+ - Non-trivial and complex tasks - Tasks that require careful planning or multiple operations${teammateContext}
396441
+ - Multiple independently verifiable outcomes, dependency ordering, delegation, or parallel work
396442
+ - High-risk lifecycle work - Releases, publishing, deployment, migrations, security, credentials, permissions, sandboxing, or production changes
396443
+ - Project-sized builds, integrations, workflows, refactors, and audits
396444
+ - Plan mode - When using plan mode, create a task list to track the work
396445
+ - User explicitly requests todo list - When the user directly asks you to use the todo list
396446
+ - User asks to queue work - When the user says "add to your tasks", "add this to your task list", "put this on the list", "queue this up", or anything similar, IMMEDIATELY call this tool with that request \u2014 even if you are in the middle of other work and even if the item sounds small. The user is watching the live task panel and expects the item to appear there right away. Acknowledge briefly and continue what you were doing unless asked to switch.
396447
+ - User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
396448
+ - When new instructions materially change multi-step work - update the plan before continuing
396449
+
396450
+ ## When NOT to Use This Tool
396451
+
396452
+ Skip using this tool when:
396453
+ - The task is purely conversational or informational
396454
+ - The request is one genuinely atomic, low-risk action with one outcome that can be completed and verified directly
396455
+ - The user sends a short acknowledgement, correction, or clarification that does not add a distinct outcome to an existing board
396456
+
396457
+ Do not create a task merely because a user sent a message or because the request is actionable. Task subjects must describe concrete outcomes chosen after understanding the work; never copy the raw prompt into a task title.
396458
+
396459
+ EXCEPTION: none of the "skip" rules apply when the user explicitly asks for an item to be added to the task list ("add to your tasks \u2026"). An explicit request always wins \u2014 create the task.
396460
+
396461
+ ## Task Fields
396462
+
396463
+ - **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
396464
+ - **description**: What needs to be done
396465
+ - **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., "Fixing authentication bug"). If omitted, the spinner shows the subject instead.
396466
+ - **blocks** / **addBlocks** (optional): Existing task IDs this task blocks
396467
+ - **blockedBy** / **addBlockedBy** (optional): Existing task IDs that block this task
396468
+ - **addToCurrentList** (optional): Set to \`true\` when the user explicitly asks to append to the current/existing task list. A new prompt archives the previous list only when it has no pending or in-progress work; an interruption preserves active work for reconciliation.
396469
+
396470
+ All tasks are created with status \`pending\`.
396471
+
396472
+ ## Tips
396473
+
396474
+ - Create tasks with clear, specific subjects that describe the outcome
396475
+ - Never guess task IDs or reference a task that has not been created yet. For a multi-task plan, create tasks without forward edges, wait for their real IDs, then use TaskUpdate to add dependency edges.
396476
+ - A task can depend only on an existing different task; never add a self-dependency.
396477
+ ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
396478
+ - Use TaskUpdate, not TaskCreate, for status or ownership changes
396479
+ - After an interruption, call TaskList, keep relevant active work, update the affected task, add a task only for a genuinely distinct new outcome, and mark superseded work skipped
396480
+ - Do not set \`addToCurrentList\` merely because earlier tasks exist; runtime already preserves interrupted work, while this flag is reserved for explicit user intent such as "add this to the current list"
396481
+ `;
396482
+ }
396483
+ var DESCRIPTION12 = "Create a new task in the task list";
396484
+ var init_prompt16 = __esm(() => {
396485
+ init_agentSwarmsEnabled();
396486
+ });
396487
+
396488
+ // src/tools/TaskCreateTool/TaskCreateTool.ts
396489
+ async function createTaskFromInput({
396490
+ subject,
396491
+ description,
396492
+ activeForm,
396493
+ metadata,
396494
+ blocks,
396495
+ blockedBy,
396496
+ addBlocks,
396497
+ addBlockedBy,
396498
+ addToCurrentList
396499
+ }, context5) {
396500
+ const initialBlocks = [...new Set([...blocks ?? [], ...addBlocks ?? []])];
396501
+ const initialBlockedBy = [
396502
+ ...new Set([...blockedBy ?? [], ...addBlockedBy ?? []])
396503
+ ];
396504
+ const taskListId = getTaskListId();
396505
+ const run2 = getTaskListRunContext() ?? (context5.agentId ? undefined : getTaskListRunFromMessages(context5.messages ?? []));
396506
+ const taskData = {
396507
+ subject,
396508
+ description,
396509
+ activeForm,
396510
+ status: "pending",
396511
+ owner: undefined,
396512
+ blocks: [],
396513
+ blockedBy: [],
396514
+ metadata
396515
+ };
396516
+ const taskId = run2 ? await createTaskForRun(taskListId, run2.generationId, taskData, {
396517
+ appendToCurrent: run2.appendToCurrent || addToCurrentList === true
396518
+ }) : await createTask(taskListId, taskData);
396519
+ const dependencies = [
396520
+ ...initialBlocks.map((targetId) => ({
396521
+ fromTaskId: taskId,
396522
+ toTaskId: targetId,
396523
+ field: "blocks"
396524
+ })),
396525
+ ...initialBlockedBy.map((blockerId) => ({
396526
+ fromTaskId: blockerId,
396527
+ toTaskId: taskId,
396528
+ field: "blockedBy"
396529
+ }))
396530
+ ].filter((edge) => edge.fromTaskId !== edge.toTaskId);
396531
+ const dependencyResult = await updateTaskWithDependencies(taskListId, taskId, {}, dependencies);
396532
+ if (dependencyResult.success === false) {
396533
+ const dependency = dependencyResult.dependency;
396534
+ await deleteTask(taskListId, taskId);
396535
+ if (dependency) {
396536
+ const field = dependencies.find((candidate) => candidate.fromTaskId === dependency.fromTaskId && candidate.toTaskId === dependency.toTaskId)?.field ?? "dependency";
396537
+ throw new Error(`Invalid ${field} dependency ` + `#${dependency.fromTaskId} -> #${dependency.toTaskId}: ` + dependencyResult.reason);
396538
+ }
396539
+ throw new Error(`Failed to create task dependencies: ${dependencyResult.reason}`);
396540
+ }
396541
+ const blockingErrors = [];
396542
+ const generator = executeTaskCreatedHooks(taskId, subject, description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
396543
+ for await (const result of generator) {
396544
+ if (result.blockingError) {
396545
+ blockingErrors.push(getTaskCreatedHookMessage(result.blockingError));
396546
+ }
396547
+ }
396548
+ if (blockingErrors.length > 0) {
396549
+ await deleteTask(taskListId, taskId);
396550
+ throw new Error(blockingErrors.join(`
396551
+ `));
396552
+ }
396553
+ context5.setAppState((prev) => prev.expandedView === "tasks" ? prev : { ...prev, expandedView: "tasks" });
396554
+ return { id: taskId, subject };
396555
+ }
396556
+ var inputSchema29, outputSchema25, TaskCreateTool;
396557
+ var init_TaskCreateTool = __esm(() => {
396558
+ init_v4();
396559
+ init_Tool();
396560
+ init_hooks5();
396561
+ init_tasks();
396562
+ init_taskListRunContext();
396563
+ init_teammate();
396564
+ init_prompt16();
396565
+ inputSchema29 = lazySchema(() => exports_external.strictObject({
396566
+ subject: exports_external.string().describe("A brief title for the task"),
396567
+ description: exports_external.string().describe("What needs to be done"),
396568
+ activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
396569
+ metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task"),
396570
+ blocks: exports_external.array(exports_external.string()).optional().describe("Task IDs that this task blocks at creation time"),
396571
+ blockedBy: exports_external.array(exports_external.string()).optional().describe("Task IDs that block this task at creation time"),
396572
+ addBlocks: exports_external.array(exports_external.string()).optional().describe("Alias for blocks, accepted for compatibility with TaskUpdate"),
396573
+ addBlockedBy: exports_external.array(exports_external.string()).optional().describe("Alias for blockedBy, accepted for compatibility with TaskUpdate"),
396574
+ addToCurrentList: exports_external.boolean().optional().describe("Set true only when the user explicitly asks to append to the current task list")
396575
+ }));
396576
+ outputSchema25 = lazySchema(() => exports_external.object({
396577
+ task: exports_external.object({
396578
+ id: exports_external.string(),
396579
+ subject: exports_external.string()
396580
+ })
396581
+ }));
396582
+ TaskCreateTool = buildTool({
396583
+ name: TASK_CREATE_TOOL_NAME,
396584
+ searchHint: "create a task in the task list",
396585
+ maxResultSizeChars: 1e5,
396586
+ async description() {
396587
+ return DESCRIPTION12;
396588
+ },
396589
+ async prompt() {
396590
+ return getPrompt4();
396591
+ },
396592
+ get inputSchema() {
396593
+ return inputSchema29();
396594
+ },
396595
+ get outputSchema() {
396596
+ return outputSchema25();
396597
+ },
396598
+ userFacingName() {
396599
+ return "TaskCreate";
396600
+ },
396601
+ shouldDefer: false,
396602
+ isEnabled() {
396603
+ return isTodoV2Enabled();
396604
+ },
396605
+ isConcurrencySafe() {
396606
+ return false;
396607
+ },
396608
+ toAutoClassifierInput(input) {
396609
+ return input.subject;
396610
+ },
396611
+ renderToolUseMessage() {
396612
+ return null;
396613
+ },
396614
+ async call(input, context5) {
396615
+ const task = await createTaskFromInput(input, context5);
396616
+ return {
396617
+ data: {
396618
+ task
396619
+ }
396620
+ };
396621
+ },
396622
+ mapToolResultToToolResultBlockParam(content, toolUseID) {
396623
+ const { task } = content;
396624
+ return {
396625
+ tool_use_id: toolUseID,
396626
+ type: "tool_result",
396627
+ content: `Task #${task.id} created successfully: ${task.subject}`
396628
+ };
396629
+ }
396630
+ });
396631
+ });
396632
+
396633
+ // src/tools/ExitPlanModeTool/planTaskSync.ts
396634
+ function plainText(value) {
396635
+ return value.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)(?:\[[ xX]\]\s*)?/u, "").replace(/\[([^\]]+)\]\([^)]*\)/gu, "$1").replace(/[*_`~#]/gu, "").replace(/\s+/gu, " ").trim();
396636
+ }
396637
+ function boundedDescription(value) {
396638
+ const normalized = value.trim();
396639
+ return normalized.length <= 4000 ? normalized : `${normalized.slice(0, 3999)}\u2026`;
396640
+ }
396641
+ function taskSubject(value) {
396642
+ const cleaned = plainText(value).replace(/[.;:,]+$/u, "");
396643
+ const pathStep = cleaned.match(/^([^:]{1,100}\.[A-Za-z0-9]+):\s*(.+)$/u);
396644
+ const candidate = pathStep ? `${pathStep[2]} in ${pathStep[1]}` : cleaned;
396645
+ const actionable = ACTION_PREFIX.test(candidate) ? candidate : `Implement ${candidate.charAt(0).toLowerCase()}${candidate.slice(1)}`;
396646
+ return (actionable.charAt(0).toUpperCase() + actionable.slice(1)).slice(0, 120);
396647
+ }
396648
+ function extractCandidates(plan) {
396649
+ let section = "unknown";
396650
+ const candidates = [];
396651
+ for (const rawLine of plan.split(/\r?\n/gu)) {
396652
+ const heading2 = rawLine.match(/^\s{0,3}#{1,6}\s+(.+?)\s*#*\s*$/u);
396653
+ if (heading2) {
396654
+ const title = plainText(heading2[1] ?? "");
396655
+ section = VERIFICATION_SECTION.test(title) ? "verification" : NON_EXECUTION_SECTION.test(title) ? "ignored" : IMPLEMENTATION_SECTION.test(title) ? "implementation" : "unknown";
396656
+ continue;
396657
+ }
396658
+ if (!/^\s*(?:[-*+]\s+|\d+[.)]\s+)\S/u.test(rawLine))
396659
+ continue;
396660
+ const line = plainText(rawLine);
396661
+ if (line.length < 8 || section === "ignored")
396662
+ continue;
396663
+ const kind = section === "verification" || VERIFICATION_STEP.test(line) ? "verification" : "implementation";
396664
+ const subject = taskSubject(line);
396665
+ if (subject.length < 8)
396666
+ continue;
396667
+ candidates.push({ line, subject, kind });
396668
+ }
396669
+ return candidates;
396670
+ }
396671
+ function derivePlanTaskBlueprints(plan) {
396672
+ const unique = [];
396673
+ const seen = new Set;
396674
+ for (const candidate of extractCandidates(plan)) {
396675
+ const key = candidate.subject.toLocaleLowerCase();
396676
+ if (seen.has(key))
396677
+ continue;
396678
+ seen.add(key);
396679
+ unique.push(candidate);
396680
+ if (unique.length >= 8)
396681
+ break;
396682
+ }
396683
+ const implementation = unique.filter((item) => item.kind === "implementation").slice(0, 5);
396684
+ const verification = unique.find((item) => item.kind === "verification");
396685
+ const blueprints = implementation.map((item) => ({
396686
+ subject: item.subject,
396687
+ description: boundedDescription(`Approved plan step: ${item.line}`)
396688
+ }));
396689
+ if (blueprints.length === 0) {
396690
+ blueprints.push({
396691
+ subject: "Implement the approved plan",
396692
+ description: boundedDescription(plan.trim() || "Implement the work approved in plan mode."),
396693
+ activeForm: "Implementing the approved plan"
396694
+ });
396695
+ }
396696
+ blueprints.push({
396697
+ subject: verification?.subject ?? "Verify the completed implementation",
396698
+ description: boundedDescription(verification?.line ?? "Run the relevant tests and checks, then confirm the approved plan is complete."),
396699
+ activeForm: "Verifying the completed implementation"
396700
+ });
396701
+ return blueprints;
396702
+ }
396703
+ async function ensureApprovedPlanTasks(plan, planFilePath, context5) {
396704
+ const inspection = await inspectTaskListForGate(getTaskListId());
396705
+ if (countActionableTasksForGate(inspection.tasks) > 0)
396706
+ return [];
396707
+ const created = [];
396708
+ const implementationIds = [];
396709
+ const blueprints = derivePlanTaskBlueprints(plan ?? "");
396710
+ try {
396711
+ for (const [index2, blueprint] of blueprints.entries()) {
396712
+ const isVerification = index2 === blueprints.length - 1;
396713
+ const task = await createTaskFromInput({
396714
+ ...blueprint,
396715
+ ...isVerification && implementationIds.length > 0 ? { blockedBy: implementationIds } : {},
396716
+ metadata: {
396717
+ source: "approved-plan",
396718
+ planFilePath
396719
+ }
396720
+ }, context5);
396721
+ created.push(task.id);
396722
+ if (!isVerification)
396723
+ implementationIds.push(task.id);
396724
+ }
396725
+ return created;
396726
+ } catch (error40) {
396727
+ for (const taskId of created.reverse()) {
396728
+ await deleteTask(getTaskListId(), taskId).catch(() => false);
396729
+ }
396730
+ throw error40;
396731
+ }
396732
+ }
396733
+ var ACTION_PREFIX, IMPLEMENTATION_SECTION, VERIFICATION_SECTION, NON_EXECUTION_SECTION, VERIFICATION_STEP;
396734
+ var init_planTaskSync = __esm(() => {
396735
+ init_taskListGate();
396736
+ init_tasks();
396737
+ init_TaskCreateTool();
396738
+ ACTION_PREFIX = /^(?:add|allow|build|change|clean|configure|create|debug|delete|design|document|enable|ensure|expose|fix|implement|integrate|migrate|prevent|publish|refactor|remove|rename|repair|replace|research|restore|review|run|secure|synchronize|test|update|upgrade|validate|verify)\b/iu;
396739
+ IMPLEMENTATION_SECTION = /\b(?:approach|changes?|execution|implementation|migration|plan|steps?|tasks?|work)\b/iu;
396740
+ VERIFICATION_SECTION = /\b(?:acceptance|checks?|quality|tests?|validation|verification)\b/iu;
396741
+ NON_EXECUTION_SECTION = /\b(?:alternatives?|assumptions?|context|decisions?|goals?|notes?|out of scope|requirements?|risks?|scope)\b/iu;
396742
+ VERIFICATION_STEP = /\b(?:check|test|validate|verify)\b/iu;
396743
+ });
396744
+
396197
396745
  // src/tools/ExitPlanModeTool/UI.tsx
396198
396746
  function renderToolUseMessage19() {
396199
396747
  return null;
@@ -396386,7 +396934,7 @@ function normalizeExitPlanModeInput(value) {
396386
396934
  allowedPrompts: normalizeAllowedPromptsValue(rawAllowedPrompts)
396387
396935
  };
396388
396936
  }
396389
- var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema, inputSchema29, _sdkInputSchema, outputSchema25, ExitPlanModeV2Tool;
396937
+ var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema, inputSchema30, _sdkInputSchema, outputSchema26, ExitPlanModeV2Tool;
396390
396938
  var init_ExitPlanModeV2Tool = __esm(() => {
396391
396939
  init_v4();
396392
396940
  init_state();
@@ -396402,6 +396950,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396402
396950
  init_teammateMailbox();
396403
396951
  init_constants2();
396404
396952
  init_prompt15();
396953
+ init_planTaskSync();
396405
396954
  init_UI18();
396406
396955
  allowedPromptSchema = lazySchema(() => exports_external.object({
396407
396956
  tool: exports_external.enum(["Bash"]).describe("The tool this prompt applies to"),
@@ -396411,12 +396960,12 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396411
396960
  inputObjectSchema = lazySchema(() => exports_external.strictObject({
396412
396961
  allowedPrompts: allowedPromptsSchema().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")
396413
396962
  }).passthrough());
396414
- inputSchema29 = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema()));
396963
+ inputSchema30 = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema()));
396415
396964
  _sdkInputSchema = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema().extend({
396416
396965
  plan: exports_external.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),
396417
396966
  planFilePath: exports_external.string().optional().describe("The plan file path (injected by normalizeToolInput)")
396418
396967
  })));
396419
- outputSchema25 = lazySchema(() => exports_external.object({
396968
+ outputSchema26 = lazySchema(() => exports_external.object({
396420
396969
  plan: exports_external.string().nullable().describe("The plan that was presented to the user"),
396421
396970
  isAgent: exports_external.boolean(),
396422
396971
  filePath: exports_external.string().optional().describe("The file path where the plan was saved"),
@@ -396424,7 +396973,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396424
396973
  planWasEdited: exports_external.boolean().optional().describe("True when the user edited the plan (CCR web UI or Ctrl+G); determines whether the plan is echoed back in tool_result"),
396425
396974
  awaitingLeaderApproval: exports_external.boolean().optional().describe("When true, the teammate has sent a plan approval request to the team leader"),
396426
396975
  alreadyExited: exports_external.boolean().optional().describe("When true, plan mode had already been exited and this call was a no-op"),
396427
- requestId: exports_external.string().optional().describe("Unique identifier for the plan approval request")
396976
+ requestId: exports_external.string().optional().describe("Unique identifier for the plan approval request"),
396977
+ synchronizedTaskIds: exports_external.array(exports_external.string()).optional().describe("Visible task IDs created from the approved plan when none existed")
396428
396978
  }));
396429
396979
  ExitPlanModeV2Tool = buildTool({
396430
396980
  name: EXIT_PLAN_MODE_V2_TOOL_NAME,
@@ -396437,10 +396987,10 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396437
396987
  return EXIT_PLAN_MODE_V2_TOOL_PROMPT;
396438
396988
  },
396439
396989
  get inputSchema() {
396440
- return inputSchema29();
396990
+ return inputSchema30();
396441
396991
  },
396442
396992
  get outputSchema() {
396443
- return outputSchema25();
396993
+ return outputSchema26();
396444
396994
  },
396445
396995
  userFacingName() {
396446
396996
  return "";
@@ -396553,6 +397103,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396553
397103
  }
396554
397104
  };
396555
397105
  }
397106
+ const synchronizedTaskIds = isAgent ? [] : await ensureApprovedPlanTasks(plan, filePath, context5);
396556
397107
  const appState = context5.getAppState();
396557
397108
  let gateFallbackNotification = null;
396558
397109
  if (false) {}
@@ -396595,7 +397146,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396595
397146
  isAgent,
396596
397147
  filePath,
396597
397148
  hasTaskTool: hasTaskTool || undefined,
396598
- planWasEdited: inputPlan !== undefined || undefined
397149
+ planWasEdited: inputPlan !== undefined || undefined,
397150
+ synchronizedTaskIds
396599
397151
  }
396600
397152
  };
396601
397153
  },
@@ -396607,7 +397159,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
396607
397159
  planWasEdited,
396608
397160
  awaitingLeaderApproval,
396609
397161
  requestId,
396610
- alreadyExited
397162
+ alreadyExited,
397163
+ synchronizedTaskIds
396611
397164
  }, toolUseID) {
396612
397165
  if (alreadyExited) {
396613
397166
  return {
@@ -396652,10 +397205,15 @@ Request ID: ${requestId}`,
396652
397205
  const teamHint = hasTaskTool ? `
396653
397206
 
396654
397207
  If this plan can be broken down into multiple independent tasks, consider using the ${TEAM_CREATE_TOOL_NAME} tool to create a team and parallelize the work.` : "";
397208
+ const taskHint = synchronizedTaskIds && synchronizedTaskIds.length > 0 ? `
397209
+
397210
+ Visible implementation tasks are ready: ${synchronizedTaskIds.map((id) => `#${id}`).join(", ")}. Start the first unblocked task and keep their statuses current.` : `
397211
+
397212
+ Use the existing visible task list and keep its statuses current while implementing.`;
396655
397213
  const planLabel = planWasEdited ? "Approved Plan (edited by user)" : "Approved Plan";
396656
397214
  return {
396657
397215
  type: "tool_result",
396658
- content: `User has approved your plan. You can now start coding. Start with updating your todo list if applicable
397216
+ content: `User has approved your plan. You can now start coding.${taskHint}
396659
397217
 
396660
397218
  Your plan has been saved to: ${filePath}
396661
397219
  You can refer back to it if needed during implementation.${teamHint}
@@ -396669,11 +397227,11 @@ ${plan}`,
396669
397227
  });
396670
397228
 
396671
397229
  // src/tools/testing/TestingPermissionTool.tsx
396672
- var NAME = "TestingPermission", inputSchema30, TestingPermissionTool;
397230
+ var NAME = "TestingPermission", inputSchema31, TestingPermissionTool;
396673
397231
  var init_TestingPermissionTool = __esm(() => {
396674
397232
  init_v4();
396675
397233
  init_Tool();
396676
- inputSchema30 = lazySchema(() => exports_external.strictObject({}));
397234
+ inputSchema31 = lazySchema(() => exports_external.strictObject({}));
396677
397235
  TestingPermissionTool = buildTool({
396678
397236
  name: NAME,
396679
397237
  maxResultSizeChars: 1e5,
@@ -396684,7 +397242,7 @@ var init_TestingPermissionTool = __esm(() => {
396684
397242
  return "Test tool that always asks for permission before executing. Used for end-to-end testing.";
396685
397243
  },
396686
397244
  get inputSchema() {
396687
- return inputSchema30();
397245
+ return inputSchema31();
396688
397246
  },
396689
397247
  userFacingName() {
396690
397248
  return "TestingPermission";
@@ -396758,7 +397316,7 @@ function formatLimitInfo(appliedLimit, appliedOffset) {
396758
397316
  parts.push(`offset: ${appliedOffset}`);
396759
397317
  return parts.join(", ");
396760
397318
  }
396761
- var inputSchema31, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema26, GrepTool;
397319
+ var inputSchema32, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema27, GrepTool;
396762
397320
  var init_GrepTool = __esm(() => {
396763
397321
  init_v4();
396764
397322
  init_Tool();
@@ -396776,7 +397334,7 @@ var init_GrepTool = __esm(() => {
396776
397334
  init_stringUtils();
396777
397335
  init_prompt2();
396778
397336
  init_UI10();
396779
- inputSchema31 = lazySchema(() => exports_external.strictObject({
397337
+ inputSchema32 = lazySchema(() => exports_external.strictObject({
396780
397338
  pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
396781
397339
  path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
396782
397340
  glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
@@ -396800,7 +397358,7 @@ var init_GrepTool = __esm(() => {
396800
397358
  ".jj",
396801
397359
  ".sl"
396802
397360
  ];
396803
- outputSchema26 = lazySchema(() => exports_external.object({
397361
+ outputSchema27 = lazySchema(() => exports_external.object({
396804
397362
  mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
396805
397363
  numFiles: exports_external.number(),
396806
397364
  filenames: exports_external.array(exports_external.string()),
@@ -396827,10 +397385,10 @@ var init_GrepTool = __esm(() => {
396827
397385
  return summary ? `Searching for ${summary}` : "Searching";
396828
397386
  },
396829
397387
  get inputSchema() {
396830
- return inputSchema31();
397388
+ return inputSchema32();
396831
397389
  },
396832
397390
  get outputSchema() {
396833
- return outputSchema26();
397391
+ return outputSchema27();
396834
397392
  },
396835
397393
  isConcurrencySafe() {
396836
397394
  return true;
@@ -398301,7 +398859,7 @@ Notes:
398301
398859
  - Returns file paths with line ranges and a short preview for each hit.`;
398302
398860
  }
398303
398861
  var CODE_SEARCH_TOOL_NAME = "CodeSearch";
398304
- var init_prompt16 = __esm(() => {
398862
+ var init_prompt17 = __esm(() => {
398305
398863
  init_prompt2();
398306
398864
  });
398307
398865
 
@@ -398314,20 +398872,20 @@ function formatHit(hit) {
398314
398872
  return `${hit.file}:${hit.startLine}-${hit.endLine} (score ${score})
398315
398873
  ${indentedPreview}`;
398316
398874
  }
398317
- var inputSchema32, outputSchema27, DEFAULT_LIMIT = 10, CodeSearchTool;
398875
+ var inputSchema33, outputSchema28, DEFAULT_LIMIT = 10, CodeSearchTool;
398318
398876
  var init_CodeSearchTool = __esm(() => {
398319
398877
  init_v4();
398320
398878
  init_Tool();
398321
398879
  init_cwd2();
398322
398880
  init_codeIndex();
398323
398881
  init_semanticNumber();
398324
- init_prompt16();
398325
- inputSchema32 = lazySchema(() => exports_external.strictObject({
398882
+ init_prompt17();
398883
+ inputSchema33 = lazySchema(() => exports_external.strictObject({
398326
398884
  query: exports_external.string().describe('Natural-language description of the code you are looking for (e.g. "retry logic for failed network requests").'),
398327
398885
  limit: semanticNumber(exports_external.number().optional()).describe("Maximum number of results to return. Defaults to 10."),
398328
398886
  path: exports_external.string().optional().describe('Optional project-relative path prefix to restrict results to (e.g. "src/tools").')
398329
398887
  }));
398330
- outputSchema27 = lazySchema(() => exports_external.object({
398888
+ outputSchema28 = lazySchema(() => exports_external.object({
398331
398889
  status: exports_external.enum(["ok", "no_index", "empty"]),
398332
398890
  message: exports_external.string().optional(),
398333
398891
  builtAt: exports_external.string().optional(),
@@ -398357,10 +398915,10 @@ var init_CodeSearchTool = __esm(() => {
398357
398915
  return input?.query ? `Searching code for ${input.query}` : "Searching code";
398358
398916
  },
398359
398917
  get inputSchema() {
398360
- return inputSchema32();
398918
+ return inputSchema33();
398361
398919
  },
398362
398920
  get outputSchema() {
398363
- return outputSchema27();
398921
+ return outputSchema28();
398364
398922
  },
398365
398923
  isEnabled() {
398366
398924
  return isCodeIndexEnabled();
@@ -398818,7 +399376,7 @@ var init_formatters = __esm(() => {
398818
399376
  });
398819
399377
 
398820
399378
  // src/tools/LSPTool/prompt.ts
398821
- var LSP_TOOL_NAME = "LSP", DESCRIPTION12 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.
399379
+ var LSP_TOOL_NAME = "LSP", DESCRIPTION13 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.
398822
399380
 
398823
399381
  Supported operations:
398824
399382
  - goToDefinition: Find where a symbol is defined
@@ -399510,7 +400068,7 @@ function countUniqueFilesFromOutgoingCalls(calls) {
399510
400068
  const validUris = calls.map((call6) => call6.to?.uri).filter((uri) => uri);
399511
400069
  return new Set(validUris).size;
399512
400070
  }
399513
- var MAX_LSP_FILE_SIZE_BYTES = 1e7, inputSchema33, outputSchema28, LSPTool;
400071
+ var MAX_LSP_FILE_SIZE_BYTES = 1e7, inputSchema34, outputSchema29, LSPTool;
399514
400072
  var init_LSPTool = __esm(() => {
399515
400073
  init_v4();
399516
400074
  init_manager();
@@ -399526,7 +400084,7 @@ var init_LSPTool = __esm(() => {
399526
400084
  init_formatters();
399527
400085
  init_schemas5();
399528
400086
  init_UI19();
399529
- inputSchema33 = lazySchema(() => exports_external.strictObject({
400087
+ inputSchema34 = lazySchema(() => exports_external.strictObject({
399530
400088
  operation: exports_external.enum([
399531
400089
  "goToDefinition",
399532
400090
  "findReferences",
@@ -399542,7 +400100,7 @@ var init_LSPTool = __esm(() => {
399542
400100
  line: exports_external.number().int().positive().describe("The line number (1-based, as shown in editors)"),
399543
400101
  character: exports_external.number().int().positive().describe("The character offset (1-based, as shown in editors)")
399544
400102
  }));
399545
- outputSchema28 = lazySchema(() => exports_external.object({
400103
+ outputSchema29 = lazySchema(() => exports_external.object({
399546
400104
  operation: exports_external.enum([
399547
400105
  "goToDefinition",
399548
400106
  "findReferences",
@@ -399565,7 +400123,7 @@ var init_LSPTool = __esm(() => {
399565
400123
  maxResultSizeChars: 1e5,
399566
400124
  isLsp: true,
399567
400125
  async description() {
399568
- return DESCRIPTION12;
400126
+ return DESCRIPTION13;
399569
400127
  },
399570
400128
  userFacingName: userFacingName6,
399571
400129
  shouldDefer: true,
@@ -399573,10 +400131,10 @@ var init_LSPTool = __esm(() => {
399573
400131
  return isLspConnected();
399574
400132
  },
399575
400133
  get inputSchema() {
399576
- return inputSchema33();
400134
+ return inputSchema34();
399577
400135
  },
399578
400136
  get outputSchema() {
399579
- return outputSchema28();
400137
+ return outputSchema29();
399580
400138
  },
399581
400139
  isConcurrencySafe() {
399582
400140
  return true;
@@ -399634,7 +400192,7 @@ var init_LSPTool = __esm(() => {
399634
400192
  return checkReadPermissionForTool(LSPTool, input, appState.toolPermissionContext);
399635
400193
  },
399636
400194
  async prompt() {
399637
- return DESCRIPTION12;
400195
+ return DESCRIPTION13;
399638
400196
  },
399639
400197
  renderToolUseMessage: renderToolUseMessage20,
399640
400198
  renderToolUseErrorMessage: renderToolUseErrorMessage10,
@@ -399954,7 +400512,7 @@ function getEnterPlanModeToolPrompt() {
399954
400512
  return process.env.USER_TYPE === "ant" ? getEnterPlanModeToolPromptAnt() : getEnterPlanModeToolPromptExternal();
399955
400513
  }
399956
400514
  var WHAT_HAPPENS_SECTION;
399957
- var init_prompt17 = __esm(() => {
400515
+ var init_prompt18 = __esm(() => {
399958
400516
  init_planModeV2();
399959
400517
  init_prompt();
399960
400518
  WHAT_HAPPENS_SECTION = `## What Happens in Plan Mode
@@ -399965,8 +400523,8 @@ In plan mode, you'll:
399965
400523
  3. Design an implementation approach
399966
400524
  4. Present your plan to the user for approval
399967
400525
  5. Use ${ASK_USER_QUESTION_TOOL_NAME} if you need to clarify approaches
399968
- 6. Create the visible implementation tasks with TaskCreate when that tool is available; updating a plan is not a substitute for the task list
399969
- 7. Exit plan mode with ExitPlanMode when ready to implement
400526
+ 6. Use TaskCreate for manual task decomposition when useful; plan-file writes are allowed while planning
400527
+ 7. Exit plan mode with ExitPlanMode when ready. After approval, ExitPlanMode guarantees that visible implementation tasks exist before coding begins
399970
400528
 
399971
400529
  `;
399972
400530
  });
@@ -400026,7 +400584,7 @@ var init_UI20 = __esm(() => {
400026
400584
  });
400027
400585
 
400028
400586
  // src/tools/EnterPlanModeTool/EnterPlanModeTool.ts
400029
- var inputSchema34, outputSchema29, EnterPlanModeTool;
400587
+ var inputSchema35, outputSchema30, EnterPlanModeTool;
400030
400588
  var init_EnterPlanModeTool = __esm(() => {
400031
400589
  init_v4();
400032
400590
  init_state();
@@ -400034,10 +400592,10 @@ var init_EnterPlanModeTool = __esm(() => {
400034
400592
  init_PermissionUpdate();
400035
400593
  init_permissionSetup();
400036
400594
  init_planModeV2();
400037
- init_prompt17();
400595
+ init_prompt18();
400038
400596
  init_UI20();
400039
- inputSchema34 = lazySchema(() => exports_external.strictObject({}));
400040
- outputSchema29 = lazySchema(() => exports_external.object({
400597
+ inputSchema35 = lazySchema(() => exports_external.strictObject({}));
400598
+ outputSchema30 = lazySchema(() => exports_external.object({
400041
400599
  message: exports_external.string().describe("Confirmation that plan mode was entered")
400042
400600
  }));
400043
400601
  EnterPlanModeTool = buildTool({
@@ -400051,10 +400609,10 @@ var init_EnterPlanModeTool = __esm(() => {
400051
400609
  return getEnterPlanModeToolPrompt();
400052
400610
  },
400053
400611
  get inputSchema() {
400054
- return inputSchema34();
400612
+ return inputSchema35();
400055
400613
  },
400056
400614
  get outputSchema() {
400057
- return outputSchema29();
400615
+ return outputSchema30();
400058
400616
  },
400059
400617
  userFacingName() {
400060
400618
  return "";
@@ -400085,7 +400643,7 @@ var init_EnterPlanModeTool = __esm(() => {
400085
400643
  }));
400086
400644
  return {
400087
400645
  data: {
400088
- message: "Entered plan mode. Explore the codebase, design the approach, and create the visible implementation tasks with TaskCreate before attempting any workspace changes."
400646
+ message: "Entered plan mode. Explore the codebase and write the plan file. TaskCreate remains available for manual decomposition; after approval, ExitPlanMode guarantees visible implementation tasks before coding begins."
400089
400647
  }
400090
400648
  };
400091
400649
  },
@@ -400100,8 +400658,8 @@ In plan mode, you should:
400100
400658
  3. Consider multiple approaches and their trade-offs
400101
400659
  4. Use AskUserQuestion if you need to clarify the approach
400102
400660
  5. Design a concrete implementation strategy
400103
- 6. If TaskCreate is available, create the visible implementation tasks before ExitPlanMode; updating a plan does not create the task list
400104
- 7. When ready, use ExitPlanMode to present your plan for approval
400661
+ 6. If useful, use TaskCreate to decompose the work manually; plan-file writes remain allowed while planning
400662
+ 7. When ready, use ExitPlanMode to present your plan for approval. After approval, it guarantees visible implementation tasks before coding begins
400105
400663
 
400106
400664
  Remember: DO NOT write or edit any files yet. This is a read-only exploration and planning phase.`;
400107
400665
  return {
@@ -400209,7 +400767,7 @@ var init_UI21 = __esm(() => {
400209
400767
  });
400210
400768
 
400211
400769
  // src/tools/EnterWorktreeTool/EnterWorktreeTool.ts
400212
- var inputSchema35, outputSchema30, EnterWorktreeTool;
400770
+ var inputSchema36, outputSchema31, EnterWorktreeTool;
400213
400771
  var init_EnterWorktreeTool = __esm(() => {
400214
400772
  init_v4();
400215
400773
  init_state();
@@ -400224,7 +400782,7 @@ var init_EnterWorktreeTool = __esm(() => {
400224
400782
  init_sessionStorage();
400225
400783
  init_worktree3();
400226
400784
  init_UI21();
400227
- inputSchema35 = lazySchema(() => exports_external.strictObject({
400785
+ inputSchema36 = lazySchema(() => exports_external.strictObject({
400228
400786
  name: exports_external.string().superRefine((s, ctx) => {
400229
400787
  try {
400230
400788
  validateWorktreeSlug(s);
@@ -400233,7 +400791,7 @@ var init_EnterWorktreeTool = __esm(() => {
400233
400791
  }
400234
400792
  }).optional().describe('Optional name for the worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided.')
400235
400793
  }));
400236
- outputSchema30 = lazySchema(() => exports_external.object({
400794
+ outputSchema31 = lazySchema(() => exports_external.object({
400237
400795
  worktreePath: exports_external.string(),
400238
400796
  worktreeBranch: exports_external.string().optional(),
400239
400797
  message: exports_external.string()
@@ -400249,10 +400807,10 @@ var init_EnterWorktreeTool = __esm(() => {
400249
400807
  return getEnterWorktreeToolPrompt();
400250
400808
  },
400251
400809
  get inputSchema() {
400252
- return inputSchema35();
400810
+ return inputSchema36();
400253
400811
  },
400254
400812
  get outputSchema() {
400255
- return outputSchema30();
400813
+ return outputSchema31();
400256
400814
  },
400257
400815
  userFacingName() {
400258
400816
  return "Creating worktree";
@@ -400419,7 +400977,7 @@ function restoreSessionToOriginalCwd(originalCwd, projectRootIsWorktree) {
400419
400977
  clearMemoryFileCaches();
400420
400978
  getPlansDirectory.cache.clear?.();
400421
400979
  }
400422
- var inputSchema36, outputSchema31, ExitWorktreeTool;
400980
+ var inputSchema37, outputSchema32, ExitWorktreeTool;
400423
400981
  var init_ExitWorktreeTool = __esm(() => {
400424
400982
  init_v4();
400425
400983
  init_state();
@@ -400434,11 +400992,11 @@ var init_ExitWorktreeTool = __esm(() => {
400434
400992
  init_sessionStorage();
400435
400993
  init_worktree3();
400436
400994
  init_UI22();
400437
- inputSchema36 = lazySchema(() => exports_external.strictObject({
400995
+ inputSchema37 = lazySchema(() => exports_external.strictObject({
400438
400996
  action: exports_external.enum(["keep", "remove"]).describe('"keep" leaves the worktree and branch on disk; "remove" deletes both.'),
400439
400997
  discard_changes: exports_external.boolean().optional().describe('Required true when action is "remove" and the worktree has uncommitted files or unmerged commits. The tool will refuse and list them otherwise.')
400440
400998
  }));
400441
- outputSchema31 = lazySchema(() => exports_external.object({
400999
+ outputSchema32 = lazySchema(() => exports_external.object({
400442
401000
  action: exports_external.enum(["keep", "remove"]),
400443
401001
  originalCwd: exports_external.string(),
400444
401002
  worktreePath: exports_external.string(),
@@ -400459,10 +401017,10 @@ var init_ExitWorktreeTool = __esm(() => {
400459
401017
  return getExitWorktreeToolPrompt();
400460
401018
  },
400461
401019
  get inputSchema() {
400462
- return inputSchema36();
401020
+ return inputSchema37();
400463
401021
  },
400464
401022
  get outputSchema() {
400465
- return outputSchema31();
401023
+ return outputSchema32();
400466
401024
  },
400467
401025
  userFacingName() {
400468
401026
  return "Exiting worktree";
@@ -401365,8 +401923,8 @@ ${lines.join(`
401365
401923
  - model - Override the default model (modelS, modelO, modelH, best, or full model ID)`;
401366
401924
  }
401367
401925
  }
401368
- var DESCRIPTION13 = "Get or set UR configuration settings.";
401369
- var init_prompt18 = __esm(() => {
401926
+ var DESCRIPTION14 = "Get or set UR configuration settings.";
401927
+ var init_prompt19 = __esm(() => {
401370
401928
  init_modelOptions();
401371
401929
  init_voiceModeEnabled();
401372
401930
  init_supportedSettings();
@@ -402071,7 +402629,7 @@ function buildNestedObject(path18, value) {
402071
402629
  }
402072
402630
  return { [key]: buildNestedObject(path18.slice(1), value) };
402073
402631
  }
402074
- var inputSchema37, outputSchema32, ConfigTool;
402632
+ var inputSchema38, outputSchema33, ConfigTool;
402075
402633
  var init_ConfigTool = __esm(() => {
402076
402634
  init_v4();
402077
402635
  init_analytics();
@@ -402081,14 +402639,14 @@ var init_ConfigTool = __esm(() => {
402081
402639
  init_log2();
402082
402640
  init_settings2();
402083
402641
  init_slowOperations();
402084
- init_prompt18();
402642
+ init_prompt19();
402085
402643
  init_supportedSettings();
402086
402644
  init_UI23();
402087
- inputSchema37 = lazySchema(() => exports_external.strictObject({
402645
+ inputSchema38 = lazySchema(() => exports_external.strictObject({
402088
402646
  setting: exports_external.string().describe('The setting key (e.g., "theme", "model", "permissions.defaultMode")'),
402089
402647
  value: exports_external.union([exports_external.string(), exports_external.boolean(), exports_external.number()]).optional().describe("The new value. Omit to get current value.")
402090
402648
  }));
402091
- outputSchema32 = lazySchema(() => exports_external.object({
402649
+ outputSchema33 = lazySchema(() => exports_external.object({
402092
402650
  success: exports_external.boolean(),
402093
402651
  operation: exports_external.enum(["get", "set"]).optional(),
402094
402652
  setting: exports_external.string().optional(),
@@ -402102,16 +402660,16 @@ var init_ConfigTool = __esm(() => {
402102
402660
  searchHint: "get or set UR settings (theme, model)",
402103
402661
  maxResultSizeChars: 1e5,
402104
402662
  async description() {
402105
- return DESCRIPTION13;
402663
+ return DESCRIPTION14;
402106
402664
  },
402107
402665
  async prompt() {
402108
402666
  return generatePrompt();
402109
402667
  },
402110
402668
  get inputSchema() {
402111
- return inputSchema37();
402669
+ return inputSchema38();
402112
402670
  },
402113
402671
  get outputSchema() {
402114
- return outputSchema32();
402672
+ return outputSchema33();
402115
402673
  },
402116
402674
  userFacingName() {
402117
402675
  return "Config";
@@ -402414,346 +402972,6 @@ var init_ConfigTool = __esm(() => {
402414
402972
  });
402415
402973
  });
402416
402974
 
402417
- // src/utils/taskListRunContext.ts
402418
- import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
402419
- import { randomUUID as randomUUID40 } from "crypto";
402420
- function runWithTaskListRun(run2, fn) {
402421
- return taskListRunStorage.run({ run: run2 }, fn);
402422
- }
402423
- function getTaskListRunContext() {
402424
- return taskListRunStorage.getStore()?.run;
402425
- }
402426
- function textFromQueuedCommand(command) {
402427
- if (command.preExpansionValue)
402428
- return command.preExpansionValue;
402429
- if (typeof command.value === "string")
402430
- return command.value;
402431
- return command.value.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
402432
- `);
402433
- }
402434
- function textFromMessage(message) {
402435
- const content = message.message?.content;
402436
- if (typeof content === "string")
402437
- return content;
402438
- if (!Array.isArray(content))
402439
- return "";
402440
- return content.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
402441
- `);
402442
- }
402443
- function requestsAppendToCurrentTaskList(input) {
402444
- const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
402445
- if (!normalized)
402446
- return false;
402447
- return /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized) || /\b(?:add|append|put|queue)\b.{0,100}\b(?:current|existing|active)\s+tasks\b/u.test(normalized) || /\b(?:add|append|put|queue)\s+(?:this|it)\s+(?:to|on)\s+(?:my|the|your)\s+(?:current\s+)?(?:task\s+)?list\b/u.test(normalized) || /\b(?:current|existing|active|same)\s+(?:task\s+)?list\b.{0,100}\b(?:add|append|put|queue)\b/u.test(normalized) || /\b(?:keep|continue|use)\b.{0,100}\b(?:current|existing|active|same)\s+(?:task\s+)?list\b/u.test(normalized);
402448
- }
402449
- function requestsContinueCurrentTaskList(input) {
402450
- const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase().replace(/[.!?]+$/gu, "").trim();
402451
- if (!normalized || normalized.length > 80)
402452
- return false;
402453
- return /^(?:ok(?:ay)?|yes|yep|yup|sure|approved|i approve|looks good|sounds good)$/u.test(normalized) || /^(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized) || /^(?:ok(?:ay)?|yes|sure|approved|i approve)[, ]+(?:please\s+)?(?:continue|proceed|go ahead|carry on|do it|start(?: now)?|begin implementation|start implementation)$/u.test(normalized);
402454
- }
402455
- function requestsRevisionOfCurrentTaskList(input) {
402456
- const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
402457
- if (!normalized || normalized.length > 500)
402458
- return false;
402459
- return /^(?:no|also|and|but|actually|instead|still|again|not yet|(?:it|this|that)\s+still)\b/u.test(normalized) || /\b(?:why did (?:you|u)|i (?:said|asked|meant)|you (?:removed|deleted|changed|forgot|missed))\b/u.test(normalized) || /^(?:please\s+)?(?:fix|change|update|restore|keep|remove|add)\s+(?:it|that|this)\b/u.test(normalized) || /^(?:please\s+)?(?:do not|don't)\s+(?:remove|delete|change|replace|forget)\b/u.test(normalized);
402460
- }
402461
- function shouldKeepCurrentTaskList(input) {
402462
- return requestsAppendToCurrentTaskList(input) || requestsContinueCurrentTaskList(input) || requestsRevisionOfCurrentTaskList(input);
402463
- }
402464
- function withoutCode(input) {
402465
- return input.replace(/```[\s\S]*?```/gu, " ").replace(/`[^`\n]*`/gu, " ");
402466
- }
402467
- function proseOnly(input) {
402468
- return withoutCode(input).replace(/\s+/gu, " ").trim();
402469
- }
402470
- function taskListRequirementReason(input) {
402471
- const text2 = proseOnly(input);
402472
- if (!text2)
402473
- return;
402474
- const optsOut = /\b(?:do not|don't)\s+(?:(?:create|make|maintain|show|start|use)\s+)?(?:a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2) || /\bwithout\s+(?:(?:creating|making|maintaining|showing|starting|using)\s+)?(?:a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2) || /\b(?:skip|no)\s+(?:the\s+|a\s+)?(?:task|todo)(?:\s+(?:list|board))?\b/iu.test(text2);
402475
- if (optsOut)
402476
- return;
402477
- if (/\b(?:create|make|maintain|show|start|use|keep|track|add|append|put|queue)\b[^.!?]{0,100}\b(?:task|todo)\s+(?:list|board)\b/iu.test(text2) || /\b(?:add|append|put|queue)\s+(?:this|it)?\s*(?:to|on)?\s*(?:my|the|your)?\s*(?:tasks?|todos?)\b/iu.test(text2) || /\b(?:add|append|put|queue)\s+(?:this|it)\s+(?:to|on)\s+(?:the\s+|your\s+|my\s+)?(?:current|existing)\s+list\b/iu.test(text2) || /\b(?:create|make|use|track)\s+(?:the\s+|a\s+|your\s+)?(?:tasks?|todos?)\b/iu.test(text2) || /\b(?:tasks?|todos?)\s+first\b/iu.test(text2)) {
402478
- return "explicit task tracking request";
402479
- }
402480
- if (/^\/plan(?:\s|$)/iu.test(text2) || /\b(?:enter|start|use|switch\s+to)\s+plan\s+mode\b/iu.test(text2) || /\bplan\s+(?:this|the\s+work|first)\b/iu.test(text2)) {
402481
- return "planning workflow";
402482
- }
402483
- if (/\b(?:delegate|delegation|sub[ -]?agents?|parallel\s+agents?|agent\s+team|team\s+of\s+agents?|fan[ -]?out)\b/iu.test(text2)) {
402484
- return "delegation or parallel agent work";
402485
- }
402486
- const hasAction = new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(text2);
402487
- if (hasAction && /\b(?:publish|release|deploy|production|migrat(?:e|ion)|database\s+schema|credentials?|secrets?|permissions?|sandbox|security|authentication|authorization|payments?|billing|version\s+bump|git\s+tag)\b/iu.test(text2)) {
402488
- return "release, security, migration, or production risk";
402489
- }
402490
- const structuralText = withoutCode(input);
402491
- const enumeratedItems = structuralText.match(/(?:^|\n)\s*(?:[-*+]\s+|\d+[.)]\s+)\S/gu);
402492
- const actionLines = structuralText.split(/\r?\n/gu).filter((line) => new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(line));
402493
- if ((enumeratedItems?.length ?? 0) >= 2 || actionLines.length >= 2 || SEQUENCED_ACTION_RE.test(text2)) {
402494
- return "multiple requested outcomes";
402495
- }
402496
- const targetList = new RegExp(String.raw`\b${ACTION_WORD}\b[^.!?]{0,120}\b(?:docs?|tests?|code|implementation|configuration|config|workflow|release notes?|technical docs?|readme|ui|api|cli|database|schema|sandbox|permissions?)\b[^.!?]{0,80}(?:,|\band\b|\bplus\b)[^.!?]{0,80}\b(?:docs?|tests?|code|implementation|configuration|config|workflow|release notes?|technical docs?|readme|ui|api|cli|database|schema|sandbox|permissions?)\b`, "iu");
402497
- if (targetList.test(text2))
402498
- return "multiple requested outcomes";
402499
- const projectScope = /\b(?:app|application|agent|system|platform|website|dashboard|service|integration|workflow|codebase|project|plugin|extension|3d\s+(?:scene|design|pipeline))\b/iu;
402500
- const projectAction = /\b(?:build(?:ing|s)?|built|creat(?:e|ed|es|ing)|design(?:ed|ing|s)?|implement(?:ed|ing|s)?|integrat(?:e|ed|es|ing)|refactor(?:ed|ing|s)?|rewrit(?:e|ing|ten)|overhaul(?:ed|ing|s)?|audit(?:ed|ing|s)?|research(?:ed|es|ing)?)\b/iu;
402501
- if (projectScope.test(text2) && projectAction.test(text2)) {
402502
- return "large project scope";
402503
- }
402504
- ACTION_RE.lastIndex = 0;
402505
- if (text2.length >= 600 && ACTION_RE.test(text2)) {
402506
- return "detailed multi-step request";
402507
- }
402508
- return;
402509
- }
402510
- function getTaskListRunForCommand(command, options2 = {}) {
402511
- if (!command || command.mode !== "prompt" || command.isMeta)
402512
- return;
402513
- const text2 = textFromQueuedCommand(command);
402514
- if (!options2.allowSlashCommand && !command.skipSlashCommands && text2.trimStart().startsWith("/")) {
402515
- return;
402516
- }
402517
- const requirementReason = taskListRequirementReason(text2);
402518
- return {
402519
- generationId: String(command.uuid ?? randomUUID40()),
402520
- appendToCurrent: shouldKeepCurrentTaskList(text2),
402521
- requiresTaskList: requirementReason !== undefined,
402522
- ...requirementReason ? { requirementReason } : {}
402523
- };
402524
- }
402525
- function getTaskListRunFromMessages(messages) {
402526
- const message = messages.findLast(isHumanTurn);
402527
- if (!message || typeof message.uuid !== "string" || !message.uuid) {
402528
- return;
402529
- }
402530
- const text2 = textFromMessage(message);
402531
- const requirementReason = taskListRequirementReason(text2);
402532
- return {
402533
- generationId: message.uuid,
402534
- appendToCurrent: shouldKeepCurrentTaskList(text2),
402535
- requiresTaskList: requirementReason !== undefined,
402536
- ...requirementReason ? { requirementReason } : {}
402537
- };
402538
- }
402539
- var taskListRunStorage, ACTION_WORD, ACTION_RE, SEQUENCED_ACTION_RE;
402540
- var init_taskListRunContext = __esm(() => {
402541
- taskListRunStorage = new AsyncLocalStorage5;
402542
- ACTION_WORD = String.raw`(?:add(?:ed|ing|s)?|audit(?:ed|ing|s)?|build(?:ing|s)?|built|bump(?:ed|ing|s)?|chang(?:e|ed|es|ing)|clean(?:ed|ing|s)?|creat(?:e|ed|es|ing)|debug(?:ged|ging|s)?|delet(?:e|ed|es|ing)|deploy(?:ed|ing|s)?|design(?:ed|ing|s)?|document(?:ed|ing|s)?|fix(?:ed|es|ing)?|implement(?:ed|ing|s)?|integrat(?:e|ed|es|ing)|migrat(?:e|ed|es|ing)|publish(?:ed|es|ing)?|push(?:ed|es|ing)?|refactor(?:ed|ing|s)?|releas(?:e|ed|es|ing)|remov(?:e|ed|es|ing)|renam(?:e|ed|es|ing)|repair(?:ed|ing|s)?|research(?:ed|es|ing)?|review(?:ed|ing|s)?|secur(?:e|ed|es|ing)|test(?:ed|ing|s)?|updat(?:e|ed|es|ing)|upgrad(?:e|ed|es|ing)|verif(?:y|ied|ies|ying)|writ(?:e|es|ing)|wrote)`;
402543
- ACTION_RE = new RegExp(String.raw`\b${ACTION_WORD}\b`, "giu");
402544
- SEQUENCED_ACTION_RE = new RegExp(String.raw`\b${ACTION_WORD}\b[^.!?\n]{0,180}(?:\band\b|\bthen\b|\balso\b|\bplus\b|;|\n)[^.!?\n]{0,100}\b${ACTION_WORD}\b`, "iu");
402545
- });
402546
-
402547
- // src/tools/TaskCreateTool/prompt.ts
402548
- function getPrompt4() {
402549
- const teammateContext = isAgentSwarmsEnabled() ? " and potentially assigned to teammates" : "";
402550
- const teammateTips = isAgentSwarmsEnabled() ? `- Include enough detail in the description for another agent to understand and complete the task
402551
- - New tasks are created with status 'pending' and no owner - use TaskUpdate with the \`owner\` parameter to assign them
402552
- ` : "";
402553
- return `Use this tool to create a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
402554
- It also helps the user understand the progress of the task and overall progress of their requests.
402555
-
402556
- ## When to Use This Tool
402557
-
402558
- Use this tool proactively in these scenarios:
402559
-
402560
- - Multi-outcome work - When a request has 2 or more distinct requested outcomes, deliverables, or sequenced actions
402561
- - Non-trivial and complex tasks - Tasks that require careful planning or multiple operations${teammateContext}
402562
- - Multiple independently verifiable outcomes, dependency ordering, delegation, or parallel work
402563
- - High-risk lifecycle work - Releases, publishing, deployment, migrations, security, credentials, permissions, sandboxing, or production changes
402564
- - Project-sized builds, integrations, workflows, refactors, and audits
402565
- - Plan mode - When using plan mode, create a task list to track the work
402566
- - User explicitly requests todo list - When the user directly asks you to use the todo list
402567
- - User asks to queue work - When the user says "add to your tasks", "add this to your task list", "put this on the list", "queue this up", or anything similar, IMMEDIATELY call this tool with that request \u2014 even if you are in the middle of other work and even if the item sounds small. The user is watching the live task panel and expects the item to appear there right away. Acknowledge briefly and continue what you were doing unless asked to switch.
402568
- - User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
402569
- - When new instructions materially change multi-step work - update the plan before continuing
402570
-
402571
- ## When NOT to Use This Tool
402572
-
402573
- Skip using this tool when:
402574
- - The task is purely conversational or informational
402575
- - The request is one genuinely atomic, low-risk action with one outcome that can be completed and verified directly
402576
- - The user sends a short acknowledgement, correction, or clarification that does not add a distinct outcome to an existing board
402577
-
402578
- Do not create a task merely because a user sent a message or because the request is actionable. Task subjects must describe concrete outcomes chosen after understanding the work; never copy the raw prompt into a task title.
402579
-
402580
- EXCEPTION: none of the "skip" rules apply when the user explicitly asks for an item to be added to the task list ("add to your tasks \u2026"). An explicit request always wins \u2014 create the task.
402581
-
402582
- ## Task Fields
402583
-
402584
- - **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
402585
- - **description**: What needs to be done
402586
- - **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., "Fixing authentication bug"). If omitted, the spinner shows the subject instead.
402587
- - **blocks** / **addBlocks** (optional): Existing task IDs this task blocks
402588
- - **blockedBy** / **addBlockedBy** (optional): Existing task IDs that block this task
402589
- - **addToCurrentList** (optional): Set to \`true\` when the user explicitly asks to append to the current/existing task list. A new prompt archives the previous list only when it has no pending or in-progress work; an interruption preserves active work for reconciliation.
402590
-
402591
- All tasks are created with status \`pending\`.
402592
-
402593
- ## Tips
402594
-
402595
- - Create tasks with clear, specific subjects that describe the outcome
402596
- - Never guess task IDs or reference a task that has not been created yet. For a multi-task plan, create tasks without forward edges, wait for their real IDs, then use TaskUpdate to add dependency edges.
402597
- - A task can depend only on an existing different task; never add a self-dependency.
402598
- ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
402599
- - Use TaskUpdate, not TaskCreate, for status or ownership changes
402600
- - After an interruption, call TaskList, keep relevant active work, update the affected task, add a task only for a genuinely distinct new outcome, and mark superseded work skipped
402601
- - Do not set \`addToCurrentList\` merely because earlier tasks exist; runtime already preserves interrupted work, while this flag is reserved for explicit user intent such as "add this to the current list"
402602
- `;
402603
- }
402604
- var DESCRIPTION14 = "Create a new task in the task list";
402605
- var init_prompt19 = __esm(() => {
402606
- init_agentSwarmsEnabled();
402607
- });
402608
-
402609
- // src/tools/TaskCreateTool/TaskCreateTool.ts
402610
- var inputSchema38, outputSchema33, TaskCreateTool;
402611
- var init_TaskCreateTool = __esm(() => {
402612
- init_v4();
402613
- init_Tool();
402614
- init_hooks5();
402615
- init_tasks();
402616
- init_taskListRunContext();
402617
- init_teammate();
402618
- init_prompt19();
402619
- inputSchema38 = lazySchema(() => exports_external.strictObject({
402620
- subject: exports_external.string().describe("A brief title for the task"),
402621
- description: exports_external.string().describe("What needs to be done"),
402622
- activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
402623
- metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task"),
402624
- blocks: exports_external.array(exports_external.string()).optional().describe("Task IDs that this task blocks at creation time"),
402625
- blockedBy: exports_external.array(exports_external.string()).optional().describe("Task IDs that block this task at creation time"),
402626
- addBlocks: exports_external.array(exports_external.string()).optional().describe("Alias for blocks, accepted for compatibility with TaskUpdate"),
402627
- addBlockedBy: exports_external.array(exports_external.string()).optional().describe("Alias for blockedBy, accepted for compatibility with TaskUpdate"),
402628
- addToCurrentList: exports_external.boolean().optional().describe("Set true only when the user explicitly asks to append to the current task list")
402629
- }));
402630
- outputSchema33 = lazySchema(() => exports_external.object({
402631
- task: exports_external.object({
402632
- id: exports_external.string(),
402633
- subject: exports_external.string()
402634
- })
402635
- }));
402636
- TaskCreateTool = buildTool({
402637
- name: TASK_CREATE_TOOL_NAME,
402638
- searchHint: "create a task in the task list",
402639
- maxResultSizeChars: 1e5,
402640
- async description() {
402641
- return DESCRIPTION14;
402642
- },
402643
- async prompt() {
402644
- return getPrompt4();
402645
- },
402646
- get inputSchema() {
402647
- return inputSchema38();
402648
- },
402649
- get outputSchema() {
402650
- return outputSchema33();
402651
- },
402652
- userFacingName() {
402653
- return "TaskCreate";
402654
- },
402655
- shouldDefer: false,
402656
- isEnabled() {
402657
- return isTodoV2Enabled();
402658
- },
402659
- isConcurrencySafe() {
402660
- return false;
402661
- },
402662
- toAutoClassifierInput(input) {
402663
- return input.subject;
402664
- },
402665
- renderToolUseMessage() {
402666
- return null;
402667
- },
402668
- async call({
402669
- subject,
402670
- description,
402671
- activeForm,
402672
- metadata,
402673
- blocks,
402674
- blockedBy,
402675
- addBlocks,
402676
- addBlockedBy,
402677
- addToCurrentList
402678
- }, context5) {
402679
- const initialBlocks = [...new Set([...blocks ?? [], ...addBlocks ?? []])];
402680
- const initialBlockedBy = [
402681
- ...new Set([...blockedBy ?? [], ...addBlockedBy ?? []])
402682
- ];
402683
- const taskListId = getTaskListId();
402684
- const run2 = getTaskListRunContext() ?? (context5.agentId ? undefined : getTaskListRunFromMessages(context5.messages ?? []));
402685
- const taskData = {
402686
- subject,
402687
- description,
402688
- activeForm,
402689
- status: "pending",
402690
- owner: undefined,
402691
- blocks: [],
402692
- blockedBy: [],
402693
- metadata
402694
- };
402695
- const taskId = run2 ? await createTaskForRun(taskListId, run2.generationId, taskData, {
402696
- appendToCurrent: run2.appendToCurrent || addToCurrentList === true
402697
- }) : await createTask(taskListId, taskData);
402698
- const dependencies = [
402699
- ...initialBlocks.map((targetId) => ({
402700
- fromTaskId: taskId,
402701
- toTaskId: targetId,
402702
- field: "blocks"
402703
- })),
402704
- ...initialBlockedBy.map((blockerId) => ({
402705
- fromTaskId: blockerId,
402706
- toTaskId: taskId,
402707
- field: "blockedBy"
402708
- }))
402709
- ].filter((edge) => edge.fromTaskId !== edge.toTaskId);
402710
- const dependencyResult = await updateTaskWithDependencies(taskListId, taskId, {}, dependencies);
402711
- if (dependencyResult.success === false) {
402712
- const dependency = dependencyResult.dependency;
402713
- await deleteTask(taskListId, taskId);
402714
- if (dependency) {
402715
- const field = dependencies.find((candidate) => candidate.fromTaskId === dependency.fromTaskId && candidate.toTaskId === dependency.toTaskId)?.field ?? "dependency";
402716
- throw new Error(`Invalid ${field} dependency ` + `#${dependency.fromTaskId} -> #${dependency.toTaskId}: ` + dependencyResult.reason);
402717
- }
402718
- throw new Error(`Failed to create task dependencies: ${dependencyResult.reason}`);
402719
- }
402720
- const blockingErrors = [];
402721
- const generator = executeTaskCreatedHooks(taskId, subject, description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
402722
- for await (const result of generator) {
402723
- if (result.blockingError) {
402724
- blockingErrors.push(getTaskCreatedHookMessage(result.blockingError));
402725
- }
402726
- }
402727
- if (blockingErrors.length > 0) {
402728
- await deleteTask(taskListId, taskId);
402729
- throw new Error(blockingErrors.join(`
402730
- `));
402731
- }
402732
- context5.setAppState((prev) => {
402733
- if (prev.expandedView === "tasks")
402734
- return prev;
402735
- return { ...prev, expandedView: "tasks" };
402736
- });
402737
- return {
402738
- data: {
402739
- task: {
402740
- id: taskId,
402741
- subject
402742
- }
402743
- }
402744
- };
402745
- },
402746
- mapToolResultToToolResultBlockParam(content, toolUseID) {
402747
- const { task } = content;
402748
- return {
402749
- tool_use_id: toolUseID,
402750
- type: "tool_result",
402751
- content: `Task #${task.id} created successfully: ${task.subject}`
402752
- };
402753
- }
402754
- });
402755
- });
402756
-
402757
402975
  // src/tools/TaskGetTool/prompt.ts
402758
402976
  var DESCRIPTION15 = "Get a task by ID from the task list", PROMPT6 = `Use this tool to retrieve a task by its ID from the task list.
402759
402977
 
@@ -412803,7 +413021,7 @@ function isAnyTracingEnabled() {
412803
413021
  return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
412804
413022
  }
412805
413023
  function getTracer() {
412806
- return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.4");
413024
+ return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.5");
412807
413025
  }
412808
413026
  function createSpanAttributes(spanType, customAttributes = {}) {
412809
413027
  const baseAttributes = getTelemetryAttributes();
@@ -413461,99 +413679,6 @@ var init_toolErrors = __esm(() => {
413461
413679
  init_messages();
413462
413680
  });
413463
413681
 
413464
- // src/services/tools/taskListGate.ts
413465
- function getTaskListGateConfig() {
413466
- const configured = getInitialSettings()?.tasks?.requireBeforeChanges;
413467
- if (!configured)
413468
- return TASK_LIST_GATE_DEFAULTS;
413469
- return {
413470
- enabled: typeof configured.enabled === "boolean" ? configured.enabled : TASK_LIST_GATE_DEFAULTS.enabled,
413471
- freeReads: typeof configured.freeReads === "number" && Number.isInteger(configured.freeReads) && configured.freeReads >= 0 ? configured.freeReads : TASK_LIST_GATE_DEFAULTS.freeReads
413472
- };
413473
- }
413474
- function isMutatingTool2(toolName) {
413475
- return !GATE_EXEMPT_TOOLS.has(toolName) && KNOWN_MUTATING_TOOLS.has(toolName);
413476
- }
413477
- function isTaskListGateExempt(toolName) {
413478
- return GATE_EXEMPT_TOOLS.has(toolName);
413479
- }
413480
- function countActionableTasksForGate(tasks) {
413481
- return tasks.filter((task) => !task.metadata?._internal && !isAutomaticPromptTask(task) && (task.status === "pending" || task.status === "in_progress")).length;
413482
- }
413483
- function checkTaskListGate(input) {
413484
- const config3 = input.config ?? getTaskListGateConfig();
413485
- if (!config3.enabled)
413486
- return { allowed: true };
413487
- if (input.taskListWriterAvailable === false)
413488
- return { allowed: true };
413489
- if (isTaskListGateExempt(input.toolName))
413490
- return { allowed: true };
413491
- const isMutating = input.isMutating ?? isMutatingTool2(input.toolName);
413492
- if (!isMutating)
413493
- return { allowed: true };
413494
- if (input.taskCount !== null && input.taskCount > 0) {
413495
- return { allowed: true };
413496
- }
413497
- const inherentlyRequiresTaskList = input.isSubagent || ALWAYS_REQUIRE_PLAN_TOOLS.has(input.toolName);
413498
- const classifiedRequirement = input.requiresTaskList === true;
413499
- const forceEveryMutation = config3.freeReads === 0;
413500
- const unclassifiedAllowanceExpired = input.requiresTaskList === undefined && input.readsSoFar >= config3.freeReads;
413501
- const gateRequired = inherentlyRequiresTaskList || classifiedRequirement || forceEveryMutation || unclassifiedAllowanceExpired;
413502
- const requirementContext = input.requirementReason ? ` This turn requires task tracking because it contains ${input.requirementReason}.` : "";
413503
- const planningRecovery = input.requirementReason === "planning workflow" ? " EnterPlanMode and plan updates do not create the visible task list." : "";
413504
- if (input.taskCount === null) {
413505
- return {
413506
- allowed: false,
413507
- reason: `The task list could not be read, so ${input.toolName} was not allowed ` + `to change state without a verifiable plan.${requirementContext}${planningRecovery} Retry TaskList or ` + `TaskCreate, then retry this call. Disable with ` + `tasks.requireBeforeChanges.enabled=false in settings.`
413508
- };
413509
- }
413510
- if (!gateRequired)
413511
- return { allowed: true };
413512
- if (inherentlyRequiresTaskList) {
413513
- return {
413514
- allowed: false,
413515
- reason: `No actionable parent task exists for ${input.toolName}. Call ` + `TaskCreate before delegating or changing state, then retry this call. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
413516
- };
413517
- }
413518
- return {
413519
- allowed: false,
413520
- reason: `No task list exists, and ${input.toolName} changes the workspace. ` + `${requirementContext.trim()}${requirementContext ? " " : ""}` + `${planningRecovery.trim()}${planningRecovery ? " " : ""}` + `Call TaskCreate first with the steps you intend to take, then retry ` + `this call. Reads are unrestricted, so investigate as much as you need ` + `before writing the list. ` + `Disable with tasks.requireBeforeChanges.enabled=false in settings.`
413521
- };
413522
- }
413523
- var TASK_LIST_GATE_DEFAULTS, KNOWN_MUTATING_TOOLS, GATE_EXEMPT_TOOLS, ALWAYS_REQUIRE_PLAN_TOOLS;
413524
- var init_taskListGate = __esm(() => {
413525
- init_settings2();
413526
- init_tasks();
413527
- TASK_LIST_GATE_DEFAULTS = {
413528
- enabled: true,
413529
- freeReads: 3
413530
- };
413531
- KNOWN_MUTATING_TOOLS = new Set([
413532
- "Edit",
413533
- "MultiEdit",
413534
- "Write",
413535
- "NotebookEdit",
413536
- "Bash",
413537
- "Shell",
413538
- "PowerShell",
413539
- "Computer",
413540
- "Agent",
413541
- "Task",
413542
- "REPL"
413543
- ]);
413544
- GATE_EXEMPT_TOOLS = new Set([
413545
- "TaskCreate",
413546
- "TaskUpdate",
413547
- "TaskList",
413548
- "TaskGet",
413549
- "TodoWrite"
413550
- ]);
413551
- ALWAYS_REQUIRE_PLAN_TOOLS = new Set([
413552
- "Agent",
413553
- "Task"
413554
- ]);
413555
- });
413556
-
413557
413682
  // src/stability/types.ts
413558
413683
  var DEFAULT_LIMITS;
413559
413684
  var init_types12 = __esm(() => {
@@ -414338,6 +414463,19 @@ async function countTasksForGate() {
414338
414463
  return null;
414339
414464
  }
414340
414465
  }
414466
+ function isCurrentPlanFileMutation(toolName, input, context5) {
414467
+ if (context5.getAppState().toolPermissionContext.mode !== "plan" || toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME || !input || typeof input !== "object" || Array.isArray(input)) {
414468
+ return false;
414469
+ }
414470
+ const filePath = input.file_path;
414471
+ if (typeof filePath !== "string")
414472
+ return false;
414473
+ try {
414474
+ return expandPath(filePath) === expandPath(getPlanFilePath(context5.agentId));
414475
+ } catch {
414476
+ return false;
414477
+ }
414478
+ }
414341
414479
  function getStopHookInfo(attachment) {
414342
414480
  if (typeof attachment !== "object" || attachment === null || !("command" in attachment) || typeof attachment.command !== "string" || !("durationMs" in attachment) || typeof attachment.durationMs !== "number") {
414343
414481
  return null;
@@ -414802,6 +414940,7 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
414802
414940
  isMutating,
414803
414941
  requiresTaskList: taskListRun?.requiresTaskList,
414804
414942
  requirementReason: taskListRun?.requirementReason,
414943
+ isPlanningArtifact: isCurrentPlanFileMutation(tool.name, parsedInput.data, toolUseContext),
414805
414944
  taskListWriterAvailable: toolUseContext.options.tools.some((candidate) => candidate.name === "TaskCreate")
414806
414945
  });
414807
414946
  if (gate.allowed === false) {
@@ -415162,6 +415301,7 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
415162
415301
  isMutating: finalIsMutating,
415163
415302
  requiresTaskList: taskListRun?.requiresTaskList,
415164
415303
  requirementReason: taskListRun?.requirementReason,
415304
+ isPlanningArtifact: isCurrentPlanFileMutation(tool.name, finalParsedInput.data, toolUseContext),
415165
415305
  taskListWriterAvailable: toolUseContext.options.tools.some((candidate) => candidate.name === "TaskCreate")
415166
415306
  });
415167
415307
  if (finalGate.allowed === false) {
@@ -415596,6 +415736,8 @@ var init_toolExecution = __esm(() => {
415596
415736
  init_messages();
415597
415737
  init_sessionActivity();
415598
415738
  init_slowOperations();
415739
+ init_plans();
415740
+ init_path();
415599
415741
  init_stream3();
415600
415742
  init_events();
415601
415743
  init_sessionTracing();
@@ -433261,7 +433403,7 @@ function getPlanModeV2Instructions(attachment) {
433261
433403
  const agentCount = getPlanModeV2AgentCount();
433262
433404
  const exploreAgentCount = getPlanModeV2ExploreAgentCount();
433263
433405
  const planFileInfo = attachment.planExists ? `A plan file already exists at ${attachment.planFilePath}. You can read it and make incremental edits using the ${FileEditTool.name} tool.` : `No plan file exists yet. You should create your plan at ${attachment.planFilePath} using the ${FileWriteTool.name} tool.`;
433264
- const content = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received.
433406
+ const content = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. TaskCreate, TaskUpdate, TaskList, and TaskGet are also allowed for visible task tracking. This supercedes any other instructions you have received.
433265
433407
 
433266
433408
  ## Plan File Info:
433267
433409
  ${planFileInfo}
@@ -433318,6 +433460,7 @@ ${getPlanPhase4Section()}
433318
433460
 
433319
433461
  ### Phase 5: Call ${ExitPlanModeV2Tool.name}
433320
433462
  At the very end of your turn, once you have asked the user questions and are happy with your final plan file - you should always call ${ExitPlanModeV2Tool.name} to indicate to the user that you are done planning.
433463
+ Plan-file writes do not require an existing task list. You may create semantic tasks manually with TaskCreate, but do not block on that: after user approval, ${ExitPlanModeV2Tool.name} guarantees visible implementation and verification tasks exist before coding starts.
433321
433464
  This is critical - your turn should only end with either using the ${ASK_USER_QUESTION_TOOL_NAME} tool OR calling ${ExitPlanModeV2Tool.name}. Do not stop unless it's for these 2 reasons
433322
433465
 
433323
433466
  **Important:** Use ${ASK_USER_QUESTION_TOOL_NAME} ONLY to clarify requirements or choose between approaches. Use ${ExitPlanModeV2Tool.name} to request plan approval. Do NOT ask about plan approval in any other way - no text questions, no AskUserQuestion. Phrases like "Is this plan okay?", "Should I proceed?", "How does this plan look?", "Any changes before we start?", or similar MUST use ${ExitPlanModeV2Tool.name}.
@@ -433335,7 +433478,7 @@ function getReadOnlyToolNames() {
433335
433478
  }
433336
433479
  function getPlanModeInterviewInstructions(attachment) {
433337
433480
  const planFileInfo = attachment.planExists ? `A plan file already exists at ${attachment.planFilePath}. You can read it and make incremental edits using the ${FileEditTool.name} tool.` : `No plan file exists yet. You should create your plan at ${attachment.planFilePath} using the ${FileWriteTool.name} tool.`;
433338
- const content = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received.
433481
+ const content = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. TaskCreate, TaskUpdate, TaskList, and TaskGet are also allowed for visible task tracking. This supercedes any other instructions you have received.
433339
433482
 
433340
433483
  ## Plan File Info:
433341
433484
  ${planFileInfo}
@@ -433374,7 +433517,7 @@ Your plan file should be divided into clear sections using markdown headers, bas
433374
433517
 
433375
433518
  ### When to Converge
433376
433519
 
433377
- Your plan is ready when you've addressed all ambiguities and it covers: what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the changes. Call ${ExitPlanModeV2Tool.name} when the plan is ready for approval.
433520
+ Your plan is ready when you've addressed all ambiguities and it covers: what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the changes. Plan-file writes do not require an existing task list. You may use TaskCreate for manual decomposition; after approval, ${ExitPlanModeV2Tool.name} guarantees visible implementation and verification tasks before coding begins. Call ${ExitPlanModeV2Tool.name} when the plan is ready for approval.
433378
433521
 
433379
433522
  ### Ending Your Turn
433380
433523
 
@@ -433389,7 +433532,7 @@ Your turn should only end by either:
433389
433532
  }
433390
433533
  function getPlanModeV2SparseInstructions(attachment) {
433391
433534
  const workflowDescription = isPlanModeInterviewPhaseEnabled() ? "Follow iterative workflow: explore codebase, interview user, write to plan incrementally." : "Follow 5-phase workflow.";
433392
- const content = `Plan mode still active (see full instructions earlier in conversation). Read-only except plan file (${attachment.planFilePath}). ${workflowDescription} End turns with ${ASK_USER_QUESTION_TOOL_NAME} (for clarifications) or ${ExitPlanModeV2Tool.name} (for plan approval). Never ask about plan approval via text or AskUserQuestion.`;
433535
+ const content = `Plan mode still active (see full instructions earlier in conversation). Read-only except plan file (${attachment.planFilePath}) and visible task tracking tools. Plan-file writes do not require existing tasks; after approval, ${ExitPlanModeV2Tool.name} guarantees tasks exist before implementation. ${workflowDescription} End turns with ${ASK_USER_QUESTION_TOOL_NAME} (for clarifications) or ${ExitPlanModeV2Tool.name} (for plan approval). Never ask about plan approval via text or AskUserQuestion.`;
433393
433536
  return wrapMessagesInSystemReminder([
433394
433537
  createUserMessage({ content, isMeta: true })
433395
433538
  ]);
@@ -433768,6 +433911,8 @@ You are returning to plan mode after having previously exited it. A plan file ex
433768
433911
  - **Same task, continuing**: If this is explicitly a continuation or refinement of the exact same task, modify the existing plan while cleaning up outdated or irrelevant sections
433769
433912
  4. Continue on with the plan process and most importantly you should always edit the plan file one way or the other before calling ${ExitPlanModeV2Tool.name}
433770
433913
 
433914
+ Writing the exact plan file is allowed without an existing task list. After approval, ${ExitPlanModeV2Tool.name} guarantees visible implementation tasks exist before workspace implementation begins.
433915
+
433771
433916
  Treat this as a fresh planning session. Do not assume the existing plan is relevant without evaluating it first.`;
433772
433917
  return wrapMessagesInSystemReminder([
433773
433918
  createUserMessage({ content, isMeta: true })
@@ -433777,7 +433922,7 @@ Treat this as a fresh planning session. Do not assume the existing plan is relev
433777
433922
  const planReference = attachment.planExists ? ` The plan file is located at ${attachment.planFilePath} if you need to reference it.` : "";
433778
433923
  const content = `## Exited Plan Mode
433779
433924
 
433780
- You have exited plan mode. You can now make edits, run tools, and take actions.${planReference}`;
433925
+ You have exited plan mode. The visible task list is ready; begin with the first unblocked task and keep statuses current. You can now make edits, run tools, and take actions.${planReference}`;
433781
433926
  return wrapMessagesInSystemReminder([
433782
433927
  createUserMessage({ content, isMeta: true })
433783
433928
  ]);
@@ -442982,7 +443127,7 @@ function Feedback({
442982
443127
  platform: env2.platform,
442983
443128
  gitRepo: envInfo.isGit,
442984
443129
  terminal: env2.terminal,
442985
- version: "1.80.4",
443130
+ version: "1.80.5",
442986
443131
  transcript: normalizeMessagesForAPI(messages),
442987
443132
  errors: sanitizedErrors,
442988
443133
  lastApiRequest: getLastAPIRequest(),
@@ -443174,7 +443319,7 @@ function Feedback({
443174
443319
  ", ",
443175
443320
  env2.terminal,
443176
443321
  ", v",
443177
- "1.80.4"
443322
+ "1.80.5"
443178
443323
  ]
443179
443324
  }, undefined, true, undefined, this)
443180
443325
  ]
@@ -443280,7 +443425,7 @@ ${sanitizedDescription}
443280
443425
  ` + `**Environment Info**
443281
443426
  ` + `- Platform: ${env2.platform}
443282
443427
  ` + `- Terminal: ${env2.terminal}
443283
- ` + `- Version: ${"1.80.4"}
443428
+ ` + `- Version: ${"1.80.5"}
443284
443429
  ` + `- Feedback ID: ${feedbackId}
443285
443430
  ` + `
443286
443431
  **Errors**
@@ -446390,7 +446535,7 @@ function buildPrimarySection() {
446390
446535
  }, undefined, false, undefined, this);
446391
446536
  return [{
446392
446537
  label: "Version",
446393
- value: "1.80.4"
446538
+ value: "1.80.5"
446394
446539
  }, {
446395
446540
  label: "Session name",
446396
446541
  value: nameValue
@@ -449772,7 +449917,7 @@ function Config({
449772
449917
  }
449773
449918
  }, undefined, false, undefined, this)
449774
449919
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
449775
- currentVersion: "1.80.4",
449920
+ currentVersion: "1.80.5",
449776
449921
  onChoice: (choice) => {
449777
449922
  setShowSubmenu(null);
449778
449923
  setTabsHidden(false);
@@ -449784,7 +449929,7 @@ function Config({
449784
449929
  autoUpdatesChannel: "stable"
449785
449930
  };
449786
449931
  if (choice === "stay") {
449787
- newSettings.minimumVersion = "1.80.4";
449932
+ newSettings.minimumVersion = "1.80.5";
449788
449933
  }
449789
449934
  updateSettingsForSource("userSettings", newSettings);
449790
449935
  setSettingsData((prev_27) => ({
@@ -458093,7 +458238,7 @@ function HelpV2(t0) {
458093
458238
  let t6;
458094
458239
  if ($2[31] !== tabs) {
458095
458240
  t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
458096
- title: `UR v${"1.80.4"}`,
458241
+ title: `UR v${"1.80.5"}`,
458097
458242
  color: "professionalBlue",
458098
458243
  defaultTab: "general",
458099
458244
  children: tabs
@@ -459026,7 +459171,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
459026
459171
  async function handleInitialize(options2) {
459027
459172
  return {
459028
459173
  name: "UR",
459029
- version: "1.80.4",
459174
+ version: "1.80.5",
459030
459175
  protocolVersion: "0.1.0",
459031
459176
  workspaceRoot: options2.cwd,
459032
459177
  capabilities: {
@@ -476134,7 +476279,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
476134
476279
  return [];
476135
476280
  }
476136
476281
  }
476137
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.4") {
476282
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.5") {
476138
476283
  if (process.env.USER_TYPE === "ant") {
476139
476284
  const changelog = "";
476140
476285
  if (changelog) {
@@ -476161,7 +476306,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.4")
476161
476306
  releaseNotes
476162
476307
  };
476163
476308
  }
476164
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.4") {
476309
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.5") {
476165
476310
  if (process.env.USER_TYPE === "ant") {
476166
476311
  const changelog = "";
476167
476312
  if (changelog) {
@@ -479066,7 +479211,7 @@ function getRecentActivitySync() {
479066
479211
  return cachedActivity;
479067
479212
  }
479068
479213
  function getLogoDisplayData() {
479069
- const version2 = process.env.DEMO_VERSION ?? "1.80.4";
479214
+ const version2 = process.env.DEMO_VERSION ?? "1.80.5";
479070
479215
  const serverUrl = getDirectConnectServerUrl();
479071
479216
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
479072
479217
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -479934,7 +480079,7 @@ function LogoV2() {
479934
480079
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
479935
480080
  t2 = () => {
479936
480081
  const currentConfig = getGlobalConfig();
479937
- if (currentConfig.lastReleaseNotesSeen === "1.80.4") {
480082
+ if (currentConfig.lastReleaseNotesSeen === "1.80.5") {
479938
480083
  return;
479939
480084
  }
479940
480085
  saveGlobalConfig(_temp325);
@@ -480619,12 +480764,12 @@ function LogoV2() {
480619
480764
  return t41;
480620
480765
  }
480621
480766
  function _temp325(current) {
480622
- if (current.lastReleaseNotesSeen === "1.80.4") {
480767
+ if (current.lastReleaseNotesSeen === "1.80.5") {
480623
480768
  return current;
480624
480769
  }
480625
480770
  return {
480626
480771
  ...current,
480627
- lastReleaseNotesSeen: "1.80.4"
480772
+ lastReleaseNotesSeen: "1.80.5"
480628
480773
  };
480629
480774
  }
480630
480775
  function _temp241(s_0) {
@@ -496716,7 +496861,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
496716
496861
  if (spec.name !== specName) {
496717
496862
  throw new Error("Agentic CI workflow spec name does not match");
496718
496863
  }
496719
- const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4");
496864
+ const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.5" : "1.80.5");
496720
496865
  if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
496721
496866
  throw new Error("invalid ur-agent package version");
496722
496867
  }
@@ -497709,7 +497854,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
497709
497854
  path: ".github/workflows/ur.yml",
497710
497855
  root: "project",
497711
497856
  content: compileAgenticCiWorkflow("default", {
497712
- packageVersion: typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4"
497857
+ packageVersion: typeof MACRO !== "undefined" ? "1.80.5" : "1.80.5"
497713
497858
  })
497714
497859
  },
497715
497860
  {
@@ -497772,7 +497917,7 @@ function value(tokens, flag) {
497772
497917
  return index2 >= 0 ? tokens[index2 + 1] : undefined;
497773
497918
  }
497774
497919
  function cliVersion() {
497775
- return typeof MACRO !== "undefined" ? "1.80.4" : "1.80.4";
497920
+ return typeof MACRO !== "undefined" ? "1.80.5" : "1.80.5";
497776
497921
  }
497777
497922
  function workflowPath(cwd2) {
497778
497923
  return join168(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
@@ -503628,7 +503773,7 @@ function createAcpStdioApp(deps) {
503628
503773
  }
503629
503774
  },
503630
503775
  authMethods: [],
503631
- agentInfo: { name: "UR-Nexus", version: "1.80.4" }
503776
+ agentInfo: { name: "UR-Nexus", version: "1.80.5" }
503632
503777
  })).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
503633
503778
  const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
503634
503779
  await runtime2.announce({
@@ -503725,7 +503870,7 @@ function createAcpStdioAgent(deps) {
503725
503870
  }
503726
503871
  },
503727
503872
  authMethods: [],
503728
- agentInfo: { name: "UR-Nexus", version: "1.80.4" }
503873
+ agentInfo: { name: "UR-Nexus", version: "1.80.5" }
503729
503874
  });
503730
503875
  return;
503731
503876
  case "authenticate":
@@ -714951,7 +715096,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
714951
715096
  smapsRollup,
714952
715097
  platform: process.platform,
714953
715098
  nodeVersion: process.version,
714954
- ccVersion: "1.80.4"
715099
+ ccVersion: "1.80.5"
714955
715100
  };
714956
715101
  }
714957
715102
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -715540,7 +715685,7 @@ var init_bridge_kick = __esm(() => {
715540
715685
  var call154 = async () => {
715541
715686
  return {
715542
715687
  type: "text",
715543
- value: "1.80.4"
715688
+ value: "1.80.5"
715544
715689
  };
715545
715690
  }, version2, version_default;
715546
715691
  var init_version = __esm(() => {
@@ -726783,7 +726928,7 @@ function generateHtmlReport(data, insights) {
726783
726928
  </html>`;
726784
726929
  }
726785
726930
  function buildExportData(data, insights, facets, remoteStats) {
726786
- const version3 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
726931
+ const version3 = typeof MACRO !== "undefined" ? "1.80.5" : "unknown";
726787
726932
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
726788
726933
  const facets_summary = {
726789
726934
  total: facets.size,
@@ -731096,7 +731241,7 @@ var init_sessionStorage = __esm(() => {
731096
731241
  init_settings2();
731097
731242
  init_slowOperations();
731098
731243
  init_uuid();
731099
- VERSION7 = typeof MACRO !== "undefined" ? "1.80.4" : "unknown";
731244
+ VERSION7 = typeof MACRO !== "undefined" ? "1.80.5" : "unknown";
731100
731245
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
731101
731246
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
731102
731247
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -732311,7 +732456,7 @@ var init_filesystem = __esm(() => {
732311
732456
  });
732312
732457
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
732313
732458
  const nonce = randomBytes24(16).toString("hex");
732314
- return join243(getURTempDir(), "bundled-skills", "1.80.4", nonce);
732459
+ return join243(getURTempDir(), "bundled-skills", "1.80.5", nonce);
732315
732460
  });
732316
732461
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
732317
732462
  });
@@ -735120,7 +735265,7 @@ async function* executeHooks({
735120
735265
  };
735121
735266
  return;
735122
735267
  }
735123
- const { json: json2, plainText, validationError } = parseHookOutput(result.stdout);
735268
+ const { json: json2, plainText: plainText2, validationError } = parseHookOutput(result.stdout);
735124
735269
  if (validationError) {
735125
735270
  emitHookResponse({
735126
735271
  hookId,
@@ -735169,7 +735314,7 @@ async function* executeHooks({
735169
735314
  exitCode: result.status,
735170
735315
  durationMs
735171
735316
  });
735172
- if (isSyncHookJSONOutput(json2) && !json2.suppressOutput && plainText && result.status === 0) {
735317
+ if (isSyncHookJSONOutput(json2) && !json2.suppressOutput && plainText2 && result.status === 0) {
735173
735318
  const content = `${source_default.bold(hookName)} completed`;
735174
735319
  emitHookResponse({
735175
735320
  hookId,
@@ -735879,12 +736024,12 @@ async function* executeTeammateIdleHooks(teammateName, teamName, permissionMode,
735879
736024
  timeoutMs
735880
736025
  });
735881
736026
  }
735882
- async function* executeTaskCreatedHooks(taskId, taskSubject, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
736027
+ async function* executeTaskCreatedHooks(taskId, taskSubject2, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
735883
736028
  const hookInput = {
735884
736029
  ...createBaseHookInput(permissionMode),
735885
736030
  hook_event_name: "TaskCreated",
735886
736031
  task_id: taskId,
735887
- task_subject: taskSubject,
736032
+ task_subject: taskSubject2,
735888
736033
  task_description: taskDescription,
735889
736034
  teammate_name: teammateName,
735890
736035
  team_name: teamName
@@ -735897,12 +736042,12 @@ async function* executeTaskCreatedHooks(taskId, taskSubject, taskDescription, te
735897
736042
  toolUseContext
735898
736043
  });
735899
736044
  }
735900
- async function* executeTaskCompletedHooks(taskId, taskSubject, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
736045
+ async function* executeTaskCompletedHooks(taskId, taskSubject2, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
735901
736046
  const hookInput = {
735902
736047
  ...createBaseHookInput(permissionMode),
735903
736048
  hook_event_name: "TaskCompleted",
735904
736049
  task_id: taskId,
735905
- task_subject: taskSubject,
736050
+ task_subject: taskSubject2,
735906
736051
  task_description: taskDescription,
735907
736052
  teammate_name: teammateName,
735908
736053
  team_name: teamName
@@ -738700,7 +738845,7 @@ function computeFingerprint(messageText2, version3) {
738700
738845
  }
738701
738846
  function computeFingerprintFromMessages(messages) {
738702
738847
  const firstMessageText = extractFirstMessageText(messages);
738703
- return computeFingerprint(firstMessageText, "1.80.4");
738848
+ return computeFingerprint(firstMessageText, "1.80.5");
738704
738849
  }
738705
738850
  var FINGERPRINT_SALT = "59cf53e54c78";
738706
738851
  var init_fingerprint = () => {};
@@ -740625,7 +740770,7 @@ async function sideQuery(opts) {
740625
740770
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
740626
740771
  }
740627
740772
  const messageText2 = extractFirstUserMessageText(messages);
740628
- const fingerprint2 = computeFingerprint(messageText2, "1.80.4");
740773
+ const fingerprint2 = computeFingerprint(messageText2, "1.80.5");
740629
740774
  const attributionHeader = getAttributionHeader(fingerprint2);
740630
740775
  const systemBlocks = [
740631
740776
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -745459,7 +745604,7 @@ function buildSystemInitMessage(inputs) {
745459
745604
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
745460
745605
  apiKeySource: getURHQApiKeyWithSource().source,
745461
745606
  betas: getSdkBetas(),
745462
- ur_version: "1.80.4",
745607
+ ur_version: "1.80.5",
745463
745608
  output_style: outputStyle,
745464
745609
  agents: inputs.agents.map((agent2) => agent2.agentType),
745465
745610
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -752088,8 +752233,8 @@ function commandListDisplay(commands) {
752088
752233
  }
752089
752234
  }
752090
752235
  function commandListDisplayTruncated(commands) {
752091
- const plainText = commands.join(", ");
752092
- if (plainText.length > 50) {
752236
+ const plainText2 = commands.join(", ");
752237
+ if (plainText2.length > 50) {
752093
752238
  return "similar";
752094
752239
  }
752095
752240
  return commandListDisplay(commands);
@@ -759295,7 +759440,7 @@ var init_useVoiceEnabled = __esm(() => {
759295
759440
  function getSemverPart(version3) {
759296
759441
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
759297
759442
  }
759298
- function useUpdateNotification(updatedVersion, initialVersion = "1.80.4") {
759443
+ function useUpdateNotification(updatedVersion, initialVersion = "1.80.5") {
759299
759444
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
759300
759445
  if (!updatedVersion) {
759301
759446
  return null;
@@ -759344,7 +759489,7 @@ function AutoUpdater({
759344
759489
  return;
759345
759490
  }
759346
759491
  if (false) {}
759347
- const currentVersion = "1.80.4";
759492
+ const currentVersion = "1.80.5";
759348
759493
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
759349
759494
  let latestVersion = await getLatestVersion(channel);
759350
759495
  const isDisabled = isAutoUpdaterDisabled();
@@ -759573,12 +759718,12 @@ function NativeAutoUpdater({
759573
759718
  logEvent("tengu_native_auto_updater_start", {});
759574
759719
  try {
759575
759720
  const maxVersion = await getMaxVersion();
759576
- if (maxVersion && gt("1.80.4", maxVersion)) {
759721
+ if (maxVersion && gt("1.80.5", maxVersion)) {
759577
759722
  const msg = await getMaxVersionMessage();
759578
759723
  setMaxVersionIssue(msg ?? "affects your version");
759579
759724
  }
759580
759725
  const result = await installLatest(channel);
759581
- const currentVersion = "1.80.4";
759726
+ const currentVersion = "1.80.5";
759582
759727
  const latencyMs = Date.now() - startTime;
759583
759728
  if (result.lockFailed) {
759584
759729
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -759715,17 +759860,17 @@ function PackageManagerAutoUpdater(t0) {
759715
759860
  const maxVersion = await getMaxVersion();
759716
759861
  if (maxVersion && latest && gt(latest, maxVersion)) {
759717
759862
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
759718
- if (gte("1.80.4", maxVersion)) {
759719
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
759863
+ if (gte("1.80.5", maxVersion)) {
759864
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
759720
759865
  setUpdateAvailable(false);
759721
759866
  return;
759722
759867
  }
759723
759868
  latest = maxVersion;
759724
759869
  }
759725
- const hasUpdate = latest && !gte("1.80.4", latest) && !shouldSkipVersion(latest);
759870
+ const hasUpdate = latest && !gte("1.80.5", latest) && !shouldSkipVersion(latest);
759726
759871
  setUpdateAvailable(!!hasUpdate);
759727
759872
  if (hasUpdate) {
759728
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.4"} -> ${latest}`);
759873
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.5"} -> ${latest}`);
759729
759874
  }
759730
759875
  };
759731
759876
  $2[0] = t1;
@@ -759759,7 +759904,7 @@ function PackageManagerAutoUpdater(t0) {
759759
759904
  wrap: "truncate",
759760
759905
  children: [
759761
759906
  "currentVersion: ",
759762
- "1.80.4"
759907
+ "1.80.5"
759763
759908
  ]
759764
759909
  }, undefined, true, undefined, this);
759765
759910
  $2[3] = verbose;
@@ -770612,7 +770757,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
770612
770757
  project_dir: getOriginalCwd(),
770613
770758
  added_dirs: addedDirs
770614
770759
  },
770615
- version: "1.80.4",
770760
+ version: "1.80.5",
770616
770761
  output_style: {
770617
770762
  name: outputStyleName
770618
770763
  },
@@ -770747,7 +770892,7 @@ function StatusLineInner({
770747
770892
  const attention = customStatusError ?? taskAttention;
770748
770893
  const terminalSize = React133.useContext(TerminalSizeContext);
770749
770894
  const defaultStatusLineText = buildDefaultStatusBar({
770750
- version: "1.80.4",
770895
+ version: "1.80.5",
770751
770896
  providerLabel: providerRuntime.providerLabel,
770752
770897
  authMode: providerRuntime.authLabel,
770753
770898
  model: renderModelName(mainLoopModel) || providerRuntime.model || "",
@@ -783002,7 +783147,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
783002
783147
  } catch {}
783003
783148
  const data = {
783004
783149
  trigger: trigger2,
783005
- version: "1.80.4",
783150
+ version: "1.80.5",
783006
783151
  platform: process.platform,
783007
783152
  transcript,
783008
783153
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -795371,7 +795516,7 @@ function WelcomeV2() {
795371
795516
  dimColor: true,
795372
795517
  children: [
795373
795518
  "v",
795374
- "1.80.4"
795519
+ "1.80.5"
795375
795520
  ]
795376
795521
  }, undefined, true, undefined, this)
795377
795522
  ]
@@ -796631,7 +796776,7 @@ function completeOnboarding() {
796631
796776
  saveGlobalConfig((current) => ({
796632
796777
  ...current,
796633
796778
  hasCompletedOnboarding: true,
796634
- lastOnboardingVersion: "1.80.4"
796779
+ lastOnboardingVersion: "1.80.5"
796635
796780
  }));
796636
796781
  }
796637
796782
  function showDialog(root2, renderer) {
@@ -801777,7 +801922,7 @@ function appendToLog(path28, message) {
801777
801922
  cwd: getFsImplementation().cwd(),
801778
801923
  userType: process.env.USER_TYPE,
801779
801924
  sessionId: getSessionId(),
801780
- version: "1.80.4"
801925
+ version: "1.80.5"
801781
801926
  };
801782
801927
  getLogWriter(path28).write(messageWithTimestamp);
801783
801928
  }
@@ -805941,8 +806086,8 @@ async function getEnvLessBridgeConfig() {
805941
806086
  }
805942
806087
  async function checkEnvLessBridgeMinVersion() {
805943
806088
  const cfg = await getEnvLessBridgeConfig();
805944
- if (cfg.min_version && lt("1.80.4", cfg.min_version)) {
805945
- return `Your version of UR (${"1.80.4"}) is too old for Remote Control.
806089
+ if (cfg.min_version && lt("1.80.5", cfg.min_version)) {
806090
+ return `Your version of UR (${"1.80.5"}) is too old for Remote Control.
805946
806091
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
805947
806092
  }
805948
806093
  return null;
@@ -806416,7 +806561,7 @@ async function initBridgeCore(params) {
806416
806561
  const rawApi = createBridgeApiClient({
806417
806562
  baseUrl,
806418
806563
  getAccessToken,
806419
- runnerVersion: "1.80.4",
806564
+ runnerVersion: "1.80.5",
806420
806565
  onDebug: logForDebugging,
806421
806566
  onAuth401,
806422
806567
  getTrustedDeviceToken
@@ -815889,7 +816034,7 @@ function getAgUiCapabilities() {
815889
816034
  name: "UR-Nexus",
815890
816035
  type: "ur-nexus",
815891
816036
  description: "Provider-flexible, local-first autonomous engineering workflow agent.",
815892
- version: "1.80.4",
816037
+ version: "1.80.5",
815893
816038
  provider: "UR",
815894
816039
  documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
815895
816040
  },
@@ -817116,7 +817261,7 @@ function createMCPServer(cwd4, debug2, verbose) {
817116
817261
  };
817117
817262
  const server2 = new Server({
817118
817263
  name: "ur-nexus",
817119
- version: "1.80.4"
817264
+ version: "1.80.5"
817120
817265
  }, {
817121
817266
  capabilities: {
817122
817267
  tools: {}
@@ -818320,7 +818465,7 @@ function thrownResponse(error40) {
818320
818465
  }
818321
818466
  async function createUrMcp2026Runtime(options5) {
818322
818467
  const server2 = createMCPServer(options5.cwd, options5.debug === true, options5.verbose === true);
818323
- const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.4" }, { capabilities: {} });
818468
+ const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.5" }, { capabilities: {} });
818324
818469
  const [clientTransport, serverTransport] = createLinkedTransportPair();
818325
818470
  try {
818326
818471
  await server2.connect(serverTransport);
@@ -818331,7 +818476,7 @@ async function createUrMcp2026Runtime(options5) {
818331
818476
  }
818332
818477
  const runtime2 = new Mcp2026Runtime({
818333
818478
  cwd: options5.cwd,
818334
- version: "1.80.4",
818479
+ version: "1.80.5",
818335
818480
  backend: {
818336
818481
  listTools: async () => {
818337
818482
  const listed = await client2.listTools();
@@ -821066,7 +821211,7 @@ async function update() {
821066
821211
  logEvent("tengu_update_check", {});
821067
821212
  const diagnostic2 = await getDoctorDiagnostic();
821068
821213
  const result = await checkUpgradeStatus({
821069
- currentVersion: "1.80.4",
821214
+ currentVersion: "1.80.5",
821070
821215
  packageName: UR_AGENT_PACKAGE_NAME,
821071
821216
  installationType: diagnostic2.installationType,
821072
821217
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -822394,7 +822539,7 @@ ${customInstructions}` : customInstructions;
822394
822539
  }
822395
822540
  }
822396
822541
  logForDiagnosticsNoPII("info", "started", {
822397
- version: "1.80.4",
822542
+ version: "1.80.5",
822398
822543
  is_native_binary: isInBundledMode()
822399
822544
  });
822400
822545
  registerCleanup(async () => {
@@ -823181,7 +823326,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
823181
823326
  pendingHookMessages
823182
823327
  }, renderAndRun);
823183
823328
  }
823184
- }).version("1.80.4 (UR-Nexus)", "-v, --version", "Output the version number");
823329
+ }).version("1.80.5 (UR-Nexus)", "-v, --version", "Output the version number");
823185
823330
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
823186
823331
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
823187
823332
  if (canUserConfigureAdvisor()) {
@@ -824308,7 +824453,7 @@ if (false) {}
824308
824453
  async function main2() {
824309
824454
  const args = process.argv.slice(2);
824310
824455
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
824311
- console.log(`${"1.80.4"} (UR-Nexus)`);
824456
+ console.log(`${"1.80.5"} (UR-Nexus)`);
824312
824457
  return;
824313
824458
  }
824314
824459
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {