ur-agent 1.49.0 → 1.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -73944,7 +73944,7 @@ function isURHQAuthEnabled() {
|
|
|
73944
73944
|
if (process.env.URHQ_UNIX_SOCKET) {
|
|
73945
73945
|
return !!process.env.UR_CODE_OAUTH_TOKEN;
|
|
73946
73946
|
}
|
|
73947
|
-
const is3P =
|
|
73947
|
+
const is3P = isUsing3PServices();
|
|
73948
73948
|
const settings = getSettings_DEPRECATED() || {};
|
|
73949
73949
|
const apiKeyHelper = settings.apiKeyHelper;
|
|
73950
73950
|
const hasExternalAuthToken = process.env.URHQ_AUTH_TOKEN || apiKeyHelper || process.env.UR_CODE_API_KEY_FILE_DESCRIPTOR;
|
|
@@ -74738,7 +74738,7 @@ function hasProfileScope() {
|
|
|
74738
74738
|
return getURAIOAuthTokens()?.scopes?.includes(UR_AI_PROFILE_SCOPE) ?? false;
|
|
74739
74739
|
}
|
|
74740
74740
|
function is1PApiCustomer() {
|
|
74741
|
-
if (
|
|
74741
|
+
if (isUsing3PServices()) {
|
|
74742
74742
|
return false;
|
|
74743
74743
|
}
|
|
74744
74744
|
if (isURAISubscriber()) {
|
|
@@ -74818,7 +74818,10 @@ function getSubscriptionName() {
|
|
|
74818
74818
|
}
|
|
74819
74819
|
}
|
|
74820
74820
|
function isUsing3PServices() {
|
|
74821
|
-
|
|
74821
|
+
const provider = getProviderDefinition(getRuntimeProviderId());
|
|
74822
|
+
if (provider.accessType === "api")
|
|
74823
|
+
return true;
|
|
74824
|
+
return provider.credentialType === "cli-login";
|
|
74822
74825
|
}
|
|
74823
74826
|
function getConfiguredOtelHeadersHelper() {
|
|
74824
74827
|
const mergedSettings = getSettings_DEPRECATED() || {};
|
|
@@ -74972,6 +74975,7 @@ var init_auth = __esm(() => {
|
|
|
74972
74975
|
init_analytics();
|
|
74973
74976
|
init_modelStrings();
|
|
74974
74977
|
init_providers();
|
|
74978
|
+
init_providerRegistry();
|
|
74975
74979
|
init_state();
|
|
74976
74980
|
init_mockRateLimits();
|
|
74977
74981
|
init_client();
|
|
@@ -75079,7 +75083,7 @@ var init_auth = __esm(() => {
|
|
|
75079
75083
|
|
|
75080
75084
|
// src/utils/userAgent.ts
|
|
75081
75085
|
function getURCodeUserAgent() {
|
|
75082
|
-
return `ur/${"1.
|
|
75086
|
+
return `ur/${"1.50.1"}`;
|
|
75083
75087
|
}
|
|
75084
75088
|
|
|
75085
75089
|
// src/utils/workloadContext.ts
|
|
@@ -75101,7 +75105,7 @@ function getUserAgent() {
|
|
|
75101
75105
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
75102
75106
|
const workload = getWorkload();
|
|
75103
75107
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
75104
|
-
return `ur-cli/${"1.
|
|
75108
|
+
return `ur-cli/${"1.50.1"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
75105
75109
|
}
|
|
75106
75110
|
function getMCPUserAgent() {
|
|
75107
75111
|
const parts = [];
|
|
@@ -75115,7 +75119,7 @@ function getMCPUserAgent() {
|
|
|
75115
75119
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
75116
75120
|
}
|
|
75117
75121
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
75118
|
-
return `ur/${"1.
|
|
75122
|
+
return `ur/${"1.50.1"}${suffix}`;
|
|
75119
75123
|
}
|
|
75120
75124
|
function getWebFetchUserAgent() {
|
|
75121
75125
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -75253,7 +75257,7 @@ var init_user = __esm(() => {
|
|
|
75253
75257
|
deviceId,
|
|
75254
75258
|
sessionId: getSessionId(),
|
|
75255
75259
|
email: getEmail(),
|
|
75256
|
-
appVersion: "1.
|
|
75260
|
+
appVersion: "1.50.1",
|
|
75257
75261
|
platform: getHostPlatformForAnalytics(),
|
|
75258
75262
|
organizationUuid,
|
|
75259
75263
|
accountUuid,
|
|
@@ -83453,7 +83457,7 @@ var init_metadata = __esm(() => {
|
|
|
83453
83457
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
83454
83458
|
WHITESPACE_REGEX = /\s+/;
|
|
83455
83459
|
getVersionBase = memoize_default(() => {
|
|
83456
|
-
const match = "1.
|
|
83460
|
+
const match = "1.50.1".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
83457
83461
|
return match ? match[0] : undefined;
|
|
83458
83462
|
});
|
|
83459
83463
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -83493,7 +83497,7 @@ var init_metadata = __esm(() => {
|
|
|
83493
83497
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
83494
83498
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
83495
83499
|
isURAiAuth: isURAISubscriber(),
|
|
83496
|
-
version: "1.
|
|
83500
|
+
version: "1.50.1",
|
|
83497
83501
|
versionBase: getVersionBase(),
|
|
83498
83502
|
buildTime: "",
|
|
83499
83503
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -84163,7 +84167,7 @@ function initialize1PEventLogging() {
|
|
|
84163
84167
|
const platform2 = getPlatform();
|
|
84164
84168
|
const attributes = {
|
|
84165
84169
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
84166
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.
|
|
84170
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.50.1"
|
|
84167
84171
|
};
|
|
84168
84172
|
if (platform2 === "wsl") {
|
|
84169
84173
|
const wslVersion = getWslVersion();
|
|
@@ -84191,7 +84195,7 @@ function initialize1PEventLogging() {
|
|
|
84191
84195
|
})
|
|
84192
84196
|
]
|
|
84193
84197
|
});
|
|
84194
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.
|
|
84198
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.50.1");
|
|
84195
84199
|
}
|
|
84196
84200
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
84197
84201
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -94007,7 +94011,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
94007
94011
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
94008
94012
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
94009
94013
|
}
|
|
94010
|
-
var urVersion = "1.
|
|
94014
|
+
var urVersion = "1.50.1", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
|
|
94011
94015
|
var init_trends = __esm(() => {
|
|
94012
94016
|
init_a2aCardSignature();
|
|
94013
94017
|
coverage = [
|
|
@@ -96808,7 +96812,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
96808
96812
|
if (!isAttributionHeaderEnabled()) {
|
|
96809
96813
|
return "";
|
|
96810
96814
|
}
|
|
96811
|
-
const version2 = `${"1.
|
|
96815
|
+
const version2 = `${"1.50.1"}.${fingerprint}`;
|
|
96812
96816
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
96813
96817
|
const cch = "";
|
|
96814
96818
|
const workload = getWorkload();
|
|
@@ -154493,7 +154497,7 @@ var init_projectSafety = __esm(() => {
|
|
|
154493
154497
|
function getInstruments() {
|
|
154494
154498
|
if (instruments)
|
|
154495
154499
|
return instruments;
|
|
154496
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.
|
|
154500
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.50.1");
|
|
154497
154501
|
instruments = {
|
|
154498
154502
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
154499
154503
|
description: "GenAI operation duration.",
|
|
@@ -154591,7 +154595,7 @@ function genAiAgentAttributes() {
|
|
|
154591
154595
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
154592
154596
|
"gen_ai.provider.name": "ur",
|
|
154593
154597
|
"gen_ai.agent.name": "UR-Nexus",
|
|
154594
|
-
"gen_ai.agent.version": "1.
|
|
154598
|
+
"gen_ai.agent.version": "1.50.1"
|
|
154595
154599
|
};
|
|
154596
154600
|
}
|
|
154597
154601
|
function genAiWorkflowAttributes(workflowName) {
|
|
@@ -154607,7 +154611,7 @@ function genAiWorkflowAttributes(workflowName) {
|
|
|
154607
154611
|
function startGenAiWorkflowSpan(workflowName) {
|
|
154608
154612
|
const attributes = genAiWorkflowAttributes(workflowName);
|
|
154609
154613
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
154610
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.
|
|
154614
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.50.1").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
154611
154615
|
}
|
|
154612
154616
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
154613
154617
|
try {
|
|
@@ -154645,7 +154649,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
154645
154649
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
154646
154650
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
154647
154651
|
}
|
|
154648
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.
|
|
154652
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.50.1").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
154649
154653
|
}
|
|
154650
154654
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
154651
154655
|
try {
|
|
@@ -206164,7 +206168,7 @@ function getTelemetryAttributes() {
|
|
|
206164
206168
|
attributes["session.id"] = sessionId;
|
|
206165
206169
|
}
|
|
206166
206170
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
206167
|
-
attributes["app.version"] = "1.
|
|
206171
|
+
attributes["app.version"] = "1.50.1";
|
|
206168
206172
|
}
|
|
206169
206173
|
const oauthAccount = getOauthAccountInfo();
|
|
206170
206174
|
if (oauthAccount) {
|
|
@@ -252415,7 +252419,7 @@ function getInstallationEnv() {
|
|
|
252415
252419
|
return;
|
|
252416
252420
|
}
|
|
252417
252421
|
function getURCodeVersion() {
|
|
252418
|
-
return "1.
|
|
252422
|
+
return "1.50.1";
|
|
252419
252423
|
}
|
|
252420
252424
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
252421
252425
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -259746,7 +259750,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
259746
259750
|
const client2 = new Client({
|
|
259747
259751
|
name: "ur",
|
|
259748
259752
|
title: "UR",
|
|
259749
|
-
version: "1.
|
|
259753
|
+
version: "1.50.1",
|
|
259750
259754
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
259751
259755
|
websiteUrl: PRODUCT_URL
|
|
259752
259756
|
}, {
|
|
@@ -260106,7 +260110,7 @@ var init_client5 = __esm(() => {
|
|
|
260106
260110
|
const client2 = new Client({
|
|
260107
260111
|
name: "ur",
|
|
260108
260112
|
title: "UR",
|
|
260109
|
-
version: "1.
|
|
260113
|
+
version: "1.50.1",
|
|
260110
260114
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
260111
260115
|
websiteUrl: PRODUCT_URL
|
|
260112
260116
|
}, {
|
|
@@ -272707,7 +272711,7 @@ async function createRuntime() {
|
|
|
272707
272711
|
bootstrapTelemetry();
|
|
272708
272712
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
272709
272713
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
272710
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.
|
|
272714
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.50.1"
|
|
272711
272715
|
}));
|
|
272712
272716
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
272713
272717
|
resource,
|
|
@@ -272740,11 +272744,11 @@ async function createRuntime() {
|
|
|
272740
272744
|
setMeterProvider(meterProvider);
|
|
272741
272745
|
setLoggerProvider(loggerProvider);
|
|
272742
272746
|
if (meterProvider) {
|
|
272743
|
-
const meter = meterProvider.getMeter("ur-agent", "1.
|
|
272747
|
+
const meter = meterProvider.getMeter("ur-agent", "1.50.1");
|
|
272744
272748
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
272745
272749
|
}
|
|
272746
272750
|
if (loggerProvider) {
|
|
272747
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.
|
|
272751
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.50.1"));
|
|
272748
272752
|
}
|
|
272749
272753
|
if (!cleanupRegistered2) {
|
|
272750
272754
|
cleanupRegistered2 = true;
|
|
@@ -273406,9 +273410,9 @@ async function assertMinVersion() {
|
|
|
273406
273410
|
if (false) {}
|
|
273407
273411
|
try {
|
|
273408
273412
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
273409
|
-
if (versionConfig.minVersion && lt("1.
|
|
273413
|
+
if (versionConfig.minVersion && lt("1.50.1", versionConfig.minVersion)) {
|
|
273410
273414
|
console.error(`
|
|
273411
|
-
It looks like your version of UR (${"1.
|
|
273415
|
+
It looks like your version of UR (${"1.50.1"}) needs an update.
|
|
273412
273416
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
273413
273417
|
|
|
273414
273418
|
To update, please run:
|
|
@@ -273624,7 +273628,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
273624
273628
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
273625
273629
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
273626
273630
|
pid: process.pid,
|
|
273627
|
-
currentVersion: "1.
|
|
273631
|
+
currentVersion: "1.50.1"
|
|
273628
273632
|
});
|
|
273629
273633
|
return "in_progress";
|
|
273630
273634
|
}
|
|
@@ -273633,7 +273637,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
273633
273637
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
273634
273638
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
273635
273639
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
273636
|
-
currentVersion: "1.
|
|
273640
|
+
currentVersion: "1.50.1"
|
|
273637
273641
|
});
|
|
273638
273642
|
console.error(`
|
|
273639
273643
|
Error: Windows NPM detected in WSL
|
|
@@ -274168,7 +274172,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
274168
274172
|
}
|
|
274169
274173
|
async function getDoctorDiagnostic() {
|
|
274170
274174
|
const installationType = await getCurrentInstallationType();
|
|
274171
|
-
const version2 = typeof MACRO !== "undefined" ? "1.
|
|
274175
|
+
const version2 = typeof MACRO !== "undefined" ? "1.50.1" : "unknown";
|
|
274172
274176
|
const installationPath = await getInstallationPath();
|
|
274173
274177
|
const invokedBinary = getInvokedBinary();
|
|
274174
274178
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -275103,8 +275107,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275103
275107
|
const maxVersion = await getMaxVersion();
|
|
275104
275108
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
275105
275109
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
275106
|
-
if (gte("1.
|
|
275107
|
-
logForDebugging(`Native installer: current version ${"1.
|
|
275110
|
+
if (gte("1.50.1", maxVersion)) {
|
|
275111
|
+
logForDebugging(`Native installer: current version ${"1.50.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
275108
275112
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
275109
275113
|
latency_ms: Date.now() - startTime,
|
|
275110
275114
|
max_version: maxVersion,
|
|
@@ -275115,7 +275119,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275115
275119
|
version2 = maxVersion;
|
|
275116
275120
|
}
|
|
275117
275121
|
}
|
|
275118
|
-
if (!forceReinstall && version2 === "1.
|
|
275122
|
+
if (!forceReinstall && version2 === "1.50.1" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
275119
275123
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
275120
275124
|
logEvent("tengu_native_update_complete", {
|
|
275121
275125
|
latency_ms: Date.now() - startTime,
|
|
@@ -344908,7 +344912,7 @@ function isAnyTracingEnabled() {
|
|
|
344908
344912
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
344909
344913
|
}
|
|
344910
344914
|
function getTracer() {
|
|
344911
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.
|
|
344915
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.50.1");
|
|
344912
344916
|
}
|
|
344913
344917
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
344914
344918
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -374002,7 +374006,7 @@ function Feedback({
|
|
|
374002
374006
|
platform: env2.platform,
|
|
374003
374007
|
gitRepo: envInfo.isGit,
|
|
374004
374008
|
terminal: env2.terminal,
|
|
374005
|
-
version: "1.
|
|
374009
|
+
version: "1.50.1",
|
|
374006
374010
|
transcript: normalizeMessagesForAPI(messages),
|
|
374007
374011
|
errors: sanitizedErrors,
|
|
374008
374012
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -374194,7 +374198,7 @@ function Feedback({
|
|
|
374194
374198
|
", ",
|
|
374195
374199
|
env2.terminal,
|
|
374196
374200
|
", v",
|
|
374197
|
-
"1.
|
|
374201
|
+
"1.50.1"
|
|
374198
374202
|
]
|
|
374199
374203
|
}, undefined, true, undefined, this)
|
|
374200
374204
|
]
|
|
@@ -374300,7 +374304,7 @@ ${sanitizedDescription}
|
|
|
374300
374304
|
` + `**Environment Info**
|
|
374301
374305
|
` + `- Platform: ${env2.platform}
|
|
374302
374306
|
` + `- Terminal: ${env2.terminal}
|
|
374303
|
-
` + `- Version: ${"1.
|
|
374307
|
+
` + `- Version: ${"1.50.1"}
|
|
374304
374308
|
` + `- Feedback ID: ${feedbackId}
|
|
374305
374309
|
` + `
|
|
374306
374310
|
**Errors**
|
|
@@ -377411,7 +377415,7 @@ function buildPrimarySection() {
|
|
|
377411
377415
|
}, undefined, false, undefined, this);
|
|
377412
377416
|
return [{
|
|
377413
377417
|
label: "Version",
|
|
377414
|
-
value: "1.
|
|
377418
|
+
value: "1.50.1"
|
|
377415
377419
|
}, {
|
|
377416
377420
|
label: "Session name",
|
|
377417
377421
|
value: nameValue
|
|
@@ -380741,7 +380745,7 @@ function Config({
|
|
|
380741
380745
|
}
|
|
380742
380746
|
}, undefined, false, undefined, this)
|
|
380743
380747
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
|
|
380744
|
-
currentVersion: "1.
|
|
380748
|
+
currentVersion: "1.50.1",
|
|
380745
380749
|
onChoice: (choice) => {
|
|
380746
380750
|
setShowSubmenu(null);
|
|
380747
380751
|
setTabsHidden(false);
|
|
@@ -380753,7 +380757,7 @@ function Config({
|
|
|
380753
380757
|
autoUpdatesChannel: "stable"
|
|
380754
380758
|
};
|
|
380755
380759
|
if (choice === "stay") {
|
|
380756
|
-
newSettings.minimumVersion = "1.
|
|
380760
|
+
newSettings.minimumVersion = "1.50.1";
|
|
380757
380761
|
}
|
|
380758
380762
|
updateSettingsForSource("userSettings", newSettings);
|
|
380759
380763
|
setSettingsData((prev_27) => ({
|
|
@@ -388823,7 +388827,7 @@ function HelpV2(t0) {
|
|
|
388823
388827
|
let t6;
|
|
388824
388828
|
if ($2[31] !== tabs) {
|
|
388825
388829
|
t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
|
|
388826
|
-
title: `UR v${"1.
|
|
388830
|
+
title: `UR v${"1.50.1"}`,
|
|
388827
388831
|
color: "professionalBlue",
|
|
388828
388832
|
defaultTab: "general",
|
|
388829
388833
|
children: tabs
|
|
@@ -389740,7 +389744,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
389740
389744
|
async function handleInitialize(options2) {
|
|
389741
389745
|
return {
|
|
389742
389746
|
name: "UR",
|
|
389743
|
-
version: "1.
|
|
389747
|
+
version: "1.50.1",
|
|
389744
389748
|
protocolVersion: "0.1.0",
|
|
389745
389749
|
workspaceRoot: options2.cwd,
|
|
389746
389750
|
capabilities: {
|
|
@@ -392463,6 +392467,49 @@ function stringArray2(value) {
|
|
|
392463
392467
|
function isAssociation(value) {
|
|
392464
392468
|
return TRUSTED_GITHUB_ASSOCIATIONS.includes(value);
|
|
392465
392469
|
}
|
|
392470
|
+
function isTriggerEvent(value) {
|
|
392471
|
+
return AGENTIC_CI_TRIGGER_EVENTS.includes(value);
|
|
392472
|
+
}
|
|
392473
|
+
function triggerKeywords(spec) {
|
|
392474
|
+
const config3 = spec.trigger?.issueComment;
|
|
392475
|
+
const keyword = config3?.keyword?.trim() || AGENTIC_CI_DEFAULT_KEYWORD;
|
|
392476
|
+
const aliases = config3?.aliases ?? [...AGENTIC_CI_DEFAULT_ALIASES];
|
|
392477
|
+
const unique = [];
|
|
392478
|
+
for (const candidate of [keyword, ...aliases]) {
|
|
392479
|
+
const trimmed = candidate?.trim();
|
|
392480
|
+
if (!trimmed)
|
|
392481
|
+
continue;
|
|
392482
|
+
if (!unique.some((item) => item.toLowerCase() === trimmed.toLowerCase())) {
|
|
392483
|
+
unique.push(trimmed);
|
|
392484
|
+
}
|
|
392485
|
+
}
|
|
392486
|
+
return unique.sort((a2, b) => b.length - a2.length);
|
|
392487
|
+
}
|
|
392488
|
+
function triggerEvents(spec) {
|
|
392489
|
+
const configured = spec.trigger?.issueComment?.events;
|
|
392490
|
+
return configured?.length ? configured.filter(isTriggerEvent) : [...AGENTIC_CI_TRIGGER_EVENTS];
|
|
392491
|
+
}
|
|
392492
|
+
function findTriggerMention(body, keywords) {
|
|
392493
|
+
const scannable = stripQuotedAndFenced(body);
|
|
392494
|
+
for (const keyword of keywords) {
|
|
392495
|
+
const pattern = new RegExp(`(^|[^\\w@/#-])${escapeRegExp3(keyword)}(?![\\w@/-])`, "i");
|
|
392496
|
+
const match = pattern.exec(scannable);
|
|
392497
|
+
if (!match)
|
|
392498
|
+
continue;
|
|
392499
|
+
const start = match.index + (match[1]?.length ?? 0) + keyword.length;
|
|
392500
|
+
return { keyword, prompt: scannable.slice(start).trim() };
|
|
392501
|
+
}
|
|
392502
|
+
return;
|
|
392503
|
+
}
|
|
392504
|
+
function escapeRegExp3(value) {
|
|
392505
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
392506
|
+
}
|
|
392507
|
+
function stripQuotedAndFenced(body) {
|
|
392508
|
+
const withoutFences = body.replace(/```[\s\S]*?```/g, " ").replace(/~~~[\s\S]*?~~~/g, " ").replace(/`[^`\n]*`/g, " ");
|
|
392509
|
+
return withoutFences.split(`
|
|
392510
|
+
`).filter((line) => !/^\s*>/.test(line)).join(`
|
|
392511
|
+
`);
|
|
392512
|
+
}
|
|
392466
392513
|
function validateAgenticCiSpec(spec) {
|
|
392467
392514
|
const errors4 = [];
|
|
392468
392515
|
const warnings = [];
|
|
@@ -392484,11 +392531,26 @@ function validateAgenticCiSpec(spec) {
|
|
|
392484
392531
|
errors4.push("runner.timeoutMinutes must be an integer between 1 and 120");
|
|
392485
392532
|
}
|
|
392486
392533
|
const issue2 = spec.trigger?.issueComment;
|
|
392487
|
-
if (issue2?.keyword !== undefined) {
|
|
392488
|
-
|
|
392489
|
-
|
|
392534
|
+
if (issue2?.keyword !== undefined && !KEYWORD_RE.test(issue2.keyword)) {
|
|
392535
|
+
errors4.push("trigger.issueComment.keyword is invalid");
|
|
392536
|
+
}
|
|
392537
|
+
for (const alias of issue2?.aliases ?? []) {
|
|
392538
|
+
if (!KEYWORD_RE.test(alias)) {
|
|
392539
|
+
errors4.push(`trigger.issueComment.aliases contains "${alias}"`);
|
|
392540
|
+
}
|
|
392541
|
+
}
|
|
392542
|
+
for (const event of issue2?.events ?? []) {
|
|
392543
|
+
if (!isTriggerEvent(event)) {
|
|
392544
|
+
errors4.push(`trigger.issueComment.events contains "${event}"`);
|
|
392490
392545
|
}
|
|
392491
392546
|
}
|
|
392547
|
+
const publishMode = spec.publish?.mode;
|
|
392548
|
+
if (publishMode !== undefined && !AGENTIC_CI_PUBLISH_MODES.includes(publishMode)) {
|
|
392549
|
+
errors4.push(`publish.mode must be one of ${AGENTIC_CI_PUBLISH_MODES.join(", ")}`);
|
|
392550
|
+
}
|
|
392551
|
+
if (publishMode === "pull-request") {
|
|
392552
|
+
warnings.push('publish.mode "pull-request" grants the publisher job contents:write');
|
|
392553
|
+
}
|
|
392492
392554
|
for (const association of issue2?.allowedAssociations ?? []) {
|
|
392493
392555
|
if (!isAssociation(association)) {
|
|
392494
392556
|
errors4.push(`trigger.issueComment.allowedAssociations contains "${association}"`);
|
|
@@ -392549,6 +392611,7 @@ function parseAgenticCiSpec(text) {
|
|
|
392549
392611
|
const workspace = value.workspace ?? {};
|
|
392550
392612
|
const verification = value.verification ?? {};
|
|
392551
392613
|
const outputs = value.outputs ?? {};
|
|
392614
|
+
const publish = value.publish ?? {};
|
|
392552
392615
|
const commands = Array.isArray(verification.commands) ? verification.commands.map((item) => {
|
|
392553
392616
|
const command5 = item && typeof item === "object" ? item : {};
|
|
392554
392617
|
return {
|
|
@@ -392566,7 +392629,9 @@ function parseAgenticCiSpec(text) {
|
|
|
392566
392629
|
manual: trigger.manual === true,
|
|
392567
392630
|
issueComment: issue2 ? {
|
|
392568
392631
|
keyword: typeof issue2.keyword === "string" ? issue2.keyword : undefined,
|
|
392569
|
-
|
|
392632
|
+
aliases: Array.isArray(issue2.aliases) ? stringArray2(issue2.aliases) : undefined,
|
|
392633
|
+
allowedAssociations: stringArray2(issue2.allowedAssociations),
|
|
392634
|
+
events: Array.isArray(issue2.events) ? stringArray2(issue2.events) : undefined
|
|
392570
392635
|
} : undefined
|
|
392571
392636
|
},
|
|
392572
392637
|
runner: {
|
|
@@ -392587,7 +392652,9 @@ function parseAgenticCiSpec(text) {
|
|
|
392587
392652
|
maxSummaryChars: typeof outputs.maxSummaryChars === "number" ? outputs.maxSummaryChars : undefined,
|
|
392588
392653
|
maxPatchBytes: typeof outputs.maxPatchBytes === "number" ? outputs.maxPatchBytes : undefined
|
|
392589
392654
|
},
|
|
392590
|
-
publish: {
|
|
392655
|
+
publish: {
|
|
392656
|
+
mode: typeof publish.mode === "string" ? publish.mode : "comment"
|
|
392657
|
+
}
|
|
392591
392658
|
};
|
|
392592
392659
|
const validation = validateAgenticCiSpec(spec);
|
|
392593
392660
|
if (!validation.valid) {
|
|
@@ -392618,89 +392685,179 @@ function decideAgenticCiEvent(spec, payload, explicitEventName) {
|
|
|
392618
392685
|
reason: "manual trigger is disabled"
|
|
392619
392686
|
};
|
|
392620
392687
|
}
|
|
392621
|
-
const
|
|
392688
|
+
const prompt2 = boundedPrompt(asRecord(root2.inputs).prompt) ?? boundedPrompt(asRecord(root2.workflow_dispatch).prompt);
|
|
392622
392689
|
return {
|
|
392623
392690
|
accepted: true,
|
|
392624
392691
|
source: "manual",
|
|
392625
392692
|
reason: "trusted manual dispatch",
|
|
392626
|
-
prompt
|
|
392693
|
+
prompt: prompt2
|
|
392627
392694
|
};
|
|
392628
392695
|
}
|
|
392629
|
-
|
|
392630
|
-
|
|
392631
|
-
if (!config3) {
|
|
392632
|
-
return {
|
|
392633
|
-
accepted: false,
|
|
392634
|
-
source: "issue_comment",
|
|
392635
|
-
reason: "issue-comment trigger is disabled"
|
|
392636
|
-
};
|
|
392637
|
-
}
|
|
392638
|
-
if (typeof root2.action === "string" && root2.action !== "created") {
|
|
392639
|
-
return {
|
|
392640
|
-
accepted: false,
|
|
392641
|
-
source: "issue_comment",
|
|
392642
|
-
reason: `unsupported issue_comment action "${root2.action}"`
|
|
392643
|
-
};
|
|
392644
|
-
}
|
|
392645
|
-
const comment = asRecord(root2.comment);
|
|
392646
|
-
const actor = typeof asRecord(comment.user).login === "string" ? String(asRecord(comment.user).login) : undefined;
|
|
392647
|
-
const association = typeof comment.author_association === "string" ? comment.author_association.toUpperCase() : "";
|
|
392648
|
-
const allowed = config3.allowedAssociations?.length ? config3.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
392649
|
-
if (!allowed.includes(association)) {
|
|
392650
|
-
return {
|
|
392651
|
-
accepted: false,
|
|
392652
|
-
source: "issue_comment",
|
|
392653
|
-
reason: `actor association "${association || "NONE"}" is not allowed`,
|
|
392654
|
-
actor,
|
|
392655
|
-
association
|
|
392656
|
-
};
|
|
392657
|
-
}
|
|
392658
|
-
const body = boundedPrompt(comment.body);
|
|
392659
|
-
const keyword = config3.keyword?.trim() || "/ur";
|
|
392660
|
-
if (!body) {
|
|
392661
|
-
return {
|
|
392662
|
-
accepted: false,
|
|
392663
|
-
source: "issue_comment",
|
|
392664
|
-
reason: "comment body is empty or too large",
|
|
392665
|
-
actor,
|
|
392666
|
-
association
|
|
392667
|
-
};
|
|
392668
|
-
}
|
|
392669
|
-
const index2 = body.toLowerCase().indexOf(keyword.toLowerCase());
|
|
392670
|
-
if (index2 < 0) {
|
|
392671
|
-
return {
|
|
392672
|
-
accepted: false,
|
|
392673
|
-
source: "issue_comment",
|
|
392674
|
-
reason: `comment does not contain "${keyword}"`,
|
|
392675
|
-
actor,
|
|
392676
|
-
association
|
|
392677
|
-
};
|
|
392678
|
-
}
|
|
392679
|
-
const prompt = boundedPrompt(body.slice(index2 + keyword.length));
|
|
392680
|
-
if (!prompt) {
|
|
392681
|
-
return {
|
|
392682
|
-
accepted: false,
|
|
392683
|
-
source: "issue_comment",
|
|
392684
|
-
reason: "trigger contains no bounded task text",
|
|
392685
|
-
actor,
|
|
392686
|
-
association
|
|
392687
|
-
};
|
|
392688
|
-
}
|
|
392696
|
+
const mention = normalizeMentionEvent(root2, eventName);
|
|
392697
|
+
if (!mention) {
|
|
392689
392698
|
return {
|
|
392690
|
-
accepted:
|
|
392691
|
-
source: "
|
|
392692
|
-
reason: "
|
|
392699
|
+
accepted: false,
|
|
392700
|
+
source: "none",
|
|
392701
|
+
reason: "event type is not enabled"
|
|
392702
|
+
};
|
|
392703
|
+
}
|
|
392704
|
+
const { source } = mention;
|
|
392705
|
+
const config3 = spec.trigger?.issueComment;
|
|
392706
|
+
if (!config3) {
|
|
392707
|
+
return { accepted: false, source, reason: "mention trigger is disabled" };
|
|
392708
|
+
}
|
|
392709
|
+
if (!triggerEvents(spec).includes(source)) {
|
|
392710
|
+
return {
|
|
392711
|
+
accepted: false,
|
|
392712
|
+
source,
|
|
392713
|
+
reason: `event "${source}" is not enabled for this spec`
|
|
392714
|
+
};
|
|
392715
|
+
}
|
|
392716
|
+
if (mention.action && !mention.acceptedActions.includes(mention.action)) {
|
|
392717
|
+
return {
|
|
392718
|
+
accepted: false,
|
|
392719
|
+
source,
|
|
392720
|
+
reason: `unsupported ${source} action "${mention.action}"`
|
|
392721
|
+
};
|
|
392722
|
+
}
|
|
392723
|
+
const { actor, association, issueNumber, commentId, isPullRequest } = mention;
|
|
392724
|
+
const allowed = config3.allowedAssociations?.length ? config3.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
392725
|
+
if (!allowed.includes(association)) {
|
|
392726
|
+
return {
|
|
392727
|
+
accepted: false,
|
|
392728
|
+
source,
|
|
392729
|
+
reason: `actor association "${association || "NONE"}" is not allowed`,
|
|
392693
392730
|
actor,
|
|
392694
392731
|
association,
|
|
392695
|
-
|
|
392732
|
+
issueNumber,
|
|
392733
|
+
commentId,
|
|
392734
|
+
isPullRequest
|
|
392735
|
+
};
|
|
392736
|
+
}
|
|
392737
|
+
const body = boundedPrompt(mention.body);
|
|
392738
|
+
if (!body) {
|
|
392739
|
+
return {
|
|
392740
|
+
accepted: false,
|
|
392741
|
+
source,
|
|
392742
|
+
reason: "comment body is empty or too large",
|
|
392743
|
+
actor,
|
|
392744
|
+
association,
|
|
392745
|
+
issueNumber,
|
|
392746
|
+
commentId,
|
|
392747
|
+
isPullRequest
|
|
392748
|
+
};
|
|
392749
|
+
}
|
|
392750
|
+
const keywords = triggerKeywords(spec);
|
|
392751
|
+
const match = findTriggerMention(body, keywords);
|
|
392752
|
+
if (!match) {
|
|
392753
|
+
return {
|
|
392754
|
+
accepted: false,
|
|
392755
|
+
source,
|
|
392756
|
+
reason: `comment does not mention ${keywords.map((k2) => `"${k2}"`).join(" or ")}`,
|
|
392757
|
+
actor,
|
|
392758
|
+
association,
|
|
392759
|
+
issueNumber,
|
|
392760
|
+
commentId,
|
|
392761
|
+
isPullRequest
|
|
392762
|
+
};
|
|
392763
|
+
}
|
|
392764
|
+
const prompt = boundedPrompt(match.prompt);
|
|
392765
|
+
if (!prompt) {
|
|
392766
|
+
return {
|
|
392767
|
+
accepted: false,
|
|
392768
|
+
source,
|
|
392769
|
+
reason: "trigger contains no bounded task text",
|
|
392770
|
+
actor,
|
|
392771
|
+
association,
|
|
392772
|
+
issueNumber,
|
|
392773
|
+
commentId,
|
|
392774
|
+
isPullRequest
|
|
392696
392775
|
};
|
|
392697
392776
|
}
|
|
392698
392777
|
return {
|
|
392699
|
-
accepted:
|
|
392700
|
-
source
|
|
392701
|
-
reason:
|
|
392778
|
+
accepted: true,
|
|
392779
|
+
source,
|
|
392780
|
+
reason: `trusted actor mentioned "${match.keyword}"`,
|
|
392781
|
+
actor,
|
|
392782
|
+
association,
|
|
392783
|
+
prompt,
|
|
392784
|
+
issueNumber,
|
|
392785
|
+
commentId,
|
|
392786
|
+
isPullRequest
|
|
392702
392787
|
};
|
|
392703
392788
|
}
|
|
392789
|
+
function login(value) {
|
|
392790
|
+
const candidate = asRecord(value).login;
|
|
392791
|
+
return typeof candidate === "string" ? candidate : undefined;
|
|
392792
|
+
}
|
|
392793
|
+
function association(value) {
|
|
392794
|
+
const candidate = asRecord(value).author_association;
|
|
392795
|
+
return typeof candidate === "string" ? candidate.toUpperCase() : "";
|
|
392796
|
+
}
|
|
392797
|
+
function numeric(value) {
|
|
392798
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
392799
|
+
}
|
|
392800
|
+
function normalizeMentionEvent(root2, eventName) {
|
|
392801
|
+
const action3 = typeof root2.action === "string" ? root2.action : undefined;
|
|
392802
|
+
const issue2 = asRecord(root2.issue);
|
|
392803
|
+
const pull = asRecord(root2.pull_request);
|
|
392804
|
+
const comment = asRecord(root2.comment);
|
|
392805
|
+
const review = asRecord(root2.review);
|
|
392806
|
+
if (eventName === "pull_request_review_comment") {
|
|
392807
|
+
return {
|
|
392808
|
+
source: "pull_request_review_comment",
|
|
392809
|
+
acceptedActions: ["created"],
|
|
392810
|
+
action: action3,
|
|
392811
|
+
body: comment.body,
|
|
392812
|
+
actor: login(comment.user),
|
|
392813
|
+
association: association(comment),
|
|
392814
|
+
issueNumber: numeric(pull.number),
|
|
392815
|
+
commentId: numeric(comment.id),
|
|
392816
|
+
isPullRequest: true
|
|
392817
|
+
};
|
|
392818
|
+
}
|
|
392819
|
+
if (eventName === "pull_request_review") {
|
|
392820
|
+
return {
|
|
392821
|
+
source: "pull_request_review",
|
|
392822
|
+
acceptedActions: ["submitted", "edited"],
|
|
392823
|
+
action: action3,
|
|
392824
|
+
body: review.body,
|
|
392825
|
+
actor: login(review.user),
|
|
392826
|
+
association: association(review),
|
|
392827
|
+
issueNumber: numeric(pull.number),
|
|
392828
|
+
commentId: numeric(review.id),
|
|
392829
|
+
isPullRequest: true
|
|
392830
|
+
};
|
|
392831
|
+
}
|
|
392832
|
+
if (eventName === "issues") {
|
|
392833
|
+
return {
|
|
392834
|
+
source: "issues",
|
|
392835
|
+
acceptedActions: ["opened", "edited", "assigned", "labeled"],
|
|
392836
|
+
action: action3,
|
|
392837
|
+
body: [issue2.title, issue2.body].filter((part) => typeof part === "string").join(`
|
|
392838
|
+
|
|
392839
|
+
`),
|
|
392840
|
+
actor: login(issue2.user),
|
|
392841
|
+
association: association(issue2),
|
|
392842
|
+
issueNumber: numeric(issue2.number),
|
|
392843
|
+
isPullRequest: false
|
|
392844
|
+
};
|
|
392845
|
+
}
|
|
392846
|
+
if (eventName === "issue_comment" || root2.comment !== undefined) {
|
|
392847
|
+
return {
|
|
392848
|
+
source: "issue_comment",
|
|
392849
|
+
acceptedActions: ["created"],
|
|
392850
|
+
action: action3,
|
|
392851
|
+
body: comment.body,
|
|
392852
|
+
actor: login(comment.user),
|
|
392853
|
+
association: association(comment),
|
|
392854
|
+
issueNumber: numeric(issue2.number),
|
|
392855
|
+
commentId: numeric(comment.id),
|
|
392856
|
+
isPullRequest: issue2.pull_request !== undefined
|
|
392857
|
+
};
|
|
392858
|
+
}
|
|
392859
|
+
return;
|
|
392860
|
+
}
|
|
392704
392861
|
function loadAgenticCiEventFile(path17) {
|
|
392705
392862
|
const bytes = readFileSync33(path17);
|
|
392706
392863
|
if (bytes.byteLength > AGENTIC_CI_MAX_EVENT_BYTES) {
|
|
@@ -392945,6 +393102,7 @@ async function runAgenticCi(options2) {
|
|
|
392945
393102
|
const runId = `${Date.now().toString(36)}-${randomUUID44().slice(0, 8)}`;
|
|
392946
393103
|
const manifestPath5 = manifestPathFor(outputRoot, runId);
|
|
392947
393104
|
const eventDecision = options2.event !== undefined ? decideAgenticCiEvent(options2.spec, options2.event, options2.eventName) : undefined;
|
|
393105
|
+
const publishContract = buildPublishContract(options2.spec, eventDecision);
|
|
392948
393106
|
if (eventDecision && !eventDecision.accepted) {
|
|
392949
393107
|
const blocked = {
|
|
392950
393108
|
version: 1,
|
|
@@ -392954,7 +393112,8 @@ async function runAgenticCi(options2) {
|
|
|
392954
393112
|
summary: eventDecision.reason,
|
|
392955
393113
|
checks: [],
|
|
392956
393114
|
violations: [eventDecision.reason],
|
|
392957
|
-
manifestPath: manifestPath5
|
|
393115
|
+
manifestPath: manifestPath5,
|
|
393116
|
+
publish: publishContract
|
|
392958
393117
|
};
|
|
392959
393118
|
writeAgenticCiResult(blocked);
|
|
392960
393119
|
return blocked;
|
|
@@ -392976,7 +393135,8 @@ async function runAgenticCi(options2) {
|
|
|
392976
393135
|
summary: "Dry run: validated spec and event; no worktree or model was started.",
|
|
392977
393136
|
checks: [],
|
|
392978
393137
|
violations: [],
|
|
392979
|
-
manifestPath: manifestPath5
|
|
393138
|
+
manifestPath: manifestPath5,
|
|
393139
|
+
publish: publishContract
|
|
392980
393140
|
};
|
|
392981
393141
|
writeAgenticCiResult(dry);
|
|
392982
393142
|
rmSync9(verificationHome, { recursive: true, force: true });
|
|
@@ -393144,11 +393304,25 @@ async function runAgenticCi(options2) {
|
|
|
393144
393304
|
patch,
|
|
393145
393305
|
checks: checks4,
|
|
393146
393306
|
violations,
|
|
393147
|
-
manifestPath: manifestPath5
|
|
393307
|
+
manifestPath: manifestPath5,
|
|
393308
|
+
publish: publishContract
|
|
393148
393309
|
};
|
|
393149
393310
|
writeAgenticCiResult(result);
|
|
393150
393311
|
return result;
|
|
393151
393312
|
}
|
|
393313
|
+
function buildPublishContract(spec, decision) {
|
|
393314
|
+
const mode = spec.publish?.mode ?? "comment";
|
|
393315
|
+
if (mode === "artifact")
|
|
393316
|
+
return;
|
|
393317
|
+
return {
|
|
393318
|
+
mode,
|
|
393319
|
+
source: decision?.source ?? "manual",
|
|
393320
|
+
actor: decision?.actor,
|
|
393321
|
+
issueNumber: decision?.issueNumber,
|
|
393322
|
+
commentId: decision?.commentId,
|
|
393323
|
+
isPullRequest: decision?.isPullRequest ?? false
|
|
393324
|
+
};
|
|
393325
|
+
}
|
|
393152
393326
|
function defaultAgenticCiSpec(name = "default") {
|
|
393153
393327
|
return {
|
|
393154
393328
|
version: 1,
|
|
@@ -393157,8 +393331,10 @@ function defaultAgenticCiSpec(name = "default") {
|
|
|
393157
393331
|
trigger: {
|
|
393158
393332
|
manual: true,
|
|
393159
393333
|
issueComment: {
|
|
393160
|
-
keyword:
|
|
393161
|
-
|
|
393334
|
+
keyword: AGENTIC_CI_DEFAULT_KEYWORD,
|
|
393335
|
+
aliases: [...AGENTIC_CI_DEFAULT_ALIASES],
|
|
393336
|
+
allowedAssociations: [...TRUSTED_GITHUB_ASSOCIATIONS],
|
|
393337
|
+
events: [...AGENTIC_CI_TRIGGER_EVENTS]
|
|
393162
393338
|
}
|
|
393163
393339
|
},
|
|
393164
393340
|
runner: { maxTurns: 20, timeoutMinutes: 30 },
|
|
@@ -393182,7 +393358,7 @@ function defaultAgenticCiSpec(name = "default") {
|
|
|
393182
393358
|
maxSummaryChars: AGENTIC_CI_MAX_SUMMARY_CHARS,
|
|
393183
393359
|
maxPatchBytes: AGENTIC_CI_MAX_PATCH_BYTES
|
|
393184
393360
|
},
|
|
393185
|
-
publish: { mode: "
|
|
393361
|
+
publish: { mode: "comment" }
|
|
393186
393362
|
};
|
|
393187
393363
|
}
|
|
393188
393364
|
function agenticCiDir(cwd2) {
|
|
@@ -393220,56 +393396,127 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
393220
393396
|
if (spec.name !== specName) {
|
|
393221
393397
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
393222
393398
|
}
|
|
393223
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.
|
|
393399
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.50.1" : "1.50.1");
|
|
393224
393400
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
393225
393401
|
throw new Error("invalid ur-agent package version");
|
|
393226
393402
|
}
|
|
393403
|
+
const issue2 = spec.trigger?.issueComment;
|
|
393404
|
+
const keywords = triggerKeywords(spec);
|
|
393405
|
+
const events2 = triggerEvents(spec);
|
|
393406
|
+
const publishMode = spec.publish?.mode ?? "comment";
|
|
393407
|
+
const publishes = publishMode !== "artifact";
|
|
393408
|
+
const associations = issue2?.allowedAssociations?.length ? issue2.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
393409
|
+
const trustedActors = `contains(fromJSON('${JSON.stringify(associations)}'), `;
|
|
393410
|
+
const quoted = (value) => `'${value.replaceAll("'", "''")}'`;
|
|
393411
|
+
const mentions = (expression) => keywords.map((word) => `contains(${expression}, ${quoted(word)})`).join(" || ");
|
|
393412
|
+
const gate = (eventName, bodyExpressions, associationExpression) => [
|
|
393413
|
+
"(",
|
|
393414
|
+
` github.event_name == '${eventName}' &&`,
|
|
393415
|
+
` (${bodyExpressions.map(mentions).join(" || ")}) &&`,
|
|
393416
|
+
` ${trustedActors}${associationExpression})`,
|
|
393417
|
+
")"
|
|
393418
|
+
].join(`
|
|
393419
|
+
`);
|
|
393420
|
+
const foldExpression = (text, indent = " ") => text.split(`
|
|
393421
|
+
`).map((line, index2) => index2 === 0 ? line : `${indent}${line}`).join(`
|
|
393422
|
+
`);
|
|
393227
393423
|
const conditions = [];
|
|
393424
|
+
const onBlocks = [];
|
|
393228
393425
|
if (spec.trigger?.manual) {
|
|
393229
393426
|
conditions.push("github.event_name == 'workflow_dispatch'");
|
|
393230
|
-
|
|
393231
|
-
|
|
393232
|
-
|
|
393233
|
-
|
|
393234
|
-
|
|
393235
|
-
|
|
393236
|
-
"
|
|
393237
|
-
" github.event_name == 'issue_comment' &&",
|
|
393238
|
-
` contains(github.event.comment.body, '${keyword}') &&`,
|
|
393239
|
-
` contains(fromJSON('${JSON.stringify(associations)}'), github.event.comment.author_association)`,
|
|
393240
|
-
")"
|
|
393427
|
+
onBlocks.push([
|
|
393428
|
+
" workflow_dispatch:",
|
|
393429
|
+
" inputs:",
|
|
393430
|
+
" prompt:",
|
|
393431
|
+
" description: Bounded task for the isolated agent",
|
|
393432
|
+
" required: false",
|
|
393433
|
+
" type: string"
|
|
393241
393434
|
].join(`
|
|
393242
393435
|
`));
|
|
393243
393436
|
}
|
|
393244
|
-
|
|
393245
|
-
|
|
393246
|
-
|
|
393247
|
-
|
|
393248
|
-
|
|
393249
|
-
|
|
393250
|
-
|
|
393251
|
-
|
|
393252
|
-
|
|
393253
|
-
|
|
393254
|
-
|
|
393255
|
-
|
|
393256
|
-
|
|
393257
|
-
|
|
393258
|
-
|
|
393259
|
-
|
|
393260
|
-
|
|
393261
|
-
|
|
393262
|
-
|
|
393263
|
-
|
|
393264
|
-
|
|
393265
|
-
|
|
393266
|
-
|
|
393267
|
-
|
|
393268
|
-
|
|
393437
|
+
if (issue2) {
|
|
393438
|
+
if (events2.includes("issue_comment")) {
|
|
393439
|
+
onBlocks.push(` issue_comment:
|
|
393440
|
+
types: [created]`);
|
|
393441
|
+
conditions.push(gate("issue_comment", ["github.event.comment.body"], "github.event.comment.author_association"));
|
|
393442
|
+
}
|
|
393443
|
+
if (events2.includes("pull_request_review_comment")) {
|
|
393444
|
+
onBlocks.push(` pull_request_review_comment:
|
|
393445
|
+
types: [created]`);
|
|
393446
|
+
conditions.push(gate("pull_request_review_comment", ["github.event.comment.body"], "github.event.comment.author_association"));
|
|
393447
|
+
}
|
|
393448
|
+
if (events2.includes("pull_request_review")) {
|
|
393449
|
+
onBlocks.push(` pull_request_review:
|
|
393450
|
+
types: [submitted]`);
|
|
393451
|
+
conditions.push(gate("pull_request_review", ["github.event.review.body"], "github.event.review.author_association"));
|
|
393452
|
+
}
|
|
393453
|
+
if (events2.includes("issues")) {
|
|
393454
|
+
onBlocks.push(` issues:
|
|
393455
|
+
types: [opened, assigned]`);
|
|
393456
|
+
conditions.push(gate("issues", ["github.event.issue.body", "github.event.issue.title"], "github.event.issue.author_association"));
|
|
393457
|
+
}
|
|
393458
|
+
}
|
|
393459
|
+
const jobCondition = conditions.length > 0 ? foldExpression(conditions.join(` ||
|
|
393460
|
+
`)) : "false";
|
|
393461
|
+
const artifactName = "ur-agentic-ci-${{ github.run_id }}-${{ github.run_attempt }}";
|
|
393462
|
+
const runUrl = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}";
|
|
393463
|
+
const acknowledgeJob = ` acknowledge:
|
|
393269
393464
|
if: >-
|
|
393270
393465
|
${jobCondition}
|
|
393271
393466
|
runs-on: ubuntu-latest
|
|
393272
|
-
timeout-minutes:
|
|
393467
|
+
timeout-minutes: 5
|
|
393468
|
+
permissions:
|
|
393469
|
+
issues: write
|
|
393470
|
+
pull-requests: write
|
|
393471
|
+
outputs:
|
|
393472
|
+
issue-number: \${{ steps.track.outputs.issue-number }}
|
|
393473
|
+
comment-id: \${{ steps.track.outputs.comment-id }}
|
|
393474
|
+
steps:
|
|
393475
|
+
- name: React and open a tracking comment
|
|
393476
|
+
id: track
|
|
393477
|
+
env:
|
|
393478
|
+
GH_TOKEN: \${{ github.token }}
|
|
393479
|
+
GH_REPO: \${{ github.repository }}
|
|
393480
|
+
RUN_URL: ${runUrl}
|
|
393481
|
+
run: |
|
|
393482
|
+
set -euo pipefail
|
|
393483
|
+
number="$(jq -r '.issue.number // .pull_request.number // empty' "$GITHUB_EVENT_PATH")"
|
|
393484
|
+
comment="$(jq -r '.comment.id // empty' "$GITHUB_EVENT_PATH")"
|
|
393485
|
+
printf 'issue-number=%s\\n' "$number" >> "$GITHUB_OUTPUT"
|
|
393486
|
+
if [ -z "$number" ]; then
|
|
393487
|
+
printf 'comment-id=\\n' >> "$GITHUB_OUTPUT"
|
|
393488
|
+
exit 0
|
|
393489
|
+
fi
|
|
393490
|
+
case "$GITHUB_EVENT_NAME" in
|
|
393491
|
+
issue_comment)
|
|
393492
|
+
[ -z "$comment" ] || gh api --silent --method POST \\
|
|
393493
|
+
"repos/$GH_REPO/issues/comments/$comment/reactions" \\
|
|
393494
|
+
-f content=eyes || true ;;
|
|
393495
|
+
pull_request_review_comment)
|
|
393496
|
+
[ -z "$comment" ] || gh api --silent --method POST \\
|
|
393497
|
+
"repos/$GH_REPO/pulls/comments/$comment/reactions" \\
|
|
393498
|
+
-f content=eyes || true ;;
|
|
393499
|
+
issues)
|
|
393500
|
+
gh api --silent --method POST \\
|
|
393501
|
+
"repos/$GH_REPO/issues/$number/reactions" \\
|
|
393502
|
+
-f content=eyes || true ;;
|
|
393503
|
+
esac
|
|
393504
|
+
body="UR is working on this. [Follow the run]($RUN_URL)."
|
|
393505
|
+
id="$(jq -n --arg body "$body" '{body: $body}' \\
|
|
393506
|
+
| gh api "repos/$GH_REPO/issues/$number/comments" --input - --jq '.id')"
|
|
393507
|
+
printf 'comment-id=%s\\n' "$id" >> "$GITHUB_OUTPUT"
|
|
393508
|
+
|
|
393509
|
+
`;
|
|
393510
|
+
const agentJob = ` agent:
|
|
393511
|
+
${publishes ? ` needs: acknowledge
|
|
393512
|
+
` : ""} if: >-
|
|
393513
|
+
${jobCondition}
|
|
393514
|
+
runs-on: ubuntu-latest
|
|
393515
|
+
timeout-minutes: ${spec.runner?.timeoutMinutes ?? 30}
|
|
393516
|
+
permissions:
|
|
393517
|
+
contents: read
|
|
393518
|
+
issues: read
|
|
393519
|
+
pull-requests: read
|
|
393273
393520
|
steps:
|
|
393274
393521
|
- name: Checkout trusted base
|
|
393275
393522
|
uses: actions/checkout@${CHECKOUT_SHA} # v7.0.0
|
|
@@ -393299,13 +393546,139 @@ jobs:
|
|
|
393299
393546
|
if: always()
|
|
393300
393547
|
uses: actions/upload-artifact@${UPLOAD_ARTIFACT_SHA} # v4.6.2
|
|
393301
393548
|
with:
|
|
393302
|
-
name:
|
|
393549
|
+
name: ${artifactName}
|
|
393303
393550
|
path: \${{ runner.temp }}/ur-agentic-ci
|
|
393304
393551
|
if-no-files-found: error
|
|
393305
393552
|
retention-days: 7
|
|
393306
393553
|
`;
|
|
393554
|
+
const pullRequestSteps = ` - name: Checkout for patch application
|
|
393555
|
+
uses: actions/checkout@${CHECKOUT_SHA} # v7.0.0
|
|
393556
|
+
with:
|
|
393557
|
+
fetch-depth: 0
|
|
393558
|
+
- name: Open a pull request from the verified patch
|
|
393559
|
+
id: pr
|
|
393560
|
+
env:
|
|
393561
|
+
GH_TOKEN: \${{ github.token }}
|
|
393562
|
+
BASE_BRANCH: \${{ github.event.repository.default_branch }}
|
|
393563
|
+
RUN_URL: ${runUrl}
|
|
393564
|
+
run: |
|
|
393565
|
+
set -euo pipefail
|
|
393566
|
+
manifest="$(find "$RUNNER_TEMP/ur-agentic-ci-out" -name manifest.json -print -quit 2>/dev/null || true)"
|
|
393567
|
+
if [ -z "$manifest" ]; then exit 0; fi
|
|
393568
|
+
if [ "$(jq -r '.status' "$manifest")" != "passed" ]; then exit 0; fi
|
|
393569
|
+
relative="$(jq -r '.patch.path // empty' "$manifest")"
|
|
393570
|
+
if [ -z "$relative" ]; then exit 0; fi
|
|
393571
|
+
patch="$(dirname "$manifest")/$relative"
|
|
393572
|
+
run_id="$(jq -r '.runId' "$manifest")"
|
|
393573
|
+
branch="ur/agentic-ci-$run_id"
|
|
393574
|
+
git config user.name 'ur-agent[bot]'
|
|
393575
|
+
git config user.email 'ur-agent[bot]@users.noreply.github.com'
|
|
393576
|
+
git checkout -b "$branch" "$(jq -r '.baseSha' "$manifest")"
|
|
393577
|
+
git apply --index --whitespace=nowarn "$patch"
|
|
393578
|
+
git commit -m "UR: apply verified Agentic CI patch ($run_id)"
|
|
393579
|
+
git push origin "HEAD:$branch"
|
|
393580
|
+
jq -r '.summary' "$manifest" > "$RUNNER_TEMP/ur-pr-body.md"
|
|
393581
|
+
printf '\\nPatch sha256: \`%s\`\\n\\n[Run](%s)\\n' \\
|
|
393582
|
+
"$(jq -r '.patch.sha256' "$manifest")" "$RUN_URL" \\
|
|
393583
|
+
>> "$RUNNER_TEMP/ur-pr-body.md"
|
|
393584
|
+
url="$(gh pr create --base "$BASE_BRANCH" --head "$branch" \\
|
|
393585
|
+
--title "UR: verified patch from run $run_id" \\
|
|
393586
|
+
--body-file "$RUNNER_TEMP/ur-pr-body.md")"
|
|
393587
|
+
printf 'url=%s\\n' "$url" >> "$GITHUB_OUTPUT"
|
|
393588
|
+
`;
|
|
393589
|
+
const publishJob = ` publish:
|
|
393590
|
+
needs: [acknowledge, agent]
|
|
393591
|
+
if: always() && needs.acknowledge.outputs.comment-id != ''
|
|
393592
|
+
runs-on: ubuntu-latest
|
|
393593
|
+
timeout-minutes: 10
|
|
393594
|
+
permissions:
|
|
393595
|
+
contents: ${publishMode === "pull-request" ? "write" : "read"}
|
|
393596
|
+
issues: write
|
|
393597
|
+
pull-requests: write
|
|
393598
|
+
steps:
|
|
393599
|
+
- name: Download agent outputs
|
|
393600
|
+
env:
|
|
393601
|
+
GH_TOKEN: \${{ github.token }}
|
|
393602
|
+
run: |
|
|
393603
|
+
set -euo pipefail
|
|
393604
|
+
mkdir -p "$RUNNER_TEMP/ur-agentic-ci-out"
|
|
393605
|
+
gh run download "$GITHUB_RUN_ID" \\
|
|
393606
|
+
--name "${artifactName}" \\
|
|
393607
|
+
--dir "$RUNNER_TEMP/ur-agentic-ci-out" || true
|
|
393608
|
+
${publishMode === "pull-request" ? pullRequestSteps : ""} - name: Report the result in the thread
|
|
393609
|
+
if: always()
|
|
393610
|
+
env:
|
|
393611
|
+
GH_TOKEN: \${{ github.token }}
|
|
393612
|
+
GH_REPO: \${{ github.repository }}
|
|
393613
|
+
COMMENT_ID: \${{ needs.acknowledge.outputs.comment-id }}
|
|
393614
|
+
AGENT_RESULT: \${{ needs.agent.result }}
|
|
393615
|
+
PR_URL: ${publishMode === "pull-request" ? "${{ steps.pr.outputs.url }}" : ""}
|
|
393616
|
+
RUN_URL: ${runUrl}
|
|
393617
|
+
run: |
|
|
393618
|
+
set -euo pipefail
|
|
393619
|
+
manifest="$(find "$RUNNER_TEMP/ur-agentic-ci-out" -name manifest.json -print -quit 2>/dev/null || true)"
|
|
393620
|
+
out="$RUNNER_TEMP/ur-comment.md"
|
|
393621
|
+
if [ -z "$manifest" ]; then
|
|
393622
|
+
{
|
|
393623
|
+
printf '### UR\\n\\n'
|
|
393624
|
+
printf 'The agent job finished as \`%s\` without producing a manifest.\\n\\n' "$AGENT_RESULT"
|
|
393625
|
+
printf '[Inspect the run](%s)\\n' "$RUN_URL"
|
|
393626
|
+
} > "$out"
|
|
393627
|
+
else
|
|
393628
|
+
status="$(jq -r '.status' "$manifest")"
|
|
393629
|
+
case "$status" in
|
|
393630
|
+
passed) icon='PASSED' ;;
|
|
393631
|
+
failed) icon='FAILED' ;;
|
|
393632
|
+
blocked) icon='BLOCKED' ;;
|
|
393633
|
+
*) icon="$status" ;;
|
|
393634
|
+
esac
|
|
393635
|
+
{
|
|
393636
|
+
printf '### UR \u2014 %s\\n\\n' "$icon"
|
|
393637
|
+
jq -r '.summary' "$manifest"
|
|
393638
|
+
printf '\\n'
|
|
393639
|
+
if [ "$(jq -r '.checks | length' "$manifest")" -gt 0 ]; then
|
|
393640
|
+
printf '\\n| Check | Exit | Duration |\\n| --- | --- | --- |\\n'
|
|
393641
|
+
jq -r '.checks[] | "| \\(.name) | \`\\(.exitCode)\` | \\(.durationMs)ms |"' "$manifest"
|
|
393642
|
+
fi
|
|
393643
|
+
if [ "$(jq -r '.violations // [] | length' "$manifest")" -gt 0 ]; then
|
|
393644
|
+
printf '\\n**Policy violations**\\n\\n'
|
|
393645
|
+
jq -r '.violations[] | "- \\(.)"' "$manifest"
|
|
393646
|
+
fi
|
|
393647
|
+
relative="$(jq -r '.patch.path // empty' "$manifest")"
|
|
393648
|
+
if [ -n "$relative" ]; then
|
|
393649
|
+
printf '\\n<details><summary>Proposed patch (%s bytes, sha256 %s)</summary>\\n\\n' \\
|
|
393650
|
+
"$(jq -r '.patch.bytes' "$manifest")" "$(jq -r '.patch.sha256' "$manifest")"
|
|
393651
|
+
printf '\\n\`\`\`diff\\n'
|
|
393652
|
+
head -c 30000 "$(dirname "$manifest")/$relative" | sed 's/^\`\`\`/ \`\`\`/'
|
|
393653
|
+
printf '\\n\`\`\`\\n\\n</details>\\n'
|
|
393654
|
+
fi
|
|
393655
|
+
if [ -n "\${PR_URL:-}" ]; then
|
|
393656
|
+
printf '\\nOpened %s\\n' "$PR_URL"
|
|
393657
|
+
fi
|
|
393658
|
+
printf '\\n[Full run and artifacts](%s)\\n' "$RUN_URL"
|
|
393659
|
+
} > "$out"
|
|
393660
|
+
fi
|
|
393661
|
+
jq -n --rawfile body "$out" '{body: $body}' \\
|
|
393662
|
+
| gh api --silent --method PATCH \\
|
|
393663
|
+
"repos/$GH_REPO/issues/comments/$COMMENT_ID" --input -
|
|
393664
|
+
`;
|
|
393665
|
+
return `name: UR Agentic CI
|
|
393666
|
+
|
|
393667
|
+
on:
|
|
393668
|
+
${onBlocks.join(`
|
|
393669
|
+
`)}
|
|
393670
|
+
|
|
393671
|
+
permissions: {}
|
|
393672
|
+
|
|
393673
|
+
concurrency:
|
|
393674
|
+
group: ur-agentic-ci-\${{ github.repository }}-\${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
|
|
393675
|
+
cancel-in-progress: false
|
|
393676
|
+
|
|
393677
|
+
jobs:
|
|
393678
|
+
${publishes ? acknowledgeJob : ""}${agentJob}${publishes ? `
|
|
393679
|
+
${publishJob}` : ""}`;
|
|
393307
393680
|
}
|
|
393308
|
-
var import_yaml2, AGENTIC_CI_MAX_EVENT_BYTES, AGENTIC_CI_MAX_PROMPT_CHARS, AGENTIC_CI_MAX_SUMMARY_CHARS, AGENTIC_CI_MAX_PATCH_BYTES, AGENTIC_CI_MAX_LOG_CHARS, TRUSTED_GITHUB_ASSOCIATIONS, NAME_RE, SAFE_PATH_RE, SECRET_NAME_RE, CHILD_FORBIDDEN_ENV_RE, HEADLESS_PROVIDER_SECRET_RE, defaultExec2 = async (file2, args, cwd2, timeoutMs, env4) => {
|
|
393681
|
+
var import_yaml2, AGENTIC_CI_MAX_EVENT_BYTES, AGENTIC_CI_MAX_PROMPT_CHARS, AGENTIC_CI_MAX_SUMMARY_CHARS, AGENTIC_CI_MAX_PATCH_BYTES, AGENTIC_CI_MAX_LOG_CHARS, TRUSTED_GITHUB_ASSOCIATIONS, AGENTIC_CI_DEFAULT_KEYWORD = "@ur", AGENTIC_CI_DEFAULT_ALIASES, AGENTIC_CI_TRIGGER_EVENTS, AGENTIC_CI_PUBLISH_MODES, NAME_RE, SAFE_PATH_RE, KEYWORD_RE, SECRET_NAME_RE, CHILD_FORBIDDEN_ENV_RE, HEADLESS_PROVIDER_SECRET_RE, defaultExec2 = async (file2, args, cwd2, timeoutMs, env4) => {
|
|
393309
393682
|
const result = await execFileNoThrowWithCwd(file2, args, {
|
|
393310
393683
|
cwd: cwd2,
|
|
393311
393684
|
timeout: timeoutMs ?? 10 * 60000,
|
|
@@ -393340,15 +393713,28 @@ var init_agenticCi = __esm(() => {
|
|
|
393340
393713
|
"MEMBER",
|
|
393341
393714
|
"COLLABORATOR"
|
|
393342
393715
|
];
|
|
393716
|
+
AGENTIC_CI_DEFAULT_ALIASES = ["/ur"];
|
|
393717
|
+
AGENTIC_CI_TRIGGER_EVENTS = [
|
|
393718
|
+
"issue_comment",
|
|
393719
|
+
"pull_request_review_comment",
|
|
393720
|
+
"pull_request_review",
|
|
393721
|
+
"issues"
|
|
393722
|
+
];
|
|
393723
|
+
AGENTIC_CI_PUBLISH_MODES = [
|
|
393724
|
+
"artifact",
|
|
393725
|
+
"comment",
|
|
393726
|
+
"pull-request"
|
|
393727
|
+
];
|
|
393343
393728
|
NAME_RE = /^[a-z0-9][a-z0-9-_]{0,63}$/i;
|
|
393344
393729
|
SAFE_PATH_RE = /^[^\0\r\n]{1,512}$/;
|
|
393730
|
+
KEYWORD_RE = /^[A-Za-z0-9@/_+#:.-]{1,64}$/;
|
|
393345
393731
|
SECRET_NAME_RE = /(?:TOKEN|SECRET|PASSWORD|PASSWD|API_KEY|PRIVATE_KEY|CREDENTIAL|AUTH)/i;
|
|
393346
393732
|
CHILD_FORBIDDEN_ENV_RE = /^(?:GITHUB_TOKEN|GH_TOKEN|ACTIONS_ID_TOKEN_REQUEST_TOKEN|ACTIONS_ID_TOKEN_REQUEST_URL|ACTIONS_RUNTIME_TOKEN|ACTIONS_RUNTIME_URL|SSH_AUTH_SOCK)$/;
|
|
393347
393733
|
HEADLESS_PROVIDER_SECRET_RE = /^(?:URHQ_API_KEY|UR_CODE_OAUTH_TOKEN|URHQ_AUTH_TOKEN|URHQ_FOUNDRY_API_KEY|OPENAI_API_KEY|ANTHROPIC_API_KEY|GEMINI_API_KEY|OPENROUTER_API_KEY|OPENAI_COMPATIBLE_API_KEY|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY|AWS_SESSION_TOKEN|AWS_BEARER_TOKEN_BEDROCK|AZURE_CLIENT_SECRET|AZURE_CLIENT_CERTIFICATE_PATH|GOOGLE_APPLICATION_CREDENTIALS)$/;
|
|
393348
393734
|
});
|
|
393349
393735
|
|
|
393350
393736
|
// src/constants/github-app.ts
|
|
393351
|
-
var PR_TITLE = "Add UR GitHub Workflow", GITHUB_ACTION_SETUP_DOCS_URL = "https://github.com/Maitham16/UR", urVersion2, WORKFLOW_CONTENT, PR_BODY = `## Installing UR GitHub App
|
|
393737
|
+
var import_yaml3, PR_TITLE = "Add UR GitHub Workflow", GITHUB_ACTION_SETUP_DOCS_URL = "https://github.com/Maitham16/UR", urVersion2, WORKFLOW_CONTENT, AGENTIC_CI_SPEC_PATH = ".ur/agentic-ci/default.yaml", AGENTIC_CI_SPEC_CONTENT, PR_BODY = `## Installing UR GitHub App
|
|
393352
393738
|
|
|
393353
393739
|
This PR adds a GitHub Actions workflow that enables UR integration in our repository.
|
|
393354
393740
|
|
|
@@ -393364,26 +393750,45 @@ This PR adds a GitHub Actions workflow that enables UR integration in our reposi
|
|
|
393364
393750
|
|
|
393365
393751
|
### How it works
|
|
393366
393752
|
|
|
393367
|
-
Once this PR is merged, trusted collaborators can
|
|
393368
|
-
|
|
393753
|
+
Once this PR is merged, trusted collaborators can summon UR by writing \`@ur\` followed by a task:
|
|
393754
|
+
|
|
393755
|
+
- an issue comment or pull-request comment
|
|
393756
|
+
- an inline review comment on a diff
|
|
393757
|
+
- a submitted pull-request review
|
|
393758
|
+
- the body or title of a new issue
|
|
393759
|
+
|
|
393760
|
+
UR reacts with \uD83D\uDC40, posts a tracking comment, works in an isolated checkout, and
|
|
393761
|
+
then edits that comment with the summary, verification results, and the proposed
|
|
393762
|
+
patch. The legacy \`/ur\` form still works.
|
|
393763
|
+
|
|
393764
|
+
### Files in this PR
|
|
393765
|
+
|
|
393766
|
+
- \`.github/workflows/ur.yml\` \u2014 the workflow
|
|
393767
|
+
- \`.ur/agentic-ci/default.yaml\` \u2014 the policy spec that governs the run
|
|
393768
|
+
|
|
393769
|
+
Edit the spec to change the keyword, the trusted associations, which events are
|
|
393770
|
+
allowed, the verification commands, or the writable path allowlist.
|
|
393369
393771
|
|
|
393370
393772
|
### Important Notes
|
|
393371
393773
|
|
|
393372
393774
|
- **This workflow won't take effect until this PR is merged**
|
|
393373
|
-
- The workflow runs for manual dispatches and trusted issue comments containing \`/ur\`
|
|
393374
393775
|
- Event text is passed as data, never interpolated into shell source
|
|
393776
|
+
- \`@urgent\` and mentions inside code fences or quoted replies do not trigger a run
|
|
393375
393777
|
|
|
393376
393778
|
### Security
|
|
393377
393779
|
|
|
393378
393780
|
- The API key is securely stored as a GitHub Actions secret
|
|
393379
|
-
- Only owners, members, and collaborators can trigger
|
|
393781
|
+
- Only owners, members, and collaborators can trigger runs
|
|
393380
393782
|
- All UR runs are stored in the GitHub Actions run history
|
|
393381
|
-
- The
|
|
393382
|
-
and emits a bounded hash-addressed patch artifact
|
|
393783
|
+
- The job that reads untrusted comment text holds **no write token**. It runs in
|
|
393784
|
+
a detached worktree and emits a bounded, hash-addressed patch artifact
|
|
393785
|
+
- A separate publisher job holds the write scopes and only ever consumes that
|
|
393786
|
+
artifact, so untrusted input and write access never share a job
|
|
393787
|
+
- Opening pull requests is opt-in: set \`publish.mode: pull-request\` in the spec
|
|
393383
393788
|
|
|
393384
393789
|
There's more information in the [UR repository](https://github.com/Maitham16/UR).
|
|
393385
393790
|
|
|
393386
|
-
After merging this PR, try
|
|
393791
|
+
After merging this PR, try \`@ur investigate this\` in a comment to get started.`, CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: UR Review
|
|
393387
393792
|
|
|
393388
393793
|
on:
|
|
393389
393794
|
pull_request:
|
|
@@ -393416,10 +393821,12 @@ jobs:
|
|
|
393416
393821
|
`;
|
|
393417
393822
|
var init_github_app = __esm(() => {
|
|
393418
393823
|
init_agenticCi();
|
|
393419
|
-
|
|
393824
|
+
import_yaml3 = __toESM(require_dist4(), 1);
|
|
393825
|
+
urVersion2 = typeof MACRO !== "undefined" ? "1.50.1" : "1.50.1";
|
|
393420
393826
|
WORKFLOW_CONTENT = compileAgenticCiWorkflow("default", {
|
|
393421
393827
|
packageVersion: urVersion2
|
|
393422
393828
|
});
|
|
393829
|
+
AGENTIC_CI_SPEC_CONTENT = import_yaml3.stringify(defaultAgenticCiSpec("default"));
|
|
393423
393830
|
});
|
|
393424
393831
|
|
|
393425
393832
|
// src/commands/install-github-app/ApiKeyStep.tsx
|
|
@@ -395422,11 +395829,13 @@ async function createWorkflowFile(repoName, branchName, workflowPath, workflowCo
|
|
|
395422
395829
|
if (checkFileResult.code === 0) {
|
|
395423
395830
|
fileSha = checkFileResult.stdout.trim();
|
|
395424
395831
|
}
|
|
395832
|
+
const ACTION_INPUT = /ur_api_key: \$\{\{ secrets\.UR_API_KEY \}\}/g;
|
|
395833
|
+
const ENV_VAR = /URHQ_API_KEY: \$\{\{ secrets\.UR_API_KEY \}\}/g;
|
|
395425
395834
|
let content = workflowContent;
|
|
395426
395835
|
if (secretName === "UR_CODE_OAUTH_TOKEN") {
|
|
395427
|
-
content =
|
|
395836
|
+
content = content.replace(ACTION_INPUT, `ur_oauth_token: \${{ secrets.UR_CODE_OAUTH_TOKEN }}`).replace(ENV_VAR, `UR_CODE_OAUTH_TOKEN: \${{ secrets.UR_CODE_OAUTH_TOKEN }}`);
|
|
395428
395837
|
} else if (secretName !== "UR_API_KEY") {
|
|
395429
|
-
content =
|
|
395838
|
+
content = content.replace(ACTION_INPUT, `ur_api_key: \${{ secrets.${secretName} }}`).replace(ENV_VAR, `URHQ_API_KEY: \${{ secrets.${secretName} }}`);
|
|
395430
395839
|
}
|
|
395431
395840
|
const base64Content = Buffer.from(content).toString("base64");
|
|
395432
395841
|
const apiParams = [
|
|
@@ -395552,6 +395961,11 @@ async function setupGitHubActions(repoName, apiKeyOrOAuthToken, secretName, upda
|
|
|
395552
395961
|
content: WORKFLOW_CONTENT,
|
|
395553
395962
|
message: "UR PR Assistant workflow"
|
|
395554
395963
|
});
|
|
395964
|
+
workflows.push({
|
|
395965
|
+
path: AGENTIC_CI_SPEC_PATH,
|
|
395966
|
+
content: AGENTIC_CI_SPEC_CONTENT,
|
|
395967
|
+
message: "UR Agentic CI policy spec"
|
|
395968
|
+
});
|
|
395555
395969
|
}
|
|
395556
395970
|
if (selectedWorkflows.includes("ur-review")) {
|
|
395557
395971
|
workflows.push({
|
|
@@ -396405,7 +396819,6 @@ var init_install_github_app2 = __esm(() => {
|
|
|
396405
396819
|
type: "local-jsx",
|
|
396406
396820
|
name: "install-github-app",
|
|
396407
396821
|
description: "Set up UR GitHub Actions for a repository",
|
|
396408
|
-
availability: ["ur-ai", "console"],
|
|
396409
396822
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_INSTALL_GITHUB_APP_COMMAND),
|
|
396410
396823
|
load: () => Promise.resolve().then(() => (init_install_github_app(), exports_install_github_app))
|
|
396411
396824
|
};
|
|
@@ -411407,7 +411820,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
411407
411820
|
return [];
|
|
411408
411821
|
}
|
|
411409
411822
|
}
|
|
411410
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.
|
|
411823
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.50.1") {
|
|
411411
411824
|
if (process.env.USER_TYPE === "ant") {
|
|
411412
411825
|
const changelog = "";
|
|
411413
411826
|
if (changelog) {
|
|
@@ -411434,7 +411847,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.49.0")
|
|
|
411434
411847
|
releaseNotes
|
|
411435
411848
|
};
|
|
411436
411849
|
}
|
|
411437
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.
|
|
411850
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.50.1") {
|
|
411438
411851
|
if (process.env.USER_TYPE === "ant") {
|
|
411439
411852
|
const changelog = "";
|
|
411440
411853
|
if (changelog) {
|
|
@@ -414291,7 +414704,7 @@ function getRecentActivitySync() {
|
|
|
414291
414704
|
return cachedActivity;
|
|
414292
414705
|
}
|
|
414293
414706
|
function getLogoDisplayData() {
|
|
414294
|
-
const version2 = process.env.DEMO_VERSION ?? "1.
|
|
414707
|
+
const version2 = process.env.DEMO_VERSION ?? "1.50.1";
|
|
414295
414708
|
const serverUrl = getDirectConnectServerUrl();
|
|
414296
414709
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
414297
414710
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -415175,7 +415588,7 @@ function LogoV2() {
|
|
|
415175
415588
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
415176
415589
|
t2 = () => {
|
|
415177
415590
|
const currentConfig2 = getGlobalConfig();
|
|
415178
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.
|
|
415591
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.50.1") {
|
|
415179
415592
|
return;
|
|
415180
415593
|
}
|
|
415181
415594
|
saveGlobalConfig(_temp327);
|
|
@@ -415860,12 +416273,12 @@ function LogoV2() {
|
|
|
415860
416273
|
return t41;
|
|
415861
416274
|
}
|
|
415862
416275
|
function _temp327(current) {
|
|
415863
|
-
if (current.lastReleaseNotesSeen === "1.
|
|
416276
|
+
if (current.lastReleaseNotesSeen === "1.50.1") {
|
|
415864
416277
|
return current;
|
|
415865
416278
|
}
|
|
415866
416279
|
return {
|
|
415867
416280
|
...current,
|
|
415868
|
-
lastReleaseNotesSeen: "1.
|
|
416281
|
+
lastReleaseNotesSeen: "1.50.1"
|
|
415869
416282
|
};
|
|
415870
416283
|
}
|
|
415871
416284
|
function _temp243(s_0) {
|
|
@@ -431361,7 +431774,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
431361
431774
|
path: ".github/workflows/ur.yml",
|
|
431362
431775
|
root: "project",
|
|
431363
431776
|
content: compileAgenticCiWorkflow("default", {
|
|
431364
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.
|
|
431777
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.50.1" : "1.50.1"
|
|
431365
431778
|
})
|
|
431366
431779
|
},
|
|
431367
431780
|
{
|
|
@@ -431424,7 +431837,7 @@ function value(tokens, flag) {
|
|
|
431424
431837
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
431425
431838
|
}
|
|
431426
431839
|
function cliVersion() {
|
|
431427
|
-
return typeof MACRO !== "undefined" ? "1.
|
|
431840
|
+
return typeof MACRO !== "undefined" ? "1.50.1" : "1.50.1";
|
|
431428
431841
|
}
|
|
431429
431842
|
function workflowPath(cwd2) {
|
|
431430
431843
|
return join155(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -437280,7 +437693,7 @@ function createAcpStdioApp(deps) {
|
|
|
437280
437693
|
}
|
|
437281
437694
|
},
|
|
437282
437695
|
authMethods: [],
|
|
437283
|
-
agentInfo: { name: "UR-Nexus", version: "1.
|
|
437696
|
+
agentInfo: { name: "UR-Nexus", version: "1.50.1" }
|
|
437284
437697
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
437285
437698
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
437286
437699
|
await runtime2.announce({
|
|
@@ -437377,7 +437790,7 @@ function createAcpStdioAgent(deps) {
|
|
|
437377
437790
|
}
|
|
437378
437791
|
},
|
|
437379
437792
|
authMethods: [],
|
|
437380
|
-
agentInfo: { name: "UR-Nexus", version: "1.
|
|
437793
|
+
agentInfo: { name: "UR-Nexus", version: "1.50.1" }
|
|
437381
437794
|
});
|
|
437382
437795
|
return;
|
|
437383
437796
|
case "authenticate":
|
|
@@ -440510,7 +440923,7 @@ function statePath(cwd2, name) {
|
|
|
440510
440923
|
}
|
|
440511
440924
|
function parseWorkflowText(text) {
|
|
440512
440925
|
const trimmed = text.trim();
|
|
440513
|
-
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) :
|
|
440926
|
+
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) : import_yaml5.parse(trimmed);
|
|
440514
440927
|
if (!parsed || typeof parsed !== "object") {
|
|
440515
440928
|
throw new Error("Workflow is not an object");
|
|
440516
440929
|
}
|
|
@@ -440692,7 +441105,7 @@ function saveWorkflow(cwd2, spec, options2 = {}) {
|
|
|
440692
441105
|
if (existsSync44(path22) && options2.force !== true) {
|
|
440693
441106
|
return { path: path22, created: false };
|
|
440694
441107
|
}
|
|
440695
|
-
writeFileSync34(path22, `${
|
|
441108
|
+
writeFileSync34(path22, `${import_yaml5.stringify(spec)}`);
|
|
440696
441109
|
return { path: path22, created: true };
|
|
440697
441110
|
}
|
|
440698
441111
|
function loadRunState(cwd2, name) {
|
|
@@ -440818,10 +441231,10 @@ function formatRunPlan(plan) {
|
|
|
440818
441231
|
return lines.join(`
|
|
440819
441232
|
`);
|
|
440820
441233
|
}
|
|
440821
|
-
var
|
|
441234
|
+
var import_yaml5, KNOWN_AGENTS, NAME_RE2, GATE_LABEL;
|
|
440822
441235
|
var init_workflows = __esm(() => {
|
|
440823
441236
|
init_json();
|
|
440824
|
-
|
|
441237
|
+
import_yaml5 = __toESM(require_dist4(), 1);
|
|
440825
441238
|
KNOWN_AGENTS = [
|
|
440826
441239
|
"general-purpose",
|
|
440827
441240
|
"worker",
|
|
@@ -442318,7 +442731,7 @@ function normalizeSkillStep(raw, index2) {
|
|
|
442318
442731
|
}
|
|
442319
442732
|
function parseSkillYaml(text) {
|
|
442320
442733
|
const trimmed = text.trim();
|
|
442321
|
-
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) :
|
|
442734
|
+
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) : import_yaml6.parse(trimmed);
|
|
442322
442735
|
if (!parsed || typeof parsed !== "object") {
|
|
442323
442736
|
throw new Error("Skill spec is not an object");
|
|
442324
442737
|
}
|
|
@@ -442575,12 +442988,12 @@ Executable skill for ${name}.
|
|
|
442575
442988
|
};
|
|
442576
442989
|
}
|
|
442577
442990
|
function stringifySkillYaml(spec) {
|
|
442578
|
-
return
|
|
442991
|
+
return import_yaml6.stringify(spec);
|
|
442579
442992
|
}
|
|
442580
|
-
var
|
|
442993
|
+
var import_yaml6, SKILL_YAML_FILE = "skill.yaml", SKILL_INSTRUCTIONS_FILE = "instructions.md", NAME_RE3;
|
|
442581
442994
|
var init_skillSpec = __esm(() => {
|
|
442582
442995
|
init_json();
|
|
442583
|
-
|
|
442996
|
+
import_yaml6 = __toESM(require_dist4(), 1);
|
|
442584
442997
|
NAME_RE3 = /^[a-z0-9][a-z0-9-_]{0,63}$/i;
|
|
442585
442998
|
});
|
|
442586
442999
|
|
|
@@ -444494,8 +444907,8 @@ function ensureCloudDirectory(cwd2) {
|
|
|
444494
444907
|
assertSafeStateNode(directory, "directory");
|
|
444495
444908
|
}
|
|
444496
444909
|
function boundedInteger(value2, fallback, minimum, maximum) {
|
|
444497
|
-
const
|
|
444498
|
-
return Number.isSafeInteger(
|
|
444910
|
+
const numeric2 = typeof value2 === "number" ? value2 : typeof value2 === "string" && /^\d+$/u.test(value2.trim()) ? Number(value2) : Number.NaN;
|
|
444911
|
+
return Number.isSafeInteger(numeric2) && numeric2 >= minimum ? Math.min(numeric2, maximum) : fallback;
|
|
444499
444912
|
}
|
|
444500
444913
|
function secretValues() {
|
|
444501
444914
|
return Object.entries(process.env).filter(([name, value2]) => isSecretLikeSubprocessEnvName(name) && (value2?.length ?? 0) >= 6).map(([, value2]) => value2).sort((left, right) => right.length - left.length);
|
|
@@ -459136,7 +459549,7 @@ var init_code_index2 = __esm(() => {
|
|
|
459136
459549
|
|
|
459137
459550
|
// node_modules/typescript/lib/typescript.js
|
|
459138
459551
|
var require_typescript2 = __commonJS((exports, module) => {
|
|
459139
|
-
var __dirname = "/sessions/
|
|
459552
|
+
var __dirname = "/sessions/great-laughing-cerf/mnt/UR-1.49.0/node_modules/typescript/lib", __filename = "/sessions/great-laughing-cerf/mnt/UR-1.49.0/node_modules/typescript/lib/typescript.js";
|
|
459140
459553
|
/*! *****************************************************************************
|
|
459141
459554
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
459142
459555
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -590276,7 +590689,7 @@ ${newComment.split(`
|
|
|
590276
590689
|
}
|
|
590277
590690
|
}
|
|
590278
590691
|
return result;
|
|
590279
|
-
function
|
|
590692
|
+
function escapeRegExp4(str2) {
|
|
590280
590693
|
return str2.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
590281
590694
|
}
|
|
590282
590695
|
function getTodoCommentsRegExp() {
|
|
@@ -590284,7 +590697,7 @@ ${newComment.split(`
|
|
|
590284
590697
|
const multiLineCommentStart = /(?:\/\*+\s*)/.source;
|
|
590285
590698
|
const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
|
|
590286
590699
|
const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
|
|
590287
|
-
const literals = "(?:" + map3(descriptors2, (d3) => "(" +
|
|
590700
|
+
const literals = "(?:" + map3(descriptors2, (d3) => "(" + escapeRegExp4(d3.text) + ")").join("|") + ")";
|
|
590288
590701
|
const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
|
|
590289
590702
|
const messageRemainder = /(?:.*?)/.source;
|
|
590290
590703
|
const messagePortion = "(" + literals + messageRemainder + ")";
|
|
@@ -609544,14 +609957,14 @@ ${content}
|
|
|
609544
609957
|
function getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) {
|
|
609545
609958
|
const resolvedLocale = getOrganizeImportsLocale(preferences);
|
|
609546
609959
|
const caseFirst = preferences.organizeImportsCaseFirst ?? false;
|
|
609547
|
-
const
|
|
609960
|
+
const numeric2 = preferences.organizeImportsNumericCollation ?? false;
|
|
609548
609961
|
const accents = preferences.organizeImportsAccentCollation ?? true;
|
|
609549
609962
|
const sensitivity = ignoreCase ? accents ? "accent" : "base" : accents ? "variant" : "case";
|
|
609550
609963
|
const collator = new Intl.Collator(resolvedLocale, {
|
|
609551
609964
|
usage: "sort",
|
|
609552
609965
|
caseFirst: caseFirst || "false",
|
|
609553
609966
|
sensitivity,
|
|
609554
|
-
numeric
|
|
609967
|
+
numeric: numeric2
|
|
609555
609968
|
});
|
|
609556
609969
|
return collator.compare;
|
|
609557
609970
|
}
|
|
@@ -644856,7 +645269,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
644856
645269
|
smapsRollup,
|
|
644857
645270
|
platform: process.platform,
|
|
644858
645271
|
nodeVersion: process.version,
|
|
644859
|
-
ccVersion: "1.
|
|
645272
|
+
ccVersion: "1.50.1"
|
|
644860
645273
|
};
|
|
644861
645274
|
}
|
|
644862
645275
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -645442,7 +645855,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
645442
645855
|
var call145 = async () => {
|
|
645443
645856
|
return {
|
|
645444
645857
|
type: "text",
|
|
645445
|
-
value: "1.
|
|
645858
|
+
value: "1.50.1"
|
|
645446
645859
|
};
|
|
645447
645860
|
}, version2, version_default;
|
|
645448
645861
|
var init_version = __esm(() => {
|
|
@@ -656560,7 +656973,7 @@ function generateHtmlReport(data, insights) {
|
|
|
656560
656973
|
</html>`;
|
|
656561
656974
|
}
|
|
656562
656975
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
656563
|
-
const version3 = typeof MACRO !== "undefined" ? "1.
|
|
656976
|
+
const version3 = typeof MACRO !== "undefined" ? "1.50.1" : "unknown";
|
|
656564
656977
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
656565
656978
|
const facets_summary = {
|
|
656566
656979
|
total: facets.size,
|
|
@@ -660893,7 +661306,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
660893
661306
|
init_settings2();
|
|
660894
661307
|
init_slowOperations();
|
|
660895
661308
|
init_uuid();
|
|
660896
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.
|
|
661309
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.50.1" : "unknown";
|
|
660897
661310
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
660898
661311
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
660899
661312
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -662108,7 +662521,7 @@ var init_filesystem = __esm(() => {
|
|
|
662108
662521
|
});
|
|
662109
662522
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
662110
662523
|
const nonce = randomBytes19(16).toString("hex");
|
|
662111
|
-
return join224(getURTempDir(), "bundled-skills", "1.
|
|
662524
|
+
return join224(getURTempDir(), "bundled-skills", "1.50.1", nonce);
|
|
662112
662525
|
});
|
|
662113
662526
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
662114
662527
|
});
|
|
@@ -668403,7 +668816,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
668403
668816
|
}
|
|
668404
668817
|
function computeFingerprintFromMessages(messages) {
|
|
668405
668818
|
const firstMessageText = extractFirstMessageText(messages);
|
|
668406
|
-
return computeFingerprint(firstMessageText, "1.
|
|
668819
|
+
return computeFingerprint(firstMessageText, "1.50.1");
|
|
668407
668820
|
}
|
|
668408
668821
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
668409
668822
|
var init_fingerprint = () => {};
|
|
@@ -670299,7 +670712,7 @@ async function sideQuery(opts) {
|
|
|
670299
670712
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
670300
670713
|
}
|
|
670301
670714
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
670302
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.
|
|
670715
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.50.1");
|
|
670303
670716
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
670304
670717
|
const systemBlocks = [
|
|
670305
670718
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -675070,7 +675483,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
675070
675483
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
675071
675484
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
675072
675485
|
betas: getSdkBetas(),
|
|
675073
|
-
ur_version: "1.
|
|
675486
|
+
ur_version: "1.50.1",
|
|
675074
675487
|
output_style: outputStyle2,
|
|
675075
675488
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
675076
675489
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -688930,7 +689343,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
688930
689343
|
function getSemverPart(version3) {
|
|
688931
689344
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
688932
689345
|
}
|
|
688933
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.
|
|
689346
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.50.1") {
|
|
688934
689347
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
|
|
688935
689348
|
if (!updatedVersion) {
|
|
688936
689349
|
return null;
|
|
@@ -688979,7 +689392,7 @@ function AutoUpdater({
|
|
|
688979
689392
|
return;
|
|
688980
689393
|
}
|
|
688981
689394
|
if (false) {}
|
|
688982
|
-
const currentVersion = "1.
|
|
689395
|
+
const currentVersion = "1.50.1";
|
|
688983
689396
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
688984
689397
|
let latestVersion = await getLatestVersion(channel);
|
|
688985
689398
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -689208,12 +689621,12 @@ function NativeAutoUpdater({
|
|
|
689208
689621
|
logEvent("tengu_native_auto_updater_start", {});
|
|
689209
689622
|
try {
|
|
689210
689623
|
const maxVersion = await getMaxVersion();
|
|
689211
|
-
if (maxVersion && gt("1.
|
|
689624
|
+
if (maxVersion && gt("1.50.1", maxVersion)) {
|
|
689212
689625
|
const msg = await getMaxVersionMessage();
|
|
689213
689626
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
689214
689627
|
}
|
|
689215
689628
|
const result = await installLatest(channel);
|
|
689216
|
-
const currentVersion = "1.
|
|
689629
|
+
const currentVersion = "1.50.1";
|
|
689217
689630
|
const latencyMs = Date.now() - startTime;
|
|
689218
689631
|
if (result.lockFailed) {
|
|
689219
689632
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -689350,17 +689763,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
689350
689763
|
const maxVersion = await getMaxVersion();
|
|
689351
689764
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
689352
689765
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
689353
|
-
if (gte("1.
|
|
689354
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.
|
|
689766
|
+
if (gte("1.50.1", maxVersion)) {
|
|
689767
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.50.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
689355
689768
|
setUpdateAvailable(false);
|
|
689356
689769
|
return;
|
|
689357
689770
|
}
|
|
689358
689771
|
latest = maxVersion;
|
|
689359
689772
|
}
|
|
689360
|
-
const hasUpdate = latest && !gte("1.
|
|
689773
|
+
const hasUpdate = latest && !gte("1.50.1", latest) && !shouldSkipVersion(latest);
|
|
689361
689774
|
setUpdateAvailable(!!hasUpdate);
|
|
689362
689775
|
if (hasUpdate) {
|
|
689363
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.
|
|
689776
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.50.1"} -> ${latest}`);
|
|
689364
689777
|
}
|
|
689365
689778
|
};
|
|
689366
689779
|
$2[0] = t1;
|
|
@@ -689394,7 +689807,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
689394
689807
|
wrap: "truncate",
|
|
689395
689808
|
children: [
|
|
689396
689809
|
"currentVersion: ",
|
|
689397
|
-
"1.
|
|
689810
|
+
"1.50.1"
|
|
689398
689811
|
]
|
|
689399
689812
|
}, undefined, true, undefined, this);
|
|
689400
689813
|
$2[3] = verbose;
|
|
@@ -693733,7 +694146,7 @@ var require_version_check = __commonJS((exports) => {
|
|
|
693733
694146
|
|
|
693734
694147
|
// node_modules/qrcode/lib/core/regex.js
|
|
693735
694148
|
var require_regex = __commonJS((exports) => {
|
|
693736
|
-
var
|
|
694149
|
+
var numeric2 = "[0-9]+";
|
|
693737
694150
|
var alphanumeric = "[A-Z $%*+\\-./:]+";
|
|
693738
694151
|
var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|" + "[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|" + "[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|" + "[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
693739
694152
|
kanji = kanji.replace(/u/g, "\\u");
|
|
@@ -693742,10 +694155,10 @@ var require_regex = __commonJS((exports) => {
|
|
|
693742
694155
|
exports.KANJI = new RegExp(kanji, "g");
|
|
693743
694156
|
exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
693744
694157
|
exports.BYTE = new RegExp(byte, "g");
|
|
693745
|
-
exports.NUMERIC = new RegExp(
|
|
694158
|
+
exports.NUMERIC = new RegExp(numeric2, "g");
|
|
693746
694159
|
exports.ALPHANUMERIC = new RegExp(alphanumeric, "g");
|
|
693747
694160
|
var TEST_KANJI = new RegExp("^" + kanji + "$");
|
|
693748
|
-
var TEST_NUMERIC = new RegExp("^" +
|
|
694161
|
+
var TEST_NUMERIC = new RegExp("^" + numeric2 + "$");
|
|
693749
694162
|
var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
693750
694163
|
exports.testKanji = function testKanji(str2) {
|
|
693751
694164
|
return TEST_KANJI.test(str2);
|
|
@@ -700091,7 +700504,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
700091
700504
|
project_dir: getOriginalCwd(),
|
|
700092
700505
|
added_dirs: addedDirs
|
|
700093
700506
|
},
|
|
700094
|
-
version: "1.
|
|
700507
|
+
version: "1.50.1",
|
|
700095
700508
|
output_style: {
|
|
700096
700509
|
name: outputStyleName
|
|
700097
700510
|
},
|
|
@@ -700174,7 +700587,7 @@ function StatusLineInner({
|
|
|
700174
700587
|
const taskValues = Object.values(tasks2);
|
|
700175
700588
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
700176
700589
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
700177
|
-
version: "1.
|
|
700590
|
+
version: "1.50.1",
|
|
700178
700591
|
providerLabel: providerRuntime.providerLabel,
|
|
700179
700592
|
authMode: providerRuntime.authLabel,
|
|
700180
700593
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -712317,7 +712730,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
712317
712730
|
} catch {}
|
|
712318
712731
|
const data = {
|
|
712319
712732
|
trigger: trigger2,
|
|
712320
|
-
version: "1.
|
|
712733
|
+
version: "1.50.1",
|
|
712321
712734
|
platform: process.platform,
|
|
712322
712735
|
transcript,
|
|
712323
712736
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -724603,7 +725016,7 @@ function WelcomeV2() {
|
|
|
724603
725016
|
dimColor: true,
|
|
724604
725017
|
children: [
|
|
724605
725018
|
"v",
|
|
724606
|
-
"1.
|
|
725019
|
+
"1.50.1"
|
|
724607
725020
|
]
|
|
724608
725021
|
}, undefined, true, undefined, this)
|
|
724609
725022
|
]
|
|
@@ -725863,7 +726276,7 @@ function completeOnboarding() {
|
|
|
725863
726276
|
saveGlobalConfig((current) => ({
|
|
725864
726277
|
...current,
|
|
725865
726278
|
hasCompletedOnboarding: true,
|
|
725866
|
-
lastOnboardingVersion: "1.
|
|
726279
|
+
lastOnboardingVersion: "1.50.1"
|
|
725867
726280
|
}));
|
|
725868
726281
|
}
|
|
725869
726282
|
function showDialog(root2, renderer) {
|
|
@@ -730907,7 +731320,7 @@ function appendToLog(path24, message) {
|
|
|
730907
731320
|
cwd: getFsImplementation().cwd(),
|
|
730908
731321
|
userType: process.env.USER_TYPE,
|
|
730909
731322
|
sessionId: getSessionId(),
|
|
730910
|
-
version: "1.
|
|
731323
|
+
version: "1.50.1"
|
|
730911
731324
|
};
|
|
730912
731325
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
730913
731326
|
}
|
|
@@ -735066,8 +735479,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
735066
735479
|
}
|
|
735067
735480
|
async function checkEnvLessBridgeMinVersion() {
|
|
735068
735481
|
const cfg = await getEnvLessBridgeConfig();
|
|
735069
|
-
if (cfg.min_version && lt("1.
|
|
735070
|
-
return `Your version of UR (${"1.
|
|
735482
|
+
if (cfg.min_version && lt("1.50.1", cfg.min_version)) {
|
|
735483
|
+
return `Your version of UR (${"1.50.1"}) is too old for Remote Control.
|
|
735071
735484
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
735072
735485
|
}
|
|
735073
735486
|
return null;
|
|
@@ -735541,7 +735954,7 @@ async function initBridgeCore(params) {
|
|
|
735541
735954
|
const rawApi = createBridgeApiClient({
|
|
735542
735955
|
baseUrl,
|
|
735543
735956
|
getAccessToken,
|
|
735544
|
-
runnerVersion: "1.
|
|
735957
|
+
runnerVersion: "1.50.1",
|
|
735545
735958
|
onDebug: logForDebugging,
|
|
735546
735959
|
onAuth401,
|
|
735547
735960
|
getTrustedDeviceToken
|
|
@@ -745010,7 +745423,7 @@ function getAgUiCapabilities() {
|
|
|
745010
745423
|
name: "UR-Nexus",
|
|
745011
745424
|
type: "ur-nexus",
|
|
745012
745425
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
745013
|
-
version: "1.
|
|
745426
|
+
version: "1.50.1",
|
|
745014
745427
|
provider: "UR",
|
|
745015
745428
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
745016
745429
|
},
|
|
@@ -746150,7 +746563,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
746150
746563
|
};
|
|
746151
746564
|
const server2 = new Server({
|
|
746152
746565
|
name: "ur-nexus",
|
|
746153
|
-
version: "1.
|
|
746566
|
+
version: "1.50.1"
|
|
746154
746567
|
}, {
|
|
746155
746568
|
capabilities: {
|
|
746156
746569
|
tools: {}
|
|
@@ -747308,7 +747721,7 @@ function thrownResponse(error40) {
|
|
|
747308
747721
|
}
|
|
747309
747722
|
async function createUrMcp2026Runtime(options4) {
|
|
747310
747723
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
747311
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.
|
|
747724
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.50.1" }, { capabilities: {} });
|
|
747312
747725
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
747313
747726
|
try {
|
|
747314
747727
|
await server2.connect(serverTransport);
|
|
@@ -747319,7 +747732,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
747319
747732
|
}
|
|
747320
747733
|
const runtime2 = new Mcp2026Runtime({
|
|
747321
747734
|
cwd: options4.cwd,
|
|
747322
|
-
version: "1.
|
|
747735
|
+
version: "1.50.1",
|
|
747323
747736
|
backend: {
|
|
747324
747737
|
listTools: async () => {
|
|
747325
747738
|
const listed = await client2.listTools();
|
|
@@ -749452,7 +749865,7 @@ async function update() {
|
|
|
749452
749865
|
logEvent("tengu_update_check", {});
|
|
749453
749866
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
749454
749867
|
const result = await checkUpgradeStatus({
|
|
749455
|
-
currentVersion: "1.
|
|
749868
|
+
currentVersion: "1.50.1",
|
|
749456
749869
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
749457
749870
|
installationType: diagnostic2.installationType,
|
|
749458
749871
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -750768,7 +751181,7 @@ ${customInstructions}` : customInstructions;
|
|
|
750768
751181
|
}
|
|
750769
751182
|
}
|
|
750770
751183
|
logForDiagnosticsNoPII("info", "started", {
|
|
750771
|
-
version: "1.
|
|
751184
|
+
version: "1.50.1",
|
|
750772
751185
|
is_native_binary: isInBundledMode()
|
|
750773
751186
|
});
|
|
750774
751187
|
registerCleanup(async () => {
|
|
@@ -751554,7 +751967,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
751554
751967
|
pendingHookMessages
|
|
751555
751968
|
}, renderAndRun);
|
|
751556
751969
|
}
|
|
751557
|
-
}).version("1.
|
|
751970
|
+
}).version("1.50.1 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
751558
751971
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
751559
751972
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
751560
751973
|
if (canUserConfigureAdvisor()) {
|
|
@@ -752570,7 +752983,7 @@ if (false) {}
|
|
|
752570
752983
|
async function main2() {
|
|
752571
752984
|
const args = process.argv.slice(2);
|
|
752572
752985
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
752573
|
-
console.log(`${"1.
|
|
752986
|
+
console.log(`${"1.50.1"} (UR-Nexus)`);
|
|
752574
752987
|
return;
|
|
752575
752988
|
}
|
|
752576
752989
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|