ur-agent 1.80.4 → 1.80.6
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/CHANGELOG.md +24 -0
- package/dist/cli.js +762 -597
- package/docs/AGENT_FEATURES.md +12 -0
- package/docs/TROUBLESHOOTING.md +14 -5
- package/docs/USAGE.md +13 -0
- package/docs/VALIDATION.md +29 -1
- package/documentation/index.html +1 -1
- package/extensions/jetbrains-ur/build.gradle.kts +1 -1
- package/extensions/vscode-ur-inline-diffs/package.json +1 -1
- package/package.json +1 -1
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.
|
|
107787
|
+
return `ur/${"1.80.6"}`;
|
|
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.
|
|
107809
|
+
return `ur-cli/${"1.80.6"} (${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.
|
|
107823
|
+
return `ur/${"1.80.6"}${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.
|
|
107961
|
+
appVersion: "1.80.6",
|
|
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.
|
|
115848
|
+
const match = "1.80.6".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.
|
|
115888
|
+
version: "1.80.6",
|
|
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.
|
|
116558
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.80.6"
|
|
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.
|
|
116586
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.80.6");
|
|
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.
|
|
126549
|
+
var urVersion = "1.80.6", 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.
|
|
129439
|
+
const version2 = `${"1.80.6"}.${fingerprint}`;
|
|
129440
129440
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
129441
129441
|
const cch = "";
|
|
129442
129442
|
const workload = getWorkload();
|
|
@@ -174285,6 +174285,7 @@ var init_exploreAgent = __esm(() => {
|
|
|
174285
174285
|
],
|
|
174286
174286
|
source: "built-in",
|
|
174287
174287
|
baseDir: "built-in",
|
|
174288
|
+
permissionMode: "plan",
|
|
174288
174289
|
model: process.env.USER_TYPE === "ant" ? "inherit" : "modelH",
|
|
174289
174290
|
omitAgentMd: true,
|
|
174290
174291
|
getSystemPrompt: () => getExploreSystemPrompt()
|
|
@@ -174395,6 +174396,7 @@ var init_planAgent = __esm(() => {
|
|
|
174395
174396
|
source: "built-in",
|
|
174396
174397
|
tools: EXPLORE_AGENT.tools,
|
|
174397
174398
|
baseDir: "built-in",
|
|
174399
|
+
permissionMode: "plan",
|
|
174398
174400
|
model: "inherit",
|
|
174399
174401
|
omitAgentMd: true,
|
|
174400
174402
|
getSystemPrompt: () => getPlanV2SystemPrompt()
|
|
@@ -184630,7 +184632,7 @@ var init_projectSafety = __esm(() => {
|
|
|
184630
184632
|
function getInstruments() {
|
|
184631
184633
|
if (instruments)
|
|
184632
184634
|
return instruments;
|
|
184633
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.
|
|
184635
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.80.6");
|
|
184634
184636
|
instruments = {
|
|
184635
184637
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
184636
184638
|
description: "GenAI operation duration.",
|
|
@@ -184728,7 +184730,7 @@ function genAiAgentAttributes() {
|
|
|
184728
184730
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
184729
184731
|
"gen_ai.provider.name": "ur",
|
|
184730
184732
|
"gen_ai.agent.name": "UR-Nexus",
|
|
184731
|
-
"gen_ai.agent.version": "1.80.
|
|
184733
|
+
"gen_ai.agent.version": "1.80.6"
|
|
184732
184734
|
};
|
|
184733
184735
|
}
|
|
184734
184736
|
function genAiWorkflowAttributes(workflowName, workflowRunId) {
|
|
@@ -184749,7 +184751,7 @@ function genAiWorkflowAttributes(workflowName, workflowRunId) {
|
|
|
184749
184751
|
function startGenAiWorkflowSpan(workflowName, workflowRunId) {
|
|
184750
184752
|
const attributes = genAiWorkflowAttributes(workflowName, workflowRunId);
|
|
184751
184753
|
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.
|
|
184754
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.6").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
184753
184755
|
}
|
|
184754
184756
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
184755
184757
|
try {
|
|
@@ -184787,7 +184789,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
184787
184789
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
184788
184790
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
184789
184791
|
}
|
|
184790
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.
|
|
184792
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.80.6").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
184791
184793
|
}
|
|
184792
184794
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
184793
184795
|
try {
|
|
@@ -278502,7 +278504,7 @@ function getTelemetryAttributes() {
|
|
|
278502
278504
|
attributes["session.id"] = sessionId;
|
|
278503
278505
|
}
|
|
278504
278506
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
278505
|
-
attributes["app.version"] = "1.80.
|
|
278507
|
+
attributes["app.version"] = "1.80.6";
|
|
278506
278508
|
}
|
|
278507
278509
|
const oauthAccount = getOauthAccountInfo();
|
|
278508
278510
|
if (oauthAccount) {
|
|
@@ -319493,7 +319495,7 @@ function getInstallationEnv() {
|
|
|
319493
319495
|
return;
|
|
319494
319496
|
}
|
|
319495
319497
|
function getURCodeVersion() {
|
|
319496
|
-
return "1.80.
|
|
319498
|
+
return "1.80.6";
|
|
319497
319499
|
}
|
|
319498
319500
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
319499
319501
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -326863,7 +326865,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
326863
326865
|
const client2 = new Client({
|
|
326864
326866
|
name: "ur",
|
|
326865
326867
|
title: "UR",
|
|
326866
|
-
version: "1.80.
|
|
326868
|
+
version: "1.80.6",
|
|
326867
326869
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
326868
326870
|
websiteUrl: PRODUCT_URL
|
|
326869
326871
|
}, {
|
|
@@ -327224,7 +327226,7 @@ var init_client5 = __esm(() => {
|
|
|
327224
327226
|
const client2 = new Client({
|
|
327225
327227
|
name: "ur",
|
|
327226
327228
|
title: "UR",
|
|
327227
|
-
version: "1.80.
|
|
327229
|
+
version: "1.80.6",
|
|
327228
327230
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
327229
327231
|
websiteUrl: PRODUCT_URL
|
|
327230
327232
|
}, {
|
|
@@ -339962,7 +339964,7 @@ async function createRuntime() {
|
|
|
339962
339964
|
bootstrapTelemetry();
|
|
339963
339965
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
339964
339966
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
339965
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.
|
|
339967
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.80.6"
|
|
339966
339968
|
}));
|
|
339967
339969
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
339968
339970
|
resource,
|
|
@@ -339995,11 +339997,11 @@ async function createRuntime() {
|
|
|
339995
339997
|
setMeterProvider(meterProvider);
|
|
339996
339998
|
setLoggerProvider(loggerProvider);
|
|
339997
339999
|
if (meterProvider) {
|
|
339998
|
-
const meter = meterProvider.getMeter("ur-agent", "1.80.
|
|
340000
|
+
const meter = meterProvider.getMeter("ur-agent", "1.80.6");
|
|
339999
340001
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
340000
340002
|
}
|
|
340001
340003
|
if (loggerProvider) {
|
|
340002
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.
|
|
340004
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.80.6"));
|
|
340003
340005
|
}
|
|
340004
340006
|
if (!cleanupRegistered3) {
|
|
340005
340007
|
cleanupRegistered3 = true;
|
|
@@ -340661,9 +340663,9 @@ async function assertMinVersion() {
|
|
|
340661
340663
|
if (false) {}
|
|
340662
340664
|
try {
|
|
340663
340665
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
340664
|
-
if (versionConfig.minVersion && lt("1.80.
|
|
340666
|
+
if (versionConfig.minVersion && lt("1.80.6", versionConfig.minVersion)) {
|
|
340665
340667
|
console.error(`
|
|
340666
|
-
It looks like your version of UR (${"1.80.
|
|
340668
|
+
It looks like your version of UR (${"1.80.6"}) needs an update.
|
|
340667
340669
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
340668
340670
|
|
|
340669
340671
|
To update, please run:
|
|
@@ -340879,7 +340881,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
340879
340881
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
340880
340882
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
340881
340883
|
pid: process.pid,
|
|
340882
|
-
currentVersion: "1.80.
|
|
340884
|
+
currentVersion: "1.80.6"
|
|
340883
340885
|
});
|
|
340884
340886
|
return "in_progress";
|
|
340885
340887
|
}
|
|
@@ -340888,7 +340890,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
340888
340890
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
340889
340891
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
340890
340892
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
340891
|
-
currentVersion: "1.80.
|
|
340893
|
+
currentVersion: "1.80.6"
|
|
340892
340894
|
});
|
|
340893
340895
|
console.error(`
|
|
340894
340896
|
Error: Windows NPM detected in WSL
|
|
@@ -341423,7 +341425,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
341423
341425
|
}
|
|
341424
341426
|
async function getDoctorDiagnostic() {
|
|
341425
341427
|
const installationType = await getCurrentInstallationType();
|
|
341426
|
-
const version2 = typeof MACRO !== "undefined" ? "1.80.
|
|
341428
|
+
const version2 = typeof MACRO !== "undefined" ? "1.80.6" : "unknown";
|
|
341427
341429
|
const installationPath = await getInstallationPath();
|
|
341428
341430
|
const invokedBinary = getInvokedBinary();
|
|
341429
341431
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -342358,8 +342360,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
342358
342360
|
const maxVersion = await getMaxVersion();
|
|
342359
342361
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
342360
342362
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
342361
|
-
if (gte("1.80.
|
|
342362
|
-
logForDebugging(`Native installer: current version ${"1.80.
|
|
342363
|
+
if (gte("1.80.6", maxVersion)) {
|
|
342364
|
+
logForDebugging(`Native installer: current version ${"1.80.6"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
342363
342365
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
342364
342366
|
latency_ms: Date.now() - startTime,
|
|
342365
342367
|
max_version: maxVersion,
|
|
@@ -342370,7 +342372,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
342370
342372
|
version2 = maxVersion;
|
|
342371
342373
|
}
|
|
342372
342374
|
}
|
|
342373
|
-
if (!forceReinstall && version2 === "1.80.
|
|
342375
|
+
if (!forceReinstall && version2 === "1.80.6" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
342374
342376
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
342375
342377
|
logEvent("tengu_native_update_complete", {
|
|
342376
342378
|
latency_ms: Date.now() - startTime,
|
|
@@ -396172,9 +396174,12 @@ var init_prompt15 = __esm(() => {
|
|
|
396172
396174
|
|
|
396173
396175
|
## How This Tool Works
|
|
396174
396176
|
- You should have already written your plan to the plan file specified in the plan mode system message
|
|
396177
|
+
- Writing or editing that exact plan file is allowed without an existing task list
|
|
396178
|
+
- TaskCreate, TaskUpdate, TaskList, and TaskGet remain available during planning
|
|
396175
396179
|
- This tool does NOT take the plan content as a parameter - it will read the plan from the file you wrote
|
|
396176
396180
|
- This tool simply signals that you're done planning and ready for the user to review and approve
|
|
396177
396181
|
- The user will see the contents of your plan file when they review it
|
|
396182
|
+
- After approval, this tool preserves any existing visible tasks or creates a bounded implementation and verification task list before coding begins
|
|
396178
396183
|
|
|
396179
396184
|
## When to Use This Tool
|
|
396180
396185
|
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 +396199,553 @@ Ensure your plan is complete and unambiguous:
|
|
|
396194
396199
|
`;
|
|
396195
396200
|
});
|
|
396196
396201
|
|
|
396202
|
+
// src/services/tools/taskListGate.ts
|
|
396203
|
+
function getTaskListGateConfig() {
|
|
396204
|
+
const configured = getInitialSettings()?.tasks?.requireBeforeChanges;
|
|
396205
|
+
if (!configured)
|
|
396206
|
+
return TASK_LIST_GATE_DEFAULTS;
|
|
396207
|
+
return {
|
|
396208
|
+
enabled: typeof configured.enabled === "boolean" ? configured.enabled : TASK_LIST_GATE_DEFAULTS.enabled,
|
|
396209
|
+
freeReads: typeof configured.freeReads === "number" && Number.isInteger(configured.freeReads) && configured.freeReads >= 0 ? configured.freeReads : TASK_LIST_GATE_DEFAULTS.freeReads
|
|
396210
|
+
};
|
|
396211
|
+
}
|
|
396212
|
+
function isMutatingTool2(toolName) {
|
|
396213
|
+
return !GATE_EXEMPT_TOOLS.has(toolName) && KNOWN_MUTATING_TOOLS.has(toolName);
|
|
396214
|
+
}
|
|
396215
|
+
function isTaskListGateExempt(toolName) {
|
|
396216
|
+
return GATE_EXEMPT_TOOLS.has(toolName);
|
|
396217
|
+
}
|
|
396218
|
+
function countActionableTasksForGate(tasks) {
|
|
396219
|
+
return tasks.filter((task) => !task.metadata?._internal && !isAutomaticPromptTask(task) && (task.status === "pending" || task.status === "in_progress")).length;
|
|
396220
|
+
}
|
|
396221
|
+
function checkTaskListGate(input) {
|
|
396222
|
+
const config3 = input.config ?? getTaskListGateConfig();
|
|
396223
|
+
if (!config3.enabled)
|
|
396224
|
+
return { allowed: true };
|
|
396225
|
+
if (input.taskListWriterAvailable === false)
|
|
396226
|
+
return { allowed: true };
|
|
396227
|
+
if (isTaskListGateExempt(input.toolName))
|
|
396228
|
+
return { allowed: true };
|
|
396229
|
+
if (input.isPlanningArtifact === true)
|
|
396230
|
+
return { allowed: true };
|
|
396231
|
+
if (input.isReadOnlyPlanningDelegation === true)
|
|
396232
|
+
return { allowed: true };
|
|
396233
|
+
const isMutating = input.isMutating ?? isMutatingTool2(input.toolName);
|
|
396234
|
+
if (!isMutating)
|
|
396235
|
+
return { allowed: true };
|
|
396236
|
+
if (input.taskCount !== null && input.taskCount > 0) {
|
|
396237
|
+
return { allowed: true };
|
|
396238
|
+
}
|
|
396239
|
+
const inherentlyRequiresTaskList = input.isSubagent || ALWAYS_REQUIRE_PLAN_TOOLS.has(input.toolName);
|
|
396240
|
+
const classifiedRequirement = input.requiresTaskList === true;
|
|
396241
|
+
const forceEveryMutation = config3.freeReads === 0;
|
|
396242
|
+
const unclassifiedAllowanceExpired = input.requiresTaskList === undefined && input.readsSoFar >= config3.freeReads;
|
|
396243
|
+
const gateRequired = inherentlyRequiresTaskList || classifiedRequirement || forceEveryMutation || unclassifiedAllowanceExpired;
|
|
396244
|
+
const requirementContext = input.requirementReason ? ` This turn requires task tracking because it contains ${input.requirementReason}.` : "";
|
|
396245
|
+
const planningRecovery = input.requirementReason === "planning workflow" ? " EnterPlanMode and plan updates do not create the visible task list." : "";
|
|
396246
|
+
if (input.taskCount === null) {
|
|
396247
|
+
return {
|
|
396248
|
+
allowed: false,
|
|
396249
|
+
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.`
|
|
396250
|
+
};
|
|
396251
|
+
}
|
|
396252
|
+
if (!gateRequired)
|
|
396253
|
+
return { allowed: true };
|
|
396254
|
+
if (inherentlyRequiresTaskList) {
|
|
396255
|
+
return {
|
|
396256
|
+
allowed: false,
|
|
396257
|
+
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.`
|
|
396258
|
+
};
|
|
396259
|
+
}
|
|
396260
|
+
return {
|
|
396261
|
+
allowed: false,
|
|
396262
|
+
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.`
|
|
396263
|
+
};
|
|
396264
|
+
}
|
|
396265
|
+
var TASK_LIST_GATE_DEFAULTS, KNOWN_MUTATING_TOOLS, GATE_EXEMPT_TOOLS, ALWAYS_REQUIRE_PLAN_TOOLS;
|
|
396266
|
+
var init_taskListGate = __esm(() => {
|
|
396267
|
+
init_settings2();
|
|
396268
|
+
init_tasks();
|
|
396269
|
+
TASK_LIST_GATE_DEFAULTS = {
|
|
396270
|
+
enabled: true,
|
|
396271
|
+
freeReads: 3
|
|
396272
|
+
};
|
|
396273
|
+
KNOWN_MUTATING_TOOLS = new Set([
|
|
396274
|
+
"Edit",
|
|
396275
|
+
"MultiEdit",
|
|
396276
|
+
"Write",
|
|
396277
|
+
"NotebookEdit",
|
|
396278
|
+
"Bash",
|
|
396279
|
+
"Shell",
|
|
396280
|
+
"PowerShell",
|
|
396281
|
+
"Computer",
|
|
396282
|
+
"Agent",
|
|
396283
|
+
"Task",
|
|
396284
|
+
"REPL"
|
|
396285
|
+
]);
|
|
396286
|
+
GATE_EXEMPT_TOOLS = new Set([
|
|
396287
|
+
"TaskCreate",
|
|
396288
|
+
"TaskUpdate",
|
|
396289
|
+
"TaskList",
|
|
396290
|
+
"TaskGet",
|
|
396291
|
+
"TodoWrite",
|
|
396292
|
+
"ExitPlanMode"
|
|
396293
|
+
]);
|
|
396294
|
+
ALWAYS_REQUIRE_PLAN_TOOLS = new Set([
|
|
396295
|
+
"Agent",
|
|
396296
|
+
"Task"
|
|
396297
|
+
]);
|
|
396298
|
+
});
|
|
396299
|
+
|
|
396300
|
+
// src/utils/taskListRunContext.ts
|
|
396301
|
+
import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
|
|
396302
|
+
import { randomUUID as randomUUID40 } from "crypto";
|
|
396303
|
+
function runWithTaskListRun(run2, fn) {
|
|
396304
|
+
return taskListRunStorage.run({ run: run2 }, fn);
|
|
396305
|
+
}
|
|
396306
|
+
function getTaskListRunContext() {
|
|
396307
|
+
return taskListRunStorage.getStore()?.run;
|
|
396308
|
+
}
|
|
396309
|
+
function textFromQueuedCommand(command) {
|
|
396310
|
+
if (command.preExpansionValue)
|
|
396311
|
+
return command.preExpansionValue;
|
|
396312
|
+
if (typeof command.value === "string")
|
|
396313
|
+
return command.value;
|
|
396314
|
+
return command.value.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
|
|
396315
|
+
`);
|
|
396316
|
+
}
|
|
396317
|
+
function textFromMessage(message) {
|
|
396318
|
+
const content = message.message?.content;
|
|
396319
|
+
if (typeof content === "string")
|
|
396320
|
+
return content;
|
|
396321
|
+
if (!Array.isArray(content))
|
|
396322
|
+
return "";
|
|
396323
|
+
return content.filter((block2) => block2.type === "text").map((block2) => ("text" in block2) ? block2.text : "").join(`
|
|
396324
|
+
`);
|
|
396325
|
+
}
|
|
396326
|
+
function requestsAppendToCurrentTaskList(input) {
|
|
396327
|
+
const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
|
|
396328
|
+
if (!normalized)
|
|
396329
|
+
return false;
|
|
396330
|
+
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);
|
|
396331
|
+
}
|
|
396332
|
+
function requestsContinueCurrentTaskList(input) {
|
|
396333
|
+
const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase().replace(/[.!?]+$/gu, "").trim();
|
|
396334
|
+
if (!normalized || normalized.length > 80)
|
|
396335
|
+
return false;
|
|
396336
|
+
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);
|
|
396337
|
+
}
|
|
396338
|
+
function requestsRevisionOfCurrentTaskList(input) {
|
|
396339
|
+
const normalized = input.replace(/\s+/gu, " ").trim().toLowerCase();
|
|
396340
|
+
if (!normalized || normalized.length > 500)
|
|
396341
|
+
return false;
|
|
396342
|
+
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);
|
|
396343
|
+
}
|
|
396344
|
+
function shouldKeepCurrentTaskList(input) {
|
|
396345
|
+
return requestsAppendToCurrentTaskList(input) || requestsContinueCurrentTaskList(input) || requestsRevisionOfCurrentTaskList(input);
|
|
396346
|
+
}
|
|
396347
|
+
function withoutCode(input) {
|
|
396348
|
+
return input.replace(/```[\s\S]*?```/gu, " ").replace(/`[^`\n]*`/gu, " ");
|
|
396349
|
+
}
|
|
396350
|
+
function proseOnly(input) {
|
|
396351
|
+
return withoutCode(input).replace(/\s+/gu, " ").trim();
|
|
396352
|
+
}
|
|
396353
|
+
function taskListRequirementReason(input) {
|
|
396354
|
+
const text2 = proseOnly(input);
|
|
396355
|
+
if (!text2)
|
|
396356
|
+
return;
|
|
396357
|
+
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);
|
|
396358
|
+
if (optsOut)
|
|
396359
|
+
return;
|
|
396360
|
+
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)) {
|
|
396361
|
+
return "explicit task tracking request";
|
|
396362
|
+
}
|
|
396363
|
+
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)) {
|
|
396364
|
+
return "planning workflow";
|
|
396365
|
+
}
|
|
396366
|
+
if (/\b(?:delegate|delegation|sub[ -]?agents?|parallel\s+agents?|agent\s+team|team\s+of\s+agents?|fan[ -]?out)\b/iu.test(text2)) {
|
|
396367
|
+
return "delegation or parallel agent work";
|
|
396368
|
+
}
|
|
396369
|
+
const hasAction = new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(text2);
|
|
396370
|
+
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)) {
|
|
396371
|
+
return "release, security, migration, or production risk";
|
|
396372
|
+
}
|
|
396373
|
+
const structuralText = withoutCode(input);
|
|
396374
|
+
const enumeratedItems = structuralText.match(/(?:^|\n)\s*(?:[-*+]\s+|\d+[.)]\s+)\S/gu);
|
|
396375
|
+
const actionLines = structuralText.split(/\r?\n/gu).filter((line) => new RegExp(String.raw`\b${ACTION_WORD}\b`, "iu").test(line));
|
|
396376
|
+
if ((enumeratedItems?.length ?? 0) >= 2 || actionLines.length >= 2 || SEQUENCED_ACTION_RE.test(text2)) {
|
|
396377
|
+
return "multiple requested outcomes";
|
|
396378
|
+
}
|
|
396379
|
+
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");
|
|
396380
|
+
if (targetList.test(text2))
|
|
396381
|
+
return "multiple requested outcomes";
|
|
396382
|
+
const projectScope = /\b(?:app|application|agent|system|platform|website|dashboard|service|integration|workflow|codebase|project|plugin|extension|3d\s+(?:scene|design|pipeline))\b/iu;
|
|
396383
|
+
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;
|
|
396384
|
+
if (projectScope.test(text2) && projectAction.test(text2)) {
|
|
396385
|
+
return "large project scope";
|
|
396386
|
+
}
|
|
396387
|
+
ACTION_RE.lastIndex = 0;
|
|
396388
|
+
if (text2.length >= 600 && ACTION_RE.test(text2)) {
|
|
396389
|
+
return "detailed multi-step request";
|
|
396390
|
+
}
|
|
396391
|
+
return;
|
|
396392
|
+
}
|
|
396393
|
+
function getTaskListRunForCommand(command, options2 = {}) {
|
|
396394
|
+
if (!command || command.mode !== "prompt" || command.isMeta)
|
|
396395
|
+
return;
|
|
396396
|
+
const text2 = textFromQueuedCommand(command);
|
|
396397
|
+
if (!options2.allowSlashCommand && !command.skipSlashCommands && text2.trimStart().startsWith("/")) {
|
|
396398
|
+
return;
|
|
396399
|
+
}
|
|
396400
|
+
const requirementReason = taskListRequirementReason(text2);
|
|
396401
|
+
return {
|
|
396402
|
+
generationId: String(command.uuid ?? randomUUID40()),
|
|
396403
|
+
appendToCurrent: shouldKeepCurrentTaskList(text2),
|
|
396404
|
+
requiresTaskList: requirementReason !== undefined,
|
|
396405
|
+
...requirementReason ? { requirementReason } : {}
|
|
396406
|
+
};
|
|
396407
|
+
}
|
|
396408
|
+
function getTaskListRunFromMessages(messages) {
|
|
396409
|
+
const message = messages.findLast(isHumanTurn);
|
|
396410
|
+
if (!message || typeof message.uuid !== "string" || !message.uuid) {
|
|
396411
|
+
return;
|
|
396412
|
+
}
|
|
396413
|
+
const text2 = textFromMessage(message);
|
|
396414
|
+
const requirementReason = taskListRequirementReason(text2);
|
|
396415
|
+
return {
|
|
396416
|
+
generationId: message.uuid,
|
|
396417
|
+
appendToCurrent: shouldKeepCurrentTaskList(text2),
|
|
396418
|
+
requiresTaskList: requirementReason !== undefined,
|
|
396419
|
+
...requirementReason ? { requirementReason } : {}
|
|
396420
|
+
};
|
|
396421
|
+
}
|
|
396422
|
+
var taskListRunStorage, ACTION_WORD, ACTION_RE, SEQUENCED_ACTION_RE;
|
|
396423
|
+
var init_taskListRunContext = __esm(() => {
|
|
396424
|
+
taskListRunStorage = new AsyncLocalStorage5;
|
|
396425
|
+
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)`;
|
|
396426
|
+
ACTION_RE = new RegExp(String.raw`\b${ACTION_WORD}\b`, "giu");
|
|
396427
|
+
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");
|
|
396428
|
+
});
|
|
396429
|
+
|
|
396430
|
+
// src/tools/TaskCreateTool/prompt.ts
|
|
396431
|
+
function getPrompt4() {
|
|
396432
|
+
const teammateContext = isAgentSwarmsEnabled() ? " and potentially assigned to teammates" : "";
|
|
396433
|
+
const teammateTips = isAgentSwarmsEnabled() ? `- Include enough detail in the description for another agent to understand and complete the task
|
|
396434
|
+
- New tasks are created with status 'pending' and no owner - use TaskUpdate with the \`owner\` parameter to assign them
|
|
396435
|
+
` : "";
|
|
396436
|
+
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.
|
|
396437
|
+
It also helps the user understand the progress of the task and overall progress of their requests.
|
|
396438
|
+
|
|
396439
|
+
## When to Use This Tool
|
|
396440
|
+
|
|
396441
|
+
Use this tool proactively in these scenarios:
|
|
396442
|
+
|
|
396443
|
+
- Multi-outcome work - When a request has 2 or more distinct requested outcomes, deliverables, or sequenced actions
|
|
396444
|
+
- Non-trivial and complex tasks - Tasks that require careful planning or multiple operations${teammateContext}
|
|
396445
|
+
- Multiple independently verifiable outcomes, dependency ordering, delegation, or parallel work
|
|
396446
|
+
- High-risk lifecycle work - Releases, publishing, deployment, migrations, security, credentials, permissions, sandboxing, or production changes
|
|
396447
|
+
- Project-sized builds, integrations, workflows, refactors, and audits
|
|
396448
|
+
- Plan mode - When using plan mode, create a task list to track the work
|
|
396449
|
+
- User explicitly requests todo list - When the user directly asks you to use the todo list
|
|
396450
|
+
- 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.
|
|
396451
|
+
- User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
|
396452
|
+
- When new instructions materially change multi-step work - update the plan before continuing
|
|
396453
|
+
|
|
396454
|
+
## When NOT to Use This Tool
|
|
396455
|
+
|
|
396456
|
+
Skip using this tool when:
|
|
396457
|
+
- The task is purely conversational or informational
|
|
396458
|
+
- The request is one genuinely atomic, low-risk action with one outcome that can be completed and verified directly
|
|
396459
|
+
- The user sends a short acknowledgement, correction, or clarification that does not add a distinct outcome to an existing board
|
|
396460
|
+
|
|
396461
|
+
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.
|
|
396462
|
+
|
|
396463
|
+
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.
|
|
396464
|
+
|
|
396465
|
+
## Task Fields
|
|
396466
|
+
|
|
396467
|
+
- **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
|
|
396468
|
+
- **description**: What needs to be done
|
|
396469
|
+
- **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.
|
|
396470
|
+
- **blocks** / **addBlocks** (optional): Existing task IDs this task blocks
|
|
396471
|
+
- **blockedBy** / **addBlockedBy** (optional): Existing task IDs that block this task
|
|
396472
|
+
- **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.
|
|
396473
|
+
|
|
396474
|
+
All tasks are created with status \`pending\`.
|
|
396475
|
+
|
|
396476
|
+
## Tips
|
|
396477
|
+
|
|
396478
|
+
- Create tasks with clear, specific subjects that describe the outcome
|
|
396479
|
+
- 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.
|
|
396480
|
+
- A task can depend only on an existing different task; never add a self-dependency.
|
|
396481
|
+
${teammateTips}- Check TaskList first to avoid creating duplicate tasks
|
|
396482
|
+
- Use TaskUpdate, not TaskCreate, for status or ownership changes
|
|
396483
|
+
- 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
|
|
396484
|
+
- 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"
|
|
396485
|
+
`;
|
|
396486
|
+
}
|
|
396487
|
+
var DESCRIPTION12 = "Create a new task in the task list";
|
|
396488
|
+
var init_prompt16 = __esm(() => {
|
|
396489
|
+
init_agentSwarmsEnabled();
|
|
396490
|
+
});
|
|
396491
|
+
|
|
396492
|
+
// src/tools/TaskCreateTool/TaskCreateTool.ts
|
|
396493
|
+
async function createTaskFromInput({
|
|
396494
|
+
subject,
|
|
396495
|
+
description,
|
|
396496
|
+
activeForm,
|
|
396497
|
+
metadata,
|
|
396498
|
+
blocks,
|
|
396499
|
+
blockedBy,
|
|
396500
|
+
addBlocks,
|
|
396501
|
+
addBlockedBy,
|
|
396502
|
+
addToCurrentList
|
|
396503
|
+
}, context5) {
|
|
396504
|
+
const initialBlocks = [...new Set([...blocks ?? [], ...addBlocks ?? []])];
|
|
396505
|
+
const initialBlockedBy = [
|
|
396506
|
+
...new Set([...blockedBy ?? [], ...addBlockedBy ?? []])
|
|
396507
|
+
];
|
|
396508
|
+
const taskListId = getTaskListId();
|
|
396509
|
+
const run2 = getTaskListRunContext() ?? (context5.agentId ? undefined : getTaskListRunFromMessages(context5.messages ?? []));
|
|
396510
|
+
const taskData = {
|
|
396511
|
+
subject,
|
|
396512
|
+
description,
|
|
396513
|
+
activeForm,
|
|
396514
|
+
status: "pending",
|
|
396515
|
+
owner: undefined,
|
|
396516
|
+
blocks: [],
|
|
396517
|
+
blockedBy: [],
|
|
396518
|
+
metadata
|
|
396519
|
+
};
|
|
396520
|
+
const taskId = run2 ? await createTaskForRun(taskListId, run2.generationId, taskData, {
|
|
396521
|
+
appendToCurrent: run2.appendToCurrent || addToCurrentList === true
|
|
396522
|
+
}) : await createTask(taskListId, taskData);
|
|
396523
|
+
const dependencies = [
|
|
396524
|
+
...initialBlocks.map((targetId) => ({
|
|
396525
|
+
fromTaskId: taskId,
|
|
396526
|
+
toTaskId: targetId,
|
|
396527
|
+
field: "blocks"
|
|
396528
|
+
})),
|
|
396529
|
+
...initialBlockedBy.map((blockerId) => ({
|
|
396530
|
+
fromTaskId: blockerId,
|
|
396531
|
+
toTaskId: taskId,
|
|
396532
|
+
field: "blockedBy"
|
|
396533
|
+
}))
|
|
396534
|
+
].filter((edge) => edge.fromTaskId !== edge.toTaskId);
|
|
396535
|
+
const dependencyResult = await updateTaskWithDependencies(taskListId, taskId, {}, dependencies);
|
|
396536
|
+
if (dependencyResult.success === false) {
|
|
396537
|
+
const dependency = dependencyResult.dependency;
|
|
396538
|
+
await deleteTask(taskListId, taskId);
|
|
396539
|
+
if (dependency) {
|
|
396540
|
+
const field = dependencies.find((candidate) => candidate.fromTaskId === dependency.fromTaskId && candidate.toTaskId === dependency.toTaskId)?.field ?? "dependency";
|
|
396541
|
+
throw new Error(`Invalid ${field} dependency ` + `#${dependency.fromTaskId} -> #${dependency.toTaskId}: ` + dependencyResult.reason);
|
|
396542
|
+
}
|
|
396543
|
+
throw new Error(`Failed to create task dependencies: ${dependencyResult.reason}`);
|
|
396544
|
+
}
|
|
396545
|
+
const blockingErrors = [];
|
|
396546
|
+
const generator = executeTaskCreatedHooks(taskId, subject, description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
|
|
396547
|
+
for await (const result of generator) {
|
|
396548
|
+
if (result.blockingError) {
|
|
396549
|
+
blockingErrors.push(getTaskCreatedHookMessage(result.blockingError));
|
|
396550
|
+
}
|
|
396551
|
+
}
|
|
396552
|
+
if (blockingErrors.length > 0) {
|
|
396553
|
+
await deleteTask(taskListId, taskId);
|
|
396554
|
+
throw new Error(blockingErrors.join(`
|
|
396555
|
+
`));
|
|
396556
|
+
}
|
|
396557
|
+
context5.setAppState((prev) => prev.expandedView === "tasks" ? prev : { ...prev, expandedView: "tasks" });
|
|
396558
|
+
return { id: taskId, subject };
|
|
396559
|
+
}
|
|
396560
|
+
var inputSchema29, outputSchema25, TaskCreateTool;
|
|
396561
|
+
var init_TaskCreateTool = __esm(() => {
|
|
396562
|
+
init_v4();
|
|
396563
|
+
init_Tool();
|
|
396564
|
+
init_hooks5();
|
|
396565
|
+
init_tasks();
|
|
396566
|
+
init_taskListRunContext();
|
|
396567
|
+
init_teammate();
|
|
396568
|
+
init_prompt16();
|
|
396569
|
+
inputSchema29 = lazySchema(() => exports_external.strictObject({
|
|
396570
|
+
subject: exports_external.string().describe("A brief title for the task"),
|
|
396571
|
+
description: exports_external.string().describe("What needs to be done"),
|
|
396572
|
+
activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
|
|
396573
|
+
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task"),
|
|
396574
|
+
blocks: exports_external.array(exports_external.string()).optional().describe("Task IDs that this task blocks at creation time"),
|
|
396575
|
+
blockedBy: exports_external.array(exports_external.string()).optional().describe("Task IDs that block this task at creation time"),
|
|
396576
|
+
addBlocks: exports_external.array(exports_external.string()).optional().describe("Alias for blocks, accepted for compatibility with TaskUpdate"),
|
|
396577
|
+
addBlockedBy: exports_external.array(exports_external.string()).optional().describe("Alias for blockedBy, accepted for compatibility with TaskUpdate"),
|
|
396578
|
+
addToCurrentList: exports_external.boolean().optional().describe("Set true only when the user explicitly asks to append to the current task list")
|
|
396579
|
+
}));
|
|
396580
|
+
outputSchema25 = lazySchema(() => exports_external.object({
|
|
396581
|
+
task: exports_external.object({
|
|
396582
|
+
id: exports_external.string(),
|
|
396583
|
+
subject: exports_external.string()
|
|
396584
|
+
})
|
|
396585
|
+
}));
|
|
396586
|
+
TaskCreateTool = buildTool({
|
|
396587
|
+
name: TASK_CREATE_TOOL_NAME,
|
|
396588
|
+
searchHint: "create a task in the task list",
|
|
396589
|
+
maxResultSizeChars: 1e5,
|
|
396590
|
+
async description() {
|
|
396591
|
+
return DESCRIPTION12;
|
|
396592
|
+
},
|
|
396593
|
+
async prompt() {
|
|
396594
|
+
return getPrompt4();
|
|
396595
|
+
},
|
|
396596
|
+
get inputSchema() {
|
|
396597
|
+
return inputSchema29();
|
|
396598
|
+
},
|
|
396599
|
+
get outputSchema() {
|
|
396600
|
+
return outputSchema25();
|
|
396601
|
+
},
|
|
396602
|
+
userFacingName() {
|
|
396603
|
+
return "TaskCreate";
|
|
396604
|
+
},
|
|
396605
|
+
shouldDefer: false,
|
|
396606
|
+
isEnabled() {
|
|
396607
|
+
return isTodoV2Enabled();
|
|
396608
|
+
},
|
|
396609
|
+
isConcurrencySafe() {
|
|
396610
|
+
return false;
|
|
396611
|
+
},
|
|
396612
|
+
toAutoClassifierInput(input) {
|
|
396613
|
+
return input.subject;
|
|
396614
|
+
},
|
|
396615
|
+
renderToolUseMessage() {
|
|
396616
|
+
return null;
|
|
396617
|
+
},
|
|
396618
|
+
async call(input, context5) {
|
|
396619
|
+
const task = await createTaskFromInput(input, context5);
|
|
396620
|
+
return {
|
|
396621
|
+
data: {
|
|
396622
|
+
task
|
|
396623
|
+
}
|
|
396624
|
+
};
|
|
396625
|
+
},
|
|
396626
|
+
mapToolResultToToolResultBlockParam(content, toolUseID) {
|
|
396627
|
+
const { task } = content;
|
|
396628
|
+
return {
|
|
396629
|
+
tool_use_id: toolUseID,
|
|
396630
|
+
type: "tool_result",
|
|
396631
|
+
content: `Task #${task.id} created successfully: ${task.subject}`
|
|
396632
|
+
};
|
|
396633
|
+
}
|
|
396634
|
+
});
|
|
396635
|
+
});
|
|
396636
|
+
|
|
396637
|
+
// src/tools/ExitPlanModeTool/planTaskSync.ts
|
|
396638
|
+
function plainText(value) {
|
|
396639
|
+
return value.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)(?:\[[ xX]\]\s*)?/u, "").replace(/\[([^\]]+)\]\([^)]*\)/gu, "$1").replace(/[*_`~#]/gu, "").replace(/\s+/gu, " ").trim();
|
|
396640
|
+
}
|
|
396641
|
+
function boundedDescription(value) {
|
|
396642
|
+
const normalized = value.trim();
|
|
396643
|
+
return normalized.length <= 4000 ? normalized : `${normalized.slice(0, 3999)}\u2026`;
|
|
396644
|
+
}
|
|
396645
|
+
function taskSubject(value) {
|
|
396646
|
+
const cleaned = plainText(value).replace(/[.;:,]+$/u, "");
|
|
396647
|
+
const pathStep = cleaned.match(/^([^:]{1,100}\.[A-Za-z0-9]+):\s*(.+)$/u);
|
|
396648
|
+
const candidate = pathStep ? `${pathStep[2]} in ${pathStep[1]}` : cleaned;
|
|
396649
|
+
const actionable = ACTION_PREFIX.test(candidate) ? candidate : `Implement ${candidate.charAt(0).toLowerCase()}${candidate.slice(1)}`;
|
|
396650
|
+
return (actionable.charAt(0).toUpperCase() + actionable.slice(1)).slice(0, 120);
|
|
396651
|
+
}
|
|
396652
|
+
function extractCandidates(plan) {
|
|
396653
|
+
let section = "unknown";
|
|
396654
|
+
const candidates = [];
|
|
396655
|
+
for (const rawLine of plan.split(/\r?\n/gu)) {
|
|
396656
|
+
const heading2 = rawLine.match(/^\s{0,3}#{1,6}\s+(.+?)\s*#*\s*$/u);
|
|
396657
|
+
if (heading2) {
|
|
396658
|
+
const title = plainText(heading2[1] ?? "");
|
|
396659
|
+
section = VERIFICATION_SECTION.test(title) ? "verification" : NON_EXECUTION_SECTION.test(title) ? "ignored" : IMPLEMENTATION_SECTION.test(title) ? "implementation" : "unknown";
|
|
396660
|
+
continue;
|
|
396661
|
+
}
|
|
396662
|
+
if (!/^\s*(?:[-*+]\s+|\d+[.)]\s+)\S/u.test(rawLine))
|
|
396663
|
+
continue;
|
|
396664
|
+
const line = plainText(rawLine);
|
|
396665
|
+
if (line.length < 8 || section === "ignored")
|
|
396666
|
+
continue;
|
|
396667
|
+
const kind = section === "verification" || VERIFICATION_STEP.test(line) ? "verification" : "implementation";
|
|
396668
|
+
const subject = taskSubject(line);
|
|
396669
|
+
if (subject.length < 8)
|
|
396670
|
+
continue;
|
|
396671
|
+
candidates.push({ line, subject, kind });
|
|
396672
|
+
}
|
|
396673
|
+
return candidates;
|
|
396674
|
+
}
|
|
396675
|
+
function derivePlanTaskBlueprints(plan) {
|
|
396676
|
+
const unique = [];
|
|
396677
|
+
const seen = new Set;
|
|
396678
|
+
for (const candidate of extractCandidates(plan)) {
|
|
396679
|
+
const key = candidate.subject.toLocaleLowerCase();
|
|
396680
|
+
if (seen.has(key))
|
|
396681
|
+
continue;
|
|
396682
|
+
seen.add(key);
|
|
396683
|
+
unique.push(candidate);
|
|
396684
|
+
if (unique.length >= 8)
|
|
396685
|
+
break;
|
|
396686
|
+
}
|
|
396687
|
+
const implementation = unique.filter((item) => item.kind === "implementation").slice(0, 5);
|
|
396688
|
+
const verification = unique.find((item) => item.kind === "verification");
|
|
396689
|
+
const blueprints = implementation.map((item) => ({
|
|
396690
|
+
subject: item.subject,
|
|
396691
|
+
description: boundedDescription(`Approved plan step: ${item.line}`)
|
|
396692
|
+
}));
|
|
396693
|
+
if (blueprints.length === 0) {
|
|
396694
|
+
blueprints.push({
|
|
396695
|
+
subject: "Implement the approved plan",
|
|
396696
|
+
description: boundedDescription(plan.trim() || "Implement the work approved in plan mode."),
|
|
396697
|
+
activeForm: "Implementing the approved plan"
|
|
396698
|
+
});
|
|
396699
|
+
}
|
|
396700
|
+
blueprints.push({
|
|
396701
|
+
subject: verification?.subject ?? "Verify the completed implementation",
|
|
396702
|
+
description: boundedDescription(verification?.line ?? "Run the relevant tests and checks, then confirm the approved plan is complete."),
|
|
396703
|
+
activeForm: "Verifying the completed implementation"
|
|
396704
|
+
});
|
|
396705
|
+
return blueprints;
|
|
396706
|
+
}
|
|
396707
|
+
async function ensureApprovedPlanTasks(plan, planFilePath, context5) {
|
|
396708
|
+
const inspection = await inspectTaskListForGate(getTaskListId());
|
|
396709
|
+
if (countActionableTasksForGate(inspection.tasks) > 0)
|
|
396710
|
+
return [];
|
|
396711
|
+
const created = [];
|
|
396712
|
+
const implementationIds = [];
|
|
396713
|
+
const blueprints = derivePlanTaskBlueprints(plan ?? "");
|
|
396714
|
+
try {
|
|
396715
|
+
for (const [index2, blueprint] of blueprints.entries()) {
|
|
396716
|
+
const isVerification = index2 === blueprints.length - 1;
|
|
396717
|
+
const task = await createTaskFromInput({
|
|
396718
|
+
...blueprint,
|
|
396719
|
+
...isVerification && implementationIds.length > 0 ? { blockedBy: implementationIds } : {},
|
|
396720
|
+
metadata: {
|
|
396721
|
+
source: "approved-plan",
|
|
396722
|
+
planFilePath
|
|
396723
|
+
}
|
|
396724
|
+
}, context5);
|
|
396725
|
+
created.push(task.id);
|
|
396726
|
+
if (!isVerification)
|
|
396727
|
+
implementationIds.push(task.id);
|
|
396728
|
+
}
|
|
396729
|
+
return created;
|
|
396730
|
+
} catch (error40) {
|
|
396731
|
+
for (const taskId of created.reverse()) {
|
|
396732
|
+
await deleteTask(getTaskListId(), taskId).catch(() => false);
|
|
396733
|
+
}
|
|
396734
|
+
throw error40;
|
|
396735
|
+
}
|
|
396736
|
+
}
|
|
396737
|
+
var ACTION_PREFIX, IMPLEMENTATION_SECTION, VERIFICATION_SECTION, NON_EXECUTION_SECTION, VERIFICATION_STEP;
|
|
396738
|
+
var init_planTaskSync = __esm(() => {
|
|
396739
|
+
init_taskListGate();
|
|
396740
|
+
init_tasks();
|
|
396741
|
+
init_TaskCreateTool();
|
|
396742
|
+
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;
|
|
396743
|
+
IMPLEMENTATION_SECTION = /\b(?:approach|changes?|execution|implementation|migration|plan|steps?|tasks?|work)\b/iu;
|
|
396744
|
+
VERIFICATION_SECTION = /\b(?:acceptance|checks?|quality|tests?|validation|verification)\b/iu;
|
|
396745
|
+
NON_EXECUTION_SECTION = /\b(?:alternatives?|assumptions?|context|decisions?|goals?|notes?|out of scope|requirements?|risks?|scope)\b/iu;
|
|
396746
|
+
VERIFICATION_STEP = /\b(?:check|test|validate|verify)\b/iu;
|
|
396747
|
+
});
|
|
396748
|
+
|
|
396197
396749
|
// src/tools/ExitPlanModeTool/UI.tsx
|
|
396198
396750
|
function renderToolUseMessage19() {
|
|
396199
396751
|
return null;
|
|
@@ -396386,7 +396938,7 @@ function normalizeExitPlanModeInput(value) {
|
|
|
396386
396938
|
allowedPrompts: normalizeAllowedPromptsValue(rawAllowedPrompts)
|
|
396387
396939
|
};
|
|
396388
396940
|
}
|
|
396389
|
-
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema,
|
|
396941
|
+
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema, inputSchema30, _sdkInputSchema, outputSchema26, ExitPlanModeV2Tool;
|
|
396390
396942
|
var init_ExitPlanModeV2Tool = __esm(() => {
|
|
396391
396943
|
init_v4();
|
|
396392
396944
|
init_state();
|
|
@@ -396402,6 +396954,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396402
396954
|
init_teammateMailbox();
|
|
396403
396955
|
init_constants2();
|
|
396404
396956
|
init_prompt15();
|
|
396957
|
+
init_planTaskSync();
|
|
396405
396958
|
init_UI18();
|
|
396406
396959
|
allowedPromptSchema = lazySchema(() => exports_external.object({
|
|
396407
396960
|
tool: exports_external.enum(["Bash"]).describe("The tool this prompt applies to"),
|
|
@@ -396411,12 +396964,12 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396411
396964
|
inputObjectSchema = lazySchema(() => exports_external.strictObject({
|
|
396412
396965
|
allowedPrompts: allowedPromptsSchema().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")
|
|
396413
396966
|
}).passthrough());
|
|
396414
|
-
|
|
396967
|
+
inputSchema30 = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema()));
|
|
396415
396968
|
_sdkInputSchema = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema().extend({
|
|
396416
396969
|
plan: exports_external.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),
|
|
396417
396970
|
planFilePath: exports_external.string().optional().describe("The plan file path (injected by normalizeToolInput)")
|
|
396418
396971
|
})));
|
|
396419
|
-
|
|
396972
|
+
outputSchema26 = lazySchema(() => exports_external.object({
|
|
396420
396973
|
plan: exports_external.string().nullable().describe("The plan that was presented to the user"),
|
|
396421
396974
|
isAgent: exports_external.boolean(),
|
|
396422
396975
|
filePath: exports_external.string().optional().describe("The file path where the plan was saved"),
|
|
@@ -396424,7 +396977,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396424
396977
|
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
396978
|
awaitingLeaderApproval: exports_external.boolean().optional().describe("When true, the teammate has sent a plan approval request to the team leader"),
|
|
396426
396979
|
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")
|
|
396980
|
+
requestId: exports_external.string().optional().describe("Unique identifier for the plan approval request"),
|
|
396981
|
+
synchronizedTaskIds: exports_external.array(exports_external.string()).optional().describe("Visible task IDs created from the approved plan when none existed")
|
|
396428
396982
|
}));
|
|
396429
396983
|
ExitPlanModeV2Tool = buildTool({
|
|
396430
396984
|
name: EXIT_PLAN_MODE_V2_TOOL_NAME,
|
|
@@ -396437,10 +396991,10 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396437
396991
|
return EXIT_PLAN_MODE_V2_TOOL_PROMPT;
|
|
396438
396992
|
},
|
|
396439
396993
|
get inputSchema() {
|
|
396440
|
-
return
|
|
396994
|
+
return inputSchema30();
|
|
396441
396995
|
},
|
|
396442
396996
|
get outputSchema() {
|
|
396443
|
-
return
|
|
396997
|
+
return outputSchema26();
|
|
396444
396998
|
},
|
|
396445
396999
|
userFacingName() {
|
|
396446
397000
|
return "";
|
|
@@ -396553,6 +397107,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396553
397107
|
}
|
|
396554
397108
|
};
|
|
396555
397109
|
}
|
|
397110
|
+
const synchronizedTaskIds = isAgent ? [] : await ensureApprovedPlanTasks(plan, filePath, context5);
|
|
396556
397111
|
const appState = context5.getAppState();
|
|
396557
397112
|
let gateFallbackNotification = null;
|
|
396558
397113
|
if (false) {}
|
|
@@ -396595,7 +397150,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396595
397150
|
isAgent,
|
|
396596
397151
|
filePath,
|
|
396597
397152
|
hasTaskTool: hasTaskTool || undefined,
|
|
396598
|
-
planWasEdited: inputPlan !== undefined || undefined
|
|
397153
|
+
planWasEdited: inputPlan !== undefined || undefined,
|
|
397154
|
+
synchronizedTaskIds
|
|
396599
397155
|
}
|
|
396600
397156
|
};
|
|
396601
397157
|
},
|
|
@@ -396607,7 +397163,8 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
396607
397163
|
planWasEdited,
|
|
396608
397164
|
awaitingLeaderApproval,
|
|
396609
397165
|
requestId,
|
|
396610
|
-
alreadyExited
|
|
397166
|
+
alreadyExited,
|
|
397167
|
+
synchronizedTaskIds
|
|
396611
397168
|
}, toolUseID) {
|
|
396612
397169
|
if (alreadyExited) {
|
|
396613
397170
|
return {
|
|
@@ -396652,10 +397209,15 @@ Request ID: ${requestId}`,
|
|
|
396652
397209
|
const teamHint = hasTaskTool ? `
|
|
396653
397210
|
|
|
396654
397211
|
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.` : "";
|
|
397212
|
+
const taskHint = synchronizedTaskIds && synchronizedTaskIds.length > 0 ? `
|
|
397213
|
+
|
|
397214
|
+
Visible implementation tasks are ready: ${synchronizedTaskIds.map((id) => `#${id}`).join(", ")}. Start the first unblocked task and keep their statuses current.` : `
|
|
397215
|
+
|
|
397216
|
+
Use the existing visible task list and keep its statuses current while implementing.`;
|
|
396655
397217
|
const planLabel = planWasEdited ? "Approved Plan (edited by user)" : "Approved Plan";
|
|
396656
397218
|
return {
|
|
396657
397219
|
type: "tool_result",
|
|
396658
|
-
content: `User has approved your plan. You can now start coding
|
|
397220
|
+
content: `User has approved your plan. You can now start coding.${taskHint}
|
|
396659
397221
|
|
|
396660
397222
|
Your plan has been saved to: ${filePath}
|
|
396661
397223
|
You can refer back to it if needed during implementation.${teamHint}
|
|
@@ -396669,11 +397231,11 @@ ${plan}`,
|
|
|
396669
397231
|
});
|
|
396670
397232
|
|
|
396671
397233
|
// src/tools/testing/TestingPermissionTool.tsx
|
|
396672
|
-
var NAME = "TestingPermission",
|
|
397234
|
+
var NAME = "TestingPermission", inputSchema31, TestingPermissionTool;
|
|
396673
397235
|
var init_TestingPermissionTool = __esm(() => {
|
|
396674
397236
|
init_v4();
|
|
396675
397237
|
init_Tool();
|
|
396676
|
-
|
|
397238
|
+
inputSchema31 = lazySchema(() => exports_external.strictObject({}));
|
|
396677
397239
|
TestingPermissionTool = buildTool({
|
|
396678
397240
|
name: NAME,
|
|
396679
397241
|
maxResultSizeChars: 1e5,
|
|
@@ -396684,7 +397246,7 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
396684
397246
|
return "Test tool that always asks for permission before executing. Used for end-to-end testing.";
|
|
396685
397247
|
},
|
|
396686
397248
|
get inputSchema() {
|
|
396687
|
-
return
|
|
397249
|
+
return inputSchema31();
|
|
396688
397250
|
},
|
|
396689
397251
|
userFacingName() {
|
|
396690
397252
|
return "TestingPermission";
|
|
@@ -396758,7 +397320,7 @@ function formatLimitInfo(appliedLimit, appliedOffset) {
|
|
|
396758
397320
|
parts.push(`offset: ${appliedOffset}`);
|
|
396759
397321
|
return parts.join(", ");
|
|
396760
397322
|
}
|
|
396761
|
-
var
|
|
397323
|
+
var inputSchema32, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema27, GrepTool;
|
|
396762
397324
|
var init_GrepTool = __esm(() => {
|
|
396763
397325
|
init_v4();
|
|
396764
397326
|
init_Tool();
|
|
@@ -396776,7 +397338,7 @@ var init_GrepTool = __esm(() => {
|
|
|
396776
397338
|
init_stringUtils();
|
|
396777
397339
|
init_prompt2();
|
|
396778
397340
|
init_UI10();
|
|
396779
|
-
|
|
397341
|
+
inputSchema32 = lazySchema(() => exports_external.strictObject({
|
|
396780
397342
|
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
396781
397343
|
path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
|
|
396782
397344
|
glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
|
|
@@ -396800,7 +397362,7 @@ var init_GrepTool = __esm(() => {
|
|
|
396800
397362
|
".jj",
|
|
396801
397363
|
".sl"
|
|
396802
397364
|
];
|
|
396803
|
-
|
|
397365
|
+
outputSchema27 = lazySchema(() => exports_external.object({
|
|
396804
397366
|
mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
|
|
396805
397367
|
numFiles: exports_external.number(),
|
|
396806
397368
|
filenames: exports_external.array(exports_external.string()),
|
|
@@ -396827,10 +397389,10 @@ var init_GrepTool = __esm(() => {
|
|
|
396827
397389
|
return summary ? `Searching for ${summary}` : "Searching";
|
|
396828
397390
|
},
|
|
396829
397391
|
get inputSchema() {
|
|
396830
|
-
return
|
|
397392
|
+
return inputSchema32();
|
|
396831
397393
|
},
|
|
396832
397394
|
get outputSchema() {
|
|
396833
|
-
return
|
|
397395
|
+
return outputSchema27();
|
|
396834
397396
|
},
|
|
396835
397397
|
isConcurrencySafe() {
|
|
396836
397398
|
return true;
|
|
@@ -398301,7 +398863,7 @@ Notes:
|
|
|
398301
398863
|
- Returns file paths with line ranges and a short preview for each hit.`;
|
|
398302
398864
|
}
|
|
398303
398865
|
var CODE_SEARCH_TOOL_NAME = "CodeSearch";
|
|
398304
|
-
var
|
|
398866
|
+
var init_prompt17 = __esm(() => {
|
|
398305
398867
|
init_prompt2();
|
|
398306
398868
|
});
|
|
398307
398869
|
|
|
@@ -398314,20 +398876,20 @@ function formatHit(hit) {
|
|
|
398314
398876
|
return `${hit.file}:${hit.startLine}-${hit.endLine} (score ${score})
|
|
398315
398877
|
${indentedPreview}`;
|
|
398316
398878
|
}
|
|
398317
|
-
var
|
|
398879
|
+
var inputSchema33, outputSchema28, DEFAULT_LIMIT = 10, CodeSearchTool;
|
|
398318
398880
|
var init_CodeSearchTool = __esm(() => {
|
|
398319
398881
|
init_v4();
|
|
398320
398882
|
init_Tool();
|
|
398321
398883
|
init_cwd2();
|
|
398322
398884
|
init_codeIndex();
|
|
398323
398885
|
init_semanticNumber();
|
|
398324
|
-
|
|
398325
|
-
|
|
398886
|
+
init_prompt17();
|
|
398887
|
+
inputSchema33 = lazySchema(() => exports_external.strictObject({
|
|
398326
398888
|
query: exports_external.string().describe('Natural-language description of the code you are looking for (e.g. "retry logic for failed network requests").'),
|
|
398327
398889
|
limit: semanticNumber(exports_external.number().optional()).describe("Maximum number of results to return. Defaults to 10."),
|
|
398328
398890
|
path: exports_external.string().optional().describe('Optional project-relative path prefix to restrict results to (e.g. "src/tools").')
|
|
398329
398891
|
}));
|
|
398330
|
-
|
|
398892
|
+
outputSchema28 = lazySchema(() => exports_external.object({
|
|
398331
398893
|
status: exports_external.enum(["ok", "no_index", "empty"]),
|
|
398332
398894
|
message: exports_external.string().optional(),
|
|
398333
398895
|
builtAt: exports_external.string().optional(),
|
|
@@ -398357,10 +398919,10 @@ var init_CodeSearchTool = __esm(() => {
|
|
|
398357
398919
|
return input?.query ? `Searching code for ${input.query}` : "Searching code";
|
|
398358
398920
|
},
|
|
398359
398921
|
get inputSchema() {
|
|
398360
|
-
return
|
|
398922
|
+
return inputSchema33();
|
|
398361
398923
|
},
|
|
398362
398924
|
get outputSchema() {
|
|
398363
|
-
return
|
|
398925
|
+
return outputSchema28();
|
|
398364
398926
|
},
|
|
398365
398927
|
isEnabled() {
|
|
398366
398928
|
return isCodeIndexEnabled();
|
|
@@ -398818,7 +399380,7 @@ var init_formatters = __esm(() => {
|
|
|
398818
399380
|
});
|
|
398819
399381
|
|
|
398820
399382
|
// src/tools/LSPTool/prompt.ts
|
|
398821
|
-
var LSP_TOOL_NAME = "LSP",
|
|
399383
|
+
var LSP_TOOL_NAME = "LSP", DESCRIPTION13 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
398822
399384
|
|
|
398823
399385
|
Supported operations:
|
|
398824
399386
|
- goToDefinition: Find where a symbol is defined
|
|
@@ -399510,7 +400072,7 @@ function countUniqueFilesFromOutgoingCalls(calls) {
|
|
|
399510
400072
|
const validUris = calls.map((call6) => call6.to?.uri).filter((uri) => uri);
|
|
399511
400073
|
return new Set(validUris).size;
|
|
399512
400074
|
}
|
|
399513
|
-
var MAX_LSP_FILE_SIZE_BYTES = 1e7,
|
|
400075
|
+
var MAX_LSP_FILE_SIZE_BYTES = 1e7, inputSchema34, outputSchema29, LSPTool;
|
|
399514
400076
|
var init_LSPTool = __esm(() => {
|
|
399515
400077
|
init_v4();
|
|
399516
400078
|
init_manager();
|
|
@@ -399526,7 +400088,7 @@ var init_LSPTool = __esm(() => {
|
|
|
399526
400088
|
init_formatters();
|
|
399527
400089
|
init_schemas5();
|
|
399528
400090
|
init_UI19();
|
|
399529
|
-
|
|
400091
|
+
inputSchema34 = lazySchema(() => exports_external.strictObject({
|
|
399530
400092
|
operation: exports_external.enum([
|
|
399531
400093
|
"goToDefinition",
|
|
399532
400094
|
"findReferences",
|
|
@@ -399542,7 +400104,7 @@ var init_LSPTool = __esm(() => {
|
|
|
399542
400104
|
line: exports_external.number().int().positive().describe("The line number (1-based, as shown in editors)"),
|
|
399543
400105
|
character: exports_external.number().int().positive().describe("The character offset (1-based, as shown in editors)")
|
|
399544
400106
|
}));
|
|
399545
|
-
|
|
400107
|
+
outputSchema29 = lazySchema(() => exports_external.object({
|
|
399546
400108
|
operation: exports_external.enum([
|
|
399547
400109
|
"goToDefinition",
|
|
399548
400110
|
"findReferences",
|
|
@@ -399565,7 +400127,7 @@ var init_LSPTool = __esm(() => {
|
|
|
399565
400127
|
maxResultSizeChars: 1e5,
|
|
399566
400128
|
isLsp: true,
|
|
399567
400129
|
async description() {
|
|
399568
|
-
return
|
|
400130
|
+
return DESCRIPTION13;
|
|
399569
400131
|
},
|
|
399570
400132
|
userFacingName: userFacingName6,
|
|
399571
400133
|
shouldDefer: true,
|
|
@@ -399573,10 +400135,10 @@ var init_LSPTool = __esm(() => {
|
|
|
399573
400135
|
return isLspConnected();
|
|
399574
400136
|
},
|
|
399575
400137
|
get inputSchema() {
|
|
399576
|
-
return
|
|
400138
|
+
return inputSchema34();
|
|
399577
400139
|
},
|
|
399578
400140
|
get outputSchema() {
|
|
399579
|
-
return
|
|
400141
|
+
return outputSchema29();
|
|
399580
400142
|
},
|
|
399581
400143
|
isConcurrencySafe() {
|
|
399582
400144
|
return true;
|
|
@@ -399634,7 +400196,7 @@ var init_LSPTool = __esm(() => {
|
|
|
399634
400196
|
return checkReadPermissionForTool(LSPTool, input, appState.toolPermissionContext);
|
|
399635
400197
|
},
|
|
399636
400198
|
async prompt() {
|
|
399637
|
-
return
|
|
400199
|
+
return DESCRIPTION13;
|
|
399638
400200
|
},
|
|
399639
400201
|
renderToolUseMessage: renderToolUseMessage20,
|
|
399640
400202
|
renderToolUseErrorMessage: renderToolUseErrorMessage10,
|
|
@@ -399954,19 +400516,20 @@ function getEnterPlanModeToolPrompt() {
|
|
|
399954
400516
|
return process.env.USER_TYPE === "ant" ? getEnterPlanModeToolPromptAnt() : getEnterPlanModeToolPromptExternal();
|
|
399955
400517
|
}
|
|
399956
400518
|
var WHAT_HAPPENS_SECTION;
|
|
399957
|
-
var
|
|
400519
|
+
var init_prompt18 = __esm(() => {
|
|
399958
400520
|
init_planModeV2();
|
|
399959
400521
|
init_prompt();
|
|
399960
400522
|
WHAT_HAPPENS_SECTION = `## What Happens in Plan Mode
|
|
399961
400523
|
|
|
399962
400524
|
In plan mode, you'll:
|
|
399963
400525
|
1. Thoroughly explore the codebase using Glob, Grep, and Read tools
|
|
399964
|
-
2.
|
|
399965
|
-
3.
|
|
399966
|
-
4.
|
|
399967
|
-
5.
|
|
399968
|
-
6.
|
|
399969
|
-
7.
|
|
400526
|
+
2. Delegate early research only to UR's shipped read-only Explore or Plan agents; other delegation requires an actionable parent task
|
|
400527
|
+
3. Understand existing patterns and architecture
|
|
400528
|
+
4. Design an implementation approach
|
|
400529
|
+
5. Present your plan to the user for approval
|
|
400530
|
+
6. Use ${ASK_USER_QUESTION_TOOL_NAME} if you need to clarify approaches
|
|
400531
|
+
7. Use TaskCreate for manual task decomposition when useful; plan-file writes are allowed while planning
|
|
400532
|
+
8. Exit plan mode with ExitPlanMode when ready. After approval, ExitPlanMode guarantees that visible implementation tasks exist before coding begins
|
|
399970
400533
|
|
|
399971
400534
|
`;
|
|
399972
400535
|
});
|
|
@@ -400026,7 +400589,7 @@ var init_UI20 = __esm(() => {
|
|
|
400026
400589
|
});
|
|
400027
400590
|
|
|
400028
400591
|
// src/tools/EnterPlanModeTool/EnterPlanModeTool.ts
|
|
400029
|
-
var
|
|
400592
|
+
var inputSchema35, outputSchema30, EnterPlanModeTool;
|
|
400030
400593
|
var init_EnterPlanModeTool = __esm(() => {
|
|
400031
400594
|
init_v4();
|
|
400032
400595
|
init_state();
|
|
@@ -400034,10 +400597,10 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
400034
400597
|
init_PermissionUpdate();
|
|
400035
400598
|
init_permissionSetup();
|
|
400036
400599
|
init_planModeV2();
|
|
400037
|
-
|
|
400600
|
+
init_prompt18();
|
|
400038
400601
|
init_UI20();
|
|
400039
|
-
|
|
400040
|
-
|
|
400602
|
+
inputSchema35 = lazySchema(() => exports_external.strictObject({}));
|
|
400603
|
+
outputSchema30 = lazySchema(() => exports_external.object({
|
|
400041
400604
|
message: exports_external.string().describe("Confirmation that plan mode was entered")
|
|
400042
400605
|
}));
|
|
400043
400606
|
EnterPlanModeTool = buildTool({
|
|
@@ -400051,10 +400614,10 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
400051
400614
|
return getEnterPlanModeToolPrompt();
|
|
400052
400615
|
},
|
|
400053
400616
|
get inputSchema() {
|
|
400054
|
-
return
|
|
400617
|
+
return inputSchema35();
|
|
400055
400618
|
},
|
|
400056
400619
|
get outputSchema() {
|
|
400057
|
-
return
|
|
400620
|
+
return outputSchema30();
|
|
400058
400621
|
},
|
|
400059
400622
|
userFacingName() {
|
|
400060
400623
|
return "";
|
|
@@ -400085,7 +400648,7 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
400085
400648
|
}));
|
|
400086
400649
|
return {
|
|
400087
400650
|
data: {
|
|
400088
|
-
message: "Entered plan mode. Explore the codebase
|
|
400651
|
+
message: "Entered plan mode. Explore the codebase and write the plan file. UR's shipped read-only Explore and Plan agents may assist before tasks exist; other delegation requires an actionable parent task. TaskCreate remains available for manual decomposition; after approval, ExitPlanMode guarantees visible implementation tasks before coding begins."
|
|
400089
400652
|
}
|
|
400090
400653
|
};
|
|
400091
400654
|
},
|
|
@@ -400100,8 +400663,9 @@ In plan mode, you should:
|
|
|
400100
400663
|
3. Consider multiple approaches and their trade-offs
|
|
400101
400664
|
4. Use AskUserQuestion if you need to clarify the approach
|
|
400102
400665
|
5. Design a concrete implementation strategy
|
|
400103
|
-
6.
|
|
400104
|
-
7.
|
|
400666
|
+
6. Before tasks exist, delegate only to UR's shipped read-only Explore or Plan agents; other delegation requires an actionable parent task
|
|
400667
|
+
7. If useful, use TaskCreate to decompose the work manually; plan-file writes remain allowed while planning
|
|
400668
|
+
8. When ready, use ExitPlanMode to present your plan for approval. After approval, it guarantees visible implementation tasks before coding begins
|
|
400105
400669
|
|
|
400106
400670
|
Remember: DO NOT write or edit any files yet. This is a read-only exploration and planning phase.`;
|
|
400107
400671
|
return {
|
|
@@ -400209,7 +400773,7 @@ var init_UI21 = __esm(() => {
|
|
|
400209
400773
|
});
|
|
400210
400774
|
|
|
400211
400775
|
// src/tools/EnterWorktreeTool/EnterWorktreeTool.ts
|
|
400212
|
-
var
|
|
400776
|
+
var inputSchema36, outputSchema31, EnterWorktreeTool;
|
|
400213
400777
|
var init_EnterWorktreeTool = __esm(() => {
|
|
400214
400778
|
init_v4();
|
|
400215
400779
|
init_state();
|
|
@@ -400224,7 +400788,7 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
400224
400788
|
init_sessionStorage();
|
|
400225
400789
|
init_worktree3();
|
|
400226
400790
|
init_UI21();
|
|
400227
|
-
|
|
400791
|
+
inputSchema36 = lazySchema(() => exports_external.strictObject({
|
|
400228
400792
|
name: exports_external.string().superRefine((s, ctx) => {
|
|
400229
400793
|
try {
|
|
400230
400794
|
validateWorktreeSlug(s);
|
|
@@ -400233,7 +400797,7 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
400233
400797
|
}
|
|
400234
400798
|
}).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
400799
|
}));
|
|
400236
|
-
|
|
400800
|
+
outputSchema31 = lazySchema(() => exports_external.object({
|
|
400237
400801
|
worktreePath: exports_external.string(),
|
|
400238
400802
|
worktreeBranch: exports_external.string().optional(),
|
|
400239
400803
|
message: exports_external.string()
|
|
@@ -400249,10 +400813,10 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
400249
400813
|
return getEnterWorktreeToolPrompt();
|
|
400250
400814
|
},
|
|
400251
400815
|
get inputSchema() {
|
|
400252
|
-
return
|
|
400816
|
+
return inputSchema36();
|
|
400253
400817
|
},
|
|
400254
400818
|
get outputSchema() {
|
|
400255
|
-
return
|
|
400819
|
+
return outputSchema31();
|
|
400256
400820
|
},
|
|
400257
400821
|
userFacingName() {
|
|
400258
400822
|
return "Creating worktree";
|
|
@@ -400419,7 +400983,7 @@ function restoreSessionToOriginalCwd(originalCwd, projectRootIsWorktree) {
|
|
|
400419
400983
|
clearMemoryFileCaches();
|
|
400420
400984
|
getPlansDirectory.cache.clear?.();
|
|
400421
400985
|
}
|
|
400422
|
-
var
|
|
400986
|
+
var inputSchema37, outputSchema32, ExitWorktreeTool;
|
|
400423
400987
|
var init_ExitWorktreeTool = __esm(() => {
|
|
400424
400988
|
init_v4();
|
|
400425
400989
|
init_state();
|
|
@@ -400434,11 +400998,11 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
400434
400998
|
init_sessionStorage();
|
|
400435
400999
|
init_worktree3();
|
|
400436
401000
|
init_UI22();
|
|
400437
|
-
|
|
401001
|
+
inputSchema37 = lazySchema(() => exports_external.strictObject({
|
|
400438
401002
|
action: exports_external.enum(["keep", "remove"]).describe('"keep" leaves the worktree and branch on disk; "remove" deletes both.'),
|
|
400439
401003
|
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
401004
|
}));
|
|
400441
|
-
|
|
401005
|
+
outputSchema32 = lazySchema(() => exports_external.object({
|
|
400442
401006
|
action: exports_external.enum(["keep", "remove"]),
|
|
400443
401007
|
originalCwd: exports_external.string(),
|
|
400444
401008
|
worktreePath: exports_external.string(),
|
|
@@ -400459,10 +401023,10 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
400459
401023
|
return getExitWorktreeToolPrompt();
|
|
400460
401024
|
},
|
|
400461
401025
|
get inputSchema() {
|
|
400462
|
-
return
|
|
401026
|
+
return inputSchema37();
|
|
400463
401027
|
},
|
|
400464
401028
|
get outputSchema() {
|
|
400465
|
-
return
|
|
401029
|
+
return outputSchema32();
|
|
400466
401030
|
},
|
|
400467
401031
|
userFacingName() {
|
|
400468
401032
|
return "Exiting worktree";
|
|
@@ -401365,8 +401929,8 @@ ${lines.join(`
|
|
|
401365
401929
|
- model - Override the default model (modelS, modelO, modelH, best, or full model ID)`;
|
|
401366
401930
|
}
|
|
401367
401931
|
}
|
|
401368
|
-
var
|
|
401369
|
-
var
|
|
401932
|
+
var DESCRIPTION14 = "Get or set UR configuration settings.";
|
|
401933
|
+
var init_prompt19 = __esm(() => {
|
|
401370
401934
|
init_modelOptions();
|
|
401371
401935
|
init_voiceModeEnabled();
|
|
401372
401936
|
init_supportedSettings();
|
|
@@ -402071,7 +402635,7 @@ function buildNestedObject(path18, value) {
|
|
|
402071
402635
|
}
|
|
402072
402636
|
return { [key]: buildNestedObject(path18.slice(1), value) };
|
|
402073
402637
|
}
|
|
402074
|
-
var
|
|
402638
|
+
var inputSchema38, outputSchema33, ConfigTool;
|
|
402075
402639
|
var init_ConfigTool = __esm(() => {
|
|
402076
402640
|
init_v4();
|
|
402077
402641
|
init_analytics();
|
|
@@ -402081,14 +402645,14 @@ var init_ConfigTool = __esm(() => {
|
|
|
402081
402645
|
init_log2();
|
|
402082
402646
|
init_settings2();
|
|
402083
402647
|
init_slowOperations();
|
|
402084
|
-
|
|
402648
|
+
init_prompt19();
|
|
402085
402649
|
init_supportedSettings();
|
|
402086
402650
|
init_UI23();
|
|
402087
|
-
|
|
402651
|
+
inputSchema38 = lazySchema(() => exports_external.strictObject({
|
|
402088
402652
|
setting: exports_external.string().describe('The setting key (e.g., "theme", "model", "permissions.defaultMode")'),
|
|
402089
402653
|
value: exports_external.union([exports_external.string(), exports_external.boolean(), exports_external.number()]).optional().describe("The new value. Omit to get current value.")
|
|
402090
402654
|
}));
|
|
402091
|
-
|
|
402655
|
+
outputSchema33 = lazySchema(() => exports_external.object({
|
|
402092
402656
|
success: exports_external.boolean(),
|
|
402093
402657
|
operation: exports_external.enum(["get", "set"]).optional(),
|
|
402094
402658
|
setting: exports_external.string().optional(),
|
|
@@ -402102,16 +402666,16 @@ var init_ConfigTool = __esm(() => {
|
|
|
402102
402666
|
searchHint: "get or set UR settings (theme, model)",
|
|
402103
402667
|
maxResultSizeChars: 1e5,
|
|
402104
402668
|
async description() {
|
|
402105
|
-
return
|
|
402669
|
+
return DESCRIPTION14;
|
|
402106
402670
|
},
|
|
402107
402671
|
async prompt() {
|
|
402108
402672
|
return generatePrompt();
|
|
402109
402673
|
},
|
|
402110
402674
|
get inputSchema() {
|
|
402111
|
-
return
|
|
402675
|
+
return inputSchema38();
|
|
402112
402676
|
},
|
|
402113
402677
|
get outputSchema() {
|
|
402114
|
-
return
|
|
402678
|
+
return outputSchema33();
|
|
402115
402679
|
},
|
|
402116
402680
|
userFacingName() {
|
|
402117
402681
|
return "Config";
|
|
@@ -402414,346 +402978,6 @@ var init_ConfigTool = __esm(() => {
|
|
|
402414
402978
|
});
|
|
402415
402979
|
});
|
|
402416
402980
|
|
|
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
402981
|
// src/tools/TaskGetTool/prompt.ts
|
|
402758
402982
|
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
402983
|
|
|
@@ -412803,7 +413027,7 @@ function isAnyTracingEnabled() {
|
|
|
412803
413027
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
412804
413028
|
}
|
|
412805
413029
|
function getTracer() {
|
|
412806
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.
|
|
413030
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.80.6");
|
|
412807
413031
|
}
|
|
412808
413032
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
412809
413033
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -413461,99 +413685,6 @@ var init_toolErrors = __esm(() => {
|
|
|
413461
413685
|
init_messages();
|
|
413462
413686
|
});
|
|
413463
413687
|
|
|
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
413688
|
// src/stability/types.ts
|
|
413558
413689
|
var DEFAULT_LIMITS;
|
|
413559
413690
|
var init_types12 = __esm(() => {
|
|
@@ -414338,6 +414469,29 @@ async function countTasksForGate() {
|
|
|
414338
414469
|
return null;
|
|
414339
414470
|
}
|
|
414340
414471
|
}
|
|
414472
|
+
function isCurrentPlanFileMutation(toolName, input, context5) {
|
|
414473
|
+
if (context5.getAppState().toolPermissionContext.mode !== "plan" || toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME || !input || typeof input !== "object" || Array.isArray(input)) {
|
|
414474
|
+
return false;
|
|
414475
|
+
}
|
|
414476
|
+
const filePath = input.file_path;
|
|
414477
|
+
if (typeof filePath !== "string")
|
|
414478
|
+
return false;
|
|
414479
|
+
try {
|
|
414480
|
+
return expandPath(filePath) === expandPath(getPlanFilePath(context5.agentId));
|
|
414481
|
+
} catch {
|
|
414482
|
+
return false;
|
|
414483
|
+
}
|
|
414484
|
+
}
|
|
414485
|
+
function isReadOnlyPlanningDelegation(toolName, input, context5) {
|
|
414486
|
+
if (context5.agentId || context5.getAppState().toolPermissionContext.mode !== "plan" || toolName !== AGENT_TOOL_NAME && toolName !== LEGACY_AGENT_TOOL_NAME || !input || typeof input !== "object" || Array.isArray(input)) {
|
|
414487
|
+
return false;
|
|
414488
|
+
}
|
|
414489
|
+
const delegation = input;
|
|
414490
|
+
if (typeof delegation.subagent_type !== "string" || !READ_ONLY_PLANNING_AGENT_TYPES.has(delegation.subagent_type) || delegation.name !== undefined || delegation.team_name !== undefined || delegation.isolation !== undefined) {
|
|
414491
|
+
return false;
|
|
414492
|
+
}
|
|
414493
|
+
return context5.options.agentDefinitions.activeAgents.some((agent) => agent.agentType === delegation.subagent_type && agent.source === "built-in" && agent.permissionMode === "plan");
|
|
414494
|
+
}
|
|
414341
414495
|
function getStopHookInfo(attachment) {
|
|
414342
414496
|
if (typeof attachment !== "object" || attachment === null || !("command" in attachment) || typeof attachment.command !== "string" || !("durationMs" in attachment) || typeof attachment.durationMs !== "number") {
|
|
414343
414497
|
return null;
|
|
@@ -414802,6 +414956,8 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
414802
414956
|
isMutating,
|
|
414803
414957
|
requiresTaskList: taskListRun?.requiresTaskList,
|
|
414804
414958
|
requirementReason: taskListRun?.requirementReason,
|
|
414959
|
+
isPlanningArtifact: isCurrentPlanFileMutation(tool.name, parsedInput.data, toolUseContext),
|
|
414960
|
+
isReadOnlyPlanningDelegation: isReadOnlyPlanningDelegation(tool.name, parsedInput.data, toolUseContext),
|
|
414805
414961
|
taskListWriterAvailable: toolUseContext.options.tools.some((candidate) => candidate.name === "TaskCreate")
|
|
414806
414962
|
});
|
|
414807
414963
|
if (gate.allowed === false) {
|
|
@@ -415162,6 +415318,8 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
415162
415318
|
isMutating: finalIsMutating,
|
|
415163
415319
|
requiresTaskList: taskListRun?.requiresTaskList,
|
|
415164
415320
|
requirementReason: taskListRun?.requirementReason,
|
|
415321
|
+
isPlanningArtifact: isCurrentPlanFileMutation(tool.name, finalParsedInput.data, toolUseContext),
|
|
415322
|
+
isReadOnlyPlanningDelegation: isReadOnlyPlanningDelegation(tool.name, finalParsedInput.data, toolUseContext),
|
|
415165
415323
|
taskListWriterAvailable: toolUseContext.options.tools.some((candidate) => candidate.name === "TaskCreate")
|
|
415166
415324
|
});
|
|
415167
415325
|
if (finalGate.allowed === false) {
|
|
@@ -415571,7 +415729,7 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
415571
415729
|
}
|
|
415572
415730
|
}
|
|
415573
415731
|
}
|
|
415574
|
-
var HOOK_TIMING_DISPLAY_THRESHOLD_MS2 = 500, SLOW_PHASE_LOG_THRESHOLD_MS = 2000;
|
|
415732
|
+
var READ_ONLY_PLANNING_AGENT_TYPES, HOOK_TIMING_DISPLAY_THRESHOLD_MS2 = 500, SLOW_PHASE_LOG_THRESHOLD_MS = 2000;
|
|
415575
415733
|
var init_toolExecution = __esm(() => {
|
|
415576
415734
|
init_analytics();
|
|
415577
415735
|
init_metadata();
|
|
@@ -415582,6 +415740,7 @@ var init_toolExecution = __esm(() => {
|
|
|
415582
415740
|
init_AskUserQuestionTool();
|
|
415583
415741
|
init_prompt();
|
|
415584
415742
|
init_bashPermissions();
|
|
415743
|
+
init_constants2();
|
|
415585
415744
|
init_prompt3();
|
|
415586
415745
|
init_prompt4();
|
|
415587
415746
|
init_gitOperationTracking();
|
|
@@ -415596,6 +415755,8 @@ var init_toolExecution = __esm(() => {
|
|
|
415596
415755
|
init_messages();
|
|
415597
415756
|
init_sessionActivity();
|
|
415598
415757
|
init_slowOperations();
|
|
415758
|
+
init_plans();
|
|
415759
|
+
init_path();
|
|
415599
415760
|
init_stream3();
|
|
415600
415761
|
init_events();
|
|
415601
415762
|
init_sessionTracing();
|
|
@@ -415610,6 +415771,7 @@ var init_toolExecution = __esm(() => {
|
|
|
415610
415771
|
init_mcpStringUtils();
|
|
415611
415772
|
init_utils3();
|
|
415612
415773
|
init_toolHooks();
|
|
415774
|
+
READ_ONLY_PLANNING_AGENT_TYPES = new Set(["Explore", "Plan"]);
|
|
415613
415775
|
});
|
|
415614
415776
|
|
|
415615
415777
|
// src/services/tools/StreamingToolExecutor.ts
|
|
@@ -433261,7 +433423,7 @@ function getPlanModeV2Instructions(attachment) {
|
|
|
433261
433423
|
const agentCount = getPlanModeV2AgentCount();
|
|
433262
433424
|
const exploreAgentCount = getPlanModeV2ExploreAgentCount();
|
|
433263
433425
|
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.
|
|
433426
|
+
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. Before tasks exist, only UR's shipped read-only ${EXPLORE_AGENT.agentType} and ${PLAN_AGENT.agentType} agents may be delegated to; custom, general-purpose, nested, team, and worktree agents still require an actionable parent task. This supercedes any other instructions you have received.
|
|
433265
433427
|
|
|
433266
433428
|
## Plan File Info:
|
|
433267
433429
|
${planFileInfo}
|
|
@@ -433318,6 +433480,7 @@ ${getPlanPhase4Section()}
|
|
|
433318
433480
|
|
|
433319
433481
|
### Phase 5: Call ${ExitPlanModeV2Tool.name}
|
|
433320
433482
|
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.
|
|
433483
|
+
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
433484
|
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
433485
|
|
|
433323
433486
|
**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 +433498,7 @@ function getReadOnlyToolNames() {
|
|
|
433335
433498
|
}
|
|
433336
433499
|
function getPlanModeInterviewInstructions(attachment) {
|
|
433337
433500
|
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.
|
|
433501
|
+
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.${areExplorePlanAgentsEnabled() ? ` Before tasks exist, only UR's shipped read-only ${EXPLORE_AGENT.agentType} and ${PLAN_AGENT.agentType} agents may be delegated to; custom, general-purpose, nested, team, and worktree agents still require an actionable parent task.` : ""} This supercedes any other instructions you have received.
|
|
433339
433502
|
|
|
433340
433503
|
## Plan File Info:
|
|
433341
433504
|
${planFileInfo}
|
|
@@ -433374,7 +433537,7 @@ Your plan file should be divided into clear sections using markdown headers, bas
|
|
|
433374
433537
|
|
|
433375
433538
|
### When to Converge
|
|
433376
433539
|
|
|
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.
|
|
433540
|
+
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
433541
|
|
|
433379
433542
|
### Ending Your Turn
|
|
433380
433543
|
|
|
@@ -433389,7 +433552,7 @@ Your turn should only end by either:
|
|
|
433389
433552
|
}
|
|
433390
433553
|
function getPlanModeV2SparseInstructions(attachment) {
|
|
433391
433554
|
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.`;
|
|
433555
|
+
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
433556
|
return wrapMessagesInSystemReminder([
|
|
433394
433557
|
createUserMessage({ content, isMeta: true })
|
|
433395
433558
|
]);
|
|
@@ -433768,6 +433931,8 @@ You are returning to plan mode after having previously exited it. A plan file ex
|
|
|
433768
433931
|
- **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
433932
|
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
433933
|
|
|
433934
|
+
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.
|
|
433935
|
+
|
|
433771
433936
|
Treat this as a fresh planning session. Do not assume the existing plan is relevant without evaluating it first.`;
|
|
433772
433937
|
return wrapMessagesInSystemReminder([
|
|
433773
433938
|
createUserMessage({ content, isMeta: true })
|
|
@@ -433777,7 +433942,7 @@ Treat this as a fresh planning session. Do not assume the existing plan is relev
|
|
|
433777
433942
|
const planReference = attachment.planExists ? ` The plan file is located at ${attachment.planFilePath} if you need to reference it.` : "";
|
|
433778
433943
|
const content = `## Exited Plan Mode
|
|
433779
433944
|
|
|
433780
|
-
You have exited plan mode. You can now make edits, run tools, and take actions.${planReference}`;
|
|
433945
|
+
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
433946
|
return wrapMessagesInSystemReminder([
|
|
433782
433947
|
createUserMessage({ content, isMeta: true })
|
|
433783
433948
|
]);
|
|
@@ -442982,7 +443147,7 @@ function Feedback({
|
|
|
442982
443147
|
platform: env2.platform,
|
|
442983
443148
|
gitRepo: envInfo.isGit,
|
|
442984
443149
|
terminal: env2.terminal,
|
|
442985
|
-
version: "1.80.
|
|
443150
|
+
version: "1.80.6",
|
|
442986
443151
|
transcript: normalizeMessagesForAPI(messages),
|
|
442987
443152
|
errors: sanitizedErrors,
|
|
442988
443153
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -443174,7 +443339,7 @@ function Feedback({
|
|
|
443174
443339
|
", ",
|
|
443175
443340
|
env2.terminal,
|
|
443176
443341
|
", v",
|
|
443177
|
-
"1.80.
|
|
443342
|
+
"1.80.6"
|
|
443178
443343
|
]
|
|
443179
443344
|
}, undefined, true, undefined, this)
|
|
443180
443345
|
]
|
|
@@ -443280,7 +443445,7 @@ ${sanitizedDescription}
|
|
|
443280
443445
|
` + `**Environment Info**
|
|
443281
443446
|
` + `- Platform: ${env2.platform}
|
|
443282
443447
|
` + `- Terminal: ${env2.terminal}
|
|
443283
|
-
` + `- Version: ${"1.80.
|
|
443448
|
+
` + `- Version: ${"1.80.6"}
|
|
443284
443449
|
` + `- Feedback ID: ${feedbackId}
|
|
443285
443450
|
` + `
|
|
443286
443451
|
**Errors**
|
|
@@ -446390,7 +446555,7 @@ function buildPrimarySection() {
|
|
|
446390
446555
|
}, undefined, false, undefined, this);
|
|
446391
446556
|
return [{
|
|
446392
446557
|
label: "Version",
|
|
446393
|
-
value: "1.80.
|
|
446558
|
+
value: "1.80.6"
|
|
446394
446559
|
}, {
|
|
446395
446560
|
label: "Session name",
|
|
446396
446561
|
value: nameValue
|
|
@@ -449772,7 +449937,7 @@ function Config({
|
|
|
449772
449937
|
}
|
|
449773
449938
|
}, undefined, false, undefined, this)
|
|
449774
449939
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
449775
|
-
currentVersion: "1.80.
|
|
449940
|
+
currentVersion: "1.80.6",
|
|
449776
449941
|
onChoice: (choice) => {
|
|
449777
449942
|
setShowSubmenu(null);
|
|
449778
449943
|
setTabsHidden(false);
|
|
@@ -449784,7 +449949,7 @@ function Config({
|
|
|
449784
449949
|
autoUpdatesChannel: "stable"
|
|
449785
449950
|
};
|
|
449786
449951
|
if (choice === "stay") {
|
|
449787
|
-
newSettings.minimumVersion = "1.80.
|
|
449952
|
+
newSettings.minimumVersion = "1.80.6";
|
|
449788
449953
|
}
|
|
449789
449954
|
updateSettingsForSource("userSettings", newSettings);
|
|
449790
449955
|
setSettingsData((prev_27) => ({
|
|
@@ -458093,7 +458258,7 @@ function HelpV2(t0) {
|
|
|
458093
458258
|
let t6;
|
|
458094
458259
|
if ($2[31] !== tabs) {
|
|
458095
458260
|
t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
|
|
458096
|
-
title: `UR v${"1.80.
|
|
458261
|
+
title: `UR v${"1.80.6"}`,
|
|
458097
458262
|
color: "professionalBlue",
|
|
458098
458263
|
defaultTab: "general",
|
|
458099
458264
|
children: tabs
|
|
@@ -459026,7 +459191,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
459026
459191
|
async function handleInitialize(options2) {
|
|
459027
459192
|
return {
|
|
459028
459193
|
name: "UR",
|
|
459029
|
-
version: "1.80.
|
|
459194
|
+
version: "1.80.6",
|
|
459030
459195
|
protocolVersion: "0.1.0",
|
|
459031
459196
|
workspaceRoot: options2.cwd,
|
|
459032
459197
|
capabilities: {
|
|
@@ -476134,7 +476299,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
476134
476299
|
return [];
|
|
476135
476300
|
}
|
|
476136
476301
|
}
|
|
476137
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.
|
|
476302
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.6") {
|
|
476138
476303
|
if (process.env.USER_TYPE === "ant") {
|
|
476139
476304
|
const changelog = "";
|
|
476140
476305
|
if (changelog) {
|
|
@@ -476161,7 +476326,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.80.4")
|
|
|
476161
476326
|
releaseNotes
|
|
476162
476327
|
};
|
|
476163
476328
|
}
|
|
476164
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.
|
|
476329
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.80.6") {
|
|
476165
476330
|
if (process.env.USER_TYPE === "ant") {
|
|
476166
476331
|
const changelog = "";
|
|
476167
476332
|
if (changelog) {
|
|
@@ -479066,7 +479231,7 @@ function getRecentActivitySync() {
|
|
|
479066
479231
|
return cachedActivity;
|
|
479067
479232
|
}
|
|
479068
479233
|
function getLogoDisplayData() {
|
|
479069
|
-
const version2 = process.env.DEMO_VERSION ?? "1.80.
|
|
479234
|
+
const version2 = process.env.DEMO_VERSION ?? "1.80.6";
|
|
479070
479235
|
const serverUrl = getDirectConnectServerUrl();
|
|
479071
479236
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
479072
479237
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -479934,7 +480099,7 @@ function LogoV2() {
|
|
|
479934
480099
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
479935
480100
|
t2 = () => {
|
|
479936
480101
|
const currentConfig = getGlobalConfig();
|
|
479937
|
-
if (currentConfig.lastReleaseNotesSeen === "1.80.
|
|
480102
|
+
if (currentConfig.lastReleaseNotesSeen === "1.80.6") {
|
|
479938
480103
|
return;
|
|
479939
480104
|
}
|
|
479940
480105
|
saveGlobalConfig(_temp325);
|
|
@@ -480619,12 +480784,12 @@ function LogoV2() {
|
|
|
480619
480784
|
return t41;
|
|
480620
480785
|
}
|
|
480621
480786
|
function _temp325(current) {
|
|
480622
|
-
if (current.lastReleaseNotesSeen === "1.80.
|
|
480787
|
+
if (current.lastReleaseNotesSeen === "1.80.6") {
|
|
480623
480788
|
return current;
|
|
480624
480789
|
}
|
|
480625
480790
|
return {
|
|
480626
480791
|
...current,
|
|
480627
|
-
lastReleaseNotesSeen: "1.80.
|
|
480792
|
+
lastReleaseNotesSeen: "1.80.6"
|
|
480628
480793
|
};
|
|
480629
480794
|
}
|
|
480630
480795
|
function _temp241(s_0) {
|
|
@@ -496716,7 +496881,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
496716
496881
|
if (spec.name !== specName) {
|
|
496717
496882
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
496718
496883
|
}
|
|
496719
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.
|
|
496884
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.80.6" : "1.80.6");
|
|
496720
496885
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
496721
496886
|
throw new Error("invalid ur-agent package version");
|
|
496722
496887
|
}
|
|
@@ -497709,7 +497874,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
497709
497874
|
path: ".github/workflows/ur.yml",
|
|
497710
497875
|
root: "project",
|
|
497711
497876
|
content: compileAgenticCiWorkflow("default", {
|
|
497712
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.80.
|
|
497877
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.80.6" : "1.80.6"
|
|
497713
497878
|
})
|
|
497714
497879
|
},
|
|
497715
497880
|
{
|
|
@@ -497772,7 +497937,7 @@ function value(tokens, flag) {
|
|
|
497772
497937
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
497773
497938
|
}
|
|
497774
497939
|
function cliVersion() {
|
|
497775
|
-
return typeof MACRO !== "undefined" ? "1.80.
|
|
497940
|
+
return typeof MACRO !== "undefined" ? "1.80.6" : "1.80.6";
|
|
497776
497941
|
}
|
|
497777
497942
|
function workflowPath(cwd2) {
|
|
497778
497943
|
return join168(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -503628,7 +503793,7 @@ function createAcpStdioApp(deps) {
|
|
|
503628
503793
|
}
|
|
503629
503794
|
},
|
|
503630
503795
|
authMethods: [],
|
|
503631
|
-
agentInfo: { name: "UR-Nexus", version: "1.80.
|
|
503796
|
+
agentInfo: { name: "UR-Nexus", version: "1.80.6" }
|
|
503632
503797
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
503633
503798
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
503634
503799
|
await runtime2.announce({
|
|
@@ -503725,7 +503890,7 @@ function createAcpStdioAgent(deps) {
|
|
|
503725
503890
|
}
|
|
503726
503891
|
},
|
|
503727
503892
|
authMethods: [],
|
|
503728
|
-
agentInfo: { name: "UR-Nexus", version: "1.80.
|
|
503893
|
+
agentInfo: { name: "UR-Nexus", version: "1.80.6" }
|
|
503729
503894
|
});
|
|
503730
503895
|
return;
|
|
503731
503896
|
case "authenticate":
|
|
@@ -714951,7 +715116,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
714951
715116
|
smapsRollup,
|
|
714952
715117
|
platform: process.platform,
|
|
714953
715118
|
nodeVersion: process.version,
|
|
714954
|
-
ccVersion: "1.80.
|
|
715119
|
+
ccVersion: "1.80.6"
|
|
714955
715120
|
};
|
|
714956
715121
|
}
|
|
714957
715122
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -715540,7 +715705,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
715540
715705
|
var call154 = async () => {
|
|
715541
715706
|
return {
|
|
715542
715707
|
type: "text",
|
|
715543
|
-
value: "1.80.
|
|
715708
|
+
value: "1.80.6"
|
|
715544
715709
|
};
|
|
715545
715710
|
}, version2, version_default;
|
|
715546
715711
|
var init_version = __esm(() => {
|
|
@@ -726783,7 +726948,7 @@ function generateHtmlReport(data, insights) {
|
|
|
726783
726948
|
</html>`;
|
|
726784
726949
|
}
|
|
726785
726950
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
726786
|
-
const version3 = typeof MACRO !== "undefined" ? "1.80.
|
|
726951
|
+
const version3 = typeof MACRO !== "undefined" ? "1.80.6" : "unknown";
|
|
726787
726952
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
726788
726953
|
const facets_summary = {
|
|
726789
726954
|
total: facets.size,
|
|
@@ -731096,7 +731261,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
731096
731261
|
init_settings2();
|
|
731097
731262
|
init_slowOperations();
|
|
731098
731263
|
init_uuid();
|
|
731099
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.80.
|
|
731264
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.80.6" : "unknown";
|
|
731100
731265
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
731101
731266
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
731102
731267
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -732311,7 +732476,7 @@ var init_filesystem = __esm(() => {
|
|
|
732311
732476
|
});
|
|
732312
732477
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
732313
732478
|
const nonce = randomBytes24(16).toString("hex");
|
|
732314
|
-
return join243(getURTempDir(), "bundled-skills", "1.80.
|
|
732479
|
+
return join243(getURTempDir(), "bundled-skills", "1.80.6", nonce);
|
|
732315
732480
|
});
|
|
732316
732481
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
732317
732482
|
});
|
|
@@ -735120,7 +735285,7 @@ async function* executeHooks({
|
|
|
735120
735285
|
};
|
|
735121
735286
|
return;
|
|
735122
735287
|
}
|
|
735123
|
-
const { json: json2, plainText, validationError } = parseHookOutput(result.stdout);
|
|
735288
|
+
const { json: json2, plainText: plainText2, validationError } = parseHookOutput(result.stdout);
|
|
735124
735289
|
if (validationError) {
|
|
735125
735290
|
emitHookResponse({
|
|
735126
735291
|
hookId,
|
|
@@ -735169,7 +735334,7 @@ async function* executeHooks({
|
|
|
735169
735334
|
exitCode: result.status,
|
|
735170
735335
|
durationMs
|
|
735171
735336
|
});
|
|
735172
|
-
if (isSyncHookJSONOutput(json2) && !json2.suppressOutput &&
|
|
735337
|
+
if (isSyncHookJSONOutput(json2) && !json2.suppressOutput && plainText2 && result.status === 0) {
|
|
735173
735338
|
const content = `${source_default.bold(hookName)} completed`;
|
|
735174
735339
|
emitHookResponse({
|
|
735175
735340
|
hookId,
|
|
@@ -735879,12 +736044,12 @@ async function* executeTeammateIdleHooks(teammateName, teamName, permissionMode,
|
|
|
735879
736044
|
timeoutMs
|
|
735880
736045
|
});
|
|
735881
736046
|
}
|
|
735882
|
-
async function* executeTaskCreatedHooks(taskId,
|
|
736047
|
+
async function* executeTaskCreatedHooks(taskId, taskSubject2, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
|
|
735883
736048
|
const hookInput = {
|
|
735884
736049
|
...createBaseHookInput(permissionMode),
|
|
735885
736050
|
hook_event_name: "TaskCreated",
|
|
735886
736051
|
task_id: taskId,
|
|
735887
|
-
task_subject:
|
|
736052
|
+
task_subject: taskSubject2,
|
|
735888
736053
|
task_description: taskDescription,
|
|
735889
736054
|
teammate_name: teammateName,
|
|
735890
736055
|
team_name: teamName
|
|
@@ -735897,12 +736062,12 @@ async function* executeTaskCreatedHooks(taskId, taskSubject, taskDescription, te
|
|
|
735897
736062
|
toolUseContext
|
|
735898
736063
|
});
|
|
735899
736064
|
}
|
|
735900
|
-
async function* executeTaskCompletedHooks(taskId,
|
|
736065
|
+
async function* executeTaskCompletedHooks(taskId, taskSubject2, taskDescription, teammateName, teamName, permissionMode, signal, timeoutMs = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext) {
|
|
735901
736066
|
const hookInput = {
|
|
735902
736067
|
...createBaseHookInput(permissionMode),
|
|
735903
736068
|
hook_event_name: "TaskCompleted",
|
|
735904
736069
|
task_id: taskId,
|
|
735905
|
-
task_subject:
|
|
736070
|
+
task_subject: taskSubject2,
|
|
735906
736071
|
task_description: taskDescription,
|
|
735907
736072
|
teammate_name: teammateName,
|
|
735908
736073
|
team_name: teamName
|
|
@@ -738700,7 +738865,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
738700
738865
|
}
|
|
738701
738866
|
function computeFingerprintFromMessages(messages) {
|
|
738702
738867
|
const firstMessageText = extractFirstMessageText(messages);
|
|
738703
|
-
return computeFingerprint(firstMessageText, "1.80.
|
|
738868
|
+
return computeFingerprint(firstMessageText, "1.80.6");
|
|
738704
738869
|
}
|
|
738705
738870
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
738706
738871
|
var init_fingerprint = () => {};
|
|
@@ -740625,7 +740790,7 @@ async function sideQuery(opts) {
|
|
|
740625
740790
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
740626
740791
|
}
|
|
740627
740792
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
740628
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.80.
|
|
740793
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.80.6");
|
|
740629
740794
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
740630
740795
|
const systemBlocks = [
|
|
740631
740796
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -745459,7 +745624,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
745459
745624
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
745460
745625
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
745461
745626
|
betas: getSdkBetas(),
|
|
745462
|
-
ur_version: "1.80.
|
|
745627
|
+
ur_version: "1.80.6",
|
|
745463
745628
|
output_style: outputStyle,
|
|
745464
745629
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
745465
745630
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -752088,8 +752253,8 @@ function commandListDisplay(commands) {
|
|
|
752088
752253
|
}
|
|
752089
752254
|
}
|
|
752090
752255
|
function commandListDisplayTruncated(commands) {
|
|
752091
|
-
const
|
|
752092
|
-
if (
|
|
752256
|
+
const plainText2 = commands.join(", ");
|
|
752257
|
+
if (plainText2.length > 50) {
|
|
752093
752258
|
return "similar";
|
|
752094
752259
|
}
|
|
752095
752260
|
return commandListDisplay(commands);
|
|
@@ -759295,7 +759460,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
759295
759460
|
function getSemverPart(version3) {
|
|
759296
759461
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
759297
759462
|
}
|
|
759298
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.80.
|
|
759463
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.80.6") {
|
|
759299
759464
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
|
|
759300
759465
|
if (!updatedVersion) {
|
|
759301
759466
|
return null;
|
|
@@ -759344,7 +759509,7 @@ function AutoUpdater({
|
|
|
759344
759509
|
return;
|
|
759345
759510
|
}
|
|
759346
759511
|
if (false) {}
|
|
759347
|
-
const currentVersion = "1.80.
|
|
759512
|
+
const currentVersion = "1.80.6";
|
|
759348
759513
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
759349
759514
|
let latestVersion = await getLatestVersion(channel);
|
|
759350
759515
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -759573,12 +759738,12 @@ function NativeAutoUpdater({
|
|
|
759573
759738
|
logEvent("tengu_native_auto_updater_start", {});
|
|
759574
759739
|
try {
|
|
759575
759740
|
const maxVersion = await getMaxVersion();
|
|
759576
|
-
if (maxVersion && gt("1.80.
|
|
759741
|
+
if (maxVersion && gt("1.80.6", maxVersion)) {
|
|
759577
759742
|
const msg = await getMaxVersionMessage();
|
|
759578
759743
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
759579
759744
|
}
|
|
759580
759745
|
const result = await installLatest(channel);
|
|
759581
|
-
const currentVersion = "1.80.
|
|
759746
|
+
const currentVersion = "1.80.6";
|
|
759582
759747
|
const latencyMs = Date.now() - startTime;
|
|
759583
759748
|
if (result.lockFailed) {
|
|
759584
759749
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -759715,17 +759880,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
759715
759880
|
const maxVersion = await getMaxVersion();
|
|
759716
759881
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
759717
759882
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
759718
|
-
if (gte("1.80.
|
|
759719
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.
|
|
759883
|
+
if (gte("1.80.6", maxVersion)) {
|
|
759884
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.80.6"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
759720
759885
|
setUpdateAvailable(false);
|
|
759721
759886
|
return;
|
|
759722
759887
|
}
|
|
759723
759888
|
latest = maxVersion;
|
|
759724
759889
|
}
|
|
759725
|
-
const hasUpdate = latest && !gte("1.80.
|
|
759890
|
+
const hasUpdate = latest && !gte("1.80.6", latest) && !shouldSkipVersion(latest);
|
|
759726
759891
|
setUpdateAvailable(!!hasUpdate);
|
|
759727
759892
|
if (hasUpdate) {
|
|
759728
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.
|
|
759893
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.80.6"} -> ${latest}`);
|
|
759729
759894
|
}
|
|
759730
759895
|
};
|
|
759731
759896
|
$2[0] = t1;
|
|
@@ -759759,7 +759924,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
759759
759924
|
wrap: "truncate",
|
|
759760
759925
|
children: [
|
|
759761
759926
|
"currentVersion: ",
|
|
759762
|
-
"1.80.
|
|
759927
|
+
"1.80.6"
|
|
759763
759928
|
]
|
|
759764
759929
|
}, undefined, true, undefined, this);
|
|
759765
759930
|
$2[3] = verbose;
|
|
@@ -770612,7 +770777,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
770612
770777
|
project_dir: getOriginalCwd(),
|
|
770613
770778
|
added_dirs: addedDirs
|
|
770614
770779
|
},
|
|
770615
|
-
version: "1.80.
|
|
770780
|
+
version: "1.80.6",
|
|
770616
770781
|
output_style: {
|
|
770617
770782
|
name: outputStyleName
|
|
770618
770783
|
},
|
|
@@ -770747,7 +770912,7 @@ function StatusLineInner({
|
|
|
770747
770912
|
const attention = customStatusError ?? taskAttention;
|
|
770748
770913
|
const terminalSize = React133.useContext(TerminalSizeContext);
|
|
770749
770914
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
770750
|
-
version: "1.80.
|
|
770915
|
+
version: "1.80.6",
|
|
770751
770916
|
providerLabel: providerRuntime.providerLabel,
|
|
770752
770917
|
authMode: providerRuntime.authLabel,
|
|
770753
770918
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -783002,7 +783167,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
783002
783167
|
} catch {}
|
|
783003
783168
|
const data = {
|
|
783004
783169
|
trigger: trigger2,
|
|
783005
|
-
version: "1.80.
|
|
783170
|
+
version: "1.80.6",
|
|
783006
783171
|
platform: process.platform,
|
|
783007
783172
|
transcript,
|
|
783008
783173
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -795371,7 +795536,7 @@ function WelcomeV2() {
|
|
|
795371
795536
|
dimColor: true,
|
|
795372
795537
|
children: [
|
|
795373
795538
|
"v",
|
|
795374
|
-
"1.80.
|
|
795539
|
+
"1.80.6"
|
|
795375
795540
|
]
|
|
795376
795541
|
}, undefined, true, undefined, this)
|
|
795377
795542
|
]
|
|
@@ -796631,7 +796796,7 @@ function completeOnboarding() {
|
|
|
796631
796796
|
saveGlobalConfig((current) => ({
|
|
796632
796797
|
...current,
|
|
796633
796798
|
hasCompletedOnboarding: true,
|
|
796634
|
-
lastOnboardingVersion: "1.80.
|
|
796799
|
+
lastOnboardingVersion: "1.80.6"
|
|
796635
796800
|
}));
|
|
796636
796801
|
}
|
|
796637
796802
|
function showDialog(root2, renderer) {
|
|
@@ -801777,7 +801942,7 @@ function appendToLog(path28, message) {
|
|
|
801777
801942
|
cwd: getFsImplementation().cwd(),
|
|
801778
801943
|
userType: process.env.USER_TYPE,
|
|
801779
801944
|
sessionId: getSessionId(),
|
|
801780
|
-
version: "1.80.
|
|
801945
|
+
version: "1.80.6"
|
|
801781
801946
|
};
|
|
801782
801947
|
getLogWriter(path28).write(messageWithTimestamp);
|
|
801783
801948
|
}
|
|
@@ -805941,8 +806106,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
805941
806106
|
}
|
|
805942
806107
|
async function checkEnvLessBridgeMinVersion() {
|
|
805943
806108
|
const cfg = await getEnvLessBridgeConfig();
|
|
805944
|
-
if (cfg.min_version && lt("1.80.
|
|
805945
|
-
return `Your version of UR (${"1.80.
|
|
806109
|
+
if (cfg.min_version && lt("1.80.6", cfg.min_version)) {
|
|
806110
|
+
return `Your version of UR (${"1.80.6"}) is too old for Remote Control.
|
|
805946
806111
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
805947
806112
|
}
|
|
805948
806113
|
return null;
|
|
@@ -806416,7 +806581,7 @@ async function initBridgeCore(params) {
|
|
|
806416
806581
|
const rawApi = createBridgeApiClient({
|
|
806417
806582
|
baseUrl,
|
|
806418
806583
|
getAccessToken,
|
|
806419
|
-
runnerVersion: "1.80.
|
|
806584
|
+
runnerVersion: "1.80.6",
|
|
806420
806585
|
onDebug: logForDebugging,
|
|
806421
806586
|
onAuth401,
|
|
806422
806587
|
getTrustedDeviceToken
|
|
@@ -815889,7 +816054,7 @@ function getAgUiCapabilities() {
|
|
|
815889
816054
|
name: "UR-Nexus",
|
|
815890
816055
|
type: "ur-nexus",
|
|
815891
816056
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
815892
|
-
version: "1.80.
|
|
816057
|
+
version: "1.80.6",
|
|
815893
816058
|
provider: "UR",
|
|
815894
816059
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
815895
816060
|
},
|
|
@@ -817116,7 +817281,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
817116
817281
|
};
|
|
817117
817282
|
const server2 = new Server({
|
|
817118
817283
|
name: "ur-nexus",
|
|
817119
|
-
version: "1.80.
|
|
817284
|
+
version: "1.80.6"
|
|
817120
817285
|
}, {
|
|
817121
817286
|
capabilities: {
|
|
817122
817287
|
tools: {}
|
|
@@ -818320,7 +818485,7 @@ function thrownResponse(error40) {
|
|
|
818320
818485
|
}
|
|
818321
818486
|
async function createUrMcp2026Runtime(options5) {
|
|
818322
818487
|
const server2 = createMCPServer(options5.cwd, options5.debug === true, options5.verbose === true);
|
|
818323
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.
|
|
818488
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.80.6" }, { capabilities: {} });
|
|
818324
818489
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
818325
818490
|
try {
|
|
818326
818491
|
await server2.connect(serverTransport);
|
|
@@ -818331,7 +818496,7 @@ async function createUrMcp2026Runtime(options5) {
|
|
|
818331
818496
|
}
|
|
818332
818497
|
const runtime2 = new Mcp2026Runtime({
|
|
818333
818498
|
cwd: options5.cwd,
|
|
818334
|
-
version: "1.80.
|
|
818499
|
+
version: "1.80.6",
|
|
818335
818500
|
backend: {
|
|
818336
818501
|
listTools: async () => {
|
|
818337
818502
|
const listed = await client2.listTools();
|
|
@@ -821066,7 +821231,7 @@ async function update() {
|
|
|
821066
821231
|
logEvent("tengu_update_check", {});
|
|
821067
821232
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
821068
821233
|
const result = await checkUpgradeStatus({
|
|
821069
|
-
currentVersion: "1.80.
|
|
821234
|
+
currentVersion: "1.80.6",
|
|
821070
821235
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
821071
821236
|
installationType: diagnostic2.installationType,
|
|
821072
821237
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -822394,7 +822559,7 @@ ${customInstructions}` : customInstructions;
|
|
|
822394
822559
|
}
|
|
822395
822560
|
}
|
|
822396
822561
|
logForDiagnosticsNoPII("info", "started", {
|
|
822397
|
-
version: "1.80.
|
|
822562
|
+
version: "1.80.6",
|
|
822398
822563
|
is_native_binary: isInBundledMode()
|
|
822399
822564
|
});
|
|
822400
822565
|
registerCleanup(async () => {
|
|
@@ -823181,7 +823346,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
823181
823346
|
pendingHookMessages
|
|
823182
823347
|
}, renderAndRun);
|
|
823183
823348
|
}
|
|
823184
|
-
}).version("1.80.
|
|
823349
|
+
}).version("1.80.6 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
823185
823350
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
823186
823351
|
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
823352
|
if (canUserConfigureAdvisor()) {
|
|
@@ -824308,7 +824473,7 @@ if (false) {}
|
|
|
824308
824473
|
async function main2() {
|
|
824309
824474
|
const args = process.argv.slice(2);
|
|
824310
824475
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
824311
|
-
console.log(`${"1.80.
|
|
824476
|
+
console.log(`${"1.80.6"} (UR-Nexus)`);
|
|
824312
824477
|
return;
|
|
824313
824478
|
}
|
|
824314
824479
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|