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