ur-agent 1.76.2 → 1.76.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -57919,7 +57919,28 @@ var init_kimiToolCalls = __esm(() => {
|
|
|
57919
57919
|
]);
|
|
57920
57920
|
});
|
|
57921
57921
|
|
|
57922
|
+
// src/utils/zodToJsonSchema.ts
|
|
57923
|
+
function zodToJsonSchema(schema) {
|
|
57924
|
+
const hit = cache2.get(schema);
|
|
57925
|
+
if (hit)
|
|
57926
|
+
return hit;
|
|
57927
|
+
const result = toJSONSchema(schema);
|
|
57928
|
+
cache2.set(schema, result);
|
|
57929
|
+
return result;
|
|
57930
|
+
}
|
|
57931
|
+
var cache2;
|
|
57932
|
+
var init_zodToJsonSchema = __esm(() => {
|
|
57933
|
+
init_v4();
|
|
57934
|
+
cache2 = new WeakMap;
|
|
57935
|
+
});
|
|
57936
|
+
|
|
57922
57937
|
// src/services/api/toolSchema.ts
|
|
57938
|
+
function asJsonSchemaCandidate(schema) {
|
|
57939
|
+
if (typeof schema === "object" && schema !== null && (("def" in schema) || ("_def" in schema)) && typeof schema.parse === "function") {
|
|
57940
|
+
return zodToJsonSchema(schema);
|
|
57941
|
+
}
|
|
57942
|
+
return schema;
|
|
57943
|
+
}
|
|
57923
57944
|
function isObject5(value) {
|
|
57924
57945
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
57925
57946
|
}
|
|
@@ -57977,10 +57998,11 @@ function rewriteEntries(node, root2, dialect, depth) {
|
|
|
57977
57998
|
return out;
|
|
57978
57999
|
}
|
|
57979
58000
|
function prepareToolSchema(schema, dialect = "json-schema") {
|
|
57980
|
-
|
|
58001
|
+
const candidate = asJsonSchemaCandidate(schema);
|
|
58002
|
+
if (!isObject5(candidate)) {
|
|
57981
58003
|
return { type: "object", properties: {} };
|
|
57982
58004
|
}
|
|
57983
|
-
const root2 =
|
|
58005
|
+
const root2 = candidate;
|
|
57984
58006
|
const rewritten = rewrite(root2, root2, dialect, 0);
|
|
57985
58007
|
const result = isObject5(rewritten) ? rewritten : { type: "object", properties: {} };
|
|
57986
58008
|
if (result.type === undefined) {
|
|
@@ -58169,6 +58191,7 @@ ${detail}`);
|
|
|
58169
58191
|
}
|
|
58170
58192
|
var VENDOR_KEYS, META_KEYS, GEMINI_UNSUPPORTED_KEYS, ToolSchemaValidationError, TOOL_NAME_PATTERN;
|
|
58171
58193
|
var init_toolSchema = __esm(() => {
|
|
58194
|
+
init_zodToJsonSchema();
|
|
58172
58195
|
VENDOR_KEYS = [
|
|
58173
58196
|
"cache_control",
|
|
58174
58197
|
"strict",
|
|
@@ -64927,6 +64950,11 @@ function getDefaultOllamaModel() {
|
|
|
64927
64950
|
return DEFAULT_OLLAMA_MODEL2;
|
|
64928
64951
|
}
|
|
64929
64952
|
function getSmallFastModel() {
|
|
64953
|
+
if (process.env.OLLAMA_MODEL !== undefined && process.env.OLLAMA_SMALL_FAST_MODEL === undefined) {
|
|
64954
|
+
const mainLoopModel = getMainLoopModel();
|
|
64955
|
+
if (mainLoopModel)
|
|
64956
|
+
return mainLoopModel;
|
|
64957
|
+
}
|
|
64930
64958
|
if (getAPIProvider() === "ollama") {
|
|
64931
64959
|
if (process.env.OLLAMA_SMALL_FAST_MODEL) {
|
|
64932
64960
|
return process.env.OLLAMA_SMALL_FAST_MODEL;
|
|
@@ -76485,7 +76513,7 @@ var init_auth = __esm(() => {
|
|
|
76485
76513
|
|
|
76486
76514
|
// src/utils/userAgent.ts
|
|
76487
76515
|
function getURCodeUserAgent() {
|
|
76488
|
-
return `ur/${"1.76.
|
|
76516
|
+
return `ur/${"1.76.3"}`;
|
|
76489
76517
|
}
|
|
76490
76518
|
|
|
76491
76519
|
// src/utils/workloadContext.ts
|
|
@@ -76507,7 +76535,7 @@ function getUserAgent() {
|
|
|
76507
76535
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
76508
76536
|
const workload = getWorkload();
|
|
76509
76537
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
76510
|
-
return `ur-cli/${"1.76.
|
|
76538
|
+
return `ur-cli/${"1.76.3"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
76511
76539
|
}
|
|
76512
76540
|
function getMCPUserAgent() {
|
|
76513
76541
|
const parts = [];
|
|
@@ -76521,7 +76549,7 @@ function getMCPUserAgent() {
|
|
|
76521
76549
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
76522
76550
|
}
|
|
76523
76551
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
76524
|
-
return `ur/${"1.76.
|
|
76552
|
+
return `ur/${"1.76.3"}${suffix}`;
|
|
76525
76553
|
}
|
|
76526
76554
|
function getWebFetchUserAgent() {
|
|
76527
76555
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -76659,7 +76687,7 @@ var init_user = __esm(() => {
|
|
|
76659
76687
|
deviceId,
|
|
76660
76688
|
sessionId: getSessionId(),
|
|
76661
76689
|
email: getEmail(),
|
|
76662
|
-
appVersion: "1.76.
|
|
76690
|
+
appVersion: "1.76.3",
|
|
76663
76691
|
platform: getHostPlatformForAnalytics(),
|
|
76664
76692
|
organizationUuid,
|
|
76665
76693
|
accountUuid,
|
|
@@ -84859,7 +84887,7 @@ var init_metadata = __esm(() => {
|
|
|
84859
84887
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
84860
84888
|
WHITESPACE_REGEX = /\s+/;
|
|
84861
84889
|
getVersionBase = memoize_default(() => {
|
|
84862
|
-
const match = "1.76.
|
|
84890
|
+
const match = "1.76.3".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
84863
84891
|
return match ? match[0] : undefined;
|
|
84864
84892
|
});
|
|
84865
84893
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -84899,7 +84927,7 @@ var init_metadata = __esm(() => {
|
|
|
84899
84927
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
84900
84928
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
84901
84929
|
isURAiAuth: isURAISubscriber(),
|
|
84902
|
-
version: "1.76.
|
|
84930
|
+
version: "1.76.3",
|
|
84903
84931
|
versionBase: getVersionBase(),
|
|
84904
84932
|
buildTime: "",
|
|
84905
84933
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -85569,7 +85597,7 @@ function initialize1PEventLogging() {
|
|
|
85569
85597
|
const platform2 = getPlatform();
|
|
85570
85598
|
const attributes = {
|
|
85571
85599
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
85572
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.76.
|
|
85600
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.76.3"
|
|
85573
85601
|
};
|
|
85574
85602
|
if (platform2 === "wsl") {
|
|
85575
85603
|
const wslVersion = getWslVersion();
|
|
@@ -85597,7 +85625,7 @@ function initialize1PEventLogging() {
|
|
|
85597
85625
|
})
|
|
85598
85626
|
]
|
|
85599
85627
|
});
|
|
85600
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.76.
|
|
85628
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.76.3");
|
|
85601
85629
|
}
|
|
85602
85630
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
85603
85631
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -95474,7 +95502,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
95474
95502
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
95475
95503
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
95476
95504
|
}
|
|
95477
|
-
var urVersion = "1.76.
|
|
95505
|
+
var urVersion = "1.76.3", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
|
|
95478
95506
|
var init_trends = __esm(() => {
|
|
95479
95507
|
init_a2aCardSignature();
|
|
95480
95508
|
coverage = [
|
|
@@ -98277,7 +98305,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
98277
98305
|
if (!isAttributionHeaderEnabled()) {
|
|
98278
98306
|
return "";
|
|
98279
98307
|
}
|
|
98280
|
-
const version2 = `${"1.76.
|
|
98308
|
+
const version2 = `${"1.76.3"}.${fingerprint}`;
|
|
98281
98309
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
98282
98310
|
const cch = "";
|
|
98283
98311
|
const workload = getWorkload();
|
|
@@ -98552,24 +98580,24 @@ var require_ignore = __commonJS((exports, module) => {
|
|
|
98552
98580
|
unignored
|
|
98553
98581
|
};
|
|
98554
98582
|
}
|
|
98555
|
-
_test(originalPath,
|
|
98583
|
+
_test(originalPath, cache3, checkUnignored, slices) {
|
|
98556
98584
|
const path9 = originalPath && checkPath.convert(originalPath);
|
|
98557
98585
|
checkPath(path9, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
|
|
98558
|
-
return this._t(path9,
|
|
98586
|
+
return this._t(path9, cache3, checkUnignored, slices);
|
|
98559
98587
|
}
|
|
98560
|
-
_t(path9,
|
|
98561
|
-
if (path9 in
|
|
98562
|
-
return
|
|
98588
|
+
_t(path9, cache3, checkUnignored, slices) {
|
|
98589
|
+
if (path9 in cache3) {
|
|
98590
|
+
return cache3[path9];
|
|
98563
98591
|
}
|
|
98564
98592
|
if (!slices) {
|
|
98565
98593
|
slices = path9.split(SLASH);
|
|
98566
98594
|
}
|
|
98567
98595
|
slices.pop();
|
|
98568
98596
|
if (!slices.length) {
|
|
98569
|
-
return
|
|
98597
|
+
return cache3[path9] = this._testOne(path9, checkUnignored);
|
|
98570
98598
|
}
|
|
98571
|
-
const parent = this._t(slices.join(SLASH) + SLASH,
|
|
98572
|
-
return
|
|
98599
|
+
const parent = this._t(slices.join(SLASH) + SLASH, cache3, checkUnignored, slices);
|
|
98600
|
+
return cache3[path9] = parent.ignored ? parent : this._testOne(path9, checkUnignored);
|
|
98573
98601
|
}
|
|
98574
98602
|
ignores(path9) {
|
|
98575
98603
|
return this._test(path9, this._ignoreCache, false).ignored;
|
|
@@ -105528,15 +105556,15 @@ It can also happen if the client has a browser extension installed which messes
|
|
|
105528
105556
|
refCount: 0
|
|
105529
105557
|
};
|
|
105530
105558
|
}
|
|
105531
|
-
function retainCache(
|
|
105532
|
-
|
|
105533
|
-
|
|
105559
|
+
function retainCache(cache3) {
|
|
105560
|
+
cache3.controller.signal.aborted && console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React.");
|
|
105561
|
+
cache3.refCount++;
|
|
105534
105562
|
}
|
|
105535
|
-
function releaseCache(
|
|
105536
|
-
|
|
105537
|
-
0 >
|
|
105538
|
-
|
|
105539
|
-
|
|
105563
|
+
function releaseCache(cache3) {
|
|
105564
|
+
cache3.refCount--;
|
|
105565
|
+
0 > cache3.refCount && console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React.");
|
|
105566
|
+
cache3.refCount === 0 && scheduleCallback$2(NormalPriority, function() {
|
|
105567
|
+
cache3.controller.abort();
|
|
105540
105568
|
});
|
|
105541
105569
|
}
|
|
105542
105570
|
function startUpdateTimerByLane(lane, method, fiber) {
|
|
@@ -113683,8 +113711,8 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
113683
113711
|
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set;
|
|
113684
113712
|
var offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = typeof WeakSet === "function" ? WeakSet : Set, nextEffect = null, inProgressLanes = null, inProgressRoot = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, inHydratedSubtree = false, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
|
|
113685
113713
|
getCacheForType: function(resourceType) {
|
|
113686
|
-
var
|
|
113687
|
-
cacheForType === undefined && (cacheForType = resourceType(),
|
|
113714
|
+
var cache3 = readContext(CacheContext), cacheForType = cache3.data.get(resourceType);
|
|
113715
|
+
cacheForType === undefined && (cacheForType = resourceType(), cache3.data.set(resourceType, cacheForType));
|
|
113688
113716
|
return cacheForType;
|
|
113689
113717
|
},
|
|
113690
113718
|
cacheSignal: function() {
|
|
@@ -114408,20 +114436,20 @@ var init_engine = __esm(() => {
|
|
|
114408
114436
|
|
|
114409
114437
|
// src/ink/line-width-cache.ts
|
|
114410
114438
|
function lineWidth(line) {
|
|
114411
|
-
const cached2 =
|
|
114439
|
+
const cached2 = cache3.get(line);
|
|
114412
114440
|
if (cached2 !== undefined)
|
|
114413
114441
|
return cached2;
|
|
114414
114442
|
const width = stringWidth(line);
|
|
114415
|
-
if (
|
|
114416
|
-
|
|
114443
|
+
if (cache3.size >= MAX_CACHE_SIZE) {
|
|
114444
|
+
cache3.clear();
|
|
114417
114445
|
}
|
|
114418
|
-
|
|
114446
|
+
cache3.set(line, width);
|
|
114419
114447
|
return width;
|
|
114420
114448
|
}
|
|
114421
|
-
var
|
|
114449
|
+
var cache3, MAX_CACHE_SIZE = 4096;
|
|
114422
114450
|
var init_line_width_cache = __esm(() => {
|
|
114423
114451
|
init_stringWidth();
|
|
114424
|
-
|
|
114452
|
+
cache3 = new Map;
|
|
114425
114453
|
});
|
|
114426
114454
|
|
|
114427
114455
|
// src/ink/measure-text.ts
|
|
@@ -118669,7 +118697,7 @@ var require_range2 = __commonJS((exports, module) => {
|
|
|
118669
118697
|
range = range.replace(BUILDSTRIPRE, "");
|
|
118670
118698
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
118671
118699
|
const memoKey = memoOpts + ":" + range;
|
|
118672
|
-
const cached2 =
|
|
118700
|
+
const cached2 = cache4.get(memoKey);
|
|
118673
118701
|
if (cached2) {
|
|
118674
118702
|
return cached2;
|
|
118675
118703
|
}
|
|
@@ -118703,7 +118731,7 @@ var require_range2 = __commonJS((exports, module) => {
|
|
|
118703
118731
|
rangeMap.delete("");
|
|
118704
118732
|
}
|
|
118705
118733
|
const result = [...rangeMap.values()];
|
|
118706
|
-
|
|
118734
|
+
cache4.set(memoKey, result);
|
|
118707
118735
|
return result;
|
|
118708
118736
|
}
|
|
118709
118737
|
intersects(range, options) {
|
|
@@ -118741,7 +118769,7 @@ var require_range2 = __commonJS((exports, module) => {
|
|
|
118741
118769
|
}
|
|
118742
118770
|
module.exports = Range;
|
|
118743
118771
|
var LRU = require_lrucache();
|
|
118744
|
-
var
|
|
118772
|
+
var cache4 = new LRU;
|
|
118745
118773
|
var parseOptions = require_parse_options();
|
|
118746
118774
|
var Comparator = require_comparator();
|
|
118747
118775
|
var debug = require_debug2();
|
|
@@ -151804,15 +151832,15 @@ class FileStateCache {
|
|
|
151804
151832
|
function createFileStateCacheWithSizeLimit(maxEntries, maxSizeBytes = DEFAULT_MAX_CACHE_SIZE_BYTES) {
|
|
151805
151833
|
return new FileStateCache(maxEntries, maxSizeBytes);
|
|
151806
151834
|
}
|
|
151807
|
-
function cacheToObject(
|
|
151808
|
-
return Object.fromEntries(
|
|
151835
|
+
function cacheToObject(cache4) {
|
|
151836
|
+
return Object.fromEntries(cache4.entries());
|
|
151809
151837
|
}
|
|
151810
|
-
function cacheKeys(
|
|
151811
|
-
return Array.from(
|
|
151838
|
+
function cacheKeys(cache4) {
|
|
151839
|
+
return Array.from(cache4.keys());
|
|
151812
151840
|
}
|
|
151813
|
-
function cloneFileStateCache(
|
|
151814
|
-
const cloned = createFileStateCacheWithSizeLimit(
|
|
151815
|
-
cloned.load(
|
|
151841
|
+
function cloneFileStateCache(cache4) {
|
|
151842
|
+
const cloned = createFileStateCacheWithSizeLimit(cache4.max, cache4.maxSize);
|
|
151843
|
+
cloned.load(cache4.dump());
|
|
151816
151844
|
return cloned;
|
|
151817
151845
|
}
|
|
151818
151846
|
function mergeFileStateCaches(first, second) {
|
|
@@ -156128,7 +156156,7 @@ var init_projectSafety = __esm(() => {
|
|
|
156128
156156
|
function getInstruments() {
|
|
156129
156157
|
if (instruments)
|
|
156130
156158
|
return instruments;
|
|
156131
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.76.
|
|
156159
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.76.3");
|
|
156132
156160
|
instruments = {
|
|
156133
156161
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
156134
156162
|
description: "GenAI operation duration.",
|
|
@@ -156226,7 +156254,7 @@ function genAiAgentAttributes() {
|
|
|
156226
156254
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
156227
156255
|
"gen_ai.provider.name": "ur",
|
|
156228
156256
|
"gen_ai.agent.name": "UR-Nexus",
|
|
156229
|
-
"gen_ai.agent.version": "1.76.
|
|
156257
|
+
"gen_ai.agent.version": "1.76.3"
|
|
156230
156258
|
};
|
|
156231
156259
|
}
|
|
156232
156260
|
function genAiWorkflowAttributes(workflowName) {
|
|
@@ -156242,7 +156270,7 @@ function genAiWorkflowAttributes(workflowName) {
|
|
|
156242
156270
|
function startGenAiWorkflowSpan(workflowName) {
|
|
156243
156271
|
const attributes = genAiWorkflowAttributes(workflowName);
|
|
156244
156272
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
156245
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
156273
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.3").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
156246
156274
|
}
|
|
156247
156275
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
156248
156276
|
try {
|
|
@@ -156280,7 +156308,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
156280
156308
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
156281
156309
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
156282
156310
|
}
|
|
156283
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
156311
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.3").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
156284
156312
|
}
|
|
156285
156313
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
156286
156314
|
try {
|
|
@@ -249928,7 +249956,7 @@ function getTelemetryAttributes() {
|
|
|
249928
249956
|
attributes["session.id"] = sessionId;
|
|
249929
249957
|
}
|
|
249930
249958
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
249931
|
-
attributes["app.version"] = "1.76.
|
|
249959
|
+
attributes["app.version"] = "1.76.3";
|
|
249932
249960
|
}
|
|
249933
249961
|
const oauthAccount = getOauthAccountInfo();
|
|
249934
249962
|
if (oauthAccount) {
|
|
@@ -250268,11 +250296,45 @@ function describeQuestionPayloadProblems(value) {
|
|
|
250268
250296
|
function objectValue2(value) {
|
|
250269
250297
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
250270
250298
|
}
|
|
250299
|
+
function parseOptionListText(value) {
|
|
250300
|
+
const raw = value.trim();
|
|
250301
|
+
if (!raw)
|
|
250302
|
+
return null;
|
|
250303
|
+
const hasDelimiter = /[,\n;|]/.test(raw);
|
|
250304
|
+
if (!hasDelimiter)
|
|
250305
|
+
return null;
|
|
250306
|
+
const lines = raw.split(/\n/).flatMap((line) => line.split(/[,;|]/)).map((item) => item.trim()).map((item) => item.replace(/^[\s"'`*[\]{}()<>_\u2013\u2014-]+/, "").replace(/[\s"'`*[\]{}()<>.,;:!?]+$/g, "")).filter((item) => item.length > 0 && item.length <= 80);
|
|
250307
|
+
if (lines.length < 2)
|
|
250308
|
+
return null;
|
|
250309
|
+
const unique = [];
|
|
250310
|
+
const seen = new Set;
|
|
250311
|
+
for (const line of lines) {
|
|
250312
|
+
const key = line.toLowerCase();
|
|
250313
|
+
if (seen.has(key))
|
|
250314
|
+
continue;
|
|
250315
|
+
seen.add(key);
|
|
250316
|
+
unique.push(line);
|
|
250317
|
+
if (unique.length > 8)
|
|
250318
|
+
return null;
|
|
250319
|
+
}
|
|
250320
|
+
return unique;
|
|
250321
|
+
}
|
|
250271
250322
|
function headerFromQuestion2(question, index2) {
|
|
250272
250323
|
const stopWords = new Set(["a", "about", "also", "an", "are", "be", "do", "does", "for", "is", "or", "should", "support", "that", "the", "this", "to", "want", "what", "which", "with", "without", "you"]);
|
|
250273
250324
|
const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !stopWords.has(part.toLowerCase())) ?? `Question ${index2 + 1}`;
|
|
250274
250325
|
return word.slice(0, ASK_USER_QUESTION_TOOL_CHIP_WIDTH);
|
|
250275
250326
|
}
|
|
250327
|
+
function inferQuestionFromSingleKeyQuestion(question) {
|
|
250328
|
+
const entries = Object.entries(question).filter(([key2]) => !RESERVED_QUESTION_KEYS.has(key2));
|
|
250329
|
+
if (entries.length !== 1)
|
|
250330
|
+
return null;
|
|
250331
|
+
const [key, value] = entries[0];
|
|
250332
|
+
if (RESERVED_QUESTION_OPTION_KEYS.has(key.toLowerCase()) || !key.trim())
|
|
250333
|
+
return null;
|
|
250334
|
+
if (!value)
|
|
250335
|
+
return null;
|
|
250336
|
+
return { questionText: key.trim(), options: value };
|
|
250337
|
+
}
|
|
250276
250338
|
function stringField2(input, names) {
|
|
250277
250339
|
for (const name of names) {
|
|
250278
250340
|
const value = input[name];
|
|
@@ -250281,6 +250343,14 @@ function stringField2(input, names) {
|
|
|
250281
250343
|
}
|
|
250282
250344
|
return "";
|
|
250283
250345
|
}
|
|
250346
|
+
function objectOptionValues(value) {
|
|
250347
|
+
if (!objectValue2(value))
|
|
250348
|
+
return null;
|
|
250349
|
+
const values = Object.values(value);
|
|
250350
|
+
if (!Array.isArray(values) || values.length === 0)
|
|
250351
|
+
return null;
|
|
250352
|
+
return values;
|
|
250353
|
+
}
|
|
250284
250354
|
function normalizeQuestionOptionInput(value) {
|
|
250285
250355
|
if (typeof value === "string") {
|
|
250286
250356
|
const label2 = value.trim();
|
|
@@ -250292,8 +250362,10 @@ function normalizeQuestionOptionInput(value) {
|
|
|
250292
250362
|
const option = objectValue2(value);
|
|
250293
250363
|
if (!option)
|
|
250294
250364
|
return value;
|
|
250295
|
-
const label = typeof option.label === "string" && option.label.trim()
|
|
250296
|
-
|
|
250365
|
+
const label = typeof option.label === "string" && option.label.trim() || typeof option.value === "string" && option.value.trim() || typeof option.name === "string" && option.name.trim() || typeof option.text === "string" && option.text.trim() || typeof option.title === "string" && option.title.trim() || typeof option.id === "string" && option.id.trim() || typeof option.description === "string" && option.description.trim() || "";
|
|
250366
|
+
if (!label)
|
|
250367
|
+
return value;
|
|
250368
|
+
const description = typeof option.description === "string" && option.description.trim() || label;
|
|
250297
250369
|
if (!label || !description)
|
|
250298
250370
|
return value;
|
|
250299
250371
|
return {
|
|
@@ -250305,7 +250377,7 @@ function normalizeQuestionOptionInput(value) {
|
|
|
250305
250377
|
};
|
|
250306
250378
|
}
|
|
250307
250379
|
function optionsField(question) {
|
|
250308
|
-
for (const name of
|
|
250380
|
+
for (const name of RESERVED_QUESTION_OPTION_KEYS) {
|
|
250309
250381
|
const value = question[name];
|
|
250310
250382
|
if (Array.isArray(value))
|
|
250311
250383
|
return value;
|
|
@@ -250313,24 +250385,81 @@ function optionsField(question) {
|
|
|
250313
250385
|
const parsed = parseToolInputJsonLenient(value);
|
|
250314
250386
|
if (Array.isArray(parsed))
|
|
250315
250387
|
return parsed;
|
|
250388
|
+
const objectParsedOptions = objectOptionValues(parsed);
|
|
250389
|
+
if (objectParsedOptions)
|
|
250390
|
+
return objectParsedOptions;
|
|
250391
|
+
const delimited = parseOptionListText(value);
|
|
250392
|
+
if (delimited)
|
|
250393
|
+
return delimited;
|
|
250394
|
+
}
|
|
250395
|
+
const objectOptions = objectOptionValues(value);
|
|
250396
|
+
if (objectOptions)
|
|
250397
|
+
return objectOptions;
|
|
250398
|
+
if (typeof value === "string") {
|
|
250399
|
+
const delimited = parseOptionListText(value);
|
|
250400
|
+
if (delimited)
|
|
250401
|
+
return delimited;
|
|
250316
250402
|
}
|
|
250317
250403
|
}
|
|
250318
250404
|
return null;
|
|
250319
250405
|
}
|
|
250406
|
+
function coerceQuestionValueToOptions(question) {
|
|
250407
|
+
for (const [key, value] of Object.entries(question)) {
|
|
250408
|
+
if (RESERVED_QUESTION_KEYS.has(key))
|
|
250409
|
+
continue;
|
|
250410
|
+
if (RESERVED_QUESTION_OPTION_KEYS.has(key.toLowerCase()))
|
|
250411
|
+
continue;
|
|
250412
|
+
const options2 = optionsField({ [key]: value, ...question });
|
|
250413
|
+
if (options2)
|
|
250414
|
+
return options2;
|
|
250415
|
+
if (Array.isArray(value))
|
|
250416
|
+
return value;
|
|
250417
|
+
if (typeof value === "string") {
|
|
250418
|
+
const parsed = parseToolInputJsonLenient(value);
|
|
250419
|
+
if (Array.isArray(parsed))
|
|
250420
|
+
return parsed;
|
|
250421
|
+
const delimited = parseOptionListText(value);
|
|
250422
|
+
if (delimited)
|
|
250423
|
+
return delimited;
|
|
250424
|
+
}
|
|
250425
|
+
const objectOptions = objectOptionValues(value);
|
|
250426
|
+
if (objectOptions)
|
|
250427
|
+
return objectOptions;
|
|
250428
|
+
}
|
|
250429
|
+
return null;
|
|
250430
|
+
}
|
|
250320
250431
|
function normalizeQuestionInput(value, index2) {
|
|
250321
250432
|
const question = objectValue2(value);
|
|
250322
250433
|
if (!question)
|
|
250323
250434
|
return value;
|
|
250324
250435
|
const options2 = optionsField(question);
|
|
250325
|
-
|
|
250436
|
+
const fallbackQuestion = inferQuestionFromSingleKeyQuestion(question);
|
|
250437
|
+
const usedFallback = fallbackQuestion !== null;
|
|
250438
|
+
const normalizedQuestionText = usedFallback ? fallbackQuestion.questionText : undefined;
|
|
250439
|
+
const fallbackOptions = usedFallback ? fallbackQuestion.options : null;
|
|
250440
|
+
const effectiveOptions = options2 ?? (fallbackOptions ? coerceQuestionValueToOptions({ ...question, options: fallbackOptions }) : null);
|
|
250441
|
+
if (!effectiveOptions)
|
|
250326
250442
|
return value;
|
|
250327
|
-
const questionText = stringField2(question, [
|
|
250443
|
+
const questionText = normalizedQuestionText || stringField2(question, [
|
|
250444
|
+
"question",
|
|
250445
|
+
"questionText",
|
|
250446
|
+
"question_text",
|
|
250447
|
+
"q",
|
|
250448
|
+
"query",
|
|
250449
|
+
"prompt",
|
|
250450
|
+
"text",
|
|
250451
|
+
"title",
|
|
250452
|
+
"message",
|
|
250453
|
+
"body",
|
|
250454
|
+
"goal",
|
|
250455
|
+
"name"
|
|
250456
|
+
]);
|
|
250328
250457
|
if (!questionText)
|
|
250329
250458
|
return value;
|
|
250330
250459
|
return {
|
|
250331
250460
|
question: questionText,
|
|
250332
250461
|
header: typeof question.header === "string" && question.header.trim() ? question.header.trim().slice(0, ASK_USER_QUESTION_TOOL_CHIP_WIDTH) : headerFromQuestion2(questionText, index2),
|
|
250333
|
-
options:
|
|
250462
|
+
options: effectiveOptions.map(normalizeQuestionOptionInput),
|
|
250334
250463
|
...typeof question.multiSelect === "boolean" ? {
|
|
250335
250464
|
multiSelect: question.multiSelect
|
|
250336
250465
|
} : {}
|
|
@@ -250353,13 +250482,29 @@ function normalizeAskUserQuestionInput2(value) {
|
|
|
250353
250482
|
};
|
|
250354
250483
|
if (typeof input.questions === "string") {
|
|
250355
250484
|
const parsed = parseToolInputJsonLenient(input.questions);
|
|
250356
|
-
if (Array.isArray(parsed))
|
|
250485
|
+
if (Array.isArray(parsed) || objectValue2(parsed))
|
|
250357
250486
|
input.questions = parsed;
|
|
250358
250487
|
}
|
|
250359
250488
|
if (typeof input.options === "string") {
|
|
250360
250489
|
const parsed = parseToolInputJsonLenient(input.options);
|
|
250361
250490
|
if (Array.isArray(parsed))
|
|
250362
250491
|
input.options = parsed;
|
|
250492
|
+
if (objectOptionValues(parsed))
|
|
250493
|
+
input.options = parsed;
|
|
250494
|
+
}
|
|
250495
|
+
if (objectValue2(input.questions)) {
|
|
250496
|
+
const map2 = input.questions;
|
|
250497
|
+
const questions = Object.entries(map2).map(([questionText, raw], index2) => {
|
|
250498
|
+
const entry = typeof raw === "string" || Array.isArray(raw) || objectValue2(raw) ? normalizeQuestionInput({ question: questionText, options: raw }, index2) : null;
|
|
250499
|
+
return entry;
|
|
250500
|
+
});
|
|
250501
|
+
const normalized = dedupeQuestions(questions.filter((entry) => entry !== null && typeof entry === "object"));
|
|
250502
|
+
if (normalized.length > 0) {
|
|
250503
|
+
return {
|
|
250504
|
+
questions: normalized.slice(0, 4),
|
|
250505
|
+
...commonFields
|
|
250506
|
+
};
|
|
250507
|
+
}
|
|
250363
250508
|
}
|
|
250364
250509
|
if (Array.isArray(input.questions)) {
|
|
250365
250510
|
return {
|
|
@@ -250452,7 +250597,7 @@ function validateHtmlPreview(preview) {
|
|
|
250452
250597
|
}
|
|
250453
250598
|
return null;
|
|
250454
250599
|
}
|
|
250455
|
-
var import_compiler_runtime19, jsx_dev_runtime22, questionOptionSchema, questionSchema, annotationsSchema, UNIQUENESS_REFINE, commonFields, inputSchema2, outputSchema2, AskUserQuestionTool;
|
|
250600
|
+
var import_compiler_runtime19, jsx_dev_runtime22, RESERVED_QUESTION_OPTION_KEYS, RESERVED_QUESTION_KEYS, questionOptionSchema, questionSchema, annotationsSchema, UNIQUENESS_REFINE, commonFields, inputSchema2, outputSchema2, AskUserQuestionTool;
|
|
250456
250601
|
var init_AskUserQuestionTool = __esm(() => {
|
|
250457
250602
|
init_state();
|
|
250458
250603
|
init_MessageResponse();
|
|
@@ -250465,6 +250610,33 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
250465
250610
|
init_prompt9();
|
|
250466
250611
|
import_compiler_runtime19 = __toESM(require_compiler_runtime(), 1);
|
|
250467
250612
|
jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
250613
|
+
RESERVED_QUESTION_OPTION_KEYS = new Set([
|
|
250614
|
+
"options",
|
|
250615
|
+
"option",
|
|
250616
|
+
"choices",
|
|
250617
|
+
"values",
|
|
250618
|
+
"items",
|
|
250619
|
+
"alternatives",
|
|
250620
|
+
"candidates",
|
|
250621
|
+
"selections"
|
|
250622
|
+
]);
|
|
250623
|
+
RESERVED_QUESTION_KEYS = new Set([
|
|
250624
|
+
"question",
|
|
250625
|
+
"questionText",
|
|
250626
|
+
"question_text",
|
|
250627
|
+
"q",
|
|
250628
|
+
"query",
|
|
250629
|
+
"prompt",
|
|
250630
|
+
"text",
|
|
250631
|
+
"title",
|
|
250632
|
+
"message",
|
|
250633
|
+
"body",
|
|
250634
|
+
"goal",
|
|
250635
|
+
"name",
|
|
250636
|
+
"header",
|
|
250637
|
+
"multiSelect",
|
|
250638
|
+
"metadata"
|
|
250639
|
+
]);
|
|
250468
250640
|
questionOptionSchema = lazySchema(() => exports_external.object({
|
|
250469
250641
|
label: exports_external.string().describe('The choice itself, 1-5 words. Name the option, do not restate the question: for "Which database?" use "PostgreSQL", not "Use PostgreSQL for the database".'),
|
|
250470
250642
|
description: exports_external.string().describe('What actually happens if this is chosen, and the cost of choosing it \u2014 the information the user needs that the label does not already give them. Must NOT restate the label in a full sentence. Bad: label "PostgreSQL" / description "Use PostgreSQL." Good: label "PostgreSQL" / description "Relational, strong consistency; needs a running server and a migration step." Include the trade-off, limitation, or consequence that makes this choice different from the others.'),
|
|
@@ -259314,7 +259486,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
|
|
|
259314
259486
|
}
|
|
259315
259487
|
}
|
|
259316
259488
|
function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_STATE_CACHE_SIZE) {
|
|
259317
|
-
const
|
|
259489
|
+
const cache4 = createFileStateCacheWithSizeLimit(maxSize);
|
|
259318
259490
|
const fileReadToolUseIds = new Map;
|
|
259319
259491
|
const fileWriteToolUseIds = new Map;
|
|
259320
259492
|
const fileEditToolUseIds = new Map;
|
|
@@ -259358,7 +259530,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259358
259530
|
`).trim();
|
|
259359
259531
|
if (message.timestamp) {
|
|
259360
259532
|
const timestamp = new Date(message.timestamp).getTime();
|
|
259361
|
-
|
|
259533
|
+
cache4.set(readFilePath, {
|
|
259362
259534
|
content: fileContent,
|
|
259363
259535
|
timestamp,
|
|
259364
259536
|
offset: undefined,
|
|
@@ -259369,7 +259541,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259369
259541
|
const writeToolData = fileWriteToolUseIds.get(content.tool_use_id);
|
|
259370
259542
|
if (writeToolData && message.timestamp) {
|
|
259371
259543
|
const timestamp = new Date(message.timestamp).getTime();
|
|
259372
|
-
|
|
259544
|
+
cache4.set(writeToolData.filePath, {
|
|
259373
259545
|
content: writeToolData.content,
|
|
259374
259546
|
timestamp,
|
|
259375
259547
|
offset: undefined,
|
|
@@ -259380,7 +259552,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259380
259552
|
if (editFilePath && content.is_error !== true) {
|
|
259381
259553
|
try {
|
|
259382
259554
|
const { content: diskContent } = readFileSyncWithMetadata(editFilePath);
|
|
259383
|
-
|
|
259555
|
+
cache4.set(editFilePath, {
|
|
259384
259556
|
content: diskContent,
|
|
259385
259557
|
timestamp: getFileModificationTime(editFilePath),
|
|
259386
259558
|
offset: undefined,
|
|
@@ -259396,7 +259568,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259396
259568
|
}
|
|
259397
259569
|
}
|
|
259398
259570
|
}
|
|
259399
|
-
return
|
|
259571
|
+
return cache4;
|
|
259400
259572
|
}
|
|
259401
259573
|
function extractBashToolsFromMessages(messages) {
|
|
259402
259574
|
const tools = new Set;
|
|
@@ -271303,7 +271475,7 @@ var init_parseDef = __esm(() => {
|
|
|
271303
271475
|
var init_parseTypes = () => {};
|
|
271304
271476
|
|
|
271305
271477
|
// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
271306
|
-
var
|
|
271478
|
+
var init_zodToJsonSchema2 = __esm(() => {
|
|
271307
271479
|
init_parseDef();
|
|
271308
271480
|
init_Refs();
|
|
271309
271481
|
init_any();
|
|
@@ -271311,7 +271483,7 @@ var init_zodToJsonSchema = __esm(() => {
|
|
|
271311
271483
|
|
|
271312
271484
|
// node_modules/zod-to-json-schema/dist/esm/index.js
|
|
271313
271485
|
var init_esm9 = __esm(() => {
|
|
271314
|
-
|
|
271486
|
+
init_zodToJsonSchema2();
|
|
271315
271487
|
init_Options();
|
|
271316
271488
|
init_Refs();
|
|
271317
271489
|
init_parseDef();
|
|
@@ -271342,7 +271514,7 @@ var init_esm9 = __esm(() => {
|
|
|
271342
271514
|
init_union();
|
|
271343
271515
|
init_unknown();
|
|
271344
271516
|
init_selectParser();
|
|
271345
|
-
|
|
271517
|
+
init_zodToJsonSchema2();
|
|
271346
271518
|
});
|
|
271347
271519
|
|
|
271348
271520
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
@@ -296947,7 +297119,7 @@ function getInstallationEnv() {
|
|
|
296947
297119
|
return;
|
|
296948
297120
|
}
|
|
296949
297121
|
function getURCodeVersion() {
|
|
296950
|
-
return "1.76.
|
|
297122
|
+
return "1.76.3";
|
|
296951
297123
|
}
|
|
296952
297124
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
296953
297125
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -303456,8 +303628,8 @@ function getMcpAuthCache() {
|
|
|
303456
303628
|
return authCachePromise;
|
|
303457
303629
|
}
|
|
303458
303630
|
async function isMcpAuthCached(serverId) {
|
|
303459
|
-
const
|
|
303460
|
-
const entry =
|
|
303631
|
+
const cache4 = await getMcpAuthCache();
|
|
303632
|
+
const entry = cache4[serverId];
|
|
303461
303633
|
if (!entry) {
|
|
303462
303634
|
return false;
|
|
303463
303635
|
}
|
|
@@ -303465,11 +303637,11 @@ async function isMcpAuthCached(serverId) {
|
|
|
303465
303637
|
}
|
|
303466
303638
|
function setMcpAuthCacheEntry(serverId) {
|
|
303467
303639
|
writeChain = writeChain.then(async () => {
|
|
303468
|
-
const
|
|
303469
|
-
|
|
303640
|
+
const cache4 = await getMcpAuthCache();
|
|
303641
|
+
cache4[serverId] = { timestamp: Date.now() };
|
|
303470
303642
|
const cachePath = getMcpAuthCachePath();
|
|
303471
303643
|
await mkdir12(dirname34(cachePath), { recursive: true });
|
|
303472
|
-
await writeFile10(cachePath, jsonStringify(
|
|
303644
|
+
await writeFile10(cachePath, jsonStringify(cache4));
|
|
303473
303645
|
authCachePromise = null;
|
|
303474
303646
|
}).catch(() => {});
|
|
303475
303647
|
}
|
|
@@ -304278,7 +304450,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
304278
304450
|
const client2 = new Client({
|
|
304279
304451
|
name: "ur",
|
|
304280
304452
|
title: "UR",
|
|
304281
|
-
version: "1.76.
|
|
304453
|
+
version: "1.76.3",
|
|
304282
304454
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304283
304455
|
websiteUrl: PRODUCT_URL
|
|
304284
304456
|
}, {
|
|
@@ -304638,7 +304810,7 @@ var init_client5 = __esm(() => {
|
|
|
304638
304810
|
const client2 = new Client({
|
|
304639
304811
|
name: "ur",
|
|
304640
304812
|
title: "UR",
|
|
304641
|
-
version: "1.76.
|
|
304813
|
+
version: "1.76.3",
|
|
304642
304814
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304643
304815
|
websiteUrl: PRODUCT_URL
|
|
304644
304816
|
}, {
|
|
@@ -317191,7 +317363,7 @@ async function createRuntime() {
|
|
|
317191
317363
|
bootstrapTelemetry();
|
|
317192
317364
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
317193
317365
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
317194
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.
|
|
317366
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.3"
|
|
317195
317367
|
}));
|
|
317196
317368
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
317197
317369
|
resource,
|
|
@@ -317224,11 +317396,11 @@ async function createRuntime() {
|
|
|
317224
317396
|
setMeterProvider(meterProvider);
|
|
317225
317397
|
setLoggerProvider(loggerProvider);
|
|
317226
317398
|
if (meterProvider) {
|
|
317227
|
-
const meter = meterProvider.getMeter("ur-agent", "1.76.
|
|
317399
|
+
const meter = meterProvider.getMeter("ur-agent", "1.76.3");
|
|
317228
317400
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
317229
317401
|
}
|
|
317230
317402
|
if (loggerProvider) {
|
|
317231
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.
|
|
317403
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.3"));
|
|
317232
317404
|
}
|
|
317233
317405
|
if (!cleanupRegistered2) {
|
|
317234
317406
|
cleanupRegistered2 = true;
|
|
@@ -317890,9 +318062,9 @@ async function assertMinVersion() {
|
|
|
317890
318062
|
if (false) {}
|
|
317891
318063
|
try {
|
|
317892
318064
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
317893
|
-
if (versionConfig.minVersion && lt("1.76.
|
|
318065
|
+
if (versionConfig.minVersion && lt("1.76.3", versionConfig.minVersion)) {
|
|
317894
318066
|
console.error(`
|
|
317895
|
-
It looks like your version of UR (${"1.76.
|
|
318067
|
+
It looks like your version of UR (${"1.76.3"}) needs an update.
|
|
317896
318068
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
317897
318069
|
|
|
317898
318070
|
To update, please run:
|
|
@@ -318108,7 +318280,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318108
318280
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
318109
318281
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
318110
318282
|
pid: process.pid,
|
|
318111
|
-
currentVersion: "1.76.
|
|
318283
|
+
currentVersion: "1.76.3"
|
|
318112
318284
|
});
|
|
318113
318285
|
return "in_progress";
|
|
318114
318286
|
}
|
|
@@ -318117,7 +318289,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318117
318289
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
318118
318290
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
318119
318291
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
318120
|
-
currentVersion: "1.76.
|
|
318292
|
+
currentVersion: "1.76.3"
|
|
318121
318293
|
});
|
|
318122
318294
|
console.error(`
|
|
318123
318295
|
Error: Windows NPM detected in WSL
|
|
@@ -318652,7 +318824,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
318652
318824
|
}
|
|
318653
318825
|
async function getDoctorDiagnostic() {
|
|
318654
318826
|
const installationType = await getCurrentInstallationType();
|
|
318655
|
-
const version2 = typeof MACRO !== "undefined" ? "1.76.
|
|
318827
|
+
const version2 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
318656
318828
|
const installationPath = await getInstallationPath();
|
|
318657
318829
|
const invokedBinary = getInvokedBinary();
|
|
318658
318830
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -319587,8 +319759,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319587
319759
|
const maxVersion = await getMaxVersion();
|
|
319588
319760
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
319589
319761
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
319590
|
-
if (gte("1.76.
|
|
319591
|
-
logForDebugging(`Native installer: current version ${"1.76.
|
|
319762
|
+
if (gte("1.76.3", maxVersion)) {
|
|
319763
|
+
logForDebugging(`Native installer: current version ${"1.76.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
319592
319764
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
319593
319765
|
latency_ms: Date.now() - startTime,
|
|
319594
319766
|
max_version: maxVersion,
|
|
@@ -319599,7 +319771,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319599
319771
|
version2 = maxVersion;
|
|
319600
319772
|
}
|
|
319601
319773
|
}
|
|
319602
|
-
if (!forceReinstall && version2 === "1.76.
|
|
319774
|
+
if (!forceReinstall && version2 === "1.76.3" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
319603
319775
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
319604
319776
|
logEvent("tengu_native_update_complete", {
|
|
319605
319777
|
latency_ms: Date.now() - startTime,
|
|
@@ -330049,8 +330221,8 @@ function invalidateOverageCreditGrantCache() {
|
|
|
330049
330221
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
330050
330222
|
if (!orgId)
|
|
330051
330223
|
return;
|
|
330052
|
-
const
|
|
330053
|
-
if (!
|
|
330224
|
+
const cache4 = getGlobalConfig().overageCreditGrantCache;
|
|
330225
|
+
if (!cache4 || !(orgId in cache4))
|
|
330054
330226
|
return;
|
|
330055
330227
|
saveGlobalConfig((prev) => {
|
|
330056
330228
|
const next = { ...prev.overageCreditGrantCache };
|
|
@@ -343668,8 +343840,8 @@ import { copyFile as copyFile4, writeFile as writeFile18 } from "fs/promises";
|
|
|
343668
343840
|
import { join as join87, resolve as resolve28, sep as sep15 } from "path";
|
|
343669
343841
|
function getPlanSlug(sessionId) {
|
|
343670
343842
|
const id = sessionId ?? getSessionId();
|
|
343671
|
-
const
|
|
343672
|
-
let slug3 =
|
|
343843
|
+
const cache4 = getPlanSlugCache();
|
|
343844
|
+
let slug3 = cache4.get(id);
|
|
343673
343845
|
if (!slug3) {
|
|
343674
343846
|
const plansDir = getPlansDirectory();
|
|
343675
343847
|
for (let i3 = 0;i3 < MAX_SLUG_RETRIES; i3++) {
|
|
@@ -343679,7 +343851,7 @@ function getPlanSlug(sessionId) {
|
|
|
343679
343851
|
break;
|
|
343680
343852
|
}
|
|
343681
343853
|
}
|
|
343682
|
-
|
|
343854
|
+
cache4.set(id, slug3);
|
|
343683
343855
|
}
|
|
343684
343856
|
return slug3;
|
|
343685
343857
|
}
|
|
@@ -366737,13 +366909,14 @@ function normalizeWriteInput(value) {
|
|
|
366737
366909
|
if (!input)
|
|
366738
366910
|
return value;
|
|
366739
366911
|
const filePath = typeof input.file_path === "string" ? input.file_path : input.file_path === undefined && typeof input.filePath === "string" ? input.filePath : input.file_path === undefined && typeof input.path === "string" ? input.path : undefined;
|
|
366740
|
-
const content = typeof input.content === "string" ? input.content : input.content === undefined && typeof input.text === "string" ? input.text : input.content === undefined && typeof input.body === "string" ? input.body : input.content === undefined && typeof input.data === "string" ? input.data : input.content === undefined && typeof input.value === "string" ? input.value : undefined;
|
|
366912
|
+
const content = typeof input.content === "string" ? input.content : input.content === undefined && typeof input.text === "string" ? input.text : input.content === undefined && typeof input.body === "string" ? input.body : input.content === undefined && typeof input.data === "string" ? input.data : input.content === undefined && typeof input.value === "string" ? input.value : input.content === undefined && typeof input.input === "string" ? input.input : undefined;
|
|
366913
|
+
const normalizedContent = content ?? "";
|
|
366741
366914
|
if (filePath === undefined && content === undefined) {
|
|
366742
366915
|
return value;
|
|
366743
366916
|
}
|
|
366744
366917
|
return {
|
|
366745
366918
|
...typeof filePath === "string" ? { file_path: filePath } : {},
|
|
366746
|
-
|
|
366919
|
+
content: normalizedContent
|
|
366747
366920
|
};
|
|
366748
366921
|
}
|
|
366749
366922
|
var inputSchema14, outputSchema11, FileWriteTool;
|
|
@@ -367399,387 +367572,6 @@ var init_UI10 = __esm(() => {
|
|
|
367399
367572
|
jsx_dev_runtime135 = __toESM(require_jsx_dev_runtime(), 1);
|
|
367400
367573
|
});
|
|
367401
367574
|
|
|
367402
|
-
// src/tools/GrepTool/GrepTool.ts
|
|
367403
|
-
function applyHeadLimit(items, limit, offset = 0) {
|
|
367404
|
-
if (limit === 0) {
|
|
367405
|
-
return { items: items.slice(offset), appliedLimit: undefined };
|
|
367406
|
-
}
|
|
367407
|
-
const effectiveLimit = limit ?? DEFAULT_HEAD_LIMIT;
|
|
367408
|
-
const sliced = items.slice(offset, offset + effectiveLimit);
|
|
367409
|
-
const wasTruncated = items.length - offset > effectiveLimit;
|
|
367410
|
-
return {
|
|
367411
|
-
items: sliced,
|
|
367412
|
-
appliedLimit: wasTruncated ? effectiveLimit : undefined
|
|
367413
|
-
};
|
|
367414
|
-
}
|
|
367415
|
-
function formatLimitInfo(appliedLimit, appliedOffset) {
|
|
367416
|
-
const parts = [];
|
|
367417
|
-
if (appliedLimit !== undefined)
|
|
367418
|
-
parts.push(`limit: ${appliedLimit}`);
|
|
367419
|
-
if (appliedOffset)
|
|
367420
|
-
parts.push(`offset: ${appliedOffset}`);
|
|
367421
|
-
return parts.join(", ");
|
|
367422
|
-
}
|
|
367423
|
-
var inputSchema15, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema12, GrepTool;
|
|
367424
|
-
var init_GrepTool = __esm(() => {
|
|
367425
|
-
init_v4();
|
|
367426
|
-
init_Tool();
|
|
367427
|
-
init_cwd2();
|
|
367428
|
-
init_errors();
|
|
367429
|
-
init_file();
|
|
367430
|
-
init_fsOperations();
|
|
367431
|
-
init_path();
|
|
367432
|
-
init_filesystem();
|
|
367433
|
-
init_shellRuleMatching();
|
|
367434
|
-
init_orphanedPluginFilter();
|
|
367435
|
-
init_ripgrep();
|
|
367436
|
-
init_semanticBoolean();
|
|
367437
|
-
init_semanticNumber();
|
|
367438
|
-
init_stringUtils();
|
|
367439
|
-
init_prompt();
|
|
367440
|
-
init_UI10();
|
|
367441
|
-
inputSchema15 = lazySchema(() => exports_external.strictObject({
|
|
367442
|
-
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
367443
|
-
path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
|
|
367444
|
-
glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
|
|
367445
|
-
output_mode: exports_external.enum(["content", "files_with_matches", "count"]).optional().describe('Output mode: "content" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), "files_with_matches" shows file paths (supports head_limit), "count" shows match counts (supports head_limit). Defaults to "files_with_matches".'),
|
|
367446
|
-
"-B": semanticNumber(exports_external.number().optional()).describe('Number of lines to show before each match (rg -B). Requires output_mode: "content", ignored otherwise.'),
|
|
367447
|
-
"-A": semanticNumber(exports_external.number().optional()).describe('Number of lines to show after each match (rg -A). Requires output_mode: "content", ignored otherwise.'),
|
|
367448
|
-
"-C": semanticNumber(exports_external.number().optional()).describe("Alias for context."),
|
|
367449
|
-
context: semanticNumber(exports_external.number().optional()).describe('Number of lines to show before and after each match (rg -C). Requires output_mode: "content", ignored otherwise.'),
|
|
367450
|
-
"-n": semanticBoolean(exports_external.boolean().optional()).describe('Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.'),
|
|
367451
|
-
"-i": semanticBoolean(exports_external.boolean().optional()).describe("Case insensitive search (rg -i)"),
|
|
367452
|
-
type: exports_external.string().optional().describe("File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types."),
|
|
367453
|
-
head_limit: semanticNumber(exports_external.number().optional()).describe('Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified. Pass 0 for unlimited (use sparingly \u2014 large result sets waste context).'),
|
|
367454
|
-
offset: semanticNumber(exports_external.number().optional()).describe('Skip first N lines/entries before applying head_limit, equivalent to "| tail -n +N | head -N". Works across all output modes. Defaults to 0.'),
|
|
367455
|
-
multiline: semanticBoolean(exports_external.boolean().optional()).describe("Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.")
|
|
367456
|
-
}));
|
|
367457
|
-
VCS_DIRECTORIES_TO_EXCLUDE2 = [
|
|
367458
|
-
".git",
|
|
367459
|
-
".svn",
|
|
367460
|
-
".hg",
|
|
367461
|
-
".bzr",
|
|
367462
|
-
".jj",
|
|
367463
|
-
".sl"
|
|
367464
|
-
];
|
|
367465
|
-
outputSchema12 = lazySchema(() => exports_external.object({
|
|
367466
|
-
mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
|
|
367467
|
-
numFiles: exports_external.number(),
|
|
367468
|
-
filenames: exports_external.array(exports_external.string()),
|
|
367469
|
-
content: exports_external.string().optional(),
|
|
367470
|
-
numLines: exports_external.number().optional(),
|
|
367471
|
-
numMatches: exports_external.number().optional(),
|
|
367472
|
-
appliedLimit: exports_external.number().optional(),
|
|
367473
|
-
appliedOffset: exports_external.number().optional()
|
|
367474
|
-
}));
|
|
367475
|
-
GrepTool = buildTool({
|
|
367476
|
-
name: GREP_TOOL_NAME,
|
|
367477
|
-
searchHint: "search file contents with regex (ripgrep)",
|
|
367478
|
-
maxResultSizeChars: 20000,
|
|
367479
|
-
strict: true,
|
|
367480
|
-
async description() {
|
|
367481
|
-
return getDescription();
|
|
367482
|
-
},
|
|
367483
|
-
userFacingName() {
|
|
367484
|
-
return "Search";
|
|
367485
|
-
},
|
|
367486
|
-
getToolUseSummary: getToolUseSummary3,
|
|
367487
|
-
getActivityDescription(input) {
|
|
367488
|
-
const summary = getToolUseSummary3(input);
|
|
367489
|
-
return summary ? `Searching for ${summary}` : "Searching";
|
|
367490
|
-
},
|
|
367491
|
-
get inputSchema() {
|
|
367492
|
-
return inputSchema15();
|
|
367493
|
-
},
|
|
367494
|
-
get outputSchema() {
|
|
367495
|
-
return outputSchema12();
|
|
367496
|
-
},
|
|
367497
|
-
isConcurrencySafe() {
|
|
367498
|
-
return true;
|
|
367499
|
-
},
|
|
367500
|
-
isReadOnly() {
|
|
367501
|
-
return true;
|
|
367502
|
-
},
|
|
367503
|
-
toAutoClassifierInput(input) {
|
|
367504
|
-
return input.path ? `${input.pattern} in ${input.path}` : input.pattern;
|
|
367505
|
-
},
|
|
367506
|
-
isSearchOrReadCommand() {
|
|
367507
|
-
return { isSearch: true, isRead: false };
|
|
367508
|
-
},
|
|
367509
|
-
getPath({ path: path13 }) {
|
|
367510
|
-
return path13 || getCwd();
|
|
367511
|
-
},
|
|
367512
|
-
async preparePermissionMatcher({ pattern }) {
|
|
367513
|
-
return (rulePattern) => matchWildcardPattern(rulePattern, pattern);
|
|
367514
|
-
},
|
|
367515
|
-
async validateInput({ path: path13 }) {
|
|
367516
|
-
if (path13) {
|
|
367517
|
-
const fs4 = getFsImplementation();
|
|
367518
|
-
const absolutePath = expandPath(path13);
|
|
367519
|
-
if (absolutePath.startsWith("\\\\") || absolutePath.startsWith("//")) {
|
|
367520
|
-
return { result: true };
|
|
367521
|
-
}
|
|
367522
|
-
try {
|
|
367523
|
-
await fs4.stat(absolutePath);
|
|
367524
|
-
} catch (e) {
|
|
367525
|
-
if (isENOENT(e)) {
|
|
367526
|
-
const cwdSuggestion = await suggestPathUnderCwd(absolutePath);
|
|
367527
|
-
let message = `Path does not exist: ${path13}. ${FILE_NOT_FOUND_CWD_NOTE} ${getCwd()}.`;
|
|
367528
|
-
if (cwdSuggestion) {
|
|
367529
|
-
message += ` Did you mean ${cwdSuggestion}?`;
|
|
367530
|
-
}
|
|
367531
|
-
return {
|
|
367532
|
-
result: false,
|
|
367533
|
-
message,
|
|
367534
|
-
errorCode: 1
|
|
367535
|
-
};
|
|
367536
|
-
}
|
|
367537
|
-
throw e;
|
|
367538
|
-
}
|
|
367539
|
-
}
|
|
367540
|
-
return { result: true };
|
|
367541
|
-
},
|
|
367542
|
-
async checkPermissions(input, context5) {
|
|
367543
|
-
const appState = context5.getAppState();
|
|
367544
|
-
return checkReadPermissionForTool(GrepTool, input, appState.toolPermissionContext);
|
|
367545
|
-
},
|
|
367546
|
-
async prompt() {
|
|
367547
|
-
return getDescription();
|
|
367548
|
-
},
|
|
367549
|
-
renderToolUseMessage: renderToolUseMessage11,
|
|
367550
|
-
renderToolUseErrorMessage: renderToolUseErrorMessage7,
|
|
367551
|
-
renderToolResultMessage: renderToolResultMessage10,
|
|
367552
|
-
extractSearchText({ mode, content, filenames }) {
|
|
367553
|
-
if (mode === "content" && content)
|
|
367554
|
-
return content;
|
|
367555
|
-
return filenames.join(`
|
|
367556
|
-
`);
|
|
367557
|
-
},
|
|
367558
|
-
mapToolResultToToolResultBlockParam({
|
|
367559
|
-
mode = "files_with_matches",
|
|
367560
|
-
numFiles,
|
|
367561
|
-
filenames,
|
|
367562
|
-
content,
|
|
367563
|
-
numLines: _numLines,
|
|
367564
|
-
numMatches,
|
|
367565
|
-
appliedLimit,
|
|
367566
|
-
appliedOffset
|
|
367567
|
-
}, toolUseID) {
|
|
367568
|
-
if (mode === "content") {
|
|
367569
|
-
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367570
|
-
const resultContent = content || "No matches found";
|
|
367571
|
-
const finalContent = limitInfo2 ? `${resultContent}
|
|
367572
|
-
|
|
367573
|
-
[Showing results with pagination = ${limitInfo2}]` : resultContent;
|
|
367574
|
-
return {
|
|
367575
|
-
tool_use_id: toolUseID,
|
|
367576
|
-
type: "tool_result",
|
|
367577
|
-
content: finalContent
|
|
367578
|
-
};
|
|
367579
|
-
}
|
|
367580
|
-
if (mode === "count") {
|
|
367581
|
-
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367582
|
-
const rawContent = content || "No matches found";
|
|
367583
|
-
const matches = numMatches ?? 0;
|
|
367584
|
-
const files = numFiles ?? 0;
|
|
367585
|
-
const summary = `
|
|
367586
|
-
|
|
367587
|
-
Found ${matches} total ${matches === 1 ? "occurrence" : "occurrences"} across ${files} ${files === 1 ? "file" : "files"}.${limitInfo2 ? ` with pagination = ${limitInfo2}` : ""}`;
|
|
367588
|
-
return {
|
|
367589
|
-
tool_use_id: toolUseID,
|
|
367590
|
-
type: "tool_result",
|
|
367591
|
-
content: rawContent + summary
|
|
367592
|
-
};
|
|
367593
|
-
}
|
|
367594
|
-
const limitInfo = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367595
|
-
if (numFiles === 0) {
|
|
367596
|
-
return {
|
|
367597
|
-
tool_use_id: toolUseID,
|
|
367598
|
-
type: "tool_result",
|
|
367599
|
-
content: "No files found"
|
|
367600
|
-
};
|
|
367601
|
-
}
|
|
367602
|
-
const result = `Found ${numFiles} ${plural(numFiles, "file")}${limitInfo ? ` ${limitInfo}` : ""}
|
|
367603
|
-
${filenames.join(`
|
|
367604
|
-
`)}`;
|
|
367605
|
-
return {
|
|
367606
|
-
tool_use_id: toolUseID,
|
|
367607
|
-
type: "tool_result",
|
|
367608
|
-
content: result
|
|
367609
|
-
};
|
|
367610
|
-
},
|
|
367611
|
-
async call({
|
|
367612
|
-
pattern,
|
|
367613
|
-
path: path13,
|
|
367614
|
-
glob: glob2,
|
|
367615
|
-
type,
|
|
367616
|
-
output_mode = "files_with_matches",
|
|
367617
|
-
"-B": context_before,
|
|
367618
|
-
"-A": context_after,
|
|
367619
|
-
"-C": context_c,
|
|
367620
|
-
context: context5,
|
|
367621
|
-
"-n": show_line_numbers = true,
|
|
367622
|
-
"-i": case_insensitive = false,
|
|
367623
|
-
head_limit,
|
|
367624
|
-
offset = 0,
|
|
367625
|
-
multiline = false
|
|
367626
|
-
}, { abortController, getAppState }) {
|
|
367627
|
-
const absolutePath = path13 ? expandPath(path13) : getCwd();
|
|
367628
|
-
const args = ["--hidden"];
|
|
367629
|
-
for (const dir of VCS_DIRECTORIES_TO_EXCLUDE2) {
|
|
367630
|
-
args.push("--glob", `!${dir}`);
|
|
367631
|
-
}
|
|
367632
|
-
args.push("--max-columns", "500");
|
|
367633
|
-
if (multiline) {
|
|
367634
|
-
args.push("-U", "--multiline-dotall");
|
|
367635
|
-
}
|
|
367636
|
-
if (case_insensitive) {
|
|
367637
|
-
args.push("-i");
|
|
367638
|
-
}
|
|
367639
|
-
if (output_mode === "files_with_matches") {
|
|
367640
|
-
args.push("-l");
|
|
367641
|
-
} else if (output_mode === "count") {
|
|
367642
|
-
args.push("-c");
|
|
367643
|
-
}
|
|
367644
|
-
if (show_line_numbers && output_mode === "content") {
|
|
367645
|
-
args.push("-n");
|
|
367646
|
-
}
|
|
367647
|
-
if (output_mode === "content") {
|
|
367648
|
-
if (context5 !== undefined) {
|
|
367649
|
-
args.push("-C", context5.toString());
|
|
367650
|
-
} else if (context_c !== undefined) {
|
|
367651
|
-
args.push("-C", context_c.toString());
|
|
367652
|
-
} else {
|
|
367653
|
-
if (context_before !== undefined) {
|
|
367654
|
-
args.push("-B", context_before.toString());
|
|
367655
|
-
}
|
|
367656
|
-
if (context_after !== undefined) {
|
|
367657
|
-
args.push("-A", context_after.toString());
|
|
367658
|
-
}
|
|
367659
|
-
}
|
|
367660
|
-
}
|
|
367661
|
-
if (pattern.startsWith("-")) {
|
|
367662
|
-
args.push("-e", pattern);
|
|
367663
|
-
} else {
|
|
367664
|
-
args.push(pattern);
|
|
367665
|
-
}
|
|
367666
|
-
if (type) {
|
|
367667
|
-
args.push("--type", type);
|
|
367668
|
-
}
|
|
367669
|
-
if (glob2) {
|
|
367670
|
-
const globPatterns = [];
|
|
367671
|
-
const rawPatterns = glob2.split(/\s+/);
|
|
367672
|
-
for (const rawPattern of rawPatterns) {
|
|
367673
|
-
if (rawPattern.includes("{") && rawPattern.includes("}")) {
|
|
367674
|
-
globPatterns.push(rawPattern);
|
|
367675
|
-
} else {
|
|
367676
|
-
globPatterns.push(...rawPattern.split(",").filter(Boolean));
|
|
367677
|
-
}
|
|
367678
|
-
}
|
|
367679
|
-
for (const globPattern of globPatterns.filter(Boolean)) {
|
|
367680
|
-
args.push("--glob", globPattern);
|
|
367681
|
-
}
|
|
367682
|
-
}
|
|
367683
|
-
const appState = getAppState();
|
|
367684
|
-
const ignorePatterns = normalizePatternsToPath(getFileReadIgnorePatterns(appState.toolPermissionContext), getCwd());
|
|
367685
|
-
for (const ignorePattern of ignorePatterns) {
|
|
367686
|
-
const rgIgnorePattern = ignorePattern.startsWith("/") ? `!${ignorePattern}` : `!**/${ignorePattern}`;
|
|
367687
|
-
args.push("--glob", rgIgnorePattern);
|
|
367688
|
-
}
|
|
367689
|
-
for (const exclusion of await getGlobExclusionsForPluginCache(absolutePath)) {
|
|
367690
|
-
args.push("--glob", exclusion);
|
|
367691
|
-
}
|
|
367692
|
-
const results = await ripGrep(args, absolutePath, abortController.signal);
|
|
367693
|
-
if (output_mode === "content") {
|
|
367694
|
-
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
367695
|
-
const finalLines = limitedResults.map((line) => {
|
|
367696
|
-
const colonIndex = line.indexOf(":");
|
|
367697
|
-
if (colonIndex > 0) {
|
|
367698
|
-
const filePath = line.substring(0, colonIndex);
|
|
367699
|
-
const rest = line.substring(colonIndex);
|
|
367700
|
-
return toRelativePath(filePath) + rest;
|
|
367701
|
-
}
|
|
367702
|
-
return line;
|
|
367703
|
-
});
|
|
367704
|
-
const output2 = {
|
|
367705
|
-
mode: "content",
|
|
367706
|
-
numFiles: 0,
|
|
367707
|
-
filenames: [],
|
|
367708
|
-
content: finalLines.join(`
|
|
367709
|
-
`),
|
|
367710
|
-
numLines: finalLines.length,
|
|
367711
|
-
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
367712
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367713
|
-
};
|
|
367714
|
-
return { data: output2 };
|
|
367715
|
-
}
|
|
367716
|
-
if (output_mode === "count") {
|
|
367717
|
-
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
367718
|
-
const finalCountLines = limitedResults.map((line) => {
|
|
367719
|
-
const colonIndex = line.lastIndexOf(":");
|
|
367720
|
-
if (colonIndex > 0) {
|
|
367721
|
-
const filePath = line.substring(0, colonIndex);
|
|
367722
|
-
const count4 = line.substring(colonIndex);
|
|
367723
|
-
return toRelativePath(filePath) + count4;
|
|
367724
|
-
}
|
|
367725
|
-
return line;
|
|
367726
|
-
});
|
|
367727
|
-
let totalMatches = 0;
|
|
367728
|
-
let fileCount = 0;
|
|
367729
|
-
for (const line of finalCountLines) {
|
|
367730
|
-
const colonIndex = line.lastIndexOf(":");
|
|
367731
|
-
if (colonIndex > 0) {
|
|
367732
|
-
const countStr = line.substring(colonIndex + 1);
|
|
367733
|
-
const count4 = parseInt(countStr, 10);
|
|
367734
|
-
if (!isNaN(count4)) {
|
|
367735
|
-
totalMatches += count4;
|
|
367736
|
-
fileCount += 1;
|
|
367737
|
-
}
|
|
367738
|
-
}
|
|
367739
|
-
}
|
|
367740
|
-
const output2 = {
|
|
367741
|
-
mode: "count",
|
|
367742
|
-
numFiles: fileCount,
|
|
367743
|
-
filenames: [],
|
|
367744
|
-
content: finalCountLines.join(`
|
|
367745
|
-
`),
|
|
367746
|
-
numMatches: totalMatches,
|
|
367747
|
-
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
367748
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367749
|
-
};
|
|
367750
|
-
return { data: output2 };
|
|
367751
|
-
}
|
|
367752
|
-
const stats = await Promise.allSettled(results.map((_) => getFsImplementation().stat(_)));
|
|
367753
|
-
const sortedMatches = results.map((_, i3) => {
|
|
367754
|
-
const r = stats[i3];
|
|
367755
|
-
return [
|
|
367756
|
-
_,
|
|
367757
|
-
r.status === "fulfilled" ? r.value.mtimeMs ?? 0 : 0
|
|
367758
|
-
];
|
|
367759
|
-
}).sort((a2, b) => {
|
|
367760
|
-
if (false) {}
|
|
367761
|
-
const timeComparison = b[1] - a2[1];
|
|
367762
|
-
if (timeComparison === 0) {
|
|
367763
|
-
return a2[0].localeCompare(b[0]);
|
|
367764
|
-
}
|
|
367765
|
-
return timeComparison;
|
|
367766
|
-
}).map((_) => _[0]);
|
|
367767
|
-
const { items: finalMatches, appliedLimit } = applyHeadLimit(sortedMatches, head_limit, offset);
|
|
367768
|
-
const relativeMatches = finalMatches.map(toRelativePath);
|
|
367769
|
-
const output = {
|
|
367770
|
-
mode: "files_with_matches",
|
|
367771
|
-
filenames: relativeMatches,
|
|
367772
|
-
numFiles: relativeMatches.length,
|
|
367773
|
-
...appliedLimit !== undefined && { appliedLimit },
|
|
367774
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367775
|
-
};
|
|
367776
|
-
return {
|
|
367777
|
-
data: output
|
|
367778
|
-
};
|
|
367779
|
-
}
|
|
367780
|
-
});
|
|
367781
|
-
});
|
|
367782
|
-
|
|
367783
367575
|
// src/tools/GlobTool/UI.tsx
|
|
367784
367576
|
function userFacingName5() {
|
|
367785
367577
|
return "Search";
|
|
@@ -367838,13 +367630,13 @@ var init_UI11 = __esm(() => {
|
|
|
367838
367630
|
init_ink2();
|
|
367839
367631
|
init_file();
|
|
367840
367632
|
init_format2();
|
|
367841
|
-
|
|
367633
|
+
init_UI10();
|
|
367842
367634
|
jsx_dev_runtime136 = __toESM(require_jsx_dev_runtime(), 1);
|
|
367843
|
-
renderToolResultMessage11 =
|
|
367635
|
+
renderToolResultMessage11 = renderToolResultMessage10;
|
|
367844
367636
|
});
|
|
367845
367637
|
|
|
367846
367638
|
// src/tools/GlobTool/GlobTool.ts
|
|
367847
|
-
var
|
|
367639
|
+
var inputSchema15, outputSchema12, GlobTool;
|
|
367848
367640
|
var init_GlobTool = __esm(() => {
|
|
367849
367641
|
init_v4();
|
|
367850
367642
|
init_Tool();
|
|
@@ -367857,11 +367649,11 @@ var init_GlobTool = __esm(() => {
|
|
|
367857
367649
|
init_filesystem();
|
|
367858
367650
|
init_shellRuleMatching();
|
|
367859
367651
|
init_UI11();
|
|
367860
|
-
|
|
367652
|
+
inputSchema15 = lazySchema(() => exports_external.strictObject({
|
|
367861
367653
|
pattern: exports_external.string().describe("The glob pattern to match files against"),
|
|
367862
367654
|
path: exports_external.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.')
|
|
367863
367655
|
}));
|
|
367864
|
-
|
|
367656
|
+
outputSchema12 = lazySchema(() => exports_external.object({
|
|
367865
367657
|
durationMs: exports_external.number().describe("Time taken to execute the search in milliseconds"),
|
|
367866
367658
|
numFiles: exports_external.number().describe("Total number of files found"),
|
|
367867
367659
|
filenames: exports_external.array(exports_external.string()).describe("Array of file paths that match the pattern"),
|
|
@@ -367881,10 +367673,10 @@ var init_GlobTool = __esm(() => {
|
|
|
367881
367673
|
return summary ? `Finding ${summary}` : "Finding files";
|
|
367882
367674
|
},
|
|
367883
367675
|
get inputSchema() {
|
|
367884
|
-
return
|
|
367676
|
+
return inputSchema15();
|
|
367885
367677
|
},
|
|
367886
367678
|
get outputSchema() {
|
|
367887
|
-
return
|
|
367679
|
+
return outputSchema12();
|
|
367888
367680
|
},
|
|
367889
367681
|
isConcurrencySafe() {
|
|
367890
367682
|
return true;
|
|
@@ -368418,7 +368210,7 @@ var init_UI12 = __esm(() => {
|
|
|
368418
368210
|
|
|
368419
368211
|
// src/tools/NotebookEditTool/NotebookEditTool.ts
|
|
368420
368212
|
import { extname as extname13, isAbsolute as isAbsolute28, resolve as resolve37 } from "path";
|
|
368421
|
-
var
|
|
368213
|
+
var inputSchema16, outputSchema13, NotebookEditTool;
|
|
368422
368214
|
var init_NotebookEditTool = __esm(() => {
|
|
368423
368215
|
init_fileHistory();
|
|
368424
368216
|
init_v4();
|
|
@@ -368433,14 +368225,14 @@ var init_NotebookEditTool = __esm(() => {
|
|
|
368433
368225
|
init_filesystem();
|
|
368434
368226
|
init_slowOperations();
|
|
368435
368227
|
init_UI12();
|
|
368436
|
-
|
|
368228
|
+
inputSchema16 = lazySchema(() => exports_external.strictObject({
|
|
368437
368229
|
notebook_path: exports_external.string().describe("The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)"),
|
|
368438
368230
|
cell_id: exports_external.string().optional().describe("The ID of the cell to edit. When inserting a new cell, the new cell will be inserted after the cell with this ID, or at the beginning if not specified."),
|
|
368439
368231
|
new_source: exports_external.string().describe("The new source for the cell"),
|
|
368440
368232
|
cell_type: exports_external.enum(["code", "markdown"]).optional().describe("The type of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required."),
|
|
368441
368233
|
edit_mode: exports_external.enum(["replace", "insert", "delete"]).optional().describe("The type of edit to make (replace, insert, delete). Defaults to replace.")
|
|
368442
368234
|
}));
|
|
368443
|
-
|
|
368235
|
+
outputSchema13 = lazySchema(() => exports_external.object({
|
|
368444
368236
|
new_source: exports_external.string().describe("The new source code that was written to the cell"),
|
|
368445
368237
|
cell_id: exports_external.string().optional().describe("The ID of the cell that was edited"),
|
|
368446
368238
|
cell_type: exports_external.enum(["code", "markdown"]).describe("The type of the cell"),
|
|
@@ -368471,10 +368263,10 @@ var init_NotebookEditTool = __esm(() => {
|
|
|
368471
368263
|
return summary ? `Editing notebook ${summary}` : "Editing notebook";
|
|
368472
368264
|
},
|
|
368473
368265
|
get inputSchema() {
|
|
368474
|
-
return
|
|
368266
|
+
return inputSchema16();
|
|
368475
368267
|
},
|
|
368476
368268
|
get outputSchema() {
|
|
368477
|
-
return
|
|
368269
|
+
return outputSchema13();
|
|
368478
368270
|
},
|
|
368479
368271
|
toAutoClassifierInput(input) {
|
|
368480
368272
|
if (false) {}
|
|
@@ -368933,21 +368725,21 @@ async function screenSize(platform4) {
|
|
|
368933
368725
|
const [width, height] = result.stdout.trim().split(/\s+/).map(Number);
|
|
368934
368726
|
return Number.isFinite(width) && Number.isFinite(height) ? { width, height } : null;
|
|
368935
368727
|
}
|
|
368936
|
-
var COMPUTER_TOOL_NAME = "Computer",
|
|
368728
|
+
var COMPUTER_TOOL_NAME = "Computer", inputSchema17, outputSchema14, ComputerTool;
|
|
368937
368729
|
var init_ComputerTool = __esm(() => {
|
|
368938
368730
|
init_v4();
|
|
368939
368731
|
init_Tool();
|
|
368940
368732
|
init_execFileNoThrow();
|
|
368941
368733
|
init_imageResizer();
|
|
368942
368734
|
init_UI13();
|
|
368943
|
-
|
|
368735
|
+
inputSchema17 = lazySchema(() => exports_external.object({
|
|
368944
368736
|
action: exports_external.enum(["screenshot", "click", "type"]).describe("What to do: read the screen, click a point, or type text"),
|
|
368945
368737
|
x: exports_external.number().int().optional().describe("X coordinate, required for click"),
|
|
368946
368738
|
y: exports_external.number().int().optional().describe("Y coordinate, required for click"),
|
|
368947
368739
|
button: exports_external.enum(["left", "right"]).optional().describe("Mouse button for click (default left)"),
|
|
368948
368740
|
text: exports_external.string().optional().describe(`Text to type, required for type (max ${MAX_TYPE_CHARS} chars)`)
|
|
368949
368741
|
}));
|
|
368950
|
-
|
|
368742
|
+
outputSchema14 = lazySchema(() => exports_external.object({
|
|
368951
368743
|
action: exports_external.string(),
|
|
368952
368744
|
ok: exports_external.boolean(),
|
|
368953
368745
|
detail: exports_external.string(),
|
|
@@ -368990,10 +368782,10 @@ var init_ComputerTool = __esm(() => {
|
|
|
368990
368782
|
return action2 === "screenshot" ? "Capturing screen" : `Desktop ${action2}`;
|
|
368991
368783
|
},
|
|
368992
368784
|
get inputSchema() {
|
|
368993
|
-
return
|
|
368785
|
+
return inputSchema17();
|
|
368994
368786
|
},
|
|
368995
368787
|
get outputSchema() {
|
|
368996
|
-
return
|
|
368788
|
+
return outputSchema14();
|
|
368997
368789
|
},
|
|
368998
368790
|
isConcurrencySafe() {
|
|
368999
368791
|
return false;
|
|
@@ -369793,7 +369585,7 @@ function buildSuggestions(ruleContent) {
|
|
|
369793
369585
|
}
|
|
369794
369586
|
];
|
|
369795
369587
|
}
|
|
369796
|
-
var
|
|
369588
|
+
var inputSchema18, outputSchema15, WebFetchTool;
|
|
369797
369589
|
var init_WebFetchTool = __esm(() => {
|
|
369798
369590
|
init_v4();
|
|
369799
369591
|
init_promptInjection();
|
|
@@ -369803,11 +369595,11 @@ var init_WebFetchTool = __esm(() => {
|
|
|
369803
369595
|
init_preapproved();
|
|
369804
369596
|
init_UI14();
|
|
369805
369597
|
init_utils11();
|
|
369806
|
-
|
|
369598
|
+
inputSchema18 = lazySchema(() => exports_external.strictObject({
|
|
369807
369599
|
url: exports_external.string().url().describe("The URL to fetch content from"),
|
|
369808
369600
|
prompt: exports_external.string().describe("The prompt to run on the fetched content")
|
|
369809
369601
|
}));
|
|
369810
|
-
|
|
369602
|
+
outputSchema15 = lazySchema(() => exports_external.object({
|
|
369811
369603
|
bytes: exports_external.number().describe("Size of the fetched content in bytes"),
|
|
369812
369604
|
code: exports_external.number().describe("HTTP response code"),
|
|
369813
369605
|
codeText: exports_external.string().describe("HTTP response code text"),
|
|
@@ -369838,10 +369630,10 @@ var init_WebFetchTool = __esm(() => {
|
|
|
369838
369630
|
return summary ? `Fetching ${summary}` : "Fetching web page";
|
|
369839
369631
|
},
|
|
369840
369632
|
get inputSchema() {
|
|
369841
|
-
return
|
|
369633
|
+
return inputSchema18();
|
|
369842
369634
|
},
|
|
369843
369635
|
get outputSchema() {
|
|
369844
|
-
return
|
|
369636
|
+
return outputSchema15();
|
|
369845
369637
|
},
|
|
369846
369638
|
isConcurrencySafe() {
|
|
369847
369639
|
return true;
|
|
@@ -370068,12 +369860,12 @@ async function dispatch(input) {
|
|
|
370068
369860
|
return { success: false, error: `unsupported action: ${input.action}` };
|
|
370069
369861
|
}
|
|
370070
369862
|
}
|
|
370071
|
-
var GITHUB_TOOL_NAME = "GitHub",
|
|
369863
|
+
var GITHUB_TOOL_NAME = "GitHub", inputSchema19, outputSchema16, GitHubTool;
|
|
370072
369864
|
var init_GitHubTool = __esm(() => {
|
|
370073
369865
|
init_v4();
|
|
370074
369866
|
init_Tool();
|
|
370075
369867
|
init_execFileNoThrow();
|
|
370076
|
-
|
|
369868
|
+
inputSchema19 = lazySchema(() => exports_external.strictObject({
|
|
370077
369869
|
action: exports_external.enum([
|
|
370078
369870
|
"pr_list",
|
|
370079
369871
|
"pr_view",
|
|
@@ -370093,7 +369885,7 @@ var init_GitHubTool = __esm(() => {
|
|
|
370093
369885
|
limit: exports_external.number().int().optional().describe("Maximum results to return"),
|
|
370094
369886
|
draft: exports_external.boolean().optional().describe("Create PR as draft")
|
|
370095
369887
|
}));
|
|
370096
|
-
|
|
369888
|
+
outputSchema16 = lazySchema(() => exports_external.object({
|
|
370097
369889
|
success: exports_external.boolean(),
|
|
370098
369890
|
stdout: exports_external.string().optional(),
|
|
370099
369891
|
stderr: exports_external.string().optional(),
|
|
@@ -370114,10 +369906,10 @@ var init_GitHubTool = __esm(() => {
|
|
|
370114
369906
|
return "GitHub";
|
|
370115
369907
|
},
|
|
370116
369908
|
get inputSchema() {
|
|
370117
|
-
return
|
|
369909
|
+
return inputSchema19();
|
|
370118
369910
|
},
|
|
370119
369911
|
get outputSchema() {
|
|
370120
|
-
return
|
|
369912
|
+
return outputSchema16();
|
|
370121
369913
|
},
|
|
370122
369914
|
isConcurrencySafe() {
|
|
370123
369915
|
return false;
|
|
@@ -370204,13 +369996,13 @@ function containsSensitiveRequestData(input) {
|
|
|
370204
369996
|
return true;
|
|
370205
369997
|
}
|
|
370206
369998
|
}
|
|
370207
|
-
var API_TOOL_NAME = "Api",
|
|
369999
|
+
var API_TOOL_NAME = "Api", inputSchema20, outputSchema17, SENSITIVE_HEADER, SENSITIVE_QUERY_KEY, MAX_RESPONSE_BYTES, ApiTool;
|
|
370208
370000
|
var init_ApiTool = __esm(() => {
|
|
370209
370001
|
init_v4();
|
|
370210
370002
|
init_Tool();
|
|
370211
370003
|
init_preapproved();
|
|
370212
370004
|
init_utils11();
|
|
370213
|
-
|
|
370005
|
+
inputSchema20 = lazySchema(() => exports_external.strictObject({
|
|
370214
370006
|
url: exports_external.string().url().describe("The URL to call"),
|
|
370215
370007
|
method: exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").describe("HTTP method"),
|
|
370216
370008
|
headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Additional request headers"),
|
|
@@ -370218,7 +370010,7 @@ var init_ApiTool = __esm(() => {
|
|
|
370218
370010
|
timeout: exports_external.number().int().min(1).max(300).optional().describe("Request timeout in seconds (max 300)"),
|
|
370219
370011
|
extract: exports_external.string().optional().describe("Optional dotted path to extract from JSON response")
|
|
370220
370012
|
}));
|
|
370221
|
-
|
|
370013
|
+
outputSchema17 = lazySchema(() => exports_external.object({
|
|
370222
370014
|
status: exports_external.number(),
|
|
370223
370015
|
statusText: exports_external.string(),
|
|
370224
370016
|
headers: exports_external.record(exports_external.string(), exports_external.string()),
|
|
@@ -370248,10 +370040,10 @@ var init_ApiTool = __esm(() => {
|
|
|
370248
370040
|
return "API";
|
|
370249
370041
|
},
|
|
370250
370042
|
get inputSchema() {
|
|
370251
|
-
return
|
|
370043
|
+
return inputSchema20();
|
|
370252
370044
|
},
|
|
370253
370045
|
get outputSchema() {
|
|
370254
|
-
return
|
|
370046
|
+
return outputSchema17();
|
|
370255
370047
|
},
|
|
370256
370048
|
isConcurrencySafe() {
|
|
370257
370049
|
return true;
|
|
@@ -370510,20 +370302,20 @@ async function dispatch2(input) {
|
|
|
370510
370302
|
}
|
|
370511
370303
|
return runPlaywright(input);
|
|
370512
370304
|
}
|
|
370513
|
-
var BROWSER_TOOL_NAME = "Browser",
|
|
370305
|
+
var BROWSER_TOOL_NAME = "Browser", inputSchema21, outputSchema18, activeSession, sessionPromise, playwrightModule = null, BrowserTool;
|
|
370514
370306
|
var init_BrowserTool = __esm(() => {
|
|
370515
370307
|
init_v4();
|
|
370516
370308
|
init_Tool();
|
|
370517
370309
|
init_envUtils();
|
|
370518
370310
|
init_utils11();
|
|
370519
|
-
|
|
370311
|
+
inputSchema21 = lazySchema(() => exports_external.strictObject({
|
|
370520
370312
|
url: exports_external.string().url().optional().describe("The URL to navigate to or fetch (required except for close)"),
|
|
370521
370313
|
action: exports_external.enum(["goto", "click", "type", "screenshot", "evaluate", "close", "fetch"]).default("fetch").describe("Browser action to perform"),
|
|
370522
370314
|
selector: exports_external.string().optional().describe("CSS selector for click/type actions"),
|
|
370523
370315
|
text: exports_external.string().optional().describe("Text to type"),
|
|
370524
370316
|
expression: exports_external.string().optional().describe("JavaScript expression to evaluate in the page")
|
|
370525
370317
|
}));
|
|
370526
|
-
|
|
370318
|
+
outputSchema18 = lazySchema(() => exports_external.object({
|
|
370527
370319
|
success: exports_external.boolean(),
|
|
370528
370320
|
url: exports_external.string().optional(),
|
|
370529
370321
|
title: exports_external.string().optional(),
|
|
@@ -370553,10 +370345,10 @@ var init_BrowserTool = __esm(() => {
|
|
|
370553
370345
|
return "Browser";
|
|
370554
370346
|
},
|
|
370555
370347
|
get inputSchema() {
|
|
370556
|
-
return
|
|
370348
|
+
return inputSchema21();
|
|
370557
370349
|
},
|
|
370558
370350
|
get outputSchema() {
|
|
370559
|
-
return
|
|
370351
|
+
return outputSchema18();
|
|
370560
370352
|
},
|
|
370561
370353
|
isConcurrencySafe() {
|
|
370562
370354
|
return false;
|
|
@@ -370679,12 +370471,12 @@ async function dispatch3(input) {
|
|
|
370679
370471
|
return { success: false, error: `unsupported action: ${input.action}` };
|
|
370680
370472
|
}
|
|
370681
370473
|
}
|
|
370682
|
-
var DOCKER_TOOL_NAME = "Docker",
|
|
370474
|
+
var DOCKER_TOOL_NAME = "Docker", inputSchema22, outputSchema19, READ_ONLY_ACTIONS, DESTRUCTIVE_ACTIONS, DockerTool;
|
|
370683
370475
|
var init_DockerTool = __esm(() => {
|
|
370684
370476
|
init_v4();
|
|
370685
370477
|
init_Tool();
|
|
370686
370478
|
init_execFileNoThrow();
|
|
370687
|
-
|
|
370479
|
+
inputSchema22 = lazySchema(() => exports_external.strictObject({
|
|
370688
370480
|
action: exports_external.enum([
|
|
370689
370481
|
"ps",
|
|
370690
370482
|
"build",
|
|
@@ -370703,7 +370495,7 @@ var init_DockerTool = __esm(() => {
|
|
|
370703
370495
|
file: exports_external.string().optional().describe("Dockerfile path for build"),
|
|
370704
370496
|
detach: exports_external.boolean().optional().describe("Run container in background")
|
|
370705
370497
|
}));
|
|
370706
|
-
|
|
370498
|
+
outputSchema19 = lazySchema(() => exports_external.object({
|
|
370707
370499
|
success: exports_external.boolean(),
|
|
370708
370500
|
stdout: exports_external.string().optional(),
|
|
370709
370501
|
stderr: exports_external.string().optional(),
|
|
@@ -370726,10 +370518,10 @@ var init_DockerTool = __esm(() => {
|
|
|
370726
370518
|
return "Docker";
|
|
370727
370519
|
},
|
|
370728
370520
|
get inputSchema() {
|
|
370729
|
-
return
|
|
370521
|
+
return inputSchema22();
|
|
370730
370522
|
},
|
|
370731
370523
|
get outputSchema() {
|
|
370732
|
-
return
|
|
370524
|
+
return outputSchema19();
|
|
370733
370525
|
},
|
|
370734
370526
|
isConcurrencySafe() {
|
|
370735
370527
|
return false;
|
|
@@ -370803,19 +370595,19 @@ function buildCommand(input, cwd2) {
|
|
|
370803
370595
|
}
|
|
370804
370596
|
return "bun test";
|
|
370805
370597
|
}
|
|
370806
|
-
var TEST_RUNNER_TOOL_NAME = "TestRunner",
|
|
370598
|
+
var TEST_RUNNER_TOOL_NAME = "TestRunner", inputSchema23, outputSchema20, TestRunnerTool;
|
|
370807
370599
|
var init_TestRunnerTool = __esm(() => {
|
|
370808
370600
|
init_v4();
|
|
370809
370601
|
init_Tool();
|
|
370810
370602
|
init_cwd2();
|
|
370811
370603
|
init_BashTool();
|
|
370812
|
-
|
|
370604
|
+
inputSchema23 = lazySchema(() => exports_external.strictObject({
|
|
370813
370605
|
command: exports_external.string().optional().describe("Explicit test command to run"),
|
|
370814
370606
|
pattern: exports_external.string().optional().describe("Optional file pattern to pass to the test runner"),
|
|
370815
370607
|
timeout: exports_external.number().int().min(1).max(600).optional().describe("Timeout in seconds (max 600)"),
|
|
370816
370608
|
watch: exports_external.boolean().optional().describe("Run in watch mode (not supported for all runners)")
|
|
370817
370609
|
}));
|
|
370818
|
-
|
|
370610
|
+
outputSchema20 = lazySchema(() => exports_external.object({
|
|
370819
370611
|
success: exports_external.boolean(),
|
|
370820
370612
|
command: exports_external.string(),
|
|
370821
370613
|
stdout: exports_external.string().optional(),
|
|
@@ -370837,10 +370629,10 @@ var init_TestRunnerTool = __esm(() => {
|
|
|
370837
370629
|
return "TestRunner";
|
|
370838
370630
|
},
|
|
370839
370631
|
get inputSchema() {
|
|
370840
|
-
return
|
|
370632
|
+
return inputSchema23();
|
|
370841
370633
|
},
|
|
370842
370634
|
get outputSchema() {
|
|
370843
|
-
return
|
|
370635
|
+
return outputSchema20();
|
|
370844
370636
|
},
|
|
370845
370637
|
isConcurrencySafe() {
|
|
370846
370638
|
return false;
|
|
@@ -370990,18 +370782,18 @@ async function dispatch4(input) {
|
|
|
370990
370782
|
return { success: false, error: `unsupported connection: ${input.connection}` };
|
|
370991
370783
|
}
|
|
370992
370784
|
}
|
|
370993
|
-
var DATABASE_TOOL_NAME = "Database",
|
|
370785
|
+
var DATABASE_TOOL_NAME = "Database", inputSchema24, outputSchema21, WRITE_KEYWORDS, WRITE_PRAGMAS, DatabaseTool;
|
|
370994
370786
|
var init_DatabaseTool = __esm(() => {
|
|
370995
370787
|
init_v4();
|
|
370996
370788
|
init_Tool();
|
|
370997
370789
|
init_execFileNoThrow();
|
|
370998
|
-
|
|
370790
|
+
inputSchema24 = lazySchema(() => exports_external.strictObject({
|
|
370999
370791
|
connection: exports_external.enum(["sqlite", "postgres", "mysql", "duckdb"]).describe("Database type"),
|
|
371000
370792
|
database: exports_external.string().describe("Database file path or connection string"),
|
|
371001
370793
|
query: exports_external.string().describe("SQL query to execute"),
|
|
371002
370794
|
readonly: exports_external.boolean().default(true).describe("Allow only SELECT or read-only queries")
|
|
371003
370795
|
}));
|
|
371004
|
-
|
|
370796
|
+
outputSchema21 = lazySchema(() => exports_external.object({
|
|
371005
370797
|
success: exports_external.boolean(),
|
|
371006
370798
|
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).optional(),
|
|
371007
370799
|
stdout: exports_external.string().optional(),
|
|
@@ -371025,10 +370817,10 @@ var init_DatabaseTool = __esm(() => {
|
|
|
371025
370817
|
return "Database";
|
|
371026
370818
|
},
|
|
371027
370819
|
get inputSchema() {
|
|
371028
|
-
return
|
|
370820
|
+
return inputSchema24();
|
|
371029
370821
|
},
|
|
371030
370822
|
get outputSchema() {
|
|
371031
|
-
return
|
|
370823
|
+
return outputSchema21();
|
|
371032
370824
|
},
|
|
371033
370825
|
isConcurrencySafe() {
|
|
371034
370826
|
return false;
|
|
@@ -371378,18 +371170,18 @@ var init_UI15 = __esm(() => {
|
|
|
371378
371170
|
});
|
|
371379
371171
|
|
|
371380
371172
|
// src/tools/TaskStopTool/TaskStopTool.ts
|
|
371381
|
-
var
|
|
371173
|
+
var inputSchema25, outputSchema22, TaskStopTool;
|
|
371382
371174
|
var init_TaskStopTool = __esm(() => {
|
|
371383
371175
|
init_v4();
|
|
371384
371176
|
init_Tool();
|
|
371385
371177
|
init_stopTask();
|
|
371386
371178
|
init_slowOperations();
|
|
371387
371179
|
init_UI15();
|
|
371388
|
-
|
|
371180
|
+
inputSchema25 = lazySchema(() => exports_external.strictObject({
|
|
371389
371181
|
task_id: exports_external.string().optional().describe("The ID of the background task to stop"),
|
|
371390
371182
|
shell_id: exports_external.string().optional().describe("Deprecated: use task_id instead")
|
|
371391
371183
|
}));
|
|
371392
|
-
|
|
371184
|
+
outputSchema22 = lazySchema(() => exports_external.object({
|
|
371393
371185
|
message: exports_external.string().describe("Status message about the operation"),
|
|
371394
371186
|
task_id: exports_external.string().describe("The ID of the task that was stopped"),
|
|
371395
371187
|
task_type: exports_external.string().describe("The type of the task that was stopped"),
|
|
@@ -371402,10 +371194,10 @@ var init_TaskStopTool = __esm(() => {
|
|
|
371402
371194
|
maxResultSizeChars: 1e5,
|
|
371403
371195
|
userFacingName: () => process.env.USER_TYPE === "ant" ? "" : "Stop Task",
|
|
371404
371196
|
get inputSchema() {
|
|
371405
|
-
return
|
|
371197
|
+
return inputSchema25();
|
|
371406
371198
|
},
|
|
371407
371199
|
get outputSchema() {
|
|
371408
|
-
return
|
|
371200
|
+
return outputSchema22();
|
|
371409
371201
|
},
|
|
371410
371202
|
shouldDefer: true,
|
|
371411
371203
|
isConcurrencySafe() {
|
|
@@ -371730,7 +371522,7 @@ function isBriefEntitled() {
|
|
|
371730
371522
|
function isBriefEnabled() {
|
|
371731
371523
|
return false;
|
|
371732
371524
|
}
|
|
371733
|
-
var
|
|
371525
|
+
var inputSchema26, outputSchema23, KAIROS_BRIEF_REFRESH_MS, BriefTool;
|
|
371734
371526
|
var init_BriefTool = __esm(() => {
|
|
371735
371527
|
init_v4();
|
|
371736
371528
|
init_state();
|
|
@@ -371742,12 +371534,12 @@ var init_BriefTool = __esm(() => {
|
|
|
371742
371534
|
init_attachments();
|
|
371743
371535
|
init_prompt14();
|
|
371744
371536
|
init_UI16();
|
|
371745
|
-
|
|
371537
|
+
inputSchema26 = lazySchema(() => exports_external.strictObject({
|
|
371746
371538
|
message: exports_external.string().describe("The message for the user. Supports markdown formatting."),
|
|
371747
371539
|
attachments: exports_external.array(exports_external.string()).optional().describe("Optional file paths (absolute or relative to cwd) to attach. Use for photos, screenshots, diffs, logs, or any file the user should see alongside your message."),
|
|
371748
371540
|
status: exports_external.enum(["normal", "proactive"]).describe("Use 'proactive' when you're surfacing something the user hasn't asked for and needs to see now \u2014 task completion while they're away, a blocker you hit, an unsolicited status update. Use 'normal' when replying to something the user just said.")
|
|
371749
371541
|
}));
|
|
371750
|
-
|
|
371542
|
+
outputSchema23 = lazySchema(() => exports_external.object({
|
|
371751
371543
|
message: exports_external.string().describe("The message"),
|
|
371752
371544
|
attachments: exports_external.array(exports_external.object({
|
|
371753
371545
|
path: exports_external.string(),
|
|
@@ -371767,10 +371559,10 @@ var init_BriefTool = __esm(() => {
|
|
|
371767
371559
|
return "";
|
|
371768
371560
|
},
|
|
371769
371561
|
get inputSchema() {
|
|
371770
|
-
return
|
|
371562
|
+
return inputSchema26();
|
|
371771
371563
|
},
|
|
371772
371564
|
get outputSchema() {
|
|
371773
|
-
return
|
|
371565
|
+
return outputSchema23();
|
|
371774
371566
|
},
|
|
371775
371567
|
isEnabled() {
|
|
371776
371568
|
return isBriefEnabled();
|
|
@@ -372283,7 +372075,7 @@ function TaskOutputResultDisplay(t0) {
|
|
|
372283
372075
|
}
|
|
372284
372076
|
return t5;
|
|
372285
372077
|
}
|
|
372286
|
-
var import_compiler_runtime114, jsx_dev_runtime143,
|
|
372078
|
+
var import_compiler_runtime114, jsx_dev_runtime143, inputSchema27, TaskOutputTool;
|
|
372287
372079
|
var init_TaskOutputTool = __esm(() => {
|
|
372288
372080
|
init_v4();
|
|
372289
372081
|
init_FallbackToolUseErrorMessage();
|
|
@@ -372304,7 +372096,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
372304
372096
|
init_BashToolResultMessage();
|
|
372305
372097
|
import_compiler_runtime114 = __toESM(require_compiler_runtime(), 1);
|
|
372306
372098
|
jsx_dev_runtime143 = __toESM(require_jsx_dev_runtime(), 1);
|
|
372307
|
-
|
|
372099
|
+
inputSchema27 = lazySchema(() => exports_external.strictObject({
|
|
372308
372100
|
task_id: exports_external.string().describe("The task ID to get output from"),
|
|
372309
372101
|
block: semanticBoolean(exports_external.boolean().default(true)).describe("Whether to wait for completion"),
|
|
372310
372102
|
timeout: exports_external.number().min(0).max(600000).default(30000).describe("Max wait time in ms")
|
|
@@ -372319,7 +372111,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
372319
372111
|
return "Task Output";
|
|
372320
372112
|
},
|
|
372321
372113
|
get inputSchema() {
|
|
372322
|
-
return
|
|
372114
|
+
return inputSchema27();
|
|
372323
372115
|
},
|
|
372324
372116
|
async description() {
|
|
372325
372117
|
return "[Deprecated] \u2014 prefer Read on the task output file path";
|
|
@@ -372711,7 +372503,7 @@ function makeOutputFromSearchResponse(result, query2, durationSeconds) {
|
|
|
372711
372503
|
durationSeconds
|
|
372712
372504
|
};
|
|
372713
372505
|
}
|
|
372714
|
-
var
|
|
372506
|
+
var inputSchema28, searchResultSchema, outputSchema24, WebSearchTool;
|
|
372715
372507
|
var init_WebSearchTool = __esm(() => {
|
|
372716
372508
|
init_promptInjection();
|
|
372717
372509
|
init_providers();
|
|
@@ -372726,7 +372518,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372726
372518
|
init_slowOperations();
|
|
372727
372519
|
init_prompt5();
|
|
372728
372520
|
init_UI17();
|
|
372729
|
-
|
|
372521
|
+
inputSchema28 = lazySchema(() => exports_external.strictObject({
|
|
372730
372522
|
query: exports_external.string().min(2).describe("The search query to use"),
|
|
372731
372523
|
allowed_domains: exports_external.array(exports_external.string()).optional().describe("Only include search results from these domains"),
|
|
372732
372524
|
blocked_domains: exports_external.array(exports_external.string()).optional().describe("Never include search results from these domains")
|
|
@@ -372741,7 +372533,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372741
372533
|
content: exports_external.array(searchHitSchema).describe("Array of search hits")
|
|
372742
372534
|
});
|
|
372743
372535
|
});
|
|
372744
|
-
|
|
372536
|
+
outputSchema24 = lazySchema(() => exports_external.object({
|
|
372745
372537
|
query: exports_external.string().describe("The search query that was executed"),
|
|
372746
372538
|
results: exports_external.array(exports_external.union([searchResultSchema(), exports_external.string()])).describe("Search results and/or text commentary from the model"),
|
|
372747
372539
|
durationSeconds: exports_external.number().describe("Time taken to complete the search operation")
|
|
@@ -372777,10 +372569,10 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372777
372569
|
return false;
|
|
372778
372570
|
},
|
|
372779
372571
|
get inputSchema() {
|
|
372780
|
-
return
|
|
372572
|
+
return inputSchema28();
|
|
372781
372573
|
},
|
|
372782
372574
|
get outputSchema() {
|
|
372783
|
-
return
|
|
372575
|
+
return outputSchema24();
|
|
372784
372576
|
},
|
|
372785
372577
|
isConcurrencySafe() {
|
|
372786
372578
|
return true;
|
|
@@ -373244,7 +373036,7 @@ function normalizeExitPlanModeInput(value) {
|
|
|
373244
373036
|
allowedPrompts: normalizeAllowedPromptsValue(rawAllowedPrompts)
|
|
373245
373037
|
};
|
|
373246
373038
|
}
|
|
373247
|
-
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema,
|
|
373039
|
+
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema, inputSchema29, _sdkInputSchema, outputSchema25, ExitPlanModeV2Tool;
|
|
373248
373040
|
var init_ExitPlanModeV2Tool = __esm(() => {
|
|
373249
373041
|
init_v4();
|
|
373250
373042
|
init_state();
|
|
@@ -373269,12 +373061,12 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
373269
373061
|
inputObjectSchema = lazySchema(() => exports_external.strictObject({
|
|
373270
373062
|
allowedPrompts: allowedPromptsSchema().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")
|
|
373271
373063
|
}).passthrough());
|
|
373272
|
-
|
|
373064
|
+
inputSchema29 = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema()));
|
|
373273
373065
|
_sdkInputSchema = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema().extend({
|
|
373274
373066
|
plan: exports_external.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),
|
|
373275
373067
|
planFilePath: exports_external.string().optional().describe("The plan file path (injected by normalizeToolInput)")
|
|
373276
373068
|
})));
|
|
373277
|
-
|
|
373069
|
+
outputSchema25 = lazySchema(() => exports_external.object({
|
|
373278
373070
|
plan: exports_external.string().nullable().describe("The plan that was presented to the user"),
|
|
373279
373071
|
isAgent: exports_external.boolean(),
|
|
373280
373072
|
filePath: exports_external.string().optional().describe("The file path where the plan was saved"),
|
|
@@ -373295,10 +373087,10 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
373295
373087
|
return EXIT_PLAN_MODE_V2_TOOL_PROMPT;
|
|
373296
373088
|
},
|
|
373297
373089
|
get inputSchema() {
|
|
373298
|
-
return
|
|
373090
|
+
return inputSchema29();
|
|
373299
373091
|
},
|
|
373300
373092
|
get outputSchema() {
|
|
373301
|
-
return
|
|
373093
|
+
return outputSchema25();
|
|
373302
373094
|
},
|
|
373303
373095
|
userFacingName() {
|
|
373304
373096
|
return "";
|
|
@@ -373527,11 +373319,11 @@ ${plan}`,
|
|
|
373527
373319
|
});
|
|
373528
373320
|
|
|
373529
373321
|
// src/tools/testing/TestingPermissionTool.tsx
|
|
373530
|
-
var NAME = "TestingPermission",
|
|
373322
|
+
var NAME = "TestingPermission", inputSchema30, TestingPermissionTool;
|
|
373531
373323
|
var init_TestingPermissionTool = __esm(() => {
|
|
373532
373324
|
init_v4();
|
|
373533
373325
|
init_Tool();
|
|
373534
|
-
|
|
373326
|
+
inputSchema30 = lazySchema(() => exports_external.strictObject({}));
|
|
373535
373327
|
TestingPermissionTool = buildTool({
|
|
373536
373328
|
name: NAME,
|
|
373537
373329
|
maxResultSizeChars: 1e5,
|
|
@@ -373542,7 +373334,7 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
373542
373334
|
return "Test tool that always asks for permission before executing. Used for end-to-end testing.";
|
|
373543
373335
|
},
|
|
373544
373336
|
get inputSchema() {
|
|
373545
|
-
return
|
|
373337
|
+
return inputSchema30();
|
|
373546
373338
|
},
|
|
373547
373339
|
userFacingName() {
|
|
373548
373340
|
return "TestingPermission";
|
|
@@ -373595,6 +373387,387 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
373595
373387
|
});
|
|
373596
373388
|
});
|
|
373597
373389
|
|
|
373390
|
+
// src/tools/GrepTool/GrepTool.ts
|
|
373391
|
+
function applyHeadLimit(items, limit, offset = 0) {
|
|
373392
|
+
if (limit === 0) {
|
|
373393
|
+
return { items: items.slice(offset), appliedLimit: undefined };
|
|
373394
|
+
}
|
|
373395
|
+
const effectiveLimit = limit ?? DEFAULT_HEAD_LIMIT;
|
|
373396
|
+
const sliced = items.slice(offset, offset + effectiveLimit);
|
|
373397
|
+
const wasTruncated = items.length - offset > effectiveLimit;
|
|
373398
|
+
return {
|
|
373399
|
+
items: sliced,
|
|
373400
|
+
appliedLimit: wasTruncated ? effectiveLimit : undefined
|
|
373401
|
+
};
|
|
373402
|
+
}
|
|
373403
|
+
function formatLimitInfo(appliedLimit, appliedOffset) {
|
|
373404
|
+
const parts = [];
|
|
373405
|
+
if (appliedLimit !== undefined)
|
|
373406
|
+
parts.push(`limit: ${appliedLimit}`);
|
|
373407
|
+
if (appliedOffset)
|
|
373408
|
+
parts.push(`offset: ${appliedOffset}`);
|
|
373409
|
+
return parts.join(", ");
|
|
373410
|
+
}
|
|
373411
|
+
var inputSchema31, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema26, GrepTool;
|
|
373412
|
+
var init_GrepTool = __esm(() => {
|
|
373413
|
+
init_v4();
|
|
373414
|
+
init_Tool();
|
|
373415
|
+
init_cwd2();
|
|
373416
|
+
init_errors();
|
|
373417
|
+
init_file();
|
|
373418
|
+
init_fsOperations();
|
|
373419
|
+
init_path();
|
|
373420
|
+
init_filesystem();
|
|
373421
|
+
init_shellRuleMatching();
|
|
373422
|
+
init_orphanedPluginFilter();
|
|
373423
|
+
init_ripgrep();
|
|
373424
|
+
init_semanticBoolean();
|
|
373425
|
+
init_semanticNumber();
|
|
373426
|
+
init_stringUtils();
|
|
373427
|
+
init_prompt();
|
|
373428
|
+
init_UI10();
|
|
373429
|
+
inputSchema31 = lazySchema(() => exports_external.strictObject({
|
|
373430
|
+
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
373431
|
+
path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
|
|
373432
|
+
glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
|
|
373433
|
+
output_mode: exports_external.enum(["content", "files_with_matches", "count"]).optional().describe('Output mode: "content" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), "files_with_matches" shows file paths (supports head_limit), "count" shows match counts (supports head_limit). Defaults to "files_with_matches".'),
|
|
373434
|
+
"-B": semanticNumber(exports_external.number().optional()).describe('Number of lines to show before each match (rg -B). Requires output_mode: "content", ignored otherwise.'),
|
|
373435
|
+
"-A": semanticNumber(exports_external.number().optional()).describe('Number of lines to show after each match (rg -A). Requires output_mode: "content", ignored otherwise.'),
|
|
373436
|
+
"-C": semanticNumber(exports_external.number().optional()).describe("Alias for context."),
|
|
373437
|
+
context: semanticNumber(exports_external.number().optional()).describe('Number of lines to show before and after each match (rg -C). Requires output_mode: "content", ignored otherwise.'),
|
|
373438
|
+
"-n": semanticBoolean(exports_external.boolean().optional()).describe('Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.'),
|
|
373439
|
+
"-i": semanticBoolean(exports_external.boolean().optional()).describe("Case insensitive search (rg -i)"),
|
|
373440
|
+
type: exports_external.string().optional().describe("File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types."),
|
|
373441
|
+
head_limit: semanticNumber(exports_external.number().optional()).describe('Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified. Pass 0 for unlimited (use sparingly \u2014 large result sets waste context).'),
|
|
373442
|
+
offset: semanticNumber(exports_external.number().optional()).describe('Skip first N lines/entries before applying head_limit, equivalent to "| tail -n +N | head -N". Works across all output modes. Defaults to 0.'),
|
|
373443
|
+
multiline: semanticBoolean(exports_external.boolean().optional()).describe("Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.")
|
|
373444
|
+
}));
|
|
373445
|
+
VCS_DIRECTORIES_TO_EXCLUDE2 = [
|
|
373446
|
+
".git",
|
|
373447
|
+
".svn",
|
|
373448
|
+
".hg",
|
|
373449
|
+
".bzr",
|
|
373450
|
+
".jj",
|
|
373451
|
+
".sl"
|
|
373452
|
+
];
|
|
373453
|
+
outputSchema26 = lazySchema(() => exports_external.object({
|
|
373454
|
+
mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
|
|
373455
|
+
numFiles: exports_external.number(),
|
|
373456
|
+
filenames: exports_external.array(exports_external.string()),
|
|
373457
|
+
content: exports_external.string().optional(),
|
|
373458
|
+
numLines: exports_external.number().optional(),
|
|
373459
|
+
numMatches: exports_external.number().optional(),
|
|
373460
|
+
appliedLimit: exports_external.number().optional(),
|
|
373461
|
+
appliedOffset: exports_external.number().optional()
|
|
373462
|
+
}));
|
|
373463
|
+
GrepTool = buildTool({
|
|
373464
|
+
name: GREP_TOOL_NAME,
|
|
373465
|
+
searchHint: "search file contents with regex (ripgrep)",
|
|
373466
|
+
maxResultSizeChars: 20000,
|
|
373467
|
+
strict: true,
|
|
373468
|
+
async description() {
|
|
373469
|
+
return getDescription();
|
|
373470
|
+
},
|
|
373471
|
+
userFacingName() {
|
|
373472
|
+
return "Search";
|
|
373473
|
+
},
|
|
373474
|
+
getToolUseSummary: getToolUseSummary3,
|
|
373475
|
+
getActivityDescription(input) {
|
|
373476
|
+
const summary = getToolUseSummary3(input);
|
|
373477
|
+
return summary ? `Searching for ${summary}` : "Searching";
|
|
373478
|
+
},
|
|
373479
|
+
get inputSchema() {
|
|
373480
|
+
return inputSchema31();
|
|
373481
|
+
},
|
|
373482
|
+
get outputSchema() {
|
|
373483
|
+
return outputSchema26();
|
|
373484
|
+
},
|
|
373485
|
+
isConcurrencySafe() {
|
|
373486
|
+
return true;
|
|
373487
|
+
},
|
|
373488
|
+
isReadOnly() {
|
|
373489
|
+
return true;
|
|
373490
|
+
},
|
|
373491
|
+
toAutoClassifierInput(input) {
|
|
373492
|
+
return input.path ? `${input.pattern} in ${input.path}` : input.pattern;
|
|
373493
|
+
},
|
|
373494
|
+
isSearchOrReadCommand() {
|
|
373495
|
+
return { isSearch: true, isRead: false };
|
|
373496
|
+
},
|
|
373497
|
+
getPath({ path: path13 }) {
|
|
373498
|
+
return path13 || getCwd();
|
|
373499
|
+
},
|
|
373500
|
+
async preparePermissionMatcher({ pattern }) {
|
|
373501
|
+
return (rulePattern) => matchWildcardPattern(rulePattern, pattern);
|
|
373502
|
+
},
|
|
373503
|
+
async validateInput({ path: path13 }) {
|
|
373504
|
+
if (path13) {
|
|
373505
|
+
const fs4 = getFsImplementation();
|
|
373506
|
+
const absolutePath = expandPath(path13);
|
|
373507
|
+
if (absolutePath.startsWith("\\\\") || absolutePath.startsWith("//")) {
|
|
373508
|
+
return { result: true };
|
|
373509
|
+
}
|
|
373510
|
+
try {
|
|
373511
|
+
await fs4.stat(absolutePath);
|
|
373512
|
+
} catch (e) {
|
|
373513
|
+
if (isENOENT(e)) {
|
|
373514
|
+
const cwdSuggestion = await suggestPathUnderCwd(absolutePath);
|
|
373515
|
+
let message = `Path does not exist: ${path13}. ${FILE_NOT_FOUND_CWD_NOTE} ${getCwd()}.`;
|
|
373516
|
+
if (cwdSuggestion) {
|
|
373517
|
+
message += ` Did you mean ${cwdSuggestion}?`;
|
|
373518
|
+
}
|
|
373519
|
+
return {
|
|
373520
|
+
result: false,
|
|
373521
|
+
message,
|
|
373522
|
+
errorCode: 1
|
|
373523
|
+
};
|
|
373524
|
+
}
|
|
373525
|
+
throw e;
|
|
373526
|
+
}
|
|
373527
|
+
}
|
|
373528
|
+
return { result: true };
|
|
373529
|
+
},
|
|
373530
|
+
async checkPermissions(input, context5) {
|
|
373531
|
+
const appState = context5.getAppState();
|
|
373532
|
+
return checkReadPermissionForTool(GrepTool, input, appState.toolPermissionContext);
|
|
373533
|
+
},
|
|
373534
|
+
async prompt() {
|
|
373535
|
+
return getDescription();
|
|
373536
|
+
},
|
|
373537
|
+
renderToolUseMessage: renderToolUseMessage11,
|
|
373538
|
+
renderToolUseErrorMessage: renderToolUseErrorMessage7,
|
|
373539
|
+
renderToolResultMessage: renderToolResultMessage10,
|
|
373540
|
+
extractSearchText({ mode, content, filenames }) {
|
|
373541
|
+
if (mode === "content" && content)
|
|
373542
|
+
return content;
|
|
373543
|
+
return filenames.join(`
|
|
373544
|
+
`);
|
|
373545
|
+
},
|
|
373546
|
+
mapToolResultToToolResultBlockParam({
|
|
373547
|
+
mode = "files_with_matches",
|
|
373548
|
+
numFiles,
|
|
373549
|
+
filenames,
|
|
373550
|
+
content,
|
|
373551
|
+
numLines: _numLines,
|
|
373552
|
+
numMatches,
|
|
373553
|
+
appliedLimit,
|
|
373554
|
+
appliedOffset
|
|
373555
|
+
}, toolUseID) {
|
|
373556
|
+
if (mode === "content") {
|
|
373557
|
+
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
373558
|
+
const resultContent = content || "No matches found";
|
|
373559
|
+
const finalContent = limitInfo2 ? `${resultContent}
|
|
373560
|
+
|
|
373561
|
+
[Showing results with pagination = ${limitInfo2}]` : resultContent;
|
|
373562
|
+
return {
|
|
373563
|
+
tool_use_id: toolUseID,
|
|
373564
|
+
type: "tool_result",
|
|
373565
|
+
content: finalContent
|
|
373566
|
+
};
|
|
373567
|
+
}
|
|
373568
|
+
if (mode === "count") {
|
|
373569
|
+
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
373570
|
+
const rawContent = content || "No matches found";
|
|
373571
|
+
const matches = numMatches ?? 0;
|
|
373572
|
+
const files = numFiles ?? 0;
|
|
373573
|
+
const summary = `
|
|
373574
|
+
|
|
373575
|
+
Found ${matches} total ${matches === 1 ? "occurrence" : "occurrences"} across ${files} ${files === 1 ? "file" : "files"}.${limitInfo2 ? ` with pagination = ${limitInfo2}` : ""}`;
|
|
373576
|
+
return {
|
|
373577
|
+
tool_use_id: toolUseID,
|
|
373578
|
+
type: "tool_result",
|
|
373579
|
+
content: rawContent + summary
|
|
373580
|
+
};
|
|
373581
|
+
}
|
|
373582
|
+
const limitInfo = formatLimitInfo(appliedLimit, appliedOffset);
|
|
373583
|
+
if (numFiles === 0) {
|
|
373584
|
+
return {
|
|
373585
|
+
tool_use_id: toolUseID,
|
|
373586
|
+
type: "tool_result",
|
|
373587
|
+
content: "No files found"
|
|
373588
|
+
};
|
|
373589
|
+
}
|
|
373590
|
+
const result = `Found ${numFiles} ${plural(numFiles, "file")}${limitInfo ? ` ${limitInfo}` : ""}
|
|
373591
|
+
${filenames.join(`
|
|
373592
|
+
`)}`;
|
|
373593
|
+
return {
|
|
373594
|
+
tool_use_id: toolUseID,
|
|
373595
|
+
type: "tool_result",
|
|
373596
|
+
content: result
|
|
373597
|
+
};
|
|
373598
|
+
},
|
|
373599
|
+
async call({
|
|
373600
|
+
pattern,
|
|
373601
|
+
path: path13,
|
|
373602
|
+
glob: glob2,
|
|
373603
|
+
type,
|
|
373604
|
+
output_mode = "files_with_matches",
|
|
373605
|
+
"-B": context_before,
|
|
373606
|
+
"-A": context_after,
|
|
373607
|
+
"-C": context_c,
|
|
373608
|
+
context: context5,
|
|
373609
|
+
"-n": show_line_numbers = true,
|
|
373610
|
+
"-i": case_insensitive = false,
|
|
373611
|
+
head_limit,
|
|
373612
|
+
offset = 0,
|
|
373613
|
+
multiline = false
|
|
373614
|
+
}, { abortController, getAppState }) {
|
|
373615
|
+
const absolutePath = path13 ? expandPath(path13) : getCwd();
|
|
373616
|
+
const args = ["--hidden"];
|
|
373617
|
+
for (const dir of VCS_DIRECTORIES_TO_EXCLUDE2) {
|
|
373618
|
+
args.push("--glob", `!${dir}`);
|
|
373619
|
+
}
|
|
373620
|
+
args.push("--max-columns", "500");
|
|
373621
|
+
if (multiline) {
|
|
373622
|
+
args.push("-U", "--multiline-dotall");
|
|
373623
|
+
}
|
|
373624
|
+
if (case_insensitive) {
|
|
373625
|
+
args.push("-i");
|
|
373626
|
+
}
|
|
373627
|
+
if (output_mode === "files_with_matches") {
|
|
373628
|
+
args.push("-l");
|
|
373629
|
+
} else if (output_mode === "count") {
|
|
373630
|
+
args.push("-c");
|
|
373631
|
+
}
|
|
373632
|
+
if (show_line_numbers && output_mode === "content") {
|
|
373633
|
+
args.push("-n");
|
|
373634
|
+
}
|
|
373635
|
+
if (output_mode === "content") {
|
|
373636
|
+
if (context5 !== undefined) {
|
|
373637
|
+
args.push("-C", context5.toString());
|
|
373638
|
+
} else if (context_c !== undefined) {
|
|
373639
|
+
args.push("-C", context_c.toString());
|
|
373640
|
+
} else {
|
|
373641
|
+
if (context_before !== undefined) {
|
|
373642
|
+
args.push("-B", context_before.toString());
|
|
373643
|
+
}
|
|
373644
|
+
if (context_after !== undefined) {
|
|
373645
|
+
args.push("-A", context_after.toString());
|
|
373646
|
+
}
|
|
373647
|
+
}
|
|
373648
|
+
}
|
|
373649
|
+
if (pattern.startsWith("-")) {
|
|
373650
|
+
args.push("-e", pattern);
|
|
373651
|
+
} else {
|
|
373652
|
+
args.push(pattern);
|
|
373653
|
+
}
|
|
373654
|
+
if (type) {
|
|
373655
|
+
args.push("--type", type);
|
|
373656
|
+
}
|
|
373657
|
+
if (glob2) {
|
|
373658
|
+
const globPatterns = [];
|
|
373659
|
+
const rawPatterns = glob2.split(/\s+/);
|
|
373660
|
+
for (const rawPattern of rawPatterns) {
|
|
373661
|
+
if (rawPattern.includes("{") && rawPattern.includes("}")) {
|
|
373662
|
+
globPatterns.push(rawPattern);
|
|
373663
|
+
} else {
|
|
373664
|
+
globPatterns.push(...rawPattern.split(",").filter(Boolean));
|
|
373665
|
+
}
|
|
373666
|
+
}
|
|
373667
|
+
for (const globPattern of globPatterns.filter(Boolean)) {
|
|
373668
|
+
args.push("--glob", globPattern);
|
|
373669
|
+
}
|
|
373670
|
+
}
|
|
373671
|
+
const appState = getAppState();
|
|
373672
|
+
const ignorePatterns = normalizePatternsToPath(getFileReadIgnorePatterns(appState.toolPermissionContext), getCwd());
|
|
373673
|
+
for (const ignorePattern of ignorePatterns) {
|
|
373674
|
+
const rgIgnorePattern = ignorePattern.startsWith("/") ? `!${ignorePattern}` : `!**/${ignorePattern}`;
|
|
373675
|
+
args.push("--glob", rgIgnorePattern);
|
|
373676
|
+
}
|
|
373677
|
+
for (const exclusion of await getGlobExclusionsForPluginCache(absolutePath)) {
|
|
373678
|
+
args.push("--glob", exclusion);
|
|
373679
|
+
}
|
|
373680
|
+
const results = await ripGrep(args, absolutePath, abortController.signal);
|
|
373681
|
+
if (output_mode === "content") {
|
|
373682
|
+
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
373683
|
+
const finalLines = limitedResults.map((line) => {
|
|
373684
|
+
const colonIndex = line.indexOf(":");
|
|
373685
|
+
if (colonIndex > 0) {
|
|
373686
|
+
const filePath = line.substring(0, colonIndex);
|
|
373687
|
+
const rest = line.substring(colonIndex);
|
|
373688
|
+
return toRelativePath(filePath) + rest;
|
|
373689
|
+
}
|
|
373690
|
+
return line;
|
|
373691
|
+
});
|
|
373692
|
+
const output2 = {
|
|
373693
|
+
mode: "content",
|
|
373694
|
+
numFiles: 0,
|
|
373695
|
+
filenames: [],
|
|
373696
|
+
content: finalLines.join(`
|
|
373697
|
+
`),
|
|
373698
|
+
numLines: finalLines.length,
|
|
373699
|
+
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
373700
|
+
...offset > 0 && { appliedOffset: offset }
|
|
373701
|
+
};
|
|
373702
|
+
return { data: output2 };
|
|
373703
|
+
}
|
|
373704
|
+
if (output_mode === "count") {
|
|
373705
|
+
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
373706
|
+
const finalCountLines = limitedResults.map((line) => {
|
|
373707
|
+
const colonIndex = line.lastIndexOf(":");
|
|
373708
|
+
if (colonIndex > 0) {
|
|
373709
|
+
const filePath = line.substring(0, colonIndex);
|
|
373710
|
+
const count4 = line.substring(colonIndex);
|
|
373711
|
+
return toRelativePath(filePath) + count4;
|
|
373712
|
+
}
|
|
373713
|
+
return line;
|
|
373714
|
+
});
|
|
373715
|
+
let totalMatches = 0;
|
|
373716
|
+
let fileCount = 0;
|
|
373717
|
+
for (const line of finalCountLines) {
|
|
373718
|
+
const colonIndex = line.lastIndexOf(":");
|
|
373719
|
+
if (colonIndex > 0) {
|
|
373720
|
+
const countStr = line.substring(colonIndex + 1);
|
|
373721
|
+
const count4 = parseInt(countStr, 10);
|
|
373722
|
+
if (!isNaN(count4)) {
|
|
373723
|
+
totalMatches += count4;
|
|
373724
|
+
fileCount += 1;
|
|
373725
|
+
}
|
|
373726
|
+
}
|
|
373727
|
+
}
|
|
373728
|
+
const output2 = {
|
|
373729
|
+
mode: "count",
|
|
373730
|
+
numFiles: fileCount,
|
|
373731
|
+
filenames: [],
|
|
373732
|
+
content: finalCountLines.join(`
|
|
373733
|
+
`),
|
|
373734
|
+
numMatches: totalMatches,
|
|
373735
|
+
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
373736
|
+
...offset > 0 && { appliedOffset: offset }
|
|
373737
|
+
};
|
|
373738
|
+
return { data: output2 };
|
|
373739
|
+
}
|
|
373740
|
+
const stats = await Promise.allSettled(results.map((_) => getFsImplementation().stat(_)));
|
|
373741
|
+
const sortedMatches = results.map((_, i3) => {
|
|
373742
|
+
const r = stats[i3];
|
|
373743
|
+
return [
|
|
373744
|
+
_,
|
|
373745
|
+
r.status === "fulfilled" ? r.value.mtimeMs ?? 0 : 0
|
|
373746
|
+
];
|
|
373747
|
+
}).sort((a2, b) => {
|
|
373748
|
+
if (false) {}
|
|
373749
|
+
const timeComparison = b[1] - a2[1];
|
|
373750
|
+
if (timeComparison === 0) {
|
|
373751
|
+
return a2[0].localeCompare(b[0]);
|
|
373752
|
+
}
|
|
373753
|
+
return timeComparison;
|
|
373754
|
+
}).map((_) => _[0]);
|
|
373755
|
+
const { items: finalMatches, appliedLimit } = applyHeadLimit(sortedMatches, head_limit, offset);
|
|
373756
|
+
const relativeMatches = finalMatches.map(toRelativePath);
|
|
373757
|
+
const output = {
|
|
373758
|
+
mode: "files_with_matches",
|
|
373759
|
+
filenames: relativeMatches,
|
|
373760
|
+
numFiles: relativeMatches.length,
|
|
373761
|
+
...appliedLimit !== undefined && { appliedLimit },
|
|
373762
|
+
...offset > 0 && { appliedOffset: offset }
|
|
373763
|
+
};
|
|
373764
|
+
return {
|
|
373765
|
+
data: output
|
|
373766
|
+
};
|
|
373767
|
+
}
|
|
373768
|
+
});
|
|
373769
|
+
});
|
|
373770
|
+
|
|
373598
373771
|
// src/utils/codeIndex/embeddings.ts
|
|
373599
373772
|
function getEmbeddingModel(env4 = process.env) {
|
|
373600
373773
|
return (env4.UR_CODE_INDEX_EMBED_MODEL || "").trim() || DEFAULT_EMBED_MODEL;
|
|
@@ -376603,10 +376776,10 @@ function DANGEROUS_uncachedSystemPromptSection(name, compute, _reason) {
|
|
|
376603
376776
|
return { name, compute, cacheBreak: true };
|
|
376604
376777
|
}
|
|
376605
376778
|
async function resolveSystemPromptSections(sections) {
|
|
376606
|
-
const
|
|
376779
|
+
const cache4 = getSystemPromptSectionCache();
|
|
376607
376780
|
return Promise.all(sections.map(async (s) => {
|
|
376608
|
-
if (!s.cacheBreak &&
|
|
376609
|
-
return
|
|
376781
|
+
if (!s.cacheBreak && cache4.has(s.name)) {
|
|
376782
|
+
return cache4.get(s.name) ?? null;
|
|
376610
376783
|
}
|
|
376611
376784
|
const value = await s.compute();
|
|
376612
376785
|
setSystemPromptSectionCacheEntry(s.name, value);
|
|
@@ -389173,7 +389346,7 @@ function isAnyTracingEnabled() {
|
|
|
389173
389346
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
389174
389347
|
}
|
|
389175
389348
|
function getTracer() {
|
|
389176
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
389349
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.3");
|
|
389177
389350
|
}
|
|
389178
389351
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
389179
389352
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -398508,21 +398681,6 @@ var init_analyzeContext = __esm(() => {
|
|
|
398508
398681
|
init_tokens();
|
|
398509
398682
|
});
|
|
398510
398683
|
|
|
398511
|
-
// src/utils/zodToJsonSchema.ts
|
|
398512
|
-
function zodToJsonSchema3(schema) {
|
|
398513
|
-
const hit = cache3.get(schema);
|
|
398514
|
-
if (hit)
|
|
398515
|
-
return hit;
|
|
398516
|
-
const result = toJSONSchema(schema);
|
|
398517
|
-
cache3.set(schema, result);
|
|
398518
|
-
return result;
|
|
398519
|
-
}
|
|
398520
|
-
var cache3;
|
|
398521
|
-
var init_zodToJsonSchema2 = __esm(() => {
|
|
398522
|
-
init_v4();
|
|
398523
|
-
cache3 = new WeakMap;
|
|
398524
|
-
});
|
|
398525
|
-
|
|
398526
398684
|
// src/utils/toolSearch.ts
|
|
398527
398685
|
var exports_toolSearch = {};
|
|
398528
398686
|
__export(exports_toolSearch, {
|
|
@@ -398656,7 +398814,7 @@ async function calculateDeferredToolDescriptionChars(tools, getToolPermissionCon
|
|
|
398656
398814
|
tools,
|
|
398657
398815
|
agents
|
|
398658
398816
|
});
|
|
398659
|
-
const inputSchema46 = tool.inputJSONSchema ? jsonStringify(tool.inputJSONSchema) : tool.inputSchema ? jsonStringify(
|
|
398817
|
+
const inputSchema46 = tool.inputJSONSchema ? jsonStringify(tool.inputJSONSchema) : tool.inputSchema ? jsonStringify(zodToJsonSchema(tool.inputSchema)) : "";
|
|
398660
398818
|
return tool.name.length + description.length + inputSchema46.length;
|
|
398661
398819
|
}));
|
|
398662
398820
|
return sizes.reduce((total, size) => total + size, 0);
|
|
@@ -398830,7 +398988,7 @@ var init_toolSearch = __esm(() => {
|
|
|
398830
398988
|
init_envUtils();
|
|
398831
398989
|
init_providers();
|
|
398832
398990
|
init_slowOperations();
|
|
398833
|
-
|
|
398991
|
+
init_zodToJsonSchema();
|
|
398834
398992
|
getDeferredToolTokenCount = memoize_default(async (tools, getToolPermissionContext, agents, model) => {
|
|
398835
398993
|
const deferredTools = tools.filter((t) => isDeferredTool(t));
|
|
398836
398994
|
if (deferredTools.length === 0)
|
|
@@ -419357,7 +419515,7 @@ function Feedback({
|
|
|
419357
419515
|
platform: env2.platform,
|
|
419358
419516
|
gitRepo: envInfo.isGit,
|
|
419359
419517
|
terminal: env2.terminal,
|
|
419360
|
-
version: "1.76.
|
|
419518
|
+
version: "1.76.3",
|
|
419361
419519
|
transcript: normalizeMessagesForAPI(messages),
|
|
419362
419520
|
errors: sanitizedErrors,
|
|
419363
419521
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -419549,7 +419707,7 @@ function Feedback({
|
|
|
419549
419707
|
", ",
|
|
419550
419708
|
env2.terminal,
|
|
419551
419709
|
", v",
|
|
419552
|
-
"1.76.
|
|
419710
|
+
"1.76.3"
|
|
419553
419711
|
]
|
|
419554
419712
|
}, undefined, true, undefined, this)
|
|
419555
419713
|
]
|
|
@@ -419655,7 +419813,7 @@ ${sanitizedDescription}
|
|
|
419655
419813
|
` + `**Environment Info**
|
|
419656
419814
|
` + `- Platform: ${env2.platform}
|
|
419657
419815
|
` + `- Terminal: ${env2.terminal}
|
|
419658
|
-
` + `- Version: ${"1.76.
|
|
419816
|
+
` + `- Version: ${"1.76.3"}
|
|
419659
419817
|
` + `- Feedback ID: ${feedbackId}
|
|
419660
419818
|
` + `
|
|
419661
419819
|
**Errors**
|
|
@@ -422765,7 +422923,7 @@ function buildPrimarySection() {
|
|
|
422765
422923
|
}, undefined, false, undefined, this);
|
|
422766
422924
|
return [{
|
|
422767
422925
|
label: "Version",
|
|
422768
|
-
value: "1.76.
|
|
422926
|
+
value: "1.76.3"
|
|
422769
422927
|
}, {
|
|
422770
422928
|
label: "Session name",
|
|
422771
422929
|
value: nameValue
|
|
@@ -426147,7 +426305,7 @@ function Config({
|
|
|
426147
426305
|
}
|
|
426148
426306
|
}, undefined, false, undefined, this)
|
|
426149
426307
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
426150
|
-
currentVersion: "1.76.
|
|
426308
|
+
currentVersion: "1.76.3",
|
|
426151
426309
|
onChoice: (choice) => {
|
|
426152
426310
|
setShowSubmenu(null);
|
|
426153
426311
|
setTabsHidden(false);
|
|
@@ -426159,7 +426317,7 @@ function Config({
|
|
|
426159
426317
|
autoUpdatesChannel: "stable"
|
|
426160
426318
|
};
|
|
426161
426319
|
if (choice === "stay") {
|
|
426162
|
-
newSettings.minimumVersion = "1.76.
|
|
426320
|
+
newSettings.minimumVersion = "1.76.3";
|
|
426163
426321
|
}
|
|
426164
426322
|
updateSettingsForSource("userSettings", newSettings);
|
|
426165
426323
|
setSettingsData((prev_27) => ({
|
|
@@ -434223,7 +434381,7 @@ function HelpV2(t0) {
|
|
|
434223
434381
|
let t6;
|
|
434224
434382
|
if ($2[31] !== tabs) {
|
|
434225
434383
|
t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
|
|
434226
|
-
title: `UR v${"1.76.
|
|
434384
|
+
title: `UR v${"1.76.3"}`,
|
|
434227
434385
|
color: "professionalBlue",
|
|
434228
434386
|
defaultTab: "general",
|
|
434229
434387
|
children: tabs
|
|
@@ -434962,12 +435120,12 @@ async function parseMcpToolArguments(tool, input, maxInputChars = Number.POSITIV
|
|
|
434962
435120
|
async function describeMcpTool(tool, tools, toolPermissionContext) {
|
|
434963
435121
|
let outputSchema40;
|
|
434964
435122
|
if (tool.outputSchema) {
|
|
434965
|
-
const converted =
|
|
435123
|
+
const converted = zodToJsonSchema(tool.outputSchema);
|
|
434966
435124
|
if (typeof converted === "object" && converted !== null && "type" in converted && converted.type === "object") {
|
|
434967
435125
|
outputSchema40 = converted;
|
|
434968
435126
|
}
|
|
434969
435127
|
}
|
|
434970
|
-
const inputSchema47 = tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
435128
|
+
const inputSchema47 = tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
434971
435129
|
return {
|
|
434972
435130
|
name: tool.name,
|
|
434973
435131
|
description: await tool.prompt({
|
|
@@ -435015,7 +435173,7 @@ async function formatMcpToolResult(tool, result, maxOutputChars) {
|
|
|
435015
435173
|
}
|
|
435016
435174
|
var init_mcpToolAdapter = __esm(() => {
|
|
435017
435175
|
init_slowOperations();
|
|
435018
|
-
|
|
435176
|
+
init_zodToJsonSchema();
|
|
435019
435177
|
});
|
|
435020
435178
|
|
|
435021
435179
|
// src/services/agents/acpServer.ts
|
|
@@ -435156,7 +435314,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
435156
435314
|
async function handleInitialize(options2) {
|
|
435157
435315
|
return {
|
|
435158
435316
|
name: "UR",
|
|
435159
|
-
version: "1.76.
|
|
435317
|
+
version: "1.76.3",
|
|
435160
435318
|
protocolVersion: "0.1.0",
|
|
435161
435319
|
workspaceRoot: options2.cwd,
|
|
435162
435320
|
capabilities: {
|
|
@@ -435270,7 +435428,7 @@ async function handleToolsList() {
|
|
|
435270
435428
|
tools: tools.filter((tool) => tool.isEnabled()).map((tool) => ({
|
|
435271
435429
|
name: tool.name,
|
|
435272
435430
|
description: tool.searchHint ?? tool.name,
|
|
435273
|
-
inputSchema:
|
|
435431
|
+
inputSchema: zodToJsonSchema(tool.inputSchema)
|
|
435274
435432
|
}))
|
|
435275
435433
|
};
|
|
435276
435434
|
}
|
|
@@ -435761,7 +435919,7 @@ var init_acpServer = __esm(() => {
|
|
|
435761
435919
|
init_slowOperations();
|
|
435762
435920
|
init_readRequestTextBounded();
|
|
435763
435921
|
init_rollingRateLimiter();
|
|
435764
|
-
|
|
435922
|
+
init_zodToJsonSchema();
|
|
435765
435923
|
init_ideDiffs();
|
|
435766
435924
|
init_backgroundRunner();
|
|
435767
435925
|
init_a2aServer();
|
|
@@ -452264,7 +452422,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
452264
452422
|
return [];
|
|
452265
452423
|
}
|
|
452266
452424
|
}
|
|
452267
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.
|
|
452425
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.3") {
|
|
452268
452426
|
if (process.env.USER_TYPE === "ant") {
|
|
452269
452427
|
const changelog = "";
|
|
452270
452428
|
if (changelog) {
|
|
@@ -452291,7 +452449,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.2")
|
|
|
452291
452449
|
releaseNotes
|
|
452292
452450
|
};
|
|
452293
452451
|
}
|
|
452294
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.
|
|
452452
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.3") {
|
|
452295
452453
|
if (process.env.USER_TYPE === "ant") {
|
|
452296
452454
|
const changelog = "";
|
|
452297
452455
|
if (changelog) {
|
|
@@ -455157,7 +455315,7 @@ function getRecentActivitySync() {
|
|
|
455157
455315
|
return cachedActivity;
|
|
455158
455316
|
}
|
|
455159
455317
|
function getLogoDisplayData() {
|
|
455160
|
-
const version2 = process.env.DEMO_VERSION ?? "1.76.
|
|
455318
|
+
const version2 = process.env.DEMO_VERSION ?? "1.76.3";
|
|
455161
455319
|
const serverUrl = getDirectConnectServerUrl();
|
|
455162
455320
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
455163
455321
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -456024,7 +456182,7 @@ function LogoV2() {
|
|
|
456024
456182
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
456025
456183
|
t2 = () => {
|
|
456026
456184
|
const currentConfig2 = getGlobalConfig();
|
|
456027
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.76.
|
|
456185
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.76.3") {
|
|
456028
456186
|
return;
|
|
456029
456187
|
}
|
|
456030
456188
|
saveGlobalConfig(_temp325);
|
|
@@ -456709,12 +456867,12 @@ function LogoV2() {
|
|
|
456709
456867
|
return t41;
|
|
456710
456868
|
}
|
|
456711
456869
|
function _temp325(current) {
|
|
456712
|
-
if (current.lastReleaseNotesSeen === "1.76.
|
|
456870
|
+
if (current.lastReleaseNotesSeen === "1.76.3") {
|
|
456713
456871
|
return current;
|
|
456714
456872
|
}
|
|
456715
456873
|
return {
|
|
456716
456874
|
...current,
|
|
456717
|
-
lastReleaseNotesSeen: "1.76.
|
|
456875
|
+
lastReleaseNotesSeen: "1.76.3"
|
|
456718
456876
|
};
|
|
456719
456877
|
}
|
|
456720
456878
|
function _temp241(s_0) {
|
|
@@ -473528,7 +473686,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
473528
473686
|
if (spec.name !== specName) {
|
|
473529
473687
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
473530
473688
|
}
|
|
473531
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.
|
|
473689
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3");
|
|
473532
473690
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
473533
473691
|
throw new Error("invalid ur-agent package version");
|
|
473534
473692
|
}
|
|
@@ -474521,7 +474679,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
474521
474679
|
path: ".github/workflows/ur.yml",
|
|
474522
474680
|
root: "project",
|
|
474523
474681
|
content: compileAgenticCiWorkflow("default", {
|
|
474524
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.76.
|
|
474682
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3"
|
|
474525
474683
|
})
|
|
474526
474684
|
},
|
|
474527
474685
|
{
|
|
@@ -474584,7 +474742,7 @@ function value(tokens, flag) {
|
|
|
474584
474742
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
474585
474743
|
}
|
|
474586
474744
|
function cliVersion() {
|
|
474587
|
-
return typeof MACRO !== "undefined" ? "1.76.
|
|
474745
|
+
return typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3";
|
|
474588
474746
|
}
|
|
474589
474747
|
function workflowPath(cwd2) {
|
|
474590
474748
|
return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -480440,7 +480598,7 @@ function createAcpStdioApp(deps) {
|
|
|
480440
480598
|
}
|
|
480441
480599
|
},
|
|
480442
480600
|
authMethods: [],
|
|
480443
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480601
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.3" }
|
|
480444
480602
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
480445
480603
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
480446
480604
|
await runtime2.announce({
|
|
@@ -480537,7 +480695,7 @@ function createAcpStdioAgent(deps) {
|
|
|
480537
480695
|
}
|
|
480538
480696
|
},
|
|
480539
480697
|
authMethods: [],
|
|
480540
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480698
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.3" }
|
|
480541
480699
|
});
|
|
480542
480700
|
return;
|
|
480543
480701
|
case "authenticate":
|
|
@@ -490263,8 +490421,10 @@ function summarizeSubagentCosts(subagentsDir) {
|
|
|
490263
490421
|
row.cacheCreationInputTokens += tokens.cacheCreationInputTokens;
|
|
490264
490422
|
const model = message.message?.model ?? null;
|
|
490265
490423
|
row.model ??= model;
|
|
490266
|
-
if (model)
|
|
490424
|
+
if (model && getAPIProvider() !== "ollama" && Object.prototype.hasOwnProperty.call(MODEL_COSTS, getCanonicalName(model))) {
|
|
490425
|
+
row.hasReliableCosting = true;
|
|
490267
490426
|
row.costUSD += calculateCostFromTokens(model, tokens);
|
|
490427
|
+
}
|
|
490268
490428
|
}
|
|
490269
490429
|
rows.push(row);
|
|
490270
490430
|
}
|
|
@@ -490290,6 +490450,7 @@ function formatSubagentCosts(rows, json2, searchedDir) {
|
|
|
490290
490450
|
Either this session spawned no subagents, or that is not where they were written.` : "No subagent transcripts found for this session.";
|
|
490291
490451
|
}
|
|
490292
490452
|
const billed = rows.some((row) => row.costUSD > 0);
|
|
490453
|
+
const total = rows.reduce((sum, row) => sum + row.costUSD, 0);
|
|
490293
490454
|
const label = (row) => row.description || row.agentType || row.agentId;
|
|
490294
490455
|
const width = Math.min(Math.max(...rows.map((row) => label(row).length), 5), 44);
|
|
490295
490456
|
const lines = ["Per-agent usage", ""];
|
|
@@ -490299,7 +490460,6 @@ Either this session spawned no subagents, or that is not where they were written
|
|
|
490299
490460
|
}
|
|
490300
490461
|
const totalIn = rows.reduce((sum, row) => sum + row.inputTokens, 0);
|
|
490301
490462
|
const totalOut = rows.reduce((sum, row) => sum + row.outputTokens, 0);
|
|
490302
|
-
const total = rows.reduce((sum, row) => sum + row.costUSD, 0);
|
|
490303
490463
|
lines.push(` ${"-".repeat(width)} ${"-".repeat(12)} ${"-".repeat(12)}`, ` ${"total".padEnd(width)} ${String(totalIn).padStart(9)} in ` + `${String(totalOut).padStart(8)} out${billed ? ` ${formatUSD(total).padStart(9)}` : ""}`);
|
|
490304
490464
|
if (!billed) {
|
|
490305
490465
|
lines.push("", "Cost omitted: the active runtime is local and unbilled.");
|
|
@@ -490313,6 +490473,9 @@ function formatUSD(value2) {
|
|
|
490313
490473
|
var AGENT_TOOL_NAMES, PREVIEW_CHARS = 160, VERDICT_RE2;
|
|
490314
490474
|
var init_inspector = __esm(() => {
|
|
490315
490475
|
init_json();
|
|
490476
|
+
init_model();
|
|
490477
|
+
init_providers();
|
|
490478
|
+
init_modelCost();
|
|
490316
490479
|
init_modelCost();
|
|
490317
490480
|
AGENT_TOOL_NAMES = new Set(["Agent", "Task"]);
|
|
490318
490481
|
VERDICT_RE2 = /\bVERDICT:\s*(PASS|FAIL|PARTIAL)\b/i;
|
|
@@ -689984,7 +690147,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
689984
690147
|
smapsRollup,
|
|
689985
690148
|
platform: process.platform,
|
|
689986
690149
|
nodeVersion: process.version,
|
|
689987
|
-
ccVersion: "1.76.
|
|
690150
|
+
ccVersion: "1.76.3"
|
|
689988
690151
|
};
|
|
689989
690152
|
}
|
|
689990
690153
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -690564,7 +690727,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
690564
690727
|
var call154 = async () => {
|
|
690565
690728
|
return {
|
|
690566
690729
|
type: "text",
|
|
690567
|
-
value: "1.76.
|
|
690730
|
+
value: "1.76.3"
|
|
690568
690731
|
};
|
|
690569
690732
|
}, version2, version_default;
|
|
690570
690733
|
var init_version = __esm(() => {
|
|
@@ -701831,7 +701994,7 @@ function generateHtmlReport(data, insights) {
|
|
|
701831
701994
|
</html>`;
|
|
701832
701995
|
}
|
|
701833
701996
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
701834
|
-
const version3 = typeof MACRO !== "undefined" ? "1.76.
|
|
701997
|
+
const version3 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
701835
701998
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
701836
701999
|
const facets_summary = {
|
|
701837
702000
|
total: facets.size,
|
|
@@ -706145,7 +706308,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
706145
706308
|
init_settings2();
|
|
706146
706309
|
init_slowOperations();
|
|
706147
706310
|
init_uuid();
|
|
706148
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.76.
|
|
706311
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
706149
706312
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
706150
706313
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
706151
706314
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -707360,7 +707523,7 @@ var init_filesystem = __esm(() => {
|
|
|
707360
707523
|
});
|
|
707361
707524
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
707362
707525
|
const nonce = randomBytes20(16).toString("hex");
|
|
707363
|
-
return join232(getURTempDir(), "bundled-skills", "1.76.
|
|
707526
|
+
return join232(getURTempDir(), "bundled-skills", "1.76.3", nonce);
|
|
707364
707527
|
});
|
|
707365
707528
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
707366
707529
|
});
|
|
@@ -713289,7 +713452,7 @@ async function toolToAPISchema(tool, options4) {
|
|
|
713289
713452
|
let base2 = cache5.get(cacheKey);
|
|
713290
713453
|
if (!base2) {
|
|
713291
713454
|
const strictToolsEnabled = checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_tool_pear");
|
|
713292
|
-
let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713455
|
+
let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713293
713456
|
if (!isAgentSwarmsEnabled()) {
|
|
713294
713457
|
input_schema = filterSwarmFieldsFromSchema(tool.name, input_schema);
|
|
713295
713458
|
}
|
|
@@ -713532,11 +713695,11 @@ async function logContextMetrics(mcpConfigs, toolPermissionContext) {
|
|
|
713532
713695
|
}
|
|
713533
713696
|
mcpServersCount = serverNames.size;
|
|
713534
713697
|
for (const tool of mcpTools) {
|
|
713535
|
-
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713698
|
+
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713536
713699
|
mcpToolsTokens += roughTokenCountEstimation(jsonStringify(schema));
|
|
713537
713700
|
}
|
|
713538
713701
|
for (const tool of nonMcpTools) {
|
|
713539
|
-
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713702
|
+
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713540
713703
|
nonMcpToolsTokens += roughTokenCountEstimation(jsonStringify(schema));
|
|
713541
713704
|
}
|
|
713542
713705
|
logEvent("tengu_context_size", {
|
|
@@ -713674,7 +713837,7 @@ var init_api3 = __esm(() => {
|
|
|
713674
713837
|
init_slowOperations();
|
|
713675
713838
|
init_toolSchemaCache();
|
|
713676
713839
|
init_windowsPaths();
|
|
713677
|
-
|
|
713840
|
+
init_zodToJsonSchema();
|
|
713678
713841
|
SWARM_FIELDS_BY_TOOL = {
|
|
713679
713842
|
[EXIT_PLAN_MODE_V2_TOOL_NAME]: ["launchSwarm", "teammateCount"],
|
|
713680
713843
|
[AGENT_TOOL_NAME]: ["name", "team_name", "mode"]
|
|
@@ -713709,7 +713872,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
713709
713872
|
}
|
|
713710
713873
|
function computeFingerprintFromMessages(messages) {
|
|
713711
713874
|
const firstMessageText = extractFirstMessageText(messages);
|
|
713712
|
-
return computeFingerprint(firstMessageText, "1.76.
|
|
713875
|
+
return computeFingerprint(firstMessageText, "1.76.3");
|
|
713713
713876
|
}
|
|
713714
713877
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
713715
713878
|
var init_fingerprint = () => {};
|
|
@@ -715628,7 +715791,7 @@ async function sideQuery(opts) {
|
|
|
715628
715791
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
715629
715792
|
}
|
|
715630
715793
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
715631
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.76.
|
|
715794
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.76.3");
|
|
715632
715795
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
715633
715796
|
const systemBlocks = [
|
|
715634
715797
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -720465,7 +720628,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
720465
720628
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
720466
720629
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
720467
720630
|
betas: getSdkBetas(),
|
|
720468
|
-
ur_version: "1.76.
|
|
720631
|
+
ur_version: "1.76.3",
|
|
720469
720632
|
output_style: outputStyle2,
|
|
720470
720633
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
720471
720634
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -734337,7 +734500,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
734337
734500
|
function getSemverPart(version3) {
|
|
734338
734501
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
734339
734502
|
}
|
|
734340
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.76.
|
|
734503
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.76.3") {
|
|
734341
734504
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react223.useState(() => getSemverPart(initialVersion));
|
|
734342
734505
|
if (!updatedVersion) {
|
|
734343
734506
|
return null;
|
|
@@ -734386,7 +734549,7 @@ function AutoUpdater({
|
|
|
734386
734549
|
return;
|
|
734387
734550
|
}
|
|
734388
734551
|
if (false) {}
|
|
734389
|
-
const currentVersion = "1.76.
|
|
734552
|
+
const currentVersion = "1.76.3";
|
|
734390
734553
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
734391
734554
|
let latestVersion = await getLatestVersion(channel);
|
|
734392
734555
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -734615,12 +734778,12 @@ function NativeAutoUpdater({
|
|
|
734615
734778
|
logEvent("tengu_native_auto_updater_start", {});
|
|
734616
734779
|
try {
|
|
734617
734780
|
const maxVersion = await getMaxVersion();
|
|
734618
|
-
if (maxVersion && gt("1.76.
|
|
734781
|
+
if (maxVersion && gt("1.76.3", maxVersion)) {
|
|
734619
734782
|
const msg = await getMaxVersionMessage();
|
|
734620
734783
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
734621
734784
|
}
|
|
734622
734785
|
const result = await installLatest(channel);
|
|
734623
|
-
const currentVersion = "1.76.
|
|
734786
|
+
const currentVersion = "1.76.3";
|
|
734624
734787
|
const latencyMs = Date.now() - startTime;
|
|
734625
734788
|
if (result.lockFailed) {
|
|
734626
734789
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -734757,17 +734920,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
734757
734920
|
const maxVersion = await getMaxVersion();
|
|
734758
734921
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
734759
734922
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
734760
|
-
if (gte("1.76.
|
|
734761
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.76.
|
|
734923
|
+
if (gte("1.76.3", maxVersion)) {
|
|
734924
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.76.3"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
734762
734925
|
setUpdateAvailable(false);
|
|
734763
734926
|
return;
|
|
734764
734927
|
}
|
|
734765
734928
|
latest = maxVersion;
|
|
734766
734929
|
}
|
|
734767
|
-
const hasUpdate = latest && !gte("1.76.
|
|
734930
|
+
const hasUpdate = latest && !gte("1.76.3", latest) && !shouldSkipVersion(latest);
|
|
734768
734931
|
setUpdateAvailable(!!hasUpdate);
|
|
734769
734932
|
if (hasUpdate) {
|
|
734770
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.
|
|
734933
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.3"} -> ${latest}`);
|
|
734771
734934
|
}
|
|
734772
734935
|
};
|
|
734773
734936
|
$2[0] = t1;
|
|
@@ -734801,7 +734964,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
734801
734964
|
wrap: "truncate",
|
|
734802
734965
|
children: [
|
|
734803
734966
|
"currentVersion: ",
|
|
734804
|
-
"1.76.
|
|
734967
|
+
"1.76.3"
|
|
734805
734968
|
]
|
|
734806
734969
|
}, undefined, true, undefined, this);
|
|
734807
734970
|
$2[3] = verbose;
|
|
@@ -745601,7 +745764,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
745601
745764
|
project_dir: getOriginalCwd(),
|
|
745602
745765
|
added_dirs: addedDirs
|
|
745603
745766
|
},
|
|
745604
|
-
version: "1.76.
|
|
745767
|
+
version: "1.76.3",
|
|
745605
745768
|
output_style: {
|
|
745606
745769
|
name: outputStyleName
|
|
745607
745770
|
},
|
|
@@ -745736,7 +745899,7 @@ function StatusLineInner({
|
|
|
745736
745899
|
const attention = customStatusError ?? taskAttention;
|
|
745737
745900
|
const terminalSize = React132.useContext(TerminalSizeContext);
|
|
745738
745901
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
745739
|
-
version: "1.76.
|
|
745902
|
+
version: "1.76.3",
|
|
745740
745903
|
providerLabel: providerRuntime.providerLabel,
|
|
745741
745904
|
authMode: providerRuntime.authLabel,
|
|
745742
745905
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -758021,7 +758184,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
758021
758184
|
} catch {}
|
|
758022
758185
|
const data = {
|
|
758023
758186
|
trigger: trigger2,
|
|
758024
|
-
version: "1.76.
|
|
758187
|
+
version: "1.76.3",
|
|
758025
758188
|
platform: process.platform,
|
|
758026
758189
|
transcript,
|
|
758027
758190
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -770395,7 +770558,7 @@ function WelcomeV2() {
|
|
|
770395
770558
|
dimColor: true,
|
|
770396
770559
|
children: [
|
|
770397
770560
|
"v",
|
|
770398
|
-
"1.76.
|
|
770561
|
+
"1.76.3"
|
|
770399
770562
|
]
|
|
770400
770563
|
}, undefined, true, undefined, this)
|
|
770401
770564
|
]
|
|
@@ -771655,7 +771818,7 @@ function completeOnboarding() {
|
|
|
771655
771818
|
saveGlobalConfig((current) => ({
|
|
771656
771819
|
...current,
|
|
771657
771820
|
hasCompletedOnboarding: true,
|
|
771658
|
-
lastOnboardingVersion: "1.76.
|
|
771821
|
+
lastOnboardingVersion: "1.76.3"
|
|
771659
771822
|
}));
|
|
771660
771823
|
}
|
|
771661
771824
|
function showDialog(root2, renderer) {
|
|
@@ -776699,7 +776862,7 @@ function appendToLog(path24, message) {
|
|
|
776699
776862
|
cwd: getFsImplementation().cwd(),
|
|
776700
776863
|
userType: process.env.USER_TYPE,
|
|
776701
776864
|
sessionId: getSessionId(),
|
|
776702
|
-
version: "1.76.
|
|
776865
|
+
version: "1.76.3"
|
|
776703
776866
|
};
|
|
776704
776867
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
776705
776868
|
}
|
|
@@ -780858,8 +781021,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
780858
781021
|
}
|
|
780859
781022
|
async function checkEnvLessBridgeMinVersion() {
|
|
780860
781023
|
const cfg = await getEnvLessBridgeConfig();
|
|
780861
|
-
if (cfg.min_version && lt("1.76.
|
|
780862
|
-
return `Your version of UR (${"1.76.
|
|
781024
|
+
if (cfg.min_version && lt("1.76.3", cfg.min_version)) {
|
|
781025
|
+
return `Your version of UR (${"1.76.3"}) is too old for Remote Control.
|
|
780863
781026
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
780864
781027
|
}
|
|
780865
781028
|
return null;
|
|
@@ -781333,7 +781496,7 @@ async function initBridgeCore(params) {
|
|
|
781333
781496
|
const rawApi = createBridgeApiClient({
|
|
781334
781497
|
baseUrl,
|
|
781335
781498
|
getAccessToken,
|
|
781336
|
-
runnerVersion: "1.76.
|
|
781499
|
+
runnerVersion: "1.76.3",
|
|
781337
781500
|
onDebug: logForDebugging,
|
|
781338
781501
|
onAuth401,
|
|
781339
781502
|
getTrustedDeviceToken
|
|
@@ -790806,7 +790969,7 @@ function getAgUiCapabilities() {
|
|
|
790806
790969
|
name: "UR-Nexus",
|
|
790807
790970
|
type: "ur-nexus",
|
|
790808
790971
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
790809
|
-
version: "1.76.
|
|
790972
|
+
version: "1.76.3",
|
|
790810
790973
|
provider: "UR",
|
|
790811
790974
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
790812
790975
|
},
|
|
@@ -791946,7 +792109,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
791946
792109
|
};
|
|
791947
792110
|
const server2 = new Server({
|
|
791948
792111
|
name: "ur-nexus",
|
|
791949
|
-
version: "1.76.
|
|
792112
|
+
version: "1.76.3"
|
|
791950
792113
|
}, {
|
|
791951
792114
|
capabilities: {
|
|
791952
792115
|
tools: {}
|
|
@@ -793104,7 +793267,7 @@ function thrownResponse(error40) {
|
|
|
793104
793267
|
}
|
|
793105
793268
|
async function createUrMcp2026Runtime(options4) {
|
|
793106
793269
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
793107
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.76.
|
|
793270
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.76.3" }, { capabilities: {} });
|
|
793108
793271
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
793109
793272
|
try {
|
|
793110
793273
|
await server2.connect(serverTransport);
|
|
@@ -793115,7 +793278,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
793115
793278
|
}
|
|
793116
793279
|
const runtime2 = new Mcp2026Runtime({
|
|
793117
793280
|
cwd: options4.cwd,
|
|
793118
|
-
version: "1.76.
|
|
793281
|
+
version: "1.76.3",
|
|
793119
793282
|
backend: {
|
|
793120
793283
|
listTools: async () => {
|
|
793121
793284
|
const listed = await client2.listTools();
|
|
@@ -795256,7 +795419,7 @@ async function update() {
|
|
|
795256
795419
|
logEvent("tengu_update_check", {});
|
|
795257
795420
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
795258
795421
|
const result = await checkUpgradeStatus({
|
|
795259
|
-
currentVersion: "1.76.
|
|
795422
|
+
currentVersion: "1.76.3",
|
|
795260
795423
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
795261
795424
|
installationType: diagnostic2.installationType,
|
|
795262
795425
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -796572,7 +796735,7 @@ ${customInstructions}` : customInstructions;
|
|
|
796572
796735
|
}
|
|
796573
796736
|
}
|
|
796574
796737
|
logForDiagnosticsNoPII("info", "started", {
|
|
796575
|
-
version: "1.76.
|
|
796738
|
+
version: "1.76.3",
|
|
796576
796739
|
is_native_binary: isInBundledMode()
|
|
796577
796740
|
});
|
|
796578
796741
|
registerCleanup(async () => {
|
|
@@ -797358,7 +797521,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
797358
797521
|
pendingHookMessages
|
|
797359
797522
|
}, renderAndRun);
|
|
797360
797523
|
}
|
|
797361
|
-
}).version("1.76.
|
|
797524
|
+
}).version("1.76.3 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
797362
797525
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
797363
797526
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
797364
797527
|
if (canUserConfigureAdvisor()) {
|
|
@@ -798410,7 +798573,7 @@ if (false) {}
|
|
|
798410
798573
|
async function main2() {
|
|
798411
798574
|
const args = process.argv.slice(2);
|
|
798412
798575
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
798413
|
-
console.log(`${"1.76.
|
|
798576
|
+
console.log(`${"1.76.3"} (UR-Nexus)`);
|
|
798414
798577
|
return;
|
|
798415
798578
|
}
|
|
798416
798579
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|