ur-agent 1.29.1 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +33 -2
- package/dist/cli.js +520 -205
- package/docs/ACP.md +85 -0
- package/docs/IDE.md +77 -0
- package/docs/USAGE.md +1 -1
- package/docs/plugins.md +77 -0
- package/documentation/index.html +2 -2
- package/extensions/vscode-ur-inline-diffs/extension.js +87 -0
- package/extensions/vscode-ur-inline-diffs/package.json +34 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -56805,6 +56805,7 @@ var init_openaiCompatible = __esm(() => {
|
|
|
56805
56805
|
// src/services/api/urhqSubscription.ts
|
|
56806
56806
|
var exports_urhqSubscription = {};
|
|
56807
56807
|
__export(exports_urhqSubscription, {
|
|
56808
|
+
getSubscriptionCliStdinMode: () => getSubscriptionCliStdinMode,
|
|
56808
56809
|
createURHQSubscriptionClient: () => createURHQSubscriptionClient
|
|
56809
56810
|
});
|
|
56810
56811
|
import { spawn as spawn3 } from "child_process";
|
|
@@ -56880,6 +56881,9 @@ function createURHQSubscriptionClient(providerId, options) {
|
|
|
56880
56881
|
};
|
|
56881
56882
|
return { beta: { messages: messagesAPI } };
|
|
56882
56883
|
}
|
|
56884
|
+
function getSubscriptionCliStdinMode(input) {
|
|
56885
|
+
return input === undefined ? "ignore" : "pipe";
|
|
56886
|
+
}
|
|
56883
56887
|
function cliModelName(model) {
|
|
56884
56888
|
const slash = model.indexOf("/");
|
|
56885
56889
|
return slash >= 0 ? model.slice(slash + 1) : model;
|
|
@@ -57001,7 +57005,10 @@ function estimateTokens(text) {
|
|
|
57001
57005
|
return Math.ceil((text?.length ?? 0) / 4);
|
|
57002
57006
|
}
|
|
57003
57007
|
var CLI_SPECS, defaultRunner = (command, args, options) => new Promise((resolve8, reject) => {
|
|
57004
|
-
const child = spawn3(command, args, {
|
|
57008
|
+
const child = spawn3(command, args, {
|
|
57009
|
+
stdio: [getSubscriptionCliStdinMode(options.input), "pipe", "pipe"],
|
|
57010
|
+
signal: options.signal
|
|
57011
|
+
});
|
|
57005
57012
|
let stdout = "";
|
|
57006
57013
|
let stderr = "";
|
|
57007
57014
|
const timer = options.timeoutMs ? setTimeout(() => child.kill("SIGKILL"), options.timeoutMs) : undefined;
|
|
@@ -57021,10 +57028,10 @@ var CLI_SPECS, defaultRunner = (command, args, options) => new Promise((resolve8
|
|
|
57021
57028
|
clearTimeout(timer);
|
|
57022
57029
|
resolve8({ code: code ?? 1, stdout, stderr });
|
|
57023
57030
|
});
|
|
57024
|
-
if (options.input) {
|
|
57031
|
+
if (options.input !== undefined) {
|
|
57025
57032
|
child.stdin?.write(options.input);
|
|
57033
|
+
child.stdin?.end();
|
|
57026
57034
|
}
|
|
57027
|
-
child.stdin?.end();
|
|
57028
57035
|
});
|
|
57029
57036
|
var init_urhqSubscription = __esm(() => {
|
|
57030
57037
|
init_streamingAdapters();
|
|
@@ -69302,7 +69309,7 @@ var init_auth = __esm(() => {
|
|
|
69302
69309
|
|
|
69303
69310
|
// src/utils/userAgent.ts
|
|
69304
69311
|
function getURCodeUserAgent() {
|
|
69305
|
-
return `ur/${"1.
|
|
69312
|
+
return `ur/${"1.30.1"}`;
|
|
69306
69313
|
}
|
|
69307
69314
|
|
|
69308
69315
|
// src/utils/workloadContext.ts
|
|
@@ -69324,7 +69331,7 @@ function getUserAgent() {
|
|
|
69324
69331
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
69325
69332
|
const workload = getWorkload();
|
|
69326
69333
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
69327
|
-
return `ur-cli/${"1.
|
|
69334
|
+
return `ur-cli/${"1.30.1"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
69328
69335
|
}
|
|
69329
69336
|
function getMCPUserAgent() {
|
|
69330
69337
|
const parts = [];
|
|
@@ -69338,7 +69345,7 @@ function getMCPUserAgent() {
|
|
|
69338
69345
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
69339
69346
|
}
|
|
69340
69347
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
69341
|
-
return `ur/${"1.
|
|
69348
|
+
return `ur/${"1.30.1"}${suffix}`;
|
|
69342
69349
|
}
|
|
69343
69350
|
function getWebFetchUserAgent() {
|
|
69344
69351
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -69476,7 +69483,7 @@ var init_user = __esm(() => {
|
|
|
69476
69483
|
deviceId,
|
|
69477
69484
|
sessionId: getSessionId(),
|
|
69478
69485
|
email: getEmail(),
|
|
69479
|
-
appVersion: "1.
|
|
69486
|
+
appVersion: "1.30.1",
|
|
69480
69487
|
platform: getHostPlatformForAnalytics(),
|
|
69481
69488
|
organizationUuid,
|
|
69482
69489
|
accountUuid,
|
|
@@ -75993,7 +76000,7 @@ var init_metadata = __esm(() => {
|
|
|
75993
76000
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
75994
76001
|
WHITESPACE_REGEX = /\s+/;
|
|
75995
76002
|
getVersionBase = memoize_default(() => {
|
|
75996
|
-
const match = "1.
|
|
76003
|
+
const match = "1.30.1".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
75997
76004
|
return match ? match[0] : undefined;
|
|
75998
76005
|
});
|
|
75999
76006
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -76033,7 +76040,7 @@ var init_metadata = __esm(() => {
|
|
|
76033
76040
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
76034
76041
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
76035
76042
|
isURAiAuth: isURAISubscriber2(),
|
|
76036
|
-
version: "1.
|
|
76043
|
+
version: "1.30.1",
|
|
76037
76044
|
versionBase: getVersionBase(),
|
|
76038
76045
|
buildTime: "",
|
|
76039
76046
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -76703,7 +76710,7 @@ function initialize1PEventLogging() {
|
|
|
76703
76710
|
const platform2 = getPlatform();
|
|
76704
76711
|
const attributes = {
|
|
76705
76712
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
76706
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.
|
|
76713
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.30.1"
|
|
76707
76714
|
};
|
|
76708
76715
|
if (platform2 === "wsl") {
|
|
76709
76716
|
const wslVersion = getWslVersion();
|
|
@@ -76730,7 +76737,7 @@ function initialize1PEventLogging() {
|
|
|
76730
76737
|
})
|
|
76731
76738
|
]
|
|
76732
76739
|
});
|
|
76733
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.
|
|
76740
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.30.1");
|
|
76734
76741
|
}
|
|
76735
76742
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
76736
76743
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -82027,7 +82034,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
82027
82034
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
82028
82035
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
82029
82036
|
}
|
|
82030
|
-
var urVersion = "1.
|
|
82037
|
+
var urVersion = "1.30.1", coverage, priorityRoadmap;
|
|
82031
82038
|
var init_trends = __esm(() => {
|
|
82032
82039
|
coverage = [
|
|
82033
82040
|
{
|
|
@@ -84020,7 +84027,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
84020
84027
|
if (!isAttributionHeaderEnabled()) {
|
|
84021
84028
|
return "";
|
|
84022
84029
|
}
|
|
84023
|
-
const version2 = `${"1.
|
|
84030
|
+
const version2 = `${"1.30.1"}.${fingerprint}`;
|
|
84024
84031
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
84025
84032
|
const cch = "";
|
|
84026
84033
|
const workload = getWorkload();
|
|
@@ -191693,7 +191700,7 @@ function getTelemetryAttributes() {
|
|
|
191693
191700
|
attributes["session.id"] = sessionId;
|
|
191694
191701
|
}
|
|
191695
191702
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
191696
|
-
attributes["app.version"] = "1.
|
|
191703
|
+
attributes["app.version"] = "1.30.1";
|
|
191697
191704
|
}
|
|
191698
191705
|
const oauthAccount = getOauthAccountInfo();
|
|
191699
191706
|
if (oauthAccount) {
|
|
@@ -227098,7 +227105,7 @@ function getInstallationEnv() {
|
|
|
227098
227105
|
return;
|
|
227099
227106
|
}
|
|
227100
227107
|
function getURCodeVersion() {
|
|
227101
|
-
return "1.
|
|
227108
|
+
return "1.30.1";
|
|
227102
227109
|
}
|
|
227103
227110
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
227104
227111
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -229937,7 +229944,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
229937
229944
|
const client2 = new Client({
|
|
229938
229945
|
name: "ur",
|
|
229939
229946
|
title: "UR",
|
|
229940
|
-
version: "1.
|
|
229947
|
+
version: "1.30.1",
|
|
229941
229948
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
229942
229949
|
websiteUrl: PRODUCT_URL
|
|
229943
229950
|
}, {
|
|
@@ -230291,7 +230298,7 @@ var init_client5 = __esm(() => {
|
|
|
230291
230298
|
const client2 = new Client({
|
|
230292
230299
|
name: "ur",
|
|
230293
230300
|
title: "UR",
|
|
230294
|
-
version: "1.
|
|
230301
|
+
version: "1.30.1",
|
|
230295
230302
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
230296
230303
|
websiteUrl: PRODUCT_URL
|
|
230297
230304
|
}, {
|
|
@@ -240107,9 +240114,9 @@ async function assertMinVersion() {
|
|
|
240107
240114
|
if (false) {}
|
|
240108
240115
|
try {
|
|
240109
240116
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
240110
|
-
if (versionConfig.minVersion && lt("1.
|
|
240117
|
+
if (versionConfig.minVersion && lt("1.30.1", versionConfig.minVersion)) {
|
|
240111
240118
|
console.error(`
|
|
240112
|
-
It looks like your version of UR (${"1.
|
|
240119
|
+
It looks like your version of UR (${"1.30.1"}) needs an update.
|
|
240113
240120
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
240114
240121
|
|
|
240115
240122
|
To update, please run:
|
|
@@ -240325,7 +240332,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
240325
240332
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
240326
240333
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
240327
240334
|
pid: process.pid,
|
|
240328
|
-
currentVersion: "1.
|
|
240335
|
+
currentVersion: "1.30.1"
|
|
240329
240336
|
});
|
|
240330
240337
|
return "in_progress";
|
|
240331
240338
|
}
|
|
@@ -240334,7 +240341,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
240334
240341
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
240335
240342
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
240336
240343
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
240337
|
-
currentVersion: "1.
|
|
240344
|
+
currentVersion: "1.30.1"
|
|
240338
240345
|
});
|
|
240339
240346
|
console.error(`
|
|
240340
240347
|
Error: Windows NPM detected in WSL
|
|
@@ -240869,7 +240876,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
240869
240876
|
}
|
|
240870
240877
|
async function getDoctorDiagnostic() {
|
|
240871
240878
|
const installationType = await getCurrentInstallationType();
|
|
240872
|
-
const version2 = typeof MACRO !== "undefined" ? "1.
|
|
240879
|
+
const version2 = typeof MACRO !== "undefined" ? "1.30.1" : "unknown";
|
|
240873
240880
|
const installationPath = await getInstallationPath();
|
|
240874
240881
|
const invokedBinary = getInvokedBinary();
|
|
240875
240882
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -241804,8 +241811,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
241804
241811
|
const maxVersion = await getMaxVersion();
|
|
241805
241812
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
241806
241813
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
241807
|
-
if (gte("1.
|
|
241808
|
-
logForDebugging(`Native installer: current version ${"1.
|
|
241814
|
+
if (gte("1.30.1", maxVersion)) {
|
|
241815
|
+
logForDebugging(`Native installer: current version ${"1.30.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
241809
241816
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
241810
241817
|
latency_ms: Date.now() - startTime,
|
|
241811
241818
|
max_version: maxVersion,
|
|
@@ -241816,7 +241823,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
241816
241823
|
version2 = maxVersion;
|
|
241817
241824
|
}
|
|
241818
241825
|
}
|
|
241819
|
-
if (!forceReinstall && version2 === "1.
|
|
241826
|
+
if (!forceReinstall && version2 === "1.30.1" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
241820
241827
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
241821
241828
|
logEvent("tengu_native_update_complete", {
|
|
241822
241829
|
latency_ms: Date.now() - startTime,
|
|
@@ -338743,7 +338750,7 @@ function Feedback({
|
|
|
338743
338750
|
platform: env2.platform,
|
|
338744
338751
|
gitRepo: envInfo.isGit,
|
|
338745
338752
|
terminal: env2.terminal,
|
|
338746
|
-
version: "1.
|
|
338753
|
+
version: "1.30.1",
|
|
338747
338754
|
transcript: normalizeMessagesForAPI(messages),
|
|
338748
338755
|
errors: sanitizedErrors,
|
|
338749
338756
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -338935,7 +338942,7 @@ function Feedback({
|
|
|
338935
338942
|
", ",
|
|
338936
338943
|
env2.terminal,
|
|
338937
338944
|
", v",
|
|
338938
|
-
"1.
|
|
338945
|
+
"1.30.1"
|
|
338939
338946
|
]
|
|
338940
338947
|
}, undefined, true, undefined, this)
|
|
338941
338948
|
]
|
|
@@ -339041,7 +339048,7 @@ ${sanitizedDescription}
|
|
|
339041
339048
|
` + `**Environment Info**
|
|
339042
339049
|
` + `- Platform: ${env2.platform}
|
|
339043
339050
|
` + `- Terminal: ${env2.terminal}
|
|
339044
|
-
` + `- Version: ${"1.
|
|
339051
|
+
` + `- Version: ${"1.30.1"}
|
|
339045
339052
|
` + `- Feedback ID: ${feedbackId}
|
|
339046
339053
|
` + `
|
|
339047
339054
|
**Errors**
|
|
@@ -342152,7 +342159,7 @@ function buildPrimarySection() {
|
|
|
342152
342159
|
}, undefined, false, undefined, this);
|
|
342153
342160
|
return [{
|
|
342154
342161
|
label: "Version",
|
|
342155
|
-
value: "1.
|
|
342162
|
+
value: "1.30.1"
|
|
342156
342163
|
}, {
|
|
342157
342164
|
label: "Session name",
|
|
342158
342165
|
value: nameValue
|
|
@@ -345452,7 +345459,7 @@ function Config({
|
|
|
345452
345459
|
}
|
|
345453
345460
|
}, undefined, false, undefined, this)
|
|
345454
345461
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
345455
|
-
currentVersion: "1.
|
|
345462
|
+
currentVersion: "1.30.1",
|
|
345456
345463
|
onChoice: (choice) => {
|
|
345457
345464
|
setShowSubmenu(null);
|
|
345458
345465
|
setTabsHidden(false);
|
|
@@ -345464,7 +345471,7 @@ function Config({
|
|
|
345464
345471
|
autoUpdatesChannel: "stable"
|
|
345465
345472
|
};
|
|
345466
345473
|
if (choice === "stay") {
|
|
345467
|
-
newSettings.minimumVersion = "1.
|
|
345474
|
+
newSettings.minimumVersion = "1.30.1";
|
|
345468
345475
|
}
|
|
345469
345476
|
updateSettingsForSource("userSettings", newSettings);
|
|
345470
345477
|
setSettingsData((prev_27) => ({
|
|
@@ -353534,7 +353541,7 @@ function HelpV2(t0) {
|
|
|
353534
353541
|
let t6;
|
|
353535
353542
|
if ($3[31] !== tabs) {
|
|
353536
353543
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
353537
|
-
title: `UR v${"1.
|
|
353544
|
+
title: `UR v${"1.30.1"}`,
|
|
353538
353545
|
color: "professionalBlue",
|
|
353539
353546
|
defaultTab: "general",
|
|
353540
353547
|
children: tabs
|
|
@@ -354280,7 +354287,7 @@ function buildToolUseContext(tools, readFileStateCache) {
|
|
|
354280
354287
|
async function handleInitialize(options2) {
|
|
354281
354288
|
return {
|
|
354282
354289
|
name: "ur-agent",
|
|
354283
|
-
version: "1.
|
|
354290
|
+
version: "1.30.1",
|
|
354284
354291
|
protocolVersion: "0.1.0",
|
|
354285
354292
|
workspaceRoot: options2.cwd,
|
|
354286
354293
|
capabilities: {
|
|
@@ -374404,7 +374411,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
374404
374411
|
return [];
|
|
374405
374412
|
}
|
|
374406
374413
|
}
|
|
374407
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.
|
|
374414
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.30.1") {
|
|
374408
374415
|
if (process.env.USER_TYPE === "ant") {
|
|
374409
374416
|
const changelog = "";
|
|
374410
374417
|
if (changelog) {
|
|
@@ -374431,7 +374438,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.29.1")
|
|
|
374431
374438
|
releaseNotes
|
|
374432
374439
|
};
|
|
374433
374440
|
}
|
|
374434
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.
|
|
374441
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.30.1") {
|
|
374435
374442
|
if (process.env.USER_TYPE === "ant") {
|
|
374436
374443
|
const changelog = "";
|
|
374437
374444
|
if (changelog) {
|
|
@@ -375601,7 +375608,7 @@ function getRecentActivitySync() {
|
|
|
375601
375608
|
return cachedActivity;
|
|
375602
375609
|
}
|
|
375603
375610
|
function getLogoDisplayData() {
|
|
375604
|
-
const version2 = process.env.DEMO_VERSION ?? "1.
|
|
375611
|
+
const version2 = process.env.DEMO_VERSION ?? "1.30.1";
|
|
375605
375612
|
const serverUrl = getDirectConnectServerUrl();
|
|
375606
375613
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd2());
|
|
375607
375614
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -376390,7 +376397,7 @@ function LogoV2() {
|
|
|
376390
376397
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
376391
376398
|
t2 = () => {
|
|
376392
376399
|
const currentConfig = getGlobalConfig();
|
|
376393
|
-
if (currentConfig.lastReleaseNotesSeen === "1.
|
|
376400
|
+
if (currentConfig.lastReleaseNotesSeen === "1.30.1") {
|
|
376394
376401
|
return;
|
|
376395
376402
|
}
|
|
376396
376403
|
saveGlobalConfig(_temp326);
|
|
@@ -377075,12 +377082,12 @@ function LogoV2() {
|
|
|
377075
377082
|
return t41;
|
|
377076
377083
|
}
|
|
377077
377084
|
function _temp326(current) {
|
|
377078
|
-
if (current.lastReleaseNotesSeen === "1.
|
|
377085
|
+
if (current.lastReleaseNotesSeen === "1.30.1") {
|
|
377079
377086
|
return current;
|
|
377080
377087
|
}
|
|
377081
377088
|
return {
|
|
377082
377089
|
...current,
|
|
377083
|
-
lastReleaseNotesSeen: "1.
|
|
377090
|
+
lastReleaseNotesSeen: "1.30.1"
|
|
377084
377091
|
};
|
|
377085
377092
|
}
|
|
377086
377093
|
function _temp243(s_0) {
|
|
@@ -393991,6 +393998,137 @@ var init_a2a_card2 = __esm(() => {
|
|
|
393991
393998
|
a2a_card_default = a2aCard;
|
|
393992
393999
|
});
|
|
393993
394000
|
|
|
394001
|
+
// src/services/agents/acpStdio.ts
|
|
394002
|
+
var exports_acpStdio = {};
|
|
394003
|
+
__export(exports_acpStdio, {
|
|
394004
|
+
startAcpStdioAgent: () => startAcpStdioAgent,
|
|
394005
|
+
createAcpStdioAgent: () => createAcpStdioAgent
|
|
394006
|
+
});
|
|
394007
|
+
import { randomUUID as randomUUID36 } from "crypto";
|
|
394008
|
+
import { createInterface } from "readline";
|
|
394009
|
+
function extractPromptText(prompt) {
|
|
394010
|
+
if (typeof prompt === "string")
|
|
394011
|
+
return prompt;
|
|
394012
|
+
if (!Array.isArray(prompt))
|
|
394013
|
+
return "";
|
|
394014
|
+
return prompt.map((block2) => {
|
|
394015
|
+
if (typeof block2 === "string")
|
|
394016
|
+
return block2;
|
|
394017
|
+
if (block2 && typeof block2 === "object") {
|
|
394018
|
+
const b = block2;
|
|
394019
|
+
if (b.type === "text" || b.text)
|
|
394020
|
+
return b.text ?? "";
|
|
394021
|
+
}
|
|
394022
|
+
return "";
|
|
394023
|
+
}).filter(Boolean).join(`
|
|
394024
|
+
`);
|
|
394025
|
+
}
|
|
394026
|
+
function createAcpStdioAgent(deps) {
|
|
394027
|
+
const sessions = new Map;
|
|
394028
|
+
const runPrompt = deps.runPrompt ?? defaultPromptRunner;
|
|
394029
|
+
const respond = (id, result) => deps.write({ jsonrpc: "2.0", id: id ?? null, result });
|
|
394030
|
+
const respondError = (id, code, message) => deps.write({ jsonrpc: "2.0", id: id ?? null, error: { code, message } });
|
|
394031
|
+
const notify2 = (method, params) => deps.write({ jsonrpc: "2.0", method, params });
|
|
394032
|
+
async function handle(message) {
|
|
394033
|
+
const { id, method, params } = message;
|
|
394034
|
+
if (typeof method !== "string")
|
|
394035
|
+
return;
|
|
394036
|
+
const hasId = id !== undefined && id !== null;
|
|
394037
|
+
try {
|
|
394038
|
+
switch (method) {
|
|
394039
|
+
case "initialize":
|
|
394040
|
+
respond(id, {
|
|
394041
|
+
protocolVersion: 1,
|
|
394042
|
+
agentCapabilities: {
|
|
394043
|
+
loadSession: false,
|
|
394044
|
+
promptCapabilities: { image: false, audio: false, embeddedContext: true }
|
|
394045
|
+
},
|
|
394046
|
+
authMethods: []
|
|
394047
|
+
});
|
|
394048
|
+
return;
|
|
394049
|
+
case "authenticate":
|
|
394050
|
+
respond(id, {});
|
|
394051
|
+
return;
|
|
394052
|
+
case "session/new": {
|
|
394053
|
+
const cwd2 = typeof params?.cwd === "string" ? params.cwd : deps.cwd;
|
|
394054
|
+
const sessionId = `sess_${randomUUID36()}`;
|
|
394055
|
+
sessions.set(sessionId, { cwd: cwd2, controller: new AbortController });
|
|
394056
|
+
respond(id, { sessionId });
|
|
394057
|
+
return;
|
|
394058
|
+
}
|
|
394059
|
+
case "session/prompt": {
|
|
394060
|
+
const sessionId = typeof params?.sessionId === "string" ? params.sessionId : "";
|
|
394061
|
+
const session2 = sessions.get(sessionId);
|
|
394062
|
+
if (!session2) {
|
|
394063
|
+
respondError(id, -32602, `unknown session: ${sessionId}`);
|
|
394064
|
+
return;
|
|
394065
|
+
}
|
|
394066
|
+
const controller = new AbortController;
|
|
394067
|
+
session2.controller = controller;
|
|
394068
|
+
const { stopReason } = await runPrompt(extractPromptText(params?.prompt), {
|
|
394069
|
+
sessionId,
|
|
394070
|
+
cwd: session2.cwd,
|
|
394071
|
+
signal: controller.signal,
|
|
394072
|
+
onChunk: (text) => notify2("session/update", {
|
|
394073
|
+
sessionId,
|
|
394074
|
+
update: { sessionUpdate: "agent_message_chunk", content: { type: "text", text } }
|
|
394075
|
+
})
|
|
394076
|
+
});
|
|
394077
|
+
respond(id, { stopReason: controller.signal.aborted ? "cancelled" : stopReason });
|
|
394078
|
+
return;
|
|
394079
|
+
}
|
|
394080
|
+
case "session/cancel": {
|
|
394081
|
+
const sessionId = typeof params?.sessionId === "string" ? params.sessionId : "";
|
|
394082
|
+
sessions.get(sessionId)?.controller.abort();
|
|
394083
|
+
if (hasId)
|
|
394084
|
+
respond(id, { cancelled: true });
|
|
394085
|
+
return;
|
|
394086
|
+
}
|
|
394087
|
+
case "shutdown":
|
|
394088
|
+
if (hasId)
|
|
394089
|
+
respond(id, null);
|
|
394090
|
+
return;
|
|
394091
|
+
default:
|
|
394092
|
+
if (hasId)
|
|
394093
|
+
respondError(id, -32601, `method not found: ${method}`);
|
|
394094
|
+
}
|
|
394095
|
+
} catch (error40) {
|
|
394096
|
+
if (hasId)
|
|
394097
|
+
respondError(id, -32603, error40 instanceof Error ? error40.message : String(error40));
|
|
394098
|
+
}
|
|
394099
|
+
}
|
|
394100
|
+
return { handle, sessions };
|
|
394101
|
+
}
|
|
394102
|
+
async function startAcpStdioAgent(options2) {
|
|
394103
|
+
const agent = createAcpStdioAgent({
|
|
394104
|
+
cwd: options2.cwd,
|
|
394105
|
+
write: (message) => process.stdout.write(`${JSON.stringify(message)}
|
|
394106
|
+
`)
|
|
394107
|
+
});
|
|
394108
|
+
const rl = createInterface({ input: process.stdin });
|
|
394109
|
+
for await (const line of rl) {
|
|
394110
|
+
const trimmed = line.trim();
|
|
394111
|
+
if (!trimmed)
|
|
394112
|
+
continue;
|
|
394113
|
+
try {
|
|
394114
|
+
await agent.handle(JSON.parse(trimmed));
|
|
394115
|
+
} catch {
|
|
394116
|
+
process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "parse error" } })}
|
|
394117
|
+
`);
|
|
394118
|
+
}
|
|
394119
|
+
}
|
|
394120
|
+
}
|
|
394121
|
+
var defaultPromptRunner = async (prompt, ctx) => {
|
|
394122
|
+
const result = await execFileNoThrowWithCwd(process.execPath, [process.argv[1] ?? "", "-p", "--output-format", "text", prompt], { cwd: ctx.cwd, timeout: 30 * 60 * 1000, preserveOutputOnError: true });
|
|
394123
|
+
const text = (result.stdout || result.stderr || result.error || "").trim();
|
|
394124
|
+
if (text)
|
|
394125
|
+
ctx.onChunk(text);
|
|
394126
|
+
return { stopReason: result.code === 0 ? "end_turn" : "refusal" };
|
|
394127
|
+
};
|
|
394128
|
+
var init_acpStdio = __esm(() => {
|
|
394129
|
+
init_execFileNoThrow();
|
|
394130
|
+
});
|
|
394131
|
+
|
|
393994
394132
|
// src/commands/acp/acp.tsx
|
|
393995
394133
|
var exports_acp = {};
|
|
393996
394134
|
__export(exports_acp, {
|
|
@@ -394022,7 +394160,8 @@ function positionals4(tokens) {
|
|
|
394022
394160
|
function usage4() {
|
|
394023
394161
|
return [
|
|
394024
394162
|
"Usage:",
|
|
394025
|
-
" ur acp serve [--host 127.0.0.1] [--port 8123] [--token <secret>] [--dry-run]",
|
|
394163
|
+
" ur acp serve [--host 127.0.0.1] [--port 8123] [--token <secret>] [--dry-run] [--debug]",
|
|
394164
|
+
" ur acp stdio Run a stdio ACP agent for editors (Zed, ACP Neovim)",
|
|
394026
394165
|
" ur acp stop",
|
|
394027
394166
|
" ur acp status [--json]"
|
|
394028
394167
|
].join(`
|
|
@@ -394036,8 +394175,14 @@ var call57 = async (args) => {
|
|
|
394036
394175
|
const port = Number(option4(tokens, "--port") ?? "8123");
|
|
394037
394176
|
const token = option4(tokens, "--token");
|
|
394038
394177
|
const dryRun = tokens.includes("--dry-run");
|
|
394039
|
-
|
|
394040
|
-
|
|
394178
|
+
const debug = tokens.includes("--debug");
|
|
394179
|
+
if (action3 === "serve" || action3 === "start") {
|
|
394180
|
+
await serveAcp({ host, port, token, cwd: process.cwd(), dryRun, debug });
|
|
394181
|
+
return { type: "text", value: "" };
|
|
394182
|
+
}
|
|
394183
|
+
if (action3 === "stdio") {
|
|
394184
|
+
const { startAcpStdioAgent: startAcpStdioAgent2 } = await Promise.resolve().then(() => (init_acpStdio(), exports_acpStdio));
|
|
394185
|
+
await startAcpStdioAgent2({ cwd: process.cwd() });
|
|
394041
394186
|
return { type: "text", value: "" };
|
|
394042
394187
|
}
|
|
394043
394188
|
if (action3 === "stop") {
|
|
@@ -394066,7 +394211,7 @@ var init_acp2 = __esm(() => {
|
|
|
394066
394211
|
type: "local",
|
|
394067
394212
|
name: "acp",
|
|
394068
394213
|
description: "Manage the local Agent Communication Protocol (ACP) server for IDE extensions",
|
|
394069
|
-
argumentHint: "[serve|stop|status] [--host] [--port] [--token] [--json]",
|
|
394214
|
+
argumentHint: "[serve|stdio|stop|status] [--host] [--port] [--token] [--debug] [--json]",
|
|
394070
394215
|
supportsNonInteractive: true,
|
|
394071
394216
|
load: () => Promise.resolve().then(() => (init_acp(), exports_acp))
|
|
394072
394217
|
};
|
|
@@ -586148,7 +586293,7 @@ __export(exports_branch, {
|
|
|
586148
586293
|
deriveFirstPrompt: () => deriveFirstPrompt,
|
|
586149
586294
|
call: () => call129
|
|
586150
586295
|
});
|
|
586151
|
-
import { randomUUID as
|
|
586296
|
+
import { randomUUID as randomUUID37 } from "crypto";
|
|
586152
586297
|
import { mkdir as mkdir34, readFile as readFile46, writeFile as writeFile39 } from "fs/promises";
|
|
586153
586298
|
function deriveFirstPrompt(firstUserMessage) {
|
|
586154
586299
|
const content = firstUserMessage?.message?.content;
|
|
@@ -586160,7 +586305,7 @@ function deriveFirstPrompt(firstUserMessage) {
|
|
|
586160
586305
|
return raw.replace(/\s+/g, " ").trim().slice(0, 100) || "Branched conversation";
|
|
586161
586306
|
}
|
|
586162
586307
|
async function createFork(customTitle) {
|
|
586163
|
-
const forkSessionId =
|
|
586308
|
+
const forkSessionId = randomUUID37();
|
|
586164
586309
|
const originalSessionId = getSessionId();
|
|
586165
586310
|
const projectDir = getProjectDir2(getOriginalCwd());
|
|
586166
586311
|
const forkSessionPath = getTranscriptPathForSession(forkSessionId);
|
|
@@ -592657,7 +592802,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
592657
592802
|
smapsRollup,
|
|
592658
592803
|
platform: process.platform,
|
|
592659
592804
|
nodeVersion: process.version,
|
|
592660
|
-
ccVersion: "1.
|
|
592805
|
+
ccVersion: "1.30.1"
|
|
592661
592806
|
};
|
|
592662
592807
|
}
|
|
592663
592808
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -593243,7 +593388,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
593243
593388
|
var call136 = async () => {
|
|
593244
593389
|
return {
|
|
593245
593390
|
type: "text",
|
|
593246
|
-
value: "1.
|
|
593391
|
+
value: "1.30.1"
|
|
593247
593392
|
};
|
|
593248
593393
|
}, version2, version_default;
|
|
593249
593394
|
var init_version = __esm(() => {
|
|
@@ -603160,7 +603305,7 @@ function generateHtmlReport(data, insights) {
|
|
|
603160
603305
|
</html>`;
|
|
603161
603306
|
}
|
|
603162
603307
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
603163
|
-
const version3 = typeof MACRO !== "undefined" ? "1.
|
|
603308
|
+
const version3 = typeof MACRO !== "undefined" ? "1.30.1" : "unknown";
|
|
603164
603309
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
603165
603310
|
const facets_summary = {
|
|
603166
603311
|
total: facets.size,
|
|
@@ -607438,7 +607583,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
607438
607583
|
init_settings2();
|
|
607439
607584
|
init_slowOperations();
|
|
607440
607585
|
init_uuid();
|
|
607441
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.
|
|
607586
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.30.1" : "unknown";
|
|
607442
607587
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
607443
607588
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
607444
607589
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -608643,7 +608788,7 @@ var init_filesystem = __esm(() => {
|
|
|
608643
608788
|
});
|
|
608644
608789
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
608645
608790
|
const nonce = randomBytes18(16).toString("hex");
|
|
608646
|
-
return join200(getURTempDir(), "bundled-skills", "1.
|
|
608791
|
+
return join200(getURTempDir(), "bundled-skills", "1.30.1", nonce);
|
|
608647
608792
|
});
|
|
608648
608793
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
608649
608794
|
});
|
|
@@ -609389,9 +609534,9 @@ var init_hookHelpers = __esm(() => {
|
|
|
609389
609534
|
});
|
|
609390
609535
|
|
|
609391
609536
|
// src/utils/hooks/execPromptHook.ts
|
|
609392
|
-
import { randomUUID as
|
|
609537
|
+
import { randomUUID as randomUUID38 } from "crypto";
|
|
609393
609538
|
async function execPromptHook(hook, hookName, hookEvent, jsonInput, signal, toolUseContext, messages, toolUseID) {
|
|
609394
|
-
const effectiveToolUseID = toolUseID || `hook-${
|
|
609539
|
+
const effectiveToolUseID = toolUseID || `hook-${randomUUID38()}`;
|
|
609395
609540
|
try {
|
|
609396
609541
|
const processedPrompt = addArgumentsToPrompt(hook.prompt, jsonInput);
|
|
609397
609542
|
logForDebugging(`Hooks: Processing prompt hook with prompt: ${processedPrompt}`);
|
|
@@ -609545,9 +609690,9 @@ var init_execPromptHook = __esm(() => {
|
|
|
609545
609690
|
});
|
|
609546
609691
|
|
|
609547
609692
|
// src/utils/hooks/execAgentHook.ts
|
|
609548
|
-
import { randomUUID as
|
|
609693
|
+
import { randomUUID as randomUUID39 } from "crypto";
|
|
609549
609694
|
async function execAgentHook(hook, hookName, hookEvent, jsonInput, signal, toolUseContext, toolUseID, _messages, agentName) {
|
|
609550
|
-
const effectiveToolUseID = toolUseID || `hook-${
|
|
609695
|
+
const effectiveToolUseID = toolUseID || `hook-${randomUUID39()}`;
|
|
609551
609696
|
const transcriptPath = toolUseContext.agentId ? getAgentTranscriptPath(toolUseContext.agentId) : getTranscriptPath();
|
|
609552
609697
|
const hookStartTime = Date.now();
|
|
609553
609698
|
try {
|
|
@@ -609582,7 +609727,7 @@ When done, return your result using the ${SYNTHETIC_OUTPUT_TOOL_NAME} tool with:
|
|
|
609582
609727
|
]);
|
|
609583
609728
|
const model = hook.model ?? getSmallFastModel();
|
|
609584
609729
|
const MAX_AGENT_TURNS = 50;
|
|
609585
|
-
const hookAgentId = asAgentId(`hook-agent-${
|
|
609730
|
+
const hookAgentId = asAgentId(`hook-agent-${randomUUID39()}`);
|
|
609586
609731
|
const agentToolUseContext = {
|
|
609587
609732
|
...toolUseContext,
|
|
609588
609733
|
agentId: hookAgentId,
|
|
@@ -610082,7 +610227,7 @@ __export(exports_hooks2, {
|
|
|
610082
610227
|
});
|
|
610083
610228
|
import { basename as basename45 } from "path";
|
|
610084
610229
|
import { spawn as spawn12 } from "child_process";
|
|
610085
|
-
import { randomUUID as
|
|
610230
|
+
import { randomUUID as randomUUID40 } from "crypto";
|
|
610086
610231
|
function getSessionEndHookTimeoutMs() {
|
|
610087
610232
|
const raw = process.env.UR_CODE_SESSIONEND_HOOKS_TIMEOUT_MS;
|
|
610088
610233
|
const parsed = raw ? parseInt(raw, 10) : NaN;
|
|
@@ -611120,7 +611265,7 @@ async function* executeHooks({
|
|
|
611120
611265
|
parentToolUseID: toolUseID,
|
|
611121
611266
|
toolUseID,
|
|
611122
611267
|
timestamp: new Date().toISOString(),
|
|
611123
|
-
uuid:
|
|
611268
|
+
uuid: randomUUID40()
|
|
611124
611269
|
}
|
|
611125
611270
|
};
|
|
611126
611271
|
}
|
|
@@ -611182,7 +611327,7 @@ async function* executeHooks({
|
|
|
611182
611327
|
const { signal: abortSignal, cleanup } = createCombinedAbortSignal(signal, {
|
|
611183
611328
|
timeoutMs: commandTimeoutMs
|
|
611184
611329
|
});
|
|
611185
|
-
const hookId =
|
|
611330
|
+
const hookId = randomUUID40();
|
|
611186
611331
|
const hookStartMs = Date.now();
|
|
611187
611332
|
const hookCommand = getHookDisplayText(hook);
|
|
611188
611333
|
try {
|
|
@@ -611830,7 +611975,7 @@ async function executeHooksOutsideREPL({
|
|
|
611830
611975
|
const callbackTimeoutMs = hook.timeout ? hook.timeout * 1000 : timeoutMs;
|
|
611831
611976
|
const { signal: abortSignal2, cleanup: cleanup2 } = createCombinedAbortSignal(signal, { timeoutMs: callbackTimeoutMs });
|
|
611832
611977
|
try {
|
|
611833
|
-
const toolUseID =
|
|
611978
|
+
const toolUseID = randomUUID40();
|
|
611834
611979
|
const json2 = await hook.callback(hookInput, toolUseID, abortSignal2, hookIndex);
|
|
611835
611980
|
cleanup2?.();
|
|
611836
611981
|
if (isAsyncHookJSONOutput(json2)) {
|
|
@@ -611941,7 +612086,7 @@ async function executeHooksOutsideREPL({
|
|
|
611941
612086
|
const commandTimeoutMs = hook.timeout ? hook.timeout * 1000 : timeoutMs;
|
|
611942
612087
|
const { signal: abortSignal, cleanup } = createCombinedAbortSignal(signal, { timeoutMs: commandTimeoutMs });
|
|
611943
612088
|
try {
|
|
611944
|
-
const result = await execCommandHook(hook, hookEvent, hookName, jsonInput, abortSignal,
|
|
612089
|
+
const result = await execCommandHook(hook, hookEvent, hookName, jsonInput, abortSignal, randomUUID40(), hookIndex, pluginRoot, pluginId);
|
|
611945
612090
|
cleanup?.();
|
|
611946
612091
|
if (result.aborted) {
|
|
611947
612092
|
logForDebugging(`${hookName} [${hook.command}] cancelled`);
|
|
@@ -612142,7 +612287,7 @@ async function* executeStopHooks(permissionMode, signal, timeoutMs = TOOL_HOOK_E
|
|
|
612142
612287
|
};
|
|
612143
612288
|
yield* executeHooks({
|
|
612144
612289
|
hookInput,
|
|
612145
|
-
toolUseID:
|
|
612290
|
+
toolUseID: randomUUID40(),
|
|
612146
612291
|
signal,
|
|
612147
612292
|
timeoutMs,
|
|
612148
612293
|
toolUseContext,
|
|
@@ -612159,7 +612304,7 @@ async function* executeTeammateIdleHooks(teammateName, teamName, permissionMode,
|
|
|
612159
612304
|
};
|
|
612160
612305
|
yield* executeHooks({
|
|
612161
612306
|
hookInput,
|
|
612162
|
-
toolUseID:
|
|
612307
|
+
toolUseID: randomUUID40(),
|
|
612163
612308
|
signal,
|
|
612164
612309
|
timeoutMs
|
|
612165
612310
|
});
|
|
@@ -612176,7 +612321,7 @@ async function* executeTaskCreatedHooks(taskId, taskSubject, taskDescription, te
|
|
|
612176
612321
|
};
|
|
612177
612322
|
yield* executeHooks({
|
|
612178
612323
|
hookInput,
|
|
612179
|
-
toolUseID:
|
|
612324
|
+
toolUseID: randomUUID40(),
|
|
612180
612325
|
signal,
|
|
612181
612326
|
timeoutMs,
|
|
612182
612327
|
toolUseContext
|
|
@@ -612194,7 +612339,7 @@ async function* executeTaskCompletedHooks(taskId, taskSubject, taskDescription,
|
|
|
612194
612339
|
};
|
|
612195
612340
|
yield* executeHooks({
|
|
612196
612341
|
hookInput,
|
|
612197
|
-
toolUseID:
|
|
612342
|
+
toolUseID: randomUUID40(),
|
|
612198
612343
|
signal,
|
|
612199
612344
|
timeoutMs,
|
|
612200
612345
|
toolUseContext
|
|
@@ -612213,7 +612358,7 @@ async function* executeUserPromptSubmitHooks(prompt, permissionMode, toolUseCont
|
|
|
612213
612358
|
};
|
|
612214
612359
|
yield* executeHooks({
|
|
612215
612360
|
hookInput,
|
|
612216
|
-
toolUseID:
|
|
612361
|
+
toolUseID: randomUUID40(),
|
|
612217
612362
|
signal: toolUseContext.abortController.signal,
|
|
612218
612363
|
timeoutMs: TOOL_HOOK_EXECUTION_TIMEOUT_MS,
|
|
612219
612364
|
toolUseContext,
|
|
@@ -612230,7 +612375,7 @@ async function* executeSessionStartHooks(source, sessionId, agentType, model, si
|
|
|
612230
612375
|
};
|
|
612231
612376
|
yield* executeHooks({
|
|
612232
612377
|
hookInput,
|
|
612233
|
-
toolUseID:
|
|
612378
|
+
toolUseID: randomUUID40(),
|
|
612234
612379
|
matchQuery: source,
|
|
612235
612380
|
signal,
|
|
612236
612381
|
timeoutMs,
|
|
@@ -612245,7 +612390,7 @@ async function* executeSetupHooks(trigger2, signal, timeoutMs = TOOL_HOOK_EXECUT
|
|
|
612245
612390
|
};
|
|
612246
612391
|
yield* executeHooks({
|
|
612247
612392
|
hookInput,
|
|
612248
|
-
toolUseID:
|
|
612393
|
+
toolUseID: randomUUID40(),
|
|
612249
612394
|
matchQuery: trigger2,
|
|
612250
612395
|
signal,
|
|
612251
612396
|
timeoutMs,
|
|
@@ -612261,7 +612406,7 @@ async function* executeSubagentStartHooks(agentId, agentType, signal, timeoutMs
|
|
|
612261
612406
|
};
|
|
612262
612407
|
yield* executeHooks({
|
|
612263
612408
|
hookInput,
|
|
612264
|
-
toolUseID:
|
|
612409
|
+
toolUseID: randomUUID40(),
|
|
612265
612410
|
matchQuery: agentType,
|
|
612266
612411
|
signal,
|
|
612267
612412
|
timeoutMs
|
|
@@ -612624,7 +612769,7 @@ async function executeStatusLineCommand(statusLineInput, signal, timeoutMs = 500
|
|
|
612624
612769
|
const abortSignal = signal || AbortSignal.timeout(timeoutMs);
|
|
612625
612770
|
try {
|
|
612626
612771
|
const jsonInput = jsonStringify(statusLineInput);
|
|
612627
|
-
const result = await execCommandHook(statusLine, "StatusLine", "statusLine", jsonInput, abortSignal,
|
|
612772
|
+
const result = await execCommandHook(statusLine, "StatusLine", "statusLine", jsonInput, abortSignal, randomUUID40());
|
|
612628
612773
|
if (result.aborted) {
|
|
612629
612774
|
return;
|
|
612630
612775
|
}
|
|
@@ -612668,7 +612813,7 @@ async function executeFileSuggestionCommand(fileSuggestionInput, signal, timeout
|
|
|
612668
612813
|
try {
|
|
612669
612814
|
const jsonInput = jsonStringify(fileSuggestionInput);
|
|
612670
612815
|
const hook = { type: "command", command: fileSuggestion.command };
|
|
612671
|
-
const result = await execCommandHook(hook, "FileSuggestion", "FileSuggestion", jsonInput, abortSignal,
|
|
612816
|
+
const result = await execCommandHook(hook, "FileSuggestion", "FileSuggestion", jsonInput, abortSignal, randomUUID40());
|
|
612672
612817
|
if (result.aborted || result.status !== 0) {
|
|
612673
612818
|
return [];
|
|
612674
612819
|
}
|
|
@@ -612924,7 +613069,7 @@ async function executeBeforeCommandHooks(command8, shellType, cwd2, toolUseConte
|
|
|
612924
613069
|
const results = [];
|
|
612925
613070
|
for await (const result of executeHooks({
|
|
612926
613071
|
hookInput,
|
|
612927
|
-
toolUseID: options2?.toolUseID ??
|
|
613072
|
+
toolUseID: options2?.toolUseID ?? randomUUID40(),
|
|
612928
613073
|
matchQuery: command8,
|
|
612929
613074
|
signal: options2?.signal,
|
|
612930
613075
|
timeoutMs: options2?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
|
|
@@ -612963,7 +613108,7 @@ async function executeAfterCommandHooks(command8, shellType, cwd2, exitCode, std
|
|
|
612963
613108
|
const results = [];
|
|
612964
613109
|
for await (const result of executeHooks({
|
|
612965
613110
|
hookInput,
|
|
612966
|
-
toolUseID: options2?.toolUseID ??
|
|
613111
|
+
toolUseID: options2?.toolUseID ?? randomUUID40(),
|
|
612967
613112
|
matchQuery: command8,
|
|
612968
613113
|
signal: options2?.signal,
|
|
612969
613114
|
timeoutMs: options2?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
|
|
@@ -612999,7 +613144,7 @@ async function executeBeforeCommitHooks(command8, toolUseContext, options2) {
|
|
|
612999
613144
|
const results = [];
|
|
613000
613145
|
for await (const result of executeHooks({
|
|
613001
613146
|
hookInput,
|
|
613002
|
-
toolUseID: options2?.toolUseID ??
|
|
613147
|
+
toolUseID: options2?.toolUseID ?? randomUUID40(),
|
|
613003
613148
|
matchQuery: command8,
|
|
613004
613149
|
signal: options2?.signal,
|
|
613005
613150
|
timeoutMs: options2?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
|
|
@@ -613039,7 +613184,7 @@ async function executeOnFailureHooks2(error40, stage, toolUseContext, options2)
|
|
|
613039
613184
|
const results = [];
|
|
613040
613185
|
for await (const result of executeHooks({
|
|
613041
613186
|
hookInput,
|
|
613042
|
-
toolUseID: options2?.toolUseID ??
|
|
613187
|
+
toolUseID: options2?.toolUseID ?? randomUUID40(),
|
|
613043
613188
|
matchQuery: stage,
|
|
613044
613189
|
signal: options2?.signal,
|
|
613045
613190
|
timeoutMs: options2?.timeoutMs ?? TOOL_HOOK_EXECUTION_TIMEOUT_MS,
|
|
@@ -614940,7 +615085,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
614940
615085
|
}
|
|
614941
615086
|
function computeFingerprintFromMessages(messages) {
|
|
614942
615087
|
const firstMessageText = extractFirstMessageText(messages);
|
|
614943
|
-
return computeFingerprint(firstMessageText, "1.
|
|
615088
|
+
return computeFingerprint(firstMessageText, "1.30.1");
|
|
614944
615089
|
}
|
|
614945
615090
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
614946
615091
|
var init_fingerprint = () => {};
|
|
@@ -615053,7 +615198,7 @@ function insertBlockAfterToolResults(content, block2) {
|
|
|
615053
615198
|
}
|
|
615054
615199
|
|
|
615055
615200
|
// src/services/api/ur.ts
|
|
615056
|
-
import { randomUUID as
|
|
615201
|
+
import { randomUUID as randomUUID41 } from "crypto";
|
|
615057
615202
|
function getExtraBodyParams(betaHeaders) {
|
|
615058
615203
|
const extraBodyStr = process.env.UR_CODE_EXTRA_BODY;
|
|
615059
615204
|
let result = {};
|
|
@@ -615829,7 +615974,7 @@ ${deferredToolList}
|
|
|
615829
615974
|
if (!options2.agentId) {
|
|
615830
615975
|
headlessProfilerCheckpoint("api_request_sent");
|
|
615831
615976
|
}
|
|
615832
|
-
clientRequestId = getAPIProvider() === "firstParty" && isFirstPartyURHQBaseUrl() ?
|
|
615977
|
+
clientRequestId = getAPIProvider() === "firstParty" && isFirstPartyURHQBaseUrl() ? randomUUID41() : undefined;
|
|
615833
615978
|
const result = await urhq.beta.messages.create({ ...params, stream: true }, {
|
|
615834
615979
|
signal,
|
|
615835
615980
|
...clientRequestId && {
|
|
@@ -616060,7 +616205,7 @@ ${deferredToolList}
|
|
|
616060
616205
|
},
|
|
616061
616206
|
requestId: streamRequestId ?? undefined,
|
|
616062
616207
|
type: "assistant",
|
|
616063
|
-
uuid:
|
|
616208
|
+
uuid: randomUUID41(),
|
|
616064
616209
|
timestamp: new Date().toISOString(),
|
|
616065
616210
|
...process.env.USER_TYPE === "ant" && research2 !== undefined && { research: research2 },
|
|
616066
616211
|
...advisorModel && { advisorModel }
|
|
@@ -616240,7 +616385,7 @@ ${deferredToolList}
|
|
|
616240
616385
|
},
|
|
616241
616386
|
requestId: streamRequestId ?? undefined,
|
|
616242
616387
|
type: "assistant",
|
|
616243
|
-
uuid:
|
|
616388
|
+
uuid: randomUUID41(),
|
|
616244
616389
|
timestamp: new Date().toISOString(),
|
|
616245
616390
|
...process.env.USER_TYPE === "ant" && research2 !== undefined && {
|
|
616246
616391
|
research: research2
|
|
@@ -616294,7 +616439,7 @@ ${deferredToolList}
|
|
|
616294
616439
|
},
|
|
616295
616440
|
requestId: streamRequestId ?? undefined,
|
|
616296
616441
|
type: "assistant",
|
|
616297
|
-
uuid:
|
|
616442
|
+
uuid: randomUUID41(),
|
|
616298
616443
|
timestamp: new Date().toISOString(),
|
|
616299
616444
|
...process.env.USER_TYPE === "ant" && research2 !== undefined && { research: research2 },
|
|
616300
616445
|
...advisorModel && { advisorModel }
|
|
@@ -616807,7 +616952,7 @@ async function sideQuery(opts) {
|
|
|
616807
616952
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
616808
616953
|
}
|
|
616809
616954
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
616810
|
-
const fingerprint = computeFingerprint(messageText2, "1.
|
|
616955
|
+
const fingerprint = computeFingerprint(messageText2, "1.30.1");
|
|
616811
616956
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
616812
616957
|
const systemBlocks = [
|
|
616813
616958
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -621522,7 +621667,7 @@ var init_inboundMessages = __esm(() => {
|
|
|
621522
621667
|
});
|
|
621523
621668
|
|
|
621524
621669
|
// src/utils/messages/systemInit.ts
|
|
621525
|
-
import { randomUUID as
|
|
621670
|
+
import { randomUUID as randomUUID42 } from "crypto";
|
|
621526
621671
|
function sdkCompatToolName(name) {
|
|
621527
621672
|
return name === AGENT_TOOL_NAME ? LEGACY_AGENT_TOOL_NAME : name;
|
|
621528
621673
|
}
|
|
@@ -621544,7 +621689,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
621544
621689
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
621545
621690
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
621546
621691
|
betas: getSdkBetas(),
|
|
621547
|
-
ur_version: "1.
|
|
621692
|
+
ur_version: "1.30.1",
|
|
621548
621693
|
output_style: outputStyle2,
|
|
621549
621694
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
621550
621695
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -621553,7 +621698,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
621553
621698
|
path: plugin2.path,
|
|
621554
621699
|
source: plugin2.source
|
|
621555
621700
|
})),
|
|
621556
|
-
uuid:
|
|
621701
|
+
uuid: randomUUID42()
|
|
621557
621702
|
};
|
|
621558
621703
|
if (false) {}
|
|
621559
621704
|
initMessage.fast_mode_state = getFastModeState(inputs.model, inputs.fastMode);
|
|
@@ -621637,7 +621782,7 @@ __export(exports_MessageSelector, {
|
|
|
621637
621782
|
messagesAfterAreOnlySynthetic: () => messagesAfterAreOnlySynthetic,
|
|
621638
621783
|
MessageSelector: () => MessageSelector
|
|
621639
621784
|
});
|
|
621640
|
-
import { randomUUID as
|
|
621785
|
+
import { randomUUID as randomUUID43 } from "crypto";
|
|
621641
621786
|
import * as path22 from "path";
|
|
621642
621787
|
function isTextBlock2(block2) {
|
|
621643
621788
|
return block2.type === "text";
|
|
@@ -621657,7 +621802,7 @@ function MessageSelector({
|
|
|
621657
621802
|
const fileHistory = useAppState((s) => s.fileHistory);
|
|
621658
621803
|
const [error40, setError] = import_react198.useState(undefined);
|
|
621659
621804
|
const isFileHistoryEnabled = fileHistoryEnabled();
|
|
621660
|
-
const currentUUID = import_react198.useMemo(
|
|
621805
|
+
const currentUUID = import_react198.useMemo(randomUUID43, []);
|
|
621661
621806
|
const messageOptions = import_react198.useMemo(() => [...messages.filter(selectableUserMessagesFilter), {
|
|
621662
621807
|
...createUserMessage({
|
|
621663
621808
|
content: ""
|
|
@@ -627512,7 +627657,7 @@ var init_FileEditToolDiff = __esm(() => {
|
|
|
627512
627657
|
});
|
|
627513
627658
|
|
|
627514
627659
|
// src/hooks/useDiffInIDE.ts
|
|
627515
|
-
import { randomUUID as
|
|
627660
|
+
import { randomUUID as randomUUID44 } from "crypto";
|
|
627516
627661
|
import { basename as basename48 } from "path";
|
|
627517
627662
|
function useDiffInIDE({
|
|
627518
627663
|
onChange,
|
|
@@ -627523,7 +627668,7 @@ function useDiffInIDE({
|
|
|
627523
627668
|
}) {
|
|
627524
627669
|
const isUnmounted = import_react209.useRef(false);
|
|
627525
627670
|
const [hasError, setHasError] = import_react209.useState(false);
|
|
627526
|
-
const sha = import_react209.useMemo(() =>
|
|
627671
|
+
const sha = import_react209.useMemo(() => randomUUID44().slice(0, 6), []);
|
|
627527
627672
|
const tabName = import_react209.useMemo(() => `\u2302 [UR] ${basename48(filePath)} (${sha}) \u29C9`, [filePath, sha]);
|
|
627528
627673
|
const shouldShowDiffInIDE = hasAccessToIDEExtensionDiffFeature(toolUseContext.options.mcpClients) && getGlobalConfig().diffTool === "auto" && !filePath.endsWith(".ipynb");
|
|
627529
627674
|
const ideName = getConnectedIdeName(toolUseContext.options.mcpClients) ?? "IDE";
|
|
@@ -636172,7 +636317,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
636172
636317
|
function getSemverPart(version3) {
|
|
636173
636318
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
636174
636319
|
}
|
|
636175
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.
|
|
636320
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.30.1") {
|
|
636176
636321
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
636177
636322
|
if (!updatedVersion) {
|
|
636178
636323
|
return null;
|
|
@@ -636221,7 +636366,7 @@ function AutoUpdater({
|
|
|
636221
636366
|
return;
|
|
636222
636367
|
}
|
|
636223
636368
|
if (false) {}
|
|
636224
|
-
const currentVersion = "1.
|
|
636369
|
+
const currentVersion = "1.30.1";
|
|
636225
636370
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
636226
636371
|
let latestVersion = await getLatestVersion(channel);
|
|
636227
636372
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -636450,12 +636595,12 @@ function NativeAutoUpdater({
|
|
|
636450
636595
|
logEvent("tengu_native_auto_updater_start", {});
|
|
636451
636596
|
try {
|
|
636452
636597
|
const maxVersion = await getMaxVersion();
|
|
636453
|
-
if (maxVersion && gt("1.
|
|
636598
|
+
if (maxVersion && gt("1.30.1", maxVersion)) {
|
|
636454
636599
|
const msg = await getMaxVersionMessage();
|
|
636455
636600
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
636456
636601
|
}
|
|
636457
636602
|
const result = await installLatest(channel);
|
|
636458
|
-
const currentVersion = "1.
|
|
636603
|
+
const currentVersion = "1.30.1";
|
|
636459
636604
|
const latencyMs = Date.now() - startTime;
|
|
636460
636605
|
if (result.lockFailed) {
|
|
636461
636606
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -636592,17 +636737,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
636592
636737
|
const maxVersion = await getMaxVersion();
|
|
636593
636738
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
636594
636739
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
636595
|
-
if (gte("1.
|
|
636596
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.
|
|
636740
|
+
if (gte("1.30.1", maxVersion)) {
|
|
636741
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.30.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
636597
636742
|
setUpdateAvailable(false);
|
|
636598
636743
|
return;
|
|
636599
636744
|
}
|
|
636600
636745
|
latest = maxVersion;
|
|
636601
636746
|
}
|
|
636602
|
-
const hasUpdate = latest && !gte("1.
|
|
636747
|
+
const hasUpdate = latest && !gte("1.30.1", latest) && !shouldSkipVersion(latest);
|
|
636603
636748
|
setUpdateAvailable(!!hasUpdate);
|
|
636604
636749
|
if (hasUpdate) {
|
|
636605
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.
|
|
636750
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.30.1"} -> ${latest}`);
|
|
636606
636751
|
}
|
|
636607
636752
|
};
|
|
636608
636753
|
$3[0] = t1;
|
|
@@ -636636,7 +636781,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
636636
636781
|
wrap: "truncate",
|
|
636637
636782
|
children: [
|
|
636638
636783
|
"currentVersion: ",
|
|
636639
|
-
"1.
|
|
636784
|
+
"1.30.1"
|
|
636640
636785
|
]
|
|
636641
636786
|
}, undefined, true, undefined, this);
|
|
636642
636787
|
$3[3] = verbose;
|
|
@@ -646972,7 +647117,7 @@ var init_teamDiscovery = __esm(() => {
|
|
|
646972
647117
|
});
|
|
646973
647118
|
|
|
646974
647119
|
// src/components/teams/TeamsDialog.tsx
|
|
646975
|
-
import { randomUUID as
|
|
647120
|
+
import { randomUUID as randomUUID45 } from "crypto";
|
|
646976
647121
|
function TeamsDialog({
|
|
646977
647122
|
initialTeams,
|
|
646978
647123
|
onDone
|
|
@@ -647596,7 +647741,7 @@ async function killTeammate(paneId, backendType, teamName, teammateId, teammateN
|
|
|
647596
647741
|
},
|
|
647597
647742
|
inbox: {
|
|
647598
647743
|
messages: [...prev.inbox.messages, {
|
|
647599
|
-
id:
|
|
647744
|
+
id: randomUUID45(),
|
|
647600
647745
|
from: "system",
|
|
647601
647746
|
text: jsonStringify({
|
|
647602
647747
|
type: "teammate_terminated",
|
|
@@ -649093,7 +649238,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
649093
649238
|
project_dir: getOriginalCwd(),
|
|
649094
649239
|
added_dirs: addedDirs
|
|
649095
649240
|
},
|
|
649096
|
-
version: "1.
|
|
649241
|
+
version: "1.30.1",
|
|
649097
649242
|
output_style: {
|
|
649098
649243
|
name: outputStyleName
|
|
649099
649244
|
},
|
|
@@ -649176,7 +649321,7 @@ function StatusLineInner({
|
|
|
649176
649321
|
const taskValues = Object.values(tasks2);
|
|
649177
649322
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
649178
649323
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
649179
|
-
version: "1.
|
|
649324
|
+
version: "1.30.1",
|
|
649180
649325
|
providerLabel: providerRuntime.providerLabel,
|
|
649181
649326
|
authMode: providerRuntime.authLabel,
|
|
649182
649327
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -653406,7 +653551,7 @@ function normalizeControlMessageKeys(obj) {
|
|
|
653406
653551
|
}
|
|
653407
653552
|
|
|
653408
653553
|
// src/bridge/bridgeMessaging.ts
|
|
653409
|
-
import { randomUUID as
|
|
653554
|
+
import { randomUUID as randomUUID46 } from "crypto";
|
|
653410
653555
|
function isSDKMessage(value) {
|
|
653411
653556
|
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
653412
653557
|
}
|
|
@@ -653614,7 +653759,7 @@ function makeResultMessage(sessionId) {
|
|
|
653614
653759
|
modelUsage: {},
|
|
653615
653760
|
permission_denials: [],
|
|
653616
653761
|
session_id: sessionId,
|
|
653617
|
-
uuid:
|
|
653762
|
+
uuid: randomUUID46()
|
|
653618
653763
|
};
|
|
653619
653764
|
}
|
|
653620
653765
|
|
|
@@ -653658,7 +653803,7 @@ var init_bridgeMessaging = __esm(() => {
|
|
|
653658
653803
|
});
|
|
653659
653804
|
|
|
653660
653805
|
// src/remote/SessionsWebSocket.ts
|
|
653661
|
-
import { randomUUID as
|
|
653806
|
+
import { randomUUID as randomUUID47 } from "crypto";
|
|
653662
653807
|
function isSessionsMessage(value) {
|
|
653663
653808
|
if (typeof value !== "object" || value === null || !("type" in value)) {
|
|
653664
653809
|
return false;
|
|
@@ -653842,7 +653987,7 @@ class SessionsWebSocket {
|
|
|
653842
653987
|
}
|
|
653843
653988
|
const controlRequest = {
|
|
653844
653989
|
type: "control_request",
|
|
653845
|
-
request_id:
|
|
653990
|
+
request_id: randomUUID47(),
|
|
653846
653991
|
request
|
|
653847
653992
|
};
|
|
653848
653993
|
logForDebugging(`[SessionsWebSocket] Sending control request: ${request.subtype}`);
|
|
@@ -654034,11 +654179,11 @@ var init_RemoteSessionManager = __esm(() => {
|
|
|
654034
654179
|
});
|
|
654035
654180
|
|
|
654036
654181
|
// src/remote/remotePermissionBridge.ts
|
|
654037
|
-
import { randomUUID as
|
|
654182
|
+
import { randomUUID as randomUUID48 } from "crypto";
|
|
654038
654183
|
function createSyntheticAssistantMessage(request, requestId) {
|
|
654039
654184
|
return {
|
|
654040
654185
|
type: "assistant",
|
|
654041
|
-
uuid:
|
|
654186
|
+
uuid: randomUUID48(),
|
|
654042
654187
|
message: {
|
|
654043
654188
|
id: `remote-${requestId}`,
|
|
654044
654189
|
type: "message",
|
|
@@ -654841,7 +654986,7 @@ var init_useDirectConnect = __esm(() => {
|
|
|
654841
654986
|
});
|
|
654842
654987
|
|
|
654843
654988
|
// src/hooks/useSSHSession.ts
|
|
654844
|
-
import { randomUUID as
|
|
654989
|
+
import { randomUUID as randomUUID49 } from "crypto";
|
|
654845
654990
|
function useSSHSession({
|
|
654846
654991
|
session: session2,
|
|
654847
654992
|
setMessages,
|
|
@@ -654939,7 +655084,7 @@ function useSSHSession({
|
|
|
654939
655084
|
subtype: "informational",
|
|
654940
655085
|
content: `SSH connection dropped \u2014 reconnecting (attempt ${attempt}/${max2})...`,
|
|
654941
655086
|
timestamp: new Date().toISOString(),
|
|
654942
|
-
uuid:
|
|
655087
|
+
uuid: randomUUID49(),
|
|
654943
655088
|
level: "warning"
|
|
654944
655089
|
};
|
|
654945
655090
|
setMessages((prev) => [...prev, msg]);
|
|
@@ -656989,7 +657134,7 @@ var init_PermissionContext = __esm(() => {
|
|
|
656989
657134
|
});
|
|
656990
657135
|
|
|
656991
657136
|
// src/hooks/toolPermission/handlers/interactiveHandler.ts
|
|
656992
|
-
import { randomUUID as
|
|
657137
|
+
import { randomUUID as randomUUID50 } from "crypto";
|
|
656993
657138
|
function handleInteractivePermission(params, resolve49) {
|
|
656994
657139
|
const {
|
|
656995
657140
|
ctx,
|
|
@@ -657003,7 +657148,7 @@ function handleInteractivePermission(params, resolve49) {
|
|
|
657003
657148
|
let userInteracted = false;
|
|
657004
657149
|
let checkmarkTransitionTimer;
|
|
657005
657150
|
let checkmarkAbortHandler;
|
|
657006
|
-
const bridgeRequestId = bridgeCallbacks ?
|
|
657151
|
+
const bridgeRequestId = bridgeCallbacks ? randomUUID50() : undefined;
|
|
657007
657152
|
let channelUnsubscribe;
|
|
657008
657153
|
const permissionPromptStartTimeMs = Date.now();
|
|
657009
657154
|
const displayInput = result.updatedInput ?? ctx.input;
|
|
@@ -657397,9 +657542,9 @@ function matchesKeepGoingKeyword(input) {
|
|
|
657397
657542
|
}
|
|
657398
657543
|
|
|
657399
657544
|
// src/utils/processUserInput/processTextPrompt.ts
|
|
657400
|
-
import { randomUUID as
|
|
657545
|
+
import { randomUUID as randomUUID51 } from "crypto";
|
|
657401
657546
|
function processTextPrompt(input, imageContentBlocks, imagePasteIds, attachmentMessages, uuid3, permissionMode, isMeta) {
|
|
657402
|
-
const promptId =
|
|
657547
|
+
const promptId = randomUUID51();
|
|
657403
657548
|
setPromptId(promptId);
|
|
657404
657549
|
const userPromptText = typeof input === "string" ? input : input.find((block2) => block2.type === "text")?.text || "";
|
|
657405
657550
|
startInteractionSpan(userPromptText);
|
|
@@ -657533,7 +657678,7 @@ var exports_processBashCommand = {};
|
|
|
657533
657678
|
__export(exports_processBashCommand, {
|
|
657534
657679
|
processBashCommand: () => processBashCommand
|
|
657535
657680
|
});
|
|
657536
|
-
import { randomUUID as
|
|
657681
|
+
import { randomUUID as randomUUID52 } from "crypto";
|
|
657537
657682
|
async function processBashCommand(inputString, precedingInputBlocks, attachmentMessages, context4, setToolJSX) {
|
|
657538
657683
|
const usePowerShell = isPowerShellToolEnabled() && resolveDefaultShell() === "powershell";
|
|
657539
657684
|
logEvent("tengu_input_bash", {
|
|
@@ -657597,7 +657742,7 @@ async function processBashCommand(inputString, precedingInputBlocks, attachmentM
|
|
|
657597
657742
|
const mapped = await processToolResultBlock(shellTool, {
|
|
657598
657743
|
...data,
|
|
657599
657744
|
stderr: ""
|
|
657600
|
-
},
|
|
657745
|
+
}, randomUUID52());
|
|
657601
657746
|
const stdout = typeof mapped.content === "string" ? mapped.content : escapeXml(data.stdout);
|
|
657602
657747
|
return {
|
|
657603
657748
|
messages: [createSyntheticUserCaveatMessage(), userMessage, ...attachmentMessages, createUserMessage({
|
|
@@ -657646,7 +657791,7 @@ var init_processBashCommand = __esm(() => {
|
|
|
657646
657791
|
});
|
|
657647
657792
|
|
|
657648
657793
|
// src/utils/processUserInput/processUserInput.ts
|
|
657649
|
-
import { randomUUID as
|
|
657794
|
+
import { randomUUID as randomUUID53 } from "crypto";
|
|
657650
657795
|
async function processUserInput({
|
|
657651
657796
|
input,
|
|
657652
657797
|
preExpansionInput,
|
|
@@ -657708,7 +657853,7 @@ Original prompt: ${input}`, "warning")
|
|
|
657708
657853
|
type: "hook_additional_context",
|
|
657709
657854
|
content: hookResult.additionalContexts.map(applyTruncation),
|
|
657710
657855
|
hookName: "UserPromptSubmit",
|
|
657711
|
-
toolUseID: `hook-${
|
|
657856
|
+
toolUseID: `hook-${randomUUID53()}`,
|
|
657712
657857
|
hookEvent: "UserPromptSubmit"
|
|
657713
657858
|
}));
|
|
657714
657859
|
}
|
|
@@ -659354,7 +659499,7 @@ var init_sessionRestore = __esm(() => {
|
|
|
659354
659499
|
});
|
|
659355
659500
|
|
|
659356
659501
|
// src/hooks/useInboxPoller.ts
|
|
659357
|
-
import { randomUUID as
|
|
659502
|
+
import { randomUUID as randomUUID54 } from "crypto";
|
|
659358
659503
|
function getAgentNameToPoll(appState) {
|
|
659359
659504
|
if (isInProcessTeammate()) {
|
|
659360
659505
|
return;
|
|
@@ -659771,7 +659916,7 @@ function useInboxPoller({
|
|
|
659771
659916
|
messages: [
|
|
659772
659917
|
...prev.inbox.messages,
|
|
659773
659918
|
{
|
|
659774
|
-
id:
|
|
659919
|
+
id: randomUUID54(),
|
|
659775
659920
|
from: "system",
|
|
659776
659921
|
text: jsonStringify({
|
|
659777
659922
|
type: "teammate_terminated",
|
|
@@ -659811,7 +659956,7 @@ ${messageContent}
|
|
|
659811
659956
|
messages: [
|
|
659812
659957
|
...prev.inbox.messages,
|
|
659813
659958
|
...regularMessages.map((m) => ({
|
|
659814
|
-
id:
|
|
659959
|
+
id: randomUUID54(),
|
|
659815
659960
|
from: m.from,
|
|
659816
659961
|
text: m.text,
|
|
659817
659962
|
timestamp: m.timestamp,
|
|
@@ -660664,7 +660809,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
660664
660809
|
} catch {}
|
|
660665
660810
|
const data = {
|
|
660666
660811
|
trigger: trigger2,
|
|
660667
|
-
version: "1.
|
|
660812
|
+
version: "1.30.1",
|
|
660668
660813
|
platform: process.platform,
|
|
660669
660814
|
transcript,
|
|
660670
660815
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -660701,7 +660846,7 @@ var init_submitTranscriptShare = __esm(() => {
|
|
|
660701
660846
|
});
|
|
660702
660847
|
|
|
660703
660848
|
// src/components/FeedbackSurvey/useSurveyState.tsx
|
|
660704
|
-
import { randomUUID as
|
|
660849
|
+
import { randomUUID as randomUUID55 } from "crypto";
|
|
660705
660850
|
function useSurveyState({
|
|
660706
660851
|
hideThanksAfterMs,
|
|
660707
660852
|
onOpen,
|
|
@@ -660712,7 +660857,7 @@ function useSurveyState({
|
|
|
660712
660857
|
}) {
|
|
660713
660858
|
const [state2, setState] = import_react291.useState("closed");
|
|
660714
660859
|
const [lastResponse, setLastResponse] = import_react291.useState(null);
|
|
660715
|
-
const appearanceId = import_react291.useRef(
|
|
660860
|
+
const appearanceId = import_react291.useRef(randomUUID55());
|
|
660716
660861
|
const lastResponseRef = import_react291.useRef(null);
|
|
660717
660862
|
const showThanksThenClose = import_react291.useCallback(() => {
|
|
660718
660863
|
setState("thanks");
|
|
@@ -660730,7 +660875,7 @@ function useSurveyState({
|
|
|
660730
660875
|
return;
|
|
660731
660876
|
}
|
|
660732
660877
|
setState("open");
|
|
660733
|
-
appearanceId.current =
|
|
660878
|
+
appearanceId.current = randomUUID55();
|
|
660734
660879
|
onOpen(appearanceId.current);
|
|
660735
660880
|
}, [state2, onOpen]);
|
|
660736
660881
|
const handleSelect = import_react291.useCallback((selected) => {
|
|
@@ -663525,7 +663670,7 @@ var init_ndjsonSafeStringify = __esm(() => {
|
|
|
663525
663670
|
});
|
|
663526
663671
|
|
|
663527
663672
|
// src/cli/structuredIO.ts
|
|
663528
|
-
import { randomUUID as
|
|
663673
|
+
import { randomUUID as randomUUID56 } from "crypto";
|
|
663529
663674
|
function serializeDecisionReason(reason) {
|
|
663530
663675
|
if (!reason) {
|
|
663531
663676
|
return;
|
|
@@ -663773,7 +663918,7 @@ class StructuredIO {
|
|
|
663773
663918
|
writeToStdout(ndjsonSafeStringify(message) + `
|
|
663774
663919
|
`);
|
|
663775
663920
|
}
|
|
663776
|
-
async sendRequest(request, schema, signal, requestId =
|
|
663921
|
+
async sendRequest(request, schema, signal, requestId = randomUUID56()) {
|
|
663777
663922
|
const message = {
|
|
663778
663923
|
type: "control_request",
|
|
663779
663924
|
request_id: requestId,
|
|
@@ -663839,7 +663984,7 @@ class StructuredIO {
|
|
|
663839
663984
|
parentSignal.addEventListener("abort", onParentAbort, { once: true });
|
|
663840
663985
|
try {
|
|
663841
663986
|
const hookPromise = executePermissionRequestHooksForSDK(tool.name, toolUseID, input, toolUseContext, mainPermissionResult.suggestions).then((decision) => ({ source: "hook", decision }));
|
|
663842
|
-
const requestId =
|
|
663987
|
+
const requestId = randomUUID56();
|
|
663843
663988
|
onPermissionPrompt?.(buildRequiresActionDetails(tool, input, toolUseID, requestId));
|
|
663844
663989
|
const sdkPromise = this.sendRequest({
|
|
663845
663990
|
subtype: "can_use_tool",
|
|
@@ -663919,7 +664064,7 @@ class StructuredIO {
|
|
|
663919
664064
|
subtype: "can_use_tool",
|
|
663920
664065
|
tool_name: SANDBOX_NETWORK_ACCESS_TOOL_NAME,
|
|
663921
664066
|
input: { host: hostPattern.host },
|
|
663922
|
-
tool_use_id:
|
|
664067
|
+
tool_use_id: randomUUID56(),
|
|
663923
664068
|
description: `Allow network connection to ${hostPattern.host}?`
|
|
663924
664069
|
}, outputSchema39());
|
|
663925
664070
|
return result.behavior === "allow";
|
|
@@ -667927,7 +668072,7 @@ __export(exports_REPL, {
|
|
|
667927
668072
|
import { dirname as dirname74, join as join211 } from "path";
|
|
667928
668073
|
import { tmpdir as tmpdir13 } from "os";
|
|
667929
668074
|
import { writeFile as writeFile47 } from "fs/promises";
|
|
667930
|
-
import { randomUUID as
|
|
668075
|
+
import { randomUUID as randomUUID57 } from "crypto";
|
|
667931
668076
|
function TranscriptModeFooter(t0) {
|
|
667932
668077
|
const $3 = import_compiler_runtime359.c(9);
|
|
667933
668078
|
const {
|
|
@@ -668666,7 +668811,7 @@ function REPL({
|
|
|
668666
668811
|
const [isMessageSelectorVisible, setIsMessageSelectorVisible] = import_react317.useState(false);
|
|
668667
668812
|
const [messageSelectorPreselect, setMessageSelectorPreselect] = import_react317.useState(undefined);
|
|
668668
668813
|
const [showCostDialog, setShowCostDialog] = import_react317.useState(false);
|
|
668669
|
-
const [conversationId, setConversationId] = import_react317.useState(
|
|
668814
|
+
const [conversationId, setConversationId] = import_react317.useState(randomUUID57());
|
|
668670
668815
|
const [idleReturnPending, setIdleReturnPending] = import_react317.useState(null);
|
|
668671
668816
|
const skipIdleCheckRef = import_react317.useRef(false);
|
|
668672
668817
|
const lastQueryCompletionTimeRef = import_react317.useRef(lastQueryCompletionTime);
|
|
@@ -669367,7 +669512,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
669367
669512
|
} else {
|
|
669368
669513
|
setMessages(() => [newMessage]);
|
|
669369
669514
|
}
|
|
669370
|
-
setConversationId(
|
|
669515
|
+
setConversationId(randomUUID57());
|
|
669371
669516
|
if (false) {}
|
|
669372
669517
|
} else if (newMessage.type === "progress" && isEphemeralToolProgress(newMessage.data.type)) {
|
|
669373
669518
|
setMessages((oldMessages) => {
|
|
@@ -669443,7 +669588,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
669443
669588
|
});
|
|
669444
669589
|
if (!shouldQuery) {
|
|
669445
669590
|
if (newMessages.some(isCompactBoundaryMessage)) {
|
|
669446
|
-
setConversationId(
|
|
669591
|
+
setConversationId(randomUUID57());
|
|
669447
669592
|
if (false) {}
|
|
669448
669593
|
}
|
|
669449
669594
|
resetLoadingState();
|
|
@@ -670052,7 +670197,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
670052
670197
|
rewindToMessageIndex: messageIndex
|
|
670053
670198
|
});
|
|
670054
670199
|
setMessages(prev.slice(0, messageIndex));
|
|
670055
|
-
setConversationId(
|
|
670200
|
+
setConversationId(randomUUID57());
|
|
670056
670201
|
resetMicrocompactState();
|
|
670057
670202
|
if (false) {}
|
|
670058
670203
|
setAppState((prev2) => ({
|
|
@@ -671222,7 +671367,7 @@ Note: ctrl + z now suspends UR, ctrl + _ undoes input.
|
|
|
671222
671367
|
setMessages(postCompact);
|
|
671223
671368
|
}
|
|
671224
671369
|
if (false) {}
|
|
671225
|
-
setConversationId(
|
|
671370
|
+
setConversationId(randomUUID57());
|
|
671226
671371
|
runPostCompactCleanup(context4.options.querySource);
|
|
671227
671372
|
if (direction === "from") {
|
|
671228
671373
|
const r = textForResubmit(message);
|
|
@@ -672548,7 +672693,7 @@ function WelcomeV2() {
|
|
|
672548
672693
|
dimColor: true,
|
|
672549
672694
|
children: [
|
|
672550
672695
|
"v",
|
|
672551
|
-
"1.
|
|
672696
|
+
"1.30.1"
|
|
672552
672697
|
]
|
|
672553
672698
|
}, undefined, true, undefined, this)
|
|
672554
672699
|
]
|
|
@@ -673808,7 +673953,7 @@ function completeOnboarding() {
|
|
|
673808
673953
|
saveGlobalConfig((current) => ({
|
|
673809
673954
|
...current,
|
|
673810
673955
|
hasCompletedOnboarding: true,
|
|
673811
|
-
lastOnboardingVersion: "1.
|
|
673956
|
+
lastOnboardingVersion: "1.30.1"
|
|
673812
673957
|
}));
|
|
673813
673958
|
}
|
|
673814
673959
|
function showDialog(root2, renderer) {
|
|
@@ -678912,7 +679057,7 @@ function appendToLog(path24, message) {
|
|
|
678912
679057
|
cwd: getFsImplementation().cwd(),
|
|
678913
679058
|
userType: process.env.USER_TYPE,
|
|
678914
679059
|
sessionId: getSessionId(),
|
|
678915
|
-
version: "1.
|
|
679060
|
+
version: "1.30.1"
|
|
678916
679061
|
};
|
|
678917
679062
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
678918
679063
|
}
|
|
@@ -679989,7 +680134,7 @@ function coalescePatches(base2, overlay) {
|
|
|
679989
680134
|
var init_WorkerStateUploader = () => {};
|
|
679990
680135
|
|
|
679991
680136
|
// src/cli/transports/ccrClient.ts
|
|
679992
|
-
import { randomUUID as
|
|
680137
|
+
import { randomUUID as randomUUID58 } from "crypto";
|
|
679993
680138
|
function alwaysValidStatus() {
|
|
679994
680139
|
return true;
|
|
679995
680140
|
}
|
|
@@ -680352,7 +680497,7 @@ class CCRClient {
|
|
|
680352
680497
|
return {
|
|
680353
680498
|
payload: {
|
|
680354
680499
|
...msg,
|
|
680355
|
-
uuid: typeof msg.uuid === "string" ? msg.uuid :
|
|
680500
|
+
uuid: typeof msg.uuid === "string" ? msg.uuid : randomUUID58()
|
|
680356
680501
|
}
|
|
680357
680502
|
};
|
|
680358
680503
|
}
|
|
@@ -680376,7 +680521,7 @@ class CCRClient {
|
|
|
680376
680521
|
payload: {
|
|
680377
680522
|
type: eventType,
|
|
680378
680523
|
...payload,
|
|
680379
|
-
uuid: typeof payload.uuid === "string" ? payload.uuid :
|
|
680524
|
+
uuid: typeof payload.uuid === "string" ? payload.uuid : randomUUID58()
|
|
680380
680525
|
},
|
|
680381
680526
|
...isCompaction && { is_compaction: true },
|
|
680382
680527
|
...agentId && { agent_id: agentId }
|
|
@@ -681887,7 +682032,7 @@ var init_queryContext = __esm(() => {
|
|
|
681887
682032
|
});
|
|
681888
682033
|
|
|
681889
682034
|
// src/QueryEngine.ts
|
|
681890
|
-
import { randomUUID as
|
|
682035
|
+
import { randomUUID as randomUUID59 } from "crypto";
|
|
681891
682036
|
|
|
681892
682037
|
class QueryEngine {
|
|
681893
682038
|
config;
|
|
@@ -682184,7 +682329,7 @@ class QueryEngine {
|
|
|
682184
682329
|
modelUsage: getModelUsage(),
|
|
682185
682330
|
permission_denials: this.permissionDenials,
|
|
682186
682331
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682187
|
-
uuid:
|
|
682332
|
+
uuid: randomUUID59()
|
|
682188
682333
|
};
|
|
682189
682334
|
return;
|
|
682190
682335
|
}
|
|
@@ -682297,7 +682442,7 @@ class QueryEngine {
|
|
|
682297
682442
|
event: message.event,
|
|
682298
682443
|
session_id: getSessionId(),
|
|
682299
682444
|
parent_tool_use_id: null,
|
|
682300
|
-
uuid:
|
|
682445
|
+
uuid: randomUUID59()
|
|
682301
682446
|
};
|
|
682302
682447
|
}
|
|
682303
682448
|
break;
|
|
@@ -682329,7 +682474,7 @@ class QueryEngine {
|
|
|
682329
682474
|
modelUsage: getModelUsage(),
|
|
682330
682475
|
permission_denials: this.permissionDenials,
|
|
682331
682476
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682332
|
-
uuid:
|
|
682477
|
+
uuid: randomUUID59(),
|
|
682333
682478
|
errors: [
|
|
682334
682479
|
`Reached maximum number of turns (${message.attachment.maxTurns})`
|
|
682335
682480
|
]
|
|
@@ -682424,7 +682569,7 @@ class QueryEngine {
|
|
|
682424
682569
|
modelUsage: getModelUsage(),
|
|
682425
682570
|
permission_denials: this.permissionDenials,
|
|
682426
682571
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682427
|
-
uuid:
|
|
682572
|
+
uuid: randomUUID59(),
|
|
682428
682573
|
errors: [`Reached maximum budget ($${maxBudgetUsd})`]
|
|
682429
682574
|
};
|
|
682430
682575
|
return;
|
|
@@ -682453,7 +682598,7 @@ class QueryEngine {
|
|
|
682453
682598
|
modelUsage: getModelUsage(),
|
|
682454
682599
|
permission_denials: this.permissionDenials,
|
|
682455
682600
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682456
|
-
uuid:
|
|
682601
|
+
uuid: randomUUID59(),
|
|
682457
682602
|
errors: [
|
|
682458
682603
|
`Failed to provide valid structured output after ${maxRetries} attempts`
|
|
682459
682604
|
]
|
|
@@ -682485,7 +682630,7 @@ class QueryEngine {
|
|
|
682485
682630
|
modelUsage: getModelUsage(),
|
|
682486
682631
|
permission_denials: this.permissionDenials,
|
|
682487
682632
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682488
|
-
uuid:
|
|
682633
|
+
uuid: randomUUID59(),
|
|
682489
682634
|
errors: (() => {
|
|
682490
682635
|
const all4 = getInMemoryErrors();
|
|
682491
682636
|
const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
|
|
@@ -682522,7 +682667,7 @@ class QueryEngine {
|
|
|
682522
682667
|
permission_denials: this.permissionDenials,
|
|
682523
682668
|
structured_output: structuredOutputFromTool,
|
|
682524
682669
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
682525
|
-
uuid:
|
|
682670
|
+
uuid: randomUUID59()
|
|
682526
682671
|
};
|
|
682527
682672
|
}
|
|
682528
682673
|
interrupt() {
|
|
@@ -682698,7 +682843,7 @@ var init_idleTimeout = __esm(() => {
|
|
|
682698
682843
|
});
|
|
682699
682844
|
|
|
682700
682845
|
// src/bridge/inboundAttachments.ts
|
|
682701
|
-
import { randomUUID as
|
|
682846
|
+
import { randomUUID as randomUUID60 } from "crypto";
|
|
682702
682847
|
import { mkdir as mkdir45, writeFile as writeFile49 } from "fs/promises";
|
|
682703
682848
|
import { basename as basename60, join as join214 } from "path";
|
|
682704
682849
|
function debug(msg) {
|
|
@@ -682743,7 +682888,7 @@ async function resolveOne(att) {
|
|
|
682743
682888
|
return;
|
|
682744
682889
|
}
|
|
682745
682890
|
const safeName = sanitizeFileName(att.file_name);
|
|
682746
|
-
const prefix = (att.file_uuid.slice(0, 8) ||
|
|
682891
|
+
const prefix = (att.file_uuid.slice(0, 8) || randomUUID60().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
682747
682892
|
const dir = uploadsDir();
|
|
682748
682893
|
const outPath = join214(dir, `${prefix}-${safeName}`);
|
|
682749
682894
|
try {
|
|
@@ -682807,11 +682952,11 @@ var init_inboundAttachments = __esm(() => {
|
|
|
682807
682952
|
});
|
|
682808
682953
|
|
|
682809
682954
|
// src/utils/sessionUrl.ts
|
|
682810
|
-
import { randomUUID as
|
|
682955
|
+
import { randomUUID as randomUUID61 } from "crypto";
|
|
682811
682956
|
function parseSessionIdentifier(resumeIdentifier) {
|
|
682812
682957
|
if (resumeIdentifier.toLowerCase().endsWith(".jsonl")) {
|
|
682813
682958
|
return {
|
|
682814
|
-
sessionId:
|
|
682959
|
+
sessionId: randomUUID61(),
|
|
682815
682960
|
ingressUrl: null,
|
|
682816
682961
|
isUrl: false,
|
|
682817
682962
|
jsonlFile: resumeIdentifier,
|
|
@@ -682830,7 +682975,7 @@ function parseSessionIdentifier(resumeIdentifier) {
|
|
|
682830
682975
|
try {
|
|
682831
682976
|
const url3 = new URL(resumeIdentifier);
|
|
682832
682977
|
return {
|
|
682833
|
-
sessionId:
|
|
682978
|
+
sessionId: randomUUID61(),
|
|
682834
682979
|
ingressUrl: url3.href,
|
|
682835
682980
|
isUrl: true,
|
|
682836
682981
|
jsonlFile: null,
|
|
@@ -683006,8 +683151,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
683006
683151
|
}
|
|
683007
683152
|
async function checkEnvLessBridgeMinVersion() {
|
|
683008
683153
|
const cfg = await getEnvLessBridgeConfig();
|
|
683009
|
-
if (cfg.min_version && lt("1.
|
|
683010
|
-
return `Your version of UR (${"1.
|
|
683154
|
+
if (cfg.min_version && lt("1.30.1", cfg.min_version)) {
|
|
683155
|
+
return `Your version of UR (${"1.30.1"}) is too old for Remote Control.
|
|
683011
683156
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
683012
683157
|
}
|
|
683013
683158
|
return null;
|
|
@@ -683439,7 +683584,7 @@ var init_bridgePointer = __esm(() => {
|
|
|
683439
683584
|
});
|
|
683440
683585
|
|
|
683441
683586
|
// src/bridge/replBridge.ts
|
|
683442
|
-
import { randomUUID as
|
|
683587
|
+
import { randomUUID as randomUUID62 } from "crypto";
|
|
683443
683588
|
async function initBridgeCore(params) {
|
|
683444
683589
|
const {
|
|
683445
683590
|
dir,
|
|
@@ -683481,7 +683626,7 @@ async function initBridgeCore(params) {
|
|
|
683481
683626
|
const rawApi = createBridgeApiClient({
|
|
683482
683627
|
baseUrl,
|
|
683483
683628
|
getAccessToken,
|
|
683484
|
-
runnerVersion: "1.
|
|
683629
|
+
runnerVersion: "1.30.1",
|
|
683485
683630
|
onDebug: logForDebugging,
|
|
683486
683631
|
onAuth401,
|
|
683487
683632
|
getTrustedDeviceToken
|
|
@@ -683496,9 +683641,9 @@ async function initBridgeCore(params) {
|
|
|
683496
683641
|
spawnMode: "single-session",
|
|
683497
683642
|
verbose: false,
|
|
683498
683643
|
sandbox: false,
|
|
683499
|
-
bridgeId:
|
|
683644
|
+
bridgeId: randomUUID62(),
|
|
683500
683645
|
workerType,
|
|
683501
|
-
environmentId:
|
|
683646
|
+
environmentId: randomUUID62(),
|
|
683502
683647
|
reuseEnvironmentId: prior?.environmentId,
|
|
683503
683648
|
apiBaseUrl: baseUrl,
|
|
683504
683649
|
sessionIngressUrl
|
|
@@ -685348,7 +685493,7 @@ __export(exports_print, {
|
|
|
685348
685493
|
import { readFile as readFile56, stat as stat51, writeFile as writeFile51 } from "fs/promises";
|
|
685349
685494
|
import { dirname as dirname78 } from "path";
|
|
685350
685495
|
import { cwd as cwd2 } from "process";
|
|
685351
|
-
import { randomUUID as
|
|
685496
|
+
import { randomUUID as randomUUID63 } from "crypto";
|
|
685352
685497
|
function trackReceivedMessageUuid(uuid3) {
|
|
685353
685498
|
if (receivedMessageUuids.has(uuid3)) {
|
|
685354
685499
|
return false;
|
|
@@ -685470,7 +685615,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
|
|
|
685470
685615
|
hook_id: event.hookId,
|
|
685471
685616
|
hook_name: event.hookName,
|
|
685472
685617
|
hook_event: event.hookEvent,
|
|
685473
|
-
uuid:
|
|
685618
|
+
uuid: randomUUID63(),
|
|
685474
685619
|
session_id: getSessionId()
|
|
685475
685620
|
};
|
|
685476
685621
|
case "progress":
|
|
@@ -685483,7 +685628,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
|
|
|
685483
685628
|
stdout: event.stdout,
|
|
685484
685629
|
stderr: event.stderr,
|
|
685485
685630
|
output: event.output,
|
|
685486
|
-
uuid:
|
|
685631
|
+
uuid: randomUUID63(),
|
|
685487
685632
|
session_id: getSessionId()
|
|
685488
685633
|
};
|
|
685489
685634
|
case "response":
|
|
@@ -685498,7 +685643,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
|
|
|
685498
685643
|
stderr: event.stderr,
|
|
685499
685644
|
exit_code: event.exitCode,
|
|
685500
685645
|
outcome: event.outcome,
|
|
685501
|
-
uuid:
|
|
685646
|
+
uuid: randomUUID63(),
|
|
685502
685647
|
session_id: getSessionId()
|
|
685503
685648
|
};
|
|
685504
685649
|
}
|
|
@@ -685711,7 +685856,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
685711
685856
|
subtype: "status",
|
|
685712
685857
|
status: null,
|
|
685713
685858
|
permissionMode: newMode,
|
|
685714
|
-
uuid:
|
|
685859
|
+
uuid: randomUUID63(),
|
|
685715
685860
|
session_id: getSessionId()
|
|
685716
685861
|
});
|
|
685717
685862
|
}
|
|
@@ -685732,7 +685877,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
685732
685877
|
isAuthenticating: status2.isAuthenticating,
|
|
685733
685878
|
output: status2.output,
|
|
685734
685879
|
error: status2.error,
|
|
685735
|
-
uuid:
|
|
685880
|
+
uuid: randomUUID63(),
|
|
685736
685881
|
session_id: getSessionId()
|
|
685737
685882
|
});
|
|
685738
685883
|
});
|
|
@@ -685743,7 +685888,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
685743
685888
|
output.enqueue({
|
|
685744
685889
|
type: "rate_limit_event",
|
|
685745
685890
|
rate_limit_info: rateLimitInfo,
|
|
685746
|
-
uuid:
|
|
685891
|
+
uuid: randomUUID63(),
|
|
685747
685892
|
session_id: getSessionId()
|
|
685748
685893
|
});
|
|
685749
685894
|
}
|
|
@@ -685759,7 +685904,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
685759
685904
|
enqueue({
|
|
685760
685905
|
mode: "prompt",
|
|
685761
685906
|
value: turnInterruptionState.message.message.content,
|
|
685762
|
-
uuid:
|
|
685907
|
+
uuid: randomUUID63()
|
|
685763
685908
|
});
|
|
685764
685909
|
}
|
|
685765
685910
|
const modelOptions = getModelOptions();
|
|
@@ -685852,7 +685997,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
685852
685997
|
subtype: "elicitation_complete",
|
|
685853
685998
|
mcp_server_name: serverName,
|
|
685854
685999
|
elicitation_id: elicitationId,
|
|
685855
|
-
uuid:
|
|
686000
|
+
uuid: randomUUID63(),
|
|
685856
686001
|
session_id: getSessionId()
|
|
685857
686002
|
});
|
|
685858
686003
|
});
|
|
@@ -686197,7 +686342,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
686197
686342
|
duration_ms: durationMsMatch ? parseInt(durationMsMatch[1], 10) : 0
|
|
686198
686343
|
} : undefined,
|
|
686199
686344
|
session_id: getSessionId(),
|
|
686200
|
-
uuid:
|
|
686345
|
+
uuid: randomUUID63()
|
|
686201
686346
|
});
|
|
686202
686347
|
}
|
|
686203
686348
|
}
|
|
@@ -686271,7 +686416,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
686271
686416
|
subtype: "status",
|
|
686272
686417
|
status: status2,
|
|
686273
686418
|
session_id: getSessionId(),
|
|
686274
|
-
uuid:
|
|
686419
|
+
uuid: randomUUID63()
|
|
686275
686420
|
});
|
|
686276
686421
|
}
|
|
686277
686422
|
})) {
|
|
@@ -686319,7 +686464,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
686319
686464
|
const suggestionMsg = {
|
|
686320
686465
|
type: "prompt_suggestion",
|
|
686321
686466
|
suggestion: result.suggestion,
|
|
686322
|
-
uuid:
|
|
686467
|
+
uuid: randomUUID63(),
|
|
686323
686468
|
session_id: getSessionId()
|
|
686324
686469
|
};
|
|
686325
686470
|
const lastEmittedEntry = {
|
|
@@ -686409,7 +686554,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
686409
686554
|
usage: EMPTY_USAGE2,
|
|
686410
686555
|
modelUsage: {},
|
|
686411
686556
|
permission_denials: [],
|
|
686412
|
-
uuid:
|
|
686557
|
+
uuid: randomUUID63(),
|
|
686413
686558
|
errors: [
|
|
686414
686559
|
errorMessage2(error40),
|
|
686415
686560
|
...getInMemoryErrors().map((_) => _.error)
|
|
@@ -686493,7 +686638,7 @@ ${m.text}
|
|
|
686493
686638
|
enqueue({
|
|
686494
686639
|
mode: "prompt",
|
|
686495
686640
|
value: formatted,
|
|
686496
|
-
uuid:
|
|
686641
|
+
uuid: randomUUID63()
|
|
686497
686642
|
});
|
|
686498
686643
|
run();
|
|
686499
686644
|
return;
|
|
@@ -686504,7 +686649,7 @@ ${m.text}
|
|
|
686504
686649
|
enqueue({
|
|
686505
686650
|
mode: "prompt",
|
|
686506
686651
|
value: SHUTDOWN_TEAM_PROMPT,
|
|
686507
|
-
uuid:
|
|
686652
|
+
uuid: randomUUID63()
|
|
686508
686653
|
});
|
|
686509
686654
|
run();
|
|
686510
686655
|
return;
|
|
@@ -686528,7 +686673,7 @@ ${m.text}
|
|
|
686528
686673
|
enqueue({
|
|
686529
686674
|
mode: "prompt",
|
|
686530
686675
|
value: SHUTDOWN_TEAM_PROMPT,
|
|
686531
|
-
uuid:
|
|
686676
|
+
uuid: randomUUID63()
|
|
686532
686677
|
});
|
|
686533
686678
|
run();
|
|
686534
686679
|
} else {
|
|
@@ -687277,7 +687422,7 @@ ${m.text}
|
|
|
687277
687422
|
subtype: "bridge_state",
|
|
687278
687423
|
state: state2,
|
|
687279
687424
|
detail,
|
|
687280
|
-
uuid:
|
|
687425
|
+
uuid: randomUUID63(),
|
|
687281
687426
|
session_id: getSessionId()
|
|
687282
687427
|
});
|
|
687283
687428
|
},
|
|
@@ -687585,7 +687730,7 @@ async function handleInitializeRequest(request, requestId, initialized5, output,
|
|
|
687585
687730
|
isAuthenticating: status2.isAuthenticating,
|
|
687586
687731
|
output: status2.output,
|
|
687587
687732
|
error: status2.error,
|
|
687588
|
-
uuid:
|
|
687733
|
+
uuid: randomUUID63(),
|
|
687589
687734
|
session_id: getSessionId()
|
|
687590
687735
|
});
|
|
687591
687736
|
}
|
|
@@ -687773,7 +687918,7 @@ function emitLoadError(message, outputFormat) {
|
|
|
687773
687918
|
usage: EMPTY_USAGE2,
|
|
687774
687919
|
modelUsage: {},
|
|
687775
687920
|
permission_denials: [],
|
|
687776
|
-
uuid:
|
|
687921
|
+
uuid: randomUUID63(),
|
|
687777
687922
|
errors: [message]
|
|
687778
687923
|
};
|
|
687779
687924
|
process.stdout.write(jsonStringify(errorResult) + `
|
|
@@ -689163,7 +689308,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
689163
689308
|
setCwd(cwd3);
|
|
689164
689309
|
const server2 = new Server({
|
|
689165
689310
|
name: "ur/tengu",
|
|
689166
|
-
version: "1.
|
|
689311
|
+
version: "1.30.1"
|
|
689167
689312
|
}, {
|
|
689168
689313
|
capabilities: {
|
|
689169
689314
|
tools: {}
|
|
@@ -689809,6 +689954,148 @@ var init_providers2 = __esm(() => {
|
|
|
689809
689954
|
init_settings2();
|
|
689810
689955
|
});
|
|
689811
689956
|
|
|
689957
|
+
// src/utils/plugins/pluginDoctor.ts
|
|
689958
|
+
import { existsSync as existsSync63, readdirSync as readdirSync24, readFileSync as readFileSync65, statSync as statSync15 } from "fs";
|
|
689959
|
+
import { basename as basename61, join as join218 } from "path";
|
|
689960
|
+
function manifestPathFor(dir) {
|
|
689961
|
+
const p2 = join218(dir, ".ur-plugin", "plugin.json");
|
|
689962
|
+
return existsSync63(p2) ? p2 : null;
|
|
689963
|
+
}
|
|
689964
|
+
function discoverPluginDirs(roots) {
|
|
689965
|
+
const dirs = [];
|
|
689966
|
+
const seen = new Set;
|
|
689967
|
+
const add = (dir) => {
|
|
689968
|
+
if (!seen.has(dir)) {
|
|
689969
|
+
seen.add(dir);
|
|
689970
|
+
dirs.push(dir);
|
|
689971
|
+
}
|
|
689972
|
+
};
|
|
689973
|
+
for (const root2 of roots) {
|
|
689974
|
+
if (!root2 || !existsSync63(root2))
|
|
689975
|
+
continue;
|
|
689976
|
+
if (manifestPathFor(root2)) {
|
|
689977
|
+
add(root2);
|
|
689978
|
+
continue;
|
|
689979
|
+
}
|
|
689980
|
+
let entries = [];
|
|
689981
|
+
try {
|
|
689982
|
+
entries = readdirSync24(root2);
|
|
689983
|
+
} catch {
|
|
689984
|
+
continue;
|
|
689985
|
+
}
|
|
689986
|
+
for (const entry of entries) {
|
|
689987
|
+
const full = join218(root2, entry);
|
|
689988
|
+
try {
|
|
689989
|
+
if (statSync15(full).isDirectory() && manifestPathFor(full))
|
|
689990
|
+
add(full);
|
|
689991
|
+
} catch {}
|
|
689992
|
+
}
|
|
689993
|
+
}
|
|
689994
|
+
return dirs;
|
|
689995
|
+
}
|
|
689996
|
+
function keysPresent(value, keys2) {
|
|
689997
|
+
return keys2.filter((key) => value[key] !== undefined && value[key] !== null);
|
|
689998
|
+
}
|
|
689999
|
+
function doctorPluginDir(dir) {
|
|
690000
|
+
const manifestPath5 = manifestPathFor(dir);
|
|
690001
|
+
if (!manifestPath5) {
|
|
690002
|
+
return {
|
|
690003
|
+
name: basename61(dir),
|
|
690004
|
+
path: dir,
|
|
690005
|
+
ok: false,
|
|
690006
|
+
components: [],
|
|
690007
|
+
capabilities: [],
|
|
690008
|
+
errors: ["Missing .ur-plugin/plugin.json"]
|
|
690009
|
+
};
|
|
690010
|
+
}
|
|
690011
|
+
let parsed;
|
|
690012
|
+
try {
|
|
690013
|
+
parsed = JSON.parse(readFileSync65(manifestPath5, "utf8"));
|
|
690014
|
+
} catch (error40) {
|
|
690015
|
+
return {
|
|
690016
|
+
name: basename61(dir),
|
|
690017
|
+
path: dir,
|
|
690018
|
+
ok: false,
|
|
690019
|
+
components: [],
|
|
690020
|
+
capabilities: [],
|
|
690021
|
+
errors: [`Invalid JSON: ${error40 instanceof Error ? error40.message : String(error40)}`]
|
|
690022
|
+
};
|
|
690023
|
+
}
|
|
690024
|
+
const raw = parsed && typeof parsed === "object" ? parsed : {};
|
|
690025
|
+
const result = PluginManifestSchema().safeParse(parsed);
|
|
690026
|
+
if (!result.success) {
|
|
690027
|
+
return {
|
|
690028
|
+
name: typeof raw.name === "string" ? raw.name : basename61(dir),
|
|
690029
|
+
path: dir,
|
|
690030
|
+
ok: false,
|
|
690031
|
+
version: typeof raw.version === "string" ? raw.version : undefined,
|
|
690032
|
+
components: keysPresent(raw, COMPONENT_KEYS),
|
|
690033
|
+
capabilities: keysPresent(raw, CAPABILITY_KEYS),
|
|
690034
|
+
errors: result.error.issues.map((issue2) => `${issue2.path.join(".") || "(root)"}: ${issue2.message}`)
|
|
690035
|
+
};
|
|
690036
|
+
}
|
|
690037
|
+
const manifest = result.data;
|
|
690038
|
+
return {
|
|
690039
|
+
name: manifest.name,
|
|
690040
|
+
path: dir,
|
|
690041
|
+
ok: true,
|
|
690042
|
+
version: manifest.version,
|
|
690043
|
+
components: keysPresent(manifest, COMPONENT_KEYS),
|
|
690044
|
+
capabilities: keysPresent(manifest, CAPABILITY_KEYS),
|
|
690045
|
+
errors: []
|
|
690046
|
+
};
|
|
690047
|
+
}
|
|
690048
|
+
function runPluginDoctor(roots) {
|
|
690049
|
+
const dirs = discoverPluginDirs(roots);
|
|
690050
|
+
const plugins = dirs.map(doctorPluginDir).sort((a2, b) => a2.name.localeCompare(b.name));
|
|
690051
|
+
return {
|
|
690052
|
+
ok: plugins.every((p2) => p2.ok),
|
|
690053
|
+
scanned: plugins.length,
|
|
690054
|
+
plugins
|
|
690055
|
+
};
|
|
690056
|
+
}
|
|
690057
|
+
function formatPluginDoctor(report, json2 = false) {
|
|
690058
|
+
if (json2)
|
|
690059
|
+
return JSON.stringify(report, null, 2);
|
|
690060
|
+
if (report.scanned === 0) {
|
|
690061
|
+
return "No plugins found. Add plugins under .ur/plugins or install from a marketplace.";
|
|
690062
|
+
}
|
|
690063
|
+
const lines = [`Plugin doctor: ${report.ok ? "all manifests valid" : "issues found"} (${report.scanned} scanned)`];
|
|
690064
|
+
for (const plugin2 of report.plugins) {
|
|
690065
|
+
lines.push(` ${plugin2.ok ? "OK " : "FAIL"} ${plugin2.name}${plugin2.version ? `@${plugin2.version}` : ""}` + (plugin2.capabilities.length > 0 ? ` [${plugin2.capabilities.join(", ")}]` : ""));
|
|
690066
|
+
for (const error40 of plugin2.errors) {
|
|
690067
|
+
lines.push(` - ${error40}`);
|
|
690068
|
+
}
|
|
690069
|
+
}
|
|
690070
|
+
return lines.join(`
|
|
690071
|
+
`);
|
|
690072
|
+
}
|
|
690073
|
+
var COMPONENT_KEYS, CAPABILITY_KEYS;
|
|
690074
|
+
var init_pluginDoctor = __esm(() => {
|
|
690075
|
+
init_schemas3();
|
|
690076
|
+
COMPONENT_KEYS = [
|
|
690077
|
+
"commands",
|
|
690078
|
+
"agents",
|
|
690079
|
+
"skills",
|
|
690080
|
+
"templates",
|
|
690081
|
+
"validators",
|
|
690082
|
+
"outputStyles",
|
|
690083
|
+
"hooks"
|
|
690084
|
+
];
|
|
690085
|
+
CAPABILITY_KEYS = [
|
|
690086
|
+
"commands",
|
|
690087
|
+
"skills",
|
|
690088
|
+
"templates",
|
|
690089
|
+
"validators",
|
|
690090
|
+
"hooks",
|
|
690091
|
+
"agents",
|
|
690092
|
+
"outputStyles",
|
|
690093
|
+
"mcpServers",
|
|
690094
|
+
"lspServers",
|
|
690095
|
+
"languageAdapters"
|
|
690096
|
+
];
|
|
690097
|
+
});
|
|
690098
|
+
|
|
689812
690099
|
// src/cli/handlers/plugins.ts
|
|
689813
690100
|
var exports_plugins = {};
|
|
689814
690101
|
__export(exports_plugins, {
|
|
@@ -689818,6 +690105,7 @@ __export(exports_plugins, {
|
|
|
689818
690105
|
pluginListHandler: () => pluginListHandler,
|
|
689819
690106
|
pluginInstallHandler: () => pluginInstallHandler,
|
|
689820
690107
|
pluginEnableHandler: () => pluginEnableHandler,
|
|
690108
|
+
pluginDoctorHandler: () => pluginDoctorHandler,
|
|
689821
690109
|
pluginDisableHandler: () => pluginDisableHandler,
|
|
689822
690110
|
marketplaceUpdateHandler: () => marketplaceUpdateHandler,
|
|
689823
690111
|
marketplaceRemoveHandler: () => marketplaceRemoveHandler,
|
|
@@ -689827,7 +690115,7 @@ __export(exports_plugins, {
|
|
|
689827
690115
|
VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
|
|
689828
690116
|
VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
|
|
689829
690117
|
});
|
|
689830
|
-
import { basename as
|
|
690118
|
+
import { basename as basename62, dirname as dirname79, join as join219, resolve as resolve51 } from "path";
|
|
689831
690119
|
function handleMarketplaceError(error40, action3) {
|
|
689832
690120
|
logError2(error40);
|
|
689833
690121
|
cliError(`${figures_default.cross} Failed to ${action3}: ${errorMessage2(error40)}`);
|
|
@@ -689850,6 +690138,26 @@ function printValidationResult(result) {
|
|
|
689850
690138
|
console.log("");
|
|
689851
690139
|
}
|
|
689852
690140
|
}
|
|
690141
|
+
async function pluginDoctorHandler(options2) {
|
|
690142
|
+
const roots = [];
|
|
690143
|
+
if (options2.path)
|
|
690144
|
+
roots.push(resolve51(options2.path));
|
|
690145
|
+
roots.push(join219(process.cwd(), ".ur", "plugins"));
|
|
690146
|
+
try {
|
|
690147
|
+
const data = loadInstalledPluginsV2();
|
|
690148
|
+
for (const installations of Object.values(data.plugins ?? {})) {
|
|
690149
|
+
for (const installation of installations) {
|
|
690150
|
+
if (typeof installation?.installPath === "string")
|
|
690151
|
+
roots.push(installation.installPath);
|
|
690152
|
+
}
|
|
690153
|
+
}
|
|
690154
|
+
} catch {}
|
|
690155
|
+
const report = runPluginDoctor(roots);
|
|
690156
|
+
console.log(formatPluginDoctor(report, options2.json));
|
|
690157
|
+
if (!report.ok) {
|
|
690158
|
+
process.exitCode = 1;
|
|
690159
|
+
}
|
|
690160
|
+
}
|
|
689853
690161
|
async function pluginValidateHandler(manifestPath5, options2) {
|
|
689854
690162
|
if (options2.cowork)
|
|
689855
690163
|
setUseCoworkPlugins(true);
|
|
@@ -689861,7 +690169,7 @@ async function pluginValidateHandler(manifestPath5, options2) {
|
|
|
689861
690169
|
let contentResults = [];
|
|
689862
690170
|
if (result.fileType === "plugin") {
|
|
689863
690171
|
const manifestDir = dirname79(result.filePath);
|
|
689864
|
-
if (
|
|
690172
|
+
if (basename62(manifestDir) === ".ur-plugin") {
|
|
689865
690173
|
contentResults = await validatePluginContents(dirname79(manifestDir));
|
|
689866
690174
|
for (const r of contentResults) {
|
|
689867
690175
|
console.log(`Validating ${r.fileType}: ${r.filePath}
|
|
@@ -690328,6 +690636,7 @@ var init_plugins = __esm(() => {
|
|
|
690328
690636
|
init_mcpPluginIntegration();
|
|
690329
690637
|
init_parseMarketplaceInput();
|
|
690330
690638
|
init_pluginIdentifier();
|
|
690639
|
+
init_pluginDoctor();
|
|
690331
690640
|
init_pluginLoader();
|
|
690332
690641
|
init_validatePlugin();
|
|
690333
690642
|
init_slowOperations();
|
|
@@ -690340,12 +690649,12 @@ __export(exports_install, {
|
|
|
690340
690649
|
install: () => install
|
|
690341
690650
|
});
|
|
690342
690651
|
import { homedir as homedir39 } from "os";
|
|
690343
|
-
import { join as
|
|
690652
|
+
import { join as join220 } from "path";
|
|
690344
690653
|
function getInstallationPath2() {
|
|
690345
690654
|
const isWindows2 = env2.platform === "win32";
|
|
690346
690655
|
const homeDir = homedir39();
|
|
690347
690656
|
if (isWindows2) {
|
|
690348
|
-
const windowsPath =
|
|
690657
|
+
const windowsPath = join220(homeDir, ".local", "bin", "ur.exe");
|
|
690349
690658
|
return windowsPath.replace(/\//g, "\\");
|
|
690350
690659
|
}
|
|
690351
690660
|
return "~/.local/bin/ur";
|
|
@@ -690706,7 +691015,7 @@ async function setupTokenHandler(root2) {
|
|
|
690706
691015
|
const {
|
|
690707
691016
|
ConsoleOAuthFlow: ConsoleOAuthFlow2
|
|
690708
691017
|
} = await Promise.resolve().then(() => (init_ConsoleOAuthFlow(), exports_ConsoleOAuthFlow));
|
|
690709
|
-
await new Promise((
|
|
691018
|
+
await new Promise((resolve52) => {
|
|
690710
691019
|
root2.render(/* @__PURE__ */ jsx_dev_runtime492.jsxDEV(AppStateProvider, {
|
|
690711
691020
|
onChangeAppState,
|
|
690712
691021
|
children: /* @__PURE__ */ jsx_dev_runtime492.jsxDEV(KeybindingSetup, {
|
|
@@ -690730,7 +691039,7 @@ async function setupTokenHandler(root2) {
|
|
|
690730
691039
|
}, undefined, true, undefined, this),
|
|
690731
691040
|
/* @__PURE__ */ jsx_dev_runtime492.jsxDEV(ConsoleOAuthFlow2, {
|
|
690732
691041
|
onDone: () => {
|
|
690733
|
-
|
|
691042
|
+
resolve52();
|
|
690734
691043
|
},
|
|
690735
691044
|
mode: "setup-token",
|
|
690736
691045
|
startingMessage: "This will guide you through long-lived (1-year) auth token setup for your UR account. UR subscription required."
|
|
@@ -690766,7 +691075,7 @@ function DoctorWithPlugins(t0) {
|
|
|
690766
691075
|
}
|
|
690767
691076
|
async function doctorHandler(root2) {
|
|
690768
691077
|
logEvent("tengu_doctor_command", {});
|
|
690769
|
-
await new Promise((
|
|
691078
|
+
await new Promise((resolve52) => {
|
|
690770
691079
|
root2.render(/* @__PURE__ */ jsx_dev_runtime492.jsxDEV(AppStateProvider, {
|
|
690771
691080
|
children: /* @__PURE__ */ jsx_dev_runtime492.jsxDEV(KeybindingSetup, {
|
|
690772
691081
|
children: /* @__PURE__ */ jsx_dev_runtime492.jsxDEV(MCPConnectionManager, {
|
|
@@ -690774,7 +691083,7 @@ async function doctorHandler(root2) {
|
|
|
690774
691083
|
isStrictMcpConfig: false,
|
|
690775
691084
|
children: /* @__PURE__ */ jsx_dev_runtime492.jsxDEV(DoctorWithPlugins, {
|
|
690776
691085
|
onDone: () => {
|
|
690777
|
-
|
|
691086
|
+
resolve52();
|
|
690778
691087
|
}
|
|
690779
691088
|
}, undefined, false, undefined, this)
|
|
690780
691089
|
}, undefined, false, undefined, this)
|
|
@@ -690792,14 +691101,14 @@ async function installHandler(target, options2) {
|
|
|
690792
691101
|
const {
|
|
690793
691102
|
install: install2
|
|
690794
691103
|
} = await Promise.resolve().then(() => (init_install(), exports_install));
|
|
690795
|
-
await new Promise((
|
|
691104
|
+
await new Promise((resolve52) => {
|
|
690796
691105
|
const args = [];
|
|
690797
691106
|
if (target)
|
|
690798
691107
|
args.push(target);
|
|
690799
691108
|
if (options2.force)
|
|
690800
691109
|
args.push("--force");
|
|
690801
691110
|
install2.call((result) => {
|
|
690802
|
-
|
|
691111
|
+
resolve52();
|
|
690803
691112
|
process.exit(result.includes("failed") ? 1 : 0);
|
|
690804
691113
|
}, {}, args);
|
|
690805
691114
|
});
|
|
@@ -690976,7 +691285,7 @@ async function update() {
|
|
|
690976
691285
|
logEvent("tengu_update_check", {});
|
|
690977
691286
|
const diagnostic = await getDoctorDiagnostic();
|
|
690978
691287
|
const result = await checkUpgradeStatus({
|
|
690979
|
-
currentVersion: "1.
|
|
691288
|
+
currentVersion: "1.30.1",
|
|
690980
691289
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
690981
691290
|
installationType: diagnostic.installationType,
|
|
690982
691291
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -691003,8 +691312,8 @@ __export(exports_main, {
|
|
|
691003
691312
|
startDeferredPrefetches: () => startDeferredPrefetches,
|
|
691004
691313
|
main: () => main
|
|
691005
691314
|
});
|
|
691006
|
-
import { readFileSync as
|
|
691007
|
-
import { resolve as
|
|
691315
|
+
import { readFileSync as readFileSync66 } from "fs";
|
|
691316
|
+
import { resolve as resolve52 } from "path";
|
|
691008
691317
|
function logManagedSettings() {
|
|
691009
691318
|
try {
|
|
691010
691319
|
const policySettings = getSettingsForSource("policySettings");
|
|
@@ -691159,7 +691468,7 @@ function loadSettingsFromFlag(settingsFile) {
|
|
|
691159
691468
|
resolvedPath: resolvedSettingsPath
|
|
691160
691469
|
} = safeResolvePath(getFsImplementation(), settingsFile);
|
|
691161
691470
|
try {
|
|
691162
|
-
|
|
691471
|
+
readFileSync66(resolvedSettingsPath, "utf8");
|
|
691163
691472
|
} catch (e) {
|
|
691164
691473
|
if (isENOENT(e)) {
|
|
691165
691474
|
process.stderr.write(source_default.red(`Error: Settings file not found: ${resolvedSettingsPath}
|
|
@@ -691572,12 +691881,12 @@ ${getTmuxInstallInstructions2()}
|
|
|
691572
691881
|
process.exit(1);
|
|
691573
691882
|
}
|
|
691574
691883
|
try {
|
|
691575
|
-
const filePath =
|
|
691576
|
-
systemPrompt =
|
|
691884
|
+
const filePath = resolve52(options2.systemPromptFile);
|
|
691885
|
+
systemPrompt = readFileSync66(filePath, "utf8");
|
|
691577
691886
|
} catch (error40) {
|
|
691578
691887
|
const code = getErrnoCode(error40);
|
|
691579
691888
|
if (code === "ENOENT") {
|
|
691580
|
-
process.stderr.write(source_default.red(`Error: System prompt file not found: ${
|
|
691889
|
+
process.stderr.write(source_default.red(`Error: System prompt file not found: ${resolve52(options2.systemPromptFile)}
|
|
691581
691890
|
`));
|
|
691582
691891
|
process.exit(1);
|
|
691583
691892
|
}
|
|
@@ -691594,12 +691903,12 @@ ${getTmuxInstallInstructions2()}
|
|
|
691594
691903
|
process.exit(1);
|
|
691595
691904
|
}
|
|
691596
691905
|
try {
|
|
691597
|
-
const filePath =
|
|
691598
|
-
appendSystemPrompt =
|
|
691906
|
+
const filePath = resolve52(options2.appendSystemPromptFile);
|
|
691907
|
+
appendSystemPrompt = readFileSync66(filePath, "utf8");
|
|
691599
691908
|
} catch (error40) {
|
|
691600
691909
|
const code = getErrnoCode(error40);
|
|
691601
691910
|
if (code === "ENOENT") {
|
|
691602
|
-
process.stderr.write(source_default.red(`Error: Append system prompt file not found: ${
|
|
691911
|
+
process.stderr.write(source_default.red(`Error: Append system prompt file not found: ${resolve52(options2.appendSystemPromptFile)}
|
|
691603
691912
|
`));
|
|
691604
691913
|
process.exit(1);
|
|
691605
691914
|
}
|
|
@@ -691645,7 +691954,7 @@ ${addendum}` : addendum;
|
|
|
691645
691954
|
errors4 = result.errors;
|
|
691646
691955
|
}
|
|
691647
691956
|
} else {
|
|
691648
|
-
const configPath2 =
|
|
691957
|
+
const configPath2 = resolve52(configItem);
|
|
691649
691958
|
const result = parseMcpConfigFromFilePath({
|
|
691650
691959
|
filePath: configPath2,
|
|
691651
691960
|
expandVars: true,
|
|
@@ -692222,7 +692531,7 @@ ${customInstructions}` : customInstructions;
|
|
|
692222
692531
|
}
|
|
692223
692532
|
}
|
|
692224
692533
|
logForDiagnosticsNoPII("info", "started", {
|
|
692225
|
-
version: "1.
|
|
692534
|
+
version: "1.30.1",
|
|
692226
692535
|
is_native_binary: isInBundledMode()
|
|
692227
692536
|
});
|
|
692228
692537
|
registerCleanup(async () => {
|
|
@@ -692427,8 +692736,8 @@ ${customInstructions}` : customInstructions;
|
|
|
692427
692736
|
return connectMcpBatch(dedupedURAi, "urai");
|
|
692428
692737
|
});
|
|
692429
692738
|
let uraiTimer;
|
|
692430
|
-
const uraiTimedOut = await Promise.race([uraiConnect.then(() => false), new Promise((
|
|
692431
|
-
uraiTimer = setTimeout((r) => r(true), UR_AI_MCP_TIMEOUT_MS,
|
|
692739
|
+
const uraiTimedOut = await Promise.race([uraiConnect.then(() => false), new Promise((resolve53) => {
|
|
692740
|
+
uraiTimer = setTimeout((r) => r(true), UR_AI_MCP_TIMEOUT_MS, resolve53);
|
|
692432
692741
|
})]);
|
|
692433
692742
|
if (uraiTimer)
|
|
692434
692743
|
clearTimeout(uraiTimer);
|
|
@@ -693008,7 +693317,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
693008
693317
|
pendingHookMessages
|
|
693009
693318
|
}, renderAndRun);
|
|
693010
693319
|
}
|
|
693011
|
-
}).version("1.
|
|
693320
|
+
}).version("1.30.1 (UR-AGENT)", "-v, --version", "Output the version number");
|
|
693012
693321
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
693013
693322
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
693014
693323
|
if (canUserConfigureAdvisor()) {
|
|
@@ -693192,6 +693501,12 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
693192
693501
|
} = await Promise.resolve().then(() => (init_plugins(), exports_plugins));
|
|
693193
693502
|
await pluginListHandler2(options2);
|
|
693194
693503
|
});
|
|
693504
|
+
pluginCmd.command("doctor").description("Validate plugin manifests and report declared components and capabilities").option("--json", "Output as JSON").option("--path <dir>", "Also scan a specific plugin or plugins directory").action(async (options2) => {
|
|
693505
|
+
const {
|
|
693506
|
+
pluginDoctorHandler: pluginDoctorHandler2
|
|
693507
|
+
} = await Promise.resolve().then(() => (init_plugins(), exports_plugins));
|
|
693508
|
+
await pluginDoctorHandler2(options2);
|
|
693509
|
+
});
|
|
693195
693510
|
const marketplaceCmd = pluginCmd.command("marketplace").description("Manage UR marketplaces").configureHelp(createSortedHelpConfig());
|
|
693196
693511
|
marketplaceCmd.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").addOption(coworkOption()).option("--sparse <paths...>", "Limit checkout to specific directories via git sparse-checkout (for monorepos). Example: --sparse .ur-plugin plugins").option("--scope <scope>", "Where to declare the marketplace: user (default), project, or local").action(async (source, options2) => {
|
|
693197
693512
|
const {
|
|
@@ -693887,7 +694202,7 @@ if (false) {}
|
|
|
693887
694202
|
async function main2() {
|
|
693888
694203
|
const args = process.argv.slice(2);
|
|
693889
694204
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
693890
|
-
console.log(`${"1.
|
|
694205
|
+
console.log(`${"1.30.1"} (UR-AGENT)`);
|
|
693891
694206
|
return;
|
|
693892
694207
|
}
|
|
693893
694208
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|