ur-agent 1.37.1 → 1.37.2
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/bin/ur.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn, spawnSync } from 'node:child_process'
|
|
3
|
-
import { existsSync, readFileSync
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
4
4
|
import { dirname, resolve } from 'node:path'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
6
|
|
|
@@ -113,13 +113,65 @@ const child = spawn(bun, args, {
|
|
|
113
113
|
|
|
114
114
|
if (shouldPipeChildOutput) {
|
|
115
115
|
child.stdout?.on('data', chunk => {
|
|
116
|
-
|
|
116
|
+
forwardChildOutput(child.stdout, process.stdout, chunk)
|
|
117
117
|
})
|
|
118
118
|
child.stderr?.on('data', chunk => {
|
|
119
|
-
|
|
119
|
+
forwardChildOutput(child.stderr, process.stderr, chunk)
|
|
120
120
|
})
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
function forwardChildOutput(source, target, chunk) {
|
|
124
|
+
try {
|
|
125
|
+
const canContinue = target.write(chunk)
|
|
126
|
+
if (!canContinue) {
|
|
127
|
+
source.pause()
|
|
128
|
+
target.once('drain', () => source.resume())
|
|
129
|
+
}
|
|
130
|
+
} catch (error) {
|
|
131
|
+
if (isRetryableWriteError(error)) {
|
|
132
|
+
source.pause()
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
if (target.destroyed) return
|
|
135
|
+
try {
|
|
136
|
+
const canContinue = target.write(chunk)
|
|
137
|
+
if (canContinue) source.resume()
|
|
138
|
+
else target.once('drain', () => source.resume())
|
|
139
|
+
} catch (retryError) {
|
|
140
|
+
if (isRetryableWriteError(retryError)) {
|
|
141
|
+
forwardChildOutput(source, target, chunk)
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
if (!isBrokenPipe(retryError)) {
|
|
145
|
+
try {
|
|
146
|
+
process.stderr.write(`UR launcher output forwarding failed: ${retryError.message ?? String(retryError)}\n`)
|
|
147
|
+
} catch {
|
|
148
|
+
// Nothing sensible remains if stderr itself is unavailable.
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}, 10)
|
|
153
|
+
return
|
|
154
|
+
}
|
|
155
|
+
if (isBrokenPipe(error)) {
|
|
156
|
+
source.destroy?.()
|
|
157
|
+
return
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
process.stderr.write(`UR launcher output forwarding failed: ${error.message ?? String(error)}\n`)
|
|
161
|
+
} catch {
|
|
162
|
+
// Nothing sensible remains if stderr itself is unavailable.
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function isRetryableWriteError(error) {
|
|
168
|
+
return error && (error.code === 'EAGAIN' || error.code === 'EWOULDBLOCK')
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function isBrokenPipe(error) {
|
|
172
|
+
return error && error.code === 'EPIPE'
|
|
173
|
+
}
|
|
174
|
+
|
|
123
175
|
child.on('error', error => {
|
|
124
176
|
if (error.code === 'ENOENT') {
|
|
125
177
|
printBunRuntimeError(error.message)
|
|
@@ -136,5 +188,5 @@ child.on('close', (code, signal) => {
|
|
|
136
188
|
return
|
|
137
189
|
}
|
|
138
190
|
|
|
139
|
-
process.
|
|
191
|
+
process.exitCode = code ?? 1
|
|
140
192
|
})
|
package/dist/cli.js
CHANGED
|
@@ -70876,7 +70876,7 @@ var init_auth = __esm(() => {
|
|
|
70876
70876
|
|
|
70877
70877
|
// src/utils/userAgent.ts
|
|
70878
70878
|
function getURCodeUserAgent() {
|
|
70879
|
-
return `ur/${"1.37.
|
|
70879
|
+
return `ur/${"1.37.2"}`;
|
|
70880
70880
|
}
|
|
70881
70881
|
|
|
70882
70882
|
// src/utils/workloadContext.ts
|
|
@@ -70898,7 +70898,7 @@ function getUserAgent() {
|
|
|
70898
70898
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
70899
70899
|
const workload = getWorkload();
|
|
70900
70900
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
70901
|
-
return `ur-cli/${"1.37.
|
|
70901
|
+
return `ur-cli/${"1.37.2"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
70902
70902
|
}
|
|
70903
70903
|
function getMCPUserAgent() {
|
|
70904
70904
|
const parts = [];
|
|
@@ -70912,7 +70912,7 @@ function getMCPUserAgent() {
|
|
|
70912
70912
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
70913
70913
|
}
|
|
70914
70914
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
70915
|
-
return `ur/${"1.37.
|
|
70915
|
+
return `ur/${"1.37.2"}${suffix}`;
|
|
70916
70916
|
}
|
|
70917
70917
|
function getWebFetchUserAgent() {
|
|
70918
70918
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -71050,7 +71050,7 @@ var init_user = __esm(() => {
|
|
|
71050
71050
|
deviceId,
|
|
71051
71051
|
sessionId: getSessionId(),
|
|
71052
71052
|
email: getEmail(),
|
|
71053
|
-
appVersion: "1.37.
|
|
71053
|
+
appVersion: "1.37.2",
|
|
71054
71054
|
platform: getHostPlatformForAnalytics(),
|
|
71055
71055
|
organizationUuid,
|
|
71056
71056
|
accountUuid,
|
|
@@ -77567,7 +77567,7 @@ var init_metadata = __esm(() => {
|
|
|
77567
77567
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
77568
77568
|
WHITESPACE_REGEX = /\s+/;
|
|
77569
77569
|
getVersionBase = memoize_default(() => {
|
|
77570
|
-
const match = "1.37.
|
|
77570
|
+
const match = "1.37.2".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
77571
77571
|
return match ? match[0] : undefined;
|
|
77572
77572
|
});
|
|
77573
77573
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -77607,7 +77607,7 @@ var init_metadata = __esm(() => {
|
|
|
77607
77607
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
77608
77608
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
77609
77609
|
isURAiAuth: isURAISubscriber2(),
|
|
77610
|
-
version: "1.37.
|
|
77610
|
+
version: "1.37.2",
|
|
77611
77611
|
versionBase: getVersionBase(),
|
|
77612
77612
|
buildTime: "",
|
|
77613
77613
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -78277,7 +78277,7 @@ function initialize1PEventLogging() {
|
|
|
78277
78277
|
const platform2 = getPlatform();
|
|
78278
78278
|
const attributes = {
|
|
78279
78279
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
78280
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.37.
|
|
78280
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.37.2"
|
|
78281
78281
|
};
|
|
78282
78282
|
if (platform2 === "wsl") {
|
|
78283
78283
|
const wslVersion = getWslVersion();
|
|
@@ -78304,7 +78304,7 @@ function initialize1PEventLogging() {
|
|
|
78304
78304
|
})
|
|
78305
78305
|
]
|
|
78306
78306
|
});
|
|
78307
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.37.
|
|
78307
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.37.2");
|
|
78308
78308
|
}
|
|
78309
78309
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
78310
78310
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -83601,7 +83601,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
83601
83601
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
83602
83602
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
83603
83603
|
}
|
|
83604
|
-
var urVersion = "1.37.
|
|
83604
|
+
var urVersion = "1.37.2", coverage, priorityRoadmap;
|
|
83605
83605
|
var init_trends = __esm(() => {
|
|
83606
83606
|
coverage = [
|
|
83607
83607
|
{
|
|
@@ -85594,7 +85594,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
85594
85594
|
if (!isAttributionHeaderEnabled()) {
|
|
85595
85595
|
return "";
|
|
85596
85596
|
}
|
|
85597
|
-
const version2 = `${"1.37.
|
|
85597
|
+
const version2 = `${"1.37.2"}.${fingerprint}`;
|
|
85598
85598
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
85599
85599
|
const cch = "";
|
|
85600
85600
|
const workload = getWorkload();
|
|
@@ -193455,7 +193455,7 @@ function getTelemetryAttributes() {
|
|
|
193455
193455
|
attributes["session.id"] = sessionId;
|
|
193456
193456
|
}
|
|
193457
193457
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
193458
|
-
attributes["app.version"] = "1.37.
|
|
193458
|
+
attributes["app.version"] = "1.37.2";
|
|
193459
193459
|
}
|
|
193460
193460
|
const oauthAccount = getOauthAccountInfo();
|
|
193461
193461
|
if (oauthAccount) {
|
|
@@ -228840,7 +228840,7 @@ function getInstallationEnv() {
|
|
|
228840
228840
|
return;
|
|
228841
228841
|
}
|
|
228842
228842
|
function getURCodeVersion() {
|
|
228843
|
-
return "1.37.
|
|
228843
|
+
return "1.37.2";
|
|
228844
228844
|
}
|
|
228845
228845
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
228846
228846
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -231679,7 +231679,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
231679
231679
|
const client2 = new Client({
|
|
231680
231680
|
name: "ur",
|
|
231681
231681
|
title: "UR",
|
|
231682
|
-
version: "1.37.
|
|
231682
|
+
version: "1.37.2",
|
|
231683
231683
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
231684
231684
|
websiteUrl: PRODUCT_URL
|
|
231685
231685
|
}, {
|
|
@@ -232033,7 +232033,7 @@ var init_client5 = __esm(() => {
|
|
|
232033
232033
|
const client2 = new Client({
|
|
232034
232034
|
name: "ur",
|
|
232035
232035
|
title: "UR",
|
|
232036
|
-
version: "1.37.
|
|
232036
|
+
version: "1.37.2",
|
|
232037
232037
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
232038
232038
|
websiteUrl: PRODUCT_URL
|
|
232039
232039
|
}, {
|
|
@@ -241847,9 +241847,9 @@ async function assertMinVersion() {
|
|
|
241847
241847
|
if (false) {}
|
|
241848
241848
|
try {
|
|
241849
241849
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
241850
|
-
if (versionConfig.minVersion && lt("1.37.
|
|
241850
|
+
if (versionConfig.minVersion && lt("1.37.2", versionConfig.minVersion)) {
|
|
241851
241851
|
console.error(`
|
|
241852
|
-
It looks like your version of UR (${"1.37.
|
|
241852
|
+
It looks like your version of UR (${"1.37.2"}) needs an update.
|
|
241853
241853
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
241854
241854
|
|
|
241855
241855
|
To update, please run:
|
|
@@ -242065,7 +242065,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
242065
242065
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
242066
242066
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
242067
242067
|
pid: process.pid,
|
|
242068
|
-
currentVersion: "1.37.
|
|
242068
|
+
currentVersion: "1.37.2"
|
|
242069
242069
|
});
|
|
242070
242070
|
return "in_progress";
|
|
242071
242071
|
}
|
|
@@ -242074,7 +242074,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
242074
242074
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
242075
242075
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
242076
242076
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
242077
|
-
currentVersion: "1.37.
|
|
242077
|
+
currentVersion: "1.37.2"
|
|
242078
242078
|
});
|
|
242079
242079
|
console.error(`
|
|
242080
242080
|
Error: Windows NPM detected in WSL
|
|
@@ -242609,7 +242609,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
242609
242609
|
}
|
|
242610
242610
|
async function getDoctorDiagnostic() {
|
|
242611
242611
|
const installationType = await getCurrentInstallationType();
|
|
242612
|
-
const version2 = typeof MACRO !== "undefined" ? "1.37.
|
|
242612
|
+
const version2 = typeof MACRO !== "undefined" ? "1.37.2" : "unknown";
|
|
242613
242613
|
const installationPath = await getInstallationPath();
|
|
242614
242614
|
const invokedBinary = getInvokedBinary();
|
|
242615
242615
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -243544,8 +243544,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
243544
243544
|
const maxVersion = await getMaxVersion();
|
|
243545
243545
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
243546
243546
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
243547
|
-
if (gte("1.37.
|
|
243548
|
-
logForDebugging(`Native installer: current version ${"1.37.
|
|
243547
|
+
if (gte("1.37.2", maxVersion)) {
|
|
243548
|
+
logForDebugging(`Native installer: current version ${"1.37.2"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
243549
243549
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
243550
243550
|
latency_ms: Date.now() - startTime,
|
|
243551
243551
|
max_version: maxVersion,
|
|
@@ -243556,7 +243556,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
243556
243556
|
version2 = maxVersion;
|
|
243557
243557
|
}
|
|
243558
243558
|
}
|
|
243559
|
-
if (!forceReinstall && version2 === "1.37.
|
|
243559
|
+
if (!forceReinstall && version2 === "1.37.2" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
243560
243560
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
243561
243561
|
logEvent("tengu_native_update_complete", {
|
|
243562
243562
|
latency_ms: Date.now() - startTime,
|
|
@@ -340486,7 +340486,7 @@ function Feedback({
|
|
|
340486
340486
|
platform: env2.platform,
|
|
340487
340487
|
gitRepo: envInfo.isGit,
|
|
340488
340488
|
terminal: env2.terminal,
|
|
340489
|
-
version: "1.37.
|
|
340489
|
+
version: "1.37.2",
|
|
340490
340490
|
transcript: normalizeMessagesForAPI(messages),
|
|
340491
340491
|
errors: sanitizedErrors,
|
|
340492
340492
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -340678,7 +340678,7 @@ function Feedback({
|
|
|
340678
340678
|
", ",
|
|
340679
340679
|
env2.terminal,
|
|
340680
340680
|
", v",
|
|
340681
|
-
"1.37.
|
|
340681
|
+
"1.37.2"
|
|
340682
340682
|
]
|
|
340683
340683
|
}, undefined, true, undefined, this)
|
|
340684
340684
|
]
|
|
@@ -340784,7 +340784,7 @@ ${sanitizedDescription}
|
|
|
340784
340784
|
` + `**Environment Info**
|
|
340785
340785
|
` + `- Platform: ${env2.platform}
|
|
340786
340786
|
` + `- Terminal: ${env2.terminal}
|
|
340787
|
-
` + `- Version: ${"1.37.
|
|
340787
|
+
` + `- Version: ${"1.37.2"}
|
|
340788
340788
|
` + `- Feedback ID: ${feedbackId}
|
|
340789
340789
|
` + `
|
|
340790
340790
|
**Errors**
|
|
@@ -343895,7 +343895,7 @@ function buildPrimarySection() {
|
|
|
343895
343895
|
}, undefined, false, undefined, this);
|
|
343896
343896
|
return [{
|
|
343897
343897
|
label: "Version",
|
|
343898
|
-
value: "1.37.
|
|
343898
|
+
value: "1.37.2"
|
|
343899
343899
|
}, {
|
|
343900
343900
|
label: "Session name",
|
|
343901
343901
|
value: nameValue
|
|
@@ -347196,7 +347196,7 @@ function Config({
|
|
|
347196
347196
|
}
|
|
347197
347197
|
}, undefined, false, undefined, this)
|
|
347198
347198
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
347199
|
-
currentVersion: "1.37.
|
|
347199
|
+
currentVersion: "1.37.2",
|
|
347200
347200
|
onChoice: (choice) => {
|
|
347201
347201
|
setShowSubmenu(null);
|
|
347202
347202
|
setTabsHidden(false);
|
|
@@ -347208,7 +347208,7 @@ function Config({
|
|
|
347208
347208
|
autoUpdatesChannel: "stable"
|
|
347209
347209
|
};
|
|
347210
347210
|
if (choice === "stay") {
|
|
347211
|
-
newSettings.minimumVersion = "1.37.
|
|
347211
|
+
newSettings.minimumVersion = "1.37.2";
|
|
347212
347212
|
}
|
|
347213
347213
|
updateSettingsForSource("userSettings", newSettings);
|
|
347214
347214
|
setSettingsData((prev_27) => ({
|
|
@@ -355278,7 +355278,7 @@ function HelpV2(t0) {
|
|
|
355278
355278
|
let t6;
|
|
355279
355279
|
if ($3[31] !== tabs) {
|
|
355280
355280
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
355281
|
-
title: `UR v${"1.37.
|
|
355281
|
+
title: `UR v${"1.37.2"}`,
|
|
355282
355282
|
color: "professionalBlue",
|
|
355283
355283
|
defaultTab: "general",
|
|
355284
355284
|
children: tabs
|
|
@@ -356024,7 +356024,7 @@ function buildToolUseContext(tools, readFileStateCache) {
|
|
|
356024
356024
|
async function handleInitialize(options2) {
|
|
356025
356025
|
return {
|
|
356026
356026
|
name: "ur-agent",
|
|
356027
|
-
version: "1.37.
|
|
356027
|
+
version: "1.37.2",
|
|
356028
356028
|
protocolVersion: "0.1.0",
|
|
356029
356029
|
workspaceRoot: options2.cwd,
|
|
356030
356030
|
capabilities: {
|
|
@@ -376166,7 +376166,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
376166
376166
|
return [];
|
|
376167
376167
|
}
|
|
376168
376168
|
}
|
|
376169
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.37.
|
|
376169
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.37.2") {
|
|
376170
376170
|
if (process.env.USER_TYPE === "ant") {
|
|
376171
376171
|
const changelog = "";
|
|
376172
376172
|
if (changelog) {
|
|
@@ -376193,7 +376193,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.37.1")
|
|
|
376193
376193
|
releaseNotes
|
|
376194
376194
|
};
|
|
376195
376195
|
}
|
|
376196
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.37.
|
|
376196
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.37.2") {
|
|
376197
376197
|
if (process.env.USER_TYPE === "ant") {
|
|
376198
376198
|
const changelog = "";
|
|
376199
376199
|
if (changelog) {
|
|
@@ -377363,7 +377363,7 @@ function getRecentActivitySync() {
|
|
|
377363
377363
|
return cachedActivity;
|
|
377364
377364
|
}
|
|
377365
377365
|
function getLogoDisplayData() {
|
|
377366
|
-
const version2 = process.env.DEMO_VERSION ?? "1.37.
|
|
377366
|
+
const version2 = process.env.DEMO_VERSION ?? "1.37.2";
|
|
377367
377367
|
const serverUrl = getDirectConnectServerUrl();
|
|
377368
377368
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd2());
|
|
377369
377369
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -378152,7 +378152,7 @@ function LogoV2() {
|
|
|
378152
378152
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
378153
378153
|
t2 = () => {
|
|
378154
378154
|
const currentConfig2 = getGlobalConfig();
|
|
378155
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.37.
|
|
378155
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.37.2") {
|
|
378156
378156
|
return;
|
|
378157
378157
|
}
|
|
378158
378158
|
saveGlobalConfig(_temp326);
|
|
@@ -378837,12 +378837,12 @@ function LogoV2() {
|
|
|
378837
378837
|
return t41;
|
|
378838
378838
|
}
|
|
378839
378839
|
function _temp326(current) {
|
|
378840
|
-
if (current.lastReleaseNotesSeen === "1.37.
|
|
378840
|
+
if (current.lastReleaseNotesSeen === "1.37.2") {
|
|
378841
378841
|
return current;
|
|
378842
378842
|
}
|
|
378843
378843
|
return {
|
|
378844
378844
|
...current,
|
|
378845
|
-
lastReleaseNotesSeen: "1.37.
|
|
378845
|
+
lastReleaseNotesSeen: "1.37.2"
|
|
378846
378846
|
};
|
|
378847
378847
|
}
|
|
378848
378848
|
function _temp243(s_0) {
|
|
@@ -594737,7 +594737,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
594737
594737
|
smapsRollup,
|
|
594738
594738
|
platform: process.platform,
|
|
594739
594739
|
nodeVersion: process.version,
|
|
594740
|
-
ccVersion: "1.37.
|
|
594740
|
+
ccVersion: "1.37.2"
|
|
594741
594741
|
};
|
|
594742
594742
|
}
|
|
594743
594743
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -595323,7 +595323,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
595323
595323
|
var call137 = async () => {
|
|
595324
595324
|
return {
|
|
595325
595325
|
type: "text",
|
|
595326
|
-
value: "1.37.
|
|
595326
|
+
value: "1.37.2"
|
|
595327
595327
|
};
|
|
595328
595328
|
}, version2, version_default;
|
|
595329
595329
|
var init_version = __esm(() => {
|
|
@@ -605403,7 +605403,7 @@ function generateHtmlReport(data, insights) {
|
|
|
605403
605403
|
</html>`;
|
|
605404
605404
|
}
|
|
605405
605405
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
605406
|
-
const version3 = typeof MACRO !== "undefined" ? "1.37.
|
|
605406
|
+
const version3 = typeof MACRO !== "undefined" ? "1.37.2" : "unknown";
|
|
605407
605407
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
605408
605408
|
const facets_summary = {
|
|
605409
605409
|
total: facets.size,
|
|
@@ -609683,7 +609683,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
609683
609683
|
init_settings2();
|
|
609684
609684
|
init_slowOperations();
|
|
609685
609685
|
init_uuid();
|
|
609686
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.37.
|
|
609686
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.37.2" : "unknown";
|
|
609687
609687
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
609688
609688
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
609689
609689
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -610888,7 +610888,7 @@ var init_filesystem = __esm(() => {
|
|
|
610888
610888
|
});
|
|
610889
610889
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
610890
610890
|
const nonce = randomBytes18(16).toString("hex");
|
|
610891
|
-
return join200(getURTempDir(), "bundled-skills", "1.37.
|
|
610891
|
+
return join200(getURTempDir(), "bundled-skills", "1.37.2", nonce);
|
|
610892
610892
|
});
|
|
610893
610893
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
610894
610894
|
});
|
|
@@ -617177,7 +617177,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
617177
617177
|
}
|
|
617178
617178
|
function computeFingerprintFromMessages(messages) {
|
|
617179
617179
|
const firstMessageText = extractFirstMessageText(messages);
|
|
617180
|
-
return computeFingerprint(firstMessageText, "1.37.
|
|
617180
|
+
return computeFingerprint(firstMessageText, "1.37.2");
|
|
617181
617181
|
}
|
|
617182
617182
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
617183
617183
|
var init_fingerprint = () => {};
|
|
@@ -619051,7 +619051,7 @@ async function sideQuery(opts) {
|
|
|
619051
619051
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
619052
619052
|
}
|
|
619053
619053
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
619054
|
-
const fingerprint = computeFingerprint(messageText2, "1.37.
|
|
619054
|
+
const fingerprint = computeFingerprint(messageText2, "1.37.2");
|
|
619055
619055
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
619056
619056
|
const systemBlocks = [
|
|
619057
619057
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -623788,7 +623788,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
623788
623788
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
623789
623789
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
623790
623790
|
betas: getSdkBetas(),
|
|
623791
|
-
ur_version: "1.37.
|
|
623791
|
+
ur_version: "1.37.2",
|
|
623792
623792
|
output_style: outputStyle2,
|
|
623793
623793
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
623794
623794
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -638416,7 +638416,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
638416
638416
|
function getSemverPart(version3) {
|
|
638417
638417
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
638418
638418
|
}
|
|
638419
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.37.
|
|
638419
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.37.2") {
|
|
638420
638420
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
638421
638421
|
if (!updatedVersion) {
|
|
638422
638422
|
return null;
|
|
@@ -638465,7 +638465,7 @@ function AutoUpdater({
|
|
|
638465
638465
|
return;
|
|
638466
638466
|
}
|
|
638467
638467
|
if (false) {}
|
|
638468
|
-
const currentVersion = "1.37.
|
|
638468
|
+
const currentVersion = "1.37.2";
|
|
638469
638469
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
638470
638470
|
let latestVersion = await getLatestVersion(channel);
|
|
638471
638471
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -638694,12 +638694,12 @@ function NativeAutoUpdater({
|
|
|
638694
638694
|
logEvent("tengu_native_auto_updater_start", {});
|
|
638695
638695
|
try {
|
|
638696
638696
|
const maxVersion = await getMaxVersion();
|
|
638697
|
-
if (maxVersion && gt("1.37.
|
|
638697
|
+
if (maxVersion && gt("1.37.2", maxVersion)) {
|
|
638698
638698
|
const msg = await getMaxVersionMessage();
|
|
638699
638699
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
638700
638700
|
}
|
|
638701
638701
|
const result = await installLatest(channel);
|
|
638702
|
-
const currentVersion = "1.37.
|
|
638702
|
+
const currentVersion = "1.37.2";
|
|
638703
638703
|
const latencyMs = Date.now() - startTime;
|
|
638704
638704
|
if (result.lockFailed) {
|
|
638705
638705
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -638836,17 +638836,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
638836
638836
|
const maxVersion = await getMaxVersion();
|
|
638837
638837
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
638838
638838
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
638839
|
-
if (gte("1.37.
|
|
638840
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.37.
|
|
638839
|
+
if (gte("1.37.2", maxVersion)) {
|
|
638840
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.37.2"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
638841
638841
|
setUpdateAvailable(false);
|
|
638842
638842
|
return;
|
|
638843
638843
|
}
|
|
638844
638844
|
latest = maxVersion;
|
|
638845
638845
|
}
|
|
638846
|
-
const hasUpdate = latest && !gte("1.37.
|
|
638846
|
+
const hasUpdate = latest && !gte("1.37.2", latest) && !shouldSkipVersion(latest);
|
|
638847
638847
|
setUpdateAvailable(!!hasUpdate);
|
|
638848
638848
|
if (hasUpdate) {
|
|
638849
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.37.
|
|
638849
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.37.2"} -> ${latest}`);
|
|
638850
638850
|
}
|
|
638851
638851
|
};
|
|
638852
638852
|
$3[0] = t1;
|
|
@@ -638880,7 +638880,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
638880
638880
|
wrap: "truncate",
|
|
638881
638881
|
children: [
|
|
638882
638882
|
"currentVersion: ",
|
|
638883
|
-
"1.37.
|
|
638883
|
+
"1.37.2"
|
|
638884
638884
|
]
|
|
638885
638885
|
}, undefined, true, undefined, this);
|
|
638886
638886
|
$3[3] = verbose;
|
|
@@ -651332,7 +651332,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
651332
651332
|
project_dir: getOriginalCwd(),
|
|
651333
651333
|
added_dirs: addedDirs
|
|
651334
651334
|
},
|
|
651335
|
-
version: "1.37.
|
|
651335
|
+
version: "1.37.2",
|
|
651336
651336
|
output_style: {
|
|
651337
651337
|
name: outputStyleName
|
|
651338
651338
|
},
|
|
@@ -651415,7 +651415,7 @@ function StatusLineInner({
|
|
|
651415
651415
|
const taskValues = Object.values(tasks2);
|
|
651416
651416
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
651417
651417
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
651418
|
-
version: "1.37.
|
|
651418
|
+
version: "1.37.2",
|
|
651419
651419
|
providerLabel: providerRuntime.providerLabel,
|
|
651420
651420
|
authMode: providerRuntime.authLabel,
|
|
651421
651421
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -662903,7 +662903,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
662903
662903
|
} catch {}
|
|
662904
662904
|
const data = {
|
|
662905
662905
|
trigger: trigger2,
|
|
662906
|
-
version: "1.37.
|
|
662906
|
+
version: "1.37.2",
|
|
662907
662907
|
platform: process.platform,
|
|
662908
662908
|
transcript,
|
|
662909
662909
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -674787,7 +674787,7 @@ function WelcomeV2() {
|
|
|
674787
674787
|
dimColor: true,
|
|
674788
674788
|
children: [
|
|
674789
674789
|
"v",
|
|
674790
|
-
"1.37.
|
|
674790
|
+
"1.37.2"
|
|
674791
674791
|
]
|
|
674792
674792
|
}, undefined, true, undefined, this)
|
|
674793
674793
|
]
|
|
@@ -676047,7 +676047,7 @@ function completeOnboarding() {
|
|
|
676047
676047
|
saveGlobalConfig((current) => ({
|
|
676048
676048
|
...current,
|
|
676049
676049
|
hasCompletedOnboarding: true,
|
|
676050
|
-
lastOnboardingVersion: "1.37.
|
|
676050
|
+
lastOnboardingVersion: "1.37.2"
|
|
676051
676051
|
}));
|
|
676052
676052
|
}
|
|
676053
676053
|
function showDialog(root2, renderer) {
|
|
@@ -681084,7 +681084,7 @@ function appendToLog(path24, message) {
|
|
|
681084
681084
|
cwd: getFsImplementation().cwd(),
|
|
681085
681085
|
userType: process.env.USER_TYPE,
|
|
681086
681086
|
sessionId: getSessionId(),
|
|
681087
|
-
version: "1.37.
|
|
681087
|
+
version: "1.37.2"
|
|
681088
681088
|
};
|
|
681089
681089
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
681090
681090
|
}
|
|
@@ -685178,8 +685178,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
685178
685178
|
}
|
|
685179
685179
|
async function checkEnvLessBridgeMinVersion() {
|
|
685180
685180
|
const cfg = await getEnvLessBridgeConfig();
|
|
685181
|
-
if (cfg.min_version && lt("1.37.
|
|
685182
|
-
return `Your version of UR (${"1.37.
|
|
685181
|
+
if (cfg.min_version && lt("1.37.2", cfg.min_version)) {
|
|
685182
|
+
return `Your version of UR (${"1.37.2"}) is too old for Remote Control.
|
|
685183
685183
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
685184
685184
|
}
|
|
685185
685185
|
return null;
|
|
@@ -685653,7 +685653,7 @@ async function initBridgeCore(params) {
|
|
|
685653
685653
|
const rawApi = createBridgeApiClient({
|
|
685654
685654
|
baseUrl,
|
|
685655
685655
|
getAccessToken,
|
|
685656
|
-
runnerVersion: "1.37.
|
|
685656
|
+
runnerVersion: "1.37.2",
|
|
685657
685657
|
onDebug: logForDebugging,
|
|
685658
685658
|
onAuth401,
|
|
685659
685659
|
getTrustedDeviceToken
|
|
@@ -691335,7 +691335,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
691335
691335
|
setCwd(cwd3);
|
|
691336
691336
|
const server2 = new Server({
|
|
691337
691337
|
name: "ur/tengu",
|
|
691338
|
-
version: "1.37.
|
|
691338
|
+
version: "1.37.2"
|
|
691339
691339
|
}, {
|
|
691340
691340
|
capabilities: {
|
|
691341
691341
|
tools: {}
|
|
@@ -693377,7 +693377,7 @@ async function update() {
|
|
|
693377
693377
|
logEvent("tengu_update_check", {});
|
|
693378
693378
|
const diagnostic = await getDoctorDiagnostic();
|
|
693379
693379
|
const result = await checkUpgradeStatus({
|
|
693380
|
-
currentVersion: "1.37.
|
|
693380
|
+
currentVersion: "1.37.2",
|
|
693381
693381
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
693382
693382
|
installationType: diagnostic.installationType,
|
|
693383
693383
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -694623,7 +694623,7 @@ ${customInstructions}` : customInstructions;
|
|
|
694623
694623
|
}
|
|
694624
694624
|
}
|
|
694625
694625
|
logForDiagnosticsNoPII("info", "started", {
|
|
694626
|
-
version: "1.37.
|
|
694626
|
+
version: "1.37.2",
|
|
694627
694627
|
is_native_binary: isInBundledMode()
|
|
694628
694628
|
});
|
|
694629
694629
|
registerCleanup(async () => {
|
|
@@ -695409,7 +695409,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
695409
695409
|
pendingHookMessages
|
|
695410
695410
|
}, renderAndRun);
|
|
695411
695411
|
}
|
|
695412
|
-
}).version("1.37.
|
|
695412
|
+
}).version("1.37.2 (UR-AGENT)", "-v, --version", "Output the version number");
|
|
695413
695413
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
695414
695414
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
695415
695415
|
if (canUserConfigureAdvisor()) {
|
|
@@ -696324,7 +696324,7 @@ if (false) {}
|
|
|
696324
696324
|
async function main2() {
|
|
696325
696325
|
const args = process.argv.slice(2);
|
|
696326
696326
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
696327
|
-
console.log(`${"1.37.
|
|
696327
|
+
console.log(`${"1.37.2"} (UR-AGENT)`);
|
|
696328
696328
|
return;
|
|
696329
696329
|
}
|
|
696330
696330
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|
package/docs/IDE.md
CHANGED
|
@@ -86,9 +86,14 @@ Install it with `ur ide install` (offers the bundled VSIX) or from the
|
|
|
86
86
|
packaged `.vsix`. The extension is bundled inside this repository and
|
|
87
87
|
packaged as a local VSIX when installed from UR-AGENT; the public install
|
|
88
88
|
path does not depend on an unpublished marketplace extension ID. Every
|
|
89
|
-
feature below
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
feature below runs UR as a local subprocess and never talks to a model
|
|
90
|
+
provider or network service directly.
|
|
91
|
+
|
|
92
|
+
When the workspace itself is a UR checkout, the extension prefers the
|
|
93
|
+
workspace-local runtime (`bun dist/cli.js`, then `node bin/ur.js`) before
|
|
94
|
+
falling back to `ur` from `PATH`. Set `ur.executablePath` in VS Code settings
|
|
95
|
+
to force a specific binary; `ur.executableArgs` can provide fixed wrapper
|
|
96
|
+
arguments before normal UR command arguments.
|
|
92
97
|
|
|
93
98
|
### Chat panel
|
|
94
99
|
|
|
@@ -11,7 +11,13 @@ marketplace extension ID.
|
|
|
11
11
|
|
|
12
12
|
The extension never talks to a model provider or network service directly —
|
|
13
13
|
every AI request goes through your local `ur` CLI, the same way `ur` behaves
|
|
14
|
-
in a terminal.
|
|
14
|
+
in a terminal.
|
|
15
|
+
|
|
16
|
+
When the opened workspace is a UR checkout, the extension prefers the
|
|
17
|
+
workspace-local runtime (`bun dist/cli.js`, then `node bin/ur.js`) before
|
|
18
|
+
falling back to `ur` on `PATH`. To force a specific binary, set
|
|
19
|
+
`ur.executablePath` in VS Code settings. Use `ur.executableArgs` only for
|
|
20
|
+
custom wrappers that need fixed arguments before normal UR arguments.
|
|
15
21
|
|
|
16
22
|
## Chat
|
|
17
23
|
|
|
@@ -221,23 +221,66 @@ var DiffTreeProvider = class {
|
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
// src/bridge/urCli.ts
|
|
224
|
-
var
|
|
224
|
+
var import_node_child_process2 = require("node:child_process");
|
|
225
225
|
var import_node_util = require("node:util");
|
|
226
|
-
|
|
226
|
+
|
|
227
|
+
// src/bridge/urCommand.ts
|
|
228
|
+
var import_node_child_process = require("node:child_process");
|
|
229
|
+
var import_node_fs = require("node:fs");
|
|
230
|
+
var import_node_path = require("node:path");
|
|
231
|
+
function resolveUrCommand(options) {
|
|
232
|
+
const config = options.config ?? {};
|
|
233
|
+
const configuredPath = config.executablePath?.trim();
|
|
234
|
+
const configuredArgs = normalizeExecutableArgs(config.executableArgs);
|
|
235
|
+
if (configuredPath) {
|
|
236
|
+
return command(configuredPath, configuredArgs, "configured");
|
|
237
|
+
}
|
|
238
|
+
const pathExists = options.pathExists ?? import_node_fs.existsSync;
|
|
239
|
+
const bunCommand = options.bunCommand ?? "bun";
|
|
240
|
+
const nodeCommand = options.nodeCommand ?? "node";
|
|
241
|
+
const distEntrypoint = (0, import_node_path.join)(options.cwd, "dist", "cli.js");
|
|
242
|
+
if (pathExists(distEntrypoint) && (options.bunAvailable ?? isBunAvailable)(bunCommand)) {
|
|
243
|
+
return command(bunCommand, [distEntrypoint], "workspace-dist");
|
|
244
|
+
}
|
|
245
|
+
const launcherEntrypoint = (0, import_node_path.join)(options.cwd, "bin", "ur.js");
|
|
246
|
+
if (pathExists(launcherEntrypoint)) {
|
|
247
|
+
return command(nodeCommand, [launcherEntrypoint], "workspace-launcher");
|
|
248
|
+
}
|
|
249
|
+
return command("ur", [], "path");
|
|
250
|
+
}
|
|
251
|
+
function formatResolvedUrCommand(resolved) {
|
|
252
|
+
return [resolved.command, ...resolved.args].join(" ");
|
|
253
|
+
}
|
|
254
|
+
function command(commandName, args, source) {
|
|
255
|
+
const resolved = { command: commandName, args, source, display: "" };
|
|
256
|
+
return { ...resolved, display: formatResolvedUrCommand(resolved) };
|
|
257
|
+
}
|
|
258
|
+
function normalizeExecutableArgs(args) {
|
|
259
|
+
return Array.isArray(args) ? args.filter((arg) => typeof arg === "string" && arg.length > 0) : [];
|
|
260
|
+
}
|
|
261
|
+
function isBunAvailable(commandName) {
|
|
262
|
+
const result = (0, import_node_child_process.spawnSync)(commandName, ["--version"], { stdio: "ignore" });
|
|
263
|
+
return !result.error && result.status === 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// src/bridge/urCli.ts
|
|
267
|
+
var execFileAsync = (0, import_node_util.promisify)(import_node_child_process2.execFile);
|
|
227
268
|
async function runUrCli(args, options) {
|
|
269
|
+
const executable = resolveUrCommand({ cwd: options.cwd, config: readUrCommandConfig() });
|
|
228
270
|
try {
|
|
229
|
-
const { stdout, stderr } = await execFileAsync(
|
|
271
|
+
const { stdout, stderr } = await execFileAsync(executable.command, [...executable.args, ...args], {
|
|
230
272
|
cwd: options.cwd,
|
|
231
273
|
shell: false
|
|
232
274
|
});
|
|
233
275
|
return { stdout, stderr };
|
|
234
276
|
} catch (error) {
|
|
235
|
-
throw new Error(formatUrCliError(args, error));
|
|
277
|
+
throw new Error(formatUrCliError(args, error, executable, options.cwd));
|
|
236
278
|
}
|
|
237
279
|
}
|
|
238
280
|
async function runUrCliCapture(args, options) {
|
|
281
|
+
const executable = resolveUrCommand({ cwd: options.cwd, config: readUrCommandConfig() });
|
|
239
282
|
try {
|
|
240
|
-
const { stdout, stderr } = await execFileAsync(
|
|
283
|
+
const { stdout, stderr } = await execFileAsync(executable.command, [...executable.args, ...args], {
|
|
241
284
|
cwd: options.cwd,
|
|
242
285
|
shell: false
|
|
243
286
|
});
|
|
@@ -246,13 +289,34 @@ async function runUrCliCapture(args, options) {
|
|
|
246
289
|
if (isCapturedNonZeroExit(error)) {
|
|
247
290
|
return { stdout: error.stdout, stderr: error.stderr, exitCode: error.code };
|
|
248
291
|
}
|
|
249
|
-
throw new Error(formatUrCliError(args, error));
|
|
292
|
+
throw new Error(formatUrCliError(args, error, executable, options.cwd));
|
|
250
293
|
}
|
|
251
294
|
}
|
|
252
|
-
function
|
|
295
|
+
function readUrCommandConfig() {
|
|
296
|
+
try {
|
|
297
|
+
const vscode18 = require("vscode");
|
|
298
|
+
const config = vscode18.workspace.getConfiguration("ur");
|
|
299
|
+
const executablePath = config.get("executablePath")?.trim();
|
|
300
|
+
const executableArgs = config.get("executableArgs") ?? [];
|
|
301
|
+
return {
|
|
302
|
+
executablePath: executablePath || void 0,
|
|
303
|
+
executableArgs: executableArgs.filter((arg) => typeof arg === "string" && arg.length > 0)
|
|
304
|
+
};
|
|
305
|
+
} catch {
|
|
306
|
+
return {};
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function formatUrCliError(args, error, executable, cwd) {
|
|
253
310
|
const stderr = hasStderr(error) ? error.stderr.trim() : "";
|
|
254
311
|
const detail = stderr || (error instanceof Error ? error.message : String(error));
|
|
255
|
-
return
|
|
312
|
+
return [
|
|
313
|
+
`Failed to run UR command.`,
|
|
314
|
+
`Executable: ${executable.display}`,
|
|
315
|
+
`cwd: ${cwd}`,
|
|
316
|
+
`Args: ${args.join(" ")}`,
|
|
317
|
+
`Error: ${detail}`,
|
|
318
|
+
`Hint: Set ur.executablePath in VS Code settings if the extension is using the wrong UR binary.`
|
|
319
|
+
].join("\n");
|
|
256
320
|
}
|
|
257
321
|
function hasStderr(error) {
|
|
258
322
|
return typeof error === "object" && error !== null && "stderr" in error && typeof error.stderr === "string";
|
|
@@ -409,7 +473,7 @@ function isCanUseToolRequest(message) {
|
|
|
409
473
|
}
|
|
410
474
|
|
|
411
475
|
// src/bridge/urProcess.ts
|
|
412
|
-
var
|
|
476
|
+
var import_node_child_process3 = require("node:child_process");
|
|
413
477
|
var NdjsonBuffer = class {
|
|
414
478
|
buffer = "";
|
|
415
479
|
/** Feed a raw chunk (may contain zero, one, or many complete lines, and may
|
|
@@ -477,14 +541,14 @@ function buildControlResponse(requestId, decision) {
|
|
|
477
541
|
}
|
|
478
542
|
};
|
|
479
543
|
}
|
|
480
|
-
var defaultSpawn = (
|
|
544
|
+
var defaultSpawn = (command2, args, options) => (0, import_node_child_process3.spawn)(command2, args, options);
|
|
481
545
|
function runUrTurn(request, handlers, deps = {}) {
|
|
482
546
|
const spawnFn = deps.spawn ?? defaultSpawn;
|
|
483
|
-
const
|
|
484
|
-
const args = buildUrArgs(request);
|
|
547
|
+
const executable = deps.executable ?? (deps.command ? { command: deps.command, args: [], source: "configured", display: deps.command } : resolveUrCommand({ cwd: request.cwd }));
|
|
548
|
+
const args = [...executable.args, ...buildUrArgs(request)];
|
|
485
549
|
let child;
|
|
486
550
|
try {
|
|
487
|
-
child = spawnFn(command, args, {
|
|
551
|
+
child = spawnFn(executable.command, args, {
|
|
488
552
|
cwd: request.cwd,
|
|
489
553
|
shell: false,
|
|
490
554
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -493,10 +557,18 @@ function runUrTurn(request, handlers, deps = {}) {
|
|
|
493
557
|
handlers.onExit({
|
|
494
558
|
ok: false,
|
|
495
559
|
exitCode: null,
|
|
560
|
+
signal: null,
|
|
496
561
|
canceled: false,
|
|
497
562
|
sawResult: false,
|
|
498
563
|
stderr: "",
|
|
499
|
-
error:
|
|
564
|
+
error: formatTurnFailure({
|
|
565
|
+
executable,
|
|
566
|
+
cwd: request.cwd,
|
|
567
|
+
exitCode: null,
|
|
568
|
+
signal: null,
|
|
569
|
+
stderr: "",
|
|
570
|
+
reason: `Failed to start: ${errorMessage2(error)}`
|
|
571
|
+
})
|
|
500
572
|
});
|
|
501
573
|
return { cancel: () => {
|
|
502
574
|
} };
|
|
@@ -507,7 +579,7 @@ function runUrTurn(request, handlers, deps = {}) {
|
|
|
507
579
|
let resultIsError = false;
|
|
508
580
|
let canceled = false;
|
|
509
581
|
let settled = false;
|
|
510
|
-
const finish = (exitCode, spawnError) => {
|
|
582
|
+
const finish = (exitCode, signal, spawnError) => {
|
|
511
583
|
if (settled) return;
|
|
512
584
|
settled = true;
|
|
513
585
|
const stderr = stderrChunks.join("");
|
|
@@ -515,10 +587,11 @@ function runUrTurn(request, handlers, deps = {}) {
|
|
|
515
587
|
handlers.onExit({
|
|
516
588
|
ok,
|
|
517
589
|
exitCode,
|
|
590
|
+
signal,
|
|
518
591
|
canceled,
|
|
519
592
|
sawResult,
|
|
520
593
|
stderr,
|
|
521
|
-
error: spawnError ?? (!ok && !canceled ? deriveErrorMessage(sawResult, resultIsError, exitCode, stderr) : void 0)
|
|
594
|
+
error: spawnError ?? (!ok && !canceled ? deriveErrorMessage(executable, request.cwd, sawResult, resultIsError, exitCode, signal, stderr) : void 0)
|
|
522
595
|
});
|
|
523
596
|
};
|
|
524
597
|
const handleMessage = (message) => {
|
|
@@ -547,13 +620,24 @@ function runUrTurn(request, handlers, deps = {}) {
|
|
|
547
620
|
stderrChunks.push(chunk.toString("utf8"));
|
|
548
621
|
});
|
|
549
622
|
child.on("error", (error) => {
|
|
550
|
-
finish(
|
|
623
|
+
finish(
|
|
624
|
+
null,
|
|
625
|
+
null,
|
|
626
|
+
formatTurnFailure({
|
|
627
|
+
executable,
|
|
628
|
+
cwd: request.cwd,
|
|
629
|
+
exitCode: null,
|
|
630
|
+
signal: null,
|
|
631
|
+
stderr: stderrChunks.join(""),
|
|
632
|
+
reason: `Failed to run: ${errorMessage2(error)}`
|
|
633
|
+
})
|
|
634
|
+
);
|
|
551
635
|
});
|
|
552
|
-
child.on("exit", (code) => {
|
|
636
|
+
child.on("exit", (code, signal) => {
|
|
553
637
|
for (const message of stdoutBuffer.flush()) {
|
|
554
638
|
handleMessage(message);
|
|
555
639
|
}
|
|
556
|
-
finish(code);
|
|
640
|
+
finish(code, signal);
|
|
557
641
|
});
|
|
558
642
|
return {
|
|
559
643
|
cancel: () => {
|
|
@@ -570,11 +654,26 @@ function writeControlResponse(child, requestId, decision) {
|
|
|
570
654
|
} catch {
|
|
571
655
|
}
|
|
572
656
|
}
|
|
573
|
-
function deriveErrorMessage(sawResult, resultIsError, exitCode, stderr) {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
657
|
+
function deriveErrorMessage(executable, cwd, sawResult, resultIsError, exitCode, signal, stderr) {
|
|
658
|
+
const reason = sawResult && resultIsError ? "UR reported an error completing this turn." : "UR exited without producing a successful result.";
|
|
659
|
+
return formatTurnFailure({ executable, cwd, exitCode, signal, stderr, reason });
|
|
660
|
+
}
|
|
661
|
+
function formatTurnFailure(options) {
|
|
662
|
+
const stderr = summarizeStderr(options.stderr);
|
|
663
|
+
return [
|
|
664
|
+
`UR chat backend failed.`,
|
|
665
|
+
`Executable: ${options.executable.display}`,
|
|
666
|
+
`cwd: ${options.cwd}`,
|
|
667
|
+
`Exit: code ${options.exitCode ?? "unknown"}, signal ${options.signal ?? "none"}`,
|
|
668
|
+
`stderr: ${stderr || "<empty>"}`,
|
|
669
|
+
options.reason,
|
|
670
|
+
`Hint: Set ur.executablePath in VS Code settings if the extension is using the wrong UR binary.`
|
|
671
|
+
].join("\n");
|
|
672
|
+
}
|
|
673
|
+
function summarizeStderr(stderr) {
|
|
674
|
+
const trimmed = stderr.trim();
|
|
675
|
+
if (trimmed.length <= 2e3) return trimmed;
|
|
676
|
+
return `${trimmed.slice(0, 2e3)}\u2026`;
|
|
578
677
|
}
|
|
579
678
|
function errorMessage2(error) {
|
|
580
679
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -1367,7 +1466,8 @@ var ChatController = class {
|
|
|
1367
1466
|
onMessage: (message) => this.handleStreamMessage(root, sessionId, message),
|
|
1368
1467
|
onControlRequest: (request) => this.handlePermissionRequest(request),
|
|
1369
1468
|
onExit: (result) => this.handleTurnExit(root, result)
|
|
1370
|
-
}
|
|
1469
|
+
},
|
|
1470
|
+
{ executable: resolveUrCommand({ cwd: root, config: readUrCommandConfig() }) }
|
|
1371
1471
|
);
|
|
1372
1472
|
}
|
|
1373
1473
|
handleStreamMessage(root, sessionId, message) {
|
|
@@ -1489,13 +1589,13 @@ var ChatController = class {
|
|
|
1489
1589
|
// src/chat/chatTreeProvider.ts
|
|
1490
1590
|
var vscode7 = __toESM(require("vscode"));
|
|
1491
1591
|
var ActionItem = class extends vscode7.TreeItem {
|
|
1492
|
-
constructor(label, description, icon,
|
|
1592
|
+
constructor(label, description, icon, command2, tooltip) {
|
|
1493
1593
|
super(label, vscode7.TreeItemCollapsibleState.None);
|
|
1494
1594
|
this.contextValue = "urChatAction";
|
|
1495
1595
|
this.description = description;
|
|
1496
1596
|
this.iconPath = new vscode7.ThemeIcon(icon);
|
|
1497
1597
|
this.tooltip = tooltip ?? `${label}${description ? ` - ${description}` : ""}`;
|
|
1498
|
-
this.command =
|
|
1598
|
+
this.command = command2;
|
|
1499
1599
|
}
|
|
1500
1600
|
};
|
|
1501
1601
|
var InfoItem3 = class extends vscode7.TreeItem {
|
|
@@ -1567,11 +1667,11 @@ var ChatTreeProvider = class {
|
|
|
1567
1667
|
};
|
|
1568
1668
|
|
|
1569
1669
|
// src/diffs/actions.ts
|
|
1570
|
-
var
|
|
1670
|
+
var import_node_child_process4 = require("node:child_process");
|
|
1571
1671
|
var fs3 = __toESM(require("node:fs"));
|
|
1572
1672
|
var import_node_util2 = require("node:util");
|
|
1573
1673
|
var vscode8 = __toESM(require("vscode"));
|
|
1574
|
-
var execFileAsync2 = (0, import_node_util2.promisify)(
|
|
1674
|
+
var execFileAsync2 = (0, import_node_util2.promisify)(import_node_child_process4.execFile);
|
|
1575
1675
|
async function commentDiff(item, provider) {
|
|
1576
1676
|
const root = workspaceRoot();
|
|
1577
1677
|
const bundle = item?.bundle;
|
|
@@ -2181,7 +2281,7 @@ async function showAgentOptions(cwd) {
|
|
|
2181
2281
|
}
|
|
2182
2282
|
|
|
2183
2283
|
// src/review/reviewDiff.ts
|
|
2184
|
-
var
|
|
2284
|
+
var import_node_child_process5 = require("node:child_process");
|
|
2185
2285
|
var import_node_util3 = require("node:util");
|
|
2186
2286
|
var vscode13 = __toESM(require("vscode"));
|
|
2187
2287
|
|
|
@@ -2199,7 +2299,7 @@ function buildReviewPrompt(diff) {
|
|
|
2199
2299
|
}
|
|
2200
2300
|
|
|
2201
2301
|
// src/review/reviewDiff.ts
|
|
2202
|
-
var execFileAsync3 = (0, import_node_util3.promisify)(
|
|
2302
|
+
var execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process5.execFile);
|
|
2203
2303
|
async function captureGitDiff(cwd) {
|
|
2204
2304
|
const { stdout } = await execFileAsync3("git", ["diff", "HEAD"], { cwd, shell: false });
|
|
2205
2305
|
return stdout;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ur-inline-diffs",
|
|
3
3
|
"displayName": "UR Inline Diffs",
|
|
4
4
|
"description": "Review, apply, and reject UR inline diff bundles from .ur/ide/diffs inside VS Code.",
|
|
5
|
-
"version": "1.37.
|
|
5
|
+
"version": "1.37.2",
|
|
6
6
|
"publisher": "ur-agent",
|
|
7
7
|
"engines": {
|
|
8
8
|
"vscode": "^1.92.0"
|
|
@@ -55,6 +55,24 @@
|
|
|
55
55
|
"typescript": "^5.7.0"
|
|
56
56
|
},
|
|
57
57
|
"contributes": {
|
|
58
|
+
"configuration": {
|
|
59
|
+
"title": "UR",
|
|
60
|
+
"properties": {
|
|
61
|
+
"ur.executablePath": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"default": "",
|
|
64
|
+
"description": "Absolute path or command name for the UR executable the extension should run. Leave empty to prefer a repo-local UR checkout in the workspace, then fall back to ur on PATH."
|
|
65
|
+
},
|
|
66
|
+
"ur.executableArgs": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"default": [],
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"description": "Optional arguments inserted after ur.executablePath and before UR command arguments. Use this only for custom wrappers, for example when ur.executablePath points to bun and the first arg is a dist/cli.js path."
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
58
76
|
"viewsContainers": {
|
|
59
77
|
"activitybar": [
|
|
60
78
|
{
|
package/package.json
CHANGED