ur-agent 1.76.6 → 1.76.10
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
|
@@ -87761,15 +87761,6 @@ function normalizeQuestionInput(value, index2) {
|
|
|
87761
87761
|
};
|
|
87762
87762
|
}
|
|
87763
87763
|
function normalizeAskUserQuestionInput(value) {
|
|
87764
|
-
if (Array.isArray(value)) {
|
|
87765
|
-
const normalized = value.map((entry, index2) => normalizeQuestionInput(entry, index2)).filter((entry) => entry !== null && typeof entry === "object");
|
|
87766
|
-
if (normalized.length > 0) {
|
|
87767
|
-
return {
|
|
87768
|
-
questions: dedupeQuestions(normalized)
|
|
87769
|
-
};
|
|
87770
|
-
}
|
|
87771
|
-
return null;
|
|
87772
|
-
}
|
|
87773
87764
|
const input = objectValue(value);
|
|
87774
87765
|
if (!input)
|
|
87775
87766
|
return value;
|
|
@@ -87809,7 +87800,7 @@ function normalizeAskUserQuestionInput(value) {
|
|
|
87809
87800
|
...commonFields
|
|
87810
87801
|
};
|
|
87811
87802
|
}
|
|
87812
|
-
return
|
|
87803
|
+
return input;
|
|
87813
87804
|
}
|
|
87814
87805
|
if (Array.isArray(input.questions)) {
|
|
87815
87806
|
const normalized = input.questions.map((entry, index2) => normalizeQuestionInput(entry, index2)).filter((entry) => entry !== null && typeof entry === "object");
|
|
@@ -87819,7 +87810,7 @@ function normalizeAskUserQuestionInput(value) {
|
|
|
87819
87810
|
...commonFields
|
|
87820
87811
|
};
|
|
87821
87812
|
}
|
|
87822
|
-
return
|
|
87813
|
+
return input;
|
|
87823
87814
|
}
|
|
87824
87815
|
if (optionsField(input) !== null) {
|
|
87825
87816
|
const singleQuestion = normalizeQuestionInput(input, 0);
|
|
@@ -87830,7 +87821,7 @@ function normalizeAskUserQuestionInput(value) {
|
|
|
87830
87821
|
};
|
|
87831
87822
|
}
|
|
87832
87823
|
}
|
|
87833
|
-
return
|
|
87824
|
+
return input;
|
|
87834
87825
|
}
|
|
87835
87826
|
function AskUserQuestionResultMessage(t0) {
|
|
87836
87827
|
const $2 = import_compiler_runtime17.c(3);
|
|
@@ -88200,9 +88191,6 @@ function normalizeKimiAskUserQuestionInput(input) {
|
|
|
88200
88191
|
if (!Array.isArray(questions) || questions.length === 0) {
|
|
88201
88192
|
return null;
|
|
88202
88193
|
}
|
|
88203
|
-
if (describeQuestionPayloadProblems(normalized).length > 0) {
|
|
88204
|
-
return null;
|
|
88205
|
-
}
|
|
88206
88194
|
return {
|
|
88207
88195
|
...normalized,
|
|
88208
88196
|
questions: questions.slice(0, 4)
|
|
@@ -88210,10 +88198,10 @@ function normalizeKimiAskUserQuestionInput(input) {
|
|
|
88210
88198
|
}
|
|
88211
88199
|
function normalizeInlineToolInput(name, input) {
|
|
88212
88200
|
if (name === "Write") {
|
|
88213
|
-
return normalizeKimiWriteInput(input);
|
|
88201
|
+
return normalizeKimiWriteInput(input) ?? input;
|
|
88214
88202
|
}
|
|
88215
88203
|
if (name === "AskUserQuestion") {
|
|
88216
|
-
return normalizeKimiAskUserQuestionInput(input);
|
|
88204
|
+
return normalizeKimiAskUserQuestionInput(input) ?? input;
|
|
88217
88205
|
}
|
|
88218
88206
|
return input;
|
|
88219
88207
|
}
|
|
@@ -88231,25 +88219,19 @@ function parseKimiToolCalls(text) {
|
|
|
88231
88219
|
throw new KimiToolCallParseError("Kimi tool call markup is incomplete or malformed");
|
|
88232
88220
|
}
|
|
88233
88221
|
CALL_RE.lastIndex = 0;
|
|
88234
|
-
let matchedCalls = 0;
|
|
88235
88222
|
let cleaned = text.replace(CALL_RE, (_full, rawName, rawArgs) => {
|
|
88236
88223
|
const name = (rawName ?? "").trim().replace(/^functions\./, "").replace(/[:.]\d+\s*$/, "").trim();
|
|
88237
88224
|
if (!name) {
|
|
88238
88225
|
throw new KimiToolCallParseError("Kimi tool call is missing a function name");
|
|
88239
88226
|
}
|
|
88240
|
-
matchedCalls += 1;
|
|
88241
|
-
const normalizedInput = normalizeInlineToolInput(name, parseArgs(rawArgs ?? ""));
|
|
88242
|
-
if (normalizedInput === null) {
|
|
88243
|
-
return rawArgs ?? "";
|
|
88244
|
-
}
|
|
88245
88227
|
toolCalls.push({
|
|
88246
88228
|
id: parsedToolCallId("kimi", i2++),
|
|
88247
88229
|
name,
|
|
88248
|
-
input:
|
|
88230
|
+
input: normalizeInlineToolInput(name, parseArgs(rawArgs ?? ""))
|
|
88249
88231
|
});
|
|
88250
88232
|
return "";
|
|
88251
88233
|
});
|
|
88252
|
-
if (
|
|
88234
|
+
if (toolCalls.length !== callBegins) {
|
|
88253
88235
|
throw new KimiToolCallParseError("Kimi tool call markup is incomplete or malformed");
|
|
88254
88236
|
}
|
|
88255
88237
|
cleaned = cleaned.replace(SECTION_RE, "").replace(STRAY_RE, "").replace(/\n{3,}/g, `
|
|
@@ -88517,8 +88499,6 @@ function maybeBareJsonToolCall(text, availableToolNames, index2) {
|
|
|
88517
88499
|
return null;
|
|
88518
88500
|
}
|
|
88519
88501
|
const normalizedInput = name === "Write" || name === "AskUserQuestion" ? normalizeInlineToolInput(name, input.input) : input.input;
|
|
88520
|
-
if (normalizedInput === null)
|
|
88521
|
-
return null;
|
|
88522
88502
|
return {
|
|
88523
88503
|
id: parsedToolCallId("bare", index2),
|
|
88524
88504
|
name,
|
|
@@ -88534,13 +88514,11 @@ function maybeBareJsonToolCall(text, availableToolNames, index2) {
|
|
|
88534
88514
|
}
|
|
88535
88515
|
if (hasTool(availableToolNames, "Write") && normalizeKimiWriteInput(input) !== null) {
|
|
88536
88516
|
const normalized = normalizeKimiWriteInput(input);
|
|
88537
|
-
|
|
88538
|
-
|
|
88539
|
-
|
|
88540
|
-
|
|
88541
|
-
|
|
88542
|
-
};
|
|
88543
|
-
}
|
|
88517
|
+
return {
|
|
88518
|
+
id: parsedToolCallId("bare", index2),
|
|
88519
|
+
name: "Write",
|
|
88520
|
+
input: normalized ?? input
|
|
88521
|
+
};
|
|
88544
88522
|
}
|
|
88545
88523
|
if (hasTool(availableToolNames, "Edit") && hasRequiredKeys(input, ["file_path", "old_string", "new_string"], ["replace_all"]) && typeof input.file_path === "string" && typeof input.old_string === "string" && typeof input.new_string === "string" && (input.replace_all === undefined || typeof input.replace_all === "boolean")) {
|
|
88546
88524
|
return {
|
|
@@ -89901,13 +89879,15 @@ async function* readOllamaChunks(response, controller, timeoutMs, options) {
|
|
|
89901
89879
|
const reader = response.body.getReader();
|
|
89902
89880
|
const decoder = new TextDecoder;
|
|
89903
89881
|
let buffer = "";
|
|
89904
|
-
const
|
|
89882
|
+
const nextDeadline = () => timeoutMs > 0 ? Date.now() + timeoutMs : Infinity;
|
|
89883
|
+
let deadline = nextDeadline();
|
|
89905
89884
|
try {
|
|
89906
89885
|
while (true) {
|
|
89907
89886
|
const { done, value } = await readWithDeadline(reader, deadline, controller, options);
|
|
89908
89887
|
if (done) {
|
|
89909
89888
|
break;
|
|
89910
89889
|
}
|
|
89890
|
+
deadline = nextDeadline();
|
|
89911
89891
|
buffer += decoder.decode(value, { stream: true });
|
|
89912
89892
|
let newlineIndex = buffer.indexOf(`
|
|
89913
89893
|
`);
|
|
@@ -90485,7 +90465,7 @@ function withStreamIdleTimeout(source, idleMs, onTimeout) {
|
|
|
90485
90465
|
}
|
|
90486
90466
|
});
|
|
90487
90467
|
}
|
|
90488
|
-
var DEFAULT_STREAM_IDLE_TIMEOUT_MS =
|
|
90468
|
+
var DEFAULT_STREAM_IDLE_TIMEOUT_MS = 300000, StreamIdleTimeoutError;
|
|
90489
90469
|
var init_streamIdleTimeout = __esm(() => {
|
|
90490
90470
|
StreamIdleTimeoutError = class StreamIdleTimeoutError extends Error {
|
|
90491
90471
|
idleMs;
|
|
@@ -90520,6 +90500,12 @@ function parseNonNegativeInteger(value) {
|
|
|
90520
90500
|
function getProviderRequestTimeoutMs(override) {
|
|
90521
90501
|
return parsePositiveInteger(override) ?? parsePositiveInteger(process.env.API_TIMEOUT_MS) ?? parsePositiveInteger(process.env.UR_API_TIMEOUT_MS) ?? parsePositiveInteger(getInitialSettings().provider?.timeoutMs) ?? DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS;
|
|
90522
90502
|
}
|
|
90503
|
+
function getProviderStreamTimeoutMs(override) {
|
|
90504
|
+
const explicit = parsePositiveInteger(override) ?? parsePositiveInteger(process.env.UR_STREAM_REQUEST_TIMEOUT_MS) ?? parsePositiveInteger(getInitialSettings().provider?.streamTimeoutMs);
|
|
90505
|
+
if (explicit !== undefined)
|
|
90506
|
+
return explicit;
|
|
90507
|
+
return Math.max(DEFAULT_PROVIDER_STREAM_TIMEOUT_MS, getProviderRequestTimeoutMs());
|
|
90508
|
+
}
|
|
90523
90509
|
function normalizeProviderMaxRetries(value) {
|
|
90524
90510
|
const parsed = parseNonNegativeInteger(value);
|
|
90525
90511
|
if (parsed === undefined)
|
|
@@ -90666,7 +90652,7 @@ async function waitForResponseBody(response, signal) {
|
|
|
90666
90652
|
}
|
|
90667
90653
|
}
|
|
90668
90654
|
async function fetchWithProviderReliability(input, init, options) {
|
|
90669
|
-
const timeoutMs = getProviderRequestTimeoutMs(options.timeoutMs);
|
|
90655
|
+
const timeoutMs = options.streaming ? getProviderStreamTimeoutMs(options.timeoutMs) : getProviderRequestTimeoutMs(options.timeoutMs);
|
|
90670
90656
|
const fetchImpl = options.fetch ?? fetch;
|
|
90671
90657
|
return withProviderRetry(async () => {
|
|
90672
90658
|
const timeout = createTimeoutSignal(options.signal, timeoutMs);
|
|
@@ -90707,7 +90693,7 @@ async function fetchWithProviderReliability(input, init, options) {
|
|
|
90707
90693
|
}, options);
|
|
90708
90694
|
}
|
|
90709
90695
|
async function axiosPostWithProviderReliability(url3, body, config2, options = {}) {
|
|
90710
|
-
const timeout = getProviderRequestTimeoutMs(options.timeoutMs);
|
|
90696
|
+
const timeout = options.streaming ? getProviderStreamTimeoutMs(options.timeoutMs) : getProviderRequestTimeoutMs(options.timeoutMs);
|
|
90711
90697
|
return withProviderRetry(() => axios_default.post(url3, body, {
|
|
90712
90698
|
...config2,
|
|
90713
90699
|
timeout,
|
|
@@ -90748,7 +90734,7 @@ function normalizeProviderEndpoint(baseUrl, defaultBaseUrl, finalSegment) {
|
|
|
90748
90734
|
}
|
|
90749
90735
|
return url3.toString().replace(/\/$/, "");
|
|
90750
90736
|
}
|
|
90751
|
-
var DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS = 120000, DEFAULT_PROVIDER_MAX_RETRIES = 3, DEFAULT_RETRY_BASE_DELAY_MS = 250, RETRYABLE_STATUSES, NON_RETRYABLE_STATUSES, TRANSIENT_NETWORK_CODES, ProviderHTTPError, ProviderTimeoutError;
|
|
90737
|
+
var DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS = 120000, DEFAULT_PROVIDER_STREAM_TIMEOUT_MS = 900000, DEFAULT_PROVIDER_MAX_RETRIES = 3, DEFAULT_RETRY_BASE_DELAY_MS = 250, RETRYABLE_STATUSES, NON_RETRYABLE_STATUSES, TRANSIENT_NETWORK_CODES, ProviderHTTPError, ProviderTimeoutError;
|
|
90752
90738
|
var init_providerHttp = __esm(() => {
|
|
90753
90739
|
init_axios2();
|
|
90754
90740
|
init_settings2();
|
|
@@ -90995,6 +90981,10 @@ async function* streamOpenAIEvents(body, options) {
|
|
|
90995
90981
|
}
|
|
90996
90982
|
};
|
|
90997
90983
|
for await (const payload of readSSEData(body, options.signal)) {
|
|
90984
|
+
if (payload === SSE_KEEPALIVE) {
|
|
90985
|
+
yield { type: "ping" };
|
|
90986
|
+
continue;
|
|
90987
|
+
}
|
|
90998
90988
|
if (payload === "[DONE]") {
|
|
90999
90989
|
sawDone = true;
|
|
91000
90990
|
break;
|
|
@@ -91209,6 +91199,10 @@ async function* streamOpenAIResponsesEvents(body, options) {
|
|
|
91209
91199
|
};
|
|
91210
91200
|
};
|
|
91211
91201
|
for await (const payload of readSSEData(body, options.signal)) {
|
|
91202
|
+
if (payload === SSE_KEEPALIVE) {
|
|
91203
|
+
yield { type: "ping" };
|
|
91204
|
+
continue;
|
|
91205
|
+
}
|
|
91212
91206
|
if (payload === "[DONE]")
|
|
91213
91207
|
break;
|
|
91214
91208
|
const event = parseJSONPayload(payload, `${providerName} SSE event`);
|
|
@@ -91361,11 +91355,19 @@ async function* streamAnthropicEvents(body, options) {
|
|
|
91361
91355
|
const toolIds = new Set;
|
|
91362
91356
|
const streamedToolInputs = new Map;
|
|
91363
91357
|
for await (const payload of readSSEData(body, options.signal)) {
|
|
91358
|
+
if (payload === SSE_KEEPALIVE) {
|
|
91359
|
+
yield { type: "ping" };
|
|
91360
|
+
continue;
|
|
91361
|
+
}
|
|
91364
91362
|
if (payload === "[DONE]")
|
|
91365
91363
|
break;
|
|
91366
91364
|
const event = parseJSONPayload(payload, `${providerName} SSE event`);
|
|
91367
|
-
if (!event
|
|
91365
|
+
if (!event)
|
|
91366
|
+
continue;
|
|
91367
|
+
if (event.type === "ping") {
|
|
91368
|
+
yield { type: "ping" };
|
|
91368
91369
|
continue;
|
|
91370
|
+
}
|
|
91369
91371
|
throwProviderPayloadError(event, providerName);
|
|
91370
91372
|
if (!sawMessageStart && event.type !== "message_start") {
|
|
91371
91373
|
sawMessageStart = true;
|
|
@@ -91532,6 +91534,10 @@ async function* streamGeminiEvents(body, options) {
|
|
|
91532
91534
|
yield { type: "content_block_stop", index: currentIndex };
|
|
91533
91535
|
};
|
|
91534
91536
|
for await (const payload of readSSEData(body, options.signal)) {
|
|
91537
|
+
if (payload === SSE_KEEPALIVE) {
|
|
91538
|
+
yield { type: "ping" };
|
|
91539
|
+
continue;
|
|
91540
|
+
}
|
|
91535
91541
|
if (payload === "[DONE]")
|
|
91536
91542
|
break;
|
|
91537
91543
|
const parsed = parseJSONPayload(payload, `${providerName} SSE chunk`);
|
|
@@ -91650,6 +91656,7 @@ async function* readSSEData(body, signal) {
|
|
|
91650
91656
|
let buffer = "";
|
|
91651
91657
|
for await (const chunk of readTextChunks(body, signal)) {
|
|
91652
91658
|
buffer += chunk;
|
|
91659
|
+
let emitted = false;
|
|
91653
91660
|
while (true) {
|
|
91654
91661
|
const delimiter = findSSEDelimiter(buffer);
|
|
91655
91662
|
if (!delimiter)
|
|
@@ -91657,9 +91664,13 @@ async function* readSSEData(body, signal) {
|
|
|
91657
91664
|
const rawEvent = buffer.slice(0, delimiter.index);
|
|
91658
91665
|
buffer = buffer.slice(delimiter.index + delimiter.length);
|
|
91659
91666
|
const data = parseSSEEvent(rawEvent);
|
|
91660
|
-
if (data !== undefined)
|
|
91667
|
+
if (data !== undefined) {
|
|
91668
|
+
emitted = true;
|
|
91661
91669
|
yield data;
|
|
91670
|
+
}
|
|
91662
91671
|
}
|
|
91672
|
+
if (!emitted)
|
|
91673
|
+
yield SSE_KEEPALIVE;
|
|
91663
91674
|
}
|
|
91664
91675
|
if (buffer.trim()) {
|
|
91665
91676
|
const data = parseSSEEvent(buffer);
|
|
@@ -91867,7 +91878,7 @@ function canonicalJson(value) {
|
|
|
91867
91878
|
}
|
|
91868
91879
|
return JSON.stringify(value);
|
|
91869
91880
|
}
|
|
91870
|
-
var EMPTY_USAGE;
|
|
91881
|
+
var EMPTY_USAGE, SSE_KEEPALIVE = "\x00ur:sse-keepalive";
|
|
91871
91882
|
var init_streamingAdapters = __esm(() => {
|
|
91872
91883
|
init_providerClient();
|
|
91873
91884
|
init_json();
|
|
@@ -92810,7 +92821,8 @@ async function createOpenRouterClient(options) {
|
|
|
92810
92821
|
}, {
|
|
92811
92822
|
maxRetries,
|
|
92812
92823
|
timeoutMs: requestOptions?.timeoutMs,
|
|
92813
|
-
signal
|
|
92824
|
+
signal,
|
|
92825
|
+
streaming: true
|
|
92814
92826
|
});
|
|
92815
92827
|
const requestId = response.headers?.["x-request-id"] ?? `openrouter-${randomUUID7()}`;
|
|
92816
92828
|
return {
|
|
@@ -94068,7 +94080,8 @@ async function createStandardAPIClient(options) {
|
|
|
94068
94080
|
}, {
|
|
94069
94081
|
maxRetries,
|
|
94070
94082
|
timeoutMs: requestOptions?.timeoutMs,
|
|
94071
|
-
signal
|
|
94083
|
+
signal,
|
|
94084
|
+
streaming: true
|
|
94072
94085
|
});
|
|
94073
94086
|
const requestId = providerRequestId(family, response.headers) ?? `${family}-${randomUUID10()}`;
|
|
94074
94087
|
const streamOptions = {
|
|
@@ -107487,7 +107500,7 @@ var init_auth = __esm(() => {
|
|
|
107487
107500
|
|
|
107488
107501
|
// src/utils/userAgent.ts
|
|
107489
107502
|
function getURCodeUserAgent() {
|
|
107490
|
-
return `ur/${"1.76.
|
|
107503
|
+
return `ur/${"1.76.10"}`;
|
|
107491
107504
|
}
|
|
107492
107505
|
|
|
107493
107506
|
// src/utils/workloadContext.ts
|
|
@@ -107509,7 +107522,7 @@ function getUserAgent() {
|
|
|
107509
107522
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
107510
107523
|
const workload = getWorkload();
|
|
107511
107524
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
107512
|
-
return `ur-cli/${"1.76.
|
|
107525
|
+
return `ur-cli/${"1.76.10"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
107513
107526
|
}
|
|
107514
107527
|
function getMCPUserAgent() {
|
|
107515
107528
|
const parts = [];
|
|
@@ -107523,7 +107536,7 @@ function getMCPUserAgent() {
|
|
|
107523
107536
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
107524
107537
|
}
|
|
107525
107538
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
107526
|
-
return `ur/${"1.76.
|
|
107539
|
+
return `ur/${"1.76.10"}${suffix}`;
|
|
107527
107540
|
}
|
|
107528
107541
|
function getWebFetchUserAgent() {
|
|
107529
107542
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -107661,7 +107674,7 @@ var init_user = __esm(() => {
|
|
|
107661
107674
|
deviceId,
|
|
107662
107675
|
sessionId: getSessionId(),
|
|
107663
107676
|
email: getEmail(),
|
|
107664
|
-
appVersion: "1.76.
|
|
107677
|
+
appVersion: "1.76.10",
|
|
107665
107678
|
platform: getHostPlatformForAnalytics(),
|
|
107666
107679
|
organizationUuid,
|
|
107667
107680
|
accountUuid,
|
|
@@ -115548,7 +115561,7 @@ var init_metadata = __esm(() => {
|
|
|
115548
115561
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
115549
115562
|
WHITESPACE_REGEX = /\s+/;
|
|
115550
115563
|
getVersionBase = memoize_default(() => {
|
|
115551
|
-
const match = "1.76.
|
|
115564
|
+
const match = "1.76.10".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
115552
115565
|
return match ? match[0] : undefined;
|
|
115553
115566
|
});
|
|
115554
115567
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -115588,7 +115601,7 @@ var init_metadata = __esm(() => {
|
|
|
115588
115601
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
115589
115602
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
115590
115603
|
isURAiAuth: isURAISubscriber(),
|
|
115591
|
-
version: "1.76.
|
|
115604
|
+
version: "1.76.10",
|
|
115592
115605
|
versionBase: getVersionBase(),
|
|
115593
115606
|
buildTime: "",
|
|
115594
115607
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -116258,7 +116271,7 @@ function initialize1PEventLogging() {
|
|
|
116258
116271
|
const platform2 = getPlatform();
|
|
116259
116272
|
const attributes = {
|
|
116260
116273
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
116261
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.76.
|
|
116274
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.76.10"
|
|
116262
116275
|
};
|
|
116263
116276
|
if (platform2 === "wsl") {
|
|
116264
116277
|
const wslVersion = getWslVersion();
|
|
@@ -116286,7 +116299,7 @@ function initialize1PEventLogging() {
|
|
|
116286
116299
|
})
|
|
116287
116300
|
]
|
|
116288
116301
|
});
|
|
116289
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.76.
|
|
116302
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.76.10");
|
|
116290
116303
|
}
|
|
116291
116304
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
116292
116305
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -118736,6 +118749,7 @@ var init_types2 = __esm(() => {
|
|
|
118736
118749
|
model: exports_external.string().optional().describe("Selected model name for the active provider"),
|
|
118737
118750
|
baseUrl: exports_external.string().optional().describe("Provider base URL without embedded credentials"),
|
|
118738
118751
|
timeoutMs: exports_external.number().int().positive().optional().describe("Provider HTTP request timeout in milliseconds. Defaults to 120000."),
|
|
118752
|
+
streamTimeoutMs: exports_external.number().int().positive().optional().describe("How long a streaming request may wait for response headers, in milliseconds. Defaults to 900000; mid-stream liveness is governed by the inactivity watchdog."),
|
|
118739
118753
|
commandPath: exports_external.string().optional().describe("Explicit official CLI executable path for subscription providers"),
|
|
118740
118754
|
fallback: exports_external.union([exports_external.enum(PROVIDER_SETTING_IDS), exports_external.literal("disabled")]).optional().describe("Optional recovery provider shown by provider diagnostics; switching is always explicit"),
|
|
118741
118755
|
openaiTransport: exports_external.enum(["chat-completions", "responses"]).optional().describe("OpenAI API transport. Defaults to chat-completions; Responses is explicit opt-in."),
|
|
@@ -126067,7 +126081,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
126067
126081
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
126068
126082
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
126069
126083
|
}
|
|
126070
|
-
var urVersion = "1.76.
|
|
126084
|
+
var urVersion = "1.76.10", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
|
|
126071
126085
|
var init_trends = __esm(() => {
|
|
126072
126086
|
init_a2aCardSignature();
|
|
126073
126087
|
coverage = [
|
|
@@ -128870,7 +128884,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
128870
128884
|
if (!isAttributionHeaderEnabled()) {
|
|
128871
128885
|
return "";
|
|
128872
128886
|
}
|
|
128873
|
-
const version2 = `${"1.76.
|
|
128887
|
+
const version2 = `${"1.76.10"}.${fingerprint}`;
|
|
128874
128888
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
128875
128889
|
const cch = "";
|
|
128876
128890
|
const workload = getWorkload();
|
|
@@ -156869,7 +156883,7 @@ var init_projectSafety = __esm(() => {
|
|
|
156869
156883
|
function getInstruments() {
|
|
156870
156884
|
if (instruments)
|
|
156871
156885
|
return instruments;
|
|
156872
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.76.
|
|
156886
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.76.10");
|
|
156873
156887
|
instruments = {
|
|
156874
156888
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
156875
156889
|
description: "GenAI operation duration.",
|
|
@@ -156967,7 +156981,7 @@ function genAiAgentAttributes() {
|
|
|
156967
156981
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
156968
156982
|
"gen_ai.provider.name": "ur",
|
|
156969
156983
|
"gen_ai.agent.name": "UR-Nexus",
|
|
156970
|
-
"gen_ai.agent.version": "1.76.
|
|
156984
|
+
"gen_ai.agent.version": "1.76.10"
|
|
156971
156985
|
};
|
|
156972
156986
|
}
|
|
156973
156987
|
function genAiWorkflowAttributes(workflowName) {
|
|
@@ -156983,7 +156997,7 @@ function genAiWorkflowAttributes(workflowName) {
|
|
|
156983
156997
|
function startGenAiWorkflowSpan(workflowName) {
|
|
156984
156998
|
const attributes = genAiWorkflowAttributes(workflowName);
|
|
156985
156999
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
156986
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
157000
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.10").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
156987
157001
|
}
|
|
156988
157002
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
156989
157003
|
try {
|
|
@@ -157021,7 +157035,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
157021
157035
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
157022
157036
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
157023
157037
|
}
|
|
157024
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
157038
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.76.10").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
157025
157039
|
}
|
|
157026
157040
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
157027
157041
|
try {
|
|
@@ -200780,7 +200794,7 @@ var require_color_convert = __commonJS((exports, module) => {
|
|
|
200780
200794
|
module.exports = convert;
|
|
200781
200795
|
});
|
|
200782
200796
|
|
|
200783
|
-
// node_modules/cli-highlight/node_modules/ansi-styles/index.js
|
|
200797
|
+
// node_modules/cli-highlight/node_modules/chalk/node_modules/ansi-styles/index.js
|
|
200784
200798
|
var require_ansi_styles = __commonJS((exports, module) => {
|
|
200785
200799
|
var wrapAnsi163 = (fn, offset) => (...args) => {
|
|
200786
200800
|
const code = fn(...args);
|
|
@@ -250669,7 +250683,7 @@ function getTelemetryAttributes() {
|
|
|
250669
250683
|
attributes["session.id"] = sessionId;
|
|
250670
250684
|
}
|
|
250671
250685
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
250672
|
-
attributes["app.version"] = "1.76.
|
|
250686
|
+
attributes["app.version"] = "1.76.10";
|
|
250673
250687
|
}
|
|
250674
250688
|
const oauthAccount = getOauthAccountInfo();
|
|
250675
250689
|
if (oauthAccount) {
|
|
@@ -259161,21 +259175,39 @@ async function* all3(generators, concurrencyCap = Infinity) {
|
|
|
259161
259175
|
};
|
|
259162
259176
|
const waiting = [...generators];
|
|
259163
259177
|
const promises = new Set;
|
|
259164
|
-
|
|
259165
|
-
|
|
259166
|
-
|
|
259167
|
-
|
|
259168
|
-
|
|
259169
|
-
|
|
259170
|
-
promises.
|
|
259171
|
-
|
|
259172
|
-
|
|
259173
|
-
|
|
259174
|
-
|
|
259178
|
+
const running = new Set;
|
|
259179
|
+
const start = (generator) => {
|
|
259180
|
+
running.add(generator);
|
|
259181
|
+
promises.add(next(generator));
|
|
259182
|
+
};
|
|
259183
|
+
try {
|
|
259184
|
+
while (promises.size < concurrencyCap && waiting.length > 0) {
|
|
259185
|
+
start(waiting.shift());
|
|
259186
|
+
}
|
|
259187
|
+
while (promises.size > 0) {
|
|
259188
|
+
const { done, value, generator, promise: promise2 } = await Promise.race(promises);
|
|
259189
|
+
promises.delete(promise2);
|
|
259190
|
+
if (!done) {
|
|
259191
|
+
promises.add(next(generator));
|
|
259192
|
+
if (value !== undefined) {
|
|
259193
|
+
yield value;
|
|
259194
|
+
}
|
|
259195
|
+
} else {
|
|
259196
|
+
running.delete(generator);
|
|
259197
|
+
if (waiting.length > 0) {
|
|
259198
|
+
start(waiting.shift());
|
|
259199
|
+
}
|
|
259175
259200
|
}
|
|
259176
|
-
}
|
|
259177
|
-
|
|
259178
|
-
|
|
259201
|
+
}
|
|
259202
|
+
} finally {
|
|
259203
|
+
for (const generator of running) {
|
|
259204
|
+
generator.return(undefined).catch(() => {});
|
|
259205
|
+
}
|
|
259206
|
+
for (const generator of waiting) {
|
|
259207
|
+
generator.return(undefined).catch(() => {});
|
|
259208
|
+
}
|
|
259209
|
+
for (const promise2 of promises) {
|
|
259210
|
+
promise2.catch(() => {});
|
|
259179
259211
|
}
|
|
259180
259212
|
}
|
|
259181
259213
|
}
|
|
@@ -259198,11 +259230,16 @@ var init_generators = __esm(() => {
|
|
|
259198
259230
|
|
|
259199
259231
|
// src/services/tools/toolOrchestration.ts
|
|
259200
259232
|
function getMaxToolUseConcurrency() {
|
|
259201
|
-
|
|
259202
|
-
|
|
259203
|
-
|
|
259233
|
+
for (const raw of [
|
|
259234
|
+
process.env.UR_CODE_MAX_TOOL_USE_CONCURRENCY,
|
|
259235
|
+
process.env.UR_MAX_CONCURRENT_TOOLS
|
|
259236
|
+
]) {
|
|
259237
|
+
const configured = Number.parseInt(raw ?? "", 10);
|
|
259238
|
+
if (Number.isFinite(configured) && configured >= 1) {
|
|
259239
|
+
return Math.min(configured, HARD_MAX_TOOL_USE_CONCURRENCY);
|
|
259240
|
+
}
|
|
259204
259241
|
}
|
|
259205
|
-
return
|
|
259242
|
+
return DEFAULT_MAX_TOOL_USE_CONCURRENCY;
|
|
259206
259243
|
}
|
|
259207
259244
|
function assistantMessageContainsToolUse(message, toolUseId) {
|
|
259208
259245
|
const content = message.message?.content;
|
|
@@ -297153,7 +297190,7 @@ function getInstallationEnv() {
|
|
|
297153
297190
|
return;
|
|
297154
297191
|
}
|
|
297155
297192
|
function getURCodeVersion() {
|
|
297156
|
-
return "1.76.
|
|
297193
|
+
return "1.76.10";
|
|
297157
297194
|
}
|
|
297158
297195
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
297159
297196
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -304484,7 +304521,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
304484
304521
|
const client2 = new Client({
|
|
304485
304522
|
name: "ur",
|
|
304486
304523
|
title: "UR",
|
|
304487
|
-
version: "1.76.
|
|
304524
|
+
version: "1.76.10",
|
|
304488
304525
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304489
304526
|
websiteUrl: PRODUCT_URL
|
|
304490
304527
|
}, {
|
|
@@ -304844,7 +304881,7 @@ var init_client5 = __esm(() => {
|
|
|
304844
304881
|
const client2 = new Client({
|
|
304845
304882
|
name: "ur",
|
|
304846
304883
|
title: "UR",
|
|
304847
|
-
version: "1.76.
|
|
304884
|
+
version: "1.76.10",
|
|
304848
304885
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
304849
304886
|
websiteUrl: PRODUCT_URL
|
|
304850
304887
|
}, {
|
|
@@ -317397,7 +317434,7 @@ async function createRuntime() {
|
|
|
317397
317434
|
bootstrapTelemetry();
|
|
317398
317435
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
317399
317436
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
317400
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.
|
|
317437
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.76.10"
|
|
317401
317438
|
}));
|
|
317402
317439
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
317403
317440
|
resource,
|
|
@@ -317430,11 +317467,11 @@ async function createRuntime() {
|
|
|
317430
317467
|
setMeterProvider(meterProvider);
|
|
317431
317468
|
setLoggerProvider(loggerProvider);
|
|
317432
317469
|
if (meterProvider) {
|
|
317433
|
-
const meter = meterProvider.getMeter("ur-agent", "1.76.
|
|
317470
|
+
const meter = meterProvider.getMeter("ur-agent", "1.76.10");
|
|
317434
317471
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
317435
317472
|
}
|
|
317436
317473
|
if (loggerProvider) {
|
|
317437
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.
|
|
317474
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.76.10"));
|
|
317438
317475
|
}
|
|
317439
317476
|
if (!cleanupRegistered2) {
|
|
317440
317477
|
cleanupRegistered2 = true;
|
|
@@ -318096,9 +318133,9 @@ async function assertMinVersion() {
|
|
|
318096
318133
|
if (false) {}
|
|
318097
318134
|
try {
|
|
318098
318135
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
318099
|
-
if (versionConfig.minVersion && lt("1.76.
|
|
318136
|
+
if (versionConfig.minVersion && lt("1.76.10", versionConfig.minVersion)) {
|
|
318100
318137
|
console.error(`
|
|
318101
|
-
It looks like your version of UR (${"1.76.
|
|
318138
|
+
It looks like your version of UR (${"1.76.10"}) needs an update.
|
|
318102
318139
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
318103
318140
|
|
|
318104
318141
|
To update, please run:
|
|
@@ -318314,7 +318351,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318314
318351
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
318315
318352
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
318316
318353
|
pid: process.pid,
|
|
318317
|
-
currentVersion: "1.76.
|
|
318354
|
+
currentVersion: "1.76.10"
|
|
318318
318355
|
});
|
|
318319
318356
|
return "in_progress";
|
|
318320
318357
|
}
|
|
@@ -318323,7 +318360,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
318323
318360
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
318324
318361
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
318325
318362
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
318326
|
-
currentVersion: "1.76.
|
|
318363
|
+
currentVersion: "1.76.10"
|
|
318327
318364
|
});
|
|
318328
318365
|
console.error(`
|
|
318329
318366
|
Error: Windows NPM detected in WSL
|
|
@@ -318858,7 +318895,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
318858
318895
|
}
|
|
318859
318896
|
async function getDoctorDiagnostic() {
|
|
318860
318897
|
const installationType = await getCurrentInstallationType();
|
|
318861
|
-
const version2 = typeof MACRO !== "undefined" ? "1.76.
|
|
318898
|
+
const version2 = typeof MACRO !== "undefined" ? "1.76.10" : "unknown";
|
|
318862
318899
|
const installationPath = await getInstallationPath();
|
|
318863
318900
|
const invokedBinary = getInvokedBinary();
|
|
318864
318901
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -319793,8 +319830,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319793
319830
|
const maxVersion = await getMaxVersion();
|
|
319794
319831
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
319795
319832
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
319796
|
-
if (gte("1.76.
|
|
319797
|
-
logForDebugging(`Native installer: current version ${"1.76.
|
|
319833
|
+
if (gte("1.76.10", maxVersion)) {
|
|
319834
|
+
logForDebugging(`Native installer: current version ${"1.76.10"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
319798
319835
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
319799
319836
|
latency_ms: Date.now() - startTime,
|
|
319800
319837
|
max_version: maxVersion,
|
|
@@ -319805,7 +319842,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
319805
319842
|
version2 = maxVersion;
|
|
319806
319843
|
}
|
|
319807
319844
|
}
|
|
319808
|
-
if (!forceReinstall && version2 === "1.76.
|
|
319845
|
+
if (!forceReinstall && version2 === "1.76.10" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
319809
319846
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
319810
319847
|
logEvent("tengu_native_update_complete", {
|
|
319811
319848
|
latency_ms: Date.now() - startTime,
|
|
@@ -340979,16 +341016,8 @@ async function* runAgent({
|
|
|
340979
341016
|
}
|
|
340980
341017
|
if (message.type === "attachment") {
|
|
340981
341018
|
if (message.attachment.type === "max_turns_reached") {
|
|
340982
|
-
logForDebugging(`[Agent
|
|
340983
|
-
|
|
340984
|
-
{
|
|
340985
|
-
agentDefinition.agentType
|
|
340986
|
-
}
|
|
340987
|
-
] Reached max turns limit ($
|
|
340988
|
-
{
|
|
340989
|
-
message.attachment.maxTurns
|
|
340990
|
-
}
|
|
340991
|
-
)`);
|
|
341019
|
+
logForDebugging(`[Agent: ${agentDefinition.agentType}] Reached max turns limit (${message.attachment.maxTurns})`);
|
|
341020
|
+
yield message;
|
|
340992
341021
|
break;
|
|
340993
341022
|
}
|
|
340994
341023
|
yield message;
|
|
@@ -365370,8 +365399,43 @@ function stripTrailingWhitespace(str2) {
|
|
|
365370
365399
|
}
|
|
365371
365400
|
return result;
|
|
365372
365401
|
}
|
|
365402
|
+
function foldInvisibleChars(line) {
|
|
365403
|
+
return line.normalize("NFC").replace(EXOTIC_SPACES, " ").replace(ZERO_WIDTH, "");
|
|
365404
|
+
}
|
|
365373
365405
|
function normalizeLineForMatch(line) {
|
|
365374
|
-
return line.replaceAll("\t", " ").replace(/\s+$/, "");
|
|
365406
|
+
return foldInvisibleChars(line).replaceAll("\t", " ").replace(/\s+$/, "");
|
|
365407
|
+
}
|
|
365408
|
+
function lineBody(line) {
|
|
365409
|
+
return normalizeLineForMatch(line).trimStart();
|
|
365410
|
+
}
|
|
365411
|
+
function indentWidth(line) {
|
|
365412
|
+
const normalized = normalizeLineForMatch(line);
|
|
365413
|
+
return normalized.length - normalized.trimStart().length;
|
|
365414
|
+
}
|
|
365415
|
+
function shiftIndentation(text, columns) {
|
|
365416
|
+
if (columns === 0)
|
|
365417
|
+
return text;
|
|
365418
|
+
return text.split(`
|
|
365419
|
+
`).map((line) => {
|
|
365420
|
+
if (line.trim() === "")
|
|
365421
|
+
return line;
|
|
365422
|
+
if (columns > 0)
|
|
365423
|
+
return " ".repeat(columns) + line;
|
|
365424
|
+
const removable = line.length - line.trimStart().length;
|
|
365425
|
+
return line.slice(Math.min(-columns, removable));
|
|
365426
|
+
}).join(`
|
|
365427
|
+
`);
|
|
365428
|
+
}
|
|
365429
|
+
function stripLineNumberPrefixes(searchString) {
|
|
365430
|
+
const lines = searchString.split(`
|
|
365431
|
+
`);
|
|
365432
|
+
const meaningful = lines.filter((line) => line.trim() !== "");
|
|
365433
|
+
if (meaningful.length === 0)
|
|
365434
|
+
return null;
|
|
365435
|
+
if (!meaningful.every((line) => LINE_NUMBER_PREFIX.test(line)))
|
|
365436
|
+
return null;
|
|
365437
|
+
return lines.map((line) => line.replace(LINE_NUMBER_PREFIX, "")).join(`
|
|
365438
|
+
`);
|
|
365375
365439
|
}
|
|
365376
365440
|
function findActualStringWhitespaceTolerant(fileContent, searchString) {
|
|
365377
365441
|
const searchLines = searchString.split(`
|
|
@@ -365404,17 +365468,110 @@ function findActualStringWhitespaceTolerant(fileContent, searchString) {
|
|
|
365404
365468
|
}
|
|
365405
365469
|
return null;
|
|
365406
365470
|
}
|
|
365407
|
-
function
|
|
365471
|
+
function findActualStringIndentTolerant(fileContent, searchString) {
|
|
365472
|
+
const searchLines = searchString.split(`
|
|
365473
|
+
`);
|
|
365474
|
+
const fileLines = fileContent.split(`
|
|
365475
|
+
`);
|
|
365476
|
+
if (searchLines.length === 0 || searchLines.length > fileLines.length) {
|
|
365477
|
+
return null;
|
|
365478
|
+
}
|
|
365479
|
+
const searchBodies = searchLines.map(lineBody);
|
|
365480
|
+
const firstBody = searchBodies[0];
|
|
365481
|
+
if (searchBodies.every((body) => body === ""))
|
|
365482
|
+
return null;
|
|
365483
|
+
for (let start = 0;start <= fileLines.length - searchLines.length; start++) {
|
|
365484
|
+
if (lineBody(fileLines[start]) !== firstBody)
|
|
365485
|
+
continue;
|
|
365486
|
+
let shift = null;
|
|
365487
|
+
let match = true;
|
|
365488
|
+
for (let j2 = 0;j2 < searchLines.length; j2++) {
|
|
365489
|
+
const fileLine = fileLines[start + j2];
|
|
365490
|
+
const searchBody = searchBodies[j2];
|
|
365491
|
+
if (lineBody(fileLine) !== searchBody) {
|
|
365492
|
+
match = false;
|
|
365493
|
+
break;
|
|
365494
|
+
}
|
|
365495
|
+
if (searchBody === "")
|
|
365496
|
+
continue;
|
|
365497
|
+
const lineShift = indentWidth(fileLine) - indentWidth(searchLines[j2]);
|
|
365498
|
+
if (shift === null) {
|
|
365499
|
+
shift = lineShift;
|
|
365500
|
+
} else if (shift !== lineShift) {
|
|
365501
|
+
match = false;
|
|
365502
|
+
break;
|
|
365503
|
+
}
|
|
365504
|
+
}
|
|
365505
|
+
if (match && shift !== null && shift !== 0) {
|
|
365506
|
+
return {
|
|
365507
|
+
actual: fileLines.slice(start, start + searchLines.length).join(`
|
|
365508
|
+
`),
|
|
365509
|
+
indentShift: shift
|
|
365510
|
+
};
|
|
365511
|
+
}
|
|
365512
|
+
}
|
|
365513
|
+
return null;
|
|
365514
|
+
}
|
|
365515
|
+
function findEditTarget(fileContent, searchString) {
|
|
365408
365516
|
if (fileContent.includes(searchString)) {
|
|
365409
|
-
return searchString;
|
|
365517
|
+
return { actual: searchString, indentShift: 0 };
|
|
365410
365518
|
}
|
|
365411
365519
|
const normalizedSearch = normalizeQuotes(searchString);
|
|
365412
365520
|
const normalizedFile = normalizeQuotes(fileContent);
|
|
365413
365521
|
const searchIndex = normalizedFile.indexOf(normalizedSearch);
|
|
365414
365522
|
if (searchIndex !== -1) {
|
|
365415
|
-
return
|
|
365523
|
+
return {
|
|
365524
|
+
actual: fileContent.substring(searchIndex, searchIndex + searchString.length),
|
|
365525
|
+
indentShift: 0
|
|
365526
|
+
};
|
|
365527
|
+
}
|
|
365528
|
+
const whitespaceMatch = findActualStringWhitespaceTolerant(fileContent, searchString);
|
|
365529
|
+
if (whitespaceMatch !== null) {
|
|
365530
|
+
return { actual: whitespaceMatch, indentShift: 0 };
|
|
365531
|
+
}
|
|
365532
|
+
const indentMatch = findActualStringIndentTolerant(fileContent, searchString);
|
|
365533
|
+
if (indentMatch !== null) {
|
|
365534
|
+
return indentMatch;
|
|
365535
|
+
}
|
|
365536
|
+
const withoutPrefixes = stripLineNumberPrefixes(searchString);
|
|
365537
|
+
if (withoutPrefixes !== null && withoutPrefixes !== searchString) {
|
|
365538
|
+
return findEditTarget(fileContent, withoutPrefixes);
|
|
365539
|
+
}
|
|
365540
|
+
return null;
|
|
365541
|
+
}
|
|
365542
|
+
function findActualString(fileContent, searchString) {
|
|
365543
|
+
return findEditTarget(fileContent, searchString)?.actual ?? null;
|
|
365544
|
+
}
|
|
365545
|
+
function describeEditMatchFailure(fileContent, searchString) {
|
|
365546
|
+
const searchLines = searchString.split(`
|
|
365547
|
+
`);
|
|
365548
|
+
const firstSearchLine = searchLines.find((line) => line.trim() !== "");
|
|
365549
|
+
if (firstSearchLine === undefined) {
|
|
365550
|
+
return "String to replace not found in file. The string is blank.";
|
|
365416
365551
|
}
|
|
365417
|
-
|
|
365552
|
+
const fileLines = fileContent.split(`
|
|
365553
|
+
`);
|
|
365554
|
+
const anchorBody = lineBody(firstSearchLine);
|
|
365555
|
+
const anchors = fileLines.map((line, index2) => ({ line, index: index2 })).filter((entry) => lineBody(entry.line) === anchorBody);
|
|
365556
|
+
if (anchors.length === 0) {
|
|
365557
|
+
return "String to replace not found in file. No line in the file matches its " + `first line: ${JSON.stringify(firstSearchLine.trim())}. Read the file ` + "again and copy the target text from the current contents.";
|
|
365558
|
+
}
|
|
365559
|
+
const anchor = anchors[0];
|
|
365560
|
+
const offset = searchLines.indexOf(firstSearchLine);
|
|
365561
|
+
const details = anchors.slice(0, 3).map((entry) => {
|
|
365562
|
+
const start = entry.index - offset;
|
|
365563
|
+
for (let j2 = 0;j2 < searchLines.length; j2++) {
|
|
365564
|
+
const fileLine = fileLines[start + j2];
|
|
365565
|
+
if (fileLine === undefined) {
|
|
365566
|
+
return `line ${entry.index + 1}: the file ends before the string does`;
|
|
365567
|
+
}
|
|
365568
|
+
if (lineBody(fileLine) !== lineBody(searchLines[j2])) {
|
|
365569
|
+
return `line ${start + j2 + 1}: file has ${JSON.stringify(fileLine)}, ` + `string has ${JSON.stringify(searchLines[j2])}`;
|
|
365570
|
+
}
|
|
365571
|
+
}
|
|
365572
|
+
return `line ${entry.index + 1}: matches`;
|
|
365573
|
+
}).join("; ");
|
|
365574
|
+
return `String to replace not found in file. Its first line appears at line ` + `${anchor.index + 1}, but the block diverges \u2014 ${details}.`;
|
|
365418
365575
|
}
|
|
365419
365576
|
function preserveQuoteStyle(oldString, actualOldString, newString) {
|
|
365420
365577
|
if (oldString === actualOldString) {
|
|
@@ -365715,7 +365872,7 @@ function areFileEditsInputsEquivalent(input1, input2) {
|
|
|
365715
365872
|
}
|
|
365716
365873
|
return areFileEditsEquivalent(input1.edits, input2.edits, fileContent);
|
|
365717
365874
|
}
|
|
365718
|
-
var LEFT_SINGLE_CURLY_QUOTE = "\u2018", RIGHT_SINGLE_CURLY_QUOTE = "\u2019", LEFT_DOUBLE_CURLY_QUOTE = "\u201C", RIGHT_DOUBLE_CURLY_QUOTE = "\u201D", DIFF_SNIPPET_MAX_BYTES = 8192, DESANITIZATIONS;
|
|
365875
|
+
var LEFT_SINGLE_CURLY_QUOTE = "\u2018", RIGHT_SINGLE_CURLY_QUOTE = "\u2019", LEFT_DOUBLE_CURLY_QUOTE = "\u201C", RIGHT_DOUBLE_CURLY_QUOTE = "\u201D", EXOTIC_SPACES, ZERO_WIDTH, LINE_NUMBER_PREFIX, DIFF_SNIPPET_MAX_BYTES = 8192, DESANITIZATIONS;
|
|
365719
365876
|
var init_utils10 = __esm(() => {
|
|
365720
365877
|
init_libesm();
|
|
365721
365878
|
init_log2();
|
|
@@ -365724,6 +365881,9 @@ var init_utils10 = __esm(() => {
|
|
|
365724
365881
|
init_diff2();
|
|
365725
365882
|
init_errors();
|
|
365726
365883
|
init_file();
|
|
365884
|
+
EXOTIC_SPACES = /[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g;
|
|
365885
|
+
ZERO_WIDTH = /[\u200B-\u200D\u2060\uFEFF]/g;
|
|
365886
|
+
LINE_NUMBER_PREFIX = /^\s*\d+[\u2192\t]/;
|
|
365727
365887
|
DESANITIZATIONS = {
|
|
365728
365888
|
"<fnr>": "<function_results>",
|
|
365729
365889
|
"<n>": "<name>",
|
|
@@ -366269,13 +366429,13 @@ var init_FileEditTool = __esm(() => {
|
|
|
366269
366429
|
}
|
|
366270
366430
|
}
|
|
366271
366431
|
const file2 = fileContent;
|
|
366272
|
-
const
|
|
366432
|
+
const editTarget = findEditTarget(file2, old_string);
|
|
366433
|
+
const actualOldString = editTarget?.actual ?? null;
|
|
366273
366434
|
if (!actualOldString) {
|
|
366274
366435
|
return {
|
|
366275
366436
|
result: false,
|
|
366276
366437
|
behavior: "ask",
|
|
366277
|
-
message:
|
|
366278
|
-
String: ${old_string}`,
|
|
366438
|
+
message: describeEditMatchFailure(file2, old_string),
|
|
366279
366439
|
meta: {
|
|
366280
366440
|
isFilePathAbsolute: String(isAbsolute24(file_path))
|
|
366281
366441
|
},
|
|
@@ -366297,7 +366457,8 @@ String: ${old_string}`,
|
|
|
366297
366457
|
};
|
|
366298
366458
|
}
|
|
366299
366459
|
const settingsValidationResult = validateInputForSettingsFileEdit(fullFilePath, file2, () => {
|
|
366300
|
-
|
|
366460
|
+
const simulatedNewString = shiftIndentation(new_string, editTarget?.indentShift ?? 0);
|
|
366461
|
+
return replace_all ? file2.replaceAll(actualOldString, simulatedNewString) : file2.replace(actualOldString, simulatedNewString);
|
|
366301
366462
|
});
|
|
366302
366463
|
if (settingsValidationResult !== null) {
|
|
366303
366464
|
return settingsValidationResult;
|
|
@@ -366364,8 +366525,9 @@ String: ${old_string}`,
|
|
|
366364
366525
|
throw new Error(FILE_UNEXPECTEDLY_MODIFIED_ERROR);
|
|
366365
366526
|
}
|
|
366366
366527
|
}
|
|
366367
|
-
|
|
366368
|
-
let
|
|
366528
|
+
const target = findEditTarget(originalFileContents, old_string);
|
|
366529
|
+
let actualOldString = target?.actual ?? old_string;
|
|
366530
|
+
let actualNewString = shiftIndentation(preserveQuoteStyle(old_string, actualOldString, new_string), target?.indentShift ?? 0);
|
|
366369
366531
|
const toolUseID = toolUseContext.toolUseId ?? parentMessage?.uuid ?? "";
|
|
366370
366532
|
const beforeEdit = await executeBeforeEditHooks(absoluteFilePath, actualOldString, actualNewString, replace_all, toolUseContext, toolUseID, toolUseContext.abortController.signal);
|
|
366371
366533
|
if (beforeEdit.updatedInput) {
|
|
@@ -379219,9 +379381,6 @@ var init_prompt19 = __esm(() => {
|
|
|
379219
379381
|
});
|
|
379220
379382
|
|
|
379221
379383
|
// src/tools/TaskCreateTool/TaskCreateTool.ts
|
|
379222
|
-
function normalizeTaskId(candidate) {
|
|
379223
|
-
return candidate.trim().replace(/^#/gu, "");
|
|
379224
|
-
}
|
|
379225
379384
|
var inputSchema38, outputSchema33, TaskCreateTool;
|
|
379226
379385
|
var init_TaskCreateTool = __esm(() => {
|
|
379227
379386
|
init_v4();
|
|
@@ -379291,11 +379450,10 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
379291
379450
|
addBlockedBy,
|
|
379292
379451
|
addToCurrentList
|
|
379293
379452
|
}, context5) {
|
|
379294
|
-
const
|
|
379295
|
-
const
|
|
379296
|
-
const initialBlockedBy = normalize13([
|
|
379453
|
+
const initialBlocks = [...new Set([...blocks ?? [], ...addBlocks ?? []])];
|
|
379454
|
+
const initialBlockedBy = [
|
|
379297
379455
|
...new Set([...blockedBy ?? [], ...addBlockedBy ?? []])
|
|
379298
|
-
]
|
|
379456
|
+
];
|
|
379299
379457
|
const taskListId = getTaskListId();
|
|
379300
379458
|
const run2 = getTaskListRunContext() ?? (context5.agentId ? undefined : getTaskListRunFromMessages(context5.messages ?? []));
|
|
379301
379459
|
const taskData = {
|
|
@@ -379311,36 +379469,27 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
379311
379469
|
const taskId = run2 ? await createTaskForRun(taskListId, run2.generationId, taskData, {
|
|
379312
379470
|
appendToCurrent: run2.appendToCurrent || addToCurrentList === true
|
|
379313
379471
|
}) : await createTask(taskListId, taskData);
|
|
379314
|
-
const
|
|
379315
|
-
|
|
379316
|
-
|
|
379317
|
-
|
|
379318
|
-
|
|
379319
|
-
|
|
379320
|
-
|
|
379321
|
-
|
|
379322
|
-
|
|
379323
|
-
|
|
379324
|
-
|
|
379325
|
-
|
|
379326
|
-
};
|
|
379327
|
-
|
|
379328
|
-
|
|
379329
|
-
|
|
379330
|
-
|
|
379331
|
-
|
|
379332
|
-
|
|
379333
|
-
if (candidateDependencies.length > 0) {
|
|
379334
|
-
const dependencyResult = await updateTaskWithDependencies(taskListId, taskId, {}, candidateDependencies);
|
|
379335
|
-
if (dependencyResult.success === false) {
|
|
379336
|
-
const dependency = dependencyResult.dependency;
|
|
379337
|
-
await deleteTask(taskListId, taskId);
|
|
379338
|
-
if (dependency) {
|
|
379339
|
-
const field = candidateDependencies.find((candidate) => candidate.fromTaskId === dependency.fromTaskId && candidate.toTaskId === dependency.toTaskId)?.field ?? "dependency";
|
|
379340
|
-
throw new Error(`Invalid ${field} dependency ` + `#${dependency.fromTaskId} -> #${dependency.toTaskId}: ` + dependencyResult.reason);
|
|
379341
|
-
}
|
|
379342
|
-
throw new Error(`Failed to create task dependencies: ${dependencyResult.reason}`);
|
|
379472
|
+
const dependencies = [
|
|
379473
|
+
...initialBlocks.map((targetId) => ({
|
|
379474
|
+
fromTaskId: taskId,
|
|
379475
|
+
toTaskId: targetId,
|
|
379476
|
+
field: "blocks"
|
|
379477
|
+
})),
|
|
379478
|
+
...initialBlockedBy.map((blockerId) => ({
|
|
379479
|
+
fromTaskId: blockerId,
|
|
379480
|
+
toTaskId: taskId,
|
|
379481
|
+
field: "blockedBy"
|
|
379482
|
+
}))
|
|
379483
|
+
];
|
|
379484
|
+
const dependencyResult = await updateTaskWithDependencies(taskListId, taskId, {}, dependencies);
|
|
379485
|
+
if (dependencyResult.success === false) {
|
|
379486
|
+
const dependency = dependencyResult.dependency;
|
|
379487
|
+
await deleteTask(taskListId, taskId);
|
|
379488
|
+
if (dependency) {
|
|
379489
|
+
const field = dependencies.find((candidate) => candidate.fromTaskId === dependency.fromTaskId && candidate.toTaskId === dependency.toTaskId)?.field ?? "dependency";
|
|
379490
|
+
throw new Error(`Invalid ${field} dependency ` + `#${dependency.fromTaskId} -> #${dependency.toTaskId}: ` + dependencyResult.reason);
|
|
379343
379491
|
}
|
|
379492
|
+
throw new Error(`Failed to create task dependencies: ${dependencyResult.reason}`);
|
|
379344
379493
|
}
|
|
379345
379494
|
const blockingErrors = [];
|
|
379346
379495
|
const generator = executeTaskCreatedHooks(taskId, subject, description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
|
|
@@ -379590,9 +379739,6 @@ Set up task dependencies:
|
|
|
379590
379739
|
`;
|
|
379591
379740
|
|
|
379592
379741
|
// src/tools/TaskUpdateTool/TaskUpdateTool.ts
|
|
379593
|
-
function normalizeTaskId2(candidate) {
|
|
379594
|
-
return candidate.trim().replace(/^#/gu, "");
|
|
379595
|
-
}
|
|
379596
379742
|
var inputSchema40, outputSchema35, TaskUpdateTool;
|
|
379597
379743
|
var init_TaskUpdateTool = __esm(() => {
|
|
379598
379744
|
init_v4();
|
|
@@ -379694,16 +379840,13 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
379694
379840
|
}
|
|
379695
379841
|
};
|
|
379696
379842
|
}
|
|
379697
|
-
const normalize13 = (raw) => [...new Set(raw.map(normalizeTaskId2).filter(Boolean))];
|
|
379698
|
-
const addBlockIds = normalize13(addBlocks ?? []);
|
|
379699
|
-
const addBlockedByIds = normalize13(addBlockedBy ?? []);
|
|
379700
379843
|
const requestedDependencies = [
|
|
379701
|
-
...
|
|
379844
|
+
...(addBlocks ?? []).map((targetId) => ({
|
|
379702
379845
|
fromTaskId: taskId,
|
|
379703
379846
|
toTaskId: targetId,
|
|
379704
379847
|
field: "addBlocks"
|
|
379705
379848
|
})),
|
|
379706
|
-
...
|
|
379849
|
+
...(addBlockedBy ?? []).map((blockerId) => ({
|
|
379707
379850
|
fromTaskId: blockerId,
|
|
379708
379851
|
toTaskId: taskId,
|
|
379709
379852
|
field: "addBlockedBy"
|
|
@@ -383861,6 +384004,11 @@ var init_AgentTool = __esm(() => {
|
|
|
383861
384004
|
let finalMessage = extractTextContent(agentResult2.content, `
|
|
383862
384005
|
`);
|
|
383863
384006
|
if (false) {}
|
|
384007
|
+
if (agentMessages.some((_) => _.type === "attachment" && _.attachment?.type === "max_turns_reached")) {
|
|
384008
|
+
finalMessage = `Note: this agent stopped after reaching its maximum number of turns, so the result below is incomplete.
|
|
384009
|
+
|
|
384010
|
+
${finalMessage}`;
|
|
384011
|
+
}
|
|
383864
384012
|
const worktreeResult2 = await cleanupWorktreeIfNeeded();
|
|
383865
384013
|
enqueueAgentNotification({
|
|
383866
384014
|
taskId: backgroundedTaskId,
|
|
@@ -384061,10 +384209,12 @@ var init_AgentTool = __esm(() => {
|
|
|
384061
384209
|
}
|
|
384062
384210
|
const agentResult = finalizeAgentTool(agentMessages, syncAgentId, metadata);
|
|
384063
384211
|
if (false) {}
|
|
384212
|
+
const truncatedByMaxTurns = agentMessages.some((_) => _.type === "attachment" && _.attachment?.type === "max_turns_reached");
|
|
384213
|
+
const incompleteReason = syncAgentError ? errorMessage2(syncAgentError) : truncatedByMaxTurns ? "Agent stopped after reaching its maximum number of turns; the result is incomplete." : undefined;
|
|
384064
384214
|
return {
|
|
384065
384215
|
data: {
|
|
384066
|
-
status:
|
|
384067
|
-
...
|
|
384216
|
+
status: incompleteReason ? "partial" : "completed",
|
|
384217
|
+
...incompleteReason && { error: incompleteReason },
|
|
384068
384218
|
prompt,
|
|
384069
384219
|
...agentResult,
|
|
384070
384220
|
...worktreeResult
|
|
@@ -389399,7 +389549,7 @@ function isAnyTracingEnabled() {
|
|
|
389399
389549
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
389400
389550
|
}
|
|
389401
389551
|
function getTracer() {
|
|
389402
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.
|
|
389552
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.76.10");
|
|
389403
389553
|
}
|
|
389404
389554
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
389405
389555
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -391513,56 +391663,7 @@ function buildSchemaNotSentHint(tool, messages, tools) {
|
|
|
391513
391663
|
|
|
391514
391664
|
This tool's schema was not sent to the API \u2014 it was not in the discovered-tool set derived from message history. ` + `Without the schema in your prompt, typed parameters (arrays, numbers, booleans) get emitted as strings and the client-side parser rejects them. Load the tool first: call ${TOOL_SEARCH_TOOL_NAME} with query "select:${tool.name}", then retry this call.`;
|
|
391515
391665
|
}
|
|
391516
|
-
function isObjectValue(value) {
|
|
391517
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
391518
|
-
}
|
|
391519
|
-
function normalizeExecutionToolInput(tool, input) {
|
|
391520
|
-
if (tool.name === ASK_USER_QUESTION_TOOL_NAME) {
|
|
391521
|
-
const normalized = normalizeAskUserQuestionInput(input);
|
|
391522
|
-
if (!isObjectValue(normalized)) {
|
|
391523
|
-
const problemsInput = Array.isArray(normalized) ? { questions: normalized } : isObjectValue(normalized) ? normalized : isObjectValue(input) ? input : undefined;
|
|
391524
|
-
const problems2 = problemsInput ? describeQuestionPayloadProblems(problemsInput) : ["Input must be an object with a `questions` array."];
|
|
391525
|
-
return {
|
|
391526
|
-
input,
|
|
391527
|
-
validationHint: `AskUserQuestion input cannot be rendered: ${problems2.join(" ")}`
|
|
391528
|
-
};
|
|
391529
|
-
}
|
|
391530
|
-
const problems = describeQuestionPayloadProblems(normalized);
|
|
391531
|
-
if (problems.length > 0) {
|
|
391532
|
-
return {
|
|
391533
|
-
input: normalized,
|
|
391534
|
-
validationHint: `AskUserQuestion input cannot be rendered: ${problems.join(" ")}`
|
|
391535
|
-
};
|
|
391536
|
-
}
|
|
391537
|
-
return { input: normalized };
|
|
391538
|
-
}
|
|
391539
|
-
if (tool.name === FILE_WRITE_TOOL_NAME && tool === FileWriteTool) {
|
|
391540
|
-
const parsed = FileWriteTool.inputSchema.safeParse(input);
|
|
391541
|
-
if (parsed.success) {
|
|
391542
|
-
return { input: parsed.data };
|
|
391543
|
-
}
|
|
391544
|
-
return {
|
|
391545
|
-
input,
|
|
391546
|
-
validationHint: parsed.error.issues.map((issue2) => issue2.message).join(". ")
|
|
391547
|
-
};
|
|
391548
|
-
}
|
|
391549
|
-
return { input };
|
|
391550
|
-
}
|
|
391551
|
-
function formatToolInputError(toolName, reason) {
|
|
391552
|
-
if (toolName === ASK_USER_QUESTION_TOOL_NAME || toolName === FILE_WRITE_TOOL_NAME) {
|
|
391553
|
-
return {
|
|
391554
|
-
toolUseError: reason,
|
|
391555
|
-
toolUseResult: reason
|
|
391556
|
-
};
|
|
391557
|
-
}
|
|
391558
|
-
return {
|
|
391559
|
-
toolUseError: `InputValidationError: ${reason}`,
|
|
391560
|
-
toolUseResult: `InputValidationError: ${reason}`
|
|
391561
|
-
};
|
|
391562
|
-
}
|
|
391563
391666
|
async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContext, canUseTool, assistantMessage, messageId, requestId, mcpServerType, mcpServerBaseUrl, onToolProgress) {
|
|
391564
|
-
const normalized = normalizeExecutionToolInput(tool, input);
|
|
391565
|
-
input = normalized.input;
|
|
391566
391667
|
let parsedInput = tool.inputSchema.safeParse(input);
|
|
391567
391668
|
if (!parsedInput.success && parsedInput.error.issues.length > 0 && parsedInput.error.issues.every((issue2) => issue2.code === "unrecognized_keys")) {
|
|
391568
391669
|
const { input: cleaned, stripped } = stripUnrecognizedKeys(input, parsedInput.error.issues);
|
|
@@ -391604,17 +391705,9 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
391604
391705
|
];
|
|
391605
391706
|
}
|
|
391606
391707
|
if (!parsedInput.success) {
|
|
391607
|
-
const normalizedHint = normalized.validationHint;
|
|
391608
391708
|
recordCallFailure(callSig);
|
|
391609
|
-
|
|
391610
|
-
|
|
391611
|
-
const questionProblems = tool.name === ASK_USER_QUESTION_TOOL_NAME ? describeQuestionPayloadProblems(normalizeAskUserQuestionInput(input)) : [];
|
|
391612
|
-
if (questionProblems.length > 0) {
|
|
391613
|
-
errorContent = `${tool.name} input cannot be rendered: ${questionProblems.join(" ")}`;
|
|
391614
|
-
} else {
|
|
391615
|
-
errorContent = formatZodValidationError(tool.name, parsedInput.error);
|
|
391616
|
-
}
|
|
391617
|
-
}
|
|
391709
|
+
const questionProblems = tool.name === ASK_USER_QUESTION_TOOL_NAME ? describeQuestionPayloadProblems(normalizeAskUserQuestionInput(input)) : [];
|
|
391710
|
+
let errorContent = questionProblems.length > 0 ? `${tool.name} input cannot be rendered: ${questionProblems.join(" ")}` : formatZodValidationError(tool.name, parsedInput.error);
|
|
391618
391711
|
const schemaHint = buildSchemaNotSentHint(tool, toolUseContext.messages, toolUseContext.options.tools);
|
|
391619
391712
|
if (schemaHint) {
|
|
391620
391713
|
logEvent("tengu_deferred_tool_schema_not_sent", {
|
|
@@ -391643,19 +391736,18 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
391643
391736
|
},
|
|
391644
391737
|
...mcpToolDetailsForAnalytics(tool.name, mcpServerType, mcpServerBaseUrl)
|
|
391645
391738
|
});
|
|
391646
|
-
const { toolUseError, toolUseResult } = formatToolInputError(tool.name, errorContent);
|
|
391647
391739
|
return [
|
|
391648
391740
|
{
|
|
391649
391741
|
message: createUserMessage({
|
|
391650
391742
|
content: [
|
|
391651
391743
|
{
|
|
391652
391744
|
type: "tool_result",
|
|
391653
|
-
content: `<tool_use_error
|
|
391745
|
+
content: `<tool_use_error>InputValidationError: ${errorContent}</tool_use_error>`,
|
|
391654
391746
|
is_error: true,
|
|
391655
391747
|
tool_use_id: toolUseID
|
|
391656
391748
|
}
|
|
391657
391749
|
],
|
|
391658
|
-
toolUseResult
|
|
391750
|
+
toolUseResult: `InputValidationError: ${parsedInput.error.message}`,
|
|
391659
391751
|
sourceToolAssistantUUID: assistantMessage.uuid
|
|
391660
391752
|
})
|
|
391661
391753
|
}
|
|
@@ -391966,8 +392058,6 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
391966
392058
|
endToolSpan();
|
|
391967
392059
|
toolUseContext.toolDecisions?.delete(toolUseID);
|
|
391968
392060
|
};
|
|
391969
|
-
const finalNormalized = normalizeExecutionToolInput(tool, callInput);
|
|
391970
|
-
callInput = finalNormalized.input;
|
|
391971
392061
|
const finalParsedInput = tool.inputSchema.safeParse(callInput);
|
|
391972
392062
|
if (!finalParsedInput.success) {
|
|
391973
392063
|
callSig = callSignature(tool.name, callInput, repeatedFailureScope(toolUseContext, messageId));
|
|
@@ -391996,21 +392086,18 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
|
|
|
391996
392086
|
}
|
|
391997
392087
|
recordCallFailure(callSig);
|
|
391998
392088
|
const finalInputError = formatZodValidationError(tool.name, finalParsedInput.error);
|
|
391999
|
-
const finalInputContent = finalNormalized.validationHint ?? finalInputError;
|
|
392000
392089
|
finishPreExecutionRejection();
|
|
392001
|
-
const finalInputContentWithContext = tool.name === ASK_USER_QUESTION_TOOL_NAME || tool.name === FILE_WRITE_TOOL_NAME ? finalInputContent : `InputValidationError after input update: ${finalInputContent}`;
|
|
392002
|
-
const { toolUseError, toolUseResult } = formatToolInputError(tool.name, finalInputContentWithContext);
|
|
392003
392090
|
resultingMessages.push({
|
|
392004
392091
|
message: createUserMessage({
|
|
392005
392092
|
content: [
|
|
392006
392093
|
{
|
|
392007
392094
|
type: "tool_result",
|
|
392008
|
-
content: `<tool_use_error
|
|
392095
|
+
content: `<tool_use_error>InputValidationError after input update: ${finalInputError}</tool_use_error>`,
|
|
392009
392096
|
is_error: true,
|
|
392010
392097
|
tool_use_id: toolUseID
|
|
392011
392098
|
}
|
|
392012
392099
|
],
|
|
392013
|
-
toolUseResult
|
|
392100
|
+
toolUseResult: `InputValidationError: ${finalParsedInput.error.message}`,
|
|
392014
392101
|
sourceToolAssistantUUID: assistantMessage.uuid
|
|
392015
392102
|
})
|
|
392016
392103
|
});
|
|
@@ -392478,7 +392565,6 @@ var init_toolExecution = __esm(() => {
|
|
|
392478
392565
|
init_bashPermissions();
|
|
392479
392566
|
init_prompt3();
|
|
392480
392567
|
init_prompt4();
|
|
392481
|
-
init_FileWriteTool();
|
|
392482
392568
|
init_gitOperationTracking();
|
|
392483
392569
|
init_prompt8();
|
|
392484
392570
|
init_tools2();
|
|
@@ -392591,9 +392677,7 @@ class StreamingToolExecutor {
|
|
|
392591
392677
|
return false;
|
|
392592
392678
|
if (!executingTools.every((t) => t.isConcurrencySafe))
|
|
392593
392679
|
return false;
|
|
392594
|
-
|
|
392595
|
-
const cap = Number.isFinite(envCap) && envCap >= 1 ? Math.min(Math.floor(envCap), 32) : MAX_CONCURRENT_TOOLS;
|
|
392596
|
-
return executingTools.length < cap;
|
|
392680
|
+
return executingTools.length < getMaxToolUseConcurrency();
|
|
392597
392681
|
}
|
|
392598
392682
|
async processQueue() {
|
|
392599
392683
|
if (this.discarded) {
|
|
@@ -392838,12 +392922,12 @@ function markToolUseAsComplete2(toolUseContext, toolUseID) {
|
|
|
392838
392922
|
return next;
|
|
392839
392923
|
});
|
|
392840
392924
|
}
|
|
392841
|
-
var MAX_CONCURRENT_TOOLS = 8;
|
|
392842
392925
|
var init_StreamingToolExecutor = __esm(() => {
|
|
392843
392926
|
init_messages();
|
|
392844
392927
|
init_Tool();
|
|
392845
392928
|
init_abortController();
|
|
392846
392929
|
init_toolExecution();
|
|
392930
|
+
init_toolOrchestration();
|
|
392847
392931
|
});
|
|
392848
392932
|
|
|
392849
392933
|
// src/utils/queryProfiler.ts
|
|
@@ -409562,40 +409646,6 @@ function joinTextAtSeam(a2, b) {
|
|
|
409562
409646
|
}
|
|
409563
409647
|
return [...a2, ...b];
|
|
409564
409648
|
}
|
|
409565
|
-
function safeJsonDebugValue(value) {
|
|
409566
|
-
try {
|
|
409567
|
-
return JSON.stringify(value, null, 2);
|
|
409568
|
-
} catch {
|
|
409569
|
-
return String(value);
|
|
409570
|
-
}
|
|
409571
|
-
}
|
|
409572
|
-
function normalizeIncomingWriteInputForAPI(input) {
|
|
409573
|
-
if (!isObject_default(input)) {
|
|
409574
|
-
return null;
|
|
409575
|
-
}
|
|
409576
|
-
const parsed = FileWriteTool.inputSchema.safeParse(input);
|
|
409577
|
-
if (!parsed.success) {
|
|
409578
|
-
return null;
|
|
409579
|
-
}
|
|
409580
|
-
return parsed.data;
|
|
409581
|
-
}
|
|
409582
|
-
function normalizeIncomingAskUserQuestionInputForAPI(input) {
|
|
409583
|
-
const normalized = normalizeAskUserQuestionInput(input);
|
|
409584
|
-
if (!isObject_default(normalized)) {
|
|
409585
|
-
return null;
|
|
409586
|
-
}
|
|
409587
|
-
if (describeQuestionPayloadProblems(normalized).length > 0) {
|
|
409588
|
-
return null;
|
|
409589
|
-
}
|
|
409590
|
-
return normalized;
|
|
409591
|
-
}
|
|
409592
|
-
function toolUseFallbackText(toolName, reason, input) {
|
|
409593
|
-
const safeInput = safeJsonDebugValue(input).slice(0, MAX_TOOL_USE_REPAIR_TEXT_CHARS);
|
|
409594
|
-
return {
|
|
409595
|
-
type: "text",
|
|
409596
|
-
text: `Tool ${toolName} call was not renderable (${reason}). Raw input: ${safeInput}`
|
|
409597
|
-
};
|
|
409598
|
-
}
|
|
409599
409649
|
function smooshIntoToolResult(tr, blocks) {
|
|
409600
409650
|
if (blocks.length === 0)
|
|
409601
409651
|
return tr;
|
|
@@ -409703,20 +409753,6 @@ function normalizeContentFromAPI(contentBlocks, tools, agentId) {
|
|
|
409703
409753
|
if (typeof normalizedInput !== "object" || normalizedInput === null || Array.isArray(normalizedInput)) {
|
|
409704
409754
|
throw new Error(`Tool use input for ${String(contentBlock.name)} must be a JSON object`);
|
|
409705
409755
|
}
|
|
409706
|
-
if (contentBlock.name === FILE_WRITE_TOOL_NAME) {
|
|
409707
|
-
const repaired = normalizeIncomingWriteInputForAPI(normalizedInput);
|
|
409708
|
-
if (repaired === null) {
|
|
409709
|
-
return toolUseFallbackText(String(contentBlock.name ?? FILE_WRITE_TOOL_NAME), "invalid Write arguments", contentBlock.input);
|
|
409710
|
-
}
|
|
409711
|
-
normalizedInput = repaired;
|
|
409712
|
-
}
|
|
409713
|
-
if (contentBlock.name === ASK_USER_QUESTION_TOOL_NAME) {
|
|
409714
|
-
const repaired = normalizeIncomingAskUserQuestionInputForAPI(normalizedInput);
|
|
409715
|
-
if (repaired === null) {
|
|
409716
|
-
return toolUseFallbackText(String(contentBlock.name ?? ASK_USER_QUESTION_TOOL_NAME), "invalid AskUserQuestion arguments", contentBlock.input);
|
|
409717
|
-
}
|
|
409718
|
-
normalizedInput = repaired;
|
|
409719
|
-
}
|
|
409720
409756
|
const sanitized = stripEmptyParameterNames(normalizedInput);
|
|
409721
409757
|
if (sanitized.stripped) {
|
|
409722
409758
|
normalizedInput = sanitized.input;
|
|
@@ -411569,7 +411605,7 @@ Note: The user's next message may contain a correction or preference. Pay close
|
|
|
411569
411605
|
`, PLAN_REJECTION_PREFIX = `The agent proposed a plan that was rejected by the user. The user chose to stay in plan mode rather than proceed with implementation.
|
|
411570
411606
|
|
|
411571
411607
|
Rejected plan:
|
|
411572
|
-
`, DENIAL_WORKAROUND_GUIDANCE, NO_RESPONSE_REQUESTED = "No response requested.", SYNTHETIC_TOOL_RESULT_PLACEHOLDER = "[Tool result missing due to internal error]", SYNTHETIC_MODEL = "<synthetic>", SYNTHETIC_MESSAGES, EMPTY_LOOKUPS, EMPTY_STRING_SET,
|
|
411608
|
+
`, DENIAL_WORKAROUND_GUIDANCE, NO_RESPONSE_REQUESTED = "No response requested.", SYNTHETIC_TOOL_RESULT_PLACEHOLDER = "[Tool result missing due to internal error]", SYNTHETIC_MODEL = "<synthetic>", SYNTHETIC_MESSAGES, EMPTY_LOOKUPS, EMPTY_STRING_SET, STRIPPED_TAGS_RE, PLAN_PHASE4_CONTROL = `### Phase 4: Final Plan
|
|
411573
411609
|
Goal: Write your final plan to the plan file (the only file you can edit).
|
|
411574
411610
|
- Begin with a **Context** section: explain why this change is being made \u2014 the problem or need it addresses, what prompted it, and the intended outcome
|
|
411575
411611
|
- Include only your recommended approach, not all alternatives
|
|
@@ -411622,7 +411658,6 @@ var init_messages = __esm(() => {
|
|
|
411622
411658
|
init_ExitPlanModeV2Tool();
|
|
411623
411659
|
init_FileEditTool();
|
|
411624
411660
|
init_prompt3();
|
|
411625
|
-
init_prompt4();
|
|
411626
411661
|
init_FileWriteTool();
|
|
411627
411662
|
init_prompt2();
|
|
411628
411663
|
init_state();
|
|
@@ -411635,7 +411670,6 @@ var init_messages = __esm(() => {
|
|
|
411635
411670
|
init_debug();
|
|
411636
411671
|
init_displayTags();
|
|
411637
411672
|
init_embeddedTools();
|
|
411638
|
-
init_AskUserQuestionTool();
|
|
411639
411673
|
init_format2();
|
|
411640
411674
|
init_imageValidation();
|
|
411641
411675
|
init_json();
|
|
@@ -419682,7 +419716,7 @@ function Feedback({
|
|
|
419682
419716
|
platform: env2.platform,
|
|
419683
419717
|
gitRepo: envInfo.isGit,
|
|
419684
419718
|
terminal: env2.terminal,
|
|
419685
|
-
version: "1.76.
|
|
419719
|
+
version: "1.76.10",
|
|
419686
419720
|
transcript: normalizeMessagesForAPI(messages),
|
|
419687
419721
|
errors: sanitizedErrors,
|
|
419688
419722
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -419874,7 +419908,7 @@ function Feedback({
|
|
|
419874
419908
|
", ",
|
|
419875
419909
|
env2.terminal,
|
|
419876
419910
|
", v",
|
|
419877
|
-
"1.76.
|
|
419911
|
+
"1.76.10"
|
|
419878
419912
|
]
|
|
419879
419913
|
}, undefined, true, undefined, this)
|
|
419880
419914
|
]
|
|
@@ -419980,7 +420014,7 @@ ${sanitizedDescription}
|
|
|
419980
420014
|
` + `**Environment Info**
|
|
419981
420015
|
` + `- Platform: ${env2.platform}
|
|
419982
420016
|
` + `- Terminal: ${env2.terminal}
|
|
419983
|
-
` + `- Version: ${"1.76.
|
|
420017
|
+
` + `- Version: ${"1.76.10"}
|
|
419984
420018
|
` + `- Feedback ID: ${feedbackId}
|
|
419985
420019
|
` + `
|
|
419986
420020
|
**Errors**
|
|
@@ -423090,7 +423124,7 @@ function buildPrimarySection() {
|
|
|
423090
423124
|
}, undefined, false, undefined, this);
|
|
423091
423125
|
return [{
|
|
423092
423126
|
label: "Version",
|
|
423093
|
-
value: "1.76.
|
|
423127
|
+
value: "1.76.10"
|
|
423094
423128
|
}, {
|
|
423095
423129
|
label: "Session name",
|
|
423096
423130
|
value: nameValue
|
|
@@ -426472,7 +426506,7 @@ function Config({
|
|
|
426472
426506
|
}
|
|
426473
426507
|
}, undefined, false, undefined, this)
|
|
426474
426508
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
426475
|
-
currentVersion: "1.76.
|
|
426509
|
+
currentVersion: "1.76.10",
|
|
426476
426510
|
onChoice: (choice) => {
|
|
426477
426511
|
setShowSubmenu(null);
|
|
426478
426512
|
setTabsHidden(false);
|
|
@@ -426484,7 +426518,7 @@ function Config({
|
|
|
426484
426518
|
autoUpdatesChannel: "stable"
|
|
426485
426519
|
};
|
|
426486
426520
|
if (choice === "stay") {
|
|
426487
|
-
newSettings.minimumVersion = "1.76.
|
|
426521
|
+
newSettings.minimumVersion = "1.76.10";
|
|
426488
426522
|
}
|
|
426489
426523
|
updateSettingsForSource("userSettings", newSettings);
|
|
426490
426524
|
setSettingsData((prev_27) => ({
|
|
@@ -434548,7 +434582,7 @@ function HelpV2(t0) {
|
|
|
434548
434582
|
let t6;
|
|
434549
434583
|
if ($2[31] !== tabs) {
|
|
434550
434584
|
t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
|
|
434551
|
-
title: `UR v${"1.76.
|
|
434585
|
+
title: `UR v${"1.76.10"}`,
|
|
434552
434586
|
color: "professionalBlue",
|
|
434553
434587
|
defaultTab: "general",
|
|
434554
434588
|
children: tabs
|
|
@@ -435481,7 +435515,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
435481
435515
|
async function handleInitialize(options2) {
|
|
435482
435516
|
return {
|
|
435483
435517
|
name: "UR",
|
|
435484
|
-
version: "1.76.
|
|
435518
|
+
version: "1.76.10",
|
|
435485
435519
|
protocolVersion: "0.1.0",
|
|
435486
435520
|
workspaceRoot: options2.cwd,
|
|
435487
435521
|
capabilities: {
|
|
@@ -452589,7 +452623,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
452589
452623
|
return [];
|
|
452590
452624
|
}
|
|
452591
452625
|
}
|
|
452592
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.
|
|
452626
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.10") {
|
|
452593
452627
|
if (process.env.USER_TYPE === "ant") {
|
|
452594
452628
|
const changelog = "";
|
|
452595
452629
|
if (changelog) {
|
|
@@ -452616,7 +452650,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.76.6")
|
|
|
452616
452650
|
releaseNotes
|
|
452617
452651
|
};
|
|
452618
452652
|
}
|
|
452619
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.
|
|
452653
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.76.10") {
|
|
452620
452654
|
if (process.env.USER_TYPE === "ant") {
|
|
452621
452655
|
const changelog = "";
|
|
452622
452656
|
if (changelog) {
|
|
@@ -455482,7 +455516,7 @@ function getRecentActivitySync() {
|
|
|
455482
455516
|
return cachedActivity;
|
|
455483
455517
|
}
|
|
455484
455518
|
function getLogoDisplayData() {
|
|
455485
|
-
const version2 = process.env.DEMO_VERSION ?? "1.76.
|
|
455519
|
+
const version2 = process.env.DEMO_VERSION ?? "1.76.10";
|
|
455486
455520
|
const serverUrl = getDirectConnectServerUrl();
|
|
455487
455521
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
455488
455522
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -456349,7 +456383,7 @@ function LogoV2() {
|
|
|
456349
456383
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
456350
456384
|
t2 = () => {
|
|
456351
456385
|
const currentConfig2 = getGlobalConfig();
|
|
456352
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.76.
|
|
456386
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.76.10") {
|
|
456353
456387
|
return;
|
|
456354
456388
|
}
|
|
456355
456389
|
saveGlobalConfig(_temp325);
|
|
@@ -457034,12 +457068,12 @@ function LogoV2() {
|
|
|
457034
457068
|
return t41;
|
|
457035
457069
|
}
|
|
457036
457070
|
function _temp325(current) {
|
|
457037
|
-
if (current.lastReleaseNotesSeen === "1.76.
|
|
457071
|
+
if (current.lastReleaseNotesSeen === "1.76.10") {
|
|
457038
457072
|
return current;
|
|
457039
457073
|
}
|
|
457040
457074
|
return {
|
|
457041
457075
|
...current,
|
|
457042
|
-
lastReleaseNotesSeen: "1.76.
|
|
457076
|
+
lastReleaseNotesSeen: "1.76.10"
|
|
457043
457077
|
};
|
|
457044
457078
|
}
|
|
457045
457079
|
function _temp241(s_0) {
|
|
@@ -473853,7 +473887,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
473853
473887
|
if (spec.name !== specName) {
|
|
473854
473888
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
473855
473889
|
}
|
|
473856
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.
|
|
473890
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.76.10" : "1.76.10");
|
|
473857
473891
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
473858
473892
|
throw new Error("invalid ur-agent package version");
|
|
473859
473893
|
}
|
|
@@ -474846,7 +474880,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
474846
474880
|
path: ".github/workflows/ur.yml",
|
|
474847
474881
|
root: "project",
|
|
474848
474882
|
content: compileAgenticCiWorkflow("default", {
|
|
474849
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.76.
|
|
474883
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.76.10" : "1.76.10"
|
|
474850
474884
|
})
|
|
474851
474885
|
},
|
|
474852
474886
|
{
|
|
@@ -474909,7 +474943,7 @@ function value(tokens, flag) {
|
|
|
474909
474943
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
474910
474944
|
}
|
|
474911
474945
|
function cliVersion() {
|
|
474912
|
-
return typeof MACRO !== "undefined" ? "1.76.
|
|
474946
|
+
return typeof MACRO !== "undefined" ? "1.76.10" : "1.76.10";
|
|
474913
474947
|
}
|
|
474914
474948
|
function workflowPath(cwd2) {
|
|
474915
474949
|
return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -480765,7 +480799,7 @@ function createAcpStdioApp(deps) {
|
|
|
480765
480799
|
}
|
|
480766
480800
|
},
|
|
480767
480801
|
authMethods: [],
|
|
480768
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480802
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.10" }
|
|
480769
480803
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
480770
480804
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
480771
480805
|
await runtime2.announce({
|
|
@@ -480862,7 +480896,7 @@ function createAcpStdioAgent(deps) {
|
|
|
480862
480896
|
}
|
|
480863
480897
|
},
|
|
480864
480898
|
authMethods: [],
|
|
480865
|
-
agentInfo: { name: "UR-Nexus", version: "1.76.
|
|
480899
|
+
agentInfo: { name: "UR-Nexus", version: "1.76.10" }
|
|
480866
480900
|
});
|
|
480867
480901
|
return;
|
|
480868
480902
|
case "authenticate":
|
|
@@ -492822,6 +492856,11 @@ async function runCrew(name, options2) {
|
|
|
492822
492856
|
options2.onEvent?.({ kind: "worker-exit", worker: workerId, handled: count5 });
|
|
492823
492857
|
return count5;
|
|
492824
492858
|
}
|
|
492859
|
+
const workerFailures = [];
|
|
492860
|
+
const track = (promise3) => promise3.catch((error40) => {
|
|
492861
|
+
workerFailures.push(error40);
|
|
492862
|
+
return 0;
|
|
492863
|
+
});
|
|
492825
492864
|
let spawned = 0;
|
|
492826
492865
|
if (options2.dynamic) {
|
|
492827
492866
|
const governor = boundedInteger2(options2.maxWorkers, 8, 1, 32);
|
|
@@ -492838,13 +492877,13 @@ async function runCrew(name, options2) {
|
|
|
492838
492877
|
while (active3.size < governor && runnableCount() > 0) {
|
|
492839
492878
|
spawned += 1;
|
|
492840
492879
|
const id = `w${spawned}`;
|
|
492841
|
-
const p2 = worker(id).finally(() => active3.delete(p2));
|
|
492880
|
+
const p2 = track(worker(id)).finally(() => active3.delete(p2));
|
|
492842
492881
|
active3.add(p2);
|
|
492843
492882
|
}
|
|
492844
492883
|
if (active3.size === 0) {
|
|
492845
492884
|
if (todoCount() > 0) {
|
|
492846
492885
|
spawned += 1;
|
|
492847
|
-
await worker(`w${spawned}`);
|
|
492886
|
+
await track(worker(`w${spawned}`));
|
|
492848
492887
|
continue;
|
|
492849
492888
|
}
|
|
492850
492889
|
break;
|
|
@@ -492857,7 +492896,10 @@ async function runCrew(name, options2) {
|
|
|
492857
492896
|
} else {
|
|
492858
492897
|
spawned = workerCount;
|
|
492859
492898
|
const workerIds = Array.from({ length: workerCount }, (_, i3) => `w${i3 + 1}`);
|
|
492860
|
-
await Promise.all(workerIds.map(worker));
|
|
492899
|
+
await Promise.all(workerIds.map((id) => track(worker(id))));
|
|
492900
|
+
}
|
|
492901
|
+
if (workerFailures.length > 0) {
|
|
492902
|
+
throw workerFailures[0];
|
|
492861
492903
|
}
|
|
492862
492904
|
const finalSpec = loadCrew(cwd2, name) ?? baseSpec;
|
|
492863
492905
|
return { name, workers: spawned, progress: crewProgress(finalSpec), handled };
|
|
@@ -690314,7 +690356,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
690314
690356
|
smapsRollup,
|
|
690315
690357
|
platform: process.platform,
|
|
690316
690358
|
nodeVersion: process.version,
|
|
690317
|
-
ccVersion: "1.76.
|
|
690359
|
+
ccVersion: "1.76.10"
|
|
690318
690360
|
};
|
|
690319
690361
|
}
|
|
690320
690362
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -690894,7 +690936,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
690894
690936
|
var call154 = async () => {
|
|
690895
690937
|
return {
|
|
690896
690938
|
type: "text",
|
|
690897
|
-
value: "1.76.
|
|
690939
|
+
value: "1.76.10"
|
|
690898
690940
|
};
|
|
690899
690941
|
}, version2, version_default;
|
|
690900
690942
|
var init_version = __esm(() => {
|
|
@@ -702161,7 +702203,7 @@ function generateHtmlReport(data, insights) {
|
|
|
702161
702203
|
</html>`;
|
|
702162
702204
|
}
|
|
702163
702205
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
702164
|
-
const version3 = typeof MACRO !== "undefined" ? "1.76.
|
|
702206
|
+
const version3 = typeof MACRO !== "undefined" ? "1.76.10" : "unknown";
|
|
702165
702207
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
702166
702208
|
const facets_summary = {
|
|
702167
702209
|
total: facets.size,
|
|
@@ -706475,7 +706517,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
706475
706517
|
init_settings2();
|
|
706476
706518
|
init_slowOperations();
|
|
706477
706519
|
init_uuid();
|
|
706478
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.76.
|
|
706520
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.76.10" : "unknown";
|
|
706479
706521
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
706480
706522
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
706481
706523
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -707690,7 +707732,7 @@ var init_filesystem = __esm(() => {
|
|
|
707690
707732
|
});
|
|
707691
707733
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
707692
707734
|
const nonce = randomBytes20(16).toString("hex");
|
|
707693
|
-
return join232(getURTempDir(), "bundled-skills", "1.76.
|
|
707735
|
+
return join232(getURTempDir(), "bundled-skills", "1.76.10", nonce);
|
|
707694
707736
|
});
|
|
707695
707737
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
707696
707738
|
});
|
|
@@ -714039,7 +714081,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
714039
714081
|
}
|
|
714040
714082
|
function computeFingerprintFromMessages(messages) {
|
|
714041
714083
|
const firstMessageText = extractFirstMessageText(messages);
|
|
714042
|
-
return computeFingerprint(firstMessageText, "1.76.
|
|
714084
|
+
return computeFingerprint(firstMessageText, "1.76.10");
|
|
714043
714085
|
}
|
|
714044
714086
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
714045
714087
|
var init_fingerprint = () => {};
|
|
@@ -714986,7 +715028,7 @@ ${deferredToolList}
|
|
|
714986
715028
|
stopReason = null;
|
|
714987
715029
|
isAdvisorInProgress = false;
|
|
714988
715030
|
const streamWatchdogEnabled = isStreamWatchdogEnabled();
|
|
714989
|
-
const STREAM_IDLE_TIMEOUT_MS = parseInt(process.env.UR_STREAM_IDLE_TIMEOUT_MS || "", 10) ||
|
|
715031
|
+
const STREAM_IDLE_TIMEOUT_MS = parseInt(process.env.UR_STREAM_IDLE_TIMEOUT_MS || "", 10) || 300000;
|
|
714990
715032
|
const STREAM_IDLE_WARNING_MS = STREAM_IDLE_TIMEOUT_MS / 2;
|
|
714991
715033
|
let streamIdleAborted = false;
|
|
714992
715034
|
let streamWatchdogFiredAt = null;
|
|
@@ -715004,6 +715046,9 @@ ${deferredToolList}
|
|
|
715004
715046
|
for await (const _part of stream5) {
|
|
715005
715047
|
const part = _part;
|
|
715006
715048
|
resetStreamIdleTimer();
|
|
715049
|
+
if (part?.type === "ping") {
|
|
715050
|
+
continue;
|
|
715051
|
+
}
|
|
715007
715052
|
const outputChunkAt = performance.now();
|
|
715008
715053
|
if (previousOutputChunkAt !== undefined) {
|
|
715009
715054
|
recordGenAiOutputChunkMetric({
|
|
@@ -715958,7 +716003,7 @@ async function sideQuery(opts) {
|
|
|
715958
716003
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
715959
716004
|
}
|
|
715960
716005
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
715961
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.76.
|
|
716006
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.76.10");
|
|
715962
716007
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
715963
716008
|
const systemBlocks = [
|
|
715964
716009
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -720795,7 +720840,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
720795
720840
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
720796
720841
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
720797
720842
|
betas: getSdkBetas(),
|
|
720798
|
-
ur_version: "1.76.
|
|
720843
|
+
ur_version: "1.76.10",
|
|
720799
720844
|
output_style: outputStyle2,
|
|
720800
720845
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
720801
720846
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -734667,7 +734712,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
734667
734712
|
function getSemverPart(version3) {
|
|
734668
734713
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
734669
734714
|
}
|
|
734670
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.76.
|
|
734715
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.76.10") {
|
|
734671
734716
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react223.useState(() => getSemverPart(initialVersion));
|
|
734672
734717
|
if (!updatedVersion) {
|
|
734673
734718
|
return null;
|
|
@@ -734716,7 +734761,7 @@ function AutoUpdater({
|
|
|
734716
734761
|
return;
|
|
734717
734762
|
}
|
|
734718
734763
|
if (false) {}
|
|
734719
|
-
const currentVersion = "1.76.
|
|
734764
|
+
const currentVersion = "1.76.10";
|
|
734720
734765
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
734721
734766
|
let latestVersion = await getLatestVersion(channel);
|
|
734722
734767
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -734945,12 +734990,12 @@ function NativeAutoUpdater({
|
|
|
734945
734990
|
logEvent("tengu_native_auto_updater_start", {});
|
|
734946
734991
|
try {
|
|
734947
734992
|
const maxVersion = await getMaxVersion();
|
|
734948
|
-
if (maxVersion && gt("1.76.
|
|
734993
|
+
if (maxVersion && gt("1.76.10", maxVersion)) {
|
|
734949
734994
|
const msg = await getMaxVersionMessage();
|
|
734950
734995
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
734951
734996
|
}
|
|
734952
734997
|
const result = await installLatest(channel);
|
|
734953
|
-
const currentVersion = "1.76.
|
|
734998
|
+
const currentVersion = "1.76.10";
|
|
734954
734999
|
const latencyMs = Date.now() - startTime;
|
|
734955
735000
|
if (result.lockFailed) {
|
|
734956
735001
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -735087,17 +735132,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
735087
735132
|
const maxVersion = await getMaxVersion();
|
|
735088
735133
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
735089
735134
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
735090
|
-
if (gte("1.76.
|
|
735091
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.76.
|
|
735135
|
+
if (gte("1.76.10", maxVersion)) {
|
|
735136
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.76.10"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
735092
735137
|
setUpdateAvailable(false);
|
|
735093
735138
|
return;
|
|
735094
735139
|
}
|
|
735095
735140
|
latest = maxVersion;
|
|
735096
735141
|
}
|
|
735097
|
-
const hasUpdate = latest && !gte("1.76.
|
|
735142
|
+
const hasUpdate = latest && !gte("1.76.10", latest) && !shouldSkipVersion(latest);
|
|
735098
735143
|
setUpdateAvailable(!!hasUpdate);
|
|
735099
735144
|
if (hasUpdate) {
|
|
735100
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.
|
|
735145
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.76.10"} -> ${latest}`);
|
|
735101
735146
|
}
|
|
735102
735147
|
};
|
|
735103
735148
|
$2[0] = t1;
|
|
@@ -735131,7 +735176,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
735131
735176
|
wrap: "truncate",
|
|
735132
735177
|
children: [
|
|
735133
735178
|
"currentVersion: ",
|
|
735134
|
-
"1.76.
|
|
735179
|
+
"1.76.10"
|
|
735135
735180
|
]
|
|
735136
735181
|
}, undefined, true, undefined, this);
|
|
735137
735182
|
$2[3] = verbose;
|
|
@@ -745931,7 +745976,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
745931
745976
|
project_dir: getOriginalCwd(),
|
|
745932
745977
|
added_dirs: addedDirs
|
|
745933
745978
|
},
|
|
745934
|
-
version: "1.76.
|
|
745979
|
+
version: "1.76.10",
|
|
745935
745980
|
output_style: {
|
|
745936
745981
|
name: outputStyleName
|
|
745937
745982
|
},
|
|
@@ -746066,7 +746111,7 @@ function StatusLineInner({
|
|
|
746066
746111
|
const attention = customStatusError ?? taskAttention;
|
|
746067
746112
|
const terminalSize = React132.useContext(TerminalSizeContext);
|
|
746068
746113
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
746069
|
-
version: "1.76.
|
|
746114
|
+
version: "1.76.10",
|
|
746070
746115
|
providerLabel: providerRuntime.providerLabel,
|
|
746071
746116
|
authMode: providerRuntime.authLabel,
|
|
746072
746117
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -758351,7 +758396,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
758351
758396
|
} catch {}
|
|
758352
758397
|
const data = {
|
|
758353
758398
|
trigger: trigger2,
|
|
758354
|
-
version: "1.76.
|
|
758399
|
+
version: "1.76.10",
|
|
758355
758400
|
platform: process.platform,
|
|
758356
758401
|
transcript,
|
|
758357
758402
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -770725,7 +770770,7 @@ function WelcomeV2() {
|
|
|
770725
770770
|
dimColor: true,
|
|
770726
770771
|
children: [
|
|
770727
770772
|
"v",
|
|
770728
|
-
"1.76.
|
|
770773
|
+
"1.76.10"
|
|
770729
770774
|
]
|
|
770730
770775
|
}, undefined, true, undefined, this)
|
|
770731
770776
|
]
|
|
@@ -771985,7 +772030,7 @@ function completeOnboarding() {
|
|
|
771985
772030
|
saveGlobalConfig((current) => ({
|
|
771986
772031
|
...current,
|
|
771987
772032
|
hasCompletedOnboarding: true,
|
|
771988
|
-
lastOnboardingVersion: "1.76.
|
|
772033
|
+
lastOnboardingVersion: "1.76.10"
|
|
771989
772034
|
}));
|
|
771990
772035
|
}
|
|
771991
772036
|
function showDialog(root2, renderer) {
|
|
@@ -777029,7 +777074,7 @@ function appendToLog(path24, message) {
|
|
|
777029
777074
|
cwd: getFsImplementation().cwd(),
|
|
777030
777075
|
userType: process.env.USER_TYPE,
|
|
777031
777076
|
sessionId: getSessionId(),
|
|
777032
|
-
version: "1.76.
|
|
777077
|
+
version: "1.76.10"
|
|
777033
777078
|
};
|
|
777034
777079
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
777035
777080
|
}
|
|
@@ -781188,8 +781233,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
781188
781233
|
}
|
|
781189
781234
|
async function checkEnvLessBridgeMinVersion() {
|
|
781190
781235
|
const cfg = await getEnvLessBridgeConfig();
|
|
781191
|
-
if (cfg.min_version && lt("1.76.
|
|
781192
|
-
return `Your version of UR (${"1.76.
|
|
781236
|
+
if (cfg.min_version && lt("1.76.10", cfg.min_version)) {
|
|
781237
|
+
return `Your version of UR (${"1.76.10"}) is too old for Remote Control.
|
|
781193
781238
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
781194
781239
|
}
|
|
781195
781240
|
return null;
|
|
@@ -781663,7 +781708,7 @@ async function initBridgeCore(params) {
|
|
|
781663
781708
|
const rawApi = createBridgeApiClient({
|
|
781664
781709
|
baseUrl,
|
|
781665
781710
|
getAccessToken,
|
|
781666
|
-
runnerVersion: "1.76.
|
|
781711
|
+
runnerVersion: "1.76.10",
|
|
781667
781712
|
onDebug: logForDebugging,
|
|
781668
781713
|
onAuth401,
|
|
781669
781714
|
getTrustedDeviceToken
|
|
@@ -791136,7 +791181,7 @@ function getAgUiCapabilities() {
|
|
|
791136
791181
|
name: "UR-Nexus",
|
|
791137
791182
|
type: "ur-nexus",
|
|
791138
791183
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
791139
|
-
version: "1.76.
|
|
791184
|
+
version: "1.76.10",
|
|
791140
791185
|
provider: "UR",
|
|
791141
791186
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
791142
791187
|
},
|
|
@@ -792276,7 +792321,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
792276
792321
|
};
|
|
792277
792322
|
const server2 = new Server({
|
|
792278
792323
|
name: "ur-nexus",
|
|
792279
|
-
version: "1.76.
|
|
792324
|
+
version: "1.76.10"
|
|
792280
792325
|
}, {
|
|
792281
792326
|
capabilities: {
|
|
792282
792327
|
tools: {}
|
|
@@ -793434,7 +793479,7 @@ function thrownResponse(error40) {
|
|
|
793434
793479
|
}
|
|
793435
793480
|
async function createUrMcp2026Runtime(options4) {
|
|
793436
793481
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
793437
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.76.
|
|
793482
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.76.10" }, { capabilities: {} });
|
|
793438
793483
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
793439
793484
|
try {
|
|
793440
793485
|
await server2.connect(serverTransport);
|
|
@@ -793445,7 +793490,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
793445
793490
|
}
|
|
793446
793491
|
const runtime2 = new Mcp2026Runtime({
|
|
793447
793492
|
cwd: options4.cwd,
|
|
793448
|
-
version: "1.76.
|
|
793493
|
+
version: "1.76.10",
|
|
793449
793494
|
backend: {
|
|
793450
793495
|
listTools: async () => {
|
|
793451
793496
|
const listed = await client2.listTools();
|
|
@@ -795586,7 +795631,7 @@ async function update() {
|
|
|
795586
795631
|
logEvent("tengu_update_check", {});
|
|
795587
795632
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
795588
795633
|
const result = await checkUpgradeStatus({
|
|
795589
|
-
currentVersion: "1.76.
|
|
795634
|
+
currentVersion: "1.76.10",
|
|
795590
795635
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
795591
795636
|
installationType: diagnostic2.installationType,
|
|
795592
795637
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -796902,7 +796947,7 @@ ${customInstructions}` : customInstructions;
|
|
|
796902
796947
|
}
|
|
796903
796948
|
}
|
|
796904
796949
|
logForDiagnosticsNoPII("info", "started", {
|
|
796905
|
-
version: "1.76.
|
|
796950
|
+
version: "1.76.10",
|
|
796906
796951
|
is_native_binary: isInBundledMode()
|
|
796907
796952
|
});
|
|
796908
796953
|
registerCleanup(async () => {
|
|
@@ -797688,7 +797733,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
797688
797733
|
pendingHookMessages
|
|
797689
797734
|
}, renderAndRun);
|
|
797690
797735
|
}
|
|
797691
|
-
}).version("1.76.
|
|
797736
|
+
}).version("1.76.10 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
797692
797737
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
797693
797738
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
797694
797739
|
if (canUserConfigureAdvisor()) {
|
|
@@ -798740,7 +798785,7 @@ if (false) {}
|
|
|
798740
798785
|
async function main2() {
|
|
798741
798786
|
const args = process.argv.slice(2);
|
|
798742
798787
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
798743
|
-
console.log(`${"1.76.
|
|
798788
|
+
console.log(`${"1.76.10"} (UR-Nexus)`);
|
|
798744
798789
|
return;
|
|
798745
798790
|
}
|
|
798746
798791
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|