ur-agent 1.76.0 → 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) {
|
|
@@ -57995,7 +58017,7 @@ function validateToolSchema(schema, dialect = "json-schema") {
|
|
|
57995
58017
|
const issues = [];
|
|
57996
58018
|
const root2 = isObject5(schema) ? schema : undefined;
|
|
57997
58019
|
const allowedTypes = new Set(["object", "array", "string", "number", "integer", "boolean", "null"]);
|
|
57998
|
-
function walk(node, path8, depth) {
|
|
58020
|
+
function walk(node, path8, depth, inPropertiesObject = false) {
|
|
57999
58021
|
if (depth > 64) {
|
|
58000
58022
|
issues.push({ path: path8, message: "schema nests deeper than 64 levels" });
|
|
58001
58023
|
return;
|
|
@@ -58028,7 +58050,7 @@ function validateToolSchema(schema, dialect = "json-schema") {
|
|
|
58028
58050
|
}
|
|
58029
58051
|
}
|
|
58030
58052
|
}
|
|
58031
|
-
if (node.type !== undefined) {
|
|
58053
|
+
if (!inPropertiesObject && node.type !== undefined) {
|
|
58032
58054
|
const types = Array.isArray(node.type) ? node.type : [node.type];
|
|
58033
58055
|
if (types.length === 0 || types.some((type) => typeof type !== "string" || !allowedTypes.has(type))) {
|
|
58034
58056
|
issues.push({ path: path8, message: '"type" contains an unsupported JSON Schema type' });
|
|
@@ -58089,7 +58111,7 @@ function validateToolSchema(schema, dialect = "json-schema") {
|
|
|
58089
58111
|
for (const [key, value] of Object.entries(node)) {
|
|
58090
58112
|
if (key === "enum" || key === "required")
|
|
58091
58113
|
continue;
|
|
58092
|
-
walk(value, path8 ? `${path8}.${key}` : key, depth + 1);
|
|
58114
|
+
walk(value, path8 ? `${path8}.${key}` : key, depth + 1, key === "properties");
|
|
58093
58115
|
}
|
|
58094
58116
|
}
|
|
58095
58117
|
if (!isObject5(schema)) {
|
|
@@ -58098,7 +58120,7 @@ function validateToolSchema(schema, dialect = "json-schema") {
|
|
|
58098
58120
|
if (schema.type !== "object") {
|
|
58099
58121
|
issues.push({ path: "", message: 'tool parameter schema must have top-level type "object"' });
|
|
58100
58122
|
}
|
|
58101
|
-
walk(schema, "", 0);
|
|
58123
|
+
walk(schema, "", 0, false);
|
|
58102
58124
|
return issues;
|
|
58103
58125
|
}
|
|
58104
58126
|
function assertValidToolName(name, providerLabel) {
|
|
@@ -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,7 +250385,46 @@ 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;
|
|
250402
|
+
}
|
|
250403
|
+
}
|
|
250404
|
+
return null;
|
|
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;
|
|
250316
250424
|
}
|
|
250425
|
+
const objectOptions = objectOptionValues(value);
|
|
250426
|
+
if (objectOptions)
|
|
250427
|
+
return objectOptions;
|
|
250317
250428
|
}
|
|
250318
250429
|
return null;
|
|
250319
250430
|
}
|
|
@@ -250322,15 +250433,33 @@ function normalizeQuestionInput(value, index2) {
|
|
|
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 {
|
|
@@ -250367,11 +250512,14 @@ function normalizeAskUserQuestionInput2(value) {
|
|
|
250367
250512
|
...commonFields
|
|
250368
250513
|
};
|
|
250369
250514
|
}
|
|
250370
|
-
if (
|
|
250371
|
-
|
|
250372
|
-
|
|
250373
|
-
|
|
250374
|
-
|
|
250515
|
+
if (optionsField(input) !== null) {
|
|
250516
|
+
const singleQuestion = normalizeQuestionInput(input, 0);
|
|
250517
|
+
if (singleQuestion !== input) {
|
|
250518
|
+
return {
|
|
250519
|
+
questions: dedupeQuestions([singleQuestion]),
|
|
250520
|
+
...commonFields
|
|
250521
|
+
};
|
|
250522
|
+
}
|
|
250375
250523
|
}
|
|
250376
250524
|
return value;
|
|
250377
250525
|
}
|
|
@@ -250449,7 +250597,7 @@ function validateHtmlPreview(preview) {
|
|
|
250449
250597
|
}
|
|
250450
250598
|
return null;
|
|
250451
250599
|
}
|
|
250452
|
-
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;
|
|
250453
250601
|
var init_AskUserQuestionTool = __esm(() => {
|
|
250454
250602
|
init_state();
|
|
250455
250603
|
init_MessageResponse();
|
|
@@ -250462,6 +250610,33 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
250462
250610
|
init_prompt9();
|
|
250463
250611
|
import_compiler_runtime19 = __toESM(require_compiler_runtime(), 1);
|
|
250464
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
|
+
]);
|
|
250465
250640
|
questionOptionSchema = lazySchema(() => exports_external.object({
|
|
250466
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".'),
|
|
250467
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.'),
|
|
@@ -259311,7 +259486,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
|
|
|
259311
259486
|
}
|
|
259312
259487
|
}
|
|
259313
259488
|
function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_STATE_CACHE_SIZE) {
|
|
259314
|
-
const
|
|
259489
|
+
const cache4 = createFileStateCacheWithSizeLimit(maxSize);
|
|
259315
259490
|
const fileReadToolUseIds = new Map;
|
|
259316
259491
|
const fileWriteToolUseIds = new Map;
|
|
259317
259492
|
const fileEditToolUseIds = new Map;
|
|
@@ -259355,7 +259530,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259355
259530
|
`).trim();
|
|
259356
259531
|
if (message.timestamp) {
|
|
259357
259532
|
const timestamp = new Date(message.timestamp).getTime();
|
|
259358
|
-
|
|
259533
|
+
cache4.set(readFilePath, {
|
|
259359
259534
|
content: fileContent,
|
|
259360
259535
|
timestamp,
|
|
259361
259536
|
offset: undefined,
|
|
@@ -259366,7 +259541,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259366
259541
|
const writeToolData = fileWriteToolUseIds.get(content.tool_use_id);
|
|
259367
259542
|
if (writeToolData && message.timestamp) {
|
|
259368
259543
|
const timestamp = new Date(message.timestamp).getTime();
|
|
259369
|
-
|
|
259544
|
+
cache4.set(writeToolData.filePath, {
|
|
259370
259545
|
content: writeToolData.content,
|
|
259371
259546
|
timestamp,
|
|
259372
259547
|
offset: undefined,
|
|
@@ -259377,7 +259552,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259377
259552
|
if (editFilePath && content.is_error !== true) {
|
|
259378
259553
|
try {
|
|
259379
259554
|
const { content: diskContent } = readFileSyncWithMetadata(editFilePath);
|
|
259380
|
-
|
|
259555
|
+
cache4.set(editFilePath, {
|
|
259381
259556
|
content: diskContent,
|
|
259382
259557
|
timestamp: getFileModificationTime(editFilePath),
|
|
259383
259558
|
offset: undefined,
|
|
@@ -259393,7 +259568,7 @@ function extractReadFilesFromMessages(messages, cwd2, maxSize = ASK_READ_FILE_ST
|
|
|
259393
259568
|
}
|
|
259394
259569
|
}
|
|
259395
259570
|
}
|
|
259396
|
-
return
|
|
259571
|
+
return cache4;
|
|
259397
259572
|
}
|
|
259398
259573
|
function extractBashToolsFromMessages(messages) {
|
|
259399
259574
|
const tools = new Set;
|
|
@@ -271300,7 +271475,7 @@ var init_parseDef = __esm(() => {
|
|
|
271300
271475
|
var init_parseTypes = () => {};
|
|
271301
271476
|
|
|
271302
271477
|
// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
271303
|
-
var
|
|
271478
|
+
var init_zodToJsonSchema2 = __esm(() => {
|
|
271304
271479
|
init_parseDef();
|
|
271305
271480
|
init_Refs();
|
|
271306
271481
|
init_any();
|
|
@@ -271308,7 +271483,7 @@ var init_zodToJsonSchema = __esm(() => {
|
|
|
271308
271483
|
|
|
271309
271484
|
// node_modules/zod-to-json-schema/dist/esm/index.js
|
|
271310
271485
|
var init_esm9 = __esm(() => {
|
|
271311
|
-
|
|
271486
|
+
init_zodToJsonSchema2();
|
|
271312
271487
|
init_Options();
|
|
271313
271488
|
init_Refs();
|
|
271314
271489
|
init_parseDef();
|
|
@@ -271339,7 +271514,7 @@ var init_esm9 = __esm(() => {
|
|
|
271339
271514
|
init_union();
|
|
271340
271515
|
init_unknown();
|
|
271341
271516
|
init_selectParser();
|
|
271342
|
-
|
|
271517
|
+
init_zodToJsonSchema2();
|
|
271343
271518
|
});
|
|
271344
271519
|
|
|
271345
271520
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
@@ -296944,7 +297119,7 @@ function getInstallationEnv() {
|
|
|
296944
297119
|
return;
|
|
296945
297120
|
}
|
|
296946
297121
|
function getURCodeVersion() {
|
|
296947
|
-
return "1.76.
|
|
297122
|
+
return "1.76.3";
|
|
296948
297123
|
}
|
|
296949
297124
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
296950
297125
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -303453,8 +303628,8 @@ function getMcpAuthCache() {
|
|
|
303453
303628
|
return authCachePromise;
|
|
303454
303629
|
}
|
|
303455
303630
|
async function isMcpAuthCached(serverId) {
|
|
303456
|
-
const
|
|
303457
|
-
const entry =
|
|
303631
|
+
const cache4 = await getMcpAuthCache();
|
|
303632
|
+
const entry = cache4[serverId];
|
|
303458
303633
|
if (!entry) {
|
|
303459
303634
|
return false;
|
|
303460
303635
|
}
|
|
@@ -303462,11 +303637,11 @@ async function isMcpAuthCached(serverId) {
|
|
|
303462
303637
|
}
|
|
303463
303638
|
function setMcpAuthCacheEntry(serverId) {
|
|
303464
303639
|
writeChain = writeChain.then(async () => {
|
|
303465
|
-
const
|
|
303466
|
-
|
|
303640
|
+
const cache4 = await getMcpAuthCache();
|
|
303641
|
+
cache4[serverId] = { timestamp: Date.now() };
|
|
303467
303642
|
const cachePath = getMcpAuthCachePath();
|
|
303468
303643
|
await mkdir12(dirname34(cachePath), { recursive: true });
|
|
303469
|
-
await writeFile10(cachePath, jsonStringify(
|
|
303644
|
+
await writeFile10(cachePath, jsonStringify(cache4));
|
|
303470
303645
|
authCachePromise = null;
|
|
303471
303646
|
}).catch(() => {});
|
|
303472
303647
|
}
|
|
@@ -304275,7 +304450,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
304275
304450
|
const client2 = new Client({
|
|
304276
304451
|
name: "ur",
|
|
304277
304452
|
title: "UR",
|
|
304278
|
-
version: "1.76.
|
|
304453
|
+
version: "1.76.3",
|
|
304279
304454
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304280
304455
|
websiteUrl: PRODUCT_URL
|
|
304281
304456
|
}, {
|
|
@@ -304635,7 +304810,7 @@ var init_client5 = __esm(() => {
|
|
|
304635
304810
|
const client2 = new Client({
|
|
304636
304811
|
name: "ur",
|
|
304637
304812
|
title: "UR",
|
|
304638
|
-
version: "1.76.
|
|
304813
|
+
version: "1.76.3",
|
|
304639
304814
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304640
304815
|
websiteUrl: PRODUCT_URL
|
|
304641
304816
|
}, {
|
|
@@ -317188,7 +317363,7 @@ async function createRuntime() {
|
|
|
317188
317363
|
bootstrapTelemetry();
|
|
317189
317364
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
317190
317365
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
317191
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.
|
|
317366
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.3"
|
|
317192
317367
|
}));
|
|
317193
317368
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
317194
317369
|
resource,
|
|
@@ -317221,11 +317396,11 @@ async function createRuntime() {
|
|
|
317221
317396
|
setMeterProvider(meterProvider);
|
|
317222
317397
|
setLoggerProvider(loggerProvider);
|
|
317223
317398
|
if (meterProvider) {
|
|
317224
|
-
const meter = meterProvider.getMeter("ur-agent", "1.76.
|
|
317399
|
+
const meter = meterProvider.getMeter("ur-agent", "1.76.3");
|
|
317225
317400
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
317226
317401
|
}
|
|
317227
317402
|
if (loggerProvider) {
|
|
317228
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.
|
|
317403
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.3"));
|
|
317229
317404
|
}
|
|
317230
317405
|
if (!cleanupRegistered2) {
|
|
317231
317406
|
cleanupRegistered2 = true;
|
|
@@ -317887,9 +318062,9 @@ async function assertMinVersion() {
|
|
|
317887
318062
|
if (false) {}
|
|
317888
318063
|
try {
|
|
317889
318064
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
317890
|
-
if (versionConfig.minVersion && lt("1.76.
|
|
318065
|
+
if (versionConfig.minVersion && lt("1.76.3", versionConfig.minVersion)) {
|
|
317891
318066
|
console.error(`
|
|
317892
|
-
It looks like your version of UR (${"1.76.
|
|
318067
|
+
It looks like your version of UR (${"1.76.3"}) needs an update.
|
|
317893
318068
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
317894
318069
|
|
|
317895
318070
|
To update, please run:
|
|
@@ -318105,7 +318280,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318105
318280
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
318106
318281
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
318107
318282
|
pid: process.pid,
|
|
318108
|
-
currentVersion: "1.76.
|
|
318283
|
+
currentVersion: "1.76.3"
|
|
318109
318284
|
});
|
|
318110
318285
|
return "in_progress";
|
|
318111
318286
|
}
|
|
@@ -318114,7 +318289,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318114
318289
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
318115
318290
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
318116
318291
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
318117
|
-
currentVersion: "1.76.
|
|
318292
|
+
currentVersion: "1.76.3"
|
|
318118
318293
|
});
|
|
318119
318294
|
console.error(`
|
|
318120
318295
|
Error: Windows NPM detected in WSL
|
|
@@ -318649,7 +318824,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
318649
318824
|
}
|
|
318650
318825
|
async function getDoctorDiagnostic() {
|
|
318651
318826
|
const installationType = await getCurrentInstallationType();
|
|
318652
|
-
const version2 = typeof MACRO !== "undefined" ? "1.76.
|
|
318827
|
+
const version2 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
318653
318828
|
const installationPath = await getInstallationPath();
|
|
318654
318829
|
const invokedBinary = getInvokedBinary();
|
|
318655
318830
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -319584,8 +319759,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319584
319759
|
const maxVersion = await getMaxVersion();
|
|
319585
319760
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
319586
319761
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
319587
|
-
if (gte("1.76.
|
|
319588
|
-
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`);
|
|
319589
319764
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
319590
319765
|
latency_ms: Date.now() - startTime,
|
|
319591
319766
|
max_version: maxVersion,
|
|
@@ -319596,7 +319771,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319596
319771
|
version2 = maxVersion;
|
|
319597
319772
|
}
|
|
319598
319773
|
}
|
|
319599
|
-
if (!forceReinstall && version2 === "1.76.
|
|
319774
|
+
if (!forceReinstall && version2 === "1.76.3" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
319600
319775
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
319601
319776
|
logEvent("tengu_native_update_complete", {
|
|
319602
319777
|
latency_ms: Date.now() - startTime,
|
|
@@ -330046,8 +330221,8 @@ function invalidateOverageCreditGrantCache() {
|
|
|
330046
330221
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
330047
330222
|
if (!orgId)
|
|
330048
330223
|
return;
|
|
330049
|
-
const
|
|
330050
|
-
if (!
|
|
330224
|
+
const cache4 = getGlobalConfig().overageCreditGrantCache;
|
|
330225
|
+
if (!cache4 || !(orgId in cache4))
|
|
330051
330226
|
return;
|
|
330052
330227
|
saveGlobalConfig((prev) => {
|
|
330053
330228
|
const next = { ...prev.overageCreditGrantCache };
|
|
@@ -343665,8 +343840,8 @@ import { copyFile as copyFile4, writeFile as writeFile18 } from "fs/promises";
|
|
|
343665
343840
|
import { join as join87, resolve as resolve28, sep as sep15 } from "path";
|
|
343666
343841
|
function getPlanSlug(sessionId) {
|
|
343667
343842
|
const id = sessionId ?? getSessionId();
|
|
343668
|
-
const
|
|
343669
|
-
let slug3 =
|
|
343843
|
+
const cache4 = getPlanSlugCache();
|
|
343844
|
+
let slug3 = cache4.get(id);
|
|
343670
343845
|
if (!slug3) {
|
|
343671
343846
|
const plansDir = getPlansDirectory();
|
|
343672
343847
|
for (let i3 = 0;i3 < MAX_SLUG_RETRIES; i3++) {
|
|
@@ -343676,7 +343851,7 @@ function getPlanSlug(sessionId) {
|
|
|
343676
343851
|
break;
|
|
343677
343852
|
}
|
|
343678
343853
|
}
|
|
343679
|
-
|
|
343854
|
+
cache4.set(id, slug3);
|
|
343680
343855
|
}
|
|
343681
343856
|
return slug3;
|
|
343682
343857
|
}
|
|
@@ -366726,6 +366901,24 @@ var init_UI9 = __esm(() => {
|
|
|
366726
366901
|
|
|
366727
366902
|
// src/tools/FileWriteTool/FileWriteTool.ts
|
|
366728
366903
|
import { dirname as dirname41, sep as sep21 } from "path";
|
|
366904
|
+
function objectValue3(value) {
|
|
366905
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
366906
|
+
}
|
|
366907
|
+
function normalizeWriteInput(value) {
|
|
366908
|
+
const input = objectValue3(value);
|
|
366909
|
+
if (!input)
|
|
366910
|
+
return value;
|
|
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;
|
|
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 ?? "";
|
|
366914
|
+
if (filePath === undefined && content === undefined) {
|
|
366915
|
+
return value;
|
|
366916
|
+
}
|
|
366917
|
+
return {
|
|
366918
|
+
...typeof filePath === "string" ? { file_path: filePath } : {},
|
|
366919
|
+
content: normalizedContent
|
|
366920
|
+
};
|
|
366921
|
+
}
|
|
366729
366922
|
var inputSchema14, outputSchema11, FileWriteTool;
|
|
366730
366923
|
var init_FileWriteTool = __esm(() => {
|
|
366731
366924
|
init_analytics();
|
|
@@ -366756,10 +366949,10 @@ var init_FileWriteTool = __esm(() => {
|
|
|
366756
366949
|
init_types11();
|
|
366757
366950
|
init_prompt3();
|
|
366758
366951
|
init_UI9();
|
|
366759
|
-
inputSchema14 = lazySchema(() => exports_external.strictObject({
|
|
366952
|
+
inputSchema14 = lazySchema(() => exports_external.preprocess(normalizeWriteInput, exports_external.strictObject({
|
|
366760
366953
|
file_path: exports_external.string().describe("The absolute path to the file to write (must be absolute, not relative)"),
|
|
366761
366954
|
content: exports_external.string().describe("The content to write to the file")
|
|
366762
|
-
}));
|
|
366955
|
+
})));
|
|
366763
366956
|
outputSchema11 = lazySchema(() => exports_external.object({
|
|
366764
366957
|
type: exports_external.enum(["create", "update"]).describe("Whether a new file was created or an existing file was updated"),
|
|
366765
366958
|
filePath: exports_external.string().describe("The path to the file that was written"),
|
|
@@ -367379,387 +367572,6 @@ var init_UI10 = __esm(() => {
|
|
|
367379
367572
|
jsx_dev_runtime135 = __toESM(require_jsx_dev_runtime(), 1);
|
|
367380
367573
|
});
|
|
367381
367574
|
|
|
367382
|
-
// src/tools/GrepTool/GrepTool.ts
|
|
367383
|
-
function applyHeadLimit(items, limit, offset = 0) {
|
|
367384
|
-
if (limit === 0) {
|
|
367385
|
-
return { items: items.slice(offset), appliedLimit: undefined };
|
|
367386
|
-
}
|
|
367387
|
-
const effectiveLimit = limit ?? DEFAULT_HEAD_LIMIT;
|
|
367388
|
-
const sliced = items.slice(offset, offset + effectiveLimit);
|
|
367389
|
-
const wasTruncated = items.length - offset > effectiveLimit;
|
|
367390
|
-
return {
|
|
367391
|
-
items: sliced,
|
|
367392
|
-
appliedLimit: wasTruncated ? effectiveLimit : undefined
|
|
367393
|
-
};
|
|
367394
|
-
}
|
|
367395
|
-
function formatLimitInfo(appliedLimit, appliedOffset) {
|
|
367396
|
-
const parts = [];
|
|
367397
|
-
if (appliedLimit !== undefined)
|
|
367398
|
-
parts.push(`limit: ${appliedLimit}`);
|
|
367399
|
-
if (appliedOffset)
|
|
367400
|
-
parts.push(`offset: ${appliedOffset}`);
|
|
367401
|
-
return parts.join(", ");
|
|
367402
|
-
}
|
|
367403
|
-
var inputSchema15, VCS_DIRECTORIES_TO_EXCLUDE2, DEFAULT_HEAD_LIMIT = 250, outputSchema12, GrepTool;
|
|
367404
|
-
var init_GrepTool = __esm(() => {
|
|
367405
|
-
init_v4();
|
|
367406
|
-
init_Tool();
|
|
367407
|
-
init_cwd2();
|
|
367408
|
-
init_errors();
|
|
367409
|
-
init_file();
|
|
367410
|
-
init_fsOperations();
|
|
367411
|
-
init_path();
|
|
367412
|
-
init_filesystem();
|
|
367413
|
-
init_shellRuleMatching();
|
|
367414
|
-
init_orphanedPluginFilter();
|
|
367415
|
-
init_ripgrep();
|
|
367416
|
-
init_semanticBoolean();
|
|
367417
|
-
init_semanticNumber();
|
|
367418
|
-
init_stringUtils();
|
|
367419
|
-
init_prompt();
|
|
367420
|
-
init_UI10();
|
|
367421
|
-
inputSchema15 = lazySchema(() => exports_external.strictObject({
|
|
367422
|
-
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
367423
|
-
path: exports_external.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
|
|
367424
|
-
glob: exports_external.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
|
|
367425
|
-
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".'),
|
|
367426
|
-
"-B": semanticNumber(exports_external.number().optional()).describe('Number of lines to show before each match (rg -B). Requires output_mode: "content", ignored otherwise.'),
|
|
367427
|
-
"-A": semanticNumber(exports_external.number().optional()).describe('Number of lines to show after each match (rg -A). Requires output_mode: "content", ignored otherwise.'),
|
|
367428
|
-
"-C": semanticNumber(exports_external.number().optional()).describe("Alias for context."),
|
|
367429
|
-
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.'),
|
|
367430
|
-
"-n": semanticBoolean(exports_external.boolean().optional()).describe('Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.'),
|
|
367431
|
-
"-i": semanticBoolean(exports_external.boolean().optional()).describe("Case insensitive search (rg -i)"),
|
|
367432
|
-
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."),
|
|
367433
|
-
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).'),
|
|
367434
|
-
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.'),
|
|
367435
|
-
multiline: semanticBoolean(exports_external.boolean().optional()).describe("Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.")
|
|
367436
|
-
}));
|
|
367437
|
-
VCS_DIRECTORIES_TO_EXCLUDE2 = [
|
|
367438
|
-
".git",
|
|
367439
|
-
".svn",
|
|
367440
|
-
".hg",
|
|
367441
|
-
".bzr",
|
|
367442
|
-
".jj",
|
|
367443
|
-
".sl"
|
|
367444
|
-
];
|
|
367445
|
-
outputSchema12 = lazySchema(() => exports_external.object({
|
|
367446
|
-
mode: exports_external.enum(["content", "files_with_matches", "count"]).optional(),
|
|
367447
|
-
numFiles: exports_external.number(),
|
|
367448
|
-
filenames: exports_external.array(exports_external.string()),
|
|
367449
|
-
content: exports_external.string().optional(),
|
|
367450
|
-
numLines: exports_external.number().optional(),
|
|
367451
|
-
numMatches: exports_external.number().optional(),
|
|
367452
|
-
appliedLimit: exports_external.number().optional(),
|
|
367453
|
-
appliedOffset: exports_external.number().optional()
|
|
367454
|
-
}));
|
|
367455
|
-
GrepTool = buildTool({
|
|
367456
|
-
name: GREP_TOOL_NAME,
|
|
367457
|
-
searchHint: "search file contents with regex (ripgrep)",
|
|
367458
|
-
maxResultSizeChars: 20000,
|
|
367459
|
-
strict: true,
|
|
367460
|
-
async description() {
|
|
367461
|
-
return getDescription();
|
|
367462
|
-
},
|
|
367463
|
-
userFacingName() {
|
|
367464
|
-
return "Search";
|
|
367465
|
-
},
|
|
367466
|
-
getToolUseSummary: getToolUseSummary3,
|
|
367467
|
-
getActivityDescription(input) {
|
|
367468
|
-
const summary = getToolUseSummary3(input);
|
|
367469
|
-
return summary ? `Searching for ${summary}` : "Searching";
|
|
367470
|
-
},
|
|
367471
|
-
get inputSchema() {
|
|
367472
|
-
return inputSchema15();
|
|
367473
|
-
},
|
|
367474
|
-
get outputSchema() {
|
|
367475
|
-
return outputSchema12();
|
|
367476
|
-
},
|
|
367477
|
-
isConcurrencySafe() {
|
|
367478
|
-
return true;
|
|
367479
|
-
},
|
|
367480
|
-
isReadOnly() {
|
|
367481
|
-
return true;
|
|
367482
|
-
},
|
|
367483
|
-
toAutoClassifierInput(input) {
|
|
367484
|
-
return input.path ? `${input.pattern} in ${input.path}` : input.pattern;
|
|
367485
|
-
},
|
|
367486
|
-
isSearchOrReadCommand() {
|
|
367487
|
-
return { isSearch: true, isRead: false };
|
|
367488
|
-
},
|
|
367489
|
-
getPath({ path: path13 }) {
|
|
367490
|
-
return path13 || getCwd();
|
|
367491
|
-
},
|
|
367492
|
-
async preparePermissionMatcher({ pattern }) {
|
|
367493
|
-
return (rulePattern) => matchWildcardPattern(rulePattern, pattern);
|
|
367494
|
-
},
|
|
367495
|
-
async validateInput({ path: path13 }) {
|
|
367496
|
-
if (path13) {
|
|
367497
|
-
const fs4 = getFsImplementation();
|
|
367498
|
-
const absolutePath = expandPath(path13);
|
|
367499
|
-
if (absolutePath.startsWith("\\\\") || absolutePath.startsWith("//")) {
|
|
367500
|
-
return { result: true };
|
|
367501
|
-
}
|
|
367502
|
-
try {
|
|
367503
|
-
await fs4.stat(absolutePath);
|
|
367504
|
-
} catch (e) {
|
|
367505
|
-
if (isENOENT(e)) {
|
|
367506
|
-
const cwdSuggestion = await suggestPathUnderCwd(absolutePath);
|
|
367507
|
-
let message = `Path does not exist: ${path13}. ${FILE_NOT_FOUND_CWD_NOTE} ${getCwd()}.`;
|
|
367508
|
-
if (cwdSuggestion) {
|
|
367509
|
-
message += ` Did you mean ${cwdSuggestion}?`;
|
|
367510
|
-
}
|
|
367511
|
-
return {
|
|
367512
|
-
result: false,
|
|
367513
|
-
message,
|
|
367514
|
-
errorCode: 1
|
|
367515
|
-
};
|
|
367516
|
-
}
|
|
367517
|
-
throw e;
|
|
367518
|
-
}
|
|
367519
|
-
}
|
|
367520
|
-
return { result: true };
|
|
367521
|
-
},
|
|
367522
|
-
async checkPermissions(input, context5) {
|
|
367523
|
-
const appState = context5.getAppState();
|
|
367524
|
-
return checkReadPermissionForTool(GrepTool, input, appState.toolPermissionContext);
|
|
367525
|
-
},
|
|
367526
|
-
async prompt() {
|
|
367527
|
-
return getDescription();
|
|
367528
|
-
},
|
|
367529
|
-
renderToolUseMessage: renderToolUseMessage11,
|
|
367530
|
-
renderToolUseErrorMessage: renderToolUseErrorMessage7,
|
|
367531
|
-
renderToolResultMessage: renderToolResultMessage10,
|
|
367532
|
-
extractSearchText({ mode, content, filenames }) {
|
|
367533
|
-
if (mode === "content" && content)
|
|
367534
|
-
return content;
|
|
367535
|
-
return filenames.join(`
|
|
367536
|
-
`);
|
|
367537
|
-
},
|
|
367538
|
-
mapToolResultToToolResultBlockParam({
|
|
367539
|
-
mode = "files_with_matches",
|
|
367540
|
-
numFiles,
|
|
367541
|
-
filenames,
|
|
367542
|
-
content,
|
|
367543
|
-
numLines: _numLines,
|
|
367544
|
-
numMatches,
|
|
367545
|
-
appliedLimit,
|
|
367546
|
-
appliedOffset
|
|
367547
|
-
}, toolUseID) {
|
|
367548
|
-
if (mode === "content") {
|
|
367549
|
-
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367550
|
-
const resultContent = content || "No matches found";
|
|
367551
|
-
const finalContent = limitInfo2 ? `${resultContent}
|
|
367552
|
-
|
|
367553
|
-
[Showing results with pagination = ${limitInfo2}]` : resultContent;
|
|
367554
|
-
return {
|
|
367555
|
-
tool_use_id: toolUseID,
|
|
367556
|
-
type: "tool_result",
|
|
367557
|
-
content: finalContent
|
|
367558
|
-
};
|
|
367559
|
-
}
|
|
367560
|
-
if (mode === "count") {
|
|
367561
|
-
const limitInfo2 = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367562
|
-
const rawContent = content || "No matches found";
|
|
367563
|
-
const matches = numMatches ?? 0;
|
|
367564
|
-
const files = numFiles ?? 0;
|
|
367565
|
-
const summary = `
|
|
367566
|
-
|
|
367567
|
-
Found ${matches} total ${matches === 1 ? "occurrence" : "occurrences"} across ${files} ${files === 1 ? "file" : "files"}.${limitInfo2 ? ` with pagination = ${limitInfo2}` : ""}`;
|
|
367568
|
-
return {
|
|
367569
|
-
tool_use_id: toolUseID,
|
|
367570
|
-
type: "tool_result",
|
|
367571
|
-
content: rawContent + summary
|
|
367572
|
-
};
|
|
367573
|
-
}
|
|
367574
|
-
const limitInfo = formatLimitInfo(appliedLimit, appliedOffset);
|
|
367575
|
-
if (numFiles === 0) {
|
|
367576
|
-
return {
|
|
367577
|
-
tool_use_id: toolUseID,
|
|
367578
|
-
type: "tool_result",
|
|
367579
|
-
content: "No files found"
|
|
367580
|
-
};
|
|
367581
|
-
}
|
|
367582
|
-
const result = `Found ${numFiles} ${plural(numFiles, "file")}${limitInfo ? ` ${limitInfo}` : ""}
|
|
367583
|
-
${filenames.join(`
|
|
367584
|
-
`)}`;
|
|
367585
|
-
return {
|
|
367586
|
-
tool_use_id: toolUseID,
|
|
367587
|
-
type: "tool_result",
|
|
367588
|
-
content: result
|
|
367589
|
-
};
|
|
367590
|
-
},
|
|
367591
|
-
async call({
|
|
367592
|
-
pattern,
|
|
367593
|
-
path: path13,
|
|
367594
|
-
glob: glob2,
|
|
367595
|
-
type,
|
|
367596
|
-
output_mode = "files_with_matches",
|
|
367597
|
-
"-B": context_before,
|
|
367598
|
-
"-A": context_after,
|
|
367599
|
-
"-C": context_c,
|
|
367600
|
-
context: context5,
|
|
367601
|
-
"-n": show_line_numbers = true,
|
|
367602
|
-
"-i": case_insensitive = false,
|
|
367603
|
-
head_limit,
|
|
367604
|
-
offset = 0,
|
|
367605
|
-
multiline = false
|
|
367606
|
-
}, { abortController, getAppState }) {
|
|
367607
|
-
const absolutePath = path13 ? expandPath(path13) : getCwd();
|
|
367608
|
-
const args = ["--hidden"];
|
|
367609
|
-
for (const dir of VCS_DIRECTORIES_TO_EXCLUDE2) {
|
|
367610
|
-
args.push("--glob", `!${dir}`);
|
|
367611
|
-
}
|
|
367612
|
-
args.push("--max-columns", "500");
|
|
367613
|
-
if (multiline) {
|
|
367614
|
-
args.push("-U", "--multiline-dotall");
|
|
367615
|
-
}
|
|
367616
|
-
if (case_insensitive) {
|
|
367617
|
-
args.push("-i");
|
|
367618
|
-
}
|
|
367619
|
-
if (output_mode === "files_with_matches") {
|
|
367620
|
-
args.push("-l");
|
|
367621
|
-
} else if (output_mode === "count") {
|
|
367622
|
-
args.push("-c");
|
|
367623
|
-
}
|
|
367624
|
-
if (show_line_numbers && output_mode === "content") {
|
|
367625
|
-
args.push("-n");
|
|
367626
|
-
}
|
|
367627
|
-
if (output_mode === "content") {
|
|
367628
|
-
if (context5 !== undefined) {
|
|
367629
|
-
args.push("-C", context5.toString());
|
|
367630
|
-
} else if (context_c !== undefined) {
|
|
367631
|
-
args.push("-C", context_c.toString());
|
|
367632
|
-
} else {
|
|
367633
|
-
if (context_before !== undefined) {
|
|
367634
|
-
args.push("-B", context_before.toString());
|
|
367635
|
-
}
|
|
367636
|
-
if (context_after !== undefined) {
|
|
367637
|
-
args.push("-A", context_after.toString());
|
|
367638
|
-
}
|
|
367639
|
-
}
|
|
367640
|
-
}
|
|
367641
|
-
if (pattern.startsWith("-")) {
|
|
367642
|
-
args.push("-e", pattern);
|
|
367643
|
-
} else {
|
|
367644
|
-
args.push(pattern);
|
|
367645
|
-
}
|
|
367646
|
-
if (type) {
|
|
367647
|
-
args.push("--type", type);
|
|
367648
|
-
}
|
|
367649
|
-
if (glob2) {
|
|
367650
|
-
const globPatterns = [];
|
|
367651
|
-
const rawPatterns = glob2.split(/\s+/);
|
|
367652
|
-
for (const rawPattern of rawPatterns) {
|
|
367653
|
-
if (rawPattern.includes("{") && rawPattern.includes("}")) {
|
|
367654
|
-
globPatterns.push(rawPattern);
|
|
367655
|
-
} else {
|
|
367656
|
-
globPatterns.push(...rawPattern.split(",").filter(Boolean));
|
|
367657
|
-
}
|
|
367658
|
-
}
|
|
367659
|
-
for (const globPattern of globPatterns.filter(Boolean)) {
|
|
367660
|
-
args.push("--glob", globPattern);
|
|
367661
|
-
}
|
|
367662
|
-
}
|
|
367663
|
-
const appState = getAppState();
|
|
367664
|
-
const ignorePatterns = normalizePatternsToPath(getFileReadIgnorePatterns(appState.toolPermissionContext), getCwd());
|
|
367665
|
-
for (const ignorePattern of ignorePatterns) {
|
|
367666
|
-
const rgIgnorePattern = ignorePattern.startsWith("/") ? `!${ignorePattern}` : `!**/${ignorePattern}`;
|
|
367667
|
-
args.push("--glob", rgIgnorePattern);
|
|
367668
|
-
}
|
|
367669
|
-
for (const exclusion of await getGlobExclusionsForPluginCache(absolutePath)) {
|
|
367670
|
-
args.push("--glob", exclusion);
|
|
367671
|
-
}
|
|
367672
|
-
const results = await ripGrep(args, absolutePath, abortController.signal);
|
|
367673
|
-
if (output_mode === "content") {
|
|
367674
|
-
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
367675
|
-
const finalLines = limitedResults.map((line) => {
|
|
367676
|
-
const colonIndex = line.indexOf(":");
|
|
367677
|
-
if (colonIndex > 0) {
|
|
367678
|
-
const filePath = line.substring(0, colonIndex);
|
|
367679
|
-
const rest = line.substring(colonIndex);
|
|
367680
|
-
return toRelativePath(filePath) + rest;
|
|
367681
|
-
}
|
|
367682
|
-
return line;
|
|
367683
|
-
});
|
|
367684
|
-
const output2 = {
|
|
367685
|
-
mode: "content",
|
|
367686
|
-
numFiles: 0,
|
|
367687
|
-
filenames: [],
|
|
367688
|
-
content: finalLines.join(`
|
|
367689
|
-
`),
|
|
367690
|
-
numLines: finalLines.length,
|
|
367691
|
-
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
367692
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367693
|
-
};
|
|
367694
|
-
return { data: output2 };
|
|
367695
|
-
}
|
|
367696
|
-
if (output_mode === "count") {
|
|
367697
|
-
const { items: limitedResults, appliedLimit: appliedLimit2 } = applyHeadLimit(results, head_limit, offset);
|
|
367698
|
-
const finalCountLines = limitedResults.map((line) => {
|
|
367699
|
-
const colonIndex = line.lastIndexOf(":");
|
|
367700
|
-
if (colonIndex > 0) {
|
|
367701
|
-
const filePath = line.substring(0, colonIndex);
|
|
367702
|
-
const count4 = line.substring(colonIndex);
|
|
367703
|
-
return toRelativePath(filePath) + count4;
|
|
367704
|
-
}
|
|
367705
|
-
return line;
|
|
367706
|
-
});
|
|
367707
|
-
let totalMatches = 0;
|
|
367708
|
-
let fileCount = 0;
|
|
367709
|
-
for (const line of finalCountLines) {
|
|
367710
|
-
const colonIndex = line.lastIndexOf(":");
|
|
367711
|
-
if (colonIndex > 0) {
|
|
367712
|
-
const countStr = line.substring(colonIndex + 1);
|
|
367713
|
-
const count4 = parseInt(countStr, 10);
|
|
367714
|
-
if (!isNaN(count4)) {
|
|
367715
|
-
totalMatches += count4;
|
|
367716
|
-
fileCount += 1;
|
|
367717
|
-
}
|
|
367718
|
-
}
|
|
367719
|
-
}
|
|
367720
|
-
const output2 = {
|
|
367721
|
-
mode: "count",
|
|
367722
|
-
numFiles: fileCount,
|
|
367723
|
-
filenames: [],
|
|
367724
|
-
content: finalCountLines.join(`
|
|
367725
|
-
`),
|
|
367726
|
-
numMatches: totalMatches,
|
|
367727
|
-
...appliedLimit2 !== undefined && { appliedLimit: appliedLimit2 },
|
|
367728
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367729
|
-
};
|
|
367730
|
-
return { data: output2 };
|
|
367731
|
-
}
|
|
367732
|
-
const stats = await Promise.allSettled(results.map((_) => getFsImplementation().stat(_)));
|
|
367733
|
-
const sortedMatches = results.map((_, i3) => {
|
|
367734
|
-
const r = stats[i3];
|
|
367735
|
-
return [
|
|
367736
|
-
_,
|
|
367737
|
-
r.status === "fulfilled" ? r.value.mtimeMs ?? 0 : 0
|
|
367738
|
-
];
|
|
367739
|
-
}).sort((a2, b) => {
|
|
367740
|
-
if (false) {}
|
|
367741
|
-
const timeComparison = b[1] - a2[1];
|
|
367742
|
-
if (timeComparison === 0) {
|
|
367743
|
-
return a2[0].localeCompare(b[0]);
|
|
367744
|
-
}
|
|
367745
|
-
return timeComparison;
|
|
367746
|
-
}).map((_) => _[0]);
|
|
367747
|
-
const { items: finalMatches, appliedLimit } = applyHeadLimit(sortedMatches, head_limit, offset);
|
|
367748
|
-
const relativeMatches = finalMatches.map(toRelativePath);
|
|
367749
|
-
const output = {
|
|
367750
|
-
mode: "files_with_matches",
|
|
367751
|
-
filenames: relativeMatches,
|
|
367752
|
-
numFiles: relativeMatches.length,
|
|
367753
|
-
...appliedLimit !== undefined && { appliedLimit },
|
|
367754
|
-
...offset > 0 && { appliedOffset: offset }
|
|
367755
|
-
};
|
|
367756
|
-
return {
|
|
367757
|
-
data: output
|
|
367758
|
-
};
|
|
367759
|
-
}
|
|
367760
|
-
});
|
|
367761
|
-
});
|
|
367762
|
-
|
|
367763
367575
|
// src/tools/GlobTool/UI.tsx
|
|
367764
367576
|
function userFacingName5() {
|
|
367765
367577
|
return "Search";
|
|
@@ -367818,13 +367630,13 @@ var init_UI11 = __esm(() => {
|
|
|
367818
367630
|
init_ink2();
|
|
367819
367631
|
init_file();
|
|
367820
367632
|
init_format2();
|
|
367821
|
-
|
|
367633
|
+
init_UI10();
|
|
367822
367634
|
jsx_dev_runtime136 = __toESM(require_jsx_dev_runtime(), 1);
|
|
367823
|
-
renderToolResultMessage11 =
|
|
367635
|
+
renderToolResultMessage11 = renderToolResultMessage10;
|
|
367824
367636
|
});
|
|
367825
367637
|
|
|
367826
367638
|
// src/tools/GlobTool/GlobTool.ts
|
|
367827
|
-
var
|
|
367639
|
+
var inputSchema15, outputSchema12, GlobTool;
|
|
367828
367640
|
var init_GlobTool = __esm(() => {
|
|
367829
367641
|
init_v4();
|
|
367830
367642
|
init_Tool();
|
|
@@ -367837,11 +367649,11 @@ var init_GlobTool = __esm(() => {
|
|
|
367837
367649
|
init_filesystem();
|
|
367838
367650
|
init_shellRuleMatching();
|
|
367839
367651
|
init_UI11();
|
|
367840
|
-
|
|
367652
|
+
inputSchema15 = lazySchema(() => exports_external.strictObject({
|
|
367841
367653
|
pattern: exports_external.string().describe("The glob pattern to match files against"),
|
|
367842
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.')
|
|
367843
367655
|
}));
|
|
367844
|
-
|
|
367656
|
+
outputSchema12 = lazySchema(() => exports_external.object({
|
|
367845
367657
|
durationMs: exports_external.number().describe("Time taken to execute the search in milliseconds"),
|
|
367846
367658
|
numFiles: exports_external.number().describe("Total number of files found"),
|
|
367847
367659
|
filenames: exports_external.array(exports_external.string()).describe("Array of file paths that match the pattern"),
|
|
@@ -367861,10 +367673,10 @@ var init_GlobTool = __esm(() => {
|
|
|
367861
367673
|
return summary ? `Finding ${summary}` : "Finding files";
|
|
367862
367674
|
},
|
|
367863
367675
|
get inputSchema() {
|
|
367864
|
-
return
|
|
367676
|
+
return inputSchema15();
|
|
367865
367677
|
},
|
|
367866
367678
|
get outputSchema() {
|
|
367867
|
-
return
|
|
367679
|
+
return outputSchema12();
|
|
367868
367680
|
},
|
|
367869
367681
|
isConcurrencySafe() {
|
|
367870
367682
|
return true;
|
|
@@ -368398,7 +368210,7 @@ var init_UI12 = __esm(() => {
|
|
|
368398
368210
|
|
|
368399
368211
|
// src/tools/NotebookEditTool/NotebookEditTool.ts
|
|
368400
368212
|
import { extname as extname13, isAbsolute as isAbsolute28, resolve as resolve37 } from "path";
|
|
368401
|
-
var
|
|
368213
|
+
var inputSchema16, outputSchema13, NotebookEditTool;
|
|
368402
368214
|
var init_NotebookEditTool = __esm(() => {
|
|
368403
368215
|
init_fileHistory();
|
|
368404
368216
|
init_v4();
|
|
@@ -368413,14 +368225,14 @@ var init_NotebookEditTool = __esm(() => {
|
|
|
368413
368225
|
init_filesystem();
|
|
368414
368226
|
init_slowOperations();
|
|
368415
368227
|
init_UI12();
|
|
368416
|
-
|
|
368228
|
+
inputSchema16 = lazySchema(() => exports_external.strictObject({
|
|
368417
368229
|
notebook_path: exports_external.string().describe("The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)"),
|
|
368418
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."),
|
|
368419
368231
|
new_source: exports_external.string().describe("The new source for the cell"),
|
|
368420
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."),
|
|
368421
368233
|
edit_mode: exports_external.enum(["replace", "insert", "delete"]).optional().describe("The type of edit to make (replace, insert, delete). Defaults to replace.")
|
|
368422
368234
|
}));
|
|
368423
|
-
|
|
368235
|
+
outputSchema13 = lazySchema(() => exports_external.object({
|
|
368424
368236
|
new_source: exports_external.string().describe("The new source code that was written to the cell"),
|
|
368425
368237
|
cell_id: exports_external.string().optional().describe("The ID of the cell that was edited"),
|
|
368426
368238
|
cell_type: exports_external.enum(["code", "markdown"]).describe("The type of the cell"),
|
|
@@ -368451,10 +368263,10 @@ var init_NotebookEditTool = __esm(() => {
|
|
|
368451
368263
|
return summary ? `Editing notebook ${summary}` : "Editing notebook";
|
|
368452
368264
|
},
|
|
368453
368265
|
get inputSchema() {
|
|
368454
|
-
return
|
|
368266
|
+
return inputSchema16();
|
|
368455
368267
|
},
|
|
368456
368268
|
get outputSchema() {
|
|
368457
|
-
return
|
|
368269
|
+
return outputSchema13();
|
|
368458
368270
|
},
|
|
368459
368271
|
toAutoClassifierInput(input) {
|
|
368460
368272
|
if (false) {}
|
|
@@ -368913,21 +368725,21 @@ async function screenSize(platform4) {
|
|
|
368913
368725
|
const [width, height] = result.stdout.trim().split(/\s+/).map(Number);
|
|
368914
368726
|
return Number.isFinite(width) && Number.isFinite(height) ? { width, height } : null;
|
|
368915
368727
|
}
|
|
368916
|
-
var COMPUTER_TOOL_NAME = "Computer",
|
|
368728
|
+
var COMPUTER_TOOL_NAME = "Computer", inputSchema17, outputSchema14, ComputerTool;
|
|
368917
368729
|
var init_ComputerTool = __esm(() => {
|
|
368918
368730
|
init_v4();
|
|
368919
368731
|
init_Tool();
|
|
368920
368732
|
init_execFileNoThrow();
|
|
368921
368733
|
init_imageResizer();
|
|
368922
368734
|
init_UI13();
|
|
368923
|
-
|
|
368735
|
+
inputSchema17 = lazySchema(() => exports_external.object({
|
|
368924
368736
|
action: exports_external.enum(["screenshot", "click", "type"]).describe("What to do: read the screen, click a point, or type text"),
|
|
368925
368737
|
x: exports_external.number().int().optional().describe("X coordinate, required for click"),
|
|
368926
368738
|
y: exports_external.number().int().optional().describe("Y coordinate, required for click"),
|
|
368927
368739
|
button: exports_external.enum(["left", "right"]).optional().describe("Mouse button for click (default left)"),
|
|
368928
368740
|
text: exports_external.string().optional().describe(`Text to type, required for type (max ${MAX_TYPE_CHARS} chars)`)
|
|
368929
368741
|
}));
|
|
368930
|
-
|
|
368742
|
+
outputSchema14 = lazySchema(() => exports_external.object({
|
|
368931
368743
|
action: exports_external.string(),
|
|
368932
368744
|
ok: exports_external.boolean(),
|
|
368933
368745
|
detail: exports_external.string(),
|
|
@@ -368970,10 +368782,10 @@ var init_ComputerTool = __esm(() => {
|
|
|
368970
368782
|
return action2 === "screenshot" ? "Capturing screen" : `Desktop ${action2}`;
|
|
368971
368783
|
},
|
|
368972
368784
|
get inputSchema() {
|
|
368973
|
-
return
|
|
368785
|
+
return inputSchema17();
|
|
368974
368786
|
},
|
|
368975
368787
|
get outputSchema() {
|
|
368976
|
-
return
|
|
368788
|
+
return outputSchema14();
|
|
368977
368789
|
},
|
|
368978
368790
|
isConcurrencySafe() {
|
|
368979
368791
|
return false;
|
|
@@ -369773,7 +369585,7 @@ function buildSuggestions(ruleContent) {
|
|
|
369773
369585
|
}
|
|
369774
369586
|
];
|
|
369775
369587
|
}
|
|
369776
|
-
var
|
|
369588
|
+
var inputSchema18, outputSchema15, WebFetchTool;
|
|
369777
369589
|
var init_WebFetchTool = __esm(() => {
|
|
369778
369590
|
init_v4();
|
|
369779
369591
|
init_promptInjection();
|
|
@@ -369783,11 +369595,11 @@ var init_WebFetchTool = __esm(() => {
|
|
|
369783
369595
|
init_preapproved();
|
|
369784
369596
|
init_UI14();
|
|
369785
369597
|
init_utils11();
|
|
369786
|
-
|
|
369598
|
+
inputSchema18 = lazySchema(() => exports_external.strictObject({
|
|
369787
369599
|
url: exports_external.string().url().describe("The URL to fetch content from"),
|
|
369788
369600
|
prompt: exports_external.string().describe("The prompt to run on the fetched content")
|
|
369789
369601
|
}));
|
|
369790
|
-
|
|
369602
|
+
outputSchema15 = lazySchema(() => exports_external.object({
|
|
369791
369603
|
bytes: exports_external.number().describe("Size of the fetched content in bytes"),
|
|
369792
369604
|
code: exports_external.number().describe("HTTP response code"),
|
|
369793
369605
|
codeText: exports_external.string().describe("HTTP response code text"),
|
|
@@ -369818,10 +369630,10 @@ var init_WebFetchTool = __esm(() => {
|
|
|
369818
369630
|
return summary ? `Fetching ${summary}` : "Fetching web page";
|
|
369819
369631
|
},
|
|
369820
369632
|
get inputSchema() {
|
|
369821
|
-
return
|
|
369633
|
+
return inputSchema18();
|
|
369822
369634
|
},
|
|
369823
369635
|
get outputSchema() {
|
|
369824
|
-
return
|
|
369636
|
+
return outputSchema15();
|
|
369825
369637
|
},
|
|
369826
369638
|
isConcurrencySafe() {
|
|
369827
369639
|
return true;
|
|
@@ -370048,12 +369860,12 @@ async function dispatch(input) {
|
|
|
370048
369860
|
return { success: false, error: `unsupported action: ${input.action}` };
|
|
370049
369861
|
}
|
|
370050
369862
|
}
|
|
370051
|
-
var GITHUB_TOOL_NAME = "GitHub",
|
|
369863
|
+
var GITHUB_TOOL_NAME = "GitHub", inputSchema19, outputSchema16, GitHubTool;
|
|
370052
369864
|
var init_GitHubTool = __esm(() => {
|
|
370053
369865
|
init_v4();
|
|
370054
369866
|
init_Tool();
|
|
370055
369867
|
init_execFileNoThrow();
|
|
370056
|
-
|
|
369868
|
+
inputSchema19 = lazySchema(() => exports_external.strictObject({
|
|
370057
369869
|
action: exports_external.enum([
|
|
370058
369870
|
"pr_list",
|
|
370059
369871
|
"pr_view",
|
|
@@ -370073,7 +369885,7 @@ var init_GitHubTool = __esm(() => {
|
|
|
370073
369885
|
limit: exports_external.number().int().optional().describe("Maximum results to return"),
|
|
370074
369886
|
draft: exports_external.boolean().optional().describe("Create PR as draft")
|
|
370075
369887
|
}));
|
|
370076
|
-
|
|
369888
|
+
outputSchema16 = lazySchema(() => exports_external.object({
|
|
370077
369889
|
success: exports_external.boolean(),
|
|
370078
369890
|
stdout: exports_external.string().optional(),
|
|
370079
369891
|
stderr: exports_external.string().optional(),
|
|
@@ -370094,10 +369906,10 @@ var init_GitHubTool = __esm(() => {
|
|
|
370094
369906
|
return "GitHub";
|
|
370095
369907
|
},
|
|
370096
369908
|
get inputSchema() {
|
|
370097
|
-
return
|
|
369909
|
+
return inputSchema19();
|
|
370098
369910
|
},
|
|
370099
369911
|
get outputSchema() {
|
|
370100
|
-
return
|
|
369912
|
+
return outputSchema16();
|
|
370101
369913
|
},
|
|
370102
369914
|
isConcurrencySafe() {
|
|
370103
369915
|
return false;
|
|
@@ -370184,13 +369996,13 @@ function containsSensitiveRequestData(input) {
|
|
|
370184
369996
|
return true;
|
|
370185
369997
|
}
|
|
370186
369998
|
}
|
|
370187
|
-
var API_TOOL_NAME = "Api",
|
|
369999
|
+
var API_TOOL_NAME = "Api", inputSchema20, outputSchema17, SENSITIVE_HEADER, SENSITIVE_QUERY_KEY, MAX_RESPONSE_BYTES, ApiTool;
|
|
370188
370000
|
var init_ApiTool = __esm(() => {
|
|
370189
370001
|
init_v4();
|
|
370190
370002
|
init_Tool();
|
|
370191
370003
|
init_preapproved();
|
|
370192
370004
|
init_utils11();
|
|
370193
|
-
|
|
370005
|
+
inputSchema20 = lazySchema(() => exports_external.strictObject({
|
|
370194
370006
|
url: exports_external.string().url().describe("The URL to call"),
|
|
370195
370007
|
method: exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").describe("HTTP method"),
|
|
370196
370008
|
headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Additional request headers"),
|
|
@@ -370198,7 +370010,7 @@ var init_ApiTool = __esm(() => {
|
|
|
370198
370010
|
timeout: exports_external.number().int().min(1).max(300).optional().describe("Request timeout in seconds (max 300)"),
|
|
370199
370011
|
extract: exports_external.string().optional().describe("Optional dotted path to extract from JSON response")
|
|
370200
370012
|
}));
|
|
370201
|
-
|
|
370013
|
+
outputSchema17 = lazySchema(() => exports_external.object({
|
|
370202
370014
|
status: exports_external.number(),
|
|
370203
370015
|
statusText: exports_external.string(),
|
|
370204
370016
|
headers: exports_external.record(exports_external.string(), exports_external.string()),
|
|
@@ -370228,10 +370040,10 @@ var init_ApiTool = __esm(() => {
|
|
|
370228
370040
|
return "API";
|
|
370229
370041
|
},
|
|
370230
370042
|
get inputSchema() {
|
|
370231
|
-
return
|
|
370043
|
+
return inputSchema20();
|
|
370232
370044
|
},
|
|
370233
370045
|
get outputSchema() {
|
|
370234
|
-
return
|
|
370046
|
+
return outputSchema17();
|
|
370235
370047
|
},
|
|
370236
370048
|
isConcurrencySafe() {
|
|
370237
370049
|
return true;
|
|
@@ -370490,20 +370302,20 @@ async function dispatch2(input) {
|
|
|
370490
370302
|
}
|
|
370491
370303
|
return runPlaywright(input);
|
|
370492
370304
|
}
|
|
370493
|
-
var BROWSER_TOOL_NAME = "Browser",
|
|
370305
|
+
var BROWSER_TOOL_NAME = "Browser", inputSchema21, outputSchema18, activeSession, sessionPromise, playwrightModule = null, BrowserTool;
|
|
370494
370306
|
var init_BrowserTool = __esm(() => {
|
|
370495
370307
|
init_v4();
|
|
370496
370308
|
init_Tool();
|
|
370497
370309
|
init_envUtils();
|
|
370498
370310
|
init_utils11();
|
|
370499
|
-
|
|
370311
|
+
inputSchema21 = lazySchema(() => exports_external.strictObject({
|
|
370500
370312
|
url: exports_external.string().url().optional().describe("The URL to navigate to or fetch (required except for close)"),
|
|
370501
370313
|
action: exports_external.enum(["goto", "click", "type", "screenshot", "evaluate", "close", "fetch"]).default("fetch").describe("Browser action to perform"),
|
|
370502
370314
|
selector: exports_external.string().optional().describe("CSS selector for click/type actions"),
|
|
370503
370315
|
text: exports_external.string().optional().describe("Text to type"),
|
|
370504
370316
|
expression: exports_external.string().optional().describe("JavaScript expression to evaluate in the page")
|
|
370505
370317
|
}));
|
|
370506
|
-
|
|
370318
|
+
outputSchema18 = lazySchema(() => exports_external.object({
|
|
370507
370319
|
success: exports_external.boolean(),
|
|
370508
370320
|
url: exports_external.string().optional(),
|
|
370509
370321
|
title: exports_external.string().optional(),
|
|
@@ -370533,10 +370345,10 @@ var init_BrowserTool = __esm(() => {
|
|
|
370533
370345
|
return "Browser";
|
|
370534
370346
|
},
|
|
370535
370347
|
get inputSchema() {
|
|
370536
|
-
return
|
|
370348
|
+
return inputSchema21();
|
|
370537
370349
|
},
|
|
370538
370350
|
get outputSchema() {
|
|
370539
|
-
return
|
|
370351
|
+
return outputSchema18();
|
|
370540
370352
|
},
|
|
370541
370353
|
isConcurrencySafe() {
|
|
370542
370354
|
return false;
|
|
@@ -370659,12 +370471,12 @@ async function dispatch3(input) {
|
|
|
370659
370471
|
return { success: false, error: `unsupported action: ${input.action}` };
|
|
370660
370472
|
}
|
|
370661
370473
|
}
|
|
370662
|
-
var DOCKER_TOOL_NAME = "Docker",
|
|
370474
|
+
var DOCKER_TOOL_NAME = "Docker", inputSchema22, outputSchema19, READ_ONLY_ACTIONS, DESTRUCTIVE_ACTIONS, DockerTool;
|
|
370663
370475
|
var init_DockerTool = __esm(() => {
|
|
370664
370476
|
init_v4();
|
|
370665
370477
|
init_Tool();
|
|
370666
370478
|
init_execFileNoThrow();
|
|
370667
|
-
|
|
370479
|
+
inputSchema22 = lazySchema(() => exports_external.strictObject({
|
|
370668
370480
|
action: exports_external.enum([
|
|
370669
370481
|
"ps",
|
|
370670
370482
|
"build",
|
|
@@ -370683,7 +370495,7 @@ var init_DockerTool = __esm(() => {
|
|
|
370683
370495
|
file: exports_external.string().optional().describe("Dockerfile path for build"),
|
|
370684
370496
|
detach: exports_external.boolean().optional().describe("Run container in background")
|
|
370685
370497
|
}));
|
|
370686
|
-
|
|
370498
|
+
outputSchema19 = lazySchema(() => exports_external.object({
|
|
370687
370499
|
success: exports_external.boolean(),
|
|
370688
370500
|
stdout: exports_external.string().optional(),
|
|
370689
370501
|
stderr: exports_external.string().optional(),
|
|
@@ -370706,10 +370518,10 @@ var init_DockerTool = __esm(() => {
|
|
|
370706
370518
|
return "Docker";
|
|
370707
370519
|
},
|
|
370708
370520
|
get inputSchema() {
|
|
370709
|
-
return
|
|
370521
|
+
return inputSchema22();
|
|
370710
370522
|
},
|
|
370711
370523
|
get outputSchema() {
|
|
370712
|
-
return
|
|
370524
|
+
return outputSchema19();
|
|
370713
370525
|
},
|
|
370714
370526
|
isConcurrencySafe() {
|
|
370715
370527
|
return false;
|
|
@@ -370783,19 +370595,19 @@ function buildCommand(input, cwd2) {
|
|
|
370783
370595
|
}
|
|
370784
370596
|
return "bun test";
|
|
370785
370597
|
}
|
|
370786
|
-
var TEST_RUNNER_TOOL_NAME = "TestRunner",
|
|
370598
|
+
var TEST_RUNNER_TOOL_NAME = "TestRunner", inputSchema23, outputSchema20, TestRunnerTool;
|
|
370787
370599
|
var init_TestRunnerTool = __esm(() => {
|
|
370788
370600
|
init_v4();
|
|
370789
370601
|
init_Tool();
|
|
370790
370602
|
init_cwd2();
|
|
370791
370603
|
init_BashTool();
|
|
370792
|
-
|
|
370604
|
+
inputSchema23 = lazySchema(() => exports_external.strictObject({
|
|
370793
370605
|
command: exports_external.string().optional().describe("Explicit test command to run"),
|
|
370794
370606
|
pattern: exports_external.string().optional().describe("Optional file pattern to pass to the test runner"),
|
|
370795
370607
|
timeout: exports_external.number().int().min(1).max(600).optional().describe("Timeout in seconds (max 600)"),
|
|
370796
370608
|
watch: exports_external.boolean().optional().describe("Run in watch mode (not supported for all runners)")
|
|
370797
370609
|
}));
|
|
370798
|
-
|
|
370610
|
+
outputSchema20 = lazySchema(() => exports_external.object({
|
|
370799
370611
|
success: exports_external.boolean(),
|
|
370800
370612
|
command: exports_external.string(),
|
|
370801
370613
|
stdout: exports_external.string().optional(),
|
|
@@ -370817,10 +370629,10 @@ var init_TestRunnerTool = __esm(() => {
|
|
|
370817
370629
|
return "TestRunner";
|
|
370818
370630
|
},
|
|
370819
370631
|
get inputSchema() {
|
|
370820
|
-
return
|
|
370632
|
+
return inputSchema23();
|
|
370821
370633
|
},
|
|
370822
370634
|
get outputSchema() {
|
|
370823
|
-
return
|
|
370635
|
+
return outputSchema20();
|
|
370824
370636
|
},
|
|
370825
370637
|
isConcurrencySafe() {
|
|
370826
370638
|
return false;
|
|
@@ -370970,18 +370782,18 @@ async function dispatch4(input) {
|
|
|
370970
370782
|
return { success: false, error: `unsupported connection: ${input.connection}` };
|
|
370971
370783
|
}
|
|
370972
370784
|
}
|
|
370973
|
-
var DATABASE_TOOL_NAME = "Database",
|
|
370785
|
+
var DATABASE_TOOL_NAME = "Database", inputSchema24, outputSchema21, WRITE_KEYWORDS, WRITE_PRAGMAS, DatabaseTool;
|
|
370974
370786
|
var init_DatabaseTool = __esm(() => {
|
|
370975
370787
|
init_v4();
|
|
370976
370788
|
init_Tool();
|
|
370977
370789
|
init_execFileNoThrow();
|
|
370978
|
-
|
|
370790
|
+
inputSchema24 = lazySchema(() => exports_external.strictObject({
|
|
370979
370791
|
connection: exports_external.enum(["sqlite", "postgres", "mysql", "duckdb"]).describe("Database type"),
|
|
370980
370792
|
database: exports_external.string().describe("Database file path or connection string"),
|
|
370981
370793
|
query: exports_external.string().describe("SQL query to execute"),
|
|
370982
370794
|
readonly: exports_external.boolean().default(true).describe("Allow only SELECT or read-only queries")
|
|
370983
370795
|
}));
|
|
370984
|
-
|
|
370796
|
+
outputSchema21 = lazySchema(() => exports_external.object({
|
|
370985
370797
|
success: exports_external.boolean(),
|
|
370986
370798
|
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).optional(),
|
|
370987
370799
|
stdout: exports_external.string().optional(),
|
|
@@ -371005,10 +370817,10 @@ var init_DatabaseTool = __esm(() => {
|
|
|
371005
370817
|
return "Database";
|
|
371006
370818
|
},
|
|
371007
370819
|
get inputSchema() {
|
|
371008
|
-
return
|
|
370820
|
+
return inputSchema24();
|
|
371009
370821
|
},
|
|
371010
370822
|
get outputSchema() {
|
|
371011
|
-
return
|
|
370823
|
+
return outputSchema21();
|
|
371012
370824
|
},
|
|
371013
370825
|
isConcurrencySafe() {
|
|
371014
370826
|
return false;
|
|
@@ -371358,18 +371170,18 @@ var init_UI15 = __esm(() => {
|
|
|
371358
371170
|
});
|
|
371359
371171
|
|
|
371360
371172
|
// src/tools/TaskStopTool/TaskStopTool.ts
|
|
371361
|
-
var
|
|
371173
|
+
var inputSchema25, outputSchema22, TaskStopTool;
|
|
371362
371174
|
var init_TaskStopTool = __esm(() => {
|
|
371363
371175
|
init_v4();
|
|
371364
371176
|
init_Tool();
|
|
371365
371177
|
init_stopTask();
|
|
371366
371178
|
init_slowOperations();
|
|
371367
371179
|
init_UI15();
|
|
371368
|
-
|
|
371180
|
+
inputSchema25 = lazySchema(() => exports_external.strictObject({
|
|
371369
371181
|
task_id: exports_external.string().optional().describe("The ID of the background task to stop"),
|
|
371370
371182
|
shell_id: exports_external.string().optional().describe("Deprecated: use task_id instead")
|
|
371371
371183
|
}));
|
|
371372
|
-
|
|
371184
|
+
outputSchema22 = lazySchema(() => exports_external.object({
|
|
371373
371185
|
message: exports_external.string().describe("Status message about the operation"),
|
|
371374
371186
|
task_id: exports_external.string().describe("The ID of the task that was stopped"),
|
|
371375
371187
|
task_type: exports_external.string().describe("The type of the task that was stopped"),
|
|
@@ -371382,10 +371194,10 @@ var init_TaskStopTool = __esm(() => {
|
|
|
371382
371194
|
maxResultSizeChars: 1e5,
|
|
371383
371195
|
userFacingName: () => process.env.USER_TYPE === "ant" ? "" : "Stop Task",
|
|
371384
371196
|
get inputSchema() {
|
|
371385
|
-
return
|
|
371197
|
+
return inputSchema25();
|
|
371386
371198
|
},
|
|
371387
371199
|
get outputSchema() {
|
|
371388
|
-
return
|
|
371200
|
+
return outputSchema22();
|
|
371389
371201
|
},
|
|
371390
371202
|
shouldDefer: true,
|
|
371391
371203
|
isConcurrencySafe() {
|
|
@@ -371710,7 +371522,7 @@ function isBriefEntitled() {
|
|
|
371710
371522
|
function isBriefEnabled() {
|
|
371711
371523
|
return false;
|
|
371712
371524
|
}
|
|
371713
|
-
var
|
|
371525
|
+
var inputSchema26, outputSchema23, KAIROS_BRIEF_REFRESH_MS, BriefTool;
|
|
371714
371526
|
var init_BriefTool = __esm(() => {
|
|
371715
371527
|
init_v4();
|
|
371716
371528
|
init_state();
|
|
@@ -371722,12 +371534,12 @@ var init_BriefTool = __esm(() => {
|
|
|
371722
371534
|
init_attachments();
|
|
371723
371535
|
init_prompt14();
|
|
371724
371536
|
init_UI16();
|
|
371725
|
-
|
|
371537
|
+
inputSchema26 = lazySchema(() => exports_external.strictObject({
|
|
371726
371538
|
message: exports_external.string().describe("The message for the user. Supports markdown formatting."),
|
|
371727
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."),
|
|
371728
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.")
|
|
371729
371541
|
}));
|
|
371730
|
-
|
|
371542
|
+
outputSchema23 = lazySchema(() => exports_external.object({
|
|
371731
371543
|
message: exports_external.string().describe("The message"),
|
|
371732
371544
|
attachments: exports_external.array(exports_external.object({
|
|
371733
371545
|
path: exports_external.string(),
|
|
@@ -371747,10 +371559,10 @@ var init_BriefTool = __esm(() => {
|
|
|
371747
371559
|
return "";
|
|
371748
371560
|
},
|
|
371749
371561
|
get inputSchema() {
|
|
371750
|
-
return
|
|
371562
|
+
return inputSchema26();
|
|
371751
371563
|
},
|
|
371752
371564
|
get outputSchema() {
|
|
371753
|
-
return
|
|
371565
|
+
return outputSchema23();
|
|
371754
371566
|
},
|
|
371755
371567
|
isEnabled() {
|
|
371756
371568
|
return isBriefEnabled();
|
|
@@ -372263,7 +372075,7 @@ function TaskOutputResultDisplay(t0) {
|
|
|
372263
372075
|
}
|
|
372264
372076
|
return t5;
|
|
372265
372077
|
}
|
|
372266
|
-
var import_compiler_runtime114, jsx_dev_runtime143,
|
|
372078
|
+
var import_compiler_runtime114, jsx_dev_runtime143, inputSchema27, TaskOutputTool;
|
|
372267
372079
|
var init_TaskOutputTool = __esm(() => {
|
|
372268
372080
|
init_v4();
|
|
372269
372081
|
init_FallbackToolUseErrorMessage();
|
|
@@ -372284,7 +372096,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
372284
372096
|
init_BashToolResultMessage();
|
|
372285
372097
|
import_compiler_runtime114 = __toESM(require_compiler_runtime(), 1);
|
|
372286
372098
|
jsx_dev_runtime143 = __toESM(require_jsx_dev_runtime(), 1);
|
|
372287
|
-
|
|
372099
|
+
inputSchema27 = lazySchema(() => exports_external.strictObject({
|
|
372288
372100
|
task_id: exports_external.string().describe("The task ID to get output from"),
|
|
372289
372101
|
block: semanticBoolean(exports_external.boolean().default(true)).describe("Whether to wait for completion"),
|
|
372290
372102
|
timeout: exports_external.number().min(0).max(600000).default(30000).describe("Max wait time in ms")
|
|
@@ -372299,7 +372111,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
372299
372111
|
return "Task Output";
|
|
372300
372112
|
},
|
|
372301
372113
|
get inputSchema() {
|
|
372302
|
-
return
|
|
372114
|
+
return inputSchema27();
|
|
372303
372115
|
},
|
|
372304
372116
|
async description() {
|
|
372305
372117
|
return "[Deprecated] \u2014 prefer Read on the task output file path";
|
|
@@ -372691,7 +372503,7 @@ function makeOutputFromSearchResponse(result, query2, durationSeconds) {
|
|
|
372691
372503
|
durationSeconds
|
|
372692
372504
|
};
|
|
372693
372505
|
}
|
|
372694
|
-
var
|
|
372506
|
+
var inputSchema28, searchResultSchema, outputSchema24, WebSearchTool;
|
|
372695
372507
|
var init_WebSearchTool = __esm(() => {
|
|
372696
372508
|
init_promptInjection();
|
|
372697
372509
|
init_providers();
|
|
@@ -372706,7 +372518,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372706
372518
|
init_slowOperations();
|
|
372707
372519
|
init_prompt5();
|
|
372708
372520
|
init_UI17();
|
|
372709
|
-
|
|
372521
|
+
inputSchema28 = lazySchema(() => exports_external.strictObject({
|
|
372710
372522
|
query: exports_external.string().min(2).describe("The search query to use"),
|
|
372711
372523
|
allowed_domains: exports_external.array(exports_external.string()).optional().describe("Only include search results from these domains"),
|
|
372712
372524
|
blocked_domains: exports_external.array(exports_external.string()).optional().describe("Never include search results from these domains")
|
|
@@ -372721,7 +372533,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372721
372533
|
content: exports_external.array(searchHitSchema).describe("Array of search hits")
|
|
372722
372534
|
});
|
|
372723
372535
|
});
|
|
372724
|
-
|
|
372536
|
+
outputSchema24 = lazySchema(() => exports_external.object({
|
|
372725
372537
|
query: exports_external.string().describe("The search query that was executed"),
|
|
372726
372538
|
results: exports_external.array(exports_external.union([searchResultSchema(), exports_external.string()])).describe("Search results and/or text commentary from the model"),
|
|
372727
372539
|
durationSeconds: exports_external.number().describe("Time taken to complete the search operation")
|
|
@@ -372757,10 +372569,10 @@ var init_WebSearchTool = __esm(() => {
|
|
|
372757
372569
|
return false;
|
|
372758
372570
|
},
|
|
372759
372571
|
get inputSchema() {
|
|
372760
|
-
return
|
|
372572
|
+
return inputSchema28();
|
|
372761
372573
|
},
|
|
372762
372574
|
get outputSchema() {
|
|
372763
|
-
return
|
|
372575
|
+
return outputSchema24();
|
|
372764
372576
|
},
|
|
372765
372577
|
isConcurrencySafe() {
|
|
372766
372578
|
return true;
|
|
@@ -373167,7 +372979,7 @@ var init_UI18 = __esm(() => {
|
|
|
373167
372979
|
|
|
373168
372980
|
// src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
|
|
373169
372981
|
import { writeFile as writeFile21 } from "fs/promises";
|
|
373170
|
-
function
|
|
372982
|
+
function objectValue4(value) {
|
|
373171
372983
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
373172
372984
|
}
|
|
373173
372985
|
function isBashToolName(value) {
|
|
@@ -373187,7 +372999,7 @@ function normalizeAllowedPromptItem(value) {
|
|
|
373187
372999
|
const prompt2 = value.trim();
|
|
373188
373000
|
return prompt2 ? [{ tool: "Bash", prompt: prompt2 }] : [];
|
|
373189
373001
|
}
|
|
373190
|
-
const item =
|
|
373002
|
+
const item = objectValue4(value);
|
|
373191
373003
|
if (!item || !isBashToolName(item.tool))
|
|
373192
373004
|
return [];
|
|
373193
373005
|
const prompt = promptTextFromObject(item);
|
|
@@ -373202,7 +373014,7 @@ function normalizeAllowedPromptsValue(value) {
|
|
|
373202
373014
|
return normalizeAllowedPromptItem(value);
|
|
373203
373015
|
if (Array.isArray(value))
|
|
373204
373016
|
return value.flatMap(normalizeAllowedPromptItem);
|
|
373205
|
-
const prompts =
|
|
373017
|
+
const prompts = objectValue4(value);
|
|
373206
373018
|
if (!prompts)
|
|
373207
373019
|
return [];
|
|
373208
373020
|
const prompt = promptTextFromObject(prompts);
|
|
@@ -373215,7 +373027,7 @@ function normalizeAllowedPromptsValue(value) {
|
|
|
373215
373027
|
});
|
|
373216
373028
|
}
|
|
373217
373029
|
function normalizeExitPlanModeInput(value) {
|
|
373218
|
-
const input =
|
|
373030
|
+
const input = objectValue4(value);
|
|
373219
373031
|
if (!input)
|
|
373220
373032
|
return value;
|
|
373221
373033
|
const rawAllowedPrompts = input.allowedPrompts ?? input.allowed_prompts ?? input.prompts ?? input.permissions;
|
|
@@ -373224,7 +373036,7 @@ function normalizeExitPlanModeInput(value) {
|
|
|
373224
373036
|
allowedPrompts: normalizeAllowedPromptsValue(rawAllowedPrompts)
|
|
373225
373037
|
};
|
|
373226
373038
|
}
|
|
373227
|
-
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema,
|
|
373039
|
+
var permissionSetupModule = null, allowedPromptSchema, allowedPromptsSchema, inputObjectSchema, inputSchema29, _sdkInputSchema, outputSchema25, ExitPlanModeV2Tool;
|
|
373228
373040
|
var init_ExitPlanModeV2Tool = __esm(() => {
|
|
373229
373041
|
init_v4();
|
|
373230
373042
|
init_state();
|
|
@@ -373249,12 +373061,12 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
373249
373061
|
inputObjectSchema = lazySchema(() => exports_external.strictObject({
|
|
373250
373062
|
allowedPrompts: allowedPromptsSchema().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")
|
|
373251
373063
|
}).passthrough());
|
|
373252
|
-
|
|
373064
|
+
inputSchema29 = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema()));
|
|
373253
373065
|
_sdkInputSchema = lazySchema(() => exports_external.preprocess(normalizeExitPlanModeInput, inputObjectSchema().extend({
|
|
373254
373066
|
plan: exports_external.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),
|
|
373255
373067
|
planFilePath: exports_external.string().optional().describe("The plan file path (injected by normalizeToolInput)")
|
|
373256
373068
|
})));
|
|
373257
|
-
|
|
373069
|
+
outputSchema25 = lazySchema(() => exports_external.object({
|
|
373258
373070
|
plan: exports_external.string().nullable().describe("The plan that was presented to the user"),
|
|
373259
373071
|
isAgent: exports_external.boolean(),
|
|
373260
373072
|
filePath: exports_external.string().optional().describe("The file path where the plan was saved"),
|
|
@@ -373275,10 +373087,10 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
373275
373087
|
return EXIT_PLAN_MODE_V2_TOOL_PROMPT;
|
|
373276
373088
|
},
|
|
373277
373089
|
get inputSchema() {
|
|
373278
|
-
return
|
|
373090
|
+
return inputSchema29();
|
|
373279
373091
|
},
|
|
373280
373092
|
get outputSchema() {
|
|
373281
|
-
return
|
|
373093
|
+
return outputSchema25();
|
|
373282
373094
|
},
|
|
373283
373095
|
userFacingName() {
|
|
373284
373096
|
return "";
|
|
@@ -373507,11 +373319,11 @@ ${plan}`,
|
|
|
373507
373319
|
});
|
|
373508
373320
|
|
|
373509
373321
|
// src/tools/testing/TestingPermissionTool.tsx
|
|
373510
|
-
var NAME = "TestingPermission",
|
|
373322
|
+
var NAME = "TestingPermission", inputSchema30, TestingPermissionTool;
|
|
373511
373323
|
var init_TestingPermissionTool = __esm(() => {
|
|
373512
373324
|
init_v4();
|
|
373513
373325
|
init_Tool();
|
|
373514
|
-
|
|
373326
|
+
inputSchema30 = lazySchema(() => exports_external.strictObject({}));
|
|
373515
373327
|
TestingPermissionTool = buildTool({
|
|
373516
373328
|
name: NAME,
|
|
373517
373329
|
maxResultSizeChars: 1e5,
|
|
@@ -373522,7 +373334,7 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
373522
373334
|
return "Test tool that always asks for permission before executing. Used for end-to-end testing.";
|
|
373523
373335
|
},
|
|
373524
373336
|
get inputSchema() {
|
|
373525
|
-
return
|
|
373337
|
+
return inputSchema30();
|
|
373526
373338
|
},
|
|
373527
373339
|
userFacingName() {
|
|
373528
373340
|
return "TestingPermission";
|
|
@@ -373575,6 +373387,387 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
373575
373387
|
});
|
|
373576
373388
|
});
|
|
373577
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
|
+
|
|
373578
373771
|
// src/utils/codeIndex/embeddings.ts
|
|
373579
373772
|
function getEmbeddingModel(env4 = process.env) {
|
|
373580
373773
|
return (env4.UR_CODE_INDEX_EMBED_MODEL || "").trim() || DEFAULT_EMBED_MODEL;
|
|
@@ -376583,10 +376776,10 @@ function DANGEROUS_uncachedSystemPromptSection(name, compute, _reason) {
|
|
|
376583
376776
|
return { name, compute, cacheBreak: true };
|
|
376584
376777
|
}
|
|
376585
376778
|
async function resolveSystemPromptSections(sections) {
|
|
376586
|
-
const
|
|
376779
|
+
const cache4 = getSystemPromptSectionCache();
|
|
376587
376780
|
return Promise.all(sections.map(async (s) => {
|
|
376588
|
-
if (!s.cacheBreak &&
|
|
376589
|
-
return
|
|
376781
|
+
if (!s.cacheBreak && cache4.has(s.name)) {
|
|
376782
|
+
return cache4.get(s.name) ?? null;
|
|
376590
376783
|
}
|
|
376591
376784
|
const value = await s.compute();
|
|
376592
376785
|
setSystemPromptSectionCacheEntry(s.name, value);
|
|
@@ -389153,7 +389346,7 @@ function isAnyTracingEnabled() {
|
|
|
389153
389346
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
389154
389347
|
}
|
|
389155
389348
|
function getTracer() {
|
|
389156
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
389349
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.3");
|
|
389157
389350
|
}
|
|
389158
389351
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
389159
389352
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -398488,21 +398681,6 @@ var init_analyzeContext = __esm(() => {
|
|
|
398488
398681
|
init_tokens();
|
|
398489
398682
|
});
|
|
398490
398683
|
|
|
398491
|
-
// src/utils/zodToJsonSchema.ts
|
|
398492
|
-
function zodToJsonSchema3(schema) {
|
|
398493
|
-
const hit = cache3.get(schema);
|
|
398494
|
-
if (hit)
|
|
398495
|
-
return hit;
|
|
398496
|
-
const result = toJSONSchema(schema);
|
|
398497
|
-
cache3.set(schema, result);
|
|
398498
|
-
return result;
|
|
398499
|
-
}
|
|
398500
|
-
var cache3;
|
|
398501
|
-
var init_zodToJsonSchema2 = __esm(() => {
|
|
398502
|
-
init_v4();
|
|
398503
|
-
cache3 = new WeakMap;
|
|
398504
|
-
});
|
|
398505
|
-
|
|
398506
398684
|
// src/utils/toolSearch.ts
|
|
398507
398685
|
var exports_toolSearch = {};
|
|
398508
398686
|
__export(exports_toolSearch, {
|
|
@@ -398636,7 +398814,7 @@ async function calculateDeferredToolDescriptionChars(tools, getToolPermissionCon
|
|
|
398636
398814
|
tools,
|
|
398637
398815
|
agents
|
|
398638
398816
|
});
|
|
398639
|
-
const inputSchema46 = tool.inputJSONSchema ? jsonStringify(tool.inputJSONSchema) : tool.inputSchema ? jsonStringify(
|
|
398817
|
+
const inputSchema46 = tool.inputJSONSchema ? jsonStringify(tool.inputJSONSchema) : tool.inputSchema ? jsonStringify(zodToJsonSchema(tool.inputSchema)) : "";
|
|
398640
398818
|
return tool.name.length + description.length + inputSchema46.length;
|
|
398641
398819
|
}));
|
|
398642
398820
|
return sizes.reduce((total, size) => total + size, 0);
|
|
@@ -398810,7 +398988,7 @@ var init_toolSearch = __esm(() => {
|
|
|
398810
398988
|
init_envUtils();
|
|
398811
398989
|
init_providers();
|
|
398812
398990
|
init_slowOperations();
|
|
398813
|
-
|
|
398991
|
+
init_zodToJsonSchema();
|
|
398814
398992
|
getDeferredToolTokenCount = memoize_default(async (tools, getToolPermissionContext, agents, model) => {
|
|
398815
398993
|
const deferredTools = tools.filter((t) => isDeferredTool(t));
|
|
398816
398994
|
if (deferredTools.length === 0)
|
|
@@ -419337,7 +419515,7 @@ function Feedback({
|
|
|
419337
419515
|
platform: env2.platform,
|
|
419338
419516
|
gitRepo: envInfo.isGit,
|
|
419339
419517
|
terminal: env2.terminal,
|
|
419340
|
-
version: "1.76.
|
|
419518
|
+
version: "1.76.3",
|
|
419341
419519
|
transcript: normalizeMessagesForAPI(messages),
|
|
419342
419520
|
errors: sanitizedErrors,
|
|
419343
419521
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -419529,7 +419707,7 @@ function Feedback({
|
|
|
419529
419707
|
", ",
|
|
419530
419708
|
env2.terminal,
|
|
419531
419709
|
", v",
|
|
419532
|
-
"1.76.
|
|
419710
|
+
"1.76.3"
|
|
419533
419711
|
]
|
|
419534
419712
|
}, undefined, true, undefined, this)
|
|
419535
419713
|
]
|
|
@@ -419635,7 +419813,7 @@ ${sanitizedDescription}
|
|
|
419635
419813
|
` + `**Environment Info**
|
|
419636
419814
|
` + `- Platform: ${env2.platform}
|
|
419637
419815
|
` + `- Terminal: ${env2.terminal}
|
|
419638
|
-
` + `- Version: ${"1.76.
|
|
419816
|
+
` + `- Version: ${"1.76.3"}
|
|
419639
419817
|
` + `- Feedback ID: ${feedbackId}
|
|
419640
419818
|
` + `
|
|
419641
419819
|
**Errors**
|
|
@@ -422745,7 +422923,7 @@ function buildPrimarySection() {
|
|
|
422745
422923
|
}, undefined, false, undefined, this);
|
|
422746
422924
|
return [{
|
|
422747
422925
|
label: "Version",
|
|
422748
|
-
value: "1.76.
|
|
422926
|
+
value: "1.76.3"
|
|
422749
422927
|
}, {
|
|
422750
422928
|
label: "Session name",
|
|
422751
422929
|
value: nameValue
|
|
@@ -426127,7 +426305,7 @@ function Config({
|
|
|
426127
426305
|
}
|
|
426128
426306
|
}, undefined, false, undefined, this)
|
|
426129
426307
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
426130
|
-
currentVersion: "1.76.
|
|
426308
|
+
currentVersion: "1.76.3",
|
|
426131
426309
|
onChoice: (choice) => {
|
|
426132
426310
|
setShowSubmenu(null);
|
|
426133
426311
|
setTabsHidden(false);
|
|
@@ -426139,7 +426317,7 @@ function Config({
|
|
|
426139
426317
|
autoUpdatesChannel: "stable"
|
|
426140
426318
|
};
|
|
426141
426319
|
if (choice === "stay") {
|
|
426142
|
-
newSettings.minimumVersion = "1.76.
|
|
426320
|
+
newSettings.minimumVersion = "1.76.3";
|
|
426143
426321
|
}
|
|
426144
426322
|
updateSettingsForSource("userSettings", newSettings);
|
|
426145
426323
|
setSettingsData((prev_27) => ({
|
|
@@ -434203,7 +434381,7 @@ function HelpV2(t0) {
|
|
|
434203
434381
|
let t6;
|
|
434204
434382
|
if ($2[31] !== tabs) {
|
|
434205
434383
|
t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
|
|
434206
|
-
title: `UR v${"1.76.
|
|
434384
|
+
title: `UR v${"1.76.3"}`,
|
|
434207
434385
|
color: "professionalBlue",
|
|
434208
434386
|
defaultTab: "general",
|
|
434209
434387
|
children: tabs
|
|
@@ -434942,12 +435120,12 @@ async function parseMcpToolArguments(tool, input, maxInputChars = Number.POSITIV
|
|
|
434942
435120
|
async function describeMcpTool(tool, tools, toolPermissionContext) {
|
|
434943
435121
|
let outputSchema40;
|
|
434944
435122
|
if (tool.outputSchema) {
|
|
434945
|
-
const converted =
|
|
435123
|
+
const converted = zodToJsonSchema(tool.outputSchema);
|
|
434946
435124
|
if (typeof converted === "object" && converted !== null && "type" in converted && converted.type === "object") {
|
|
434947
435125
|
outputSchema40 = converted;
|
|
434948
435126
|
}
|
|
434949
435127
|
}
|
|
434950
|
-
const inputSchema47 = tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
435128
|
+
const inputSchema47 = tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
434951
435129
|
return {
|
|
434952
435130
|
name: tool.name,
|
|
434953
435131
|
description: await tool.prompt({
|
|
@@ -434995,7 +435173,7 @@ async function formatMcpToolResult(tool, result, maxOutputChars) {
|
|
|
434995
435173
|
}
|
|
434996
435174
|
var init_mcpToolAdapter = __esm(() => {
|
|
434997
435175
|
init_slowOperations();
|
|
434998
|
-
|
|
435176
|
+
init_zodToJsonSchema();
|
|
434999
435177
|
});
|
|
435000
435178
|
|
|
435001
435179
|
// src/services/agents/acpServer.ts
|
|
@@ -435136,7 +435314,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
435136
435314
|
async function handleInitialize(options2) {
|
|
435137
435315
|
return {
|
|
435138
435316
|
name: "UR",
|
|
435139
|
-
version: "1.76.
|
|
435317
|
+
version: "1.76.3",
|
|
435140
435318
|
protocolVersion: "0.1.0",
|
|
435141
435319
|
workspaceRoot: options2.cwd,
|
|
435142
435320
|
capabilities: {
|
|
@@ -435250,7 +435428,7 @@ async function handleToolsList() {
|
|
|
435250
435428
|
tools: tools.filter((tool) => tool.isEnabled()).map((tool) => ({
|
|
435251
435429
|
name: tool.name,
|
|
435252
435430
|
description: tool.searchHint ?? tool.name,
|
|
435253
|
-
inputSchema:
|
|
435431
|
+
inputSchema: zodToJsonSchema(tool.inputSchema)
|
|
435254
435432
|
}))
|
|
435255
435433
|
};
|
|
435256
435434
|
}
|
|
@@ -435741,7 +435919,7 @@ var init_acpServer = __esm(() => {
|
|
|
435741
435919
|
init_slowOperations();
|
|
435742
435920
|
init_readRequestTextBounded();
|
|
435743
435921
|
init_rollingRateLimiter();
|
|
435744
|
-
|
|
435922
|
+
init_zodToJsonSchema();
|
|
435745
435923
|
init_ideDiffs();
|
|
435746
435924
|
init_backgroundRunner();
|
|
435747
435925
|
init_a2aServer();
|
|
@@ -452244,7 +452422,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
452244
452422
|
return [];
|
|
452245
452423
|
}
|
|
452246
452424
|
}
|
|
452247
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.
|
|
452425
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.3") {
|
|
452248
452426
|
if (process.env.USER_TYPE === "ant") {
|
|
452249
452427
|
const changelog = "";
|
|
452250
452428
|
if (changelog) {
|
|
@@ -452271,7 +452449,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.0")
|
|
|
452271
452449
|
releaseNotes
|
|
452272
452450
|
};
|
|
452273
452451
|
}
|
|
452274
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.
|
|
452452
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.3") {
|
|
452275
452453
|
if (process.env.USER_TYPE === "ant") {
|
|
452276
452454
|
const changelog = "";
|
|
452277
452455
|
if (changelog) {
|
|
@@ -455137,7 +455315,7 @@ function getRecentActivitySync() {
|
|
|
455137
455315
|
return cachedActivity;
|
|
455138
455316
|
}
|
|
455139
455317
|
function getLogoDisplayData() {
|
|
455140
|
-
const version2 = process.env.DEMO_VERSION ?? "1.76.
|
|
455318
|
+
const version2 = process.env.DEMO_VERSION ?? "1.76.3";
|
|
455141
455319
|
const serverUrl = getDirectConnectServerUrl();
|
|
455142
455320
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
455143
455321
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -456004,7 +456182,7 @@ function LogoV2() {
|
|
|
456004
456182
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
456005
456183
|
t2 = () => {
|
|
456006
456184
|
const currentConfig2 = getGlobalConfig();
|
|
456007
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.76.
|
|
456185
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.76.3") {
|
|
456008
456186
|
return;
|
|
456009
456187
|
}
|
|
456010
456188
|
saveGlobalConfig(_temp325);
|
|
@@ -456689,12 +456867,12 @@ function LogoV2() {
|
|
|
456689
456867
|
return t41;
|
|
456690
456868
|
}
|
|
456691
456869
|
function _temp325(current) {
|
|
456692
|
-
if (current.lastReleaseNotesSeen === "1.76.
|
|
456870
|
+
if (current.lastReleaseNotesSeen === "1.76.3") {
|
|
456693
456871
|
return current;
|
|
456694
456872
|
}
|
|
456695
456873
|
return {
|
|
456696
456874
|
...current,
|
|
456697
|
-
lastReleaseNotesSeen: "1.76.
|
|
456875
|
+
lastReleaseNotesSeen: "1.76.3"
|
|
456698
456876
|
};
|
|
456699
456877
|
}
|
|
456700
456878
|
function _temp241(s_0) {
|
|
@@ -473508,7 +473686,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
473508
473686
|
if (spec.name !== specName) {
|
|
473509
473687
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
473510
473688
|
}
|
|
473511
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.
|
|
473689
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3");
|
|
473512
473690
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
473513
473691
|
throw new Error("invalid ur-agent package version");
|
|
473514
473692
|
}
|
|
@@ -474501,7 +474679,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
474501
474679
|
path: ".github/workflows/ur.yml",
|
|
474502
474680
|
root: "project",
|
|
474503
474681
|
content: compileAgenticCiWorkflow("default", {
|
|
474504
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.76.
|
|
474682
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3"
|
|
474505
474683
|
})
|
|
474506
474684
|
},
|
|
474507
474685
|
{
|
|
@@ -474564,7 +474742,7 @@ function value(tokens, flag) {
|
|
|
474564
474742
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
474565
474743
|
}
|
|
474566
474744
|
function cliVersion() {
|
|
474567
|
-
return typeof MACRO !== "undefined" ? "1.76.
|
|
474745
|
+
return typeof MACRO !== "undefined" ? "1.76.3" : "1.76.3";
|
|
474568
474746
|
}
|
|
474569
474747
|
function workflowPath(cwd2) {
|
|
474570
474748
|
return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -480420,7 +480598,7 @@ function createAcpStdioApp(deps) {
|
|
|
480420
480598
|
}
|
|
480421
480599
|
},
|
|
480422
480600
|
authMethods: [],
|
|
480423
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480601
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.3" }
|
|
480424
480602
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
480425
480603
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
480426
480604
|
await runtime2.announce({
|
|
@@ -480517,7 +480695,7 @@ function createAcpStdioAgent(deps) {
|
|
|
480517
480695
|
}
|
|
480518
480696
|
},
|
|
480519
480697
|
authMethods: [],
|
|
480520
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480698
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.3" }
|
|
480521
480699
|
});
|
|
480522
480700
|
return;
|
|
480523
480701
|
case "authenticate":
|
|
@@ -490243,8 +490421,10 @@ function summarizeSubagentCosts(subagentsDir) {
|
|
|
490243
490421
|
row.cacheCreationInputTokens += tokens.cacheCreationInputTokens;
|
|
490244
490422
|
const model = message.message?.model ?? null;
|
|
490245
490423
|
row.model ??= model;
|
|
490246
|
-
if (model)
|
|
490424
|
+
if (model && getAPIProvider() !== "ollama" && Object.prototype.hasOwnProperty.call(MODEL_COSTS, getCanonicalName(model))) {
|
|
490425
|
+
row.hasReliableCosting = true;
|
|
490247
490426
|
row.costUSD += calculateCostFromTokens(model, tokens);
|
|
490427
|
+
}
|
|
490248
490428
|
}
|
|
490249
490429
|
rows.push(row);
|
|
490250
490430
|
}
|
|
@@ -490270,6 +490450,7 @@ function formatSubagentCosts(rows, json2, searchedDir) {
|
|
|
490270
490450
|
Either this session spawned no subagents, or that is not where they were written.` : "No subagent transcripts found for this session.";
|
|
490271
490451
|
}
|
|
490272
490452
|
const billed = rows.some((row) => row.costUSD > 0);
|
|
490453
|
+
const total = rows.reduce((sum, row) => sum + row.costUSD, 0);
|
|
490273
490454
|
const label = (row) => row.description || row.agentType || row.agentId;
|
|
490274
490455
|
const width = Math.min(Math.max(...rows.map((row) => label(row).length), 5), 44);
|
|
490275
490456
|
const lines = ["Per-agent usage", ""];
|
|
@@ -490279,7 +490460,6 @@ Either this session spawned no subagents, or that is not where they were written
|
|
|
490279
490460
|
}
|
|
490280
490461
|
const totalIn = rows.reduce((sum, row) => sum + row.inputTokens, 0);
|
|
490281
490462
|
const totalOut = rows.reduce((sum, row) => sum + row.outputTokens, 0);
|
|
490282
|
-
const total = rows.reduce((sum, row) => sum + row.costUSD, 0);
|
|
490283
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)}` : ""}`);
|
|
490284
490464
|
if (!billed) {
|
|
490285
490465
|
lines.push("", "Cost omitted: the active runtime is local and unbilled.");
|
|
@@ -490293,6 +490473,9 @@ function formatUSD(value2) {
|
|
|
490293
490473
|
var AGENT_TOOL_NAMES, PREVIEW_CHARS = 160, VERDICT_RE2;
|
|
490294
490474
|
var init_inspector = __esm(() => {
|
|
490295
490475
|
init_json();
|
|
490476
|
+
init_model();
|
|
490477
|
+
init_providers();
|
|
490478
|
+
init_modelCost();
|
|
490296
490479
|
init_modelCost();
|
|
490297
490480
|
AGENT_TOOL_NAMES = new Set(["Agent", "Task"]);
|
|
490298
490481
|
VERDICT_RE2 = /\bVERDICT:\s*(PASS|FAIL|PARTIAL)\b/i;
|
|
@@ -689964,7 +690147,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
689964
690147
|
smapsRollup,
|
|
689965
690148
|
platform: process.platform,
|
|
689966
690149
|
nodeVersion: process.version,
|
|
689967
|
-
ccVersion: "1.76.
|
|
690150
|
+
ccVersion: "1.76.3"
|
|
689968
690151
|
};
|
|
689969
690152
|
}
|
|
689970
690153
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -690544,7 +690727,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
690544
690727
|
var call154 = async () => {
|
|
690545
690728
|
return {
|
|
690546
690729
|
type: "text",
|
|
690547
|
-
value: "1.76.
|
|
690730
|
+
value: "1.76.3"
|
|
690548
690731
|
};
|
|
690549
690732
|
}, version2, version_default;
|
|
690550
690733
|
var init_version = __esm(() => {
|
|
@@ -701811,7 +701994,7 @@ function generateHtmlReport(data, insights) {
|
|
|
701811
701994
|
</html>`;
|
|
701812
701995
|
}
|
|
701813
701996
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
701814
|
-
const version3 = typeof MACRO !== "undefined" ? "1.76.
|
|
701997
|
+
const version3 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
701815
701998
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
701816
701999
|
const facets_summary = {
|
|
701817
702000
|
total: facets.size,
|
|
@@ -706125,7 +706308,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
706125
706308
|
init_settings2();
|
|
706126
706309
|
init_slowOperations();
|
|
706127
706310
|
init_uuid();
|
|
706128
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.76.
|
|
706311
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.76.3" : "unknown";
|
|
706129
706312
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
706130
706313
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
706131
706314
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -707340,7 +707523,7 @@ var init_filesystem = __esm(() => {
|
|
|
707340
707523
|
});
|
|
707341
707524
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
707342
707525
|
const nonce = randomBytes20(16).toString("hex");
|
|
707343
|
-
return join232(getURTempDir(), "bundled-skills", "1.76.
|
|
707526
|
+
return join232(getURTempDir(), "bundled-skills", "1.76.3", nonce);
|
|
707344
707527
|
});
|
|
707345
707528
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
707346
707529
|
});
|
|
@@ -713269,7 +713452,7 @@ async function toolToAPISchema(tool, options4) {
|
|
|
713269
713452
|
let base2 = cache5.get(cacheKey);
|
|
713270
713453
|
if (!base2) {
|
|
713271
713454
|
const strictToolsEnabled = checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_tool_pear");
|
|
713272
|
-
let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713455
|
+
let input_schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713273
713456
|
if (!isAgentSwarmsEnabled()) {
|
|
713274
713457
|
input_schema = filterSwarmFieldsFromSchema(tool.name, input_schema);
|
|
713275
713458
|
}
|
|
@@ -713512,11 +713695,11 @@ async function logContextMetrics(mcpConfigs, toolPermissionContext) {
|
|
|
713512
713695
|
}
|
|
713513
713696
|
mcpServersCount = serverNames.size;
|
|
713514
713697
|
for (const tool of mcpTools) {
|
|
713515
|
-
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713698
|
+
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713516
713699
|
mcpToolsTokens += roughTokenCountEstimation(jsonStringify(schema));
|
|
713517
713700
|
}
|
|
713518
713701
|
for (const tool of nonMcpTools) {
|
|
713519
|
-
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema :
|
|
713702
|
+
const schema = "inputJSONSchema" in tool && tool.inputJSONSchema ? tool.inputJSONSchema : zodToJsonSchema(tool.inputSchema);
|
|
713520
713703
|
nonMcpToolsTokens += roughTokenCountEstimation(jsonStringify(schema));
|
|
713521
713704
|
}
|
|
713522
713705
|
logEvent("tengu_context_size", {
|
|
@@ -713654,7 +713837,7 @@ var init_api3 = __esm(() => {
|
|
|
713654
713837
|
init_slowOperations();
|
|
713655
713838
|
init_toolSchemaCache();
|
|
713656
713839
|
init_windowsPaths();
|
|
713657
|
-
|
|
713840
|
+
init_zodToJsonSchema();
|
|
713658
713841
|
SWARM_FIELDS_BY_TOOL = {
|
|
713659
713842
|
[EXIT_PLAN_MODE_V2_TOOL_NAME]: ["launchSwarm", "teammateCount"],
|
|
713660
713843
|
[AGENT_TOOL_NAME]: ["name", "team_name", "mode"]
|
|
@@ -713689,7 +713872,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
713689
713872
|
}
|
|
713690
713873
|
function computeFingerprintFromMessages(messages) {
|
|
713691
713874
|
const firstMessageText = extractFirstMessageText(messages);
|
|
713692
|
-
return computeFingerprint(firstMessageText, "1.76.
|
|
713875
|
+
return computeFingerprint(firstMessageText, "1.76.3");
|
|
713693
713876
|
}
|
|
713694
713877
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
713695
713878
|
var init_fingerprint = () => {};
|
|
@@ -715608,7 +715791,7 @@ async function sideQuery(opts) {
|
|
|
715608
715791
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
715609
715792
|
}
|
|
715610
715793
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
715611
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.76.
|
|
715794
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.76.3");
|
|
715612
715795
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
715613
715796
|
const systemBlocks = [
|
|
715614
715797
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -720445,7 +720628,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
720445
720628
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
720446
720629
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
720447
720630
|
betas: getSdkBetas(),
|
|
720448
|
-
ur_version: "1.76.
|
|
720631
|
+
ur_version: "1.76.3",
|
|
720449
720632
|
output_style: outputStyle2,
|
|
720450
720633
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
720451
720634
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -734317,7 +734500,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
734317
734500
|
function getSemverPart(version3) {
|
|
734318
734501
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
734319
734502
|
}
|
|
734320
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.76.
|
|
734503
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.76.3") {
|
|
734321
734504
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react223.useState(() => getSemverPart(initialVersion));
|
|
734322
734505
|
if (!updatedVersion) {
|
|
734323
734506
|
return null;
|
|
@@ -734366,7 +734549,7 @@ function AutoUpdater({
|
|
|
734366
734549
|
return;
|
|
734367
734550
|
}
|
|
734368
734551
|
if (false) {}
|
|
734369
|
-
const currentVersion = "1.76.
|
|
734552
|
+
const currentVersion = "1.76.3";
|
|
734370
734553
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
734371
734554
|
let latestVersion = await getLatestVersion(channel);
|
|
734372
734555
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -734595,12 +734778,12 @@ function NativeAutoUpdater({
|
|
|
734595
734778
|
logEvent("tengu_native_auto_updater_start", {});
|
|
734596
734779
|
try {
|
|
734597
734780
|
const maxVersion = await getMaxVersion();
|
|
734598
|
-
if (maxVersion && gt("1.76.
|
|
734781
|
+
if (maxVersion && gt("1.76.3", maxVersion)) {
|
|
734599
734782
|
const msg = await getMaxVersionMessage();
|
|
734600
734783
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
734601
734784
|
}
|
|
734602
734785
|
const result = await installLatest(channel);
|
|
734603
|
-
const currentVersion = "1.76.
|
|
734786
|
+
const currentVersion = "1.76.3";
|
|
734604
734787
|
const latencyMs = Date.now() - startTime;
|
|
734605
734788
|
if (result.lockFailed) {
|
|
734606
734789
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -734737,17 +734920,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
734737
734920
|
const maxVersion = await getMaxVersion();
|
|
734738
734921
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
734739
734922
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
734740
|
-
if (gte("1.76.
|
|
734741
|
-
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`);
|
|
734742
734925
|
setUpdateAvailable(false);
|
|
734743
734926
|
return;
|
|
734744
734927
|
}
|
|
734745
734928
|
latest = maxVersion;
|
|
734746
734929
|
}
|
|
734747
|
-
const hasUpdate = latest && !gte("1.76.
|
|
734930
|
+
const hasUpdate = latest && !gte("1.76.3", latest) && !shouldSkipVersion(latest);
|
|
734748
734931
|
setUpdateAvailable(!!hasUpdate);
|
|
734749
734932
|
if (hasUpdate) {
|
|
734750
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.
|
|
734933
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.3"} -> ${latest}`);
|
|
734751
734934
|
}
|
|
734752
734935
|
};
|
|
734753
734936
|
$2[0] = t1;
|
|
@@ -734781,7 +734964,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
734781
734964
|
wrap: "truncate",
|
|
734782
734965
|
children: [
|
|
734783
734966
|
"currentVersion: ",
|
|
734784
|
-
"1.76.
|
|
734967
|
+
"1.76.3"
|
|
734785
734968
|
]
|
|
734786
734969
|
}, undefined, true, undefined, this);
|
|
734787
734970
|
$2[3] = verbose;
|
|
@@ -745581,7 +745764,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
745581
745764
|
project_dir: getOriginalCwd(),
|
|
745582
745765
|
added_dirs: addedDirs
|
|
745583
745766
|
},
|
|
745584
|
-
version: "1.76.
|
|
745767
|
+
version: "1.76.3",
|
|
745585
745768
|
output_style: {
|
|
745586
745769
|
name: outputStyleName
|
|
745587
745770
|
},
|
|
@@ -745716,7 +745899,7 @@ function StatusLineInner({
|
|
|
745716
745899
|
const attention = customStatusError ?? taskAttention;
|
|
745717
745900
|
const terminalSize = React132.useContext(TerminalSizeContext);
|
|
745718
745901
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
745719
|
-
version: "1.76.
|
|
745902
|
+
version: "1.76.3",
|
|
745720
745903
|
providerLabel: providerRuntime.providerLabel,
|
|
745721
745904
|
authMode: providerRuntime.authLabel,
|
|
745722
745905
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -758001,7 +758184,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
758001
758184
|
} catch {}
|
|
758002
758185
|
const data = {
|
|
758003
758186
|
trigger: trigger2,
|
|
758004
|
-
version: "1.76.
|
|
758187
|
+
version: "1.76.3",
|
|
758005
758188
|
platform: process.platform,
|
|
758006
758189
|
transcript,
|
|
758007
758190
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -770375,7 +770558,7 @@ function WelcomeV2() {
|
|
|
770375
770558
|
dimColor: true,
|
|
770376
770559
|
children: [
|
|
770377
770560
|
"v",
|
|
770378
|
-
"1.76.
|
|
770561
|
+
"1.76.3"
|
|
770379
770562
|
]
|
|
770380
770563
|
}, undefined, true, undefined, this)
|
|
770381
770564
|
]
|
|
@@ -771635,7 +771818,7 @@ function completeOnboarding() {
|
|
|
771635
771818
|
saveGlobalConfig((current) => ({
|
|
771636
771819
|
...current,
|
|
771637
771820
|
hasCompletedOnboarding: true,
|
|
771638
|
-
lastOnboardingVersion: "1.76.
|
|
771821
|
+
lastOnboardingVersion: "1.76.3"
|
|
771639
771822
|
}));
|
|
771640
771823
|
}
|
|
771641
771824
|
function showDialog(root2, renderer) {
|
|
@@ -776679,7 +776862,7 @@ function appendToLog(path24, message) {
|
|
|
776679
776862
|
cwd: getFsImplementation().cwd(),
|
|
776680
776863
|
userType: process.env.USER_TYPE,
|
|
776681
776864
|
sessionId: getSessionId(),
|
|
776682
|
-
version: "1.76.
|
|
776865
|
+
version: "1.76.3"
|
|
776683
776866
|
};
|
|
776684
776867
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
776685
776868
|
}
|
|
@@ -780838,8 +781021,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
780838
781021
|
}
|
|
780839
781022
|
async function checkEnvLessBridgeMinVersion() {
|
|
780840
781023
|
const cfg = await getEnvLessBridgeConfig();
|
|
780841
|
-
if (cfg.min_version && lt("1.76.
|
|
780842
|
-
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.
|
|
780843
781026
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
780844
781027
|
}
|
|
780845
781028
|
return null;
|
|
@@ -781313,7 +781496,7 @@ async function initBridgeCore(params) {
|
|
|
781313
781496
|
const rawApi = createBridgeApiClient({
|
|
781314
781497
|
baseUrl,
|
|
781315
781498
|
getAccessToken,
|
|
781316
|
-
runnerVersion: "1.76.
|
|
781499
|
+
runnerVersion: "1.76.3",
|
|
781317
781500
|
onDebug: logForDebugging,
|
|
781318
781501
|
onAuth401,
|
|
781319
781502
|
getTrustedDeviceToken
|
|
@@ -790786,7 +790969,7 @@ function getAgUiCapabilities() {
|
|
|
790786
790969
|
name: "UR-Nexus",
|
|
790787
790970
|
type: "ur-nexus",
|
|
790788
790971
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
790789
|
-
version: "1.76.
|
|
790972
|
+
version: "1.76.3",
|
|
790790
790973
|
provider: "UR",
|
|
790791
790974
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
790792
790975
|
},
|
|
@@ -791926,7 +792109,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
791926
792109
|
};
|
|
791927
792110
|
const server2 = new Server({
|
|
791928
792111
|
name: "ur-nexus",
|
|
791929
|
-
version: "1.76.
|
|
792112
|
+
version: "1.76.3"
|
|
791930
792113
|
}, {
|
|
791931
792114
|
capabilities: {
|
|
791932
792115
|
tools: {}
|
|
@@ -793084,7 +793267,7 @@ function thrownResponse(error40) {
|
|
|
793084
793267
|
}
|
|
793085
793268
|
async function createUrMcp2026Runtime(options4) {
|
|
793086
793269
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
793087
|
-
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: {} });
|
|
793088
793271
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
793089
793272
|
try {
|
|
793090
793273
|
await server2.connect(serverTransport);
|
|
@@ -793095,7 +793278,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
793095
793278
|
}
|
|
793096
793279
|
const runtime2 = new Mcp2026Runtime({
|
|
793097
793280
|
cwd: options4.cwd,
|
|
793098
|
-
version: "1.76.
|
|
793281
|
+
version: "1.76.3",
|
|
793099
793282
|
backend: {
|
|
793100
793283
|
listTools: async () => {
|
|
793101
793284
|
const listed = await client2.listTools();
|
|
@@ -795236,7 +795419,7 @@ async function update() {
|
|
|
795236
795419
|
logEvent("tengu_update_check", {});
|
|
795237
795420
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
795238
795421
|
const result = await checkUpgradeStatus({
|
|
795239
|
-
currentVersion: "1.76.
|
|
795422
|
+
currentVersion: "1.76.3",
|
|
795240
795423
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
795241
795424
|
installationType: diagnostic2.installationType,
|
|
795242
795425
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -796552,7 +796735,7 @@ ${customInstructions}` : customInstructions;
|
|
|
796552
796735
|
}
|
|
796553
796736
|
}
|
|
796554
796737
|
logForDiagnosticsNoPII("info", "started", {
|
|
796555
|
-
version: "1.76.
|
|
796738
|
+
version: "1.76.3",
|
|
796556
796739
|
is_native_binary: isInBundledMode()
|
|
796557
796740
|
});
|
|
796558
796741
|
registerCleanup(async () => {
|
|
@@ -797338,7 +797521,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
797338
797521
|
pendingHookMessages
|
|
797339
797522
|
}, renderAndRun);
|
|
797340
797523
|
}
|
|
797341
|
-
}).version("1.76.
|
|
797524
|
+
}).version("1.76.3 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
797342
797525
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
797343
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.");
|
|
797344
797527
|
if (canUserConfigureAdvisor()) {
|
|
@@ -798390,7 +798573,7 @@ if (false) {}
|
|
|
798390
798573
|
async function main2() {
|
|
798391
798574
|
const args = process.argv.slice(2);
|
|
798392
798575
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
798393
|
-
console.log(`${"1.76.
|
|
798576
|
+
console.log(`${"1.76.3"} (UR-Nexus)`);
|
|
798394
798577
|
return;
|
|
798395
798578
|
}
|
|
798396
798579
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|