ur-agent 1.48.0 → 1.50.0
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 +48 -0
- package/dist/cli.js +796 -326
- package/docs/AGENT_FEATURES.md +13 -0
- package/docs/VALIDATION.md +1 -1
- package/documentation/index.html +1 -1
- package/extensions/jetbrains-ur/build.gradle.kts +1 -1
- package/extensions/vscode-ur-inline-diffs/package.json +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -75079,7 +75079,7 @@ var init_auth = __esm(() => {
|
|
|
75079
75079
|
|
|
75080
75080
|
// src/utils/userAgent.ts
|
|
75081
75081
|
function getURCodeUserAgent() {
|
|
75082
|
-
return `ur/${"1.
|
|
75082
|
+
return `ur/${"1.50.0"}`;
|
|
75083
75083
|
}
|
|
75084
75084
|
|
|
75085
75085
|
// src/utils/workloadContext.ts
|
|
@@ -75101,7 +75101,7 @@ function getUserAgent() {
|
|
|
75101
75101
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
75102
75102
|
const workload = getWorkload();
|
|
75103
75103
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
75104
|
-
return `ur-cli/${"1.
|
|
75104
|
+
return `ur-cli/${"1.50.0"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
75105
75105
|
}
|
|
75106
75106
|
function getMCPUserAgent() {
|
|
75107
75107
|
const parts = [];
|
|
@@ -75115,7 +75115,7 @@ function getMCPUserAgent() {
|
|
|
75115
75115
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
75116
75116
|
}
|
|
75117
75117
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
75118
|
-
return `ur/${"1.
|
|
75118
|
+
return `ur/${"1.50.0"}${suffix}`;
|
|
75119
75119
|
}
|
|
75120
75120
|
function getWebFetchUserAgent() {
|
|
75121
75121
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -75253,7 +75253,7 @@ var init_user = __esm(() => {
|
|
|
75253
75253
|
deviceId,
|
|
75254
75254
|
sessionId: getSessionId(),
|
|
75255
75255
|
email: getEmail(),
|
|
75256
|
-
appVersion: "1.
|
|
75256
|
+
appVersion: "1.50.0",
|
|
75257
75257
|
platform: getHostPlatformForAnalytics(),
|
|
75258
75258
|
organizationUuid,
|
|
75259
75259
|
accountUuid,
|
|
@@ -83453,7 +83453,7 @@ var init_metadata = __esm(() => {
|
|
|
83453
83453
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
83454
83454
|
WHITESPACE_REGEX = /\s+/;
|
|
83455
83455
|
getVersionBase = memoize_default(() => {
|
|
83456
|
-
const match = "1.
|
|
83456
|
+
const match = "1.50.0".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
83457
83457
|
return match ? match[0] : undefined;
|
|
83458
83458
|
});
|
|
83459
83459
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -83493,7 +83493,7 @@ var init_metadata = __esm(() => {
|
|
|
83493
83493
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
83494
83494
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
83495
83495
|
isURAiAuth: isURAISubscriber(),
|
|
83496
|
-
version: "1.
|
|
83496
|
+
version: "1.50.0",
|
|
83497
83497
|
versionBase: getVersionBase(),
|
|
83498
83498
|
buildTime: "",
|
|
83499
83499
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -84163,7 +84163,7 @@ function initialize1PEventLogging() {
|
|
|
84163
84163
|
const platform2 = getPlatform();
|
|
84164
84164
|
const attributes = {
|
|
84165
84165
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
84166
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.
|
|
84166
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.50.0"
|
|
84167
84167
|
};
|
|
84168
84168
|
if (platform2 === "wsl") {
|
|
84169
84169
|
const wslVersion = getWslVersion();
|
|
@@ -84191,7 +84191,7 @@ function initialize1PEventLogging() {
|
|
|
84191
84191
|
})
|
|
84192
84192
|
]
|
|
84193
84193
|
});
|
|
84194
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.
|
|
84194
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.50.0");
|
|
84195
84195
|
}
|
|
84196
84196
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
84197
84197
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -93709,6 +93709,62 @@ var init_a2aV1 = __esm(() => {
|
|
|
93709
93709
|
};
|
|
93710
93710
|
});
|
|
93711
93711
|
|
|
93712
|
+
// src/services/agents/a2aCardSignature.ts
|
|
93713
|
+
import {
|
|
93714
|
+
createHash as createHash8,
|
|
93715
|
+
createPrivateKey,
|
|
93716
|
+
createPublicKey,
|
|
93717
|
+
generateKeyPairSync,
|
|
93718
|
+
sign as cryptoSign,
|
|
93719
|
+
verify as cryptoVerify
|
|
93720
|
+
} from "crypto";
|
|
93721
|
+
function base64url3(value) {
|
|
93722
|
+
return (typeof value === "string" ? Buffer.from(value, "utf8") : value).toString("base64url");
|
|
93723
|
+
}
|
|
93724
|
+
function canonicalizeJson(value) {
|
|
93725
|
+
if (value === null)
|
|
93726
|
+
return "null";
|
|
93727
|
+
if (typeof value === "boolean")
|
|
93728
|
+
return value ? "true" : "false";
|
|
93729
|
+
if (typeof value === "number") {
|
|
93730
|
+
if (!Number.isFinite(value)) {
|
|
93731
|
+
throw new Error("cannot canonicalize a non-finite number");
|
|
93732
|
+
}
|
|
93733
|
+
return JSON.stringify(value);
|
|
93734
|
+
}
|
|
93735
|
+
if (typeof value === "string")
|
|
93736
|
+
return JSON.stringify(value);
|
|
93737
|
+
if (Array.isArray(value)) {
|
|
93738
|
+
return `[${value.map((entry) => canonicalizeJson(entry === undefined ? null : entry)).join(",")}]`;
|
|
93739
|
+
}
|
|
93740
|
+
if (typeof value === "object") {
|
|
93741
|
+
const source = value;
|
|
93742
|
+
const keys2 = Object.keys(source).filter((key) => source[key] !== undefined).sort();
|
|
93743
|
+
const members = keys2.map((key) => `${JSON.stringify(key)}:${canonicalizeJson(source[key])}`);
|
|
93744
|
+
return `{${members.join(",")}}`;
|
|
93745
|
+
}
|
|
93746
|
+
throw new Error(`cannot canonicalize value of type ${typeof value}`);
|
|
93747
|
+
}
|
|
93748
|
+
function signingPayload(card) {
|
|
93749
|
+
const { signatures: _signatures, ...rest } = card;
|
|
93750
|
+
return base64url3(canonicalizeJson(rest));
|
|
93751
|
+
}
|
|
93752
|
+
function signAgentCard(card, key) {
|
|
93753
|
+
const privateKey = createPrivateKey(key.privateKeyPem);
|
|
93754
|
+
if (privateKey.asymmetricKeyType !== "ed25519") {
|
|
93755
|
+
throw new Error("Agent Card signing requires an Ed25519 private key");
|
|
93756
|
+
}
|
|
93757
|
+
const header = { alg: A2A_CARD_SIGNATURE_ALG };
|
|
93758
|
+
if (key.kid)
|
|
93759
|
+
header.kid = key.kid;
|
|
93760
|
+
const protectedHeader = base64url3(canonicalizeJson(header));
|
|
93761
|
+
const signingInput = `${protectedHeader}.${signingPayload(card)}`;
|
|
93762
|
+
const signature = cryptoSign(null, Buffer.from(signingInput, "utf8"), privateKey);
|
|
93763
|
+
return { protected: protectedHeader, signature: signature.toString("base64url") };
|
|
93764
|
+
}
|
|
93765
|
+
var A2A_CARD_SIGNATURE_ALG = "EdDSA";
|
|
93766
|
+
var init_a2aCardSignature = () => {};
|
|
93767
|
+
|
|
93712
93768
|
// src/services/agents/trends.ts
|
|
93713
93769
|
var exports_trends = {};
|
|
93714
93770
|
__export(exports_trends, {
|
|
@@ -93853,7 +93909,7 @@ function buildA2AV1AgentCard(options = {}) {
|
|
|
93853
93909
|
securityRequirements.push({ schemes: { delegation: [] } });
|
|
93854
93910
|
}
|
|
93855
93911
|
const legacy = buildA2AAgentCard(options);
|
|
93856
|
-
|
|
93912
|
+
const card = {
|
|
93857
93913
|
name: legacy.name,
|
|
93858
93914
|
description: legacy.description,
|
|
93859
93915
|
supportedInterfaces: [
|
|
@@ -93904,6 +93960,9 @@ function buildA2AV1AgentCard(options = {}) {
|
|
|
93904
93960
|
})),
|
|
93905
93961
|
signatures: []
|
|
93906
93962
|
};
|
|
93963
|
+
if (!options.signingKey)
|
|
93964
|
+
return card;
|
|
93965
|
+
return { ...card, signatures: [signAgentCard(card, options.signingKey)] };
|
|
93907
93966
|
}
|
|
93908
93967
|
function buildAgentTrendReport(options = {}) {
|
|
93909
93968
|
return {
|
|
@@ -93948,8 +94007,9 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
93948
94007
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
93949
94008
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
93950
94009
|
}
|
|
93951
|
-
var urVersion = "1.
|
|
94010
|
+
var urVersion = "1.50.0", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
|
|
93952
94011
|
var init_trends = __esm(() => {
|
|
94012
|
+
init_a2aCardSignature();
|
|
93953
94013
|
coverage = [
|
|
93954
94014
|
{
|
|
93955
94015
|
id: "local-runtime",
|
|
@@ -94357,7 +94417,7 @@ __export(exports_a2aServer, {
|
|
|
94357
94417
|
handleA2ARequest: () => handleA2ARequest,
|
|
94358
94418
|
authorizeRequest: () => authorizeRequest
|
|
94359
94419
|
});
|
|
94360
|
-
import { createHash as
|
|
94420
|
+
import { createHash as createHash9, randomUUID as randomUUID18 } from "crypto";
|
|
94361
94421
|
import {
|
|
94362
94422
|
existsSync as existsSync12,
|
|
94363
94423
|
mkdirSync as mkdirSync11,
|
|
@@ -94420,7 +94480,7 @@ function a2aV1RestResponse(status, body) {
|
|
|
94420
94480
|
}
|
|
94421
94481
|
function agentCardResponse(card, version2, request) {
|
|
94422
94482
|
const payload = JSON.stringify(card, null, 2);
|
|
94423
|
-
const etag = `"${
|
|
94483
|
+
const etag = `"${createHash9("sha256").update(payload).digest("base64url")}"`;
|
|
94424
94484
|
const notModified = request?.headers.get("if-none-match") === etag;
|
|
94425
94485
|
return new Response(notModified ? null : payload, {
|
|
94426
94486
|
status: notModified ? 304 : 200,
|
|
@@ -96464,7 +96524,7 @@ var init_config2 = __esm(() => {
|
|
|
96464
96524
|
});
|
|
96465
96525
|
|
|
96466
96526
|
// src/services/analytics/datadog.ts
|
|
96467
|
-
import { createHash as
|
|
96527
|
+
import { createHash as createHash10 } from "crypto";
|
|
96468
96528
|
function camelToSnakeCase(str) {
|
|
96469
96529
|
return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
96470
96530
|
}
|
|
@@ -96672,7 +96732,7 @@ var init_datadog = __esm(() => {
|
|
|
96672
96732
|
});
|
|
96673
96733
|
getUserBucket = memoize_default(() => {
|
|
96674
96734
|
const userId = getOrCreateUserID();
|
|
96675
|
-
const hash2 =
|
|
96735
|
+
const hash2 = createHash10("sha256").update(userId).digest("hex");
|
|
96676
96736
|
return parseInt(hash2.slice(0, 8), 16) % NUM_USER_BUCKETS;
|
|
96677
96737
|
});
|
|
96678
96738
|
});
|
|
@@ -96748,7 +96808,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
96748
96808
|
if (!isAttributionHeaderEnabled()) {
|
|
96749
96809
|
return "";
|
|
96750
96810
|
}
|
|
96751
|
-
const version2 = `${"1.
|
|
96811
|
+
const version2 = `${"1.50.0"}.${fingerprint}`;
|
|
96752
96812
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
96753
96813
|
const cch = "";
|
|
96754
96814
|
const workload = getWorkload();
|
|
@@ -143035,7 +143095,7 @@ var init_systemDirectories = __esm(() => {
|
|
|
143035
143095
|
});
|
|
143036
143096
|
|
|
143037
143097
|
// src/utils/plugins/mcpbHandler.ts
|
|
143038
|
-
import { createHash as
|
|
143098
|
+
import { createHash as createHash11 } from "crypto";
|
|
143039
143099
|
import { chmod, writeFile as writeFile4 } from "fs/promises";
|
|
143040
143100
|
import { dirname as dirname25, join as join46 } from "path";
|
|
143041
143101
|
function manifestAuthorName(manifest) {
|
|
@@ -143055,13 +143115,13 @@ function isUrl2(source) {
|
|
|
143055
143115
|
return source.startsWith("http://") || source.startsWith("https://");
|
|
143056
143116
|
}
|
|
143057
143117
|
function generateContentHash(data) {
|
|
143058
|
-
return
|
|
143118
|
+
return createHash11("sha256").update(data).digest("hex").substring(0, 16);
|
|
143059
143119
|
}
|
|
143060
143120
|
function getMcpbCacheDir(pluginPath) {
|
|
143061
143121
|
return join46(pluginPath, ".mcpb-cache");
|
|
143062
143122
|
}
|
|
143063
143123
|
function getMetadataPath(cacheDir, source) {
|
|
143064
|
-
const sourceHash =
|
|
143124
|
+
const sourceHash = createHash11("md5").update(source).digest("hex").substring(0, 8);
|
|
143065
143125
|
return join46(cacheDir, `${sourceHash}.metadata.json`);
|
|
143066
143126
|
}
|
|
143067
143127
|
function serverSecretsKey(pluginId, serverName) {
|
|
@@ -143409,7 +143469,7 @@ async function loadMcpbFile(source, pluginPath, pluginId, onProgress, providedUs
|
|
|
143409
143469
|
let mcpbData;
|
|
143410
143470
|
let mcpbFilePath;
|
|
143411
143471
|
if (isUrl2(source)) {
|
|
143412
|
-
const sourceHash =
|
|
143472
|
+
const sourceHash = createHash11("md5").update(source).digest("hex").substring(0, 8);
|
|
143413
143473
|
mcpbFilePath = join46(cacheDir, `${sourceHash}.mcpb`);
|
|
143414
143474
|
mcpbData = await downloadMcpb(source, mcpbFilePath, onProgress);
|
|
143415
143475
|
} else {
|
|
@@ -154433,7 +154493,7 @@ var init_projectSafety = __esm(() => {
|
|
|
154433
154493
|
function getInstruments() {
|
|
154434
154494
|
if (instruments)
|
|
154435
154495
|
return instruments;
|
|
154436
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.
|
|
154496
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.50.0");
|
|
154437
154497
|
instruments = {
|
|
154438
154498
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
154439
154499
|
description: "GenAI operation duration.",
|
|
@@ -154531,7 +154591,7 @@ function genAiAgentAttributes() {
|
|
|
154531
154591
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
154532
154592
|
"gen_ai.provider.name": "ur",
|
|
154533
154593
|
"gen_ai.agent.name": "UR-Nexus",
|
|
154534
|
-
"gen_ai.agent.version": "1.
|
|
154594
|
+
"gen_ai.agent.version": "1.50.0"
|
|
154535
154595
|
};
|
|
154536
154596
|
}
|
|
154537
154597
|
function genAiWorkflowAttributes(workflowName) {
|
|
@@ -154547,7 +154607,7 @@ function genAiWorkflowAttributes(workflowName) {
|
|
|
154547
154607
|
function startGenAiWorkflowSpan(workflowName) {
|
|
154548
154608
|
const attributes = genAiWorkflowAttributes(workflowName);
|
|
154549
154609
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
154550
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.
|
|
154610
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.50.0").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
154551
154611
|
}
|
|
154552
154612
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
154553
154613
|
try {
|
|
@@ -154585,7 +154645,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
154585
154645
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
154586
154646
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
154587
154647
|
}
|
|
154588
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.
|
|
154648
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.50.0").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
154589
154649
|
}
|
|
154590
154650
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
154591
154651
|
try {
|
|
@@ -154701,7 +154761,7 @@ var init_genAiSemantics = __esm(() => {
|
|
|
154701
154761
|
});
|
|
154702
154762
|
|
|
154703
154763
|
// src/services/context/memoryCitations.ts
|
|
154704
|
-
import { createHash as
|
|
154764
|
+
import { createHash as createHash12 } from "crypto";
|
|
154705
154765
|
import {
|
|
154706
154766
|
existsSync as existsSync19,
|
|
154707
154767
|
lstatSync as lstatSync6,
|
|
@@ -154710,7 +154770,7 @@ import {
|
|
|
154710
154770
|
} from "fs";
|
|
154711
154771
|
import { relative as relative10, resolve as resolve23 } from "path";
|
|
154712
154772
|
function digest(value) {
|
|
154713
|
-
return `sha256:${
|
|
154773
|
+
return `sha256:${createHash12("sha256").update(value).digest("hex")}`;
|
|
154714
154774
|
}
|
|
154715
154775
|
function validDate3(value) {
|
|
154716
154776
|
return typeof value === "string" && Number.isFinite(Date.parse(value));
|
|
@@ -155023,7 +155083,7 @@ import {
|
|
|
155023
155083
|
writeSync as writeSync4,
|
|
155024
155084
|
writeFileSync as writeFileSync14
|
|
155025
155085
|
} from "fs";
|
|
155026
|
-
import { createHash as
|
|
155086
|
+
import { createHash as createHash13, randomUUID as randomUUID19 } from "crypto";
|
|
155027
155087
|
import { dirname as dirname28, join as join52, relative as relative11 } from "path";
|
|
155028
155088
|
function contextDir(cwd2) {
|
|
155029
155089
|
return join52(cwd2, ".ur", "context");
|
|
@@ -155184,7 +155244,7 @@ function formatArchitectureSummary(manifest, cwd2) {
|
|
|
155184
155244
|
`);
|
|
155185
155245
|
}
|
|
155186
155246
|
function hash2(value) {
|
|
155187
|
-
return
|
|
155247
|
+
return createHash13("sha256").update(value).digest("hex");
|
|
155188
155248
|
}
|
|
155189
155249
|
function stableJson(value) {
|
|
155190
155250
|
if (Array.isArray(value))
|
|
@@ -155775,7 +155835,7 @@ var init_projectContextManifest = __esm(() => {
|
|
|
155775
155835
|
this.verification = verification;
|
|
155776
155836
|
}
|
|
155777
155837
|
};
|
|
155778
|
-
TASK_MEMORY_GENESIS =
|
|
155838
|
+
TASK_MEMORY_GENESIS = createHash13("sha256").update("ur-task-memory-genesis-v2").digest("hex");
|
|
155779
155839
|
TASK_MEMORY_STATUSES = new Set([
|
|
155780
155840
|
"proposed",
|
|
155781
155841
|
"accepted",
|
|
@@ -155797,11 +155857,11 @@ var init_projectContextManifest = __esm(() => {
|
|
|
155797
155857
|
});
|
|
155798
155858
|
|
|
155799
155859
|
// src/services/api/dumpPrompts.ts
|
|
155800
|
-
import { createHash as
|
|
155860
|
+
import { createHash as createHash14 } from "crypto";
|
|
155801
155861
|
import { promises as fs2 } from "fs";
|
|
155802
155862
|
import { dirname as dirname29, join as join53 } from "path";
|
|
155803
155863
|
function hashString3(str) {
|
|
155804
|
-
return
|
|
155864
|
+
return createHash14("sha256").update(str).digest("hex");
|
|
155805
155865
|
}
|
|
155806
155866
|
function clearDumpState(agentIdOrSessionId) {
|
|
155807
155867
|
dumpState.delete(agentIdOrSessionId);
|
|
@@ -156251,7 +156311,7 @@ var init_ledger = __esm(() => {
|
|
|
156251
156311
|
});
|
|
156252
156312
|
|
|
156253
156313
|
// src/services/verifier/loopDetector.ts
|
|
156254
|
-
import { createHash as
|
|
156314
|
+
import { createHash as createHash15 } from "crypto";
|
|
156255
156315
|
|
|
156256
156316
|
class LoopDetector {
|
|
156257
156317
|
recent = new Map;
|
|
@@ -156292,7 +156352,7 @@ class LoopDetector {
|
|
|
156292
156352
|
function hashCall(toolName, input) {
|
|
156293
156353
|
const normalized = normalize8(input);
|
|
156294
156354
|
const payload = `${toolName}\x00${JSON.stringify(normalized)}`;
|
|
156295
|
-
return
|
|
156355
|
+
return createHash15("sha1").update(payload).digest("hex");
|
|
156296
156356
|
}
|
|
156297
156357
|
function normalize8(value) {
|
|
156298
156358
|
if (value === null || value === undefined)
|
|
@@ -206104,7 +206164,7 @@ function getTelemetryAttributes() {
|
|
|
206104
206164
|
attributes["session.id"] = sessionId;
|
|
206105
206165
|
}
|
|
206106
206166
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
206107
|
-
attributes["app.version"] = "1.
|
|
206167
|
+
attributes["app.version"] = "1.50.0";
|
|
206108
206168
|
}
|
|
206109
206169
|
const oauthAccount = getOauthAccountInfo();
|
|
206110
206170
|
if (oauthAccount) {
|
|
@@ -209341,7 +209401,7 @@ __export(exports_commitAttribution, {
|
|
|
209341
209401
|
buildSurfaceKey: () => buildSurfaceKey,
|
|
209342
209402
|
attributionRestoreStateFromLog: () => attributionRestoreStateFromLog
|
|
209343
209403
|
});
|
|
209344
|
-
import { createHash as
|
|
209404
|
+
import { createHash as createHash16, randomUUID as randomUUID20 } from "crypto";
|
|
209345
209405
|
import { stat as stat15 } from "fs/promises";
|
|
209346
209406
|
import { isAbsolute as isAbsolute14, join as join57, relative as relative13, sep as sep12 } from "path";
|
|
209347
209407
|
function getAttributionRepoRoot() {
|
|
@@ -209374,7 +209434,7 @@ function buildSurfaceKey(surface, model) {
|
|
|
209374
209434
|
return `${surface}/${getCanonicalName(model)}`;
|
|
209375
209435
|
}
|
|
209376
209436
|
function computeContentHash(content) {
|
|
209377
|
-
return
|
|
209437
|
+
return createHash16("sha256").update(content).digest("hex");
|
|
209378
209438
|
}
|
|
209379
209439
|
function normalizeFilePath(filePath) {
|
|
209380
209440
|
const fs3 = getFsImplementation();
|
|
@@ -247679,7 +247739,7 @@ var init_config3 = __esm(() => {
|
|
|
247679
247739
|
});
|
|
247680
247740
|
|
|
247681
247741
|
// src/services/mcp/utils.ts
|
|
247682
|
-
import { createHash as
|
|
247742
|
+
import { createHash as createHash17 } from "crypto";
|
|
247683
247743
|
import { join as join64 } from "path";
|
|
247684
247744
|
function filterToolsByServer(tools, serverName) {
|
|
247685
247745
|
const prefix = `mcp__${normalizeNameForMCP(serverName)}__`;
|
|
@@ -247719,7 +247779,7 @@ function hashMcpConfig(config2) {
|
|
|
247719
247779
|
}
|
|
247720
247780
|
return v;
|
|
247721
247781
|
});
|
|
247722
|
-
return
|
|
247782
|
+
return createHash17("sha256").update(stable).digest("hex").slice(0, 16);
|
|
247723
247783
|
}
|
|
247724
247784
|
function excludeStalePluginClients(mcp, configs) {
|
|
247725
247785
|
const stale = mcp.clients.filter((c4) => {
|
|
@@ -248468,7 +248528,7 @@ var init_xaaIdpLogin = __esm(() => {
|
|
|
248468
248528
|
});
|
|
248469
248529
|
|
|
248470
248530
|
// src/services/mcp/auth.ts
|
|
248471
|
-
import { createHash as
|
|
248531
|
+
import { createHash as createHash18, randomBytes as randomBytes5, randomUUID as randomUUID23 } from "crypto";
|
|
248472
248532
|
import { mkdir as mkdir7 } from "fs/promises";
|
|
248473
248533
|
import { createServer as createServer3 } from "http";
|
|
248474
248534
|
import { join as join65 } from "path";
|
|
@@ -248582,7 +248642,7 @@ function getServerKey(serverName, serverConfig) {
|
|
|
248582
248642
|
url: serverConfig.url,
|
|
248583
248643
|
headers: serverConfig.headers || {}
|
|
248584
248644
|
});
|
|
248585
|
-
const hash3 =
|
|
248645
|
+
const hash3 = createHash18("sha256").update(configJson).digest("hex").substring(0, 16);
|
|
248586
248646
|
return `${serverName}|${hash3}`;
|
|
248587
248647
|
}
|
|
248588
248648
|
function hasMcpDiscoveryButNoToken(serverName, serverConfig) {
|
|
@@ -252355,7 +252415,7 @@ function getInstallationEnv() {
|
|
|
252355
252415
|
return;
|
|
252356
252416
|
}
|
|
252357
252417
|
function getURCodeVersion() {
|
|
252358
|
-
return "1.
|
|
252418
|
+
return "1.50.0";
|
|
252359
252419
|
}
|
|
252360
252420
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
252361
252421
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -259686,7 +259746,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
259686
259746
|
const client2 = new Client({
|
|
259687
259747
|
name: "ur",
|
|
259688
259748
|
title: "UR",
|
|
259689
|
-
version: "1.
|
|
259749
|
+
version: "1.50.0",
|
|
259690
259750
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
259691
259751
|
websiteUrl: PRODUCT_URL
|
|
259692
259752
|
}, {
|
|
@@ -260046,7 +260106,7 @@ var init_client5 = __esm(() => {
|
|
|
260046
260106
|
const client2 = new Client({
|
|
260047
260107
|
name: "ur",
|
|
260048
260108
|
title: "UR",
|
|
260049
|
-
version: "1.
|
|
260109
|
+
version: "1.50.0",
|
|
260050
260110
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
260051
260111
|
websiteUrl: PRODUCT_URL
|
|
260052
260112
|
}, {
|
|
@@ -264327,7 +264387,7 @@ var init_types6 = __esm(() => {
|
|
|
264327
264387
|
});
|
|
264328
264388
|
|
|
264329
264389
|
// src/services/policyLimits/index.ts
|
|
264330
|
-
import { createHash as
|
|
264390
|
+
import { createHash as createHash19 } from "crypto";
|
|
264331
264391
|
import { readFileSync as fsReadFileSync } from "fs";
|
|
264332
264392
|
import { unlink as unlink7, writeFile as writeFile10 } from "fs/promises";
|
|
264333
264393
|
import { join as join74 } from "path";
|
|
@@ -264373,7 +264433,7 @@ function sortKeysDeep2(obj) {
|
|
|
264373
264433
|
function computeChecksum(restrictions) {
|
|
264374
264434
|
const sorted = sortKeysDeep2(restrictions);
|
|
264375
264435
|
const normalized = jsonStringify(sorted);
|
|
264376
|
-
const hash3 =
|
|
264436
|
+
const hash3 = createHash19("sha256").update(normalized).digest("hex");
|
|
264377
264437
|
return `sha256:${hash3}`;
|
|
264378
264438
|
}
|
|
264379
264439
|
function isPolicyLimitsEligible() {
|
|
@@ -266145,7 +266205,7 @@ var init_types7 = __esm(() => {
|
|
|
266145
266205
|
});
|
|
266146
266206
|
|
|
266147
266207
|
// src/services/remoteManagedSettings/index.ts
|
|
266148
|
-
import { createHash as
|
|
266208
|
+
import { createHash as createHash20 } from "crypto";
|
|
266149
266209
|
import { open as open7, unlink as unlink8 } from "fs/promises";
|
|
266150
266210
|
function initializeRemoteManagedSettingsLoadingPromise() {
|
|
266151
266211
|
if (loadingCompletePromise2) {
|
|
@@ -266183,7 +266243,7 @@ function sortKeysDeep3(obj) {
|
|
|
266183
266243
|
function computeChecksumFromSettings(settings) {
|
|
266184
266244
|
const sorted = sortKeysDeep3(settings);
|
|
266185
266245
|
const normalized = jsonStringify(sorted);
|
|
266186
|
-
const hash3 =
|
|
266246
|
+
const hash3 = createHash20("sha256").update(normalized).digest("hex");
|
|
266187
266247
|
return `sha256:${hash3}`;
|
|
266188
266248
|
}
|
|
266189
266249
|
function isEligibleForRemoteManagedSettings() {
|
|
@@ -272647,7 +272707,7 @@ async function createRuntime() {
|
|
|
272647
272707
|
bootstrapTelemetry();
|
|
272648
272708
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
272649
272709
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
272650
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.
|
|
272710
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.50.0"
|
|
272651
272711
|
}));
|
|
272652
272712
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
272653
272713
|
resource,
|
|
@@ -272680,11 +272740,11 @@ async function createRuntime() {
|
|
|
272680
272740
|
setMeterProvider(meterProvider);
|
|
272681
272741
|
setLoggerProvider(loggerProvider);
|
|
272682
272742
|
if (meterProvider) {
|
|
272683
|
-
const meter = meterProvider.getMeter("ur-agent", "1.
|
|
272743
|
+
const meter = meterProvider.getMeter("ur-agent", "1.50.0");
|
|
272684
272744
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
272685
272745
|
}
|
|
272686
272746
|
if (loggerProvider) {
|
|
272687
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.
|
|
272747
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.50.0"));
|
|
272688
272748
|
}
|
|
272689
272749
|
if (!cleanupRegistered2) {
|
|
272690
272750
|
cleanupRegistered2 = true;
|
|
@@ -273014,7 +273074,7 @@ var init_auth_code_listener = __esm(() => {
|
|
|
273014
273074
|
});
|
|
273015
273075
|
|
|
273016
273076
|
// src/services/oauth/crypto.ts
|
|
273017
|
-
import { createHash as
|
|
273077
|
+
import { createHash as createHash21, randomBytes as randomBytes8 } from "crypto";
|
|
273018
273078
|
function base64URLEncode(buffer) {
|
|
273019
273079
|
return buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
273020
273080
|
}
|
|
@@ -273022,7 +273082,7 @@ function generateCodeVerifier() {
|
|
|
273022
273082
|
return base64URLEncode(randomBytes8(32));
|
|
273023
273083
|
}
|
|
273024
273084
|
function generateCodeChallenge(verifier) {
|
|
273025
|
-
const hash3 =
|
|
273085
|
+
const hash3 = createHash21("sha256");
|
|
273026
273086
|
hash3.update(verifier);
|
|
273027
273087
|
return base64URLEncode(hash3.digest());
|
|
273028
273088
|
}
|
|
@@ -273346,9 +273406,9 @@ async function assertMinVersion() {
|
|
|
273346
273406
|
if (false) {}
|
|
273347
273407
|
try {
|
|
273348
273408
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
273349
|
-
if (versionConfig.minVersion && lt("1.
|
|
273409
|
+
if (versionConfig.minVersion && lt("1.50.0", versionConfig.minVersion)) {
|
|
273350
273410
|
console.error(`
|
|
273351
|
-
It looks like your version of UR (${"1.
|
|
273411
|
+
It looks like your version of UR (${"1.50.0"}) needs an update.
|
|
273352
273412
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
273353
273413
|
|
|
273354
273414
|
To update, please run:
|
|
@@ -273564,7 +273624,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
273564
273624
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
273565
273625
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
273566
273626
|
pid: process.pid,
|
|
273567
|
-
currentVersion: "1.
|
|
273627
|
+
currentVersion: "1.50.0"
|
|
273568
273628
|
});
|
|
273569
273629
|
return "in_progress";
|
|
273570
273630
|
}
|
|
@@ -273573,7 +273633,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
273573
273633
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
273574
273634
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
273575
273635
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
273576
|
-
currentVersion: "1.
|
|
273636
|
+
currentVersion: "1.50.0"
|
|
273577
273637
|
});
|
|
273578
273638
|
console.error(`
|
|
273579
273639
|
Error: Windows NPM detected in WSL
|
|
@@ -274108,7 +274168,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
274108
274168
|
}
|
|
274109
274169
|
async function getDoctorDiagnostic() {
|
|
274110
274170
|
const installationType = await getCurrentInstallationType();
|
|
274111
|
-
const version2 = typeof MACRO !== "undefined" ? "1.
|
|
274171
|
+
const version2 = typeof MACRO !== "undefined" ? "1.50.0" : "unknown";
|
|
274112
274172
|
const installationPath = await getInstallationPath();
|
|
274113
274173
|
const invokedBinary = getInvokedBinary();
|
|
274114
274174
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -274226,7 +274286,7 @@ function getUserBinDir(options2) {
|
|
|
274226
274286
|
var init_xdg = () => {};
|
|
274227
274287
|
|
|
274228
274288
|
// src/utils/nativeInstaller/download.ts
|
|
274229
|
-
import { createHash as
|
|
274289
|
+
import { createHash as createHash22 } from "crypto";
|
|
274230
274290
|
import { chmod as chmod4, writeFile as writeFile13 } from "fs/promises";
|
|
274231
274291
|
import { join as join80 } from "path";
|
|
274232
274292
|
async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
@@ -274412,7 +274472,7 @@ async function downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath,
|
|
|
274412
274472
|
...requestConfig
|
|
274413
274473
|
});
|
|
274414
274474
|
clearStallTimer();
|
|
274415
|
-
const hash3 =
|
|
274475
|
+
const hash3 = createHash22("sha256");
|
|
274416
274476
|
hash3.update(response.data);
|
|
274417
274477
|
const actualChecksum = hash3.digest("hex");
|
|
274418
274478
|
if (actualChecksum !== expectedChecksum) {
|
|
@@ -275043,8 +275103,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275043
275103
|
const maxVersion = await getMaxVersion();
|
|
275044
275104
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
275045
275105
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
275046
|
-
if (gte("1.
|
|
275047
|
-
logForDebugging(`Native installer: current version ${"1.
|
|
275106
|
+
if (gte("1.50.0", maxVersion)) {
|
|
275107
|
+
logForDebugging(`Native installer: current version ${"1.50.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
275048
275108
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
275049
275109
|
latency_ms: Date.now() - startTime,
|
|
275050
275110
|
max_version: maxVersion,
|
|
@@ -275055,7 +275115,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275055
275115
|
version2 = maxVersion;
|
|
275056
275116
|
}
|
|
275057
275117
|
}
|
|
275058
|
-
if (!forceReinstall && version2 === "1.
|
|
275118
|
+
if (!forceReinstall && version2 === "1.50.0" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
275059
275119
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
275060
275120
|
logEvent("tengu_native_update_complete", {
|
|
275061
275121
|
latency_ms: Date.now() - startTime,
|
|
@@ -295756,11 +295816,11 @@ var init_skillUsageTracking = __esm(() => {
|
|
|
295756
295816
|
});
|
|
295757
295817
|
|
|
295758
295818
|
// src/utils/telemetry/pluginTelemetry.ts
|
|
295759
|
-
import { createHash as
|
|
295819
|
+
import { createHash as createHash23 } from "crypto";
|
|
295760
295820
|
import { sep as sep14 } from "path";
|
|
295761
295821
|
function hashPluginId(name, marketplace) {
|
|
295762
295822
|
const key = marketplace ? `${name}@${marketplace.toLowerCase()}` : name;
|
|
295763
|
-
return
|
|
295823
|
+
return createHash23("sha256").update(key + PLUGIN_ID_HASH_SALT).digest("hex").slice(0, 16);
|
|
295764
295824
|
}
|
|
295765
295825
|
function getTelemetryPluginScope(name, marketplace, managedNames) {
|
|
295766
295826
|
if (marketplace === BUILTIN_MARKETPLACE_NAME2)
|
|
@@ -298154,7 +298214,7 @@ var init_sessionIngress = __esm(() => {
|
|
|
298154
298214
|
});
|
|
298155
298215
|
|
|
298156
298216
|
// src/utils/fileHistory.ts
|
|
298157
|
-
import { createHash as
|
|
298217
|
+
import { createHash as createHash24 } from "crypto";
|
|
298158
298218
|
import {
|
|
298159
298219
|
chmod as chmod6,
|
|
298160
298220
|
copyFile as copyFile3,
|
|
@@ -298578,7 +298638,7 @@ async function computeDiffStatsForFile(originalFile, backupFileName) {
|
|
|
298578
298638
|
};
|
|
298579
298639
|
}
|
|
298580
298640
|
function getBackupFileName(filePath, version2) {
|
|
298581
|
-
const fileNameHash =
|
|
298641
|
+
const fileNameHash = createHash24("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
298582
298642
|
return `${fileNameHash}@v${version2}`;
|
|
298583
298643
|
}
|
|
298584
298644
|
function resolveBackupPath(backupFileName, sessionId) {
|
|
@@ -301184,11 +301244,11 @@ var init_filesApi = __esm(() => {
|
|
|
301184
301244
|
});
|
|
301185
301245
|
|
|
301186
301246
|
// src/utils/tempfile.ts
|
|
301187
|
-
import { createHash as
|
|
301247
|
+
import { createHash as createHash25, randomUUID as randomUUID29 } from "crypto";
|
|
301188
301248
|
import { tmpdir as tmpdir6 } from "os";
|
|
301189
301249
|
import { join as join91 } from "path";
|
|
301190
301250
|
function generateTempFilePath(prefix = "ur-prompt", extension = ".md", options2) {
|
|
301191
|
-
const id = options2?.contentHash ?
|
|
301251
|
+
const id = options2?.contentHash ? createHash25("sha256").update(options2.contentHash).digest("hex").slice(0, 16) : randomUUID29();
|
|
301192
301252
|
return join91(tmpdir6(), `${prefix}-${id}${extension}`);
|
|
301193
301253
|
}
|
|
301194
301254
|
var init_tempfile = () => {};
|
|
@@ -317108,16 +317168,16 @@ import {
|
|
|
317108
317168
|
writeFileSync as writeFileSync17
|
|
317109
317169
|
} from "fs";
|
|
317110
317170
|
import {
|
|
317111
|
-
createHash as
|
|
317112
|
-
createPrivateKey,
|
|
317113
|
-
createPublicKey,
|
|
317171
|
+
createHash as createHash26,
|
|
317172
|
+
createPrivateKey as createPrivateKey2,
|
|
317173
|
+
createPublicKey as createPublicKey2,
|
|
317114
317174
|
randomUUID as randomUUID33,
|
|
317115
317175
|
sign as sign2,
|
|
317116
317176
|
verify
|
|
317117
317177
|
} from "crypto";
|
|
317118
317178
|
import { basename as basename25, join as join95, relative as relative20, sep as sep18 } from "path";
|
|
317119
317179
|
function sha256(value) {
|
|
317120
|
-
return
|
|
317180
|
+
return createHash26("sha256").update(value).digest("hex");
|
|
317121
317181
|
}
|
|
317122
317182
|
function stableJson2(value) {
|
|
317123
317183
|
if (Array.isArray(value))
|
|
@@ -317288,7 +317348,7 @@ function canonicalSignaturePayload(input) {
|
|
|
317288
317348
|
}), "utf8");
|
|
317289
317349
|
}
|
|
317290
317350
|
function keyFingerprint(key) {
|
|
317291
|
-
const der =
|
|
317351
|
+
const der = createPublicKey2(key).export({ type: "spki", format: "der" });
|
|
317292
317352
|
return sha256(der);
|
|
317293
317353
|
}
|
|
317294
317354
|
function trustedSkillKeysPath() {
|
|
@@ -317313,7 +317373,7 @@ function loadTrustedSkillKeys(path13 = trustedSkillKeysPath()) {
|
|
|
317313
317373
|
if (!KEY_ID.test(keyId) || typeof value !== "string") {
|
|
317314
317374
|
throw new Error("Trusted skill key store contains an invalid key entry");
|
|
317315
317375
|
}
|
|
317316
|
-
|
|
317376
|
+
createPublicKey2(value);
|
|
317317
317377
|
keys2[keyId] = value;
|
|
317318
317378
|
}
|
|
317319
317379
|
return keys2;
|
|
@@ -317372,7 +317432,7 @@ function verifyManifest(skillDir, name, tree, permissionDigest, trustedKeys) {
|
|
|
317372
317432
|
if (signature.length !== 64) {
|
|
317373
317433
|
return { status: "invalid", ...base2, reason: "Ed25519 signature length is invalid" };
|
|
317374
317434
|
}
|
|
317375
|
-
const valid = verify(null, canonicalSignaturePayload(manifest),
|
|
317435
|
+
const valid = verify(null, canonicalSignaturePayload(manifest), createPublicKey2(candidate), signature);
|
|
317376
317436
|
if (!valid)
|
|
317377
317437
|
return { status: "invalid", ...base2, reason: "signature verification failed" };
|
|
317378
317438
|
return { status: trustedKey ? "verified" : "verified-untrusted", ...base2 };
|
|
@@ -317432,11 +317492,11 @@ function signSkillDirectory(options2) {
|
|
|
317432
317492
|
if (inspected.tree.hasSymlinks) {
|
|
317433
317493
|
throw new Error("Cannot sign a skill directory containing symlinks");
|
|
317434
317494
|
}
|
|
317435
|
-
const privateKey =
|
|
317495
|
+
const privateKey = createPrivateKey2(options2.privateKey);
|
|
317436
317496
|
if (privateKey.asymmetricKeyType !== "ed25519") {
|
|
317437
317497
|
throw new Error("Skill signing requires an Ed25519 private key");
|
|
317438
317498
|
}
|
|
317439
|
-
const publicKey =
|
|
317499
|
+
const publicKey = createPublicKey2(privateKey).export({
|
|
317440
317500
|
type: "spki",
|
|
317441
317501
|
format: "pem"
|
|
317442
317502
|
});
|
|
@@ -318398,12 +318458,12 @@ var init_diff2 = __esm(() => {
|
|
|
318398
318458
|
});
|
|
318399
318459
|
|
|
318400
318460
|
// src/utils/fileOperationAnalytics.ts
|
|
318401
|
-
import { createHash as
|
|
318461
|
+
import { createHash as createHash27 } from "crypto";
|
|
318402
318462
|
function hashFilePath(filePath) {
|
|
318403
|
-
return
|
|
318463
|
+
return createHash27("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
318404
318464
|
}
|
|
318405
318465
|
function hashFileContent(content) {
|
|
318406
|
-
return
|
|
318466
|
+
return createHash27("sha256").update(content).digest("hex");
|
|
318407
318467
|
}
|
|
318408
318468
|
function logFileOperation(params) {
|
|
318409
318469
|
const metadata = {
|
|
@@ -329149,7 +329209,7 @@ var init_embeddings = __esm(() => {
|
|
|
329149
329209
|
});
|
|
329150
329210
|
|
|
329151
329211
|
// src/utils/codeIndex/store.ts
|
|
329152
|
-
import { createHash as
|
|
329212
|
+
import { createHash as createHash28 } from "crypto";
|
|
329153
329213
|
import { mkdir as mkdir22, readFile as readFile26, writeFile as writeFile22 } from "fs/promises";
|
|
329154
329214
|
import { dirname as dirname44, join as join104 } from "path";
|
|
329155
329215
|
function codeIndexDir(root2) {
|
|
@@ -329159,7 +329219,7 @@ function indexPath(root2) {
|
|
|
329159
329219
|
return join104(codeIndexDir(root2), "index.json");
|
|
329160
329220
|
}
|
|
329161
329221
|
function sha1(content) {
|
|
329162
|
-
return
|
|
329222
|
+
return createHash28("sha1").update(content).digest("hex");
|
|
329163
329223
|
}
|
|
329164
329224
|
function cosineSimilarity(a2, b) {
|
|
329165
329225
|
if (a2.length === 0 || a2.length !== b.length) {
|
|
@@ -329708,11 +329768,11 @@ var init_graph = __esm(() => {
|
|
|
329708
329768
|
});
|
|
329709
329769
|
|
|
329710
329770
|
// src/utils/codeIndex/repoIndex.ts
|
|
329711
|
-
import { createHash as
|
|
329771
|
+
import { createHash as createHash29 } from "crypto";
|
|
329712
329772
|
import { existsSync as existsSync26, mkdirSync as mkdirSync18, readFileSync as readFileSync29, writeFileSync as writeFileSync19 } from "fs";
|
|
329713
329773
|
import { join as join106, posix as posix7 } from "path";
|
|
329714
329774
|
function sha12(content) {
|
|
329715
|
-
return
|
|
329775
|
+
return createHash29("sha1").update(content).digest("hex");
|
|
329716
329776
|
}
|
|
329717
329777
|
function posixExt(file2) {
|
|
329718
329778
|
const dot = file2.lastIndexOf(".");
|
|
@@ -344545,7 +344605,7 @@ var init_stream3 = __esm(() => {
|
|
|
344545
344605
|
});
|
|
344546
344606
|
|
|
344547
344607
|
// src/utils/telemetry/betaSessionTracing.ts
|
|
344548
|
-
import { createHash as
|
|
344608
|
+
import { createHash as createHash30 } from "crypto";
|
|
344549
344609
|
function clearBetaTracingState() {
|
|
344550
344610
|
seenHashes.clear();
|
|
344551
344611
|
lastReportedMessageHash.clear();
|
|
@@ -344572,7 +344632,7 @@ function truncateContent(content, maxSize = MAX_CONTENT_SIZE) {
|
|
|
344572
344632
|
};
|
|
344573
344633
|
}
|
|
344574
344634
|
function shortHash(content) {
|
|
344575
|
-
return
|
|
344635
|
+
return createHash30("sha256").update(content).digest("hex").slice(0, 12);
|
|
344576
344636
|
}
|
|
344577
344637
|
function hashSystemPrompt(systemPrompt) {
|
|
344578
344638
|
return `sp_${shortHash(systemPrompt)}`;
|
|
@@ -344848,7 +344908,7 @@ function isAnyTracingEnabled() {
|
|
|
344848
344908
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
344849
344909
|
}
|
|
344850
344910
|
function getTracer() {
|
|
344851
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.
|
|
344911
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.50.0");
|
|
344852
344912
|
}
|
|
344853
344913
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
344854
344914
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -353440,7 +353500,7 @@ var init_toolSearch = __esm(() => {
|
|
|
353440
353500
|
});
|
|
353441
353501
|
|
|
353442
353502
|
// src/services/vcr.ts
|
|
353443
|
-
import { createHash as
|
|
353503
|
+
import { createHash as createHash31, randomUUID as randomUUID37 } from "crypto";
|
|
353444
353504
|
import { mkdir as mkdir24, readFile as readFile33, writeFile as writeFile24 } from "fs/promises";
|
|
353445
353505
|
import { dirname as dirname46, join as join111 } from "path";
|
|
353446
353506
|
function shouldUseVCR() {
|
|
@@ -353454,7 +353514,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
353454
353514
|
if (!shouldUseVCR()) {
|
|
353455
353515
|
return await f();
|
|
353456
353516
|
}
|
|
353457
|
-
const hash3 =
|
|
353517
|
+
const hash3 = createHash31("sha1").update(jsonStringify(input)).digest("hex").slice(0, 12);
|
|
353458
353518
|
const filename = join111(process.env.UR_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${fixtureName}-${hash3}.json`);
|
|
353459
353519
|
try {
|
|
353460
353520
|
const cached5 = jsonParse(await readFile33(filename, { encoding: "utf8" }));
|
|
@@ -353489,7 +353549,7 @@ async function withVCR(messages, f) {
|
|
|
353489
353549
|
return true;
|
|
353490
353550
|
}));
|
|
353491
353551
|
const dehydratedInput = mapMessages(messagesForAPI.map((_) => _.message.content), dehydrateValue);
|
|
353492
|
-
const filename = join111(process.env.UR_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_) =>
|
|
353552
|
+
const filename = join111(process.env.UR_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_) => createHash31("sha1").update(jsonStringify(_)).digest("hex").slice(0, 6)).join("-")}.json`);
|
|
353493
353553
|
try {
|
|
353494
353554
|
const cached5 = jsonParse(await readFile33(filename, { encoding: "utf8" }));
|
|
353495
353555
|
cached5.output.forEach(addCachedCostToTotalSessionCost);
|
|
@@ -360416,7 +360476,7 @@ var init_managedPlugins = __esm(() => {
|
|
|
360416
360476
|
});
|
|
360417
360477
|
|
|
360418
360478
|
// src/utils/plugins/pluginVersioning.ts
|
|
360419
|
-
import { createHash as
|
|
360479
|
+
import { createHash as createHash32 } from "crypto";
|
|
360420
360480
|
async function calculatePluginVersion(pluginId, source, manifest, installPath, providedVersion, gitCommitSha) {
|
|
360421
360481
|
if (manifest?.version) {
|
|
360422
360482
|
logForDebugging(`Using manifest version for ${pluginId}: ${manifest.version}`);
|
|
@@ -360430,7 +360490,7 @@ async function calculatePluginVersion(pluginId, source, manifest, installPath, p
|
|
|
360430
360490
|
const shortSha = gitCommitSha.substring(0, 12);
|
|
360431
360491
|
if (typeof source === "object" && source.source === "git-subdir") {
|
|
360432
360492
|
const normPath = source.path.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
360433
|
-
const pathHash =
|
|
360493
|
+
const pathHash = createHash32("sha256").update(normPath).digest("hex").substring(0, 8);
|
|
360434
360494
|
const v = `${shortSha}-${pathHash}`;
|
|
360435
360495
|
logForDebugging(`Using git-subdir SHA+path version for ${pluginId}: ${v} (path=${normPath})`);
|
|
360436
360496
|
return v;
|
|
@@ -369650,14 +369710,14 @@ var init_terminalSetup = __esm(() => {
|
|
|
369650
369710
|
});
|
|
369651
369711
|
|
|
369652
369712
|
// src/utils/pasteStore.ts
|
|
369653
|
-
import { createHash as
|
|
369713
|
+
import { createHash as createHash33 } from "crypto";
|
|
369654
369714
|
import { mkdir as mkdir28, readdir as readdir22, readFile as readFile39, stat as stat37, unlink as unlink17, writeFile as writeFile30 } from "fs/promises";
|
|
369655
369715
|
import { join as join126 } from "path";
|
|
369656
369716
|
function getPasteStoreDir() {
|
|
369657
369717
|
return join126(getURConfigHomeDir(), PASTE_STORE_DIR);
|
|
369658
369718
|
}
|
|
369659
369719
|
function hashPastedText(content) {
|
|
369660
|
-
return
|
|
369720
|
+
return createHash33("sha256").update(content).digest("hex").slice(0, 16);
|
|
369661
369721
|
}
|
|
369662
369722
|
function getPastePath(hash3) {
|
|
369663
369723
|
return join126(getPasteStoreDir(), `${hash3}.txt`);
|
|
@@ -373290,11 +373350,11 @@ var init_sideQuestion = __esm(() => {
|
|
|
373290
373350
|
});
|
|
373291
373351
|
|
|
373292
373352
|
// src/services/sideChats/sideChatStore.ts
|
|
373293
|
-
import { createHash as
|
|
373353
|
+
import { createHash as createHash34, randomUUID as randomUUID41 } from "crypto";
|
|
373294
373354
|
import { existsSync as existsSync29, lstatSync as lstatSync9, readdirSync as readdirSync6 } from "fs";
|
|
373295
373355
|
import { join as join129 } from "path";
|
|
373296
373356
|
function digest2(value) {
|
|
373297
|
-
return `sha256:${
|
|
373357
|
+
return `sha256:${createHash34("sha256").update(value).digest("hex")}`;
|
|
373298
373358
|
}
|
|
373299
373359
|
function stableJson3(value) {
|
|
373300
373360
|
if (Array.isArray(value))
|
|
@@ -373511,7 +373571,7 @@ var init_sideChatStore = __esm(() => {
|
|
|
373511
373571
|
MAX_CONTENT_BYTES = 64 * 1024;
|
|
373512
373572
|
ID_RE2 = /^[a-zA-Z0-9._-]{1,200}$/;
|
|
373513
373573
|
DIGEST_RE2 = /^sha256:[a-f0-9]{64}$/;
|
|
373514
|
-
GENESIS = `sha256:${
|
|
373574
|
+
GENESIS = `sha256:${createHash34("sha256").update("ur-side-chat-genesis-v1").digest("hex")}`;
|
|
373515
373575
|
});
|
|
373516
373576
|
|
|
373517
373577
|
// src/commands/btw/btw.tsx
|
|
@@ -373942,7 +374002,7 @@ function Feedback({
|
|
|
373942
374002
|
platform: env2.platform,
|
|
373943
374003
|
gitRepo: envInfo.isGit,
|
|
373944
374004
|
terminal: env2.terminal,
|
|
373945
|
-
version: "1.
|
|
374005
|
+
version: "1.50.0",
|
|
373946
374006
|
transcript: normalizeMessagesForAPI(messages),
|
|
373947
374007
|
errors: sanitizedErrors,
|
|
373948
374008
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -374134,7 +374194,7 @@ function Feedback({
|
|
|
374134
374194
|
", ",
|
|
374135
374195
|
env2.terminal,
|
|
374136
374196
|
", v",
|
|
374137
|
-
"1.
|
|
374197
|
+
"1.50.0"
|
|
374138
374198
|
]
|
|
374139
374199
|
}, undefined, true, undefined, this)
|
|
374140
374200
|
]
|
|
@@ -374240,7 +374300,7 @@ ${sanitizedDescription}
|
|
|
374240
374300
|
` + `**Environment Info**
|
|
374241
374301
|
` + `- Platform: ${env2.platform}
|
|
374242
374302
|
` + `- Terminal: ${env2.terminal}
|
|
374243
|
-
` + `- Version: ${"1.
|
|
374303
|
+
` + `- Version: ${"1.50.0"}
|
|
374244
374304
|
` + `- Feedback ID: ${feedbackId}
|
|
374245
374305
|
` + `
|
|
374246
374306
|
**Errors**
|
|
@@ -377351,7 +377411,7 @@ function buildPrimarySection() {
|
|
|
377351
377411
|
}, undefined, false, undefined, this);
|
|
377352
377412
|
return [{
|
|
377353
377413
|
label: "Version",
|
|
377354
|
-
value: "1.
|
|
377414
|
+
value: "1.50.0"
|
|
377355
377415
|
}, {
|
|
377356
377416
|
label: "Session name",
|
|
377357
377417
|
value: nameValue
|
|
@@ -380681,7 +380741,7 @@ function Config({
|
|
|
380681
380741
|
}
|
|
380682
380742
|
}, undefined, false, undefined, this)
|
|
380683
380743
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
|
|
380684
|
-
currentVersion: "1.
|
|
380744
|
+
currentVersion: "1.50.0",
|
|
380685
380745
|
onChoice: (choice) => {
|
|
380686
380746
|
setShowSubmenu(null);
|
|
380687
380747
|
setTabsHidden(false);
|
|
@@ -380693,7 +380753,7 @@ function Config({
|
|
|
380693
380753
|
autoUpdatesChannel: "stable"
|
|
380694
380754
|
};
|
|
380695
380755
|
if (choice === "stay") {
|
|
380696
|
-
newSettings.minimumVersion = "1.
|
|
380756
|
+
newSettings.minimumVersion = "1.50.0";
|
|
380697
380757
|
}
|
|
380698
380758
|
updateSettingsForSource("userSettings", newSettings);
|
|
380699
380759
|
setSettingsData((prev_27) => ({
|
|
@@ -388763,7 +388823,7 @@ function HelpV2(t0) {
|
|
|
388763
388823
|
let t6;
|
|
388764
388824
|
if ($2[31] !== tabs) {
|
|
388765
388825
|
t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
|
|
388766
|
-
title: `UR v${"1.
|
|
388826
|
+
title: `UR v${"1.50.0"}`,
|
|
388767
388827
|
color: "professionalBlue",
|
|
388768
388828
|
defaultTab: "general",
|
|
388769
388829
|
children: tabs
|
|
@@ -389680,7 +389740,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
389680
389740
|
async function handleInitialize(options2) {
|
|
389681
389741
|
return {
|
|
389682
389742
|
name: "UR",
|
|
389683
|
-
version: "1.
|
|
389743
|
+
version: "1.50.0",
|
|
389684
389744
|
protocolVersion: "0.1.0",
|
|
389685
389745
|
workspaceRoot: options2.cwd,
|
|
389686
389746
|
capabilities: {
|
|
@@ -392383,7 +392443,7 @@ var init_guardrails = __esm(() => {
|
|
|
392383
392443
|
});
|
|
392384
392444
|
|
|
392385
392445
|
// src/services/agents/agenticCi.ts
|
|
392386
|
-
import { createHash as
|
|
392446
|
+
import { createHash as createHash35, randomUUID as randomUUID44 } from "crypto";
|
|
392387
392447
|
import {
|
|
392388
392448
|
existsSync as existsSync32,
|
|
392389
392449
|
mkdtempSync,
|
|
@@ -392403,6 +392463,49 @@ function stringArray2(value) {
|
|
|
392403
392463
|
function isAssociation(value) {
|
|
392404
392464
|
return TRUSTED_GITHUB_ASSOCIATIONS.includes(value);
|
|
392405
392465
|
}
|
|
392466
|
+
function isTriggerEvent(value) {
|
|
392467
|
+
return AGENTIC_CI_TRIGGER_EVENTS.includes(value);
|
|
392468
|
+
}
|
|
392469
|
+
function triggerKeywords(spec) {
|
|
392470
|
+
const config3 = spec.trigger?.issueComment;
|
|
392471
|
+
const keyword = config3?.keyword?.trim() || AGENTIC_CI_DEFAULT_KEYWORD;
|
|
392472
|
+
const aliases = config3?.aliases ?? [...AGENTIC_CI_DEFAULT_ALIASES];
|
|
392473
|
+
const unique = [];
|
|
392474
|
+
for (const candidate of [keyword, ...aliases]) {
|
|
392475
|
+
const trimmed = candidate?.trim();
|
|
392476
|
+
if (!trimmed)
|
|
392477
|
+
continue;
|
|
392478
|
+
if (!unique.some((item) => item.toLowerCase() === trimmed.toLowerCase())) {
|
|
392479
|
+
unique.push(trimmed);
|
|
392480
|
+
}
|
|
392481
|
+
}
|
|
392482
|
+
return unique.sort((a2, b) => b.length - a2.length);
|
|
392483
|
+
}
|
|
392484
|
+
function triggerEvents(spec) {
|
|
392485
|
+
const configured = spec.trigger?.issueComment?.events;
|
|
392486
|
+
return configured?.length ? configured.filter(isTriggerEvent) : [...AGENTIC_CI_TRIGGER_EVENTS];
|
|
392487
|
+
}
|
|
392488
|
+
function findTriggerMention(body, keywords) {
|
|
392489
|
+
const scannable = stripQuotedAndFenced(body);
|
|
392490
|
+
for (const keyword of keywords) {
|
|
392491
|
+
const pattern = new RegExp(`(^|[^\\w@/#-])${escapeRegExp3(keyword)}(?![\\w@/-])`, "i");
|
|
392492
|
+
const match = pattern.exec(scannable);
|
|
392493
|
+
if (!match)
|
|
392494
|
+
continue;
|
|
392495
|
+
const start = match.index + (match[1]?.length ?? 0) + keyword.length;
|
|
392496
|
+
return { keyword, prompt: scannable.slice(start).trim() };
|
|
392497
|
+
}
|
|
392498
|
+
return;
|
|
392499
|
+
}
|
|
392500
|
+
function escapeRegExp3(value) {
|
|
392501
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
392502
|
+
}
|
|
392503
|
+
function stripQuotedAndFenced(body) {
|
|
392504
|
+
const withoutFences = body.replace(/```[\s\S]*?```/g, " ").replace(/~~~[\s\S]*?~~~/g, " ").replace(/`[^`\n]*`/g, " ");
|
|
392505
|
+
return withoutFences.split(`
|
|
392506
|
+
`).filter((line) => !/^\s*>/.test(line)).join(`
|
|
392507
|
+
`);
|
|
392508
|
+
}
|
|
392406
392509
|
function validateAgenticCiSpec(spec) {
|
|
392407
392510
|
const errors4 = [];
|
|
392408
392511
|
const warnings = [];
|
|
@@ -392424,11 +392527,26 @@ function validateAgenticCiSpec(spec) {
|
|
|
392424
392527
|
errors4.push("runner.timeoutMinutes must be an integer between 1 and 120");
|
|
392425
392528
|
}
|
|
392426
392529
|
const issue2 = spec.trigger?.issueComment;
|
|
392427
|
-
if (issue2?.keyword !== undefined) {
|
|
392428
|
-
|
|
392429
|
-
|
|
392530
|
+
if (issue2?.keyword !== undefined && !KEYWORD_RE.test(issue2.keyword)) {
|
|
392531
|
+
errors4.push("trigger.issueComment.keyword is invalid");
|
|
392532
|
+
}
|
|
392533
|
+
for (const alias of issue2?.aliases ?? []) {
|
|
392534
|
+
if (!KEYWORD_RE.test(alias)) {
|
|
392535
|
+
errors4.push(`trigger.issueComment.aliases contains "${alias}"`);
|
|
392536
|
+
}
|
|
392537
|
+
}
|
|
392538
|
+
for (const event of issue2?.events ?? []) {
|
|
392539
|
+
if (!isTriggerEvent(event)) {
|
|
392540
|
+
errors4.push(`trigger.issueComment.events contains "${event}"`);
|
|
392430
392541
|
}
|
|
392431
392542
|
}
|
|
392543
|
+
const publishMode = spec.publish?.mode;
|
|
392544
|
+
if (publishMode !== undefined && !AGENTIC_CI_PUBLISH_MODES.includes(publishMode)) {
|
|
392545
|
+
errors4.push(`publish.mode must be one of ${AGENTIC_CI_PUBLISH_MODES.join(", ")}`);
|
|
392546
|
+
}
|
|
392547
|
+
if (publishMode === "pull-request") {
|
|
392548
|
+
warnings.push('publish.mode "pull-request" grants the publisher job contents:write');
|
|
392549
|
+
}
|
|
392432
392550
|
for (const association of issue2?.allowedAssociations ?? []) {
|
|
392433
392551
|
if (!isAssociation(association)) {
|
|
392434
392552
|
errors4.push(`trigger.issueComment.allowedAssociations contains "${association}"`);
|
|
@@ -392489,6 +392607,7 @@ function parseAgenticCiSpec(text) {
|
|
|
392489
392607
|
const workspace = value.workspace ?? {};
|
|
392490
392608
|
const verification = value.verification ?? {};
|
|
392491
392609
|
const outputs = value.outputs ?? {};
|
|
392610
|
+
const publish = value.publish ?? {};
|
|
392492
392611
|
const commands = Array.isArray(verification.commands) ? verification.commands.map((item) => {
|
|
392493
392612
|
const command5 = item && typeof item === "object" ? item : {};
|
|
392494
392613
|
return {
|
|
@@ -392506,7 +392625,9 @@ function parseAgenticCiSpec(text) {
|
|
|
392506
392625
|
manual: trigger.manual === true,
|
|
392507
392626
|
issueComment: issue2 ? {
|
|
392508
392627
|
keyword: typeof issue2.keyword === "string" ? issue2.keyword : undefined,
|
|
392509
|
-
|
|
392628
|
+
aliases: Array.isArray(issue2.aliases) ? stringArray2(issue2.aliases) : undefined,
|
|
392629
|
+
allowedAssociations: stringArray2(issue2.allowedAssociations),
|
|
392630
|
+
events: Array.isArray(issue2.events) ? stringArray2(issue2.events) : undefined
|
|
392510
392631
|
} : undefined
|
|
392511
392632
|
},
|
|
392512
392633
|
runner: {
|
|
@@ -392527,7 +392648,9 @@ function parseAgenticCiSpec(text) {
|
|
|
392527
392648
|
maxSummaryChars: typeof outputs.maxSummaryChars === "number" ? outputs.maxSummaryChars : undefined,
|
|
392528
392649
|
maxPatchBytes: typeof outputs.maxPatchBytes === "number" ? outputs.maxPatchBytes : undefined
|
|
392529
392650
|
},
|
|
392530
|
-
publish: {
|
|
392651
|
+
publish: {
|
|
392652
|
+
mode: typeof publish.mode === "string" ? publish.mode : "comment"
|
|
392653
|
+
}
|
|
392531
392654
|
};
|
|
392532
392655
|
const validation = validateAgenticCiSpec(spec);
|
|
392533
392656
|
if (!validation.valid) {
|
|
@@ -392558,89 +392681,179 @@ function decideAgenticCiEvent(spec, payload, explicitEventName) {
|
|
|
392558
392681
|
reason: "manual trigger is disabled"
|
|
392559
392682
|
};
|
|
392560
392683
|
}
|
|
392561
|
-
const
|
|
392684
|
+
const prompt2 = boundedPrompt(asRecord(root2.inputs).prompt) ?? boundedPrompt(asRecord(root2.workflow_dispatch).prompt);
|
|
392562
392685
|
return {
|
|
392563
392686
|
accepted: true,
|
|
392564
392687
|
source: "manual",
|
|
392565
392688
|
reason: "trusted manual dispatch",
|
|
392566
|
-
prompt
|
|
392689
|
+
prompt: prompt2
|
|
392567
392690
|
};
|
|
392568
392691
|
}
|
|
392569
|
-
|
|
392570
|
-
|
|
392571
|
-
if (!config3) {
|
|
392572
|
-
return {
|
|
392573
|
-
accepted: false,
|
|
392574
|
-
source: "issue_comment",
|
|
392575
|
-
reason: "issue-comment trigger is disabled"
|
|
392576
|
-
};
|
|
392577
|
-
}
|
|
392578
|
-
if (typeof root2.action === "string" && root2.action !== "created") {
|
|
392579
|
-
return {
|
|
392580
|
-
accepted: false,
|
|
392581
|
-
source: "issue_comment",
|
|
392582
|
-
reason: `unsupported issue_comment action "${root2.action}"`
|
|
392583
|
-
};
|
|
392584
|
-
}
|
|
392585
|
-
const comment = asRecord(root2.comment);
|
|
392586
|
-
const actor = typeof asRecord(comment.user).login === "string" ? String(asRecord(comment.user).login) : undefined;
|
|
392587
|
-
const association = typeof comment.author_association === "string" ? comment.author_association.toUpperCase() : "";
|
|
392588
|
-
const allowed = config3.allowedAssociations?.length ? config3.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
392589
|
-
if (!allowed.includes(association)) {
|
|
392590
|
-
return {
|
|
392591
|
-
accepted: false,
|
|
392592
|
-
source: "issue_comment",
|
|
392593
|
-
reason: `actor association "${association || "NONE"}" is not allowed`,
|
|
392594
|
-
actor,
|
|
392595
|
-
association
|
|
392596
|
-
};
|
|
392597
|
-
}
|
|
392598
|
-
const body = boundedPrompt(comment.body);
|
|
392599
|
-
const keyword = config3.keyword?.trim() || "/ur";
|
|
392600
|
-
if (!body) {
|
|
392601
|
-
return {
|
|
392602
|
-
accepted: false,
|
|
392603
|
-
source: "issue_comment",
|
|
392604
|
-
reason: "comment body is empty or too large",
|
|
392605
|
-
actor,
|
|
392606
|
-
association
|
|
392607
|
-
};
|
|
392608
|
-
}
|
|
392609
|
-
const index2 = body.toLowerCase().indexOf(keyword.toLowerCase());
|
|
392610
|
-
if (index2 < 0) {
|
|
392611
|
-
return {
|
|
392612
|
-
accepted: false,
|
|
392613
|
-
source: "issue_comment",
|
|
392614
|
-
reason: `comment does not contain "${keyword}"`,
|
|
392615
|
-
actor,
|
|
392616
|
-
association
|
|
392617
|
-
};
|
|
392618
|
-
}
|
|
392619
|
-
const prompt = boundedPrompt(body.slice(index2 + keyword.length));
|
|
392620
|
-
if (!prompt) {
|
|
392621
|
-
return {
|
|
392622
|
-
accepted: false,
|
|
392623
|
-
source: "issue_comment",
|
|
392624
|
-
reason: "trigger contains no bounded task text",
|
|
392625
|
-
actor,
|
|
392626
|
-
association
|
|
392627
|
-
};
|
|
392628
|
-
}
|
|
392692
|
+
const mention = normalizeMentionEvent(root2, eventName);
|
|
392693
|
+
if (!mention) {
|
|
392629
392694
|
return {
|
|
392630
|
-
accepted:
|
|
392631
|
-
source: "
|
|
392632
|
-
reason: "
|
|
392695
|
+
accepted: false,
|
|
392696
|
+
source: "none",
|
|
392697
|
+
reason: "event type is not enabled"
|
|
392698
|
+
};
|
|
392699
|
+
}
|
|
392700
|
+
const { source } = mention;
|
|
392701
|
+
const config3 = spec.trigger?.issueComment;
|
|
392702
|
+
if (!config3) {
|
|
392703
|
+
return { accepted: false, source, reason: "mention trigger is disabled" };
|
|
392704
|
+
}
|
|
392705
|
+
if (!triggerEvents(spec).includes(source)) {
|
|
392706
|
+
return {
|
|
392707
|
+
accepted: false,
|
|
392708
|
+
source,
|
|
392709
|
+
reason: `event "${source}" is not enabled for this spec`
|
|
392710
|
+
};
|
|
392711
|
+
}
|
|
392712
|
+
if (mention.action && !mention.acceptedActions.includes(mention.action)) {
|
|
392713
|
+
return {
|
|
392714
|
+
accepted: false,
|
|
392715
|
+
source,
|
|
392716
|
+
reason: `unsupported ${source} action "${mention.action}"`
|
|
392717
|
+
};
|
|
392718
|
+
}
|
|
392719
|
+
const { actor, association, issueNumber, commentId, isPullRequest } = mention;
|
|
392720
|
+
const allowed = config3.allowedAssociations?.length ? config3.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
392721
|
+
if (!allowed.includes(association)) {
|
|
392722
|
+
return {
|
|
392723
|
+
accepted: false,
|
|
392724
|
+
source,
|
|
392725
|
+
reason: `actor association "${association || "NONE"}" is not allowed`,
|
|
392633
392726
|
actor,
|
|
392634
392727
|
association,
|
|
392635
|
-
|
|
392728
|
+
issueNumber,
|
|
392729
|
+
commentId,
|
|
392730
|
+
isPullRequest
|
|
392731
|
+
};
|
|
392732
|
+
}
|
|
392733
|
+
const body = boundedPrompt(mention.body);
|
|
392734
|
+
if (!body) {
|
|
392735
|
+
return {
|
|
392736
|
+
accepted: false,
|
|
392737
|
+
source,
|
|
392738
|
+
reason: "comment body is empty or too large",
|
|
392739
|
+
actor,
|
|
392740
|
+
association,
|
|
392741
|
+
issueNumber,
|
|
392742
|
+
commentId,
|
|
392743
|
+
isPullRequest
|
|
392744
|
+
};
|
|
392745
|
+
}
|
|
392746
|
+
const keywords = triggerKeywords(spec);
|
|
392747
|
+
const match = findTriggerMention(body, keywords);
|
|
392748
|
+
if (!match) {
|
|
392749
|
+
return {
|
|
392750
|
+
accepted: false,
|
|
392751
|
+
source,
|
|
392752
|
+
reason: `comment does not mention ${keywords.map((k2) => `"${k2}"`).join(" or ")}`,
|
|
392753
|
+
actor,
|
|
392754
|
+
association,
|
|
392755
|
+
issueNumber,
|
|
392756
|
+
commentId,
|
|
392757
|
+
isPullRequest
|
|
392758
|
+
};
|
|
392759
|
+
}
|
|
392760
|
+
const prompt = boundedPrompt(match.prompt);
|
|
392761
|
+
if (!prompt) {
|
|
392762
|
+
return {
|
|
392763
|
+
accepted: false,
|
|
392764
|
+
source,
|
|
392765
|
+
reason: "trigger contains no bounded task text",
|
|
392766
|
+
actor,
|
|
392767
|
+
association,
|
|
392768
|
+
issueNumber,
|
|
392769
|
+
commentId,
|
|
392770
|
+
isPullRequest
|
|
392636
392771
|
};
|
|
392637
392772
|
}
|
|
392638
392773
|
return {
|
|
392639
|
-
accepted:
|
|
392640
|
-
source
|
|
392641
|
-
reason:
|
|
392774
|
+
accepted: true,
|
|
392775
|
+
source,
|
|
392776
|
+
reason: `trusted actor mentioned "${match.keyword}"`,
|
|
392777
|
+
actor,
|
|
392778
|
+
association,
|
|
392779
|
+
prompt,
|
|
392780
|
+
issueNumber,
|
|
392781
|
+
commentId,
|
|
392782
|
+
isPullRequest
|
|
392642
392783
|
};
|
|
392643
392784
|
}
|
|
392785
|
+
function login(value) {
|
|
392786
|
+
const candidate = asRecord(value).login;
|
|
392787
|
+
return typeof candidate === "string" ? candidate : undefined;
|
|
392788
|
+
}
|
|
392789
|
+
function association(value) {
|
|
392790
|
+
const candidate = asRecord(value).author_association;
|
|
392791
|
+
return typeof candidate === "string" ? candidate.toUpperCase() : "";
|
|
392792
|
+
}
|
|
392793
|
+
function numeric(value) {
|
|
392794
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
392795
|
+
}
|
|
392796
|
+
function normalizeMentionEvent(root2, eventName) {
|
|
392797
|
+
const action3 = typeof root2.action === "string" ? root2.action : undefined;
|
|
392798
|
+
const issue2 = asRecord(root2.issue);
|
|
392799
|
+
const pull = asRecord(root2.pull_request);
|
|
392800
|
+
const comment = asRecord(root2.comment);
|
|
392801
|
+
const review = asRecord(root2.review);
|
|
392802
|
+
if (eventName === "pull_request_review_comment") {
|
|
392803
|
+
return {
|
|
392804
|
+
source: "pull_request_review_comment",
|
|
392805
|
+
acceptedActions: ["created"],
|
|
392806
|
+
action: action3,
|
|
392807
|
+
body: comment.body,
|
|
392808
|
+
actor: login(comment.user),
|
|
392809
|
+
association: association(comment),
|
|
392810
|
+
issueNumber: numeric(pull.number),
|
|
392811
|
+
commentId: numeric(comment.id),
|
|
392812
|
+
isPullRequest: true
|
|
392813
|
+
};
|
|
392814
|
+
}
|
|
392815
|
+
if (eventName === "pull_request_review") {
|
|
392816
|
+
return {
|
|
392817
|
+
source: "pull_request_review",
|
|
392818
|
+
acceptedActions: ["submitted", "edited"],
|
|
392819
|
+
action: action3,
|
|
392820
|
+
body: review.body,
|
|
392821
|
+
actor: login(review.user),
|
|
392822
|
+
association: association(review),
|
|
392823
|
+
issueNumber: numeric(pull.number),
|
|
392824
|
+
commentId: numeric(review.id),
|
|
392825
|
+
isPullRequest: true
|
|
392826
|
+
};
|
|
392827
|
+
}
|
|
392828
|
+
if (eventName === "issues") {
|
|
392829
|
+
return {
|
|
392830
|
+
source: "issues",
|
|
392831
|
+
acceptedActions: ["opened", "edited", "assigned", "labeled"],
|
|
392832
|
+
action: action3,
|
|
392833
|
+
body: [issue2.title, issue2.body].filter((part) => typeof part === "string").join(`
|
|
392834
|
+
|
|
392835
|
+
`),
|
|
392836
|
+
actor: login(issue2.user),
|
|
392837
|
+
association: association(issue2),
|
|
392838
|
+
issueNumber: numeric(issue2.number),
|
|
392839
|
+
isPullRequest: false
|
|
392840
|
+
};
|
|
392841
|
+
}
|
|
392842
|
+
if (eventName === "issue_comment" || root2.comment !== undefined) {
|
|
392843
|
+
return {
|
|
392844
|
+
source: "issue_comment",
|
|
392845
|
+
acceptedActions: ["created"],
|
|
392846
|
+
action: action3,
|
|
392847
|
+
body: comment.body,
|
|
392848
|
+
actor: login(comment.user),
|
|
392849
|
+
association: association(comment),
|
|
392850
|
+
issueNumber: numeric(issue2.number),
|
|
392851
|
+
commentId: numeric(comment.id),
|
|
392852
|
+
isPullRequest: issue2.pull_request !== undefined
|
|
392853
|
+
};
|
|
392854
|
+
}
|
|
392855
|
+
return;
|
|
392856
|
+
}
|
|
392644
392857
|
function loadAgenticCiEventFile(path17) {
|
|
392645
392858
|
const bytes = readFileSync33(path17);
|
|
392646
392859
|
if (bytes.byteLength > AGENTIC_CI_MAX_EVENT_BYTES) {
|
|
@@ -392714,7 +392927,7 @@ function boundedTail(text, maxChars = AGENTIC_CI_MAX_LOG_CHARS) {
|
|
|
392714
392927
|
return value.length <= maxChars ? value : value.slice(-maxChars);
|
|
392715
392928
|
}
|
|
392716
392929
|
function sha2562(value) {
|
|
392717
|
-
return
|
|
392930
|
+
return createHash35("sha256").update(value).digest("hex");
|
|
392718
392931
|
}
|
|
392719
392932
|
function containsPath(base2, candidate) {
|
|
392720
392933
|
const rel = relative35(resolve49(base2), resolve49(candidate));
|
|
@@ -392885,6 +393098,7 @@ async function runAgenticCi(options2) {
|
|
|
392885
393098
|
const runId = `${Date.now().toString(36)}-${randomUUID44().slice(0, 8)}`;
|
|
392886
393099
|
const manifestPath5 = manifestPathFor(outputRoot, runId);
|
|
392887
393100
|
const eventDecision = options2.event !== undefined ? decideAgenticCiEvent(options2.spec, options2.event, options2.eventName) : undefined;
|
|
393101
|
+
const publishContract = buildPublishContract(options2.spec, eventDecision);
|
|
392888
393102
|
if (eventDecision && !eventDecision.accepted) {
|
|
392889
393103
|
const blocked = {
|
|
392890
393104
|
version: 1,
|
|
@@ -392894,7 +393108,8 @@ async function runAgenticCi(options2) {
|
|
|
392894
393108
|
summary: eventDecision.reason,
|
|
392895
393109
|
checks: [],
|
|
392896
393110
|
violations: [eventDecision.reason],
|
|
392897
|
-
manifestPath: manifestPath5
|
|
393111
|
+
manifestPath: manifestPath5,
|
|
393112
|
+
publish: publishContract
|
|
392898
393113
|
};
|
|
392899
393114
|
writeAgenticCiResult(blocked);
|
|
392900
393115
|
return blocked;
|
|
@@ -392916,7 +393131,8 @@ async function runAgenticCi(options2) {
|
|
|
392916
393131
|
summary: "Dry run: validated spec and event; no worktree or model was started.",
|
|
392917
393132
|
checks: [],
|
|
392918
393133
|
violations: [],
|
|
392919
|
-
manifestPath: manifestPath5
|
|
393134
|
+
manifestPath: manifestPath5,
|
|
393135
|
+
publish: publishContract
|
|
392920
393136
|
};
|
|
392921
393137
|
writeAgenticCiResult(dry);
|
|
392922
393138
|
rmSync9(verificationHome, { recursive: true, force: true });
|
|
@@ -393084,11 +393300,25 @@ async function runAgenticCi(options2) {
|
|
|
393084
393300
|
patch,
|
|
393085
393301
|
checks: checks4,
|
|
393086
393302
|
violations,
|
|
393087
|
-
manifestPath: manifestPath5
|
|
393303
|
+
manifestPath: manifestPath5,
|
|
393304
|
+
publish: publishContract
|
|
393088
393305
|
};
|
|
393089
393306
|
writeAgenticCiResult(result);
|
|
393090
393307
|
return result;
|
|
393091
393308
|
}
|
|
393309
|
+
function buildPublishContract(spec, decision) {
|
|
393310
|
+
const mode = spec.publish?.mode ?? "comment";
|
|
393311
|
+
if (mode === "artifact")
|
|
393312
|
+
return;
|
|
393313
|
+
return {
|
|
393314
|
+
mode,
|
|
393315
|
+
source: decision?.source ?? "manual",
|
|
393316
|
+
actor: decision?.actor,
|
|
393317
|
+
issueNumber: decision?.issueNumber,
|
|
393318
|
+
commentId: decision?.commentId,
|
|
393319
|
+
isPullRequest: decision?.isPullRequest ?? false
|
|
393320
|
+
};
|
|
393321
|
+
}
|
|
393092
393322
|
function defaultAgenticCiSpec(name = "default") {
|
|
393093
393323
|
return {
|
|
393094
393324
|
version: 1,
|
|
@@ -393097,8 +393327,10 @@ function defaultAgenticCiSpec(name = "default") {
|
|
|
393097
393327
|
trigger: {
|
|
393098
393328
|
manual: true,
|
|
393099
393329
|
issueComment: {
|
|
393100
|
-
keyword:
|
|
393101
|
-
|
|
393330
|
+
keyword: AGENTIC_CI_DEFAULT_KEYWORD,
|
|
393331
|
+
aliases: [...AGENTIC_CI_DEFAULT_ALIASES],
|
|
393332
|
+
allowedAssociations: [...TRUSTED_GITHUB_ASSOCIATIONS],
|
|
393333
|
+
events: [...AGENTIC_CI_TRIGGER_EVENTS]
|
|
393102
393334
|
}
|
|
393103
393335
|
},
|
|
393104
393336
|
runner: { maxTurns: 20, timeoutMinutes: 30 },
|
|
@@ -393122,7 +393354,7 @@ function defaultAgenticCiSpec(name = "default") {
|
|
|
393122
393354
|
maxSummaryChars: AGENTIC_CI_MAX_SUMMARY_CHARS,
|
|
393123
393355
|
maxPatchBytes: AGENTIC_CI_MAX_PATCH_BYTES
|
|
393124
393356
|
},
|
|
393125
|
-
publish: { mode: "
|
|
393357
|
+
publish: { mode: "comment" }
|
|
393126
393358
|
};
|
|
393127
393359
|
}
|
|
393128
393360
|
function agenticCiDir(cwd2) {
|
|
@@ -393160,56 +393392,127 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
393160
393392
|
if (spec.name !== specName) {
|
|
393161
393393
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
393162
393394
|
}
|
|
393163
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.
|
|
393395
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.50.0" : "1.50.0");
|
|
393164
393396
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
393165
393397
|
throw new Error("invalid ur-agent package version");
|
|
393166
393398
|
}
|
|
393399
|
+
const issue2 = spec.trigger?.issueComment;
|
|
393400
|
+
const keywords = triggerKeywords(spec);
|
|
393401
|
+
const events2 = triggerEvents(spec);
|
|
393402
|
+
const publishMode = spec.publish?.mode ?? "comment";
|
|
393403
|
+
const publishes = publishMode !== "artifact";
|
|
393404
|
+
const associations = issue2?.allowedAssociations?.length ? issue2.allowedAssociations : [...TRUSTED_GITHUB_ASSOCIATIONS];
|
|
393405
|
+
const trustedActors = `contains(fromJSON('${JSON.stringify(associations)}'), `;
|
|
393406
|
+
const quoted = (value) => `'${value.replaceAll("'", "''")}'`;
|
|
393407
|
+
const mentions = (expression) => keywords.map((word) => `contains(${expression}, ${quoted(word)})`).join(" || ");
|
|
393408
|
+
const gate = (eventName, bodyExpressions, associationExpression) => [
|
|
393409
|
+
"(",
|
|
393410
|
+
` github.event_name == '${eventName}' &&`,
|
|
393411
|
+
` (${bodyExpressions.map(mentions).join(" || ")}) &&`,
|
|
393412
|
+
` ${trustedActors}${associationExpression})`,
|
|
393413
|
+
")"
|
|
393414
|
+
].join(`
|
|
393415
|
+
`);
|
|
393416
|
+
const foldExpression = (text, indent = " ") => text.split(`
|
|
393417
|
+
`).map((line, index2) => index2 === 0 ? line : `${indent}${line}`).join(`
|
|
393418
|
+
`);
|
|
393167
393419
|
const conditions = [];
|
|
393420
|
+
const onBlocks = [];
|
|
393168
393421
|
if (spec.trigger?.manual) {
|
|
393169
393422
|
conditions.push("github.event_name == 'workflow_dispatch'");
|
|
393170
|
-
|
|
393171
|
-
|
|
393172
|
-
|
|
393173
|
-
|
|
393174
|
-
|
|
393175
|
-
|
|
393176
|
-
"
|
|
393177
|
-
" github.event_name == 'issue_comment' &&",
|
|
393178
|
-
` contains(github.event.comment.body, '${keyword}') &&`,
|
|
393179
|
-
` contains(fromJSON('${JSON.stringify(associations)}'), github.event.comment.author_association)`,
|
|
393180
|
-
")"
|
|
393423
|
+
onBlocks.push([
|
|
393424
|
+
" workflow_dispatch:",
|
|
393425
|
+
" inputs:",
|
|
393426
|
+
" prompt:",
|
|
393427
|
+
" description: Bounded task for the isolated agent",
|
|
393428
|
+
" required: false",
|
|
393429
|
+
" type: string"
|
|
393181
393430
|
].join(`
|
|
393182
393431
|
`));
|
|
393183
393432
|
}
|
|
393184
|
-
|
|
393185
|
-
|
|
393186
|
-
|
|
393187
|
-
|
|
393188
|
-
|
|
393189
|
-
|
|
393190
|
-
|
|
393191
|
-
|
|
393192
|
-
|
|
393193
|
-
|
|
393194
|
-
|
|
393195
|
-
|
|
393196
|
-
|
|
393197
|
-
|
|
393198
|
-
|
|
393199
|
-
|
|
393200
|
-
|
|
393201
|
-
|
|
393202
|
-
|
|
393203
|
-
|
|
393204
|
-
|
|
393205
|
-
|
|
393206
|
-
|
|
393207
|
-
|
|
393208
|
-
|
|
393433
|
+
if (issue2) {
|
|
393434
|
+
if (events2.includes("issue_comment")) {
|
|
393435
|
+
onBlocks.push(` issue_comment:
|
|
393436
|
+
types: [created]`);
|
|
393437
|
+
conditions.push(gate("issue_comment", ["github.event.comment.body"], "github.event.comment.author_association"));
|
|
393438
|
+
}
|
|
393439
|
+
if (events2.includes("pull_request_review_comment")) {
|
|
393440
|
+
onBlocks.push(` pull_request_review_comment:
|
|
393441
|
+
types: [created]`);
|
|
393442
|
+
conditions.push(gate("pull_request_review_comment", ["github.event.comment.body"], "github.event.comment.author_association"));
|
|
393443
|
+
}
|
|
393444
|
+
if (events2.includes("pull_request_review")) {
|
|
393445
|
+
onBlocks.push(` pull_request_review:
|
|
393446
|
+
types: [submitted]`);
|
|
393447
|
+
conditions.push(gate("pull_request_review", ["github.event.review.body"], "github.event.review.author_association"));
|
|
393448
|
+
}
|
|
393449
|
+
if (events2.includes("issues")) {
|
|
393450
|
+
onBlocks.push(` issues:
|
|
393451
|
+
types: [opened, assigned]`);
|
|
393452
|
+
conditions.push(gate("issues", ["github.event.issue.body", "github.event.issue.title"], "github.event.issue.author_association"));
|
|
393453
|
+
}
|
|
393454
|
+
}
|
|
393455
|
+
const jobCondition = conditions.length > 0 ? foldExpression(conditions.join(` ||
|
|
393456
|
+
`)) : "false";
|
|
393457
|
+
const artifactName = "ur-agentic-ci-${{ github.run_id }}-${{ github.run_attempt }}";
|
|
393458
|
+
const runUrl = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}";
|
|
393459
|
+
const acknowledgeJob = ` acknowledge:
|
|
393209
393460
|
if: >-
|
|
393210
393461
|
${jobCondition}
|
|
393211
393462
|
runs-on: ubuntu-latest
|
|
393212
|
-
timeout-minutes:
|
|
393463
|
+
timeout-minutes: 5
|
|
393464
|
+
permissions:
|
|
393465
|
+
issues: write
|
|
393466
|
+
pull-requests: write
|
|
393467
|
+
outputs:
|
|
393468
|
+
issue-number: \${{ steps.track.outputs.issue-number }}
|
|
393469
|
+
comment-id: \${{ steps.track.outputs.comment-id }}
|
|
393470
|
+
steps:
|
|
393471
|
+
- name: React and open a tracking comment
|
|
393472
|
+
id: track
|
|
393473
|
+
env:
|
|
393474
|
+
GH_TOKEN: \${{ github.token }}
|
|
393475
|
+
GH_REPO: \${{ github.repository }}
|
|
393476
|
+
RUN_URL: ${runUrl}
|
|
393477
|
+
run: |
|
|
393478
|
+
set -euo pipefail
|
|
393479
|
+
number="$(jq -r '.issue.number // .pull_request.number // empty' "$GITHUB_EVENT_PATH")"
|
|
393480
|
+
comment="$(jq -r '.comment.id // empty' "$GITHUB_EVENT_PATH")"
|
|
393481
|
+
printf 'issue-number=%s\\n' "$number" >> "$GITHUB_OUTPUT"
|
|
393482
|
+
if [ -z "$number" ]; then
|
|
393483
|
+
printf 'comment-id=\\n' >> "$GITHUB_OUTPUT"
|
|
393484
|
+
exit 0
|
|
393485
|
+
fi
|
|
393486
|
+
case "$GITHUB_EVENT_NAME" in
|
|
393487
|
+
issue_comment)
|
|
393488
|
+
[ -z "$comment" ] || gh api --silent --method POST \\
|
|
393489
|
+
"repos/$GH_REPO/issues/comments/$comment/reactions" \\
|
|
393490
|
+
-f content=eyes || true ;;
|
|
393491
|
+
pull_request_review_comment)
|
|
393492
|
+
[ -z "$comment" ] || gh api --silent --method POST \\
|
|
393493
|
+
"repos/$GH_REPO/pulls/comments/$comment/reactions" \\
|
|
393494
|
+
-f content=eyes || true ;;
|
|
393495
|
+
issues)
|
|
393496
|
+
gh api --silent --method POST \\
|
|
393497
|
+
"repos/$GH_REPO/issues/$number/reactions" \\
|
|
393498
|
+
-f content=eyes || true ;;
|
|
393499
|
+
esac
|
|
393500
|
+
body="UR is working on this. [Follow the run]($RUN_URL)."
|
|
393501
|
+
id="$(jq -n --arg body "$body" '{body: $body}' \\
|
|
393502
|
+
| gh api "repos/$GH_REPO/issues/$number/comments" --input - --jq '.id')"
|
|
393503
|
+
printf 'comment-id=%s\\n' "$id" >> "$GITHUB_OUTPUT"
|
|
393504
|
+
|
|
393505
|
+
`;
|
|
393506
|
+
const agentJob = ` agent:
|
|
393507
|
+
${publishes ? ` needs: acknowledge
|
|
393508
|
+
` : ""} if: >-
|
|
393509
|
+
${jobCondition}
|
|
393510
|
+
runs-on: ubuntu-latest
|
|
393511
|
+
timeout-minutes: ${spec.runner?.timeoutMinutes ?? 30}
|
|
393512
|
+
permissions:
|
|
393513
|
+
contents: read
|
|
393514
|
+
issues: read
|
|
393515
|
+
pull-requests: read
|
|
393213
393516
|
steps:
|
|
393214
393517
|
- name: Checkout trusted base
|
|
393215
393518
|
uses: actions/checkout@${CHECKOUT_SHA} # v7.0.0
|
|
@@ -393239,13 +393542,139 @@ jobs:
|
|
|
393239
393542
|
if: always()
|
|
393240
393543
|
uses: actions/upload-artifact@${UPLOAD_ARTIFACT_SHA} # v4.6.2
|
|
393241
393544
|
with:
|
|
393242
|
-
name:
|
|
393545
|
+
name: ${artifactName}
|
|
393243
393546
|
path: \${{ runner.temp }}/ur-agentic-ci
|
|
393244
393547
|
if-no-files-found: error
|
|
393245
393548
|
retention-days: 7
|
|
393246
393549
|
`;
|
|
393550
|
+
const pullRequestSteps = ` - name: Checkout for patch application
|
|
393551
|
+
uses: actions/checkout@${CHECKOUT_SHA} # v7.0.0
|
|
393552
|
+
with:
|
|
393553
|
+
fetch-depth: 0
|
|
393554
|
+
- name: Open a pull request from the verified patch
|
|
393555
|
+
id: pr
|
|
393556
|
+
env:
|
|
393557
|
+
GH_TOKEN: \${{ github.token }}
|
|
393558
|
+
BASE_BRANCH: \${{ github.event.repository.default_branch }}
|
|
393559
|
+
RUN_URL: ${runUrl}
|
|
393560
|
+
run: |
|
|
393561
|
+
set -euo pipefail
|
|
393562
|
+
manifest="$(find "$RUNNER_TEMP/ur-agentic-ci-out" -name manifest.json -print -quit 2>/dev/null || true)"
|
|
393563
|
+
if [ -z "$manifest" ]; then exit 0; fi
|
|
393564
|
+
if [ "$(jq -r '.status' "$manifest")" != "passed" ]; then exit 0; fi
|
|
393565
|
+
relative="$(jq -r '.patch.path // empty' "$manifest")"
|
|
393566
|
+
if [ -z "$relative" ]; then exit 0; fi
|
|
393567
|
+
patch="$(dirname "$manifest")/$relative"
|
|
393568
|
+
run_id="$(jq -r '.runId' "$manifest")"
|
|
393569
|
+
branch="ur/agentic-ci-$run_id"
|
|
393570
|
+
git config user.name 'ur-agent[bot]'
|
|
393571
|
+
git config user.email 'ur-agent[bot]@users.noreply.github.com'
|
|
393572
|
+
git checkout -b "$branch" "$(jq -r '.baseSha' "$manifest")"
|
|
393573
|
+
git apply --index --whitespace=nowarn "$patch"
|
|
393574
|
+
git commit -m "UR: apply verified Agentic CI patch ($run_id)"
|
|
393575
|
+
git push origin "HEAD:$branch"
|
|
393576
|
+
jq -r '.summary' "$manifest" > "$RUNNER_TEMP/ur-pr-body.md"
|
|
393577
|
+
printf '\\nPatch sha256: \`%s\`\\n\\n[Run](%s)\\n' \\
|
|
393578
|
+
"$(jq -r '.patch.sha256' "$manifest")" "$RUN_URL" \\
|
|
393579
|
+
>> "$RUNNER_TEMP/ur-pr-body.md"
|
|
393580
|
+
url="$(gh pr create --base "$BASE_BRANCH" --head "$branch" \\
|
|
393581
|
+
--title "UR: verified patch from run $run_id" \\
|
|
393582
|
+
--body-file "$RUNNER_TEMP/ur-pr-body.md")"
|
|
393583
|
+
printf 'url=%s\\n' "$url" >> "$GITHUB_OUTPUT"
|
|
393584
|
+
`;
|
|
393585
|
+
const publishJob = ` publish:
|
|
393586
|
+
needs: [acknowledge, agent]
|
|
393587
|
+
if: always() && needs.acknowledge.outputs.comment-id != ''
|
|
393588
|
+
runs-on: ubuntu-latest
|
|
393589
|
+
timeout-minutes: 10
|
|
393590
|
+
permissions:
|
|
393591
|
+
contents: ${publishMode === "pull-request" ? "write" : "read"}
|
|
393592
|
+
issues: write
|
|
393593
|
+
pull-requests: write
|
|
393594
|
+
steps:
|
|
393595
|
+
- name: Download agent outputs
|
|
393596
|
+
env:
|
|
393597
|
+
GH_TOKEN: \${{ github.token }}
|
|
393598
|
+
run: |
|
|
393599
|
+
set -euo pipefail
|
|
393600
|
+
mkdir -p "$RUNNER_TEMP/ur-agentic-ci-out"
|
|
393601
|
+
gh run download "$GITHUB_RUN_ID" \\
|
|
393602
|
+
--name "${artifactName}" \\
|
|
393603
|
+
--dir "$RUNNER_TEMP/ur-agentic-ci-out" || true
|
|
393604
|
+
${publishMode === "pull-request" ? pullRequestSteps : ""} - name: Report the result in the thread
|
|
393605
|
+
if: always()
|
|
393606
|
+
env:
|
|
393607
|
+
GH_TOKEN: \${{ github.token }}
|
|
393608
|
+
GH_REPO: \${{ github.repository }}
|
|
393609
|
+
COMMENT_ID: \${{ needs.acknowledge.outputs.comment-id }}
|
|
393610
|
+
AGENT_RESULT: \${{ needs.agent.result }}
|
|
393611
|
+
PR_URL: ${publishMode === "pull-request" ? "${{ steps.pr.outputs.url }}" : ""}
|
|
393612
|
+
RUN_URL: ${runUrl}
|
|
393613
|
+
run: |
|
|
393614
|
+
set -euo pipefail
|
|
393615
|
+
manifest="$(find "$RUNNER_TEMP/ur-agentic-ci-out" -name manifest.json -print -quit 2>/dev/null || true)"
|
|
393616
|
+
out="$RUNNER_TEMP/ur-comment.md"
|
|
393617
|
+
if [ -z "$manifest" ]; then
|
|
393618
|
+
{
|
|
393619
|
+
printf '### UR\\n\\n'
|
|
393620
|
+
printf 'The agent job finished as \`%s\` without producing a manifest.\\n\\n' "$AGENT_RESULT"
|
|
393621
|
+
printf '[Inspect the run](%s)\\n' "$RUN_URL"
|
|
393622
|
+
} > "$out"
|
|
393623
|
+
else
|
|
393624
|
+
status="$(jq -r '.status' "$manifest")"
|
|
393625
|
+
case "$status" in
|
|
393626
|
+
passed) icon='PASSED' ;;
|
|
393627
|
+
failed) icon='FAILED' ;;
|
|
393628
|
+
blocked) icon='BLOCKED' ;;
|
|
393629
|
+
*) icon="$status" ;;
|
|
393630
|
+
esac
|
|
393631
|
+
{
|
|
393632
|
+
printf '### UR \u2014 %s\\n\\n' "$icon"
|
|
393633
|
+
jq -r '.summary' "$manifest"
|
|
393634
|
+
printf '\\n'
|
|
393635
|
+
if [ "$(jq -r '.checks | length' "$manifest")" -gt 0 ]; then
|
|
393636
|
+
printf '\\n| Check | Exit | Duration |\\n| --- | --- | --- |\\n'
|
|
393637
|
+
jq -r '.checks[] | "| \\(.name) | \`\\(.exitCode)\` | \\(.durationMs)ms |"' "$manifest"
|
|
393638
|
+
fi
|
|
393639
|
+
if [ "$(jq -r '.violations // [] | length' "$manifest")" -gt 0 ]; then
|
|
393640
|
+
printf '\\n**Policy violations**\\n\\n'
|
|
393641
|
+
jq -r '.violations[] | "- \\(.)"' "$manifest"
|
|
393642
|
+
fi
|
|
393643
|
+
relative="$(jq -r '.patch.path // empty' "$manifest")"
|
|
393644
|
+
if [ -n "$relative" ]; then
|
|
393645
|
+
printf '\\n<details><summary>Proposed patch (%s bytes, sha256 %s)</summary>\\n\\n' \\
|
|
393646
|
+
"$(jq -r '.patch.bytes' "$manifest")" "$(jq -r '.patch.sha256' "$manifest")"
|
|
393647
|
+
printf '\\n\`\`\`diff\\n'
|
|
393648
|
+
head -c 30000 "$(dirname "$manifest")/$relative" | sed 's/^\`\`\`/ \`\`\`/'
|
|
393649
|
+
printf '\\n\`\`\`\\n\\n</details>\\n'
|
|
393650
|
+
fi
|
|
393651
|
+
if [ -n "\${PR_URL:-}" ]; then
|
|
393652
|
+
printf '\\nOpened %s\\n' "$PR_URL"
|
|
393653
|
+
fi
|
|
393654
|
+
printf '\\n[Full run and artifacts](%s)\\n' "$RUN_URL"
|
|
393655
|
+
} > "$out"
|
|
393656
|
+
fi
|
|
393657
|
+
jq -n --rawfile body "$out" '{body: $body}' \\
|
|
393658
|
+
| gh api --silent --method PATCH \\
|
|
393659
|
+
"repos/$GH_REPO/issues/comments/$COMMENT_ID" --input -
|
|
393660
|
+
`;
|
|
393661
|
+
return `name: UR Agentic CI
|
|
393662
|
+
|
|
393663
|
+
on:
|
|
393664
|
+
${onBlocks.join(`
|
|
393665
|
+
`)}
|
|
393666
|
+
|
|
393667
|
+
permissions: {}
|
|
393668
|
+
|
|
393669
|
+
concurrency:
|
|
393670
|
+
group: ur-agentic-ci-\${{ github.repository }}-\${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
|
|
393671
|
+
cancel-in-progress: false
|
|
393672
|
+
|
|
393673
|
+
jobs:
|
|
393674
|
+
${publishes ? acknowledgeJob : ""}${agentJob}${publishes ? `
|
|
393675
|
+
${publishJob}` : ""}`;
|
|
393247
393676
|
}
|
|
393248
|
-
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) => {
|
|
393677
|
+
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) => {
|
|
393249
393678
|
const result = await execFileNoThrowWithCwd(file2, args, {
|
|
393250
393679
|
cwd: cwd2,
|
|
393251
393680
|
timeout: timeoutMs ?? 10 * 60000,
|
|
@@ -393280,15 +393709,28 @@ var init_agenticCi = __esm(() => {
|
|
|
393280
393709
|
"MEMBER",
|
|
393281
393710
|
"COLLABORATOR"
|
|
393282
393711
|
];
|
|
393712
|
+
AGENTIC_CI_DEFAULT_ALIASES = ["/ur"];
|
|
393713
|
+
AGENTIC_CI_TRIGGER_EVENTS = [
|
|
393714
|
+
"issue_comment",
|
|
393715
|
+
"pull_request_review_comment",
|
|
393716
|
+
"pull_request_review",
|
|
393717
|
+
"issues"
|
|
393718
|
+
];
|
|
393719
|
+
AGENTIC_CI_PUBLISH_MODES = [
|
|
393720
|
+
"artifact",
|
|
393721
|
+
"comment",
|
|
393722
|
+
"pull-request"
|
|
393723
|
+
];
|
|
393283
393724
|
NAME_RE = /^[a-z0-9][a-z0-9-_]{0,63}$/i;
|
|
393284
393725
|
SAFE_PATH_RE = /^[^\0\r\n]{1,512}$/;
|
|
393726
|
+
KEYWORD_RE = /^[A-Za-z0-9@/_+#:.-]{1,64}$/;
|
|
393285
393727
|
SECRET_NAME_RE = /(?:TOKEN|SECRET|PASSWORD|PASSWD|API_KEY|PRIVATE_KEY|CREDENTIAL|AUTH)/i;
|
|
393286
393728
|
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)$/;
|
|
393287
393729
|
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)$/;
|
|
393288
393730
|
});
|
|
393289
393731
|
|
|
393290
393732
|
// src/constants/github-app.ts
|
|
393291
|
-
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
|
|
393733
|
+
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
|
|
393292
393734
|
|
|
393293
393735
|
This PR adds a GitHub Actions workflow that enables UR integration in our repository.
|
|
393294
393736
|
|
|
@@ -393304,26 +393746,45 @@ This PR adds a GitHub Actions workflow that enables UR integration in our reposi
|
|
|
393304
393746
|
|
|
393305
393747
|
### How it works
|
|
393306
393748
|
|
|
393307
|
-
Once this PR is merged, trusted collaborators can
|
|
393308
|
-
|
|
393749
|
+
Once this PR is merged, trusted collaborators can summon UR by writing \`@ur\` followed by a task:
|
|
393750
|
+
|
|
393751
|
+
- an issue comment or pull-request comment
|
|
393752
|
+
- an inline review comment on a diff
|
|
393753
|
+
- a submitted pull-request review
|
|
393754
|
+
- the body or title of a new issue
|
|
393755
|
+
|
|
393756
|
+
UR reacts with \uD83D\uDC40, posts a tracking comment, works in an isolated checkout, and
|
|
393757
|
+
then edits that comment with the summary, verification results, and the proposed
|
|
393758
|
+
patch. The legacy \`/ur\` form still works.
|
|
393759
|
+
|
|
393760
|
+
### Files in this PR
|
|
393761
|
+
|
|
393762
|
+
- \`.github/workflows/ur.yml\` \u2014 the workflow
|
|
393763
|
+
- \`.ur/agentic-ci/default.yaml\` \u2014 the policy spec that governs the run
|
|
393764
|
+
|
|
393765
|
+
Edit the spec to change the keyword, the trusted associations, which events are
|
|
393766
|
+
allowed, the verification commands, or the writable path allowlist.
|
|
393309
393767
|
|
|
393310
393768
|
### Important Notes
|
|
393311
393769
|
|
|
393312
393770
|
- **This workflow won't take effect until this PR is merged**
|
|
393313
|
-
- The workflow runs for manual dispatches and trusted issue comments containing \`/ur\`
|
|
393314
393771
|
- Event text is passed as data, never interpolated into shell source
|
|
393772
|
+
- \`@urgent\` and mentions inside code fences or quoted replies do not trigger a run
|
|
393315
393773
|
|
|
393316
393774
|
### Security
|
|
393317
393775
|
|
|
393318
393776
|
- The API key is securely stored as a GitHub Actions secret
|
|
393319
|
-
- Only owners, members, and collaborators can trigger
|
|
393777
|
+
- Only owners, members, and collaborators can trigger runs
|
|
393320
393778
|
- All UR runs are stored in the GitHub Actions run history
|
|
393321
|
-
- The
|
|
393322
|
-
and emits a bounded hash-addressed patch artifact
|
|
393779
|
+
- The job that reads untrusted comment text holds **no write token**. It runs in
|
|
393780
|
+
a detached worktree and emits a bounded, hash-addressed patch artifact
|
|
393781
|
+
- A separate publisher job holds the write scopes and only ever consumes that
|
|
393782
|
+
artifact, so untrusted input and write access never share a job
|
|
393783
|
+
- Opening pull requests is opt-in: set \`publish.mode: pull-request\` in the spec
|
|
393323
393784
|
|
|
393324
393785
|
There's more information in the [UR repository](https://github.com/Maitham16/UR).
|
|
393325
393786
|
|
|
393326
|
-
After merging this PR, try
|
|
393787
|
+
After merging this PR, try \`@ur investigate this\` in a comment to get started.`, CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: UR Review
|
|
393327
393788
|
|
|
393328
393789
|
on:
|
|
393329
393790
|
pull_request:
|
|
@@ -393356,10 +393817,12 @@ jobs:
|
|
|
393356
393817
|
`;
|
|
393357
393818
|
var init_github_app = __esm(() => {
|
|
393358
393819
|
init_agenticCi();
|
|
393359
|
-
|
|
393820
|
+
import_yaml3 = __toESM(require_dist4(), 1);
|
|
393821
|
+
urVersion2 = typeof MACRO !== "undefined" ? "1.50.0" : "1.50.0";
|
|
393360
393822
|
WORKFLOW_CONTENT = compileAgenticCiWorkflow("default", {
|
|
393361
393823
|
packageVersion: urVersion2
|
|
393362
393824
|
});
|
|
393825
|
+
AGENTIC_CI_SPEC_CONTENT = import_yaml3.stringify(defaultAgenticCiSpec("default"));
|
|
393363
393826
|
});
|
|
393364
393827
|
|
|
393365
393828
|
// src/commands/install-github-app/ApiKeyStep.tsx
|
|
@@ -395362,11 +395825,13 @@ async function createWorkflowFile(repoName, branchName, workflowPath, workflowCo
|
|
|
395362
395825
|
if (checkFileResult.code === 0) {
|
|
395363
395826
|
fileSha = checkFileResult.stdout.trim();
|
|
395364
395827
|
}
|
|
395828
|
+
const ACTION_INPUT = /ur_api_key: \$\{\{ secrets\.UR_API_KEY \}\}/g;
|
|
395829
|
+
const ENV_VAR = /URHQ_API_KEY: \$\{\{ secrets\.UR_API_KEY \}\}/g;
|
|
395365
395830
|
let content = workflowContent;
|
|
395366
395831
|
if (secretName === "UR_CODE_OAUTH_TOKEN") {
|
|
395367
|
-
content =
|
|
395832
|
+
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 }}`);
|
|
395368
395833
|
} else if (secretName !== "UR_API_KEY") {
|
|
395369
|
-
content =
|
|
395834
|
+
content = content.replace(ACTION_INPUT, `ur_api_key: \${{ secrets.${secretName} }}`).replace(ENV_VAR, `URHQ_API_KEY: \${{ secrets.${secretName} }}`);
|
|
395370
395835
|
}
|
|
395371
395836
|
const base64Content = Buffer.from(content).toString("base64");
|
|
395372
395837
|
const apiParams = [
|
|
@@ -395492,6 +395957,11 @@ async function setupGitHubActions(repoName, apiKeyOrOAuthToken, secretName, upda
|
|
|
395492
395957
|
content: WORKFLOW_CONTENT,
|
|
395493
395958
|
message: "UR PR Assistant workflow"
|
|
395494
395959
|
});
|
|
395960
|
+
workflows.push({
|
|
395961
|
+
path: AGENTIC_CI_SPEC_PATH,
|
|
395962
|
+
content: AGENTIC_CI_SPEC_CONTENT,
|
|
395963
|
+
message: "UR Agentic CI policy spec"
|
|
395964
|
+
});
|
|
395495
395965
|
}
|
|
395496
395966
|
if (selectedWorkflows.includes("ur-review")) {
|
|
395497
395967
|
workflows.push({
|
|
@@ -411347,7 +411817,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
411347
411817
|
return [];
|
|
411348
411818
|
}
|
|
411349
411819
|
}
|
|
411350
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.
|
|
411820
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.50.0") {
|
|
411351
411821
|
if (process.env.USER_TYPE === "ant") {
|
|
411352
411822
|
const changelog = "";
|
|
411353
411823
|
if (changelog) {
|
|
@@ -411374,7 +411844,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.48.0")
|
|
|
411374
411844
|
releaseNotes
|
|
411375
411845
|
};
|
|
411376
411846
|
}
|
|
411377
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.
|
|
411847
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.50.0") {
|
|
411378
411848
|
if (process.env.USER_TYPE === "ant") {
|
|
411379
411849
|
const changelog = "";
|
|
411380
411850
|
if (changelog) {
|
|
@@ -414231,7 +414701,7 @@ function getRecentActivitySync() {
|
|
|
414231
414701
|
return cachedActivity;
|
|
414232
414702
|
}
|
|
414233
414703
|
function getLogoDisplayData() {
|
|
414234
|
-
const version2 = process.env.DEMO_VERSION ?? "1.
|
|
414704
|
+
const version2 = process.env.DEMO_VERSION ?? "1.50.0";
|
|
414235
414705
|
const serverUrl = getDirectConnectServerUrl();
|
|
414236
414706
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
414237
414707
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -415115,7 +415585,7 @@ function LogoV2() {
|
|
|
415115
415585
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
415116
415586
|
t2 = () => {
|
|
415117
415587
|
const currentConfig2 = getGlobalConfig();
|
|
415118
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.
|
|
415588
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.50.0") {
|
|
415119
415589
|
return;
|
|
415120
415590
|
}
|
|
415121
415591
|
saveGlobalConfig(_temp327);
|
|
@@ -415800,12 +416270,12 @@ function LogoV2() {
|
|
|
415800
416270
|
return t41;
|
|
415801
416271
|
}
|
|
415802
416272
|
function _temp327(current) {
|
|
415803
|
-
if (current.lastReleaseNotesSeen === "1.
|
|
416273
|
+
if (current.lastReleaseNotesSeen === "1.50.0") {
|
|
415804
416274
|
return current;
|
|
415805
416275
|
}
|
|
415806
416276
|
return {
|
|
415807
416277
|
...current,
|
|
415808
|
-
lastReleaseNotesSeen: "1.
|
|
416278
|
+
lastReleaseNotesSeen: "1.50.0"
|
|
415809
416279
|
};
|
|
415810
416280
|
}
|
|
415811
416281
|
function _temp243(s_0) {
|
|
@@ -431301,7 +431771,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
431301
431771
|
path: ".github/workflows/ur.yml",
|
|
431302
431772
|
root: "project",
|
|
431303
431773
|
content: compileAgenticCiWorkflow("default", {
|
|
431304
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.
|
|
431774
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.50.0" : "1.50.0"
|
|
431305
431775
|
})
|
|
431306
431776
|
},
|
|
431307
431777
|
{
|
|
@@ -431364,7 +431834,7 @@ function value(tokens, flag) {
|
|
|
431364
431834
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
431365
431835
|
}
|
|
431366
431836
|
function cliVersion() {
|
|
431367
|
-
return typeof MACRO !== "undefined" ? "1.
|
|
431837
|
+
return typeof MACRO !== "undefined" ? "1.50.0" : "1.50.0";
|
|
431368
431838
|
}
|
|
431369
431839
|
function workflowPath(cwd2) {
|
|
431370
431840
|
return join155(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -437220,7 +437690,7 @@ function createAcpStdioApp(deps) {
|
|
|
437220
437690
|
}
|
|
437221
437691
|
},
|
|
437222
437692
|
authMethods: [],
|
|
437223
|
-
agentInfo: { name: "UR-Nexus", version: "1.
|
|
437693
|
+
agentInfo: { name: "UR-Nexus", version: "1.50.0" }
|
|
437224
437694
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
437225
437695
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
437226
437696
|
await runtime2.announce({
|
|
@@ -437317,7 +437787,7 @@ function createAcpStdioAgent(deps) {
|
|
|
437317
437787
|
}
|
|
437318
437788
|
},
|
|
437319
437789
|
authMethods: [],
|
|
437320
|
-
agentInfo: { name: "UR-Nexus", version: "1.
|
|
437790
|
+
agentInfo: { name: "UR-Nexus", version: "1.50.0" }
|
|
437321
437791
|
});
|
|
437322
437792
|
return;
|
|
437323
437793
|
case "authenticate":
|
|
@@ -438065,7 +438535,7 @@ var init_connect2 = __esm(() => {
|
|
|
438065
438535
|
});
|
|
438066
438536
|
|
|
438067
438537
|
// src/services/agents/scheduler.ts
|
|
438068
|
-
import { createHash as
|
|
438538
|
+
import { createHash as createHash36 } from "crypto";
|
|
438069
438539
|
import { existsSync as existsSync39, mkdirSync as mkdirSync30, unlinkSync as unlinkSync8, writeFileSync as writeFileSync30 } from "fs";
|
|
438070
438540
|
import { homedir as homedir31 } from "os";
|
|
438071
438541
|
import { join as join157 } from "path";
|
|
@@ -438073,7 +438543,7 @@ function defaultBin() {
|
|
|
438073
438543
|
return { file: process.execPath, args: [process.argv[1] ?? ""] };
|
|
438074
438544
|
}
|
|
438075
438545
|
function schedulerLabel(cwd2) {
|
|
438076
|
-
const hash3 =
|
|
438546
|
+
const hash3 = createHash36("sha1").update(cwd2).digest("hex").slice(0, 8);
|
|
438077
438547
|
return `com.ur.automation.${hash3}`;
|
|
438078
438548
|
}
|
|
438079
438549
|
function detectPlatform() {
|
|
@@ -440450,7 +440920,7 @@ function statePath(cwd2, name) {
|
|
|
440450
440920
|
}
|
|
440451
440921
|
function parseWorkflowText(text) {
|
|
440452
440922
|
const trimmed = text.trim();
|
|
440453
|
-
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) :
|
|
440923
|
+
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) : import_yaml5.parse(trimmed);
|
|
440454
440924
|
if (!parsed || typeof parsed !== "object") {
|
|
440455
440925
|
throw new Error("Workflow is not an object");
|
|
440456
440926
|
}
|
|
@@ -440632,7 +441102,7 @@ function saveWorkflow(cwd2, spec, options2 = {}) {
|
|
|
440632
441102
|
if (existsSync44(path22) && options2.force !== true) {
|
|
440633
441103
|
return { path: path22, created: false };
|
|
440634
441104
|
}
|
|
440635
|
-
writeFileSync34(path22, `${
|
|
441105
|
+
writeFileSync34(path22, `${import_yaml5.stringify(spec)}`);
|
|
440636
441106
|
return { path: path22, created: true };
|
|
440637
441107
|
}
|
|
440638
441108
|
function loadRunState(cwd2, name) {
|
|
@@ -440758,10 +441228,10 @@ function formatRunPlan(plan) {
|
|
|
440758
441228
|
return lines.join(`
|
|
440759
441229
|
`);
|
|
440760
441230
|
}
|
|
440761
|
-
var
|
|
441231
|
+
var import_yaml5, KNOWN_AGENTS, NAME_RE2, GATE_LABEL;
|
|
440762
441232
|
var init_workflows = __esm(() => {
|
|
440763
441233
|
init_json();
|
|
440764
|
-
|
|
441234
|
+
import_yaml5 = __toESM(require_dist4(), 1);
|
|
440765
441235
|
KNOWN_AGENTS = [
|
|
440766
441236
|
"general-purpose",
|
|
440767
441237
|
"worker",
|
|
@@ -442258,7 +442728,7 @@ function normalizeSkillStep(raw, index2) {
|
|
|
442258
442728
|
}
|
|
442259
442729
|
function parseSkillYaml(text) {
|
|
442260
442730
|
const trimmed = text.trim();
|
|
442261
|
-
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) :
|
|
442731
|
+
const parsed = trimmed.startsWith("{") ? safeParseJSON(trimmed, false) : import_yaml6.parse(trimmed);
|
|
442262
442732
|
if (!parsed || typeof parsed !== "object") {
|
|
442263
442733
|
throw new Error("Skill spec is not an object");
|
|
442264
442734
|
}
|
|
@@ -442515,12 +442985,12 @@ Executable skill for ${name}.
|
|
|
442515
442985
|
};
|
|
442516
442986
|
}
|
|
442517
442987
|
function stringifySkillYaml(spec) {
|
|
442518
|
-
return
|
|
442988
|
+
return import_yaml6.stringify(spec);
|
|
442519
442989
|
}
|
|
442520
|
-
var
|
|
442990
|
+
var import_yaml6, SKILL_YAML_FILE = "skill.yaml", SKILL_INSTRUCTIONS_FILE = "instructions.md", NAME_RE3;
|
|
442521
442991
|
var init_skillSpec = __esm(() => {
|
|
442522
442992
|
init_json();
|
|
442523
|
-
|
|
442993
|
+
import_yaml6 = __toESM(require_dist4(), 1);
|
|
442524
442994
|
NAME_RE3 = /^[a-z0-9][a-z0-9-_]{0,63}$/i;
|
|
442525
442995
|
});
|
|
442526
442996
|
|
|
@@ -442529,7 +442999,7 @@ var exports_skill = {};
|
|
|
442529
442999
|
__export(exports_skill, {
|
|
442530
443000
|
call: () => call66
|
|
442531
443001
|
});
|
|
442532
|
-
import { generateKeyPairSync, randomUUID as randomUUID47 } from "crypto";
|
|
443002
|
+
import { generateKeyPairSync as generateKeyPairSync2, randomUUID as randomUUID47 } from "crypto";
|
|
442533
443003
|
import {
|
|
442534
443004
|
chmodSync as chmodSync8,
|
|
442535
443005
|
existsSync as existsSync47,
|
|
@@ -442697,7 +443167,7 @@ var VALUE_OPTIONS, call66 = async (args) => {
|
|
|
442697
443167
|
if (existingKeys[name]) {
|
|
442698
443168
|
throw new Error(`Trusted key ID already exists: ${name}`);
|
|
442699
443169
|
}
|
|
442700
|
-
const { privateKey, publicKey } =
|
|
443170
|
+
const { privateKey, publicKey } = generateKeyPairSync2("ed25519");
|
|
442701
443171
|
const privatePem = privateKey.export({ type: "pkcs8", format: "pem" });
|
|
442702
443172
|
const publicPem = publicKey.export({ type: "spki", format: "pem" }).toString();
|
|
442703
443173
|
mkdirSync37(dirname68(privatePath), { recursive: true, mode: 448 });
|
|
@@ -443069,11 +443539,11 @@ var init_worktree2 = __esm(() => {
|
|
|
443069
443539
|
});
|
|
443070
443540
|
|
|
443071
443541
|
// src/services/agents/auditExport.ts
|
|
443072
|
-
import { createHash as
|
|
443542
|
+
import { createHash as createHash37 } from "crypto";
|
|
443073
443543
|
import { existsSync as existsSync48, readFileSync as readFileSync48 } from "fs";
|
|
443074
443544
|
import { join as join168 } from "path";
|
|
443075
443545
|
function chainHash(prev, payload) {
|
|
443076
|
-
return
|
|
443546
|
+
return createHash37("sha256").update(prev).update(JSON.stringify(payload)).digest("hex");
|
|
443077
443547
|
}
|
|
443078
443548
|
function readActionsLedger(cwd2) {
|
|
443079
443549
|
const path22 = join168(cwd2, ".ur", "actions.jsonl");
|
|
@@ -443540,7 +444010,7 @@ var init_recipe2 = __esm(() => {
|
|
|
443540
444010
|
});
|
|
443541
444011
|
|
|
443542
444012
|
// src/services/agents/arena.ts
|
|
443543
|
-
import { createHash as
|
|
444013
|
+
import { createHash as createHash38, randomUUID as randomUUID48 } from "crypto";
|
|
443544
444014
|
import {
|
|
443545
444015
|
existsSync as existsSync52,
|
|
443546
444016
|
mkdirSync as mkdirSync39,
|
|
@@ -443989,7 +444459,7 @@ async function removeWorktree(cwd2, worktree2) {
|
|
|
443989
444459
|
rmSync12(worktree2, { recursive: true, force: true });
|
|
443990
444460
|
}
|
|
443991
444461
|
function sha2563(value2) {
|
|
443992
|
-
return
|
|
444462
|
+
return createHash38("sha256").update(value2).digest("hex");
|
|
443993
444463
|
}
|
|
443994
444464
|
function sanitizeCandidate(candidate, retainWorktree = false) {
|
|
443995
444465
|
return {
|
|
@@ -444401,7 +444871,7 @@ function createDefaultManagedCloudClient() {
|
|
|
444401
444871
|
var init_cloudManagedRunner = () => {};
|
|
444402
444872
|
|
|
444403
444873
|
// src/services/agents/cloudTasks.ts
|
|
444404
|
-
import { createHash as
|
|
444874
|
+
import { createHash as createHash39, randomUUID as randomUUID50 } from "crypto";
|
|
444405
444875
|
import { spawn as spawn14 } from "child_process";
|
|
444406
444876
|
import {
|
|
444407
444877
|
appendFileSync as appendFileSync6,
|
|
@@ -444434,8 +444904,8 @@ function ensureCloudDirectory(cwd2) {
|
|
|
444434
444904
|
assertSafeStateNode(directory, "directory");
|
|
444435
444905
|
}
|
|
444436
444906
|
function boundedInteger(value2, fallback, minimum, maximum) {
|
|
444437
|
-
const
|
|
444438
|
-
return Number.isSafeInteger(
|
|
444907
|
+
const numeric2 = typeof value2 === "number" ? value2 : typeof value2 === "string" && /^\d+$/u.test(value2.trim()) ? Number(value2) : Number.NaN;
|
|
444908
|
+
return Number.isSafeInteger(numeric2) && numeric2 >= minimum ? Math.min(numeric2, maximum) : fallback;
|
|
444439
444909
|
}
|
|
444440
444910
|
function secretValues() {
|
|
444441
444911
|
return Object.entries(process.env).filter(([name, value2]) => isSecretLikeSubprocessEnvName(name) && (value2?.length ?? 0) >= 6).map(([, value2]) => value2).sort((left, right) => right.length - left.length);
|
|
@@ -445065,7 +445535,7 @@ async function steerCloudTask(cwd2, id, message, options2 = {}) {
|
|
|
445065
445535
|
reason: "message must be between 1 byte and 64 KiB"
|
|
445066
445536
|
};
|
|
445067
445537
|
}
|
|
445068
|
-
const messageSha256 =
|
|
445538
|
+
const messageSha256 = createHash39("sha256").update(trimmed).digest("hex");
|
|
445069
445539
|
const reservation = withManifestMutation(cwd2, (manifest) => {
|
|
445070
445540
|
const task = manifest.tasks.find((candidate) => candidate.id === id);
|
|
445071
445541
|
if (!task)
|
|
@@ -449809,7 +450279,7 @@ var init_escalate2 = __esm(() => {
|
|
|
449809
450279
|
});
|
|
449810
450280
|
|
|
449811
450281
|
// src/services/agents/learnedPlaybooks.ts
|
|
449812
|
-
import { createHash as
|
|
450282
|
+
import { createHash as createHash40 } from "crypto";
|
|
449813
450283
|
import {
|
|
449814
450284
|
chmodSync as chmodSync10,
|
|
449815
450285
|
existsSync as existsSync66,
|
|
@@ -449824,7 +450294,7 @@ function storePath(cwd2) {
|
|
|
449824
450294
|
return join185(learningDir2(cwd2), "playbooks.json");
|
|
449825
450295
|
}
|
|
449826
450296
|
function digest3(value2) {
|
|
449827
|
-
return `sha256:${
|
|
450297
|
+
return `sha256:${createHash40("sha256").update(JSON.stringify(value2)).digest("hex")}`;
|
|
449828
450298
|
}
|
|
449829
450299
|
function emptyStore() {
|
|
449830
450300
|
return { version: 1, candidates: [] };
|
|
@@ -450029,7 +450499,7 @@ function mineLearnedPlaybooks(cwd2, options2 = {}) {
|
|
|
450029
450499
|
}));
|
|
450030
450500
|
generated.push({
|
|
450031
450501
|
version: 1,
|
|
450032
|
-
id: `lp-${
|
|
450502
|
+
id: `lp-${createHash40("sha256").update(fingerprint2).digest("hex").slice(0, 16)}`,
|
|
450033
450503
|
name,
|
|
450034
450504
|
status: "candidate",
|
|
450035
450505
|
revision: 1,
|
|
@@ -453996,7 +454466,7 @@ var init_sdk2 = __esm(() => {
|
|
|
453996
454466
|
});
|
|
453997
454467
|
|
|
453998
454468
|
// src/services/agents/trajectory.ts
|
|
453999
|
-
import { createHash as
|
|
454469
|
+
import { createHash as createHash41 } from "crypto";
|
|
454000
454470
|
function record3(value2) {
|
|
454001
454471
|
return value2 && typeof value2 === "object" ? value2 : {};
|
|
454002
454472
|
}
|
|
@@ -454009,7 +454479,7 @@ function normalizeTrajectoryTool(value2) {
|
|
|
454009
454479
|
function opaqueId(value2) {
|
|
454010
454480
|
if (typeof value2 !== "string" || !value2)
|
|
454011
454481
|
return;
|
|
454012
|
-
return
|
|
454482
|
+
return createHash41("sha256").update(value2).digest("hex").slice(0, 16);
|
|
454013
454483
|
}
|
|
454014
454484
|
function contentBlocks(message) {
|
|
454015
454485
|
const content = record3(message).content;
|
|
@@ -456950,7 +457420,7 @@ var init_os2 = __esm(() => {
|
|
|
456950
457420
|
});
|
|
456951
457421
|
|
|
456952
457422
|
// src/services/agents/workspaceCoordinator.ts
|
|
456953
|
-
import { createHash as
|
|
457423
|
+
import { createHash as createHash42, randomUUID as randomUUID53 } from "crypto";
|
|
456954
457424
|
import { existsSync as existsSync76, lstatSync as lstatSync18, realpathSync as realpathSync15, rmSync as rmSync17 } from "fs";
|
|
456955
457425
|
import { tmpdir as tmpdir13 } from "os";
|
|
456956
457426
|
import { dirname as dirname72, isAbsolute as isAbsolute42, join as join195, relative as relative46, resolve as resolve63 } from "path";
|
|
@@ -456970,7 +457440,7 @@ function assertId(value2, label) {
|
|
|
456970
457440
|
throw new Error(`Invalid ${label}: ${value2}`);
|
|
456971
457441
|
}
|
|
456972
457442
|
function hash3(value2) {
|
|
456973
|
-
return `sha256:${
|
|
457443
|
+
return `sha256:${createHash42("sha256").update(value2).digest("hex")}`;
|
|
456974
457444
|
}
|
|
456975
457445
|
function stableJson4(value2) {
|
|
456976
457446
|
if (Array.isArray(value2))
|
|
@@ -458055,7 +458525,7 @@ var init_project2 = __esm(() => {
|
|
|
458055
458525
|
});
|
|
458056
458526
|
|
|
458057
458527
|
// src/ur/notes.ts
|
|
458058
|
-
import { createHash as
|
|
458528
|
+
import { createHash as createHash43 } from "crypto";
|
|
458059
458529
|
import { appendFileSync as appendFileSync7, existsSync as existsSync77, mkdirSync as mkdirSync57, readFileSync as readFileSync72, writeFileSync as writeFileSync58 } from "fs";
|
|
458060
458530
|
import { dirname as dirname73, join as join196 } from "path";
|
|
458061
458531
|
function readJsonl(file2) {
|
|
@@ -458079,7 +458549,7 @@ function append2(file2, rec) {
|
|
|
458079
458549
|
}
|
|
458080
458550
|
function memorySlug(text) {
|
|
458081
458551
|
const words = text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").split("-").filter(Boolean).slice(0, 8).join("-");
|
|
458082
|
-
const hash4 =
|
|
458552
|
+
const hash4 = createHash43("sha1").update(text).digest("hex").slice(0, 8);
|
|
458083
458553
|
return `${words || "remembered-note"}-${hash4}`;
|
|
458084
458554
|
}
|
|
458085
458555
|
function yamlSingleQuote(value2) {
|
|
@@ -459076,7 +459546,7 @@ var init_code_index2 = __esm(() => {
|
|
|
459076
459546
|
|
|
459077
459547
|
// node_modules/typescript/lib/typescript.js
|
|
459078
459548
|
var require_typescript2 = __commonJS((exports, module) => {
|
|
459079
|
-
var __dirname = "/
|
|
459549
|
+
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";
|
|
459080
459550
|
/*! *****************************************************************************
|
|
459081
459551
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
459082
459552
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -590216,7 +590686,7 @@ ${newComment.split(`
|
|
|
590216
590686
|
}
|
|
590217
590687
|
}
|
|
590218
590688
|
return result;
|
|
590219
|
-
function
|
|
590689
|
+
function escapeRegExp4(str2) {
|
|
590220
590690
|
return str2.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
590221
590691
|
}
|
|
590222
590692
|
function getTodoCommentsRegExp() {
|
|
@@ -590224,7 +590694,7 @@ ${newComment.split(`
|
|
|
590224
590694
|
const multiLineCommentStart = /(?:\/\*+\s*)/.source;
|
|
590225
590695
|
const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
|
|
590226
590696
|
const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
|
|
590227
|
-
const literals = "(?:" + map3(descriptors2, (d3) => "(" +
|
|
590697
|
+
const literals = "(?:" + map3(descriptors2, (d3) => "(" + escapeRegExp4(d3.text) + ")").join("|") + ")";
|
|
590228
590698
|
const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
|
|
590229
590699
|
const messageRemainder = /(?:.*?)/.source;
|
|
590230
590700
|
const messagePortion = "(" + literals + messageRemainder + ")";
|
|
@@ -609484,14 +609954,14 @@ ${content}
|
|
|
609484
609954
|
function getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) {
|
|
609485
609955
|
const resolvedLocale = getOrganizeImportsLocale(preferences);
|
|
609486
609956
|
const caseFirst = preferences.organizeImportsCaseFirst ?? false;
|
|
609487
|
-
const
|
|
609957
|
+
const numeric2 = preferences.organizeImportsNumericCollation ?? false;
|
|
609488
609958
|
const accents = preferences.organizeImportsAccentCollation ?? true;
|
|
609489
609959
|
const sensitivity = ignoreCase ? accents ? "accent" : "base" : accents ? "variant" : "case";
|
|
609490
609960
|
const collator = new Intl.Collator(resolvedLocale, {
|
|
609491
609961
|
usage: "sort",
|
|
609492
609962
|
caseFirst: caseFirst || "false",
|
|
609493
609963
|
sensitivity,
|
|
609494
|
-
numeric
|
|
609964
|
+
numeric: numeric2
|
|
609495
609965
|
});
|
|
609496
609966
|
return collator.compare;
|
|
609497
609967
|
}
|
|
@@ -644796,7 +645266,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
644796
645266
|
smapsRollup,
|
|
644797
645267
|
platform: process.platform,
|
|
644798
645268
|
nodeVersion: process.version,
|
|
644799
|
-
ccVersion: "1.
|
|
645269
|
+
ccVersion: "1.50.0"
|
|
644800
645270
|
};
|
|
644801
645271
|
}
|
|
644802
645272
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -645382,7 +645852,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
645382
645852
|
var call145 = async () => {
|
|
645383
645853
|
return {
|
|
645384
645854
|
type: "text",
|
|
645385
|
-
value: "1.
|
|
645855
|
+
value: "1.50.0"
|
|
645386
645856
|
};
|
|
645387
645857
|
}, version2, version_default;
|
|
645388
645858
|
var init_version = __esm(() => {
|
|
@@ -656500,7 +656970,7 @@ function generateHtmlReport(data, insights) {
|
|
|
656500
656970
|
</html>`;
|
|
656501
656971
|
}
|
|
656502
656972
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
656503
|
-
const version3 = typeof MACRO !== "undefined" ? "1.
|
|
656973
|
+
const version3 = typeof MACRO !== "undefined" ? "1.50.0" : "unknown";
|
|
656504
656974
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
656505
656975
|
const facets_summary = {
|
|
656506
656976
|
total: facets.size,
|
|
@@ -660833,7 +661303,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
660833
661303
|
init_settings2();
|
|
660834
661304
|
init_slowOperations();
|
|
660835
661305
|
init_uuid();
|
|
660836
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.
|
|
661306
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.50.0" : "unknown";
|
|
660837
661307
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
660838
661308
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
660839
661309
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -662048,7 +662518,7 @@ var init_filesystem = __esm(() => {
|
|
|
662048
662518
|
});
|
|
662049
662519
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
662050
662520
|
const nonce = randomBytes19(16).toString("hex");
|
|
662051
|
-
return join224(getURTempDir(), "bundled-skills", "1.
|
|
662521
|
+
return join224(getURTempDir(), "bundled-skills", "1.50.0", nonce);
|
|
662052
662522
|
});
|
|
662053
662523
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
662054
662524
|
});
|
|
@@ -667900,7 +668370,7 @@ var init_prompts4 = __esm(() => {
|
|
|
667900
668370
|
});
|
|
667901
668371
|
|
|
667902
668372
|
// src/utils/api.ts
|
|
667903
|
-
import { createHash as
|
|
668373
|
+
import { createHash as createHash44 } from "crypto";
|
|
667904
668374
|
function filterSwarmFieldsFromSchema(toolName, schema) {
|
|
667905
668375
|
const fieldsToRemove = SWARM_FIELDS_BY_TOOL[toolName];
|
|
667906
668376
|
if (!fieldsToRemove || fieldsToRemove.length === 0) {
|
|
@@ -667990,7 +668460,7 @@ function logAPIPrefix(systemPrompt) {
|
|
|
667990
668460
|
logEvent("tengu_sysprompt_block", {
|
|
667991
668461
|
snippet: firstSystemPrompt?.slice(0, 20),
|
|
667992
668462
|
length: firstSystemPrompt?.length ?? 0,
|
|
667993
|
-
hash: firstSystemPrompt ?
|
|
668463
|
+
hash: firstSystemPrompt ? createHash44("sha256").update(firstSystemPrompt).digest("hex") : ""
|
|
667994
668464
|
});
|
|
667995
668465
|
}
|
|
667996
668466
|
function splitSysPromptPrefix(systemPrompt, options4) {
|
|
@@ -668316,7 +668786,7 @@ var init_api3 = __esm(() => {
|
|
|
668316
668786
|
});
|
|
668317
668787
|
|
|
668318
668788
|
// src/utils/fingerprint.ts
|
|
668319
|
-
import { createHash as
|
|
668789
|
+
import { createHash as createHash45 } from "crypto";
|
|
668320
668790
|
function extractFirstMessageText(messages) {
|
|
668321
668791
|
const firstUserMessage = messages.find((msg) => msg.type === "user");
|
|
668322
668792
|
if (!firstUserMessage) {
|
|
@@ -668338,12 +668808,12 @@ function computeFingerprint(messageText2, version3) {
|
|
|
668338
668808
|
const indices = [4, 7, 20];
|
|
668339
668809
|
const chars = indices.map((i3) => messageText2[i3] || "0").join("");
|
|
668340
668810
|
const fingerprintInput = `${FINGERPRINT_SALT}${chars}${version3}`;
|
|
668341
|
-
const hash4 =
|
|
668811
|
+
const hash4 = createHash45("sha256").update(fingerprintInput).digest("hex");
|
|
668342
668812
|
return hash4.slice(0, 3);
|
|
668343
668813
|
}
|
|
668344
668814
|
function computeFingerprintFromMessages(messages) {
|
|
668345
668815
|
const firstMessageText = extractFirstMessageText(messages);
|
|
668346
|
-
return computeFingerprint(firstMessageText, "1.
|
|
668816
|
+
return computeFingerprint(firstMessageText, "1.50.0");
|
|
668347
668817
|
}
|
|
668348
668818
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
668349
668819
|
var init_fingerprint = () => {};
|
|
@@ -670239,7 +670709,7 @@ async function sideQuery(opts) {
|
|
|
670239
670709
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
670240
670710
|
}
|
|
670241
670711
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
670242
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.
|
|
670712
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.50.0");
|
|
670243
670713
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
670244
670714
|
const systemBlocks = [
|
|
670245
670715
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -675010,7 +675480,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
675010
675480
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
675011
675481
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
675012
675482
|
betas: getSdkBetas(),
|
|
675013
|
-
ur_version: "1.
|
|
675483
|
+
ur_version: "1.50.0",
|
|
675014
675484
|
output_style: outputStyle2,
|
|
675015
675485
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
675016
675486
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -688870,7 +689340,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
688870
689340
|
function getSemverPart(version3) {
|
|
688871
689341
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
688872
689342
|
}
|
|
688873
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.
|
|
689343
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.50.0") {
|
|
688874
689344
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
|
|
688875
689345
|
if (!updatedVersion) {
|
|
688876
689346
|
return null;
|
|
@@ -688919,7 +689389,7 @@ function AutoUpdater({
|
|
|
688919
689389
|
return;
|
|
688920
689390
|
}
|
|
688921
689391
|
if (false) {}
|
|
688922
|
-
const currentVersion = "1.
|
|
689392
|
+
const currentVersion = "1.50.0";
|
|
688923
689393
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
688924
689394
|
let latestVersion = await getLatestVersion(channel);
|
|
688925
689395
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -689148,12 +689618,12 @@ function NativeAutoUpdater({
|
|
|
689148
689618
|
logEvent("tengu_native_auto_updater_start", {});
|
|
689149
689619
|
try {
|
|
689150
689620
|
const maxVersion = await getMaxVersion();
|
|
689151
|
-
if (maxVersion && gt("1.
|
|
689621
|
+
if (maxVersion && gt("1.50.0", maxVersion)) {
|
|
689152
689622
|
const msg = await getMaxVersionMessage();
|
|
689153
689623
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
689154
689624
|
}
|
|
689155
689625
|
const result = await installLatest(channel);
|
|
689156
|
-
const currentVersion = "1.
|
|
689626
|
+
const currentVersion = "1.50.0";
|
|
689157
689627
|
const latencyMs = Date.now() - startTime;
|
|
689158
689628
|
if (result.lockFailed) {
|
|
689159
689629
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -689290,17 +689760,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
689290
689760
|
const maxVersion = await getMaxVersion();
|
|
689291
689761
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
689292
689762
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
689293
|
-
if (gte("1.
|
|
689294
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.
|
|
689763
|
+
if (gte("1.50.0", maxVersion)) {
|
|
689764
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.50.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
689295
689765
|
setUpdateAvailable(false);
|
|
689296
689766
|
return;
|
|
689297
689767
|
}
|
|
689298
689768
|
latest = maxVersion;
|
|
689299
689769
|
}
|
|
689300
|
-
const hasUpdate = latest && !gte("1.
|
|
689770
|
+
const hasUpdate = latest && !gte("1.50.0", latest) && !shouldSkipVersion(latest);
|
|
689301
689771
|
setUpdateAvailable(!!hasUpdate);
|
|
689302
689772
|
if (hasUpdate) {
|
|
689303
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.
|
|
689773
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.50.0"} -> ${latest}`);
|
|
689304
689774
|
}
|
|
689305
689775
|
};
|
|
689306
689776
|
$2[0] = t1;
|
|
@@ -689334,7 +689804,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
689334
689804
|
wrap: "truncate",
|
|
689335
689805
|
children: [
|
|
689336
689806
|
"currentVersion: ",
|
|
689337
|
-
"1.
|
|
689807
|
+
"1.50.0"
|
|
689338
689808
|
]
|
|
689339
689809
|
}, undefined, true, undefined, this);
|
|
689340
689810
|
$2[3] = verbose;
|
|
@@ -693673,7 +694143,7 @@ var require_version_check = __commonJS((exports) => {
|
|
|
693673
694143
|
|
|
693674
694144
|
// node_modules/qrcode/lib/core/regex.js
|
|
693675
694145
|
var require_regex = __commonJS((exports) => {
|
|
693676
|
-
var
|
|
694146
|
+
var numeric2 = "[0-9]+";
|
|
693677
694147
|
var alphanumeric = "[A-Z $%*+\\-./:]+";
|
|
693678
694148
|
var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|" + "[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|" + "[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|" + "[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
693679
694149
|
kanji = kanji.replace(/u/g, "\\u");
|
|
@@ -693682,10 +694152,10 @@ var require_regex = __commonJS((exports) => {
|
|
|
693682
694152
|
exports.KANJI = new RegExp(kanji, "g");
|
|
693683
694153
|
exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
693684
694154
|
exports.BYTE = new RegExp(byte, "g");
|
|
693685
|
-
exports.NUMERIC = new RegExp(
|
|
694155
|
+
exports.NUMERIC = new RegExp(numeric2, "g");
|
|
693686
694156
|
exports.ALPHANUMERIC = new RegExp(alphanumeric, "g");
|
|
693687
694157
|
var TEST_KANJI = new RegExp("^" + kanji + "$");
|
|
693688
|
-
var TEST_NUMERIC = new RegExp("^" +
|
|
694158
|
+
var TEST_NUMERIC = new RegExp("^" + numeric2 + "$");
|
|
693689
694159
|
var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
693690
694160
|
exports.testKanji = function testKanji(str2) {
|
|
693691
694161
|
return TEST_KANJI.test(str2);
|
|
@@ -700031,7 +700501,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
700031
700501
|
project_dir: getOriginalCwd(),
|
|
700032
700502
|
added_dirs: addedDirs
|
|
700033
700503
|
},
|
|
700034
|
-
version: "1.
|
|
700504
|
+
version: "1.50.0",
|
|
700035
700505
|
output_style: {
|
|
700036
700506
|
name: outputStyleName
|
|
700037
700507
|
},
|
|
@@ -700114,7 +700584,7 @@ function StatusLineInner({
|
|
|
700114
700584
|
const taskValues = Object.values(tasks2);
|
|
700115
700585
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
700116
700586
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
700117
|
-
version: "1.
|
|
700587
|
+
version: "1.50.0",
|
|
700118
700588
|
providerLabel: providerRuntime.providerLabel,
|
|
700119
700589
|
authMode: providerRuntime.authLabel,
|
|
700120
700590
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -712257,7 +712727,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
712257
712727
|
} catch {}
|
|
712258
712728
|
const data = {
|
|
712259
712729
|
trigger: trigger2,
|
|
712260
|
-
version: "1.
|
|
712730
|
+
version: "1.50.0",
|
|
712261
712731
|
platform: process.platform,
|
|
712262
712732
|
transcript,
|
|
712263
712733
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -724543,7 +725013,7 @@ function WelcomeV2() {
|
|
|
724543
725013
|
dimColor: true,
|
|
724544
725014
|
children: [
|
|
724545
725015
|
"v",
|
|
724546
|
-
"1.
|
|
725016
|
+
"1.50.0"
|
|
724547
725017
|
]
|
|
724548
725018
|
}, undefined, true, undefined, this)
|
|
724549
725019
|
]
|
|
@@ -725803,7 +726273,7 @@ function completeOnboarding() {
|
|
|
725803
726273
|
saveGlobalConfig((current) => ({
|
|
725804
726274
|
...current,
|
|
725805
726275
|
hasCompletedOnboarding: true,
|
|
725806
|
-
lastOnboardingVersion: "1.
|
|
726276
|
+
lastOnboardingVersion: "1.50.0"
|
|
725807
726277
|
}));
|
|
725808
726278
|
}
|
|
725809
726279
|
function showDialog(root2, renderer) {
|
|
@@ -730847,7 +731317,7 @@ function appendToLog(path24, message) {
|
|
|
730847
731317
|
cwd: getFsImplementation().cwd(),
|
|
730848
731318
|
userType: process.env.USER_TYPE,
|
|
730849
731319
|
sessionId: getSessionId(),
|
|
730850
|
-
version: "1.
|
|
731320
|
+
version: "1.50.0"
|
|
730851
731321
|
};
|
|
730852
731322
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
730853
731323
|
}
|
|
@@ -735006,8 +735476,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
735006
735476
|
}
|
|
735007
735477
|
async function checkEnvLessBridgeMinVersion() {
|
|
735008
735478
|
const cfg = await getEnvLessBridgeConfig();
|
|
735009
|
-
if (cfg.min_version && lt("1.
|
|
735010
|
-
return `Your version of UR (${"1.
|
|
735479
|
+
if (cfg.min_version && lt("1.50.0", cfg.min_version)) {
|
|
735480
|
+
return `Your version of UR (${"1.50.0"}) is too old for Remote Control.
|
|
735011
735481
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
735012
735482
|
}
|
|
735013
735483
|
return null;
|
|
@@ -735481,7 +735951,7 @@ async function initBridgeCore(params) {
|
|
|
735481
735951
|
const rawApi = createBridgeApiClient({
|
|
735482
735952
|
baseUrl,
|
|
735483
735953
|
getAccessToken,
|
|
735484
|
-
runnerVersion: "1.
|
|
735954
|
+
runnerVersion: "1.50.0",
|
|
735485
735955
|
onDebug: logForDebugging,
|
|
735486
735956
|
onAuth401,
|
|
735487
735957
|
getTrustedDeviceToken
|
|
@@ -744829,7 +745299,7 @@ __export(exports_agUi, {
|
|
|
744829
745299
|
getAgUiCapabilities: () => getAgUiCapabilities,
|
|
744830
745300
|
createAgUiHttpHandler: () => createAgUiHttpHandler
|
|
744831
745301
|
});
|
|
744832
|
-
import { createHash as
|
|
745302
|
+
import { createHash as createHash46 } from "crypto";
|
|
744833
745303
|
function isLoopback4(host) {
|
|
744834
745304
|
const normalized = host.toLowerCase();
|
|
744835
745305
|
return normalized === "127.0.0.1" || normalized === "localhost" || normalized === "::1" || normalized === "0:0:0:0:0:0:0:1";
|
|
@@ -744886,7 +745356,7 @@ function authenticate(request, token) {
|
|
|
744886
745356
|
}
|
|
744887
745357
|
return {
|
|
744888
745358
|
ok: true,
|
|
744889
|
-
owner: `bearer:${
|
|
745359
|
+
owner: `bearer:${createHash46("sha256").update(supplied).digest("base64url")}`
|
|
744890
745360
|
};
|
|
744891
745361
|
}
|
|
744892
745362
|
function allowedOrigin(request, allowedOrigins) {
|
|
@@ -744950,7 +745420,7 @@ function getAgUiCapabilities() {
|
|
|
744950
745420
|
name: "UR-Nexus",
|
|
744951
745421
|
type: "ur-nexus",
|
|
744952
745422
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
744953
|
-
version: "1.
|
|
745423
|
+
version: "1.50.0",
|
|
744954
745424
|
provider: "UR",
|
|
744955
745425
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
744956
745426
|
},
|
|
@@ -746090,7 +746560,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
746090
746560
|
};
|
|
746091
746561
|
const server2 = new Server({
|
|
746092
746562
|
name: "ur-nexus",
|
|
746093
|
-
version: "1.
|
|
746563
|
+
version: "1.50.0"
|
|
746094
746564
|
}, {
|
|
746095
746565
|
capabilities: {
|
|
746096
746566
|
tools: {}
|
|
@@ -747103,7 +747573,7 @@ __export(exports_mcp2026, {
|
|
|
747103
747573
|
createUrMcp2026Runtime: () => createUrMcp2026Runtime,
|
|
747104
747574
|
createMcp2026HttpHandler: () => createMcp2026HttpHandler
|
|
747105
747575
|
});
|
|
747106
|
-
import { createHash as
|
|
747576
|
+
import { createHash as createHash47 } from "crypto";
|
|
747107
747577
|
function isRecord7(value2) {
|
|
747108
747578
|
return Boolean(value2) && typeof value2 === "object" && !Array.isArray(value2);
|
|
747109
747579
|
}
|
|
@@ -747144,7 +747614,7 @@ function authenticate2(request, token) {
|
|
|
747144
747614
|
}
|
|
747145
747615
|
return {
|
|
747146
747616
|
ok: true,
|
|
747147
|
-
owner: `bearer:${
|
|
747617
|
+
owner: `bearer:${createHash47("sha256").update(supplied).digest("base64url")}`
|
|
747148
747618
|
};
|
|
747149
747619
|
}
|
|
747150
747620
|
function response(status2, body, origin2, extraHeaders = {}) {
|
|
@@ -747248,7 +747718,7 @@ function thrownResponse(error40) {
|
|
|
747248
747718
|
}
|
|
747249
747719
|
async function createUrMcp2026Runtime(options4) {
|
|
747250
747720
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
747251
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.
|
|
747721
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.50.0" }, { capabilities: {} });
|
|
747252
747722
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
747253
747723
|
try {
|
|
747254
747724
|
await server2.connect(serverTransport);
|
|
@@ -747259,7 +747729,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
747259
747729
|
}
|
|
747260
747730
|
const runtime2 = new Mcp2026Runtime({
|
|
747261
747731
|
cwd: options4.cwd,
|
|
747262
|
-
version: "1.
|
|
747732
|
+
version: "1.50.0",
|
|
747263
747733
|
backend: {
|
|
747264
747734
|
listTools: async () => {
|
|
747265
747735
|
const listed = await client2.listTools();
|
|
@@ -749392,7 +749862,7 @@ async function update() {
|
|
|
749392
749862
|
logEvent("tengu_update_check", {});
|
|
749393
749863
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
749394
749864
|
const result = await checkUpgradeStatus({
|
|
749395
|
-
currentVersion: "1.
|
|
749865
|
+
currentVersion: "1.50.0",
|
|
749396
749866
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
749397
749867
|
installationType: diagnostic2.installationType,
|
|
749398
749868
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -750708,7 +751178,7 @@ ${customInstructions}` : customInstructions;
|
|
|
750708
751178
|
}
|
|
750709
751179
|
}
|
|
750710
751180
|
logForDiagnosticsNoPII("info", "started", {
|
|
750711
|
-
version: "1.
|
|
751181
|
+
version: "1.50.0",
|
|
750712
751182
|
is_native_binary: isInBundledMode()
|
|
750713
751183
|
});
|
|
750714
751184
|
registerCleanup(async () => {
|
|
@@ -751494,7 +751964,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
751494
751964
|
pendingHookMessages
|
|
751495
751965
|
}, renderAndRun);
|
|
751496
751966
|
}
|
|
751497
|
-
}).version("1.
|
|
751967
|
+
}).version("1.50.0 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
751498
751968
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
751499
751969
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
751500
751970
|
if (canUserConfigureAdvisor()) {
|
|
@@ -752510,7 +752980,7 @@ if (false) {}
|
|
|
752510
752980
|
async function main2() {
|
|
752511
752981
|
const args = process.argv.slice(2);
|
|
752512
752982
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
752513
|
-
console.log(`${"1.
|
|
752983
|
+
console.log(`${"1.50.0"} (UR-Nexus)`);
|
|
752514
752984
|
return;
|
|
752515
752985
|
}
|
|
752516
752986
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|