ur-agent 1.84.3 → 1.84.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/README.md +43 -5
- package/dist/cli.js +736 -272
- package/docs/CONFIGURATION.md +51 -1
- package/docs/TROUBLESHOOTING.md +48 -0
- package/docs/USAGE.md +40 -1
- package/docs/VALIDATION.md +72 -5
- package/docs/providers.md +66 -12
- package/documentation/index.html +6 -5
- package/extensions/jetbrains-ur/build.gradle.kts +1 -1
- package/extensions/vscode-ur-inline-diffs/package.json +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -60375,7 +60375,7 @@ async function fetchWithProviderReliability(input2, init, options) {
|
|
|
60375
60375
|
const body = await response.text().catch(() => "");
|
|
60376
60376
|
throw new ProviderHTTPError(options.failureMessage(response, body), {
|
|
60377
60377
|
status: response.status,
|
|
60378
|
-
body,
|
|
60378
|
+
body: options.failureBody ? options.failureBody(response, body) : body,
|
|
60379
60379
|
headers: response.headers
|
|
60380
60380
|
});
|
|
60381
60381
|
}
|
|
@@ -60787,6 +60787,7 @@ __export(exports_providerRegistry, {
|
|
|
60787
60787
|
resolveProviderId: () => resolveProviderId,
|
|
60788
60788
|
providerForAuthAlias: () => providerForAuthAlias,
|
|
60789
60789
|
providerAliasesFor: () => providerAliasesFor,
|
|
60790
|
+
markProviderModelUnavailable: () => markProviderModelUnavailable,
|
|
60790
60791
|
listProviders: () => listProviders,
|
|
60791
60792
|
listModelsForProviderWithSource: () => listModelsForProviderWithSource,
|
|
60792
60793
|
listModelsForProvider: () => listModelsForProvider,
|
|
@@ -60891,7 +60892,11 @@ function getActiveProviderSettings(settings = getInitialSettings()) {
|
|
|
60891
60892
|
baseUrl: getScopedProviderBaseUrl(active, effectiveSettings),
|
|
60892
60893
|
baseUrls: configured.baseUrls,
|
|
60893
60894
|
commandPath: configured.commandPath,
|
|
60894
|
-
fallback
|
|
60895
|
+
fallback,
|
|
60896
|
+
openaiTransport: configured.openaiTransport,
|
|
60897
|
+
responses: configured.responses,
|
|
60898
|
+
openrouter: configured.openrouter,
|
|
60899
|
+
anthropic: configured.anthropic
|
|
60895
60900
|
};
|
|
60896
60901
|
}
|
|
60897
60902
|
function getProviderRuntimeInfo(settings = getInitialSettings()) {
|
|
@@ -61155,6 +61160,79 @@ function setSafeProviderConfig(key, value, options = {}) {
|
|
|
61155
61160
|
return { ok: false, message: "responses.tool_search must be off or hosted." };
|
|
61156
61161
|
}
|
|
61157
61162
|
settings = { provider: { responses: { toolSearch: trimmed } } };
|
|
61163
|
+
} else if (key === "openrouter.routing") {
|
|
61164
|
+
if (!["auto", "throughput", "latency", "price"].includes(trimmed)) {
|
|
61165
|
+
return {
|
|
61166
|
+
ok: false,
|
|
61167
|
+
message: "openrouter.routing must be auto, throughput, latency, or price."
|
|
61168
|
+
};
|
|
61169
|
+
}
|
|
61170
|
+
settings = {
|
|
61171
|
+
provider: { openrouter: { routing: trimmed } }
|
|
61172
|
+
};
|
|
61173
|
+
} else if (key === "openrouter.allow_fallbacks" || key === "openrouter.require_parameters") {
|
|
61174
|
+
if (trimmed !== "true" && trimmed !== "false" && trimmed !== "auto") {
|
|
61175
|
+
return { ok: false, message: `${key} must be true, false, or auto.` };
|
|
61176
|
+
}
|
|
61177
|
+
const field = key === "openrouter.allow_fallbacks" ? "allowFallbacks" : "requireParameters";
|
|
61178
|
+
settings = {
|
|
61179
|
+
provider: {
|
|
61180
|
+
openrouter: {
|
|
61181
|
+
[field]: trimmed === "auto" ? undefined : trimmed === "true"
|
|
61182
|
+
}
|
|
61183
|
+
}
|
|
61184
|
+
};
|
|
61185
|
+
} else if (key === "openrouter.preferred_min_throughput" || key === "openrouter.preferred_max_latency") {
|
|
61186
|
+
const parsed = trimmed === "auto" ? undefined : Number(trimmed);
|
|
61187
|
+
if (parsed !== undefined && (!Number.isFinite(parsed) || parsed <= 0)) {
|
|
61188
|
+
return { ok: false, message: `${key} must be a positive number or auto.` };
|
|
61189
|
+
}
|
|
61190
|
+
const field = key === "openrouter.preferred_min_throughput" ? "preferredMinThroughput" : "preferredMaxLatency";
|
|
61191
|
+
settings = {
|
|
61192
|
+
provider: { openrouter: { [field]: parsed } }
|
|
61193
|
+
};
|
|
61194
|
+
} else if (key === "openrouter.service_tier") {
|
|
61195
|
+
if (!["auto", "default", "flex", "priority", "fast"].includes(trimmed)) {
|
|
61196
|
+
return {
|
|
61197
|
+
ok: false,
|
|
61198
|
+
message: "openrouter.service_tier must be auto, default, flex, priority, or fast."
|
|
61199
|
+
};
|
|
61200
|
+
}
|
|
61201
|
+
settings = {
|
|
61202
|
+
provider: {
|
|
61203
|
+
openrouter: {
|
|
61204
|
+
serviceTier: trimmed
|
|
61205
|
+
}
|
|
61206
|
+
}
|
|
61207
|
+
};
|
|
61208
|
+
} else if (key === "openrouter.speed") {
|
|
61209
|
+
if (trimmed !== "standard" && trimmed !== "fast") {
|
|
61210
|
+
return {
|
|
61211
|
+
ok: false,
|
|
61212
|
+
message: "openrouter.speed must be standard or fast."
|
|
61213
|
+
};
|
|
61214
|
+
}
|
|
61215
|
+
settings = {
|
|
61216
|
+
provider: {
|
|
61217
|
+
openrouter: {
|
|
61218
|
+
speed: trimmed
|
|
61219
|
+
}
|
|
61220
|
+
}
|
|
61221
|
+
};
|
|
61222
|
+
} else if (key === "anthropic.speed") {
|
|
61223
|
+
if (trimmed !== "standard" && trimmed !== "fast") {
|
|
61224
|
+
return {
|
|
61225
|
+
ok: false,
|
|
61226
|
+
message: "anthropic.speed must be standard or fast."
|
|
61227
|
+
};
|
|
61228
|
+
}
|
|
61229
|
+
settings = {
|
|
61230
|
+
provider: {
|
|
61231
|
+
anthropic: {
|
|
61232
|
+
speed: trimmed
|
|
61233
|
+
}
|
|
61234
|
+
}
|
|
61235
|
+
};
|
|
61158
61236
|
} else if (key === "model") {
|
|
61159
61237
|
const currentSettings = getInitialSettings();
|
|
61160
61238
|
const currentProvider = getActiveProviderSettings(currentSettings).active ?? "ollama";
|
|
@@ -61299,6 +61377,22 @@ function openAiCompatibleModelUrls(baseUrl) {
|
|
|
61299
61377
|
url3.pathname = `${rootPath}/models`;
|
|
61300
61378
|
return [versioned, url3.toString().replace(/\/$/, "")];
|
|
61301
61379
|
}
|
|
61380
|
+
function isNvidiaHostedApi(baseUrl) {
|
|
61381
|
+
try {
|
|
61382
|
+
return new URL(normalizeBaseUrl(baseUrl)).hostname.toLowerCase() === NVIDIA_HOSTED_API_HOST;
|
|
61383
|
+
} catch {
|
|
61384
|
+
return false;
|
|
61385
|
+
}
|
|
61386
|
+
}
|
|
61387
|
+
function isNvidiaAgentModelCandidate(modelId) {
|
|
61388
|
+
return !/(?:^|[/_.-])(?:calibration|deplot|detector|embed(?:ding|qa)?|guard|nemoguard|nemoretriever|nvclip|ocr|parse|rerank|retriever|reward|safety|translate)(?:$|[/_.-])/iu.test(modelId);
|
|
61389
|
+
}
|
|
61390
|
+
function filterNvidiaHostedModels(models) {
|
|
61391
|
+
return models.flatMap((model) => isNvidiaAgentModelCandidate(model.id) ? [{
|
|
61392
|
+
...model,
|
|
61393
|
+
description: model.isDefault ? `${model.description} \xB7 NVIDIA hosted chat catalog \xB7 NVIDIA's fastest 30B agent model` : `${model.description} \xB7 NVIDIA hosted chat catalog`
|
|
61394
|
+
}] : []).sort((left, right) => Number(Boolean(right.isDefault)) - Number(Boolean(left.isDefault)));
|
|
61395
|
+
}
|
|
61302
61396
|
async function checkEndpoint(definition, settings, adapters, result) {
|
|
61303
61397
|
if (!definition.endpointKind)
|
|
61304
61398
|
return;
|
|
@@ -61331,7 +61425,7 @@ async function checkEndpoint(definition, settings, adapters, result) {
|
|
|
61331
61425
|
const fetchImpl = adapters.fetch ?? fetch;
|
|
61332
61426
|
let reachableUrl;
|
|
61333
61427
|
let modelsUrl;
|
|
61334
|
-
let
|
|
61428
|
+
let detectedModels = [];
|
|
61335
61429
|
let lastStatus;
|
|
61336
61430
|
let lastError;
|
|
61337
61431
|
for (const candidate of candidates) {
|
|
@@ -61357,7 +61451,7 @@ async function checkEndpoint(definition, settings, adapters, result) {
|
|
|
61357
61451
|
const names = definition.endpointKind === "ollama" ? parseOllamaModelNamesFromTags(parsed) : parseOpenAICompatibleModelNames(parsed);
|
|
61358
61452
|
if (names.length > 0) {
|
|
61359
61453
|
modelsUrl = candidate;
|
|
61360
|
-
|
|
61454
|
+
detectedModels = modelDefinitionsFromNames(definition.id, names, "live");
|
|
61361
61455
|
break;
|
|
61362
61456
|
}
|
|
61363
61457
|
}
|
|
@@ -61393,14 +61487,36 @@ async function checkEndpoint(definition, settings, adapters, result) {
|
|
|
61393
61487
|
message: `${reachableUrl} is reachable but returned no models. Load a model in the server, or check that base_url includes the API path (e.g. /v1).`
|
|
61394
61488
|
});
|
|
61395
61489
|
}
|
|
61490
|
+
const verifiesNvidiaHostedCatalog = definition.id === "nvidia-nim" && isNvidiaHostedApi(baseUrl);
|
|
61491
|
+
if (verifiesNvidiaHostedCatalog && modelsUrl) {
|
|
61492
|
+
detectedModels = filterNvidiaHostedModels(detectedModels);
|
|
61493
|
+
if (detectedModels.length === 0) {
|
|
61494
|
+
result.checks.push({
|
|
61495
|
+
name: "chat_models",
|
|
61496
|
+
status: "fail",
|
|
61497
|
+
message: "NVIDIA returned no agent-capable chat models."
|
|
61498
|
+
});
|
|
61499
|
+
addFailure(result, "NVIDIA hosted catalog has no agent-capable chat models", "Refresh the key at build.nvidia.com, then reconnect with: ur connect nvidia-nim");
|
|
61500
|
+
} else {
|
|
61501
|
+
result.checks.push({
|
|
61502
|
+
name: "chat_models",
|
|
61503
|
+
status: "pass",
|
|
61504
|
+
message: `${detectedModels.length} NVIDIA hosted chat models are selectable.`
|
|
61505
|
+
});
|
|
61506
|
+
}
|
|
61507
|
+
}
|
|
61396
61508
|
if (settings.model) {
|
|
61397
|
-
|
|
61509
|
+
const modelDetected = detectedModels.some((model) => model.id === settings.model);
|
|
61510
|
+
if (modelsUrl && !modelDetected) {
|
|
61398
61511
|
result.checks.push({
|
|
61399
61512
|
name: "model",
|
|
61400
|
-
status: "warn",
|
|
61401
|
-
message: `Model "${settings.model}" was not found in the detectable model list.`
|
|
61513
|
+
status: verifiesNvidiaHostedCatalog ? "fail" : "warn",
|
|
61514
|
+
message: verifiesNvidiaHostedCatalog ? `Model "${settings.model}" is not present in NVIDIA's hosted chat catalog.` : `Model "${settings.model}" was not found in the detectable model list.`
|
|
61402
61515
|
});
|
|
61403
|
-
|
|
61516
|
+
if (verifiesNvidiaHostedCatalog) {
|
|
61517
|
+
addFailure(result, "selected NVIDIA NIM model is unavailable", "Refresh /model, choose NVIDIA NIM, and select a model returned by NVIDIA.");
|
|
61518
|
+
}
|
|
61519
|
+
} else if (modelsUrl) {
|
|
61404
61520
|
result.checks.push({
|
|
61405
61521
|
name: "model",
|
|
61406
61522
|
status: "pass",
|
|
@@ -61909,6 +62025,7 @@ Ready: ${result.ok ? "yes" : "no"}${failure}${fix}`;
|
|
|
61909
62025
|
function clearProviderModelCacheForTests() {
|
|
61910
62026
|
cachedModelsByProvider.clear();
|
|
61911
62027
|
cachedModelsWrittenAt.clear();
|
|
62028
|
+
unavailableModelsByEndpoint.clear();
|
|
61912
62029
|
modelDiscoveryCoalescer.clear();
|
|
61913
62030
|
}
|
|
61914
62031
|
function clearProviderModelCache(providerId) {
|
|
@@ -61924,14 +62041,42 @@ function clearProviderModelCache(providerId) {
|
|
|
61924
62041
|
cachedModelsWrittenAt.delete(key);
|
|
61925
62042
|
}
|
|
61926
62043
|
}
|
|
62044
|
+
for (const key of unavailableModelsByEndpoint.keys()) {
|
|
62045
|
+
if (key === provider || key.startsWith(prefix)) {
|
|
62046
|
+
unavailableModelsByEndpoint.delete(key);
|
|
62047
|
+
}
|
|
62048
|
+
}
|
|
61927
62049
|
}
|
|
61928
62050
|
function inFlightModelDiscoveryCount() {
|
|
61929
62051
|
return modelDiscoveryCoalescer.size;
|
|
61930
62052
|
}
|
|
62053
|
+
function withoutRuntimeUnavailableModels(key, models) {
|
|
62054
|
+
const unavailable = unavailableModelsByEndpoint.get(key);
|
|
62055
|
+
if (!unavailable?.size)
|
|
62056
|
+
return models;
|
|
62057
|
+
return models.filter((model) => !unavailable.has(model.id.toLowerCase()));
|
|
62058
|
+
}
|
|
61931
62059
|
function rememberModels(key, models) {
|
|
61932
|
-
cachedModelsByProvider.set(key, models);
|
|
62060
|
+
cachedModelsByProvider.set(key, withoutRuntimeUnavailableModels(key, models));
|
|
61933
62061
|
cachedModelsWrittenAt.set(key, Date.now());
|
|
61934
62062
|
}
|
|
62063
|
+
function markProviderModelUnavailable(providerId, modelId, baseUrl) {
|
|
62064
|
+
const provider = resolveProviderId(providerId);
|
|
62065
|
+
const normalizedModel = modelId.trim().toLowerCase();
|
|
62066
|
+
if (!provider || !normalizedModel)
|
|
62067
|
+
return;
|
|
62068
|
+
const keys2 = baseUrl ? [providerEndpointCacheKey(provider, baseUrl)] : [...cachedModelsByProvider.keys()].filter((key) => key === provider || key.startsWith(`${provider}@`));
|
|
62069
|
+
for (const key of keys2) {
|
|
62070
|
+
const unavailable = unavailableModelsByEndpoint.get(key) ?? new Set;
|
|
62071
|
+
unavailable.add(normalizedModel);
|
|
62072
|
+
unavailableModelsByEndpoint.set(key, unavailable);
|
|
62073
|
+
const cached2 = cachedModelsByProvider.get(key);
|
|
62074
|
+
if (cached2) {
|
|
62075
|
+
cachedModelsByProvider.set(key, cached2.filter((model) => model.id.toLowerCase() !== normalizedModel));
|
|
62076
|
+
}
|
|
62077
|
+
modelDiscoveryCoalescer.cancel(key);
|
|
62078
|
+
}
|
|
62079
|
+
}
|
|
61935
62080
|
function cachedModelsAgeMs(key) {
|
|
61936
62081
|
const writtenAt = cachedModelsWrittenAt.get(key);
|
|
61937
62082
|
return writtenAt === undefined ? undefined : Date.now() - writtenAt;
|
|
@@ -62026,6 +62171,7 @@ function modelDefinitionsFromDiscovered(models, provider) {
|
|
|
62026
62171
|
id: model.id,
|
|
62027
62172
|
displayName: model.displayName,
|
|
62028
62173
|
description: model.description,
|
|
62174
|
+
...curated?.isDefault ? { isDefault: true } : {},
|
|
62029
62175
|
pricing: model.pricing,
|
|
62030
62176
|
...model.contextLength ? { contextLength: model.contextLength } : {},
|
|
62031
62177
|
...model.outputTokenLimit ? { outputTokenLimit: model.outputTokenLimit } : {},
|
|
@@ -62045,6 +62191,9 @@ function providerModelCacheKey(provider, settings = getInitialSettings()) {
|
|
|
62045
62191
|
}
|
|
62046
62192
|
if (!endpoint)
|
|
62047
62193
|
return provider;
|
|
62194
|
+
return providerEndpointCacheKey(provider, endpoint);
|
|
62195
|
+
}
|
|
62196
|
+
function providerEndpointCacheKey(provider, endpoint) {
|
|
62048
62197
|
try {
|
|
62049
62198
|
const url3 = new URL(normalizeBaseUrl(endpoint));
|
|
62050
62199
|
url3.hash = "";
|
|
@@ -62061,11 +62210,15 @@ function providerModelCacheKey(provider, settings = getInitialSettings()) {
|
|
|
62061
62210
|
function getCachedProviderModels(provider, settings = getInitialSettings()) {
|
|
62062
62211
|
return cachedModelsByProvider.get(providerModelCacheKey(provider, settings)) ?? [];
|
|
62063
62212
|
}
|
|
62213
|
+
function providerCapabilityModelId(provider, model) {
|
|
62214
|
+
const normalized = model.trim().toLowerCase();
|
|
62215
|
+
return provider === "openrouter" ? normalized.replace(/:(?:nitro|floor|exacto)$/u, "") : normalized;
|
|
62216
|
+
}
|
|
62064
62217
|
function getProviderContextLengthForModel(model, provider = getInitialSettings().provider?.active ?? DEFAULT_PROVIDER_ID, settings = getInitialSettings()) {
|
|
62065
62218
|
const providerId = resolveProviderId(provider);
|
|
62066
62219
|
if (!providerId)
|
|
62067
62220
|
return;
|
|
62068
|
-
const wanted = model
|
|
62221
|
+
const wanted = providerCapabilityModelId(providerId, model);
|
|
62069
62222
|
if (!wanted)
|
|
62070
62223
|
return;
|
|
62071
62224
|
const known = [
|
|
@@ -62080,7 +62233,7 @@ function getProviderOutputTokenLimitForModel(model, provider = getRuntimeProvide
|
|
|
62080
62233
|
const providerId = resolveProviderId(provider);
|
|
62081
62234
|
if (!providerId)
|
|
62082
62235
|
return;
|
|
62083
|
-
const wanted = model
|
|
62236
|
+
const wanted = providerCapabilityModelId(providerId, model);
|
|
62084
62237
|
if (!wanted)
|
|
62085
62238
|
return;
|
|
62086
62239
|
const known = [
|
|
@@ -62095,7 +62248,7 @@ function getProviderReasoningCapabilitiesForModel(model, provider = getRuntimePr
|
|
|
62095
62248
|
const providerId = resolveProviderId(provider);
|
|
62096
62249
|
if (!providerId)
|
|
62097
62250
|
return;
|
|
62098
|
-
const wanted = model
|
|
62251
|
+
const wanted = providerCapabilityModelId(providerId, model);
|
|
62099
62252
|
if (!wanted)
|
|
62100
62253
|
return;
|
|
62101
62254
|
const known = [
|
|
@@ -62386,7 +62539,11 @@ async function discoverLiveModelsForProvider(provider, options = {}) {
|
|
|
62386
62539
|
const body = await response.json().catch(() => null);
|
|
62387
62540
|
const discovered = parseDiscoveredModels(body, getProviderDefinition(provider).displayName);
|
|
62388
62541
|
if (discovered.length > 0) {
|
|
62389
|
-
|
|
62542
|
+
const models = modelDefinitionsFromDiscovered(discovered, provider);
|
|
62543
|
+
if (provider === "nvidia-nim" && isNvidiaHostedApi(baseUrl)) {
|
|
62544
|
+
return filterNvidiaHostedModels(models);
|
|
62545
|
+
}
|
|
62546
|
+
return models;
|
|
62390
62547
|
}
|
|
62391
62548
|
}
|
|
62392
62549
|
if (!reachedOk && lastError) {
|
|
@@ -62547,11 +62704,12 @@ async function listModelsForProviderWithSource(providerId, options = {}) {
|
|
|
62547
62704
|
...options,
|
|
62548
62705
|
signal: boundedSignal
|
|
62549
62706
|
})), options.signal);
|
|
62550
|
-
|
|
62551
|
-
|
|
62707
|
+
const selectableLiveModels = withoutRuntimeUnavailableModels(cacheKey, liveModels);
|
|
62708
|
+
if (selectableLiveModels.length > 0) {
|
|
62709
|
+
rememberModels(cacheKey, selectableLiveModels);
|
|
62552
62710
|
return {
|
|
62553
62711
|
provider,
|
|
62554
|
-
models:
|
|
62712
|
+
models: selectableLiveModels,
|
|
62555
62713
|
source: "live"
|
|
62556
62714
|
};
|
|
62557
62715
|
}
|
|
@@ -62701,11 +62859,12 @@ function validateProviderModelPair(providerId, modelId, options = {}) {
|
|
|
62701
62859
|
const staticModelIds = staticDefinitions.filter(isAgentCapable).map((model) => model.id);
|
|
62702
62860
|
const hasDynamicModels = models.some((model) => model.isDynamic) || getProviderDefinition(provider).modelDiscoveryType === "live";
|
|
62703
62861
|
const validModelIds = suppliedModels.length > 0 ? suppliedModels : hasDynamicModels ? cachedModels.length > 0 ? cachedModels : staticModelIds : Array.from(new Set([...staticModelIds, ...cachedModels]));
|
|
62862
|
+
const comparableModelId = providerCapabilityModelId(provider, modelId);
|
|
62704
62863
|
const selectedDefinition = [
|
|
62705
62864
|
...cachedDefinitions,
|
|
62706
62865
|
...suppliedDefinitions,
|
|
62707
62866
|
...staticDefinitions
|
|
62708
|
-
].find((model) => model.id ===
|
|
62867
|
+
].find((model) => model.id.toLowerCase() === comparableModelId);
|
|
62709
62868
|
if (selectedDefinition?.supportedParameters !== undefined && !selectedDefinition.supportedParameters.includes("tools")) {
|
|
62710
62869
|
const defaultModel2 = getDefaultModelForProvider(provider);
|
|
62711
62870
|
return {
|
|
@@ -62715,7 +62874,7 @@ function validateProviderModelPair(providerId, modelId, options = {}) {
|
|
|
62715
62874
|
suggestedModel: defaultModel2
|
|
62716
62875
|
};
|
|
62717
62876
|
}
|
|
62718
|
-
if (validModelIds.
|
|
62877
|
+
if (validModelIds.some((validModelId) => validModelId.toLowerCase() === comparableModelId)) {
|
|
62719
62878
|
return { valid: true };
|
|
62720
62879
|
}
|
|
62721
62880
|
const noAuthoritativeList = cachedModels.length === 0 && suppliedModels.length === 0;
|
|
@@ -62778,7 +62937,7 @@ function setProviderModel(providerId, modelId, options = {}) {
|
|
|
62778
62937
|
modelSource: options.modelSource ?? "static"
|
|
62779
62938
|
};
|
|
62780
62939
|
}
|
|
62781
|
-
var PROVIDER_IDS, DEFAULT_PROVIDER_ID = "ollama", UR_NATIVE_PROVIDER_BOUNDARY = "UR-native runtime: UR owns provider request shaping, native tool-call parsing, native streaming, and UR-run tool permission/sandbox/verifier flow.", SUBSCRIPTION_CLI_PROVIDER_BOUNDARY = "External vendor CLI boundary: UR passes prompt text to the official CLI and receives final text output. UR-native tool calling, UR Bash/File tool execution, UR-native streaming, local command permissions, sandbox guarantees, and verifier/done-gate checks apply to UR-run tools/final UR output, not to actions the external CLI performs internally.", UNCONFIGURED_SUBSCRIPTION_PROVIDER_BOUNDARY = "Unconfigured subscription placeholder: no runtime is attached. Choose a specific subscription CLI, API, local, or server provider.", UR_NATIVE_CAPABILITIES, SUBSCRIPTION_CLI_CAPABILITIES, SUBSCRIPTION_PLACEHOLDER_CAPABILITIES, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_FAMILIES, EFFORT_LOW_MEDIUM_HIGH, EFFORT_LOW_MEDIUM_HIGH_XHIGH, EFFORT_LOW_MEDIUM_HIGH_MAX, EFFORT_LOW_MEDIUM_HIGH_XHIGH_MAX, OPENAI_GPT_56_EFFORTS, GEMINI_MINIMAL_TO_HIGH, NVIDIA_NONE_LOW_HIGH, NVIDIA_NONE_HIGH_MAX, NVIDIA_FULL_EFFORT_RANGE, PROVIDER_MODELS, cachedModelsByProvider, cachedModelsWrittenAt, modelDiscoveryCoalescer, MODEL_DISCOVERY_TIMEOUT_MS = 15000, validateProviderModelCompatibility;
|
|
62940
|
+
var PROVIDER_IDS, DEFAULT_PROVIDER_ID = "ollama", UR_NATIVE_PROVIDER_BOUNDARY = "UR-native runtime: UR owns provider request shaping, native tool-call parsing, native streaming, and UR-run tool permission/sandbox/verifier flow.", SUBSCRIPTION_CLI_PROVIDER_BOUNDARY = "External vendor CLI boundary: UR passes prompt text to the official CLI and receives final text output. UR-native tool calling, UR Bash/File tool execution, UR-native streaming, local command permissions, sandbox guarantees, and verifier/done-gate checks apply to UR-run tools/final UR output, not to actions the external CLI performs internally.", UNCONFIGURED_SUBSCRIPTION_PROVIDER_BOUNDARY = "Unconfigured subscription placeholder: no runtime is attached. Choose a specific subscription CLI, API, local, or server provider.", UR_NATIVE_CAPABILITIES, SUBSCRIPTION_CLI_CAPABILITIES, SUBSCRIPTION_PLACEHOLDER_CAPABILITIES, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_FAMILIES, NVIDIA_HOSTED_API_HOST = "integrate.api.nvidia.com", EFFORT_LOW_MEDIUM_HIGH, EFFORT_LOW_MEDIUM_HIGH_XHIGH, EFFORT_LOW_MEDIUM_HIGH_MAX, EFFORT_LOW_MEDIUM_HIGH_XHIGH_MAX, OPENAI_GPT_56_EFFORTS, GEMINI_MINIMAL_TO_HIGH, NVIDIA_NONE_LOW_HIGH, NVIDIA_NONE_HIGH_MAX, NVIDIA_FULL_EFFORT_RANGE, PROVIDER_MODELS, cachedModelsByProvider, cachedModelsWrittenAt, unavailableModelsByEndpoint, modelDiscoveryCoalescer, MODEL_DISCOVERY_TIMEOUT_MS = 15000, validateProviderModelCompatibility;
|
|
62782
62941
|
var init_providerRegistry = __esm(() => {
|
|
62783
62942
|
init_execFileNoThrow();
|
|
62784
62943
|
init_ollamaConfig();
|
|
@@ -63341,6 +63500,8 @@ var init_providerRegistry = __esm(() => {
|
|
|
63341
63500
|
{ id: "google/gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "Google Gemini via OpenRouter" }
|
|
63342
63501
|
],
|
|
63343
63502
|
"nvidia-nim": [
|
|
63503
|
+
{ id: "nvidia/nemotron-3.5-lightning-30b-a3b", displayName: "nvidia/nemotron-3.5-lightning-30b-a3b", description: "NVIDIA-documented fastest 30B agent model", isDynamic: true, isDefault: true, reasoning: { supportsThinking: true, defaultEnabled: true } },
|
|
63504
|
+
{ id: "moonshotai/kimi-k3", displayName: "moonshotai/kimi-k3", description: "NVIDIA-documented mandatory reasoning contract", isDynamic: true, reasoning: { supportsThinking: true, supportedEfforts: ["low", "high", "max"], mandatory: true } },
|
|
63344
63505
|
{ id: "openai/gpt-oss-20b", displayName: "openai/gpt-oss-20b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: { supportedEfforts: ["low", "medium", "high"], defaultEffort: "medium" } },
|
|
63345
63506
|
{ id: "openai/gpt-oss-120b", displayName: "openai/gpt-oss-120b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: { supportedEfforts: ["low", "medium", "high"], defaultEffort: "medium" } },
|
|
63346
63507
|
{ id: "nvidia/nemotron-3-super-120b-a12b", displayName: "nvidia/nemotron-3-super-120b-a12b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: NVIDIA_NONE_LOW_HIGH },
|
|
@@ -63370,6 +63531,7 @@ var init_providerRegistry = __esm(() => {
|
|
|
63370
63531
|
};
|
|
63371
63532
|
cachedModelsByProvider = new Map;
|
|
63372
63533
|
cachedModelsWrittenAt = new Map;
|
|
63534
|
+
unavailableModelsByEndpoint = new Map;
|
|
63373
63535
|
modelDiscoveryCoalescer = new RequestCoalescer;
|
|
63374
63536
|
validateProviderModelCompatibility = validateProviderModelPair;
|
|
63375
63537
|
});
|
|
@@ -231133,7 +231295,7 @@ var init_metadata = __esm(() => {
|
|
|
231133
231295
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
231134
231296
|
WHITESPACE_REGEX2 = /\s+/;
|
|
231135
231297
|
getVersionBase = memoize_default(() => {
|
|
231136
|
-
const match = "1.84.
|
|
231298
|
+
const match = "1.84.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
231137
231299
|
return match ? match[0] : undefined;
|
|
231138
231300
|
});
|
|
231139
231301
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -231173,7 +231335,7 @@ var init_metadata = __esm(() => {
|
|
|
231173
231335
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
231174
231336
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
231175
231337
|
isURAiAuth: isURAISubscriber(),
|
|
231176
|
-
version: "1.84.
|
|
231338
|
+
version: "1.84.5",
|
|
231177
231339
|
versionBase: getVersionBase(),
|
|
231178
231340
|
buildTime: "",
|
|
231179
231341
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -238612,7 +238774,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
238612
238774
|
if (!isAttributionHeaderEnabled()) {
|
|
238613
238775
|
return "";
|
|
238614
238776
|
}
|
|
238615
|
-
const version2 = `${"1.84.
|
|
238777
|
+
const version2 = `${"1.84.5"}.${fingerprint}`;
|
|
238616
238778
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
238617
238779
|
const cch = "";
|
|
238618
238780
|
const workload = getWorkload();
|
|
@@ -259847,8 +260009,10 @@ var init_modelSupportOverrides = __esm(() => {
|
|
|
259847
260009
|
function resolveThinkingArrowValue(direction) {
|
|
259848
260010
|
return direction === "right";
|
|
259849
260011
|
}
|
|
259850
|
-
function providerSupportsThinkingToggle(provider) {
|
|
259851
|
-
|
|
260012
|
+
function providerSupportsThinkingToggle(provider, model) {
|
|
260013
|
+
if (provider === "ollama" || provider === "anthropic-api")
|
|
260014
|
+
return true;
|
|
260015
|
+
return provider === "nvidia-nim" && /^nvidia\/nemotron-3\.5-lightning-30b-a3b(?:-|$)/iu.test(model ?? "");
|
|
259852
260016
|
}
|
|
259853
260017
|
function resolveSessionThinkingConfig(configured, enabled) {
|
|
259854
260018
|
if (enabled === false)
|
|
@@ -261816,6 +261980,16 @@ async function createOpenAICompatibleClient(options2) {
|
|
|
261816
261980
|
const endpoint = normalizeOpenAICompatibleBaseUrl(options2.baseUrl);
|
|
261817
261981
|
const maxRetries = options2.maxRetries;
|
|
261818
261982
|
const providerId = options2.providerId ?? "openai-compatible";
|
|
261983
|
+
const isUnavailableNvidiaFunction = (response, body) => providerId === "nvidia-nim" && response.status === 404 && /function\s+['"][^'"]+['"]\s*:\s*not found for account\s+['"][^'"]+['"]/iu.test(body);
|
|
261984
|
+
const failureMessage = (response, body, streaming, model) => {
|
|
261985
|
+
if (isUnavailableNvidiaFunction(response, body)) {
|
|
261986
|
+
const modelId = typeof model === "string" && model.trim() ? model.trim() : "selected model";
|
|
261987
|
+
markProviderModelUnavailable(providerId, modelId, options2.baseUrl);
|
|
261988
|
+
return `NVIDIA NIM model "${modelId}" is unavailable to this account. UR removed it from this session's catalog; refresh /model and choose another NVIDIA-hosted model.`;
|
|
261989
|
+
}
|
|
261990
|
+
return `OpenAI-compatible${streaming ? " streaming" : ""} request failed for ${endpoint} (${response.status}): ${body || response.statusText}`;
|
|
261991
|
+
};
|
|
261992
|
+
const failureBody = (response, body) => isUnavailableNvidiaFunction(response, body) ? undefined : body;
|
|
261819
261993
|
async function doRequest(params, requestOptions) {
|
|
261820
261994
|
const response = await fetchWithProviderReliability(endpoint, {
|
|
261821
261995
|
method: "POST",
|
|
@@ -261830,7 +262004,8 @@ async function createOpenAICompatibleClient(options2) {
|
|
|
261830
262004
|
maxRetries,
|
|
261831
262005
|
timeoutMs: requestOptions?.timeoutMs,
|
|
261832
262006
|
signal: requestOptions?.signal,
|
|
261833
|
-
failureMessage: (response2, body) =>
|
|
262007
|
+
failureMessage: (response2, body) => failureMessage(response2, body, false, params.model),
|
|
262008
|
+
failureBody
|
|
261834
262009
|
});
|
|
261835
262010
|
const data = await response.json();
|
|
261836
262011
|
return {
|
|
@@ -261855,7 +262030,8 @@ async function createOpenAICompatibleClient(options2) {
|
|
|
261855
262030
|
timeoutMs: requestOptions?.timeoutMs,
|
|
261856
262031
|
signal,
|
|
261857
262032
|
streaming: true,
|
|
261858
|
-
failureMessage: (response2, body) =>
|
|
262033
|
+
failureMessage: (response2, body) => failureMessage(response2, body, true, params.model),
|
|
262034
|
+
failureBody
|
|
261859
262035
|
});
|
|
261860
262036
|
const requestId = response.headers.get("x-request-id") ?? response.headers.get("x-request-id".toLowerCase()) ?? `openai-compatible-${randomUUID6()}`;
|
|
261861
262037
|
return {
|
|
@@ -261902,7 +262078,7 @@ async function createOpenAICompatibleClient(options2) {
|
|
|
261902
262078
|
source: "local-estimate"
|
|
261903
262079
|
};
|
|
261904
262080
|
};
|
|
261905
|
-
if (providerId !== "llama.cpp" && providerId !== "vllm"
|
|
262081
|
+
if (providerId !== "llama.cpp" && providerId !== "vllm") {
|
|
261906
262082
|
return estimate();
|
|
261907
262083
|
}
|
|
261908
262084
|
try {
|
|
@@ -261954,7 +262130,7 @@ function openAICompatibleAnthropicCountUrl(chatEndpoint) {
|
|
|
261954
262130
|
url3.pathname = url3.pathname.replace(/\/chat\/completions\/?$/u, "/messages/count_tokens");
|
|
261955
262131
|
return url3.toString().replace(/\/$/u, "");
|
|
261956
262132
|
}
|
|
261957
|
-
function toOpenAICompatibleRequest(params, providerName = "openai-compatible") {
|
|
262133
|
+
function toOpenAICompatibleRequest(params, providerName = "openai-compatible", options2 = {}) {
|
|
261958
262134
|
const tools = toOpenAITools(params.tools, providerName);
|
|
261959
262135
|
const responseFormat = toOpenAIResponseFormat(params.output_config?.format);
|
|
261960
262136
|
const reasoningEffort = toOpenAIReasoningEffort(params, providerName);
|
|
@@ -261967,9 +262143,16 @@ function toOpenAICompatibleRequest(params, providerName = "openai-compatible") {
|
|
|
261967
262143
|
})() : undefined;
|
|
261968
262144
|
const openRouterServerSearch = providerName === "openrouter" && tools.some((tool) => tool?.type === "openrouter:web_search");
|
|
261969
262145
|
const toolChoice = openRouterServerSearch ? undefined : mapOpenAIToolChoice(params.tool_choice);
|
|
261970
|
-
const openRouterProviderPreferences = providerName === "openrouter" ? openRouterRoutingPreferences(params) : undefined;
|
|
262146
|
+
const openRouterProviderPreferences = providerName === "openrouter" ? openRouterRoutingPreferences(params, options2.openrouter) : undefined;
|
|
261971
262147
|
const openRouterSessionId = providerName === "openrouter" ? resolveOpenRouterSessionId(params) : undefined;
|
|
262148
|
+
const openRouterServiceTier = providerName === "openrouter" ? params.service_tier ?? options2.openrouter?.serviceTier : undefined;
|
|
262149
|
+
const openRouterSpeed = providerName === "openrouter" ? params.speed ?? options2.openrouter?.speed : undefined;
|
|
261972
262150
|
const nvidiaCodingAgentTemplate = providerName === "nvidia-nim" && /^nvidia\/nemotron-3-(?:super|ultra)(?:-|$)/iu.test(String(params.model ?? "")) && tools.length > 0 ? { force_nonempty_content: true } : undefined;
|
|
262151
|
+
const nvidiaLightningThinking = providerName === "nvidia-nim" && /^nvidia\/nemotron-3\.5-lightning-30b-a3b(?:-|$)/iu.test(String(params.model ?? "")) && (params.thinking?.type === "disabled" || params.thinking?.type === "enabled" || params.thinking?.type === "adaptive") ? { enable_thinking: params.thinking.type !== "disabled" } : undefined;
|
|
262152
|
+
const nvidiaChatTemplate = nvidiaCodingAgentTemplate || nvidiaLightningThinking ? {
|
|
262153
|
+
...nvidiaCodingAgentTemplate,
|
|
262154
|
+
...nvidiaLightningThinking
|
|
262155
|
+
} : undefined;
|
|
261973
262156
|
return {
|
|
261974
262157
|
model: params.model,
|
|
261975
262158
|
messages: toOpenAIMessages(params, providerName),
|
|
@@ -261985,8 +262168,10 @@ function toOpenAICompatibleRequest(params, providerName = "openai-compatible") {
|
|
|
261985
262168
|
provider: openRouterProviderPreferences
|
|
261986
262169
|
},
|
|
261987
262170
|
...openRouterSessionId && { session_id: openRouterSessionId },
|
|
261988
|
-
...
|
|
261989
|
-
|
|
262171
|
+
...openRouterServiceTier && openRouterServiceTier !== "auto" ? { service_tier: openRouterServiceTier } : {},
|
|
262172
|
+
...openRouterSpeed === "fast" ? { speed: "fast" } : {},
|
|
262173
|
+
...nvidiaChatTemplate && {
|
|
262174
|
+
chat_template_kwargs: nvidiaChatTemplate
|
|
261990
262175
|
},
|
|
261991
262176
|
stream: Boolean(params.stream),
|
|
261992
262177
|
...params.stream && providerName !== "openrouter" ? { stream_options: { include_usage: true } } : {},
|
|
@@ -261994,14 +262179,33 @@ function toOpenAICompatibleRequest(params, providerName = "openai-compatible") {
|
|
|
261994
262179
|
...toolChoice !== undefined ? { tool_choice: toolChoice } : {}
|
|
261995
262180
|
};
|
|
261996
262181
|
}
|
|
261997
|
-
function openRouterRoutingPreferences(params) {
|
|
262182
|
+
function openRouterRoutingPreferences(params, settings) {
|
|
261998
262183
|
if (params?.provider && typeof params.provider === "object" && !Array.isArray(params.provider)) {
|
|
261999
262184
|
return params.provider;
|
|
262000
262185
|
}
|
|
262001
262186
|
const model = typeof params?.model === "string" ? params.model : "";
|
|
262002
|
-
|
|
262003
|
-
|
|
262004
|
-
|
|
262187
|
+
const usesModelRoutingVariant = /:(?:nitro|floor|exacto)$/iu.test(model);
|
|
262188
|
+
const preferences = {};
|
|
262189
|
+
const strategy = settings?.routing ?? "auto";
|
|
262190
|
+
const hasTools = Array.isArray(params?.tools) && params.tools.length > 0 || params?.tool_choice !== undefined;
|
|
262191
|
+
if (strategy !== "auto") {
|
|
262192
|
+
preferences.sort = strategy;
|
|
262193
|
+
} else if (!usesModelRoutingVariant && !hasTools) {
|
|
262194
|
+
preferences.sort = "throughput";
|
|
262195
|
+
}
|
|
262196
|
+
if (settings?.allowFallbacks !== undefined) {
|
|
262197
|
+
preferences.allow_fallbacks = settings.allowFallbacks;
|
|
262198
|
+
}
|
|
262199
|
+
if (settings?.requireParameters !== undefined) {
|
|
262200
|
+
preferences.require_parameters = settings.requireParameters;
|
|
262201
|
+
}
|
|
262202
|
+
if (settings?.preferredMinThroughput !== undefined) {
|
|
262203
|
+
preferences.preferred_min_throughput = settings.preferredMinThroughput;
|
|
262204
|
+
}
|
|
262205
|
+
if (settings?.preferredMaxLatency !== undefined) {
|
|
262206
|
+
preferences.preferred_max_latency = settings.preferredMaxLatency;
|
|
262207
|
+
}
|
|
262208
|
+
return Object.keys(preferences).length > 0 ? preferences : undefined;
|
|
262005
262209
|
}
|
|
262006
262210
|
function resolveOpenRouterSessionId(params) {
|
|
262007
262211
|
const explicit = validOpenRouterSessionId(params?.session_id);
|
|
@@ -272029,6 +272233,18 @@ var init_types4 = __esm(() => {
|
|
|
272029
272233
|
compactThreshold: exports_external.number().int().min(1000).optional().describe("Token threshold for server-side Responses compaction."),
|
|
272030
272234
|
toolSearch: exports_external.enum(["off", "hosted"]).optional().describe("Deferred Responses API tool search mode. Defaults to off.")
|
|
272031
272235
|
}).optional().describe("Privacy-conscious OpenAI Responses API options."),
|
|
272236
|
+
openrouter: exports_external.object({
|
|
272237
|
+
routing: exports_external.enum(["auto", "throughput", "latency", "price"]).optional().describe("OpenRouter routing strategy. Auto preserves Auto Exacto for tool turns and prioritizes throughput for ordinary turns."),
|
|
272238
|
+
allowFallbacks: exports_external.boolean().optional().describe("Allow OpenRouter to try another upstream endpoint after a provider failure."),
|
|
272239
|
+
requireParameters: exports_external.boolean().optional().describe("Only route through OpenRouter endpoints that support every request parameter."),
|
|
272240
|
+
preferredMinThroughput: exports_external.number().positive().optional().describe("Preferred OpenRouter median throughput in output tokens per second."),
|
|
272241
|
+
preferredMaxLatency: exports_external.number().positive().optional().describe("Preferred OpenRouter median time-to-first-token latency in seconds."),
|
|
272242
|
+
serviceTier: exports_external.enum(["auto", "default", "flex", "priority", "fast"]).optional().describe("OpenRouter upstream service tier; priority may cost more and is model-dependent."),
|
|
272243
|
+
speed: exports_external.enum(["standard", "fast"]).optional().describe("Request OpenRouter fast mode on models that explicitly support it.")
|
|
272244
|
+
}).optional().describe("OpenRouter performance and routing controls."),
|
|
272245
|
+
anthropic: exports_external.object({
|
|
272246
|
+
speed: exports_external.enum(["standard", "fast"]).optional().describe("Anthropic inference speed. Fast is an opt-in, premium research preview available only to enabled accounts and supported Opus models.")
|
|
272247
|
+
}).optional().describe("Anthropic API performance controls."),
|
|
272032
272248
|
preferences: exports_external.record(exports_external.string(), NonSecretPreferenceSchema).optional().describe("Non-secret provider preferences only")
|
|
272033
272249
|
}).optional().describe("Legal provider configuration; credentials must stay in environment variables or official CLIs"),
|
|
272034
272250
|
availableModels: exports_external.array(exports_external.string()).optional().describe("Allowlist of models that users can select. " + "Accepts exact provider-scoped model IDs and provider-specific aliases. " + "If undefined, all models are available. If empty array, only the default model is available. " + "Typically set in managed settings by enterprise administrators."),
|
|
@@ -304647,7 +304863,7 @@ function getTelemetryAttributes() {
|
|
|
304647
304863
|
attributes["session.id"] = sessionId;
|
|
304648
304864
|
}
|
|
304649
304865
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
304650
|
-
attributes["app.version"] = "1.84.
|
|
304866
|
+
attributes["app.version"] = "1.84.5";
|
|
304651
304867
|
}
|
|
304652
304868
|
const oauthAccount = getOauthAccountInfo();
|
|
304653
304869
|
if (oauthAccount) {
|
|
@@ -307678,7 +307894,7 @@ var require_src3 = __commonJS((exports) => {
|
|
|
307678
307894
|
function getInstruments() {
|
|
307679
307895
|
if (instruments)
|
|
307680
307896
|
return instruments;
|
|
307681
|
-
const meter = import_api2.metrics.getMeter("ur-agent.gen_ai", "1.84.
|
|
307897
|
+
const meter = import_api2.metrics.getMeter("ur-agent.gen_ai", "1.84.5");
|
|
307682
307898
|
instruments = {
|
|
307683
307899
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
307684
307900
|
description: "GenAI operation duration.",
|
|
@@ -307776,7 +307992,7 @@ function genAiAgentAttributes() {
|
|
|
307776
307992
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
307777
307993
|
"gen_ai.provider.name": "ur",
|
|
307778
307994
|
"gen_ai.agent.name": "UR-Nexus",
|
|
307779
|
-
"gen_ai.agent.version": "1.84.
|
|
307995
|
+
"gen_ai.agent.version": "1.84.5"
|
|
307780
307996
|
};
|
|
307781
307997
|
}
|
|
307782
307998
|
function genAiWorkflowAttributes(workflowName, workflowRunId) {
|
|
@@ -307797,7 +308013,7 @@ function genAiWorkflowAttributes(workflowName, workflowRunId) {
|
|
|
307797
308013
|
function startGenAiWorkflowSpan(workflowName, workflowRunId) {
|
|
307798
308014
|
const attributes = genAiWorkflowAttributes(workflowName, workflowRunId);
|
|
307799
308015
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
307800
|
-
return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.
|
|
308016
|
+
return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.5").startSpan(name, { kind: import_api2.SpanKind.INTERNAL, attributes });
|
|
307801
308017
|
}
|
|
307802
308018
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
307803
308019
|
try {
|
|
@@ -307835,7 +308051,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
307835
308051
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
307836
308052
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
307837
308053
|
}
|
|
307838
|
-
return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.
|
|
308054
|
+
return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.5").startSpan(operation, { kind: import_api2.SpanKind.INTERNAL, attributes });
|
|
307839
308055
|
}
|
|
307840
308056
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
307841
308057
|
try {
|
|
@@ -322242,7 +322458,7 @@ async function createRuntime() {
|
|
|
322242
322458
|
bootstrapTelemetry();
|
|
322243
322459
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
322244
322460
|
[import_semantic_conventions6.ATTR_SERVICE_NAME]: "ur-agent",
|
|
322245
|
-
[import_semantic_conventions6.ATTR_SERVICE_VERSION]: "1.84.
|
|
322461
|
+
[import_semantic_conventions6.ATTR_SERVICE_VERSION]: "1.84.5"
|
|
322246
322462
|
}));
|
|
322247
322463
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
322248
322464
|
resource,
|
|
@@ -322275,11 +322491,11 @@ async function createRuntime() {
|
|
|
322275
322491
|
setMeterProvider(meterProvider);
|
|
322276
322492
|
setLoggerProvider(loggerProvider);
|
|
322277
322493
|
if (meterProvider) {
|
|
322278
|
-
const meter = meterProvider.getMeter("ur-agent", "1.84.
|
|
322494
|
+
const meter = meterProvider.getMeter("ur-agent", "1.84.5");
|
|
322279
322495
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
322280
322496
|
}
|
|
322281
322497
|
if (loggerProvider) {
|
|
322282
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.84.
|
|
322498
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.84.5"));
|
|
322283
322499
|
}
|
|
322284
322500
|
if (!cleanupRegistered4) {
|
|
322285
322501
|
cleanupRegistered4 = true;
|
|
@@ -322828,7 +323044,7 @@ function isAnyTracingEnabled() {
|
|
|
322828
323044
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
322829
323045
|
}
|
|
322830
323046
|
function getTracer() {
|
|
322831
|
-
return import_api32.trace.getTracer("ur-agent.gen_ai", "1.84.
|
|
323047
|
+
return import_api32.trace.getTracer("ur-agent.gen_ai", "1.84.5");
|
|
322832
323048
|
}
|
|
322833
323049
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
322834
323050
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -329678,6 +329894,72 @@ var init_tokenBudget2 = __esm(() => {
|
|
|
329678
329894
|
init_tokenBudget();
|
|
329679
329895
|
});
|
|
329680
329896
|
|
|
329897
|
+
// src/query/outputLimitRecovery.ts
|
|
329898
|
+
import { createHash as createHash17 } from "crypto";
|
|
329899
|
+
|
|
329900
|
+
class OutputLimitRecoveryTracker {
|
|
329901
|
+
seen = new Set;
|
|
329902
|
+
continuationCount = 0;
|
|
329903
|
+
consecutiveStalls = 0;
|
|
329904
|
+
record(messages) {
|
|
329905
|
+
const fingerprint = progressFingerprint(messages);
|
|
329906
|
+
const stallReason = !fingerprint ? "empty" : this.seen.has(fingerprint) ? "repeated" : undefined;
|
|
329907
|
+
this.continuationCount++;
|
|
329908
|
+
if (stallReason) {
|
|
329909
|
+
this.consecutiveStalls++;
|
|
329910
|
+
} else {
|
|
329911
|
+
this.consecutiveStalls = 0;
|
|
329912
|
+
this.seen.add(fingerprint);
|
|
329913
|
+
}
|
|
329914
|
+
return {
|
|
329915
|
+
shouldContinue: this.consecutiveStalls < 2,
|
|
329916
|
+
continuationCount: this.continuationCount,
|
|
329917
|
+
consecutiveStalls: this.consecutiveStalls,
|
|
329918
|
+
...stallReason ? { stallReason } : {}
|
|
329919
|
+
};
|
|
329920
|
+
}
|
|
329921
|
+
reset() {
|
|
329922
|
+
this.seen.clear();
|
|
329923
|
+
this.continuationCount = 0;
|
|
329924
|
+
this.consecutiveStalls = 0;
|
|
329925
|
+
}
|
|
329926
|
+
}
|
|
329927
|
+
function progressFingerprint(messages) {
|
|
329928
|
+
const material = messages.filter((message) => !message.isApiErrorMessage).flatMap((message) => {
|
|
329929
|
+
const content = message.message?.content;
|
|
329930
|
+
return Array.isArray(content) ? content : content === undefined ? [] : [content];
|
|
329931
|
+
}).map(projectProgressValue).filter((value) => value !== undefined && value !== "");
|
|
329932
|
+
if (material.length === 0)
|
|
329933
|
+
return;
|
|
329934
|
+
return createHash17("sha256").update(JSON.stringify(material)).digest("hex");
|
|
329935
|
+
}
|
|
329936
|
+
function projectProgressValue(value) {
|
|
329937
|
+
if (typeof value === "string")
|
|
329938
|
+
return value.replace(/\s+/gu, " ").trim();
|
|
329939
|
+
if (typeof value === "number" || typeof value === "boolean" || value === null) {
|
|
329940
|
+
return value;
|
|
329941
|
+
}
|
|
329942
|
+
if (Array.isArray(value))
|
|
329943
|
+
return value.map(projectProgressValue);
|
|
329944
|
+
if (!value || typeof value !== "object")
|
|
329945
|
+
return;
|
|
329946
|
+
const record2 = value;
|
|
329947
|
+
const type = typeof record2.type === "string" ? record2.type : undefined;
|
|
329948
|
+
if (type === "redacted_thinking" && typeof record2.data === "string") {
|
|
329949
|
+
return { type, opaqueBytes: record2.data.length };
|
|
329950
|
+
}
|
|
329951
|
+
const projected = {};
|
|
329952
|
+
for (const key of Object.keys(record2).sort()) {
|
|
329953
|
+
if (/^(?:id|request_id|signature|uuid)$/u.test(key))
|
|
329954
|
+
continue;
|
|
329955
|
+
const nested = projectProgressValue(record2[key]);
|
|
329956
|
+
if (nested !== undefined && nested !== "")
|
|
329957
|
+
projected[key] = nested;
|
|
329958
|
+
}
|
|
329959
|
+
return projected;
|
|
329960
|
+
}
|
|
329961
|
+
var init_outputLimitRecovery = () => {};
|
|
329962
|
+
|
|
329681
329963
|
// src/query.ts
|
|
329682
329964
|
function* yieldMissingToolResultBlocks(assistantMessages, errorMessage3) {
|
|
329683
329965
|
for (const assistantMessage of assistantMessages) {
|
|
@@ -329740,6 +330022,7 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
|
|
|
329740
330022
|
pendingToolUseSummary: undefined,
|
|
329741
330023
|
transition: undefined
|
|
329742
330024
|
};
|
|
330025
|
+
const outputLimitRecovery = new OutputLimitRecoveryTracker;
|
|
329743
330026
|
const budgetTracker = null;
|
|
329744
330027
|
let taskBudgetRemaining = undefined;
|
|
329745
330028
|
const config3 = buildQueryConfig();
|
|
@@ -330158,6 +330441,9 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
|
|
|
330158
330441
|
}
|
|
330159
330442
|
if (!needsFollowUp) {
|
|
330160
330443
|
const lastMessage = assistantMessages.at(-1);
|
|
330444
|
+
const hitOutputLimit = isWithheldMaxOutputTokens(lastMessage);
|
|
330445
|
+
if (!hitOutputLimit)
|
|
330446
|
+
outputLimitRecovery.reset();
|
|
330161
330447
|
const isWithheld413 = lastMessage?.type === "assistant" && lastMessage.isApiErrorMessage && isPromptTooLongMessage(lastMessage);
|
|
330162
330448
|
const isWithheldMedia = mediaRecoveryEnabled && reactiveCompact?.isWithheldMediaSizeError(lastMessage);
|
|
330163
330449
|
if (isWithheld413) {
|
|
@@ -330249,30 +330535,11 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
|
|
|
330249
330535
|
});
|
|
330250
330536
|
return { reason: isWithheldMedia ? "image_error" : "prompt_too_long" };
|
|
330251
330537
|
} else if (false) {}
|
|
330252
|
-
if (
|
|
330253
|
-
const
|
|
330254
|
-
if (
|
|
330255
|
-
logEvent("tengu_max_tokens_escalate", {
|
|
330256
|
-
escalatedTo: ESCALATED_MAX_TOKENS
|
|
330257
|
-
});
|
|
330258
|
-
const next2 = {
|
|
330259
|
-
messages: messagesForQuery,
|
|
330260
|
-
toolUseContext,
|
|
330261
|
-
autoCompactTracking: tracking,
|
|
330262
|
-
maxOutputTokensRecoveryCount,
|
|
330263
|
-
hasAttemptedReactiveCompact,
|
|
330264
|
-
maxOutputTokensOverride: ESCALATED_MAX_TOKENS,
|
|
330265
|
-
pendingToolUseSummary: undefined,
|
|
330266
|
-
stopHookActive: undefined,
|
|
330267
|
-
turnCount,
|
|
330268
|
-
transition: { reason: "max_output_tokens_escalate" }
|
|
330269
|
-
};
|
|
330270
|
-
state = next2;
|
|
330271
|
-
continue;
|
|
330272
|
-
}
|
|
330273
|
-
if (maxOutputTokensRecoveryCount < MAX_OUTPUT_TOKENS_RECOVERY_LIMIT) {
|
|
330538
|
+
if (hitOutputLimit) {
|
|
330539
|
+
const recovery = outputLimitRecovery.record(assistantMessages);
|
|
330540
|
+
if (recovery.shouldContinue) {
|
|
330274
330541
|
const recoveryMessage = createUserMessage({
|
|
330275
|
-
content: `
|
|
330542
|
+
content: `The provider ended this response at its per-response output boundary. ` + `Continue from the exact cutoff with only novel work\u2014do not apologize, recap, restart, or repeat prior text. ` + `Preserve the task and tool state; if the requested work is complete, finish now.`,
|
|
330276
330543
|
isMeta: true
|
|
330277
330544
|
});
|
|
330278
330545
|
const next2 = {
|
|
@@ -330291,13 +330558,17 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
|
|
|
330291
330558
|
turnCount,
|
|
330292
330559
|
transition: {
|
|
330293
330560
|
reason: "max_output_tokens_recovery",
|
|
330294
|
-
attempt:
|
|
330561
|
+
attempt: recovery.continuationCount
|
|
330295
330562
|
}
|
|
330296
330563
|
};
|
|
330297
330564
|
state = next2;
|
|
330298
330565
|
continue;
|
|
330299
330566
|
}
|
|
330300
|
-
yield
|
|
330567
|
+
yield createAssistantAPIErrorMessage({
|
|
330568
|
+
content: `Model "${currentModel}" repeatedly reached its per-response output boundary without novel progress (${recovery.stallReason === "empty" ? "empty output" : "replayed output"}). UR has no fixed total-output continuation ceiling; it stopped this stalled loop to avoid repeating the same provider calls.`,
|
|
330569
|
+
apiError: "max_output_tokens",
|
|
330570
|
+
error: "max_output_tokens"
|
|
330571
|
+
});
|
|
330301
330572
|
}
|
|
330302
330573
|
if (lastMessage?.isApiErrorMessage) {
|
|
330303
330574
|
executeStopFailureHooks(lastMessage, toolUseContext);
|
|
@@ -330406,6 +330677,7 @@ ${nudge.reminder}
|
|
|
330406
330677
|
}
|
|
330407
330678
|
return { reason: "completed" };
|
|
330408
330679
|
}
|
|
330680
|
+
outputLimitRecovery.reset();
|
|
330409
330681
|
let shouldPreventContinuation = false;
|
|
330410
330682
|
let updatedToolUseContext = toolUseContext;
|
|
330411
330683
|
queryCheckpoint("query_tool_execution_start");
|
|
@@ -330634,7 +330906,7 @@ ${loopHit.reminder}
|
|
|
330634
330906
|
state = next;
|
|
330635
330907
|
}
|
|
330636
330908
|
}
|
|
330637
|
-
var reactiveCompact = null, skillPrefetch = null
|
|
330909
|
+
var reactiveCompact = null, skillPrefetch = null;
|
|
330638
330910
|
var init_query = __esm(() => {
|
|
330639
330911
|
init_withRetry();
|
|
330640
330912
|
init_autoCompact();
|
|
@@ -330657,8 +330929,6 @@ var init_query = __esm(() => {
|
|
|
330657
330929
|
init_headlessProfiler();
|
|
330658
330930
|
init_model();
|
|
330659
330931
|
init_tokens();
|
|
330660
|
-
init_context4();
|
|
330661
|
-
init_growthbook();
|
|
330662
330932
|
init_prompt10();
|
|
330663
330933
|
init_postSamplingHooks();
|
|
330664
330934
|
init_hooks5();
|
|
@@ -330676,6 +330946,7 @@ var init_query = __esm(() => {
|
|
|
330676
330946
|
init_deps();
|
|
330677
330947
|
init_state();
|
|
330678
330948
|
init_tokenBudget2();
|
|
330949
|
+
init_outputLimitRecovery();
|
|
330679
330950
|
});
|
|
330680
330951
|
|
|
330681
330952
|
// src/services/api/emptyUsage.ts
|
|
@@ -334752,7 +335023,7 @@ var init_agent = __esm(() => {
|
|
|
334752
335023
|
});
|
|
334753
335024
|
|
|
334754
335025
|
// src/utils/fingerprint.ts
|
|
334755
|
-
import { createHash as
|
|
335026
|
+
import { createHash as createHash18 } from "crypto";
|
|
334756
335027
|
function extractFirstMessageText(messages) {
|
|
334757
335028
|
const firstUserMessage = messages.find((msg) => msg.type === "user");
|
|
334758
335029
|
if (!firstUserMessage) {
|
|
@@ -334774,12 +335045,12 @@ function computeFingerprint(messageText2, version2) {
|
|
|
334774
335045
|
const indices = [4, 7, 20];
|
|
334775
335046
|
const chars = indices.map((i3) => messageText2[i3] || "0").join("");
|
|
334776
335047
|
const fingerprintInput = `${FINGERPRINT_SALT}${chars}${version2}`;
|
|
334777
|
-
const hash4 =
|
|
335048
|
+
const hash4 = createHash18("sha256").update(fingerprintInput).digest("hex");
|
|
334778
335049
|
return hash4.slice(0, 3);
|
|
334779
335050
|
}
|
|
334780
335051
|
function computeFingerprintFromMessages(messages) {
|
|
334781
335052
|
const firstMessageText = extractFirstMessageText(messages);
|
|
334782
|
-
return computeFingerprint(firstMessageText, "1.84.
|
|
335053
|
+
return computeFingerprint(firstMessageText, "1.84.5");
|
|
334783
335054
|
}
|
|
334784
335055
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
334785
335056
|
var init_fingerprint = () => {};
|
|
@@ -334821,7 +335092,7 @@ async function sideQuery(opts) {
|
|
|
334821
335092
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
334822
335093
|
}
|
|
334823
335094
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
334824
|
-
const fingerprint = computeFingerprint(messageText2, "1.84.
|
|
335095
|
+
const fingerprint = computeFingerprint(messageText2, "1.84.5");
|
|
334825
335096
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
334826
335097
|
const systemBlocks = [
|
|
334827
335098
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -336520,7 +336791,7 @@ var init_trustedDevice = __esm(() => {
|
|
|
336520
336791
|
});
|
|
336521
336792
|
|
|
336522
336793
|
// src/services/analytics/datadog.ts
|
|
336523
|
-
import { createHash as
|
|
336794
|
+
import { createHash as createHash19 } from "crypto";
|
|
336524
336795
|
function camelToSnakeCase(str2) {
|
|
336525
336796
|
return str2.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
336526
336797
|
}
|
|
@@ -336728,7 +336999,7 @@ var init_datadog = __esm(() => {
|
|
|
336728
336999
|
});
|
|
336729
337000
|
getUserBucket = memoize_default(() => {
|
|
336730
337001
|
const userId = getOrCreateUserID();
|
|
336731
|
-
const hash4 =
|
|
337002
|
+
const hash4 = createHash19("sha256").update(userId).digest("hex");
|
|
336732
337003
|
return parseInt(hash4.slice(0, 8), 16) % NUM_USER_BUCKETS;
|
|
336733
337004
|
});
|
|
336734
337005
|
});
|
|
@@ -336928,7 +337199,7 @@ var init_user = __esm(() => {
|
|
|
336928
337199
|
deviceId,
|
|
336929
337200
|
sessionId: getSessionId(),
|
|
336930
337201
|
email: getEmail(),
|
|
336931
|
-
appVersion: "1.84.
|
|
337202
|
+
appVersion: "1.84.5",
|
|
336932
337203
|
platform: getHostPlatformForAnalytics(),
|
|
336933
337204
|
organizationUuid,
|
|
336934
337205
|
accountUuid,
|
|
@@ -337688,7 +337959,7 @@ var init_growthbook_experiment_event = __esm(() => {
|
|
|
337688
337959
|
|
|
337689
337960
|
// src/utils/userAgent.ts
|
|
337690
337961
|
function getURCodeUserAgent() {
|
|
337691
|
-
return `ur/${"1.84.
|
|
337962
|
+
return `ur/${"1.84.5"}`;
|
|
337692
337963
|
}
|
|
337693
337964
|
|
|
337694
337965
|
// src/services/analytics/firstPartyEventLoggingExporter.ts
|
|
@@ -338344,7 +338615,7 @@ function initialize1PEventLogging() {
|
|
|
338344
338615
|
const platform4 = getPlatform();
|
|
338345
338616
|
const attributes = {
|
|
338346
338617
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur",
|
|
338347
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.84.
|
|
338618
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.84.5"
|
|
338348
338619
|
};
|
|
338349
338620
|
if (platform4 === "wsl") {
|
|
338350
338621
|
const wslVersion = getWslVersion();
|
|
@@ -338372,7 +338643,7 @@ function initialize1PEventLogging() {
|
|
|
338372
338643
|
})
|
|
338373
338644
|
]
|
|
338374
338645
|
});
|
|
338375
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.84.
|
|
338646
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.84.5");
|
|
338376
338647
|
}
|
|
338377
338648
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
338378
338649
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -338898,7 +339169,7 @@ var init_types9 = __esm(() => {
|
|
|
338898
339169
|
});
|
|
338899
339170
|
|
|
338900
339171
|
// src/services/policyLimits/index.ts
|
|
338901
|
-
import { createHash as
|
|
339172
|
+
import { createHash as createHash20 } from "crypto";
|
|
338902
339173
|
import { readFileSync as fsReadFileSync } from "fs";
|
|
338903
339174
|
import { unlink as unlink10, writeFile as writeFile16 } from "fs/promises";
|
|
338904
339175
|
import { join as join82 } from "path";
|
|
@@ -338944,7 +339215,7 @@ function sortKeysDeep(obj) {
|
|
|
338944
339215
|
function computeChecksum(restrictions) {
|
|
338945
339216
|
const sorted = sortKeysDeep(restrictions);
|
|
338946
339217
|
const normalized = jsonStringify(sorted);
|
|
338947
|
-
const hash4 =
|
|
339218
|
+
const hash4 = createHash20("sha256").update(normalized).digest("hex");
|
|
338948
339219
|
return `sha256:${hash4}`;
|
|
338949
339220
|
}
|
|
338950
339221
|
function isPolicyLimitsEligible() {
|
|
@@ -340721,7 +340992,7 @@ var init_types10 = __esm(() => {
|
|
|
340721
340992
|
});
|
|
340722
340993
|
|
|
340723
340994
|
// src/services/remoteManagedSettings/index.ts
|
|
340724
|
-
import { createHash as
|
|
340995
|
+
import { createHash as createHash21 } from "crypto";
|
|
340725
340996
|
import { open as open8, unlink as unlink11 } from "fs/promises";
|
|
340726
340997
|
function initializeRemoteManagedSettingsLoadingPromise() {
|
|
340727
340998
|
if (loadingCompletePromise2) {
|
|
@@ -340759,7 +341030,7 @@ function sortKeysDeep2(obj) {
|
|
|
340759
341030
|
function computeChecksumFromSettings(settings) {
|
|
340760
341031
|
const sorted = sortKeysDeep2(settings);
|
|
340761
341032
|
const normalized = jsonStringify(sorted);
|
|
340762
|
-
const hash4 =
|
|
341033
|
+
const hash4 = createHash21("sha256").update(normalized).digest("hex");
|
|
340763
341034
|
return `sha256:${hash4}`;
|
|
340764
341035
|
}
|
|
340765
341036
|
function isEligibleForRemoteManagedSettings() {
|
|
@@ -341342,7 +341613,7 @@ var init_auth_code_listener = __esm(() => {
|
|
|
341342
341613
|
});
|
|
341343
341614
|
|
|
341344
341615
|
// src/services/oauth/crypto.ts
|
|
341345
|
-
import { createHash as
|
|
341616
|
+
import { createHash as createHash22, randomBytes as randomBytes12 } from "crypto";
|
|
341346
341617
|
function base64URLEncode(buffer) {
|
|
341347
341618
|
return buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
341348
341619
|
}
|
|
@@ -341350,7 +341621,7 @@ function generateCodeVerifier() {
|
|
|
341350
341621
|
return base64URLEncode(randomBytes12(32));
|
|
341351
341622
|
}
|
|
341352
341623
|
function generateCodeChallenge(verifier) {
|
|
341353
|
-
const hash4 =
|
|
341624
|
+
const hash4 = createHash22("sha256");
|
|
341354
341625
|
hash4.update(verifier);
|
|
341355
341626
|
return base64URLEncode(hash4.digest());
|
|
341356
341627
|
}
|
|
@@ -341674,9 +341945,9 @@ async function assertMinVersion() {
|
|
|
341674
341945
|
if (false) {}
|
|
341675
341946
|
try {
|
|
341676
341947
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
341677
|
-
if (versionConfig.minVersion && lt("1.84.
|
|
341948
|
+
if (versionConfig.minVersion && lt("1.84.5", versionConfig.minVersion)) {
|
|
341678
341949
|
console.error(`
|
|
341679
|
-
It looks like your version of UR (${"1.84.
|
|
341950
|
+
It looks like your version of UR (${"1.84.5"}) needs an update.
|
|
341680
341951
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
341681
341952
|
|
|
341682
341953
|
To update, please run:
|
|
@@ -341892,7 +342163,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
341892
342163
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
341893
342164
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
341894
342165
|
pid: process.pid,
|
|
341895
|
-
currentVersion: "1.84.
|
|
342166
|
+
currentVersion: "1.84.5"
|
|
341896
342167
|
});
|
|
341897
342168
|
return "in_progress";
|
|
341898
342169
|
}
|
|
@@ -341901,7 +342172,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
341901
342172
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
341902
342173
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
341903
342174
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
341904
|
-
currentVersion: "1.84.
|
|
342175
|
+
currentVersion: "1.84.5"
|
|
341905
342176
|
});
|
|
341906
342177
|
console.error(`
|
|
341907
342178
|
Error: Windows NPM detected in WSL
|
|
@@ -342436,7 +342707,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
342436
342707
|
}
|
|
342437
342708
|
async function getDoctorDiagnostic() {
|
|
342438
342709
|
const installationType = await getCurrentInstallationType();
|
|
342439
|
-
const version2 = typeof MACRO !== "undefined" ? "1.84.
|
|
342710
|
+
const version2 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
|
|
342440
342711
|
const installationPath = await getInstallationPath();
|
|
342441
342712
|
const invokedBinary = getInvokedBinary();
|
|
342442
342713
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -343503,7 +343774,7 @@ function getInstallationEnv() {
|
|
|
343503
343774
|
return;
|
|
343504
343775
|
}
|
|
343505
343776
|
function getURCodeVersion() {
|
|
343506
|
-
return "1.84.
|
|
343777
|
+
return "1.84.5";
|
|
343507
343778
|
}
|
|
343508
343779
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
343509
343780
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -344167,7 +344438,7 @@ function getUserBinDir(options2) {
|
|
|
344167
344438
|
var init_xdg = () => {};
|
|
344168
344439
|
|
|
344169
344440
|
// src/utils/nativeInstaller/download.ts
|
|
344170
|
-
import { createHash as
|
|
344441
|
+
import { createHash as createHash23 } from "crypto";
|
|
344171
344442
|
import { chmod as chmod3, writeFile as writeFile19 } from "fs/promises";
|
|
344172
344443
|
import { join as join90 } from "path";
|
|
344173
344444
|
async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
@@ -344353,7 +344624,7 @@ async function downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath,
|
|
|
344353
344624
|
...requestConfig
|
|
344354
344625
|
});
|
|
344355
344626
|
clearStallTimer();
|
|
344356
|
-
const hash4 =
|
|
344627
|
+
const hash4 = createHash23("sha256");
|
|
344357
344628
|
hash4.update(response.data);
|
|
344358
344629
|
const actualChecksum = hash4.digest("hex");
|
|
344359
344630
|
if (actualChecksum !== expectedChecksum) {
|
|
@@ -344984,8 +345255,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
344984
345255
|
const maxVersion = await getMaxVersion();
|
|
344985
345256
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
344986
345257
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
344987
|
-
if (gte("1.84.
|
|
344988
|
-
logForDebugging(`Native installer: current version ${"1.84.
|
|
345258
|
+
if (gte("1.84.5", maxVersion)) {
|
|
345259
|
+
logForDebugging(`Native installer: current version ${"1.84.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
344989
345260
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
344990
345261
|
latency_ms: Date.now() - startTime,
|
|
344991
345262
|
max_version: maxVersion,
|
|
@@ -344996,7 +345267,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
344996
345267
|
version2 = maxVersion;
|
|
344997
345268
|
}
|
|
344998
345269
|
}
|
|
344999
|
-
if (!forceReinstall && version2 === "1.84.
|
|
345270
|
+
if (!forceReinstall && version2 === "1.84.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
345000
345271
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
345001
345272
|
logEvent("tengu_native_update_complete", {
|
|
345002
345273
|
latency_ms: Date.now() - startTime,
|
|
@@ -365053,11 +365324,11 @@ var init_skillUsageTracking = __esm(() => {
|
|
|
365053
365324
|
});
|
|
365054
365325
|
|
|
365055
365326
|
// src/utils/telemetry/pluginTelemetry.ts
|
|
365056
|
-
import { createHash as
|
|
365327
|
+
import { createHash as createHash24 } from "crypto";
|
|
365057
365328
|
import { sep as sep12 } from "path";
|
|
365058
365329
|
function hashPluginId(name, marketplace) {
|
|
365059
365330
|
const key = marketplace ? `${name}@${marketplace.toLowerCase()}` : name;
|
|
365060
|
-
return
|
|
365331
|
+
return createHash24("sha256").update(key + PLUGIN_ID_HASH_SALT).digest("hex").slice(0, 16);
|
|
365061
365332
|
}
|
|
365062
365333
|
function getTelemetryPluginScope(name, marketplace, managedNames) {
|
|
365063
365334
|
if (marketplace === BUILTIN_MARKETPLACE_NAME2)
|
|
@@ -367563,7 +367834,7 @@ var init_sessionIngress = __esm(() => {
|
|
|
367563
367834
|
});
|
|
367564
367835
|
|
|
367565
367836
|
// src/utils/fileHistory.ts
|
|
367566
|
-
import { createHash as
|
|
367837
|
+
import { createHash as createHash25 } from "crypto";
|
|
367567
367838
|
import {
|
|
367568
367839
|
chmod as chmod5,
|
|
367569
367840
|
copyFile as copyFile6,
|
|
@@ -367987,7 +368258,7 @@ async function computeDiffStatsForFile(originalFile, backupFileName) {
|
|
|
367987
368258
|
};
|
|
367988
368259
|
}
|
|
367989
368260
|
function getBackupFileName(filePath, version2) {
|
|
367990
|
-
const fileNameHash =
|
|
368261
|
+
const fileNameHash = createHash25("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
367991
368262
|
return `${fileNameHash}@v${version2}`;
|
|
367992
368263
|
}
|
|
367993
368264
|
function resolveBackupPath(backupFileName, sessionId) {
|
|
@@ -368949,11 +369220,11 @@ var init_filesApi = __esm(() => {
|
|
|
368949
369220
|
});
|
|
368950
369221
|
|
|
368951
369222
|
// src/utils/tempfile.ts
|
|
368952
|
-
import { createHash as
|
|
369223
|
+
import { createHash as createHash26, randomUUID as randomUUID24 } from "crypto";
|
|
368953
369224
|
import { tmpdir as tmpdir11 } from "os";
|
|
368954
369225
|
import { join as join97 } from "path";
|
|
368955
369226
|
function generateTempFilePath(prefix = "ur-prompt", extension = ".md", options2) {
|
|
368956
|
-
const id = options2?.contentHash ?
|
|
369227
|
+
const id = options2?.contentHash ? createHash26("sha256").update(options2.contentHash).digest("hex").slice(0, 16) : randomUUID24();
|
|
368957
369228
|
return join97(tmpdir11(), `${prefix}-${id}${extension}`);
|
|
368958
369229
|
}
|
|
368959
369230
|
var init_tempfile = () => {};
|
|
@@ -376039,12 +376310,12 @@ var init_diff2 = __esm(() => {
|
|
|
376039
376310
|
});
|
|
376040
376311
|
|
|
376041
376312
|
// src/utils/fileOperationAnalytics.ts
|
|
376042
|
-
import { createHash as
|
|
376313
|
+
import { createHash as createHash27 } from "crypto";
|
|
376043
376314
|
function hashFilePath(filePath) {
|
|
376044
|
-
return
|
|
376315
|
+
return createHash27("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
376045
376316
|
}
|
|
376046
376317
|
function hashFileContent(content) {
|
|
376047
|
-
return
|
|
376318
|
+
return createHash27("sha256").update(content).digest("hex");
|
|
376048
376319
|
}
|
|
376049
376320
|
function logFileOperation(params) {
|
|
376050
376321
|
const metadata = {
|
|
@@ -409675,7 +409946,7 @@ import {
|
|
|
409675
409946
|
writeFileSync as writeFileSync18
|
|
409676
409947
|
} from "fs";
|
|
409677
409948
|
import {
|
|
409678
|
-
createHash as
|
|
409949
|
+
createHash as createHash28,
|
|
409679
409950
|
createPrivateKey,
|
|
409680
409951
|
createPublicKey,
|
|
409681
409952
|
randomUUID as randomUUID28,
|
|
@@ -409684,7 +409955,7 @@ import {
|
|
|
409684
409955
|
} from "crypto";
|
|
409685
409956
|
import { basename as basename29, join as join110, relative as relative23, sep as sep20 } from "path";
|
|
409686
409957
|
function sha256(value) {
|
|
409687
|
-
return
|
|
409958
|
+
return createHash28("sha256").update(value).digest("hex");
|
|
409688
409959
|
}
|
|
409689
409960
|
function stableJson2(value) {
|
|
409690
409961
|
if (Array.isArray(value))
|
|
@@ -417309,7 +417580,7 @@ var init_managedPlugins = __esm(() => {
|
|
|
417309
417580
|
});
|
|
417310
417581
|
|
|
417311
417582
|
// src/utils/plugins/pluginVersioning.ts
|
|
417312
|
-
import { createHash as
|
|
417583
|
+
import { createHash as createHash29 } from "crypto";
|
|
417313
417584
|
async function calculatePluginVersion(pluginId, source, manifest, installPath, providedVersion, gitCommitSha) {
|
|
417314
417585
|
if (manifest?.version) {
|
|
417315
417586
|
logForDebugging(`Using manifest version for ${pluginId}: ${manifest.version}`);
|
|
@@ -417323,7 +417594,7 @@ async function calculatePluginVersion(pluginId, source, manifest, installPath, p
|
|
|
417323
417594
|
const shortSha = gitCommitSha.substring(0, 12);
|
|
417324
417595
|
if (typeof source === "object" && source.source === "git-subdir") {
|
|
417325
417596
|
const normPath = source.path.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
417326
|
-
const pathHash =
|
|
417597
|
+
const pathHash = createHash29("sha256").update(normPath).digest("hex").substring(0, 8);
|
|
417327
417598
|
const v = `${shortSha}-${pathHash}`;
|
|
417328
417599
|
logForDebugging(`Using git-subdir SHA+path version for ${pluginId}: ${v} (path=${normPath})`);
|
|
417329
417600
|
return v;
|
|
@@ -420208,7 +420479,7 @@ var init_config7 = __esm(() => {
|
|
|
420208
420479
|
});
|
|
420209
420480
|
|
|
420210
420481
|
// src/services/mcp/utils.ts
|
|
420211
|
-
import { createHash as
|
|
420482
|
+
import { createHash as createHash30 } from "crypto";
|
|
420212
420483
|
import { join as join124 } from "path";
|
|
420213
420484
|
function filterToolsByServer(tools, serverName) {
|
|
420214
420485
|
const prefix = `mcp__${normalizeNameForMCP(serverName)}__`;
|
|
@@ -420248,7 +420519,7 @@ function hashMcpConfig(config3) {
|
|
|
420248
420519
|
}
|
|
420249
420520
|
return v;
|
|
420250
420521
|
});
|
|
420251
|
-
return
|
|
420522
|
+
return createHash30("sha256").update(stable).digest("hex").slice(0, 16);
|
|
420252
420523
|
}
|
|
420253
420524
|
function excludeStalePluginClients(mcp, configs) {
|
|
420254
420525
|
const stale = mcp.clients.filter((c4) => {
|
|
@@ -420997,7 +421268,7 @@ var init_xaaIdpLogin = __esm(() => {
|
|
|
420997
421268
|
});
|
|
420998
421269
|
|
|
420999
421270
|
// src/services/mcp/auth.ts
|
|
421000
|
-
import { createHash as
|
|
421271
|
+
import { createHash as createHash31, randomBytes as randomBytes18, randomUUID as randomUUID32 } from "crypto";
|
|
421001
421272
|
import { mkdir as mkdir26 } from "fs/promises";
|
|
421002
421273
|
import { createServer as createServer9 } from "http";
|
|
421003
421274
|
import { join as join125 } from "path";
|
|
@@ -421111,7 +421382,7 @@ function getServerKey(serverName, serverConfig) {
|
|
|
421111
421382
|
url: serverConfig.url,
|
|
421112
421383
|
headers: serverConfig.headers || {}
|
|
421113
421384
|
});
|
|
421114
|
-
const hash4 =
|
|
421385
|
+
const hash4 = createHash31("sha256").update(configJson).digest("hex").substring(0, 16);
|
|
421115
421386
|
return `${serverName}|${hash4}`;
|
|
421116
421387
|
}
|
|
421117
421388
|
function hasMcpDiscoveryButNoToken(serverName, serverConfig) {
|
|
@@ -438860,7 +439131,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
438860
439131
|
const client = new Client({
|
|
438861
439132
|
name: "ur",
|
|
438862
439133
|
title: "UR",
|
|
438863
|
-
version: "1.84.
|
|
439134
|
+
version: "1.84.5",
|
|
438864
439135
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
438865
439136
|
websiteUrl: PRODUCT_URL
|
|
438866
439137
|
}, {
|
|
@@ -439217,7 +439488,7 @@ var init_client2 = __esm(() => {
|
|
|
439217
439488
|
const client = new Client({
|
|
439218
439489
|
name: "ur",
|
|
439219
439490
|
title: "UR",
|
|
439220
|
-
version: "1.84.
|
|
439491
|
+
version: "1.84.5",
|
|
439221
439492
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
439222
439493
|
websiteUrl: PRODUCT_URL
|
|
439223
439494
|
}, {
|
|
@@ -439848,7 +440119,7 @@ var init_client2 = __esm(() => {
|
|
|
439848
440119
|
});
|
|
439849
440120
|
|
|
439850
440121
|
// src/utils/api.ts
|
|
439851
|
-
import { createHash as
|
|
440122
|
+
import { createHash as createHash32 } from "crypto";
|
|
439852
440123
|
function filterSwarmFieldsFromSchema(toolName, schema) {
|
|
439853
440124
|
const fieldsToRemove = SWARM_FIELDS_BY_TOOL[toolName];
|
|
439854
440125
|
if (!fieldsToRemove || fieldsToRemove.length === 0) {
|
|
@@ -439942,7 +440213,7 @@ function logAPIPrefix(systemPrompt) {
|
|
|
439942
440213
|
logEvent("tengu_sysprompt_block", {
|
|
439943
440214
|
snippet: firstSystemPrompt?.slice(0, 20),
|
|
439944
440215
|
length: firstSystemPrompt?.length ?? 0,
|
|
439945
|
-
hash: firstSystemPrompt ?
|
|
440216
|
+
hash: firstSystemPrompt ? createHash32("sha256").update(firstSystemPrompt).digest("hex") : ""
|
|
439946
440217
|
});
|
|
439947
440218
|
}
|
|
439948
440219
|
function splitSysPromptPrefix(systemPrompt, options2) {
|
|
@@ -440258,6 +440529,9 @@ var init_api3 = __esm(() => {
|
|
|
440258
440529
|
});
|
|
440259
440530
|
|
|
440260
440531
|
// src/utils/model/providerRequestTuning.ts
|
|
440532
|
+
function formatOutputTokenLimitMessage(model, requestedMaxTokens) {
|
|
440533
|
+
return `The provider reported that model "${model}" reached its per-response output boundary on a ${requestedMaxTokens}-token response chunk. This is not a total task-output limit: UR's agent loop continues automatically while the model makes novel progress. UR_CODE_MAX_OUTPUT_TOKENS may change the chunk size up to the model's verified limit.`;
|
|
440534
|
+
}
|
|
440261
440535
|
function usesConservativeOutputReservation(provider) {
|
|
440262
440536
|
return CONSERVATIVE_OUTPUT_PROVIDERS.has(provider);
|
|
440263
440537
|
}
|
|
@@ -440268,6 +440542,7 @@ var init_providerRequestTuning = __esm(() => {
|
|
|
440268
440542
|
"lmstudio",
|
|
440269
440543
|
"llama.cpp",
|
|
440270
440544
|
"vllm",
|
|
440545
|
+
"unsloth",
|
|
440271
440546
|
"openai-compatible"
|
|
440272
440547
|
]);
|
|
440273
440548
|
});
|
|
@@ -440385,7 +440660,7 @@ __export(exports_evalProvenance, {
|
|
|
440385
440660
|
getEvalProvenanceSnapshot: () => getEvalProvenanceSnapshot,
|
|
440386
440661
|
fingerprintConfigurationPart: () => fingerprintConfigurationPart
|
|
440387
440662
|
});
|
|
440388
|
-
import { createHash as
|
|
440663
|
+
import { createHash as createHash33 } from "crypto";
|
|
440389
440664
|
function canonicalize2(value, seen = new WeakSet) {
|
|
440390
440665
|
if (value === null || typeof value !== "object")
|
|
440391
440666
|
return value;
|
|
@@ -440399,7 +440674,7 @@ function canonicalize2(value, seen = new WeakSet) {
|
|
|
440399
440674
|
}
|
|
440400
440675
|
function fingerprintConfigurationPart(value) {
|
|
440401
440676
|
const canonical = JSON.stringify(canonicalize2(value));
|
|
440402
|
-
return
|
|
440677
|
+
return createHash33("sha256").update(canonical).digest("hex");
|
|
440403
440678
|
}
|
|
440404
440679
|
function recordEvalConfiguration(config3) {
|
|
440405
440680
|
const lifecycle = config3.promptLifecycle ?? CURRENT_PROMPT_LIFECYCLE;
|
|
@@ -441010,6 +441285,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
|
|
|
441010
441285
|
}
|
|
441011
441286
|
});
|
|
441012
441287
|
}
|
|
441288
|
+
messagesForAPI = canonicalizeReusedToolUseIds(messagesForAPI);
|
|
441013
441289
|
messagesForAPI = ensureToolResultPairing(messagesForAPI);
|
|
441014
441290
|
if (!betas.includes(ADVISOR_BETA_HEADER)) {
|
|
441015
441291
|
messagesForAPI = stripAdvisorBlocks(messagesForAPI);
|
|
@@ -441192,6 +441468,10 @@ ${deferredToolList}
|
|
|
441192
441468
|
type: "enabled"
|
|
441193
441469
|
};
|
|
441194
441470
|
}
|
|
441471
|
+
} else if (!hasThinking && effortProvider !== "anthropic-api" && providerSupportsThinkingToggle(effortProvider, options2.model)) {
|
|
441472
|
+
thinking = {
|
|
441473
|
+
type: "disabled"
|
|
441474
|
+
};
|
|
441195
441475
|
}
|
|
441196
441476
|
const contextManagement = getAPIContextManagement({
|
|
441197
441477
|
hasThinking,
|
|
@@ -441615,7 +441895,7 @@ ${deferredToolList}
|
|
|
441615
441895
|
max_tokens: maxOutputTokens
|
|
441616
441896
|
});
|
|
441617
441897
|
yield createAssistantAPIErrorMessage({
|
|
441618
|
-
content: `${API_ERROR_MESSAGE_PREFIX}:
|
|
441898
|
+
content: `${API_ERROR_MESSAGE_PREFIX}: ${formatOutputTokenLimitMessage(options2.model, maxOutputTokens)}`,
|
|
441619
441899
|
apiError: "max_output_tokens",
|
|
441620
441900
|
error: "max_output_tokens"
|
|
441621
441901
|
});
|
|
@@ -442242,12 +442522,9 @@ function adjustParamsForNonStreaming(params, maxTokensCap) {
|
|
|
442242
442522
|
max_tokens: cappedMaxTokens
|
|
442243
442523
|
};
|
|
442244
442524
|
}
|
|
442245
|
-
function isMaxTokensCapEnabled() {
|
|
442246
|
-
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_otk_slot_v1", false);
|
|
442247
|
-
}
|
|
442248
442525
|
function getMaxOutputTokensForModel(model, provider = getRuntimeProvider()) {
|
|
442249
442526
|
const maxOutputTokens = getModelMaxOutputTokens(model, provider);
|
|
442250
|
-
const defaultTokens = usesConservativeOutputReservation(provider) ? Math.min(maxOutputTokens.default, SELF_HOSTED_DEFAULT_MAX_OUTPUT_TOKENS) :
|
|
442527
|
+
const defaultTokens = usesConservativeOutputReservation(provider) ? Math.min(maxOutputTokens.default, SELF_HOSTED_DEFAULT_MAX_OUTPUT_TOKENS) : maxOutputTokens.default;
|
|
442251
442528
|
const result = validateBoundedIntEnvVar("UR_CODE_MAX_OUTPUT_TOKENS", process.env.UR_CODE_MAX_OUTPUT_TOKENS, defaultTokens, maxOutputTokens.upperLimit);
|
|
442252
442529
|
return result.effective;
|
|
442253
442530
|
}
|
|
@@ -445113,6 +445390,90 @@ function AUTO_REJECT_MESSAGE(toolName) {
|
|
|
445113
445390
|
function DONT_ASK_REJECT_MESSAGE(toolName) {
|
|
445114
445391
|
return `Permission to use ${toolName} has been denied because UR is running in don't ask mode. ${DENIAL_WORKAROUND_GUIDANCE}`;
|
|
445115
445392
|
}
|
|
445393
|
+
function canonicalizeReusedToolUseIds(messages) {
|
|
445394
|
+
const seenIds = new Set;
|
|
445395
|
+
const assistantRenames = new Map;
|
|
445396
|
+
let renameCount = 0;
|
|
445397
|
+
for (let messageIndex = 0;messageIndex < messages.length; messageIndex++) {
|
|
445398
|
+
const message = messages[messageIndex];
|
|
445399
|
+
if (message.type !== "assistant" || !Array.isArray(message.message.content)) {
|
|
445400
|
+
continue;
|
|
445401
|
+
}
|
|
445402
|
+
const idCounts = new Map;
|
|
445403
|
+
for (const block2 of message.message.content) {
|
|
445404
|
+
if (block2.type !== "tool_use" || typeof block2.id !== "string")
|
|
445405
|
+
continue;
|
|
445406
|
+
idCounts.set(block2.id, (idCounts.get(block2.id) ?? 0) + 1);
|
|
445407
|
+
}
|
|
445408
|
+
const nextMessage = messages[messageIndex + 1];
|
|
445409
|
+
const resultCounts = new Map;
|
|
445410
|
+
if (nextMessage?.type === "user" && Array.isArray(nextMessage.message.content)) {
|
|
445411
|
+
for (const block2 of nextMessage.message.content) {
|
|
445412
|
+
if (typeof block2 === "object" && block2 !== null && "type" in block2 && block2.type === "tool_result" && typeof block2.tool_use_id === "string") {
|
|
445413
|
+
const id = block2.tool_use_id;
|
|
445414
|
+
resultCounts.set(id, (resultCounts.get(id) ?? 0) + 1);
|
|
445415
|
+
}
|
|
445416
|
+
}
|
|
445417
|
+
}
|
|
445418
|
+
const renames = new Map;
|
|
445419
|
+
let blockIndex = 0;
|
|
445420
|
+
for (const block2 of message.message.content) {
|
|
445421
|
+
if (block2.type !== "tool_use" || typeof block2.id !== "string") {
|
|
445422
|
+
blockIndex++;
|
|
445423
|
+
continue;
|
|
445424
|
+
}
|
|
445425
|
+
const originalId = block2.id;
|
|
445426
|
+
const isUnambiguousCompletedCall = idCounts.get(originalId) === 1 && resultCounts.get(originalId) === 1;
|
|
445427
|
+
if (seenIds.has(originalId) && isUnambiguousCompletedCall) {
|
|
445428
|
+
let suffix = 0;
|
|
445429
|
+
let canonicalId = `toolu_ur_${messageIndex}_${blockIndex}`;
|
|
445430
|
+
while (seenIds.has(canonicalId)) {
|
|
445431
|
+
suffix++;
|
|
445432
|
+
canonicalId = `toolu_ur_${messageIndex}_${blockIndex}_${suffix}`;
|
|
445433
|
+
}
|
|
445434
|
+
renames.set(originalId, canonicalId);
|
|
445435
|
+
seenIds.add(canonicalId);
|
|
445436
|
+
renameCount++;
|
|
445437
|
+
} else {
|
|
445438
|
+
seenIds.add(originalId);
|
|
445439
|
+
}
|
|
445440
|
+
blockIndex++;
|
|
445441
|
+
}
|
|
445442
|
+
if (renames.size > 0)
|
|
445443
|
+
assistantRenames.set(messageIndex, renames);
|
|
445444
|
+
}
|
|
445445
|
+
if (assistantRenames.size === 0)
|
|
445446
|
+
return messages;
|
|
445447
|
+
const normalized = messages.map((message, messageIndex) => {
|
|
445448
|
+
const assistantRename = assistantRenames.get(messageIndex);
|
|
445449
|
+
const resultRename = assistantRenames.get(messageIndex - 1);
|
|
445450
|
+
if (!assistantRename && !resultRename || !Array.isArray(message.message.content)) {
|
|
445451
|
+
return message;
|
|
445452
|
+
}
|
|
445453
|
+
let changed = false;
|
|
445454
|
+
const content = message.message.content.map((block2) => {
|
|
445455
|
+
if (assistantRename && block2.type === "tool_use" && typeof block2.id === "string") {
|
|
445456
|
+
const id = assistantRename.get(block2.id);
|
|
445457
|
+
if (id) {
|
|
445458
|
+
changed = true;
|
|
445459
|
+
return { ...block2, id };
|
|
445460
|
+
}
|
|
445461
|
+
}
|
|
445462
|
+
if (resultRename && typeof block2 === "object" && block2 !== null && "type" in block2 && block2.type === "tool_result") {
|
|
445463
|
+
const result = block2;
|
|
445464
|
+
const id = resultRename.get(result.tool_use_id);
|
|
445465
|
+
if (id) {
|
|
445466
|
+
changed = true;
|
|
445467
|
+
return { ...result, tool_use_id: id };
|
|
445468
|
+
}
|
|
445469
|
+
}
|
|
445470
|
+
return block2;
|
|
445471
|
+
});
|
|
445472
|
+
return changed ? { ...message, message: { ...message.message, content } } : message;
|
|
445473
|
+
});
|
|
445474
|
+
logEvent("tengu_reused_tool_use_id_canonicalized", { renameCount });
|
|
445475
|
+
return normalized;
|
|
445476
|
+
}
|
|
445116
445477
|
function isSyntheticMessage(message) {
|
|
445117
445478
|
return message.type !== "progress" && message.type !== "attachment" && message.type !== "system" && Array.isArray(message.message.content) && message.message.content[0]?.type === "text" && SYNTHETIC_MESSAGES.has(message.message.content[0].text);
|
|
445118
445479
|
}
|
|
@@ -449440,11 +449801,11 @@ var init_privateState = __esm(() => {
|
|
|
449440
449801
|
});
|
|
449441
449802
|
|
|
449442
449803
|
// src/services/sideChats/sideChatStore.ts
|
|
449443
|
-
import { createHash as
|
|
449804
|
+
import { createHash as createHash34, randomUUID as randomUUID36 } from "crypto";
|
|
449444
449805
|
import { existsSync as existsSync28, lstatSync as lstatSync7, readdirSync as readdirSync10 } from "fs";
|
|
449445
449806
|
import { join as join129 } from "path";
|
|
449446
449807
|
function digest2(value) {
|
|
449447
|
-
return `sha256:${
|
|
449808
|
+
return `sha256:${createHash34("sha256").update(value).digest("hex")}`;
|
|
449448
449809
|
}
|
|
449449
449810
|
function stableJson3(value) {
|
|
449450
449811
|
if (Array.isArray(value))
|
|
@@ -449661,7 +450022,7 @@ var init_sideChatStore = __esm(() => {
|
|
|
449661
450022
|
MAX_CONTENT_BYTES = 64 * 1024;
|
|
449662
450023
|
ID_RE = /^[a-zA-Z0-9._-]{1,200}$/;
|
|
449663
450024
|
DIGEST_RE2 = /^sha256:[a-f0-9]{64}$/;
|
|
449664
|
-
GENESIS = `sha256:${
|
|
450025
|
+
GENESIS = `sha256:${createHash34("sha256").update("ur-side-chat-genesis-v1").digest("hex")}`;
|
|
449665
450026
|
});
|
|
449666
450027
|
|
|
449667
450028
|
// src/commands/btw/btw.tsx
|
|
@@ -450088,7 +450449,7 @@ function Feedback({
|
|
|
450088
450449
|
platform: env2.platform,
|
|
450089
450450
|
gitRepo: envInfo.isGit,
|
|
450090
450451
|
terminal: env2.terminal,
|
|
450091
|
-
version: "1.84.
|
|
450452
|
+
version: "1.84.5",
|
|
450092
450453
|
transcript: normalizeMessagesForAPI(messages),
|
|
450093
450454
|
errors: sanitizedErrors,
|
|
450094
450455
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -450278,7 +450639,7 @@ function Feedback({
|
|
|
450278
450639
|
", ",
|
|
450279
450640
|
env2.terminal,
|
|
450280
450641
|
", v",
|
|
450281
|
-
"1.84.
|
|
450642
|
+
"1.84.5"
|
|
450282
450643
|
]
|
|
450283
450644
|
}, undefined, true, undefined, this)
|
|
450284
450645
|
]
|
|
@@ -450384,7 +450745,7 @@ ${sanitizedDescription}
|
|
|
450384
450745
|
` + `**Environment Info**
|
|
450385
450746
|
` + `- Platform: ${env2.platform}
|
|
450386
450747
|
` + `- Terminal: ${env2.terminal}
|
|
450387
|
-
` + `- Version: ${"1.84.
|
|
450748
|
+
` + `- Version: ${"1.84.5"}
|
|
450388
450749
|
` + `- Feedback ID: ${feedbackId}
|
|
450389
450750
|
` + `
|
|
450390
450751
|
**Errors**
|
|
@@ -453494,7 +453855,7 @@ function buildPrimarySection() {
|
|
|
453494
453855
|
}, undefined, false, undefined, this);
|
|
453495
453856
|
return [{
|
|
453496
453857
|
label: "Version",
|
|
453497
|
-
value: "1.84.
|
|
453858
|
+
value: "1.84.5"
|
|
453498
453859
|
}, {
|
|
453499
453860
|
label: "Session name",
|
|
453500
453861
|
value: nameValue
|
|
@@ -454459,7 +454820,7 @@ function ModelPicker({
|
|
|
454459
454820
|
const focusedEffortLevelLabels = focusedModel ? getSupportedEffortLevelLabelsForModel(focusedModel, currentProvider) : [];
|
|
454460
454821
|
const focusedSupportsEffort = focusedModel ? modelSupportsEffort(focusedModel, currentProvider) : false;
|
|
454461
454822
|
const focusedAdvertisesThinking = focusedModel ? modelSupportsThinking(focusedModel, currentProvider) : false;
|
|
454462
|
-
const focusedSupportsThinking = focusedModel ? focusedAdvertisesThinking && providerSupportsThinkingToggle(currentProvider) : false;
|
|
454823
|
+
const focusedSupportsThinking = focusedModel ? focusedAdvertisesThinking && providerSupportsThinkingToggle(currentProvider, focusedModel) : false;
|
|
454463
454824
|
const focusedDefaultEffort = getDefaultEffortLevelForOption(focusedValue, currentProvider);
|
|
454464
454825
|
const displayEffort = focusedModel ? resolveProviderEffortLevel(focusedModel, effort ?? focusedDefaultEffort, currentProvider) ?? focusedDefaultEffort : focusedDefaultEffort;
|
|
454465
454826
|
const handleFocus = (value) => {
|
|
@@ -457008,7 +457369,7 @@ function Config({
|
|
|
457008
457369
|
}
|
|
457009
457370
|
}, undefined, false, undefined, this)
|
|
457010
457371
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
|
|
457011
|
-
currentVersion: "1.84.
|
|
457372
|
+
currentVersion: "1.84.5",
|
|
457012
457373
|
onChoice: (choice) => {
|
|
457013
457374
|
setShowSubmenu(null);
|
|
457014
457375
|
setTabsHidden(false);
|
|
@@ -457020,7 +457381,7 @@ function Config({
|
|
|
457020
457381
|
autoUpdatesChannel: "stable"
|
|
457021
457382
|
};
|
|
457022
457383
|
if (choice === "stay") {
|
|
457023
|
-
newSettings.minimumVersion = "1.84.
|
|
457384
|
+
newSettings.minimumVersion = "1.84.5";
|
|
457024
457385
|
}
|
|
457025
457386
|
updateSettingsForSource("userSettings", newSettings);
|
|
457026
457387
|
setSettingsData((prev_27) => ({
|
|
@@ -465337,7 +465698,7 @@ function HelpV2(t0) {
|
|
|
465337
465698
|
let t6;
|
|
465338
465699
|
if ($2[31] !== tabs) {
|
|
465339
465700
|
t6 = /* @__PURE__ */ jsx_dev_runtime203.jsxDEV(Tabs, {
|
|
465340
|
-
title: `UR v${"1.84.
|
|
465701
|
+
title: `UR v${"1.84.5"}`,
|
|
465341
465702
|
color: "professionalBlue",
|
|
465342
465703
|
defaultTab: "general",
|
|
465343
465704
|
children: tabs
|
|
@@ -466271,7 +466632,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
466271
466632
|
async function handleInitialize(options2) {
|
|
466272
466633
|
return {
|
|
466273
466634
|
name: "UR",
|
|
466274
|
-
version: "1.84.
|
|
466635
|
+
version: "1.84.5",
|
|
466275
466636
|
protocolVersion: "0.1.0",
|
|
466276
466637
|
workspaceRoot: options2.cwd,
|
|
466277
466638
|
capabilities: {
|
|
@@ -483404,7 +483765,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
483404
483765
|
return [];
|
|
483405
483766
|
}
|
|
483406
483767
|
}
|
|
483407
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.
|
|
483768
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.5") {
|
|
483408
483769
|
if (process.env.USER_TYPE === "ant") {
|
|
483409
483770
|
const changelog = "";
|
|
483410
483771
|
if (changelog) {
|
|
@@ -483431,7 +483792,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.3")
|
|
|
483431
483792
|
releaseNotes
|
|
483432
483793
|
};
|
|
483433
483794
|
}
|
|
483434
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.84.
|
|
483795
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.84.5") {
|
|
483435
483796
|
if (process.env.USER_TYPE === "ant") {
|
|
483436
483797
|
const changelog = "";
|
|
483437
483798
|
if (changelog) {
|
|
@@ -486339,7 +486700,7 @@ function getRecentActivitySync() {
|
|
|
486339
486700
|
return cachedActivity;
|
|
486340
486701
|
}
|
|
486341
486702
|
function getLogoDisplayData() {
|
|
486342
|
-
const version2 = process.env.DEMO_VERSION ?? "1.84.
|
|
486703
|
+
const version2 = process.env.DEMO_VERSION ?? "1.84.5";
|
|
486343
486704
|
const serverUrl = getDirectConnectServerUrl();
|
|
486344
486705
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
486345
486706
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -487227,7 +487588,7 @@ function LogoV2() {
|
|
|
487227
487588
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
487228
487589
|
t2 = () => {
|
|
487229
487590
|
const currentConfig = getGlobalConfig();
|
|
487230
|
-
if (currentConfig.lastReleaseNotesSeen === "1.84.
|
|
487591
|
+
if (currentConfig.lastReleaseNotesSeen === "1.84.5") {
|
|
487231
487592
|
return;
|
|
487232
487593
|
}
|
|
487233
487594
|
saveGlobalConfig(_temp327);
|
|
@@ -487915,12 +488276,12 @@ function LogoV2() {
|
|
|
487915
488276
|
return t41;
|
|
487916
488277
|
}
|
|
487917
488278
|
function _temp327(current) {
|
|
487918
|
-
if (current.lastReleaseNotesSeen === "1.84.
|
|
488279
|
+
if (current.lastReleaseNotesSeen === "1.84.5") {
|
|
487919
488280
|
return current;
|
|
487920
488281
|
}
|
|
487921
488282
|
return {
|
|
487922
488283
|
...current,
|
|
487923
|
-
lastReleaseNotesSeen: "1.84.
|
|
488284
|
+
lastReleaseNotesSeen: "1.84.5"
|
|
487924
488285
|
};
|
|
487925
488286
|
}
|
|
487926
488287
|
function _temp240(s_0) {
|
|
@@ -503064,7 +503425,7 @@ var init_guardrails = __esm(() => {
|
|
|
503064
503425
|
});
|
|
503065
503426
|
|
|
503066
503427
|
// src/services/agents/agenticCi.ts
|
|
503067
|
-
import { createHash as
|
|
503428
|
+
import { createHash as createHash35, randomUUID as randomUUID42 } from "crypto";
|
|
503068
503429
|
import {
|
|
503069
503430
|
existsSync as existsSync37,
|
|
503070
503431
|
mkdtempSync as mkdtempSync5,
|
|
@@ -503548,7 +503909,7 @@ function boundedTail(text2, maxChars = AGENTIC_CI_MAX_LOG_CHARS) {
|
|
|
503548
503909
|
return value.length <= maxChars ? value : value.slice(-maxChars);
|
|
503549
503910
|
}
|
|
503550
503911
|
function sha2562(value) {
|
|
503551
|
-
return
|
|
503912
|
+
return createHash35("sha256").update(value).digest("hex");
|
|
503552
503913
|
}
|
|
503553
503914
|
function containsPath(base2, candidate) {
|
|
503554
503915
|
const rel = relative36(resolve52(base2), resolve52(candidate));
|
|
@@ -504013,7 +504374,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
504013
504374
|
if (spec.name !== specName) {
|
|
504014
504375
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
504015
504376
|
}
|
|
504016
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.84.
|
|
504377
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5");
|
|
504017
504378
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
504018
504379
|
throw new Error("invalid ur-agent package version");
|
|
504019
504380
|
}
|
|
@@ -505009,7 +505370,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
505009
505370
|
path: ".github/workflows/ur.yml",
|
|
505010
505371
|
root: "project",
|
|
505011
505372
|
content: compileAgenticCiWorkflow("default", {
|
|
505012
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.84.
|
|
505373
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5"
|
|
505013
505374
|
})
|
|
505014
505375
|
},
|
|
505015
505376
|
{
|
|
@@ -505072,7 +505433,7 @@ function value(tokens, flag) {
|
|
|
505072
505433
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
505073
505434
|
}
|
|
505074
505435
|
function cliVersion() {
|
|
505075
|
-
return typeof MACRO !== "undefined" ? "1.84.
|
|
505436
|
+
return typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5";
|
|
505076
505437
|
}
|
|
505077
505438
|
function workflowPath(cwd2) {
|
|
505078
505439
|
return join156(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -505678,7 +506039,7 @@ var init_agent_templates2 = __esm(() => {
|
|
|
505678
506039
|
|
|
505679
506040
|
// src/services/agents/a2aCardSignature.ts
|
|
505680
506041
|
import {
|
|
505681
|
-
createHash as
|
|
506042
|
+
createHash as createHash36,
|
|
505682
506043
|
createPrivateKey as createPrivateKey2,
|
|
505683
506044
|
createPublicKey as createPublicKey2,
|
|
505684
506045
|
generateKeyPairSync,
|
|
@@ -505981,7 +506342,7 @@ function formatA2AV1AgentCard(options2 = {}, pretty = true) {
|
|
|
505981
506342
|
var urVersion, researchSnapshotDate = "2026-08-10", coverage2, priorityRoadmap;
|
|
505982
506343
|
var init_trends = __esm(() => {
|
|
505983
506344
|
init_a2aCardSignature();
|
|
505984
|
-
urVersion = typeof MACRO !== "undefined" ? "1.84.
|
|
506345
|
+
urVersion = typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5";
|
|
505985
506346
|
coverage2 = [
|
|
505986
506347
|
{
|
|
505987
506348
|
id: "local-runtime",
|
|
@@ -511714,7 +512075,7 @@ function createAcpStdioApp(deps) {
|
|
|
511714
512075
|
}
|
|
511715
512076
|
},
|
|
511716
512077
|
authMethods: [],
|
|
511717
|
-
agentInfo: { name: "UR-Nexus", version: "1.84.
|
|
512078
|
+
agentInfo: { name: "UR-Nexus", version: "1.84.5" }
|
|
511718
512079
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
511719
512080
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
511720
512081
|
await runtime2.announce({
|
|
@@ -511811,7 +512172,7 @@ function createAcpStdioAgent(deps) {
|
|
|
511811
512172
|
}
|
|
511812
512173
|
},
|
|
511813
512174
|
authMethods: [],
|
|
511814
|
-
agentInfo: { name: "UR-Nexus", version: "1.84.
|
|
512175
|
+
agentInfo: { name: "UR-Nexus", version: "1.84.5" }
|
|
511815
512176
|
});
|
|
511816
512177
|
return;
|
|
511817
512178
|
case "authenticate":
|
|
@@ -512590,7 +512951,7 @@ var init_connect2 = __esm(() => {
|
|
|
512590
512951
|
});
|
|
512591
512952
|
|
|
512592
512953
|
// src/services/agents/scheduler.ts
|
|
512593
|
-
import { createHash as
|
|
512954
|
+
import { createHash as createHash37 } from "crypto";
|
|
512594
512955
|
import { existsSync as existsSync41, mkdirSync as mkdirSync27, unlinkSync as unlinkSync7, writeFileSync as writeFileSync28 } from "fs";
|
|
512595
512956
|
import { homedir as homedir31 } from "os";
|
|
512596
512957
|
import { join as join158 } from "path";
|
|
@@ -512598,7 +512959,7 @@ function defaultBin() {
|
|
|
512598
512959
|
return { file: process.execPath, args: [process.argv[1] ?? ""] };
|
|
512599
512960
|
}
|
|
512600
512961
|
function schedulerLabel(cwd2) {
|
|
512601
|
-
const hash4 =
|
|
512962
|
+
const hash4 = createHash37("sha1").update(cwd2).digest("hex").slice(0, 8);
|
|
512602
512963
|
return `com.ur.automation.${hash4}`;
|
|
512603
512964
|
}
|
|
512604
512965
|
function detectPlatform() {
|
|
@@ -514538,7 +514899,7 @@ import {
|
|
|
514538
514899
|
resolve as resolve55,
|
|
514539
514900
|
sep as sep38
|
|
514540
514901
|
} from "path";
|
|
514541
|
-
import { createHash as
|
|
514902
|
+
import { createHash as createHash38, randomUUID as randomUUID45 } from "crypto";
|
|
514542
514903
|
function artifactsDir(cwd2) {
|
|
514543
514904
|
return join162(cwd2, ".ur", "artifacts");
|
|
514544
514905
|
}
|
|
@@ -514676,7 +515037,7 @@ function pathIsWithin(root2, candidate) {
|
|
|
514676
515037
|
return fromRoot === "" || fromRoot !== ".." && !fromRoot.startsWith(`..${sep38}`) && !isAbsolute36(fromRoot);
|
|
514677
515038
|
}
|
|
514678
515039
|
function hashFile(path26) {
|
|
514679
|
-
const hash4 =
|
|
515040
|
+
const hash4 = createHash38("sha256");
|
|
514680
515041
|
const fd2 = openSync7(path26, "r");
|
|
514681
515042
|
const buffer = Buffer.allocUnsafe(1024 * 1024);
|
|
514682
515043
|
try {
|
|
@@ -514722,7 +515083,7 @@ function recordArtifact(cwd2, input2) {
|
|
|
514722
515083
|
const sourceFd = openSync7(sourcePath, constants8.O_RDONLY | noFollow);
|
|
514723
515084
|
let destinationFd;
|
|
514724
515085
|
let copiedBytes = 0;
|
|
514725
|
-
const attachmentHash =
|
|
515086
|
+
const attachmentHash = createHash38("sha256");
|
|
514726
515087
|
try {
|
|
514727
515088
|
const openedStat = fstatSync(sourceFd);
|
|
514728
515089
|
const currentPathStat = lstatSync12(sourcePath);
|
|
@@ -519345,11 +519706,11 @@ var init_worktree3 = __esm(() => {
|
|
|
519345
519706
|
});
|
|
519346
519707
|
|
|
519347
519708
|
// src/services/agents/auditExport.ts
|
|
519348
|
-
import { createHash as
|
|
519709
|
+
import { createHash as createHash39 } from "crypto";
|
|
519349
519710
|
import { existsSync as existsSync52, readFileSync as readFileSync51 } from "fs";
|
|
519350
519711
|
import { join as join171 } from "path";
|
|
519351
519712
|
function chainHash(prev, payload) {
|
|
519352
|
-
return
|
|
519713
|
+
return createHash39("sha256").update(prev).update(JSON.stringify(payload)).digest("hex");
|
|
519353
519714
|
}
|
|
519354
519715
|
function readActionsLedger(cwd2) {
|
|
519355
519716
|
const path26 = join171(cwd2, ".ur", "actions.jsonl");
|
|
@@ -519820,7 +520181,7 @@ var init_recipe2 = __esm(() => {
|
|
|
519820
520181
|
});
|
|
519821
520182
|
|
|
519822
520183
|
// src/services/agents/arena.ts
|
|
519823
|
-
import { createHash as
|
|
520184
|
+
import { createHash as createHash40, randomUUID as randomUUID48 } from "crypto";
|
|
519824
520185
|
import {
|
|
519825
520186
|
existsSync as existsSync56,
|
|
519826
520187
|
mkdirSync as mkdirSync38,
|
|
@@ -520269,7 +520630,7 @@ async function removeWorktree(cwd2, worktree2) {
|
|
|
520269
520630
|
rmSync14(worktree2, { recursive: true, force: true });
|
|
520270
520631
|
}
|
|
520271
520632
|
function sha2563(value2) {
|
|
520272
|
-
return
|
|
520633
|
+
return createHash40("sha256").update(value2).digest("hex");
|
|
520273
520634
|
}
|
|
520274
520635
|
function sanitizeCandidate(candidate, retainWorktree = false) {
|
|
520275
520636
|
return {
|
|
@@ -520681,7 +521042,7 @@ function createDefaultManagedCloudClient() {
|
|
|
520681
521042
|
var init_cloudManagedRunner = () => {};
|
|
520682
521043
|
|
|
520683
521044
|
// src/services/agents/cloudTasks.ts
|
|
520684
|
-
import { createHash as
|
|
521045
|
+
import { createHash as createHash41, randomUUID as randomUUID50 } from "crypto";
|
|
520685
521046
|
import { spawn as spawn16 } from "child_process";
|
|
520686
521047
|
import {
|
|
520687
521048
|
appendFileSync as appendFileSync7,
|
|
@@ -521345,7 +521706,7 @@ async function steerCloudTask(cwd2, id, message, options2 = {}) {
|
|
|
521345
521706
|
reason: "message must be between 1 byte and 64 KiB"
|
|
521346
521707
|
};
|
|
521347
521708
|
}
|
|
521348
|
-
const messageSha256 =
|
|
521709
|
+
const messageSha256 = createHash41("sha256").update(trimmed).digest("hex");
|
|
521349
521710
|
const reservation = withManifestMutation(cwd2, (manifest) => {
|
|
521350
521711
|
const task = manifest.tasks.find((candidate) => candidate.id === id);
|
|
521351
521712
|
if (!task)
|
|
@@ -522967,7 +523328,7 @@ var init_sources2 = __esm(() => {
|
|
|
522967
523328
|
});
|
|
522968
523329
|
|
|
522969
523330
|
// src/memdir/memoryIntegrity.ts
|
|
522970
|
-
import { createHash as
|
|
523331
|
+
import { createHash as createHash42, createHmac as createHmac3 } from "crypto";
|
|
522971
523332
|
import {
|
|
522972
523333
|
existsSync as existsSync62,
|
|
522973
523334
|
mkdirSync as mkdirSync42,
|
|
@@ -522999,7 +523360,7 @@ function manifestPathFor2(dir) {
|
|
|
522999
523360
|
return join182(dir, MANIFEST_NAME);
|
|
523000
523361
|
}
|
|
523001
523362
|
function digestOf(content) {
|
|
523002
|
-
return
|
|
523363
|
+
return createHash42("sha256").update(content).digest("hex");
|
|
523003
523364
|
}
|
|
523004
523365
|
function listMemoryFiles(dir) {
|
|
523005
523366
|
if (!existsSync62(dir))
|
|
@@ -524623,7 +524984,7 @@ var init_knowledge3 = __esm(() => {
|
|
|
524623
524984
|
});
|
|
524624
524985
|
|
|
524625
524986
|
// src/services/agents/crew.ts
|
|
524626
|
-
import { createHash as
|
|
524987
|
+
import { createHash as createHash43, randomUUID as randomUUID51 } from "crypto";
|
|
524627
524988
|
import {
|
|
524628
524989
|
existsSync as existsSync65,
|
|
524629
524990
|
mkdirSync as mkdirSync45,
|
|
@@ -524646,7 +525007,7 @@ function sanitizeCrewName(name) {
|
|
|
524646
525007
|
return "crew";
|
|
524647
525008
|
if (normalized.length <= 80)
|
|
524648
525009
|
return normalized;
|
|
524649
|
-
const suffix =
|
|
525010
|
+
const suffix = createHash43("sha256").update(normalized).digest("hex").slice(0, 10);
|
|
524650
525011
|
return `${normalized.slice(0, 69)}-${suffix}`;
|
|
524651
525012
|
}
|
|
524652
525013
|
function crewPath(cwd2, name) {
|
|
@@ -524975,7 +525336,7 @@ This attempt runs in an isolated git worktree. ` + "Do not push, publish, deploy
|
|
|
524975
525336
|
}
|
|
524976
525337
|
async function ensureWorktree(cwd2, crew, attemptId) {
|
|
524977
525338
|
const normalizedAttemptId = attemptId.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
524978
|
-
const attemptHash =
|
|
525339
|
+
const attemptHash = createHash43("sha256").update(attemptId).digest("hex").slice(0, 10);
|
|
524979
525340
|
const safeAttemptId = `${normalizedAttemptId.slice(0, 96)}-${attemptHash}`;
|
|
524980
525341
|
const path26 = join187(crewDir(cwd2), ".worktrees", `${crew}-${safeAttemptId}`);
|
|
524981
525342
|
const branch = `ur/crew/${crew}/${safeAttemptId}`;
|
|
@@ -527689,7 +528050,7 @@ var init_escalate2 = __esm(() => {
|
|
|
527689
528050
|
});
|
|
527690
528051
|
|
|
527691
528052
|
// src/services/agents/learnedPlaybooks.ts
|
|
527692
|
-
import { createHash as
|
|
528053
|
+
import { createHash as createHash44 } from "crypto";
|
|
527693
528054
|
import {
|
|
527694
528055
|
chmodSync as chmodSync8,
|
|
527695
528056
|
existsSync as existsSync71,
|
|
@@ -527704,7 +528065,7 @@ function storePath(cwd2) {
|
|
|
527704
528065
|
return join193(learningDir2(cwd2), "playbooks.json");
|
|
527705
528066
|
}
|
|
527706
528067
|
function digest3(value2) {
|
|
527707
|
-
return `sha256:${
|
|
528068
|
+
return `sha256:${createHash44("sha256").update(JSON.stringify(value2)).digest("hex")}`;
|
|
527708
528069
|
}
|
|
527709
528070
|
function emptyStore() {
|
|
527710
528071
|
return { version: 1, candidates: [] };
|
|
@@ -527909,7 +528270,7 @@ function mineLearnedPlaybooks(cwd2, options2 = {}) {
|
|
|
527909
528270
|
}));
|
|
527910
528271
|
generated.push({
|
|
527911
528272
|
version: 1,
|
|
527912
|
-
id: `lp-${
|
|
528273
|
+
id: `lp-${createHash44("sha256").update(fingerprint2).digest("hex").slice(0, 16)}`,
|
|
527913
528274
|
name,
|
|
527914
528275
|
status: "candidate",
|
|
527915
528276
|
revision: 1,
|
|
@@ -531735,7 +532096,7 @@ function formatTriggerDecision(decision, command5, json2) {
|
|
|
531735
532096
|
}
|
|
531736
532097
|
|
|
531737
532098
|
// src/services/agents/triggerReceiver.ts
|
|
531738
|
-
import { createHash as
|
|
532099
|
+
import { createHash as createHash45, createHmac as createHmac4, randomUUID as randomUUID53, timingSafeEqual } from "crypto";
|
|
531739
532100
|
import {
|
|
531740
532101
|
mkdirSync as mkdirSync54,
|
|
531741
532102
|
readFileSync as readFileSync73,
|
|
@@ -531747,7 +532108,7 @@ import {
|
|
|
531747
532108
|
} from "http";
|
|
531748
532109
|
import { dirname as dirname78, join as join199 } from "path";
|
|
531749
532110
|
function hashIdentifier(value2) {
|
|
531750
|
-
return
|
|
532111
|
+
return createHash45("sha256").update(value2).digest("hex");
|
|
531751
532112
|
}
|
|
531752
532113
|
function constantTimeEqual(actual, expected) {
|
|
531753
532114
|
if (actual === undefined)
|
|
@@ -532572,7 +532933,7 @@ var init_sdk2 = __esm(() => {
|
|
|
532572
532933
|
});
|
|
532573
532934
|
|
|
532574
532935
|
// src/services/agents/trajectory.ts
|
|
532575
|
-
import { createHash as
|
|
532936
|
+
import { createHash as createHash46 } from "crypto";
|
|
532576
532937
|
function record2(value2) {
|
|
532577
532938
|
return value2 && typeof value2 === "object" ? value2 : {};
|
|
532578
532939
|
}
|
|
@@ -532585,7 +532946,7 @@ function normalizeTrajectoryTool(value2) {
|
|
|
532585
532946
|
function opaqueId(value2) {
|
|
532586
532947
|
if (typeof value2 !== "string" || !value2)
|
|
532587
532948
|
return;
|
|
532588
|
-
return
|
|
532949
|
+
return createHash46("sha256").update(value2).digest("hex").slice(0, 16);
|
|
532589
532950
|
}
|
|
532590
532951
|
function contentBlocks(message) {
|
|
532591
532952
|
const content = record2(message).content;
|
|
@@ -536032,7 +536393,7 @@ var init_os2 = __esm(() => {
|
|
|
536032
536393
|
});
|
|
536033
536394
|
|
|
536034
536395
|
// src/services/agents/workspaceCoordinator.ts
|
|
536035
|
-
import { createHash as
|
|
536396
|
+
import { createHash as createHash47, randomUUID as randomUUID55 } from "crypto";
|
|
536036
536397
|
import { existsSync as existsSync81, lstatSync as lstatSync18, realpathSync as realpathSync15, rmSync as rmSync20 } from "fs";
|
|
536037
536398
|
import { tmpdir as tmpdir21 } from "os";
|
|
536038
536399
|
import { dirname as dirname80, isAbsolute as isAbsolute44, join as join204, relative as relative47, resolve as resolve64 } from "path";
|
|
@@ -536052,7 +536413,7 @@ function assertId(value2, label) {
|
|
|
536052
536413
|
throw new Error(`Invalid ${label}: ${value2}`);
|
|
536053
536414
|
}
|
|
536054
536415
|
function hash4(value2) {
|
|
536055
|
-
return `sha256:${
|
|
536416
|
+
return `sha256:${createHash47("sha256").update(value2).digest("hex")}`;
|
|
536056
536417
|
}
|
|
536057
536418
|
function stableJson4(value2) {
|
|
536058
536419
|
if (Array.isArray(value2))
|
|
@@ -709288,7 +709649,7 @@ var init_forget2 = __esm(() => {
|
|
|
709288
709649
|
});
|
|
709289
709650
|
|
|
709290
709651
|
// src/services/research/researchWorkspace.ts
|
|
709291
|
-
import { createHash as
|
|
709652
|
+
import { createHash as createHash48, randomUUID as randomUUID57 } from "crypto";
|
|
709292
709653
|
import {
|
|
709293
709654
|
existsSync as existsSync89,
|
|
709294
709655
|
mkdirSync as mkdirSync62,
|
|
@@ -709598,7 +709959,7 @@ function writeResearchReport(root2, output2, report) {
|
|
|
709598
709959
|
return absolute;
|
|
709599
709960
|
}
|
|
709600
709961
|
function researchProjectDigest(project2) {
|
|
709601
|
-
return
|
|
709962
|
+
return createHash48("sha256").update(JSON.stringify(project2)).digest("hex");
|
|
709602
709963
|
}
|
|
709603
709964
|
var ID_RE5, MAX_PROJECTS = 1000, MAX_SOURCES = 2000, MAX_FINDINGS = 5000, MAX_QUESTIONS = 2000, MAX_PROJECT_BYTES, SECRET_QUERY_KEY;
|
|
709604
709965
|
var init_researchWorkspace = __esm(() => {
|
|
@@ -725814,7 +726175,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
725814
726175
|
smapsRollup,
|
|
725815
726176
|
platform: process.platform,
|
|
725816
726177
|
nodeVersion: process.version,
|
|
725817
|
-
ccVersion: "1.84.
|
|
726178
|
+
ccVersion: "1.84.5"
|
|
725818
726179
|
};
|
|
725819
726180
|
}
|
|
725820
726181
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -726403,7 +726764,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
726403
726764
|
var call153 = async () => {
|
|
726404
726765
|
return {
|
|
726405
726766
|
type: "text",
|
|
726406
|
-
value: "1.84.
|
|
726767
|
+
value: "1.84.5"
|
|
726407
726768
|
};
|
|
726408
726769
|
}, version2, version_default;
|
|
726409
726770
|
var init_version = __esm(() => {
|
|
@@ -729605,7 +729966,7 @@ function ProviderFirstModelPicker({
|
|
|
729605
729966
|
const focusedEffortLevelLabels = focusedResolvedModel && focusedProviderId ? getSupportedEffortLevelLabelsForModel(focusedResolvedModel, focusedProviderId) : [];
|
|
729606
729967
|
const focusedSupportsEffort = focusedResolvedModel ? modelSupportsEffort(focusedResolvedModel, focusedProviderId) : false;
|
|
729607
729968
|
const focusedAdvertisesThinking = focusedResolvedModel && focusedProviderId ? modelSupportsThinking(focusedResolvedModel, focusedProviderId) : false;
|
|
729608
|
-
const focusedSupportsThinking = focusedResolvedModel && focusedProviderId ? focusedAdvertisesThinking && providerSupportsThinkingToggle(focusedProviderId) : false;
|
|
729969
|
+
const focusedSupportsThinking = focusedResolvedModel && focusedProviderId ? focusedAdvertisesThinking && providerSupportsThinkingToggle(focusedProviderId, focusedResolvedModel) : false;
|
|
729609
729970
|
const focusedDefaultEffort = focusedResolvedModel ? convertEffortValueToLevel(getDefaultEffortForModel(focusedResolvedModel, focusedProviderId) ?? (focusedEffortLevels.includes("high") ? "high" : focusedEffortLevels.at(-1)) ?? "high") : "high";
|
|
729610
729971
|
const displayedEffort = focusedResolvedModel ? resolveProviderEffortLevel(focusedResolvedModel, effort ?? focusedDefaultEffort, focusedProviderId) ?? focusedDefaultEffort : focusedDefaultEffort;
|
|
729611
729972
|
function handleProviderFocus(value2) {
|
|
@@ -732511,7 +732872,7 @@ function applyEffortCommandState(previous, result) {
|
|
|
732511
732872
|
}
|
|
732512
732873
|
function setEffortValue(effortValue, model, provider = getRuntimeProvider()) {
|
|
732513
732874
|
if (model && !modelSupportsEffort(model, provider)) {
|
|
732514
|
-
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
|
|
732875
|
+
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
|
|
732515
732876
|
const result = updateSettingsForSource("userSettings", {
|
|
732516
732877
|
alwaysThinkingEnabled: undefined
|
|
732517
732878
|
});
|
|
@@ -732599,7 +732960,7 @@ function showCurrentEffort(appStateEffort, model, provider = getRuntimeProvider(
|
|
|
732599
732960
|
const effectiveValue = envOverride === null ? undefined : envOverride ?? appStateEffort;
|
|
732600
732961
|
if (effectiveValue === undefined) {
|
|
732601
732962
|
if (!modelSupportsEffort(model, provider)) {
|
|
732602
|
-
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
|
|
732963
|
+
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
|
|
732603
732964
|
return {
|
|
732604
732965
|
message: `Effort: no model-specific graded ladder advertised for ${model} on ${provider}. UR is using the provider-native on/off control; thinking is ${thinkingEnabled === false ? "OFF" : "ON"}. Use /thinking on|off to change it.`
|
|
732605
732966
|
};
|
|
@@ -732625,7 +732986,7 @@ function showCurrentEffort(appStateEffort, model, provider = getRuntimeProvider(
|
|
|
732625
732986
|
};
|
|
732626
732987
|
}
|
|
732627
732988
|
if (!modelSupportsEffort(model, provider)) {
|
|
732628
|
-
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
|
|
732989
|
+
if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
|
|
732629
732990
|
return {
|
|
732630
732991
|
message: `Requested effort: ${effectiveValue}; not sent \u2014 ${model} on ${provider} advertises thinking but no model-specific graded ladder. UR is using the provider-native on/off control; thinking is ${thinkingEnabled === false ? "OFF" : "ON"}. Use /thinking on|off to change it.`
|
|
732631
732992
|
};
|
|
@@ -732813,7 +733174,7 @@ function capabilityMessage(enabled, model, provider) {
|
|
|
732813
733174
|
if (!modelSupportsThinking(model, provider)) {
|
|
732814
733175
|
return `${model} on ${provider} does not advertise thinking, so UR will not send a thinking control to it.`;
|
|
732815
733176
|
}
|
|
732816
|
-
if (!providerSupportsThinkingToggle(provider)) {
|
|
733177
|
+
if (!providerSupportsThinkingToggle(provider, model)) {
|
|
732817
733178
|
return `${model} advertises thinking, but the ${provider} runtime has no provider-native on/off mapping. ${modelSupportsEffort(model, provider) ? "Use /effort for its advertised graded control." : "UR will not invent a boolean wire field."}`;
|
|
732818
733179
|
}
|
|
732819
733180
|
if (!modelSupportsEffort(model, provider)) {
|
|
@@ -732831,7 +733192,7 @@ function executeThinking(args, currentEnabled, model, provider = getRuntimeProvi
|
|
|
732831
733192
|
const normalized = args.trim().toLowerCase();
|
|
732832
733193
|
if (!normalized || normalized === "status" || normalized === "current") {
|
|
732833
733194
|
const disabledByEnvironment2 = isEnvTruthy(process.env.UR_CODE_DISABLE_THINKING);
|
|
732834
|
-
const statusLabel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider) ? "Thinking" : "Thinking preference";
|
|
733195
|
+
const statusLabel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model) ? "Thinking" : "Thinking preference";
|
|
732835
733196
|
return {
|
|
732836
733197
|
message: disabledByEnvironment2 && currentEnabled ? `Thinking preference: ON, but UR_CODE_DISABLE_THINKING disables it for this session. ${capabilityMessage(false, model, provider)}` : `${statusLabel}: ${currentEnabled ? "ON" : "OFF"}. ${capabilityMessage(currentEnabled, model, provider)}`
|
|
732837
733198
|
};
|
|
@@ -732857,7 +733218,7 @@ function executeThinking(args, currentEnabled, model, provider = getRuntimeProvi
|
|
|
732857
733218
|
source: "slash-command"
|
|
732858
733219
|
});
|
|
732859
733220
|
const disabledByEnvironment = enabled && isEnvTruthy(process.env.UR_CODE_DISABLE_THINKING);
|
|
732860
|
-
const appliesToActiveModel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider) && !disabledByEnvironment;
|
|
733221
|
+
const appliesToActiveModel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model) && !disabledByEnvironment;
|
|
732861
733222
|
return {
|
|
732862
733223
|
message: disabledByEnvironment ? `Thinking preference saved as ON, but UR_CODE_DISABLE_THINKING disables it for this session. ${capabilityMessage(false, model, provider)}` : `${appliesToActiveModel ? "Thinking" : "Thinking preference"} ${enabled ? "ON" : "OFF"} for this session; user preference saved. ${capabilityMessage(enabled, model, provider)}`,
|
|
732863
733224
|
thinkingUpdate: { value: enabled }
|
|
@@ -738297,7 +738658,7 @@ function generateHtmlReport(data, insights) {
|
|
|
738297
738658
|
</html>`;
|
|
738298
738659
|
}
|
|
738299
738660
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
738300
|
-
const version3 = typeof MACRO !== "undefined" ? "1.84.
|
|
738661
|
+
const version3 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
|
|
738301
738662
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
738302
738663
|
const facets_summary = {
|
|
738303
738664
|
total: facets.size,
|
|
@@ -742612,7 +742973,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
742612
742973
|
init_settings2();
|
|
742613
742974
|
init_slowOperations();
|
|
742614
742975
|
init_uuid();
|
|
742615
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.84.
|
|
742976
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
|
|
742616
742977
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
742617
742978
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
742618
742979
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -743827,7 +744188,7 @@ var init_filesystem = __esm(() => {
|
|
|
743827
744188
|
});
|
|
743828
744189
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
743829
744190
|
const nonce = randomBytes23(16).toString("hex");
|
|
743830
|
-
return join234(getURTempDir(), "bundled-skills", "1.84.
|
|
744191
|
+
return join234(getURTempDir(), "bundled-skills", "1.84.5", nonce);
|
|
743831
744192
|
});
|
|
743832
744193
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
743833
744194
|
});
|
|
@@ -762303,11 +762664,11 @@ __export(exports_openrouter, {
|
|
|
762303
762664
|
});
|
|
762304
762665
|
import { randomUUID as randomUUID66 } from "crypto";
|
|
762305
762666
|
async function createOpenRouterClient(options5) {
|
|
762306
|
-
const { apiKey, baseUrl, maxRetries } = options5;
|
|
762667
|
+
const { apiKey, baseUrl, maxRetries, openrouter } = options5;
|
|
762307
762668
|
const endpoint = normalizeProviderEndpoint(baseUrl, "https://openrouter.ai/api/v1", "/chat/completions");
|
|
762308
762669
|
async function doRequest(params, requestOptions) {
|
|
762309
762670
|
const clientRequestId = params?.headers?.["x-client-request-id"];
|
|
762310
|
-
const response = await axiosPostWithProviderReliability(endpoint, toOpenAICompatibleRequest(params, "openrouter"), {
|
|
762671
|
+
const response = await axiosPostWithProviderReliability(endpoint, toOpenAICompatibleRequest(params, "openrouter", { openrouter }), {
|
|
762311
762672
|
headers: {
|
|
762312
762673
|
"Content-Type": "application/json",
|
|
762313
762674
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -762331,7 +762692,7 @@ async function createOpenRouterClient(options5) {
|
|
|
762331
762692
|
const clientRequestId = params?.headers?.["x-client-request-id"];
|
|
762332
762693
|
const streamController = controller ?? new AbortController;
|
|
762333
762694
|
const signal = mergeAbortSignals([requestOptions?.signal, streamController.signal]);
|
|
762334
|
-
const response = await axiosPostWithProviderReliability(endpoint, toOpenAICompatibleRequest({ ...params, stream: true }, "openrouter"), {
|
|
762695
|
+
const response = await axiosPostWithProviderReliability(endpoint, toOpenAICompatibleRequest({ ...params, stream: true }, "openrouter", { openrouter }), {
|
|
762335
762696
|
headers: {
|
|
762336
762697
|
"Content-Type": "application/json",
|
|
762337
762698
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -763622,19 +763983,21 @@ var exports_standardAPI = {};
|
|
|
763622
763983
|
__export(exports_standardAPI, {
|
|
763623
763984
|
parseProviderTokenCount: () => parseProviderTokenCount,
|
|
763624
763985
|
createStandardAPIClient: () => createStandardAPIClient,
|
|
763625
|
-
buildTokenCountRequest: () => buildTokenCountRequest
|
|
763986
|
+
buildTokenCountRequest: () => buildTokenCountRequest,
|
|
763987
|
+
buildAPIRequest: () => buildAPIRequest
|
|
763626
763988
|
});
|
|
763627
763989
|
import { randomUUID as randomUUID69 } from "crypto";
|
|
763628
763990
|
async function createStandardAPIClient(options5) {
|
|
763629
763991
|
const { providerId, apiKey, baseUrl, maxRetries } = options5;
|
|
763630
763992
|
const family = getProviderFamily(providerId);
|
|
763631
763993
|
async function doRequest(params, requestOptions) {
|
|
763632
|
-
const
|
|
763633
|
-
const
|
|
763634
|
-
const
|
|
763994
|
+
const wireParams = withConfiguredAnthropicPerformance(family, params, options5.anthropic);
|
|
763995
|
+
const endpoint = getAPIEndpoint(family, baseUrl, wireParams.model, false);
|
|
763996
|
+
const clientRequestId = wireParams?.headers?.["x-client-request-id"];
|
|
763997
|
+
const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, wireParams, providerId), {
|
|
763635
763998
|
headers: {
|
|
763636
763999
|
"Content-Type": "application/json",
|
|
763637
|
-
...buildAuthHeaders(family, apiKey,
|
|
764000
|
+
...buildAuthHeaders(family, apiKey, wireParams),
|
|
763638
764001
|
...clientRequestId && { "x-client-request-id": clientRequestId },
|
|
763639
764002
|
...requestOptions?.headers ?? {}
|
|
763640
764003
|
}
|
|
@@ -763643,17 +764006,21 @@ async function createStandardAPIClient(options5) {
|
|
|
763643
764006
|
timeoutMs: requestOptions?.timeoutMs,
|
|
763644
764007
|
signal: requestOptions?.signal
|
|
763645
764008
|
});
|
|
763646
|
-
return {
|
|
764009
|
+
return {
|
|
764010
|
+
response,
|
|
764011
|
+
data: parseAPIResponse(family, response.data, wireParams.model)
|
|
764012
|
+
};
|
|
763647
764013
|
}
|
|
763648
764014
|
async function doStream(params, requestOptions, controller) {
|
|
763649
|
-
const
|
|
764015
|
+
const wireParams = withConfiguredAnthropicPerformance(family, params, options5.anthropic);
|
|
764016
|
+
const endpoint = getAPIEndpoint(family, baseUrl, wireParams.model, true);
|
|
763650
764017
|
const streamController = controller ?? new AbortController;
|
|
763651
764018
|
const signal = mergeAbortSignals([requestOptions?.signal, streamController.signal]);
|
|
763652
|
-
const clientRequestId =
|
|
763653
|
-
const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, { ...
|
|
764019
|
+
const clientRequestId = wireParams?.headers?.["x-client-request-id"];
|
|
764020
|
+
const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, { ...wireParams, stream: true }, providerId), {
|
|
763654
764021
|
headers: {
|
|
763655
764022
|
"Content-Type": "application/json",
|
|
763656
|
-
...buildAuthHeaders(family, apiKey,
|
|
764023
|
+
...buildAuthHeaders(family, apiKey, wireParams),
|
|
763657
764024
|
...clientRequestId && { "x-client-request-id": clientRequestId },
|
|
763658
764025
|
...requestOptions?.headers ?? {}
|
|
763659
764026
|
},
|
|
@@ -763668,7 +764035,7 @@ async function createStandardAPIClient(options5) {
|
|
|
763668
764035
|
const streamOptions = {
|
|
763669
764036
|
controller: streamController,
|
|
763670
764037
|
signal,
|
|
763671
|
-
model:
|
|
764038
|
+
model: wireParams.model,
|
|
763672
764039
|
requestId,
|
|
763673
764040
|
providerName: family
|
|
763674
764041
|
};
|
|
@@ -763737,6 +764104,20 @@ async function createStandardAPIClient(options5) {
|
|
|
763737
764104
|
};
|
|
763738
764105
|
return { beta: { messages: messagesAPI } };
|
|
763739
764106
|
}
|
|
764107
|
+
function isAnthropicFastModeModel(model) {
|
|
764108
|
+
return /^claude-opus-(?:5(?:-|$)|4[-.]8(?:-|$))/iu.test(String(model ?? ""));
|
|
764109
|
+
}
|
|
764110
|
+
function withConfiguredAnthropicPerformance(family, params, settings) {
|
|
764111
|
+
if (family !== "anthropic" || settings?.speed !== "fast" || !isAnthropicFastModeModel(params?.model)) {
|
|
764112
|
+
return params;
|
|
764113
|
+
}
|
|
764114
|
+
const betas = Array.isArray(params.betas) ? params.betas : [];
|
|
764115
|
+
return {
|
|
764116
|
+
...params,
|
|
764117
|
+
speed: "fast",
|
|
764118
|
+
betas: betas.includes(ANTHROPIC_FAST_MODE_BETA) ? betas : [...betas, ANTHROPIC_FAST_MODE_BETA]
|
|
764119
|
+
};
|
|
764120
|
+
}
|
|
763740
764121
|
function buildTokenCountRequest(family, baseUrl, params, providerId) {
|
|
763741
764122
|
switch (family) {
|
|
763742
764123
|
case "openai": {
|
|
@@ -763840,7 +764221,7 @@ function buildAPIRequest(family, params, providerId) {
|
|
|
763840
764221
|
return toOpenAICompatibleRequest(params, "openai");
|
|
763841
764222
|
}
|
|
763842
764223
|
case "anthropic": {
|
|
763843
|
-
const tools = toAnthropicTools(params.tools);
|
|
764224
|
+
const tools = toAnthropicTools(params.tools, Boolean(params.stream));
|
|
763844
764225
|
return {
|
|
763845
764226
|
model: params.model,
|
|
763846
764227
|
...params.system && { system: toAnthropicSystem(params.system) },
|
|
@@ -763854,6 +764235,7 @@ function buildAPIRequest(family, params, providerId) {
|
|
|
763854
764235
|
...params.output_config !== undefined && {
|
|
763855
764236
|
output_config: providerOutputConfig(params, providerId)
|
|
763856
764237
|
},
|
|
764238
|
+
...params.speed === "fast" && { speed: "fast" },
|
|
763857
764239
|
stream: Boolean(params.stream),
|
|
763858
764240
|
...tools.length > 0 ? { tools } : {},
|
|
763859
764241
|
...params.tool_choice !== undefined ? { tool_choice: params.tool_choice } : {}
|
|
@@ -763943,7 +764325,8 @@ function parseAPIResponse(family, data, fallbackModel) {
|
|
|
763943
764325
|
input_tokens: data.usage?.input_tokens ?? 0,
|
|
763944
764326
|
output_tokens: data.usage?.output_tokens ?? 0,
|
|
763945
764327
|
cache_creation_input_tokens: data.usage?.cache_creation_input_tokens ?? 0,
|
|
763946
|
-
cache_read_input_tokens: data.usage?.cache_read_input_tokens ?? 0
|
|
764328
|
+
cache_read_input_tokens: data.usage?.cache_read_input_tokens ?? 0,
|
|
764329
|
+
speed: data.usage?.speed ?? null
|
|
763947
764330
|
}
|
|
763948
764331
|
};
|
|
763949
764332
|
}
|
|
@@ -764006,7 +764389,20 @@ function geminiSystemInstruction(params) {
|
|
|
764006
764389
|
}
|
|
764007
764390
|
function toAnthropicSystem(system) {
|
|
764008
764391
|
assertNoImageBlocks(system, "anthropic", "system content");
|
|
764009
|
-
|
|
764392
|
+
if (!Array.isArray(system))
|
|
764393
|
+
return system;
|
|
764394
|
+
return system.map((block2, index2) => toAnthropicContentBlock(block2, `system[${index2}]`));
|
|
764395
|
+
}
|
|
764396
|
+
function toAnthropicCacheControl(value2) {
|
|
764397
|
+
if (!value2 || typeof value2 !== "object" || Array.isArray(value2))
|
|
764398
|
+
return;
|
|
764399
|
+
const cache5 = value2;
|
|
764400
|
+
if (cache5.type !== "ephemeral")
|
|
764401
|
+
return;
|
|
764402
|
+
return {
|
|
764403
|
+
type: "ephemeral",
|
|
764404
|
+
...cache5.ttl === "1h" ? { ttl: "1h" } : {}
|
|
764405
|
+
};
|
|
764010
764406
|
}
|
|
764011
764407
|
function toAnthropicMessages(messages) {
|
|
764012
764408
|
if (!Array.isArray(messages))
|
|
@@ -764026,8 +764422,13 @@ function toAnthropicContent(content, context6) {
|
|
|
764026
764422
|
function toAnthropicContentBlock(block2, context6) {
|
|
764027
764423
|
if (typeof block2 === "string")
|
|
764028
764424
|
return { type: "text", text: block2 };
|
|
764425
|
+
const cacheControl = toAnthropicCacheControl(block2?.cache_control);
|
|
764029
764426
|
if (block2?.type === "text") {
|
|
764030
|
-
return {
|
|
764427
|
+
return {
|
|
764428
|
+
type: "text",
|
|
764429
|
+
text: block2.text ?? "",
|
|
764430
|
+
...cacheControl && { cache_control: cacheControl }
|
|
764431
|
+
};
|
|
764031
764432
|
}
|
|
764032
764433
|
if (block2?.type === "image") {
|
|
764033
764434
|
const source = normalizeImageBlockSource(block2, "anthropic", context6);
|
|
@@ -764038,7 +764439,8 @@ function toAnthropicContentBlock(block2, context6) {
|
|
|
764038
764439
|
type: "base64",
|
|
764039
764440
|
media_type: source.mediaType,
|
|
764040
764441
|
data: source.data
|
|
764041
|
-
}
|
|
764442
|
+
},
|
|
764443
|
+
...cacheControl && { cache_control: cacheControl }
|
|
764042
764444
|
};
|
|
764043
764445
|
}
|
|
764044
764446
|
return {
|
|
@@ -764046,15 +764448,24 @@ function toAnthropicContentBlock(block2, context6) {
|
|
|
764046
764448
|
source: {
|
|
764047
764449
|
type: "url",
|
|
764048
764450
|
url: source.url
|
|
764049
|
-
}
|
|
764451
|
+
},
|
|
764452
|
+
...cacheControl && { cache_control: cacheControl }
|
|
764050
764453
|
};
|
|
764051
764454
|
}
|
|
764052
764455
|
if (block2?.type === "tool_result") {
|
|
764456
|
+
const { cache_control: _cacheControl, ...rest } = block2;
|
|
764053
764457
|
return {
|
|
764054
|
-
...
|
|
764055
|
-
content: toAnthropicToolResultContent(block2.content, `${context6}.content`)
|
|
764458
|
+
...rest,
|
|
764459
|
+
content: toAnthropicToolResultContent(block2.content, `${context6}.content`),
|
|
764460
|
+
...cacheControl && { cache_control: cacheControl }
|
|
764056
764461
|
};
|
|
764057
764462
|
}
|
|
764463
|
+
if (cacheControl)
|
|
764464
|
+
return { ...block2, cache_control: cacheControl };
|
|
764465
|
+
if (block2?.cache_control !== undefined) {
|
|
764466
|
+
const { cache_control: _cacheControl, ...rest } = block2;
|
|
764467
|
+
return rest;
|
|
764468
|
+
}
|
|
764058
764469
|
return block2;
|
|
764059
764470
|
}
|
|
764060
764471
|
function toAnthropicToolResultContent(content, context6) {
|
|
@@ -764075,7 +764486,7 @@ function toAnthropicToolResultBlock(block2, context6) {
|
|
|
764075
764486
|
}
|
|
764076
764487
|
return block2;
|
|
764077
764488
|
}
|
|
764078
|
-
function toAnthropicTools(tools) {
|
|
764489
|
+
function toAnthropicTools(tools, eagerInputStreaming = false) {
|
|
764079
764490
|
if (tools === undefined || tools === null)
|
|
764080
764491
|
return [];
|
|
764081
764492
|
if (!Array.isArray(tools)) {
|
|
@@ -764086,11 +764497,14 @@ function toAnthropicTools(tools) {
|
|
|
764086
764497
|
throw new ToolSchemaValidationError("Anthropic tool entry is missing required name/input_schema fields.");
|
|
764087
764498
|
}
|
|
764088
764499
|
assertValidToolName(tool.name, "Anthropic");
|
|
764500
|
+
const cacheControl = toAnthropicCacheControl(tool.cache_control);
|
|
764089
764501
|
return {
|
|
764090
764502
|
name: tool.name,
|
|
764091
764503
|
...tool.description !== undefined && { description: tool.description },
|
|
764092
764504
|
input_schema: prepareAndValidateToolSchema(tool.input_schema, tool.name),
|
|
764093
|
-
...tool.strict === true && { strict: true }
|
|
764505
|
+
...tool.strict === true && { strict: true },
|
|
764506
|
+
...eagerInputStreaming && { eager_input_streaming: true },
|
|
764507
|
+
...cacheControl && { cache_control: cacheControl }
|
|
764094
764508
|
};
|
|
764095
764509
|
});
|
|
764096
764510
|
assertUniqueToolNames(mapped.map((tool) => tool.name), "Anthropic");
|
|
@@ -764357,7 +764771,7 @@ function collectToolNamesById2(messages) {
|
|
|
764357
764771
|
function estimateTokenCount2(params) {
|
|
764358
764772
|
return estimateProviderInputTokens(params);
|
|
764359
764773
|
}
|
|
764360
|
-
var ANTHROPIC_VERSION = "2023-06-01", TOKEN_COUNT_TIMEOUT_MS3 = 1e4;
|
|
764774
|
+
var ANTHROPIC_VERSION = "2023-06-01", ANTHROPIC_FAST_MODE_BETA = "fast-mode-2026-02-01", TOKEN_COUNT_TIMEOUT_MS3 = 1e4;
|
|
764361
764775
|
var init_standardAPI = __esm(() => {
|
|
764362
764776
|
init_debug();
|
|
764363
764777
|
init_effort();
|
|
@@ -764642,7 +765056,8 @@ async function createAPIClient(providerId, options5 = {}) {
|
|
|
764642
765056
|
apiKey,
|
|
764643
765057
|
baseUrl: resolveProviderBaseUrl(providerId, settings),
|
|
764644
765058
|
maxRetries: options5.maxRetries ?? 3,
|
|
764645
|
-
model: options5.model
|
|
765059
|
+
model: options5.model,
|
|
765060
|
+
openrouter: providerSettings.openrouter
|
|
764646
765061
|
});
|
|
764647
765062
|
}
|
|
764648
765063
|
if (providerId === "openai-api" && providerSettings.active === providerId && providerSettings.openaiTransport === "responses") {
|
|
@@ -764671,7 +765086,8 @@ async function createAPIClient(providerId, options5 = {}) {
|
|
|
764671
765086
|
baseUrl: resolveProviderBaseUrl(providerId, settings),
|
|
764672
765087
|
maxRetries: options5.maxRetries ?? 3,
|
|
764673
765088
|
model: options5.model,
|
|
764674
|
-
fetch: options5.fetchOverride
|
|
765089
|
+
fetch: options5.fetchOverride,
|
|
765090
|
+
anthropic: providerSettings.anthropic
|
|
764675
765091
|
});
|
|
764676
765092
|
}
|
|
764677
765093
|
var ProviderResponseParseError, ProviderCapabilityError;
|
|
@@ -764921,12 +765337,12 @@ function calculateContextPercentages(currentUsage, contextWindowSize) {
|
|
|
764921
765337
|
}
|
|
764922
765338
|
function getModelMaxOutputTokens(model, provider, settings) {
|
|
764923
765339
|
let defaultTokens = MAX_OUTPUT_TOKENS_DEFAULT;
|
|
764924
|
-
let upperLimit =
|
|
765340
|
+
let upperLimit = UNKNOWN_MODEL_OUTPUT_TOKENS_UPPER_LIMIT;
|
|
764925
765341
|
if (process.env.USER_TYPE === "ant") {
|
|
764926
765342
|
const antModel = resolveAntModel(model.toLowerCase());
|
|
764927
765343
|
if (antModel) {
|
|
764928
765344
|
defaultTokens = antModel.defaultMaxTokens ?? MAX_OUTPUT_TOKENS_DEFAULT;
|
|
764929
|
-
upperLimit = antModel.upperMaxTokensLimit ??
|
|
765345
|
+
upperLimit = antModel.upperMaxTokensLimit ?? UNKNOWN_MODEL_OUTPUT_TOKENS_UPPER_LIMIT;
|
|
764930
765346
|
return { default: defaultTokens, upperLimit };
|
|
764931
765347
|
}
|
|
764932
765348
|
}
|
|
@@ -764937,7 +765353,7 @@ function getModelMaxOutputTokens(model, provider, settings) {
|
|
|
764937
765353
|
}
|
|
764938
765354
|
const providerOutputLimit = getProviderOutputTokenLimitForModel(model, provider, settings);
|
|
764939
765355
|
if (providerOutputLimit !== undefined) {
|
|
764940
|
-
upperLimit = Math.min(upperLimit, providerOutputLimit);
|
|
765356
|
+
upperLimit = cap?.max_tokens ? Math.min(upperLimit, providerOutputLimit) : providerOutputLimit;
|
|
764941
765357
|
defaultTokens = Math.min(defaultTokens, upperLimit);
|
|
764942
765358
|
}
|
|
764943
765359
|
return { default: defaultTokens, upperLimit };
|
|
@@ -764945,7 +765361,7 @@ function getModelMaxOutputTokens(model, provider, settings) {
|
|
|
764945
765361
|
function getMaxThinkingTokensForModel(model) {
|
|
764946
765362
|
return getModelMaxOutputTokens(model).upperLimit - 1;
|
|
764947
765363
|
}
|
|
764948
|
-
var MODEL_CONTEXT_WINDOW_DEFAULT = 200000, COMPACT_MAX_OUTPUT_TOKENS = 20000, MAX_OUTPUT_TOKENS_DEFAULT = 32000,
|
|
765364
|
+
var MODEL_CONTEXT_WINDOW_DEFAULT = 200000, COMPACT_MAX_OUTPUT_TOKENS = 20000, MAX_OUTPUT_TOKENS_DEFAULT = 32000, UNKNOWN_MODEL_OUTPUT_TOKENS_UPPER_LIMIT = 64000;
|
|
764949
765365
|
var init_context4 = __esm(() => {
|
|
764950
765366
|
init_betas();
|
|
764951
765367
|
init_providerRegistry();
|
|
@@ -775622,7 +776038,7 @@ function getUserAgent() {
|
|
|
775622
776038
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
775623
776039
|
const workload = getWorkload();
|
|
775624
776040
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
775625
|
-
return `ur-cli/${"1.84.
|
|
776041
|
+
return `ur-cli/${"1.84.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
775626
776042
|
}
|
|
775627
776043
|
function getMCPUserAgent() {
|
|
775628
776044
|
const parts = [];
|
|
@@ -775636,7 +776052,7 @@ function getMCPUserAgent() {
|
|
|
775636
776052
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
775637
776053
|
}
|
|
775638
776054
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
775639
|
-
return `ur/${"1.84.
|
|
776055
|
+
return `ur/${"1.84.5"}${suffix}`;
|
|
775640
776056
|
}
|
|
775641
776057
|
function getWebFetchUserAgent() {
|
|
775642
776058
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -777349,12 +777765,12 @@ var init_oauth2 = __esm(() => {
|
|
|
777349
777765
|
});
|
|
777350
777766
|
|
|
777351
777767
|
// src/utils/secureStorage/macOsKeychainHelpers.ts
|
|
777352
|
-
import { createHash as
|
|
777768
|
+
import { createHash as createHash49 } from "crypto";
|
|
777353
777769
|
import { userInfo as userInfo3 } from "os";
|
|
777354
777770
|
function getMacOsKeychainStorageServiceName(serviceSuffix = "") {
|
|
777355
777771
|
const configDir = getURConfigHomeDir();
|
|
777356
777772
|
const isDefaultDir = !process.env.UR_CONFIG_DIR;
|
|
777357
|
-
const dirHash = isDefaultDir ? "" : `-${
|
|
777773
|
+
const dirHash = isDefaultDir ? "" : `-${createHash49("sha256").update(configDir).digest("hex").substring(0, 8)}`;
|
|
777358
777774
|
return `UR${getOauthConfig().OAUTH_FILE_SUFFIX}${serviceSuffix}${dirHash}`;
|
|
777359
777775
|
}
|
|
777360
777776
|
function getUsername2() {
|
|
@@ -777926,7 +778342,7 @@ import {
|
|
|
777926
778342
|
writeFileSync as writeFileSync73
|
|
777927
778343
|
} from "fs";
|
|
777928
778344
|
import { isAbsolute as isAbsolute55, join as join245, relative as relative65, resolve as resolve76, sep as sep51 } from "path";
|
|
777929
|
-
import { createHash as
|
|
778345
|
+
import { createHash as createHash50, randomUUID as randomUUID70 } from "crypto";
|
|
777930
778346
|
function now6() {
|
|
777931
778347
|
return new Date().toISOString();
|
|
777932
778348
|
}
|
|
@@ -778220,7 +778636,7 @@ function steerBackgroundTask(cwd2, id, text2, source) {
|
|
|
778220
778636
|
reason: "message must be between 1 byte and 64 KiB"
|
|
778221
778637
|
};
|
|
778222
778638
|
}
|
|
778223
|
-
const messageSha256 =
|
|
778639
|
+
const messageSha256 = createHash50("sha256").update(message).digest("hex");
|
|
778224
778640
|
ensureDirs2(task2.cwd);
|
|
778225
778641
|
const lockPath2 = `${task2.inboxFile}.lock`;
|
|
778226
778642
|
writeFileSync73(lockPath2, "", { flag: "a", mode: 384 });
|
|
@@ -778915,7 +779331,7 @@ async function establishPrTrust(task2, cwd2) {
|
|
|
778915
779331
|
return {
|
|
778916
779332
|
originUrl,
|
|
778917
779333
|
repository,
|
|
778918
|
-
configDigest:
|
|
779334
|
+
configDigest: createHash50("sha256").update(config4).digest("hex"),
|
|
778919
779335
|
baseHead
|
|
778920
779336
|
};
|
|
778921
779337
|
}
|
|
@@ -778927,7 +779343,7 @@ async function validatePrTrust(task2, cwd2) {
|
|
|
778927
779343
|
const originUrl = await readPrTrustValue(task2, cwd2, ["remote", "get-url", "--push", "origin"]);
|
|
778928
779344
|
const config4 = await readPrTrustValue(task2, cwd2, ["config", "--null", "--list", "--show-origin"]);
|
|
778929
779345
|
const branch2 = await readPrTrustValue(task2, cwd2, ["symbolic-ref", "--quiet", "--short", "HEAD"]);
|
|
778930
|
-
const configDigest =
|
|
779346
|
+
const configDigest = createHash50("sha256").update(config4).digest("hex");
|
|
778931
779347
|
if (originUrl !== trust.originUrl || githubRepositoryFromRemote(originUrl) !== trust.repository || configDigest !== trust.configDigest || branch2 !== task2.branch) {
|
|
778932
779348
|
throw new Error("Repository trust state changed during the background run; refusing to publish.");
|
|
778933
779349
|
}
|
|
@@ -779240,7 +779656,7 @@ __export(exports_delegation, {
|
|
|
779240
779656
|
attenuateDelegationToken: () => attenuateDelegationToken
|
|
779241
779657
|
});
|
|
779242
779658
|
import {
|
|
779243
|
-
createHash as
|
|
779659
|
+
createHash as createHash51,
|
|
779244
779660
|
createHmac as createHmac5,
|
|
779245
779661
|
randomUUID as randomUUID71,
|
|
779246
779662
|
timingSafeEqual as timingSafeEqual2
|
|
@@ -779258,8 +779674,8 @@ function sign2(secret, payload) {
|
|
|
779258
779674
|
return createHmac5("sha256", secret).update(payload).digest("base64url");
|
|
779259
779675
|
}
|
|
779260
779676
|
function constantTimeStringEqual(a2, b) {
|
|
779261
|
-
const left =
|
|
779262
|
-
const right =
|
|
779677
|
+
const left = createHash51("sha256").update(a2, "utf8").digest();
|
|
779678
|
+
const right = createHash51("sha256").update(b, "utf8").digest();
|
|
779263
779679
|
return timingSafeEqual2(left, right);
|
|
779264
779680
|
}
|
|
779265
779681
|
function normalizeScope(scope) {
|
|
@@ -785778,7 +786194,7 @@ var init_a2aPushNotifications = __esm(() => {
|
|
|
785778
786194
|
});
|
|
785779
786195
|
|
|
785780
786196
|
// src/services/agents/a2aProtocol.ts
|
|
785781
|
-
import { createHash as
|
|
786197
|
+
import { createHash as createHash52, randomUUID as randomUUID73 } from "crypto";
|
|
785782
786198
|
import {
|
|
785783
786199
|
existsSync as existsSync103,
|
|
785784
786200
|
mkdirSync as mkdirSync72,
|
|
@@ -785994,7 +786410,7 @@ class PersistentA2ATaskStore {
|
|
|
785994
786410
|
async listVisible(params, context6) {
|
|
785995
786411
|
const owner2 = ownerFromContext(context6);
|
|
785996
786412
|
const identity5 = identityFromContext(context6);
|
|
785997
|
-
const filterKey =
|
|
786413
|
+
const filterKey = createHash52("sha256").update(JSON.stringify({
|
|
785998
786414
|
owner: owner2,
|
|
785999
786415
|
contextId: params.contextId ?? null,
|
|
786000
786416
|
status: params.status ?? null,
|
|
@@ -786514,7 +786930,7 @@ var init_a2aProtocol = __esm(() => {
|
|
|
786514
786930
|
});
|
|
786515
786931
|
|
|
786516
786932
|
// src/services/agents/a2aV1.ts
|
|
786517
|
-
import { createHash as
|
|
786933
|
+
import { createHash as createHash53 } from "crypto";
|
|
786518
786934
|
function errorDetails2(error61) {
|
|
786519
786935
|
if (error61.details?.length)
|
|
786520
786936
|
return error61.details;
|
|
@@ -786645,7 +787061,7 @@ function validateA2AV1Tenant(value2) {
|
|
|
786645
787061
|
function namespaceA2AV1Identity(identity5, tenant2, requestedSkill2) {
|
|
786646
787062
|
return {
|
|
786647
787063
|
...identity5,
|
|
786648
|
-
userName: tenant2 ? `a2a-v1-tenant:${
|
|
787064
|
+
userName: tenant2 ? `a2a-v1-tenant:${createHash53("sha256").update(`${tenant2}\x00${identity5.userName}`).digest("base64url")}` : identity5.userName,
|
|
786649
787065
|
...requestedSkill2 ? { requestedSkill: requestedSkill2 } : {}
|
|
786650
787066
|
};
|
|
786651
787067
|
}
|
|
@@ -786959,7 +787375,7 @@ __export(exports_a2aServer, {
|
|
|
786959
787375
|
handleA2ARequest: () => handleA2ARequest,
|
|
786960
787376
|
authorizeRequest: () => authorizeRequest
|
|
786961
787377
|
});
|
|
786962
|
-
import { createHash as
|
|
787378
|
+
import { createHash as createHash54, randomUUID as randomUUID74 } from "crypto";
|
|
786963
787379
|
import {
|
|
786964
787380
|
existsSync as existsSync104,
|
|
786965
787381
|
mkdirSync as mkdirSync73,
|
|
@@ -787072,7 +787488,7 @@ function isAsyncIterable(value2) {
|
|
|
787072
787488
|
}
|
|
787073
787489
|
function agentCardResponse(card, version3, request) {
|
|
787074
787490
|
const payload = JSON.stringify(card, null, 2);
|
|
787075
|
-
const etag = `"${
|
|
787491
|
+
const etag = `"${createHash54("sha256").update(payload).digest("base64url")}"`;
|
|
787076
787492
|
const notModified = request?.headers.get("if-none-match") === etag;
|
|
787077
787493
|
return new Response(notModified ? null : payload, {
|
|
787078
787494
|
status: notModified ? 304 : 200,
|
|
@@ -792799,7 +793215,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
792799
793215
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
792800
793216
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
792801
793217
|
betas: getSdkBetas(),
|
|
792802
|
-
ur_version: "1.84.
|
|
793218
|
+
ur_version: "1.84.5",
|
|
792803
793219
|
output_style: outputStyle,
|
|
792804
793220
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
792805
793221
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -796340,7 +796756,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
796340
796756
|
function getSemverPart(version3) {
|
|
796341
796757
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
796342
796758
|
}
|
|
796343
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.84.
|
|
796759
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.84.5") {
|
|
796344
796760
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
|
|
796345
796761
|
if (!updatedVersion) {
|
|
796346
796762
|
return null;
|
|
@@ -796389,7 +796805,7 @@ function AutoUpdater({
|
|
|
796389
796805
|
return;
|
|
796390
796806
|
}
|
|
796391
796807
|
if (false) {}
|
|
796392
|
-
const currentVersion = "1.84.
|
|
796808
|
+
const currentVersion = "1.84.5";
|
|
796393
796809
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
796394
796810
|
let latestVersion = await getLatestVersion(channel);
|
|
796395
796811
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -796618,12 +797034,12 @@ function NativeAutoUpdater({
|
|
|
796618
797034
|
logEvent("tengu_native_auto_updater_start", {});
|
|
796619
797035
|
try {
|
|
796620
797036
|
const maxVersion = await getMaxVersion();
|
|
796621
|
-
if (maxVersion && gt("1.84.
|
|
797037
|
+
if (maxVersion && gt("1.84.5", maxVersion)) {
|
|
796622
797038
|
const msg = await getMaxVersionMessage();
|
|
796623
797039
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
796624
797040
|
}
|
|
796625
797041
|
const result = await installLatest(channel);
|
|
796626
|
-
const currentVersion = "1.84.
|
|
797042
|
+
const currentVersion = "1.84.5";
|
|
796627
797043
|
const latencyMs = Date.now() - startTime;
|
|
796628
797044
|
if (result.lockFailed) {
|
|
796629
797045
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -796760,17 +797176,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
796760
797176
|
const maxVersion = await getMaxVersion();
|
|
796761
797177
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
796762
797178
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
796763
|
-
if (gte("1.84.
|
|
796764
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.84.
|
|
797179
|
+
if (gte("1.84.5", maxVersion)) {
|
|
797180
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.84.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
796765
797181
|
setUpdateAvailable(false);
|
|
796766
797182
|
return;
|
|
796767
797183
|
}
|
|
796768
797184
|
latest = maxVersion;
|
|
796769
797185
|
}
|
|
796770
|
-
const hasUpdate = latest && !gte("1.84.
|
|
797186
|
+
const hasUpdate = latest && !gte("1.84.5", latest) && !shouldSkipVersion(latest);
|
|
796771
797187
|
setUpdateAvailable(!!hasUpdate);
|
|
796772
797188
|
if (hasUpdate) {
|
|
796773
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.84.
|
|
797189
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.84.5"} -> ${latest}`);
|
|
796774
797190
|
}
|
|
796775
797191
|
};
|
|
796776
797192
|
$2[0] = t1;
|
|
@@ -796804,7 +797220,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
796804
797220
|
wrap: "truncate",
|
|
796805
797221
|
children: [
|
|
796806
797222
|
"currentVersion: ",
|
|
796807
|
-
"1.84.
|
|
797223
|
+
"1.84.5"
|
|
796808
797224
|
]
|
|
796809
797225
|
}, undefined, true, undefined, this);
|
|
796810
797226
|
$2[3] = verbose;
|
|
@@ -807653,7 +808069,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
807653
808069
|
project_dir: getOriginalCwd(),
|
|
807654
808070
|
added_dirs: addedDirs
|
|
807655
808071
|
},
|
|
807656
|
-
version: "1.84.
|
|
808072
|
+
version: "1.84.5",
|
|
807657
808073
|
output_style: {
|
|
807658
808074
|
name: outputStyleName
|
|
807659
808075
|
},
|
|
@@ -807788,7 +808204,7 @@ function StatusLineInner({
|
|
|
807788
808204
|
const attention = customStatusError ?? taskAttention;
|
|
807789
808205
|
const terminalSize = React138.useContext(TerminalSizeContext);
|
|
807790
808206
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
807791
|
-
version: "1.84.
|
|
808207
|
+
version: "1.84.5",
|
|
807792
808208
|
providerLabel: providerRuntime.providerLabel,
|
|
807793
808209
|
authMode: providerRuntime.authLabel,
|
|
807794
808210
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -820179,7 +820595,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
820179
820595
|
} catch {}
|
|
820180
820596
|
const data = {
|
|
820181
820597
|
trigger: trigger2,
|
|
820182
|
-
version: "1.84.
|
|
820598
|
+
version: "1.84.5",
|
|
820183
820599
|
platform: process.platform,
|
|
820184
820600
|
transcript,
|
|
820185
820601
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -832561,7 +832977,7 @@ function WelcomeV2() {
|
|
|
832561
832977
|
dimColor: true,
|
|
832562
832978
|
children: [
|
|
832563
832979
|
"v",
|
|
832564
|
-
"1.84.
|
|
832980
|
+
"1.84.5"
|
|
832565
832981
|
]
|
|
832566
832982
|
}, undefined, true, undefined, this)
|
|
832567
832983
|
]
|
|
@@ -833807,7 +834223,7 @@ function completeOnboarding() {
|
|
|
833807
834223
|
saveGlobalConfig((current) => ({
|
|
833808
834224
|
...current,
|
|
833809
834225
|
hasCompletedOnboarding: true,
|
|
833810
|
-
lastOnboardingVersion: "1.84.
|
|
834226
|
+
lastOnboardingVersion: "1.84.5"
|
|
833811
834227
|
}));
|
|
833812
834228
|
}
|
|
833813
834229
|
function showDialog(root2, renderer) {
|
|
@@ -838804,7 +839220,7 @@ function appendToLog(path28, message) {
|
|
|
838804
839220
|
cwd: getFsImplementation().cwd(),
|
|
838805
839221
|
userType: process.env.USER_TYPE,
|
|
838806
839222
|
sessionId: getSessionId(),
|
|
838807
|
-
version: "1.84.
|
|
839223
|
+
version: "1.84.5"
|
|
838808
839224
|
};
|
|
838809
839225
|
getLogWriter(path28).write(messageWithTimestamp);
|
|
838810
839226
|
}
|
|
@@ -842967,8 +843383,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
842967
843383
|
}
|
|
842968
843384
|
async function checkEnvLessBridgeMinVersion() {
|
|
842969
843385
|
const cfg = await getEnvLessBridgeConfig();
|
|
842970
|
-
if (cfg.min_version && lt("1.84.
|
|
842971
|
-
return `Your version of UR (${"1.84.
|
|
843386
|
+
if (cfg.min_version && lt("1.84.5", cfg.min_version)) {
|
|
843387
|
+
return `Your version of UR (${"1.84.5"}) is too old for Remote Control.
|
|
842972
843388
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
842973
843389
|
}
|
|
842974
843390
|
return null;
|
|
@@ -843442,7 +843858,7 @@ async function initBridgeCore(params) {
|
|
|
843442
843858
|
const rawApi = createBridgeApiClient({
|
|
843443
843859
|
baseUrl,
|
|
843444
843860
|
getAccessToken,
|
|
843445
|
-
runnerVersion: "1.84.
|
|
843861
|
+
runnerVersion: "1.84.5",
|
|
843446
843862
|
onDebug: logForDebugging,
|
|
843447
843863
|
onAuth401,
|
|
843448
843864
|
getTrustedDeviceToken
|
|
@@ -856763,7 +857179,7 @@ __export(exports_agUi, {
|
|
|
856763
857179
|
getAgUiCapabilities: () => getAgUiCapabilities,
|
|
856764
857180
|
createAgUiHttpHandler: () => createAgUiHttpHandler
|
|
856765
857181
|
});
|
|
856766
|
-
import { createHash as
|
|
857182
|
+
import { createHash as createHash55 } from "crypto";
|
|
856767
857183
|
function isLoopback4(host) {
|
|
856768
857184
|
const normalized = host.toLowerCase();
|
|
856769
857185
|
return normalized === "127.0.0.1" || normalized === "localhost" || normalized === "::1" || normalized === "0:0:0:0:0:0:0:1";
|
|
@@ -856820,7 +857236,7 @@ function authenticate2(request, token) {
|
|
|
856820
857236
|
}
|
|
856821
857237
|
return {
|
|
856822
857238
|
ok: true,
|
|
856823
|
-
owner: `bearer:${
|
|
857239
|
+
owner: `bearer:${createHash55("sha256").update(supplied).digest("base64url")}`
|
|
856824
857240
|
};
|
|
856825
857241
|
}
|
|
856826
857242
|
function allowedOrigin(request, allowedOrigins2) {
|
|
@@ -856884,7 +857300,7 @@ function getAgUiCapabilities() {
|
|
|
856884
857300
|
name: "UR-Nexus",
|
|
856885
857301
|
type: "ur-nexus",
|
|
856886
857302
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
856887
|
-
version: "1.84.
|
|
857303
|
+
version: "1.84.5",
|
|
856888
857304
|
provider: "UR",
|
|
856889
857305
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
856890
857306
|
},
|
|
@@ -857704,7 +858120,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
857704
858120
|
};
|
|
857705
858121
|
const server2 = new Server({
|
|
857706
858122
|
name: "ur-nexus",
|
|
857707
|
-
version: "1.84.
|
|
858123
|
+
version: "1.84.5"
|
|
857708
858124
|
}, {
|
|
857709
858125
|
capabilities: {
|
|
857710
858126
|
tools: {}
|
|
@@ -858762,7 +859178,7 @@ __export(exports_mcp2026, {
|
|
|
858762
859178
|
createUrMcp2026Runtime: () => createUrMcp2026Runtime,
|
|
858763
859179
|
createMcp2026HttpHandler: () => createMcp2026HttpHandler
|
|
858764
859180
|
});
|
|
858765
|
-
import { createHash as
|
|
859181
|
+
import { createHash as createHash56 } from "crypto";
|
|
858766
859182
|
function isRecord9(value2) {
|
|
858767
859183
|
return Boolean(value2) && typeof value2 === "object" && !Array.isArray(value2);
|
|
858768
859184
|
}
|
|
@@ -858803,7 +859219,7 @@ function authenticate3(request, token) {
|
|
|
858803
859219
|
}
|
|
858804
859220
|
return {
|
|
858805
859221
|
ok: true,
|
|
858806
|
-
owner: `bearer:${
|
|
859222
|
+
owner: `bearer:${createHash56("sha256").update(supplied).digest("base64url")}`
|
|
858807
859223
|
};
|
|
858808
859224
|
}
|
|
858809
859225
|
function response(status2, body, origin2, extraHeaders = {}) {
|
|
@@ -858907,7 +859323,7 @@ function thrownResponse(error61) {
|
|
|
858907
859323
|
}
|
|
858908
859324
|
async function createUrMcp2026Runtime(options5) {
|
|
858909
859325
|
const server2 = createMCPServer(options5.cwd, options5.debug === true, options5.verbose === true);
|
|
858910
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.84.
|
|
859326
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.84.5" }, { capabilities: {} });
|
|
858911
859327
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
858912
859328
|
try {
|
|
858913
859329
|
await server2.connect(serverTransport);
|
|
@@ -858918,7 +859334,7 @@ async function createUrMcp2026Runtime(options5) {
|
|
|
858918
859334
|
}
|
|
858919
859335
|
const runtime2 = new Mcp2026Runtime({
|
|
858920
859336
|
cwd: options5.cwd,
|
|
858921
|
-
version: "1.84.
|
|
859337
|
+
version: "1.84.5",
|
|
858922
859338
|
backend: {
|
|
858923
859339
|
listTools: async () => {
|
|
858924
859340
|
const listed = await client2.listTools();
|
|
@@ -859841,6 +860257,14 @@ var init_providers2 = __esm(() => {
|
|
|
859841
860257
|
"responses.store",
|
|
859842
860258
|
"responses.compact_threshold",
|
|
859843
860259
|
"responses.tool_search",
|
|
860260
|
+
"openrouter.routing",
|
|
860261
|
+
"openrouter.allow_fallbacks",
|
|
860262
|
+
"openrouter.require_parameters",
|
|
860263
|
+
"openrouter.preferred_min_throughput",
|
|
860264
|
+
"openrouter.preferred_max_latency",
|
|
860265
|
+
"openrouter.service_tier",
|
|
860266
|
+
"openrouter.speed",
|
|
860267
|
+
"anthropic.speed",
|
|
859844
860268
|
"model",
|
|
859845
860269
|
"base_url"
|
|
859846
860270
|
];
|
|
@@ -859901,6 +860325,46 @@ function providerConfigEntries() {
|
|
|
859901
860325
|
value: configured.responses?.toolSearch ?? null,
|
|
859902
860326
|
category: "provider"
|
|
859903
860327
|
},
|
|
860328
|
+
{
|
|
860329
|
+
key: "openrouter.routing",
|
|
860330
|
+
value: configured.openrouter?.routing ?? "auto",
|
|
860331
|
+
category: "provider"
|
|
860332
|
+
},
|
|
860333
|
+
{
|
|
860334
|
+
key: "openrouter.allow_fallbacks",
|
|
860335
|
+
value: configured.openrouter?.allowFallbacks ?? true,
|
|
860336
|
+
category: "provider"
|
|
860337
|
+
},
|
|
860338
|
+
{
|
|
860339
|
+
key: "openrouter.require_parameters",
|
|
860340
|
+
value: configured.openrouter?.requireParameters ?? null,
|
|
860341
|
+
category: "provider"
|
|
860342
|
+
},
|
|
860343
|
+
{
|
|
860344
|
+
key: "openrouter.preferred_min_throughput",
|
|
860345
|
+
value: configured.openrouter?.preferredMinThroughput ?? null,
|
|
860346
|
+
category: "provider"
|
|
860347
|
+
},
|
|
860348
|
+
{
|
|
860349
|
+
key: "openrouter.preferred_max_latency",
|
|
860350
|
+
value: configured.openrouter?.preferredMaxLatency ?? null,
|
|
860351
|
+
category: "provider"
|
|
860352
|
+
},
|
|
860353
|
+
{
|
|
860354
|
+
key: "openrouter.service_tier",
|
|
860355
|
+
value: configured.openrouter?.serviceTier ?? "auto",
|
|
860356
|
+
category: "provider"
|
|
860357
|
+
},
|
|
860358
|
+
{
|
|
860359
|
+
key: "openrouter.speed",
|
|
860360
|
+
value: configured.openrouter?.speed ?? "standard",
|
|
860361
|
+
category: "provider"
|
|
860362
|
+
},
|
|
860363
|
+
{
|
|
860364
|
+
key: "anthropic.speed",
|
|
860365
|
+
value: configured.anthropic?.speed ?? "standard",
|
|
860366
|
+
category: "provider"
|
|
860367
|
+
},
|
|
859904
860368
|
{ key: "model", value: active3.model ?? null, category: "provider" },
|
|
859905
860369
|
{ key: "base_url", value: active3.baseUrl ?? null, category: "provider" }
|
|
859906
860370
|
];
|
|
@@ -861754,7 +862218,7 @@ async function update() {
|
|
|
861754
862218
|
logEvent("tengu_update_check", {});
|
|
861755
862219
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
861756
862220
|
const result = await checkUpgradeStatus({
|
|
861757
|
-
currentVersion: "1.84.
|
|
862221
|
+
currentVersion: "1.84.5",
|
|
861758
862222
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
861759
862223
|
installationType: diagnostic2.installationType,
|
|
861760
862224
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -863082,7 +863546,7 @@ ${customInstructions}` : customInstructions;
|
|
|
863082
863546
|
}
|
|
863083
863547
|
}
|
|
863084
863548
|
logForDiagnosticsNoPII("info", "started", {
|
|
863085
|
-
version: "1.84.
|
|
863549
|
+
version: "1.84.5",
|
|
863086
863550
|
is_native_binary: isInBundledMode()
|
|
863087
863551
|
});
|
|
863088
863552
|
registerCleanup(async () => {
|
|
@@ -863869,7 +864333,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
863869
864333
|
pendingHookMessages
|
|
863870
864334
|
}, renderAndRun);
|
|
863871
864335
|
}
|
|
863872
|
-
}).version("1.84.
|
|
864336
|
+
}).version("1.84.5 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
863873
864337
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
863874
864338
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
863875
864339
|
if (canUserConfigureAdvisor()) {
|
|
@@ -864996,7 +865460,7 @@ if (false) {}
|
|
|
864996
865460
|
async function main2() {
|
|
864997
865461
|
const args = process.argv.slice(2);
|
|
864998
865462
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
864999
|
-
console.log(`${"1.84.
|
|
865463
|
+
console.log(`${"1.84.5"} (UR-Nexus)`);
|
|
865000
865464
|
return;
|
|
865001
865465
|
}
|
|
865002
865466
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|