ur-agent 1.27.3 → 1.27.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 +10 -0
- package/README.md +11 -6
- package/dist/cli.js +746 -384
- package/docs/CONFIGURATION.md +7 -1
- package/docs/USAGE.md +5 -0
- package/docs/providers.md +27 -28
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -52895,44 +52895,6 @@ async function listOllamaModelNames(signal) {
|
|
|
52895
52895
|
setCachedOllamaModelNames(names);
|
|
52896
52896
|
return names;
|
|
52897
52897
|
}
|
|
52898
|
-
async function getOllamaModelOptions(signal) {
|
|
52899
|
-
const names = await listOllamaModelNames(signal);
|
|
52900
|
-
await Promise.allSettled(names.filter((name) => getOllamaContextLengthForModel(name) === undefined).map((name) => refreshOllamaModelMetadata(name, { timeoutMs: 500 })));
|
|
52901
|
-
const { coder, fast } = categorizeOllamaModels(names);
|
|
52902
|
-
const coderSet = new Set(coder);
|
|
52903
|
-
const fastSet = new Set(fast);
|
|
52904
|
-
return names.map((name) => ({
|
|
52905
|
-
value: name,
|
|
52906
|
-
label: name,
|
|
52907
|
-
description: describeOllamaModel(name, coderSet, fastSet)
|
|
52908
|
-
}));
|
|
52909
|
-
}
|
|
52910
|
-
function describeOllamaModel(name, coderSet, fastSet) {
|
|
52911
|
-
const tags = [];
|
|
52912
|
-
if (coderSet.has(name))
|
|
52913
|
-
tags.push("coder");
|
|
52914
|
-
else if (fastSet.has(name))
|
|
52915
|
-
tags.push("fast");
|
|
52916
|
-
const contextLength = getOllamaContextLengthForModel(name);
|
|
52917
|
-
if (contextLength && contextLength > 0) {
|
|
52918
|
-
tags.push(`${formatContextWindow(contextLength)} ctx`);
|
|
52919
|
-
}
|
|
52920
|
-
return tags.length > 0 ? `Installed \xB7 ${tags.join(" \xB7 ")}` : "Installed Ollama model";
|
|
52921
|
-
}
|
|
52922
|
-
function formatContextWindow(contextLength) {
|
|
52923
|
-
return contextLength >= 1024 ? `${Math.round(contextLength / 1024)}K` : String(contextLength);
|
|
52924
|
-
}
|
|
52925
|
-
function mergeModelOptions(baseOptions, extraOptions) {
|
|
52926
|
-
const result = [...baseOptions];
|
|
52927
|
-
const seen = new Set(result.map((option) => option.value));
|
|
52928
|
-
for (const option of extraOptions) {
|
|
52929
|
-
if (!seen.has(option.value)) {
|
|
52930
|
-
result.push(option);
|
|
52931
|
-
seen.add(option.value);
|
|
52932
|
-
}
|
|
52933
|
-
}
|
|
52934
|
-
return result;
|
|
52935
|
-
}
|
|
52936
52898
|
async function refreshOllamaModelMetadata(model, options = {}) {
|
|
52937
52899
|
const normalizedModel = model.trim();
|
|
52938
52900
|
if (!normalizedModel) {
|
|
@@ -53510,27 +53472,37 @@ var init_model = __esm(() => {
|
|
|
53510
53472
|
// src/services/providers/providerRegistry.ts
|
|
53511
53473
|
var exports_providerRegistry = {};
|
|
53512
53474
|
__export(exports_providerRegistry, {
|
|
53475
|
+
validateProviderModelPair: () => validateProviderModelPair,
|
|
53513
53476
|
validateProviderModelCompatibility: () => validateProviderModelCompatibility,
|
|
53514
53477
|
setSafeProviderConfig: () => setSafeProviderConfig,
|
|
53478
|
+
setProviderModel: () => setProviderModel,
|
|
53515
53479
|
resolveProviderId: () => resolveProviderId,
|
|
53516
53480
|
providerForAuthAlias: () => providerForAuthAlias,
|
|
53517
53481
|
providerAliasesFor: () => providerAliasesFor,
|
|
53518
53482
|
listProviders: () => listProviders,
|
|
53483
|
+
listModelsForProviderWithSource: () => listModelsForProviderWithSource,
|
|
53519
53484
|
listModelsForProvider: () => listModelsForProvider,
|
|
53520
53485
|
launchProviderAuth: () => launchProviderAuth,
|
|
53521
53486
|
isProviderId: () => isProviderId,
|
|
53522
53487
|
isModelSupportedByProvider: () => isModelSupportedByProvider,
|
|
53523
53488
|
getValidModelIdsForProvider: () => getValidModelIdsForProvider,
|
|
53489
|
+
getProviderStatus: () => getProviderStatus,
|
|
53524
53490
|
getProviderRuntimeInfo: () => getProviderRuntimeInfo,
|
|
53525
53491
|
getProviderDefinition: () => getProviderDefinition,
|
|
53492
|
+
getProviderAccessTypeLabel: () => getProviderAccessTypeLabel,
|
|
53526
53493
|
getDefaultModelForProvider: () => getDefaultModelForProvider,
|
|
53494
|
+
getConnectionStatusFromDoctorResult: () => getConnectionStatusFromDoctorResult,
|
|
53527
53495
|
getActiveProviderSettings: () => getActiveProviderSettings,
|
|
53496
|
+
formatProviderStatusLabel: () => formatProviderStatusLabel,
|
|
53528
53497
|
formatProviderStatus: () => formatProviderStatus,
|
|
53529
53498
|
formatProviderList: () => formatProviderList,
|
|
53530
53499
|
formatProviderDoctor: () => formatProviderDoctor,
|
|
53500
|
+
formatInvalidProviderModelMessage: () => formatInvalidProviderModelMessage,
|
|
53531
53501
|
doctorProvider: () => doctorProvider,
|
|
53532
53502
|
doctorActiveProvider: () => doctorActiveProvider,
|
|
53503
|
+
credentialTypeLabel: () => credentialTypeLabel,
|
|
53533
53504
|
classifyGeminiAccountSupport: () => classifyGeminiAccountSupport,
|
|
53505
|
+
cacheProviderModelsForProvider: () => cacheProviderModelsForProvider,
|
|
53534
53506
|
buildProviderAuthCommand: () => buildProviderAuthCommand,
|
|
53535
53507
|
authModeLabel: () => authModeLabel,
|
|
53536
53508
|
authAliasForProvider: () => authAliasForProvider,
|
|
@@ -53577,6 +53549,9 @@ function getProviderRuntimeInfo(settings = getInitialSettings()) {
|
|
|
53577
53549
|
return {
|
|
53578
53550
|
provider,
|
|
53579
53551
|
providerLabel: definition.statusBarName,
|
|
53552
|
+
accessType: definition.accessType,
|
|
53553
|
+
accessTypeLabel: getProviderAccessTypeLabel(definition),
|
|
53554
|
+
credentialType: definition.credentialType,
|
|
53580
53555
|
authMode: definition.authMode,
|
|
53581
53556
|
authLabel: authModeLabel(definition.authMode),
|
|
53582
53557
|
model: providerSettings.model,
|
|
@@ -53598,6 +53573,21 @@ function authModeLabel(mode) {
|
|
|
53598
53573
|
return "local";
|
|
53599
53574
|
}
|
|
53600
53575
|
}
|
|
53576
|
+
function getProviderAccessTypeLabel(provider) {
|
|
53577
|
+
return provider.accessTypeLabel ?? provider.accessType;
|
|
53578
|
+
}
|
|
53579
|
+
function credentialTypeLabel(type) {
|
|
53580
|
+
switch (type) {
|
|
53581
|
+
case "cli-login":
|
|
53582
|
+
return "subscription login";
|
|
53583
|
+
case "api-key":
|
|
53584
|
+
return "API key";
|
|
53585
|
+
case "local-runtime":
|
|
53586
|
+
return "local runtime";
|
|
53587
|
+
case "openai-compatible-endpoint":
|
|
53588
|
+
return "OpenAI-compatible endpoint";
|
|
53589
|
+
}
|
|
53590
|
+
}
|
|
53601
53591
|
function listProviders() {
|
|
53602
53592
|
return PROVIDER_IDS.map((id) => PROVIDERS[id]);
|
|
53603
53593
|
}
|
|
@@ -53637,6 +53627,7 @@ function setSafeProviderConfig(key, value) {
|
|
|
53637
53627
|
};
|
|
53638
53628
|
}
|
|
53639
53629
|
let settings;
|
|
53630
|
+
let providerModelInvalidated = false;
|
|
53640
53631
|
try {
|
|
53641
53632
|
if (key === "provider") {
|
|
53642
53633
|
const provider = resolveProviderId(trimmed);
|
|
@@ -53646,7 +53637,22 @@ function setSafeProviderConfig(key, value) {
|
|
|
53646
53637
|
message: `Unknown provider "${trimmed}". Run: ur provider list`
|
|
53647
53638
|
};
|
|
53648
53639
|
}
|
|
53649
|
-
|
|
53640
|
+
const currentSettings = getInitialSettings();
|
|
53641
|
+
const currentModel = getActiveProviderSettings(currentSettings).model;
|
|
53642
|
+
const nextProviderSettings = { active: provider };
|
|
53643
|
+
let invalidated = false;
|
|
53644
|
+
if (currentModel) {
|
|
53645
|
+
const validation = validateProviderModelPair(provider, currentModel);
|
|
53646
|
+
if (validation.valid === false) {
|
|
53647
|
+
nextProviderSettings.model = undefined;
|
|
53648
|
+
invalidated = true;
|
|
53649
|
+
providerModelInvalidated = true;
|
|
53650
|
+
}
|
|
53651
|
+
}
|
|
53652
|
+
settings = {
|
|
53653
|
+
provider: nextProviderSettings,
|
|
53654
|
+
...invalidated ? { model: undefined } : {}
|
|
53655
|
+
};
|
|
53650
53656
|
} else if (key === "provider.fallback") {
|
|
53651
53657
|
const fallback = trimmed === "disabled" ? "disabled" : resolveProviderId(trimmed);
|
|
53652
53658
|
if (!fallback) {
|
|
@@ -53661,13 +53667,11 @@ function setSafeProviderConfig(key, value) {
|
|
|
53661
53667
|
} else if (key === "model") {
|
|
53662
53668
|
const currentSettings = getInitialSettings();
|
|
53663
53669
|
const currentProvider = getActiveProviderSettings(currentSettings).active ?? "ollama";
|
|
53664
|
-
const validation =
|
|
53670
|
+
const validation = validateProviderModelPair(currentProvider, trimmed);
|
|
53665
53671
|
if (validation.valid === false) {
|
|
53666
|
-
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
53667
|
-
const suggestedModel = validation.suggestedModel ?? "see provider docs";
|
|
53668
53672
|
return {
|
|
53669
53673
|
ok: false,
|
|
53670
|
-
message:
|
|
53674
|
+
message: validation.error
|
|
53671
53675
|
};
|
|
53672
53676
|
}
|
|
53673
53677
|
settings = { provider: { model: trimmed }, model: trimmed };
|
|
@@ -53688,7 +53692,10 @@ function setSafeProviderConfig(key, value) {
|
|
|
53688
53692
|
};
|
|
53689
53693
|
}
|
|
53690
53694
|
const savedValue = key === "provider" || key === "provider.fallback" ? key === "provider.fallback" && trimmed === "disabled" ? "disabled" : resolveProviderId(trimmed) ?? trimmed : trimmed;
|
|
53691
|
-
return {
|
|
53695
|
+
return {
|
|
53696
|
+
ok: true,
|
|
53697
|
+
message: `Set ${key} to ${savedValue}.${providerModelInvalidated ? " Cleared incompatible model for the new provider; run /model to choose a scoped model." : ""}`
|
|
53698
|
+
};
|
|
53692
53699
|
}
|
|
53693
53700
|
function outputText(result) {
|
|
53694
53701
|
return `${result.stdout}
|
|
@@ -53749,7 +53756,7 @@ function isLocalBaseUrl(value) {
|
|
|
53749
53756
|
async function checkEndpoint(definition, settings, adapters, result) {
|
|
53750
53757
|
if (!definition.endpointKind)
|
|
53751
53758
|
return;
|
|
53752
|
-
const baseUrl = settings.baseUrl ?? definition.defaultBaseUrl;
|
|
53759
|
+
const baseUrl = settings.baseUrl ?? (definition.id === "ollama" ? getOllamaBaseUrl() : definition.defaultBaseUrl);
|
|
53753
53760
|
if (!baseUrl) {
|
|
53754
53761
|
result.checks.push({
|
|
53755
53762
|
name: "base_url",
|
|
@@ -53956,7 +53963,7 @@ async function doctorProvider(provider, options = {}) {
|
|
|
53956
53963
|
await checkSubscriptionProvider(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53957
53964
|
} else if (definition.accessType === "api") {
|
|
53958
53965
|
await checkApiProvider(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53959
|
-
} else {
|
|
53966
|
+
} else if (definition.accessType === "local" || definition.accessType === "server") {
|
|
53960
53967
|
await checkEndpoint(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53961
53968
|
}
|
|
53962
53969
|
result.fallback = fallbackResult(providerSettings, active, result.ok);
|
|
@@ -53967,6 +53974,67 @@ async function doctorActiveProvider(options = {}) {
|
|
|
53967
53974
|
const active = getActiveProviderSettings(settings).active ?? "ollama";
|
|
53968
53975
|
return doctorProvider(active, options);
|
|
53969
53976
|
}
|
|
53977
|
+
function getConnectionStatusFromDoctorResult(result) {
|
|
53978
|
+
if (result.ok) {
|
|
53979
|
+
return "connected";
|
|
53980
|
+
}
|
|
53981
|
+
if (result.failureReason?.includes("CLI missing") || result.failureReason?.includes("not found")) {
|
|
53982
|
+
return "missing";
|
|
53983
|
+
}
|
|
53984
|
+
if (result.failureReason?.includes("not logged in") || result.failureReason?.includes("not authenticated") || result.failureReason?.includes("API key missing") || result.failureReason?.includes("endpoint") || result.failureReason?.includes("HTTP")) {
|
|
53985
|
+
return "unavailable";
|
|
53986
|
+
}
|
|
53987
|
+
return "unknown";
|
|
53988
|
+
}
|
|
53989
|
+
function formatProviderStatusLabel(status, provider, checks3) {
|
|
53990
|
+
switch (status) {
|
|
53991
|
+
case "connected":
|
|
53992
|
+
if (provider.credentialType === "api-key" && provider.envKey) {
|
|
53993
|
+
return `${provider.envKey} found`;
|
|
53994
|
+
}
|
|
53995
|
+
if (provider.id === "ollama") {
|
|
53996
|
+
return "localhost reachable";
|
|
53997
|
+
}
|
|
53998
|
+
if (provider.credentialType === "openai-compatible-endpoint") {
|
|
53999
|
+
return "OpenAI-compatible endpoint reachable";
|
|
54000
|
+
}
|
|
54001
|
+
if (provider.credentialType === "cli-login") {
|
|
54002
|
+
return "subscription login connected";
|
|
54003
|
+
}
|
|
54004
|
+
return "connected";
|
|
54005
|
+
case "missing":
|
|
54006
|
+
if (provider.commandCandidates) {
|
|
54007
|
+
return `CLI not found (tried: ${provider.commandCandidates.join(", ")})`;
|
|
54008
|
+
}
|
|
54009
|
+
return "missing";
|
|
54010
|
+
case "unavailable": {
|
|
54011
|
+
const failCheck = checks3.find((check3) => check3.status === "fail" || check3.status === "warn");
|
|
54012
|
+
return failCheck?.message ?? "unavailable";
|
|
54013
|
+
}
|
|
54014
|
+
case "unknown":
|
|
54015
|
+
return "status unknown";
|
|
54016
|
+
}
|
|
54017
|
+
}
|
|
54018
|
+
async function getProviderStatus(providerId, options = {}) {
|
|
54019
|
+
const provider = resolveProviderId(providerId);
|
|
54020
|
+
if (!provider) {
|
|
54021
|
+
throw new Error(`Unknown provider "${providerId}". Run: ur provider list`);
|
|
54022
|
+
}
|
|
54023
|
+
const definition = getProviderDefinition(provider);
|
|
54024
|
+
const doctor = await doctorProvider(provider, options);
|
|
54025
|
+
const status = getConnectionStatusFromDoctorResult(doctor);
|
|
54026
|
+
return {
|
|
54027
|
+
provider,
|
|
54028
|
+
displayName: definition.displayName,
|
|
54029
|
+
accessType: definition.accessType,
|
|
54030
|
+
accessTypeLabel: getProviderAccessTypeLabel(definition),
|
|
54031
|
+
credentialType: definition.credentialType,
|
|
54032
|
+
status,
|
|
54033
|
+
label: formatProviderStatusLabel(status, definition, doctor.checks),
|
|
54034
|
+
checks: doctor.checks,
|
|
54035
|
+
doctor
|
|
54036
|
+
};
|
|
54037
|
+
}
|
|
53970
54038
|
function authAliasForProvider(provider) {
|
|
53971
54039
|
switch (provider) {
|
|
53972
54040
|
case "codex-cli":
|
|
@@ -54074,16 +54142,20 @@ function formatProviderList(json2 = false) {
|
|
|
54074
54142
|
name: provider.displayName,
|
|
54075
54143
|
aliases: providerAliasesFor(provider.id),
|
|
54076
54144
|
accessType: provider.accessType,
|
|
54145
|
+
accessTypeLabel: getProviderAccessTypeLabel(provider),
|
|
54146
|
+
credentialType: provider.credentialType,
|
|
54147
|
+
modelDiscoveryType: provider.modelDiscoveryType,
|
|
54077
54148
|
authMode: provider.authMode,
|
|
54149
|
+
accessPath: provider.accessPathLabel,
|
|
54078
54150
|
legalPath: provider.legalPath
|
|
54079
54151
|
}));
|
|
54080
54152
|
if (json2) {
|
|
54081
54153
|
return JSON.stringify(providers, null, 2);
|
|
54082
54154
|
}
|
|
54083
54155
|
return [
|
|
54084
|
-
"Provider | ID | Aliases | Access type |
|
|
54085
|
-
"--- | --- | --- | --- | ---",
|
|
54086
|
-
...providers.map((provider) => `${provider.name} | ${provider.id} | ${provider.aliases.slice(0, 3).join(", ") || "-"} | ${provider.
|
|
54156
|
+
"Provider | ID | Aliases | Access type | Credential | Model discovery | Access path",
|
|
54157
|
+
"--- | --- | --- | --- | --- | --- | ---",
|
|
54158
|
+
...providers.map((provider) => `${provider.name} | ${provider.id} | ${provider.aliases.slice(0, 3).join(", ") || "-"} | ${provider.accessTypeLabel} | ${provider.credentialType} | ${provider.modelDiscoveryType} | ${provider.accessPath}`)
|
|
54087
54159
|
].join(`
|
|
54088
54160
|
`);
|
|
54089
54161
|
}
|
|
@@ -54093,6 +54165,8 @@ function formatProviderDoctor(result, json2 = false) {
|
|
|
54093
54165
|
}
|
|
54094
54166
|
const lines = [
|
|
54095
54167
|
`Provider: ${result.displayName} (${result.provider})`,
|
|
54168
|
+
`Access: ${getProviderAccessTypeLabel(getProviderDefinition(result.provider))}`,
|
|
54169
|
+
`Credential: ${getProviderDefinition(result.provider).credentialType}`,
|
|
54096
54170
|
`Auth: ${authModeLabel(result.authMode)}`,
|
|
54097
54171
|
`Status: ${result.ok ? "ready" : "not ready"}`
|
|
54098
54172
|
];
|
|
@@ -54119,31 +54193,191 @@ function formatProviderStatus(result, json2 = false) {
|
|
|
54119
54193
|
Failure reason: ${result.failureReason}` : "";
|
|
54120
54194
|
const fix = result.suggestedFix ? `
|
|
54121
54195
|
Suggested fix: ${result.suggestedFix}` : "";
|
|
54196
|
+
const definition = getProviderDefinition(result.provider);
|
|
54122
54197
|
return `Selected provider: ${result.displayName} (${result.provider})
|
|
54198
|
+
Access type: ${getProviderAccessTypeLabel(definition)}
|
|
54199
|
+
Credential: ${definition.credentialType}
|
|
54123
54200
|
Auth mode: ${authModeLabel(result.authMode)}
|
|
54124
54201
|
Ready: ${result.ok ? "yes" : "no"}${failure}${fix}`;
|
|
54125
54202
|
}
|
|
54126
|
-
function
|
|
54203
|
+
function providerBaseUrl(provider, definition, settings) {
|
|
54204
|
+
const providerSettings = getActiveProviderSettings(settings);
|
|
54205
|
+
if (providerSettings.baseUrl) {
|
|
54206
|
+
return providerSettings.baseUrl;
|
|
54207
|
+
}
|
|
54208
|
+
if (provider === "ollama") {
|
|
54209
|
+
return getOllamaBaseUrl(process.env, settings);
|
|
54210
|
+
}
|
|
54211
|
+
return definition.defaultBaseUrl;
|
|
54212
|
+
}
|
|
54213
|
+
function parseOpenAICompatibleModelNames(value) {
|
|
54214
|
+
if (!value || typeof value !== "object") {
|
|
54215
|
+
return [];
|
|
54216
|
+
}
|
|
54217
|
+
const data = value.data ?? value.models;
|
|
54218
|
+
if (!Array.isArray(data)) {
|
|
54219
|
+
return [];
|
|
54220
|
+
}
|
|
54221
|
+
const names = data.flatMap((model) => {
|
|
54222
|
+
if (typeof model === "string") {
|
|
54223
|
+
const trimmed2 = model.trim();
|
|
54224
|
+
return trimmed2 ? [trimmed2] : [];
|
|
54225
|
+
}
|
|
54226
|
+
if (!model || typeof model !== "object") {
|
|
54227
|
+
return [];
|
|
54228
|
+
}
|
|
54229
|
+
const entry = model;
|
|
54230
|
+
const name = entry.id ?? entry.name ?? entry.model;
|
|
54231
|
+
if (typeof name !== "string") {
|
|
54232
|
+
return [];
|
|
54233
|
+
}
|
|
54234
|
+
const trimmed = name.trim();
|
|
54235
|
+
return trimmed ? [trimmed] : [];
|
|
54236
|
+
});
|
|
54237
|
+
return [...new Set(names)].sort((a2, b) => a2.localeCompare(b));
|
|
54238
|
+
}
|
|
54239
|
+
function parseOllamaModelNamesFromTags(value) {
|
|
54240
|
+
if (!value || typeof value !== "object" || !("models" in value)) {
|
|
54241
|
+
return [];
|
|
54242
|
+
}
|
|
54243
|
+
const models = value.models;
|
|
54244
|
+
if (!Array.isArray(models)) {
|
|
54245
|
+
return [];
|
|
54246
|
+
}
|
|
54247
|
+
const names = models.flatMap((model) => {
|
|
54248
|
+
if (!model || typeof model !== "object") {
|
|
54249
|
+
return [];
|
|
54250
|
+
}
|
|
54251
|
+
const entry = model;
|
|
54252
|
+
const name = entry.name ?? entry.model;
|
|
54253
|
+
if (typeof name !== "string") {
|
|
54254
|
+
return [];
|
|
54255
|
+
}
|
|
54256
|
+
const trimmed = name.trim();
|
|
54257
|
+
return trimmed ? [trimmed] : [];
|
|
54258
|
+
});
|
|
54259
|
+
return [...new Set(names)].sort((a2, b) => a2.localeCompare(b));
|
|
54260
|
+
}
|
|
54261
|
+
function modelDefinitionsFromNames(provider, names, source) {
|
|
54262
|
+
const providerName = getProviderDefinition(provider).displayName;
|
|
54263
|
+
return names.map((name) => ({
|
|
54264
|
+
id: name,
|
|
54265
|
+
displayName: name,
|
|
54266
|
+
description: source === "cache" ? `Cached ${providerName} model` : `Discovered from ${providerName}`
|
|
54267
|
+
}));
|
|
54268
|
+
}
|
|
54269
|
+
function getCachedProviderModels(provider) {
|
|
54270
|
+
return cachedModelsByProvider.get(provider) ?? [];
|
|
54271
|
+
}
|
|
54272
|
+
function cacheProviderModelsForProvider(providerId, models) {
|
|
54127
54273
|
const provider = resolveProviderId(providerId);
|
|
54128
54274
|
if (!provider) {
|
|
54275
|
+
return;
|
|
54276
|
+
}
|
|
54277
|
+
const definitions = typeof models[0] === "string" ? modelDefinitionsFromNames(provider, models, "cache") : models;
|
|
54278
|
+
if (definitions.length > 0) {
|
|
54279
|
+
cachedModelsByProvider.set(provider, definitions);
|
|
54280
|
+
}
|
|
54281
|
+
}
|
|
54282
|
+
function staticModelsForProvider(provider) {
|
|
54283
|
+
return (PROVIDER_MODELS[provider] ?? []).filter((model) => !model.isDynamic);
|
|
54284
|
+
}
|
|
54285
|
+
async function discoverLiveModelsForProvider(provider, options = {}) {
|
|
54286
|
+
const definition = getProviderDefinition(provider);
|
|
54287
|
+
if (!definition.endpointKind) {
|
|
54129
54288
|
return [];
|
|
54130
54289
|
}
|
|
54131
|
-
|
|
54290
|
+
const settings = options.settings ?? getInitialSettings();
|
|
54291
|
+
const baseUrl = providerBaseUrl(provider, definition, settings);
|
|
54292
|
+
if (!baseUrl) {
|
|
54293
|
+
throw new Error(`No base_url configured for provider "${provider}".`);
|
|
54294
|
+
}
|
|
54295
|
+
const url3 = endpointUrl(baseUrl, definition.endpointKind);
|
|
54296
|
+
const env4 = options.adapters?.env ?? process.env;
|
|
54297
|
+
const response = await (options.adapters?.fetch ?? fetch)(url3, {
|
|
54298
|
+
method: "GET",
|
|
54299
|
+
signal: options.signal,
|
|
54300
|
+
headers: definition.accessType === "api" && definition.envKey && env4[definition.envKey] ? { Authorization: `Bearer ${env4[definition.envKey]}` } : undefined
|
|
54301
|
+
});
|
|
54302
|
+
if (!response.ok) {
|
|
54303
|
+
throw new Error(`${url3} returned HTTP ${response.status}.`);
|
|
54304
|
+
}
|
|
54305
|
+
const body = await response.json();
|
|
54306
|
+
const names = definition.endpointKind === "ollama" ? parseOllamaModelNamesFromTags(body) : parseOpenAICompatibleModelNames(body);
|
|
54307
|
+
return modelDefinitionsFromNames(provider, names, "live");
|
|
54132
54308
|
}
|
|
54133
|
-
function
|
|
54309
|
+
async function listModelsForProviderWithSource(providerId, options = {}) {
|
|
54134
54310
|
const provider = resolveProviderId(providerId);
|
|
54135
54311
|
if (!provider) {
|
|
54136
|
-
return
|
|
54312
|
+
return {
|
|
54313
|
+
provider: "ollama",
|
|
54314
|
+
models: [],
|
|
54315
|
+
source: "static",
|
|
54316
|
+
warning: `Unknown provider "${providerId}". Run: ur provider list`
|
|
54317
|
+
};
|
|
54137
54318
|
}
|
|
54138
|
-
const
|
|
54139
|
-
if (
|
|
54140
|
-
return
|
|
54319
|
+
const definition = getProviderDefinition(provider);
|
|
54320
|
+
if (definition.modelDiscoveryType === "static") {
|
|
54321
|
+
return {
|
|
54322
|
+
provider,
|
|
54323
|
+
models: staticModelsForProvider(provider),
|
|
54324
|
+
source: "static"
|
|
54325
|
+
};
|
|
54141
54326
|
}
|
|
54142
|
-
|
|
54143
|
-
|
|
54144
|
-
|
|
54327
|
+
try {
|
|
54328
|
+
const liveModels = await discoverLiveModelsForProvider(provider, options);
|
|
54329
|
+
if (liveModels.length > 0) {
|
|
54330
|
+
cachedModelsByProvider.set(provider, liveModels);
|
|
54331
|
+
return {
|
|
54332
|
+
provider,
|
|
54333
|
+
models: liveModels,
|
|
54334
|
+
source: "live"
|
|
54335
|
+
};
|
|
54336
|
+
}
|
|
54337
|
+
const cachedModels = getCachedProviderModels(provider);
|
|
54338
|
+
if (cachedModels.length > 0) {
|
|
54339
|
+
return {
|
|
54340
|
+
provider,
|
|
54341
|
+
models: cachedModels,
|
|
54342
|
+
source: "cache",
|
|
54343
|
+
warning: `Live model discovery for "${provider}" returned no models. Showing cached ${provider} models only.`
|
|
54344
|
+
};
|
|
54345
|
+
}
|
|
54346
|
+
const staticModels = staticModelsForProvider(provider);
|
|
54347
|
+
return {
|
|
54348
|
+
provider,
|
|
54349
|
+
models: staticModels,
|
|
54350
|
+
source: staticModels.length > 0 ? "static" : "live",
|
|
54351
|
+
warning: `Live model discovery for "${provider}" returned no models.`
|
|
54352
|
+
};
|
|
54353
|
+
} catch (error40) {
|
|
54354
|
+
const cachedModels = getCachedProviderModels(provider);
|
|
54355
|
+
if (cachedModels.length > 0) {
|
|
54356
|
+
return {
|
|
54357
|
+
provider,
|
|
54358
|
+
models: cachedModels,
|
|
54359
|
+
source: "cache",
|
|
54360
|
+
warning: `Live model discovery for "${provider}" failed: ${error40 instanceof Error ? error40.message : String(error40)}. Showing cached ${provider} models only.`
|
|
54361
|
+
};
|
|
54362
|
+
}
|
|
54363
|
+
const staticModels = staticModelsForProvider(provider);
|
|
54364
|
+
return {
|
|
54365
|
+
provider,
|
|
54366
|
+
models: staticModels,
|
|
54367
|
+
source: staticModels.length > 0 ? "static" : "live",
|
|
54368
|
+
warning: `Live model discovery for "${provider}" failed: ${error40 instanceof Error ? error40.message : String(error40)}.`
|
|
54369
|
+
};
|
|
54370
|
+
}
|
|
54371
|
+
}
|
|
54372
|
+
function listModelsForProvider(providerId) {
|
|
54373
|
+
const provider = resolveProviderId(providerId);
|
|
54374
|
+
if (!provider) {
|
|
54375
|
+
return [];
|
|
54145
54376
|
}
|
|
54146
|
-
return
|
|
54377
|
+
return PROVIDER_MODELS[provider] ?? [];
|
|
54378
|
+
}
|
|
54379
|
+
function isModelSupportedByProvider(providerId, modelId) {
|
|
54380
|
+
return validateProviderModelPair(providerId, modelId).valid;
|
|
54147
54381
|
}
|
|
54148
54382
|
function getDefaultModelForProvider(providerId) {
|
|
54149
54383
|
const provider = resolveProviderId(providerId);
|
|
@@ -54154,14 +54388,27 @@ function getDefaultModelForProvider(providerId) {
|
|
|
54154
54388
|
if (!models) {
|
|
54155
54389
|
return;
|
|
54156
54390
|
}
|
|
54157
|
-
const defaultModel = models.find((m) => m.isDefault);
|
|
54391
|
+
const defaultModel = models.find((m) => m.isDefault && !m.isDynamic) ?? models.find((m) => !m.isDynamic);
|
|
54158
54392
|
return defaultModel?.id;
|
|
54159
54393
|
}
|
|
54160
54394
|
function getValidModelIdsForProvider(providerId) {
|
|
54161
|
-
const
|
|
54162
|
-
|
|
54395
|
+
const provider = resolveProviderId(providerId);
|
|
54396
|
+
if (!provider) {
|
|
54397
|
+
return [];
|
|
54398
|
+
}
|
|
54399
|
+
const cached2 = getCachedProviderModels(provider);
|
|
54400
|
+
if (cached2.length > 0) {
|
|
54401
|
+
return cached2.map((model) => model.id);
|
|
54402
|
+
}
|
|
54403
|
+
return staticModelsForProvider(provider).map((model) => model.id);
|
|
54404
|
+
}
|
|
54405
|
+
function formatInvalidProviderModelMessage(providerId, modelId, validModels, suggestedModel) {
|
|
54406
|
+
const provider = resolveProviderId(providerId) ?? String(providerId);
|
|
54407
|
+
const validList = validModels.length > 0 ? validModels.join(", ") : "(no models discovered)";
|
|
54408
|
+
const suggested = suggestedModel ?? validModels[0] ?? "<valid-model>";
|
|
54409
|
+
return `Model "${modelId}" is not available for provider "${provider}". Valid models for ${provider}: ${validList}. Run /model and choose a model from ${provider}, or run: ur config set model ${suggested}`;
|
|
54163
54410
|
}
|
|
54164
|
-
function
|
|
54411
|
+
function validateProviderModelPair(providerId, modelId, options = {}) {
|
|
54165
54412
|
const provider = resolveProviderId(providerId);
|
|
54166
54413
|
if (!provider) {
|
|
54167
54414
|
return {
|
|
@@ -54178,26 +54425,66 @@ function validateProviderModelCompatibility(providerId, modelId) {
|
|
|
54178
54425
|
validModels: []
|
|
54179
54426
|
};
|
|
54180
54427
|
}
|
|
54181
|
-
const
|
|
54182
|
-
|
|
54428
|
+
const suppliedModels = (options.availableModels ?? []).map((model) => typeof model === "string" ? model : model.id);
|
|
54429
|
+
const cachedModels = getCachedProviderModels(provider).map((model) => model.id);
|
|
54430
|
+
const staticModelIds = staticModelsForProvider(provider).map((model) => model.id);
|
|
54431
|
+
const validModelIds = suppliedModels.length > 0 ? suppliedModels : cachedModels.length > 0 ? cachedModels : staticModelIds;
|
|
54432
|
+
if (validModelIds.includes(modelId)) {
|
|
54183
54433
|
return { valid: true };
|
|
54184
54434
|
}
|
|
54185
|
-
|
|
54186
|
-
if (modelExists) {
|
|
54435
|
+
if (models.some((m) => m.isDynamic) && options.allowUncachedDynamic && validModelIds.length === 0) {
|
|
54187
54436
|
return { valid: true };
|
|
54188
54437
|
}
|
|
54189
|
-
const validModelIds = getValidModelIdsForProvider(provider);
|
|
54190
54438
|
const defaultModel = getDefaultModelForProvider(provider);
|
|
54191
54439
|
return {
|
|
54192
54440
|
valid: false,
|
|
54193
|
-
error:
|
|
54441
|
+
error: formatInvalidProviderModelMessage(provider, modelId, validModelIds, defaultModel),
|
|
54194
54442
|
validModels: validModelIds,
|
|
54195
54443
|
suggestedModel: defaultModel
|
|
54196
54444
|
};
|
|
54197
54445
|
}
|
|
54198
|
-
|
|
54446
|
+
function setProviderModel(providerId, modelId, options = {}) {
|
|
54447
|
+
const provider = resolveProviderId(providerId);
|
|
54448
|
+
if (!provider) {
|
|
54449
|
+
return {
|
|
54450
|
+
ok: false,
|
|
54451
|
+
message: `Unknown provider "${providerId}". Run: ur provider list`
|
|
54452
|
+
};
|
|
54453
|
+
}
|
|
54454
|
+
const validation = validateProviderModelPair(provider, modelId, {
|
|
54455
|
+
availableModels: options.availableModels
|
|
54456
|
+
});
|
|
54457
|
+
if (validation.valid === false) {
|
|
54458
|
+
return {
|
|
54459
|
+
ok: false,
|
|
54460
|
+
message: validation.error
|
|
54461
|
+
};
|
|
54462
|
+
}
|
|
54463
|
+
const result = updateSettingsForSource("userSettings", {
|
|
54464
|
+
provider: {
|
|
54465
|
+
active: provider,
|
|
54466
|
+
model: modelId
|
|
54467
|
+
},
|
|
54468
|
+
model: modelId
|
|
54469
|
+
});
|
|
54470
|
+
if (result.error) {
|
|
54471
|
+
return {
|
|
54472
|
+
ok: false,
|
|
54473
|
+
message: `Failed to write UR-AGENT settings: ${result.error.message}`
|
|
54474
|
+
};
|
|
54475
|
+
}
|
|
54476
|
+
return {
|
|
54477
|
+
ok: true,
|
|
54478
|
+
message: `Selected provider ${provider} (${getProviderAccessTypeLabel(getProviderDefinition(provider))}) with model ${modelId} (${options.modelSource ?? "static"}).`,
|
|
54479
|
+
provider,
|
|
54480
|
+
model: modelId,
|
|
54481
|
+
modelSource: options.modelSource ?? "static"
|
|
54482
|
+
};
|
|
54483
|
+
}
|
|
54484
|
+
var PROVIDER_IDS, LOCALHOST_RE, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_MODELS, cachedModelsByProvider, validateProviderModelCompatibility;
|
|
54199
54485
|
var init_providerRegistry = __esm(() => {
|
|
54200
54486
|
init_execFileNoThrow();
|
|
54487
|
+
init_ollamaConfig();
|
|
54201
54488
|
init_settings2();
|
|
54202
54489
|
init_which();
|
|
54203
54490
|
PROVIDER_IDS = [
|
|
@@ -54219,11 +54506,17 @@ var init_providerRegistry = __esm(() => {
|
|
|
54219
54506
|
PROVIDERS = {
|
|
54220
54507
|
"codex-cli": {
|
|
54221
54508
|
id: "codex-cli",
|
|
54222
|
-
displayName: "
|
|
54223
|
-
statusBarName: "
|
|
54509
|
+
displayName: "Codex CLI",
|
|
54510
|
+
statusBarName: "Codex CLI",
|
|
54224
54511
|
accessType: "subscription",
|
|
54512
|
+
credentialType: "cli-login",
|
|
54513
|
+
modelDiscoveryType: "static",
|
|
54514
|
+
statusCheck: "cli-login",
|
|
54515
|
+
listModels: "static",
|
|
54516
|
+
validateModel: "static-list",
|
|
54225
54517
|
authMode: "subscription",
|
|
54226
54518
|
legalPath: "official Codex CLI login",
|
|
54519
|
+
accessPathLabel: "subscription login via official Codex CLI",
|
|
54227
54520
|
commandCandidates: ["codex"],
|
|
54228
54521
|
versionArgs: ["--version"],
|
|
54229
54522
|
statusArgs: ["login", "status"],
|
|
@@ -54235,8 +54528,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54235
54528
|
displayName: "Claude Code",
|
|
54236
54529
|
statusBarName: "Claude Code",
|
|
54237
54530
|
accessType: "subscription",
|
|
54531
|
+
credentialType: "cli-login",
|
|
54532
|
+
modelDiscoveryType: "static",
|
|
54533
|
+
statusCheck: "cli-login",
|
|
54534
|
+
listModels: "static",
|
|
54535
|
+
validateModel: "static-list",
|
|
54238
54536
|
authMode: "subscription",
|
|
54239
54537
|
legalPath: "official Claude Code CLI login",
|
|
54538
|
+
accessPathLabel: "subscription login via official Claude Code CLI",
|
|
54240
54539
|
commandCandidates: ["claude"],
|
|
54241
54540
|
versionArgs: ["--version"],
|
|
54242
54541
|
statusArgs: ["auth", "status"],
|
|
@@ -54247,8 +54546,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54247
54546
|
displayName: "Gemini CLI",
|
|
54248
54547
|
statusBarName: "Gemini CLI",
|
|
54249
54548
|
accessType: "subscription",
|
|
54549
|
+
credentialType: "cli-login",
|
|
54550
|
+
modelDiscoveryType: "static",
|
|
54551
|
+
statusCheck: "cli-login",
|
|
54552
|
+
listModels: "static",
|
|
54553
|
+
validateModel: "static-list",
|
|
54250
54554
|
authMode: "enterprise-login",
|
|
54251
54555
|
legalPath: "official Gemini Code Assist login",
|
|
54556
|
+
accessPathLabel: "subscription login via official Gemini CLI",
|
|
54252
54557
|
commandCandidates: ["gemini"],
|
|
54253
54558
|
versionArgs: ["--version"],
|
|
54254
54559
|
loginArgs: [],
|
|
@@ -54259,8 +54564,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54259
54564
|
displayName: "Antigravity",
|
|
54260
54565
|
statusBarName: "Antigravity",
|
|
54261
54566
|
accessType: "subscription",
|
|
54567
|
+
credentialType: "cli-login",
|
|
54568
|
+
modelDiscoveryType: "static",
|
|
54569
|
+
statusCheck: "cli-login",
|
|
54570
|
+
listModels: "static",
|
|
54571
|
+
validateModel: "static-list",
|
|
54262
54572
|
authMode: "personal-login",
|
|
54263
54573
|
legalPath: "official Antigravity CLI login, where supported",
|
|
54574
|
+
accessPathLabel: "subscription login via official Antigravity CLI",
|
|
54264
54575
|
commandCandidates: ["agy", "antigravity", "google-antigravity", "ag"],
|
|
54265
54576
|
versionArgs: ["--version"],
|
|
54266
54577
|
loginArgs: []
|
|
@@ -54270,17 +54581,29 @@ var init_providerRegistry = __esm(() => {
|
|
|
54270
54581
|
displayName: "OpenAI API",
|
|
54271
54582
|
statusBarName: "OpenAI",
|
|
54272
54583
|
accessType: "api",
|
|
54584
|
+
credentialType: "api-key",
|
|
54585
|
+
modelDiscoveryType: "static",
|
|
54586
|
+
statusCheck: "api-key",
|
|
54587
|
+
listModels: "static",
|
|
54588
|
+
validateModel: "static-list",
|
|
54273
54589
|
authMode: "api",
|
|
54274
54590
|
legalPath: "OPENAI_API_KEY",
|
|
54591
|
+
accessPathLabel: "API key from OPENAI_API_KEY",
|
|
54275
54592
|
envKey: "OPENAI_API_KEY"
|
|
54276
54593
|
},
|
|
54277
54594
|
"anthropic-api": {
|
|
54278
54595
|
id: "anthropic-api",
|
|
54279
|
-
displayName: "
|
|
54280
|
-
statusBarName: "
|
|
54596
|
+
displayName: "Claude API",
|
|
54597
|
+
statusBarName: "Claude API",
|
|
54281
54598
|
accessType: "api",
|
|
54599
|
+
credentialType: "api-key",
|
|
54600
|
+
modelDiscoveryType: "static",
|
|
54601
|
+
statusCheck: "api-key",
|
|
54602
|
+
listModels: "static",
|
|
54603
|
+
validateModel: "static-list",
|
|
54282
54604
|
authMode: "api",
|
|
54283
54605
|
legalPath: "ANTHROPIC_API_KEY",
|
|
54606
|
+
accessPathLabel: "API key from ANTHROPIC_API_KEY",
|
|
54284
54607
|
envKey: "ANTHROPIC_API_KEY"
|
|
54285
54608
|
},
|
|
54286
54609
|
"gemini-api": {
|
|
@@ -54288,8 +54611,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54288
54611
|
displayName: "Gemini API",
|
|
54289
54612
|
statusBarName: "Gemini API",
|
|
54290
54613
|
accessType: "api",
|
|
54614
|
+
credentialType: "api-key",
|
|
54615
|
+
modelDiscoveryType: "static",
|
|
54616
|
+
statusCheck: "api-key",
|
|
54617
|
+
listModels: "static",
|
|
54618
|
+
validateModel: "static-list",
|
|
54291
54619
|
authMode: "api",
|
|
54292
54620
|
legalPath: "GEMINI_API_KEY",
|
|
54621
|
+
accessPathLabel: "API key from GEMINI_API_KEY",
|
|
54293
54622
|
envKey: "GEMINI_API_KEY"
|
|
54294
54623
|
},
|
|
54295
54624
|
openrouter: {
|
|
@@ -54297,8 +54626,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54297
54626
|
displayName: "OpenRouter",
|
|
54298
54627
|
statusBarName: "OpenRouter",
|
|
54299
54628
|
accessType: "api",
|
|
54629
|
+
credentialType: "api-key",
|
|
54630
|
+
modelDiscoveryType: "static",
|
|
54631
|
+
statusCheck: "api-key",
|
|
54632
|
+
listModels: "static",
|
|
54633
|
+
validateModel: "static-list",
|
|
54300
54634
|
authMode: "api",
|
|
54301
54635
|
legalPath: "OPENROUTER_API_KEY",
|
|
54636
|
+
accessPathLabel: "API key from OPENROUTER_API_KEY",
|
|
54302
54637
|
envKey: "OPENROUTER_API_KEY"
|
|
54303
54638
|
},
|
|
54304
54639
|
"openai-compatible": {
|
|
@@ -54306,8 +54641,15 @@ var init_providerRegistry = __esm(() => {
|
|
|
54306
54641
|
displayName: "OpenAI-compatible",
|
|
54307
54642
|
statusBarName: "OpenAI-compatible",
|
|
54308
54643
|
accessType: "api",
|
|
54644
|
+
accessTypeLabel: "server/api",
|
|
54645
|
+
credentialType: "openai-compatible-endpoint",
|
|
54646
|
+
modelDiscoveryType: "live",
|
|
54647
|
+
statusCheck: "endpoint",
|
|
54648
|
+
listModels: "openai-compatible-models",
|
|
54649
|
+
validateModel: "discovered-list",
|
|
54309
54650
|
authMode: "api",
|
|
54310
54651
|
legalPath: "user-selected OpenAI-compatible base URL with API key only when required by that endpoint",
|
|
54652
|
+
accessPathLabel: "OpenAI-compatible endpoint",
|
|
54311
54653
|
envKey: "OPENAI_API_KEY",
|
|
54312
54654
|
endpointKind: "openai-compatible"
|
|
54313
54655
|
},
|
|
@@ -54316,8 +54658,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54316
54658
|
displayName: "Ollama",
|
|
54317
54659
|
statusBarName: "Ollama",
|
|
54318
54660
|
accessType: "local",
|
|
54661
|
+
credentialType: "local-runtime",
|
|
54662
|
+
modelDiscoveryType: "live",
|
|
54663
|
+
statusCheck: "endpoint",
|
|
54664
|
+
listModels: "ollama-tags",
|
|
54665
|
+
validateModel: "discovered-list",
|
|
54319
54666
|
authMode: "local",
|
|
54320
54667
|
legalPath: "localhost Ollama runtime",
|
|
54668
|
+
accessPathLabel: "local Ollama runtime",
|
|
54321
54669
|
defaultBaseUrl: "http://localhost:11434",
|
|
54322
54670
|
endpointKind: "ollama"
|
|
54323
54671
|
},
|
|
@@ -54325,9 +54673,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54325
54673
|
id: "lmstudio",
|
|
54326
54674
|
displayName: "LM Studio",
|
|
54327
54675
|
statusBarName: "LM Studio",
|
|
54328
|
-
accessType: "
|
|
54676
|
+
accessType: "server",
|
|
54677
|
+
accessTypeLabel: "local/server",
|
|
54678
|
+
credentialType: "openai-compatible-endpoint",
|
|
54679
|
+
modelDiscoveryType: "live",
|
|
54680
|
+
statusCheck: "endpoint",
|
|
54681
|
+
listModels: "openai-compatible-models",
|
|
54682
|
+
validateModel: "discovered-list",
|
|
54329
54683
|
authMode: "local",
|
|
54330
54684
|
legalPath: "local OpenAI-compatible server",
|
|
54685
|
+
accessPathLabel: "local OpenAI-compatible endpoint",
|
|
54331
54686
|
defaultBaseUrl: "http://localhost:1234/v1",
|
|
54332
54687
|
endpointKind: "openai-compatible"
|
|
54333
54688
|
},
|
|
@@ -54335,9 +54690,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54335
54690
|
id: "llama.cpp",
|
|
54336
54691
|
displayName: "llama.cpp",
|
|
54337
54692
|
statusBarName: "llama.cpp",
|
|
54338
|
-
accessType: "
|
|
54693
|
+
accessType: "server",
|
|
54694
|
+
accessTypeLabel: "local/server",
|
|
54695
|
+
credentialType: "openai-compatible-endpoint",
|
|
54696
|
+
modelDiscoveryType: "live",
|
|
54697
|
+
statusCheck: "endpoint",
|
|
54698
|
+
listModels: "openai-compatible-models",
|
|
54699
|
+
validateModel: "discovered-list",
|
|
54339
54700
|
authMode: "local",
|
|
54340
54701
|
legalPath: "local OpenAI-compatible server",
|
|
54702
|
+
accessPathLabel: "local OpenAI-compatible endpoint",
|
|
54341
54703
|
defaultBaseUrl: "http://localhost:8080/v1",
|
|
54342
54704
|
endpointKind: "openai-compatible"
|
|
54343
54705
|
},
|
|
@@ -54345,9 +54707,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54345
54707
|
id: "vllm",
|
|
54346
54708
|
displayName: "vLLM",
|
|
54347
54709
|
statusBarName: "vLLM",
|
|
54348
|
-
accessType: "
|
|
54710
|
+
accessType: "server",
|
|
54711
|
+
accessTypeLabel: "local/server",
|
|
54712
|
+
credentialType: "openai-compatible-endpoint",
|
|
54713
|
+
modelDiscoveryType: "live",
|
|
54714
|
+
statusCheck: "endpoint",
|
|
54715
|
+
listModels: "openai-compatible-models",
|
|
54716
|
+
validateModel: "discovered-list",
|
|
54349
54717
|
authMode: "local",
|
|
54350
54718
|
legalPath: "OpenAI-compatible server",
|
|
54719
|
+
accessPathLabel: "OpenAI-compatible endpoint runtime",
|
|
54351
54720
|
defaultBaseUrl: "http://localhost:8000/v1",
|
|
54352
54721
|
endpointKind: "openai-compatible"
|
|
54353
54722
|
}
|
|
@@ -54413,36 +54782,36 @@ var init_providerRegistry = __esm(() => {
|
|
|
54413
54782
|
]));
|
|
54414
54783
|
PROVIDER_MODELS = {
|
|
54415
54784
|
"codex-cli": [
|
|
54416
|
-
{ id: "gpt-5.5", displayName: "GPT-5.5", description: "
|
|
54417
|
-
{ id: "gpt-5.4", displayName: "GPT-5.4", description: "
|
|
54418
|
-
{ id: "gpt-5.4-mini", displayName: "GPT-5.4 Mini", description: "Fast
|
|
54419
|
-
{ id: "gpt-4o", displayName: "GPT-4o", description: "
|
|
54420
|
-
{ id: "gpt-4o-mini", displayName: "GPT-4o Mini", description: "Fast
|
|
54421
|
-
{ id: "o1", displayName: "o1", description: "
|
|
54422
|
-
{ id: "o3-mini", displayName: "o3-mini", description: "Fast reasoning model" }
|
|
54785
|
+
{ id: "codex/gpt-5.5", displayName: "GPT-5.5 (Codex CLI)", description: "Subscription model through official Codex CLI login", isDefault: true },
|
|
54786
|
+
{ id: "codex/gpt-5.4", displayName: "GPT-5.4 (Codex CLI)", description: "Subscription model through official Codex CLI login" },
|
|
54787
|
+
{ id: "codex/gpt-5.4-mini", displayName: "GPT-5.4 Mini (Codex CLI)", description: "Fast subscription model through official Codex CLI login" },
|
|
54788
|
+
{ id: "codex/gpt-4o", displayName: "GPT-4o (Codex CLI)", description: "Subscription model through official Codex CLI login" },
|
|
54789
|
+
{ id: "codex/gpt-4o-mini", displayName: "GPT-4o Mini (Codex CLI)", description: "Fast subscription model through official Codex CLI login" },
|
|
54790
|
+
{ id: "codex/o1", displayName: "o1 (Codex CLI)", description: "Reasoning model through official Codex CLI login" },
|
|
54791
|
+
{ id: "codex/o3-mini", displayName: "o3-mini (Codex CLI)", description: "Fast reasoning model through official Codex CLI login" }
|
|
54423
54792
|
],
|
|
54424
54793
|
"claude-code-cli": [
|
|
54425
|
-
{ id: "claude-sonnet-5", displayName: "Claude Sonnet 5", description: "
|
|
54426
|
-
{ id: "claude-opus-4-8", displayName: "Claude Opus 4.8", description: "
|
|
54427
|
-
{ id: "claude-opus-4-7", displayName: "Claude Opus 4.7", description: "
|
|
54428
|
-
{ id: "claude-opus-4-6", displayName: "Claude Opus 4.6", description: "
|
|
54429
|
-
{ id: "claude-opus-4-5", displayName: "Claude Opus 4.5", description: "
|
|
54430
|
-
{ id: "claude-sonnet-4-6", displayName: "Claude Sonnet 4.6", description: "
|
|
54431
|
-
{ id: "claude-sonnet-4-5", displayName: "Claude Sonnet 4.5", description: "
|
|
54432
|
-
{ id: "claude-haiku-4-5", displayName: "Claude Haiku 4.5", description: "
|
|
54794
|
+
{ id: "claude-code/sonnet-5", displayName: "Claude Sonnet 5 (Claude Code)", description: "Subscription model through official Claude Code login", isDefault: true },
|
|
54795
|
+
{ id: "claude-code/opus-4-8", displayName: "Claude Opus 4.8 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54796
|
+
{ id: "claude-code/opus-4-7", displayName: "Claude Opus 4.7 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54797
|
+
{ id: "claude-code/opus-4-6", displayName: "Claude Opus 4.6 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54798
|
+
{ id: "claude-code/opus-4-5", displayName: "Claude Opus 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54799
|
+
{ id: "claude-code/sonnet-4-6", displayName: "Claude Sonnet 4.6 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54800
|
+
{ id: "claude-code/sonnet-4-5", displayName: "Claude Sonnet 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54801
|
+
{ id: "claude-code/haiku-4-5", displayName: "Claude Haiku 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" }
|
|
54433
54802
|
],
|
|
54434
54803
|
"gemini-cli": [
|
|
54435
|
-
{ id: "gemini-3.5-flash", displayName: "Gemini 3.5 Flash", description: "
|
|
54436
|
-
{ id: "gemini-3.1-pro", displayName: "Gemini 3.1 Pro", description: "
|
|
54437
|
-
{ id: "gemini-3.1-flash-lite", displayName: "Gemini 3.1 Flash Lite", description: "
|
|
54438
|
-
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "
|
|
54439
|
-
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", description: "
|
|
54440
|
-
{ id: "gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash Lite", description: "
|
|
54804
|
+
{ id: "gemini-cli/gemini-3.5-flash", displayName: "Gemini 3.5 Flash (Gemini CLI)", description: "Subscription model through official Gemini CLI login", isDefault: true },
|
|
54805
|
+
{ id: "gemini-cli/gemini-3.1-pro", displayName: "Gemini 3.1 Pro (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54806
|
+
{ id: "gemini-cli/gemini-3.1-flash-lite", displayName: "Gemini 3.1 Flash Lite (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54807
|
+
{ id: "gemini-cli/gemini-2.5-pro", displayName: "Gemini 2.5 Pro (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54808
|
+
{ id: "gemini-cli/gemini-2.5-flash", displayName: "Gemini 2.5 Flash (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54809
|
+
{ id: "gemini-cli/gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash Lite (Gemini CLI)", description: "Subscription model through official Gemini CLI login" }
|
|
54441
54810
|
],
|
|
54442
54811
|
"antigravity-cli": [
|
|
54443
|
-
{ id: "gemini-3.5-flash", displayName: "Gemini 3.5 Flash", description: "
|
|
54444
|
-
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "
|
|
54445
|
-
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", description: "
|
|
54812
|
+
{ id: "antigravity/gemini-3.5-flash", displayName: "Gemini 3.5 Flash (Antigravity)", description: "Subscription model through official Antigravity login", isDefault: true },
|
|
54813
|
+
{ id: "antigravity/gemini-2.5-pro", displayName: "Gemini 2.5 Pro (Antigravity)", description: "Subscription model through official Antigravity login" },
|
|
54814
|
+
{ id: "antigravity/gemini-2.5-flash", displayName: "Gemini 2.5 Flash (Antigravity)", description: "Subscription model through official Antigravity login" }
|
|
54446
54815
|
],
|
|
54447
54816
|
"openai-api": [
|
|
54448
54817
|
{ id: "gpt-5.5", displayName: "GPT-5.5", description: "Latest OpenAI model", isDefault: true },
|
|
@@ -54496,6 +54865,8 @@ var init_providerRegistry = __esm(() => {
|
|
|
54496
54865
|
{ id: "dynamic", displayName: "Discovered Models", description: "Models discovered from vLLM server", isDynamic: true, isDefault: true }
|
|
54497
54866
|
]
|
|
54498
54867
|
};
|
|
54868
|
+
cachedModelsByProvider = new Map;
|
|
54869
|
+
validateProviderModelCompatibility = validateProviderModelPair;
|
|
54499
54870
|
});
|
|
54500
54871
|
|
|
54501
54872
|
// src/utils/model/ollamaTuning.ts
|
|
@@ -56168,16 +56539,28 @@ async function createURHQSubscriptionClient(providerId, options) {
|
|
|
56168
56539
|
};
|
|
56169
56540
|
}
|
|
56170
56541
|
const messagesAPI = {
|
|
56171
|
-
|
|
56172
|
-
|
|
56173
|
-
|
|
56542
|
+
create(params, options2) {
|
|
56543
|
+
if (params.stream) {
|
|
56544
|
+
const requestPromise = doRequest(params, options2?.headers);
|
|
56545
|
+
return {
|
|
56546
|
+
async withResponse() {
|
|
56547
|
+
const { response, data } = await requestPromise;
|
|
56548
|
+
return {
|
|
56549
|
+
data,
|
|
56550
|
+
response,
|
|
56551
|
+
request_id: data.id
|
|
56552
|
+
};
|
|
56553
|
+
}
|
|
56554
|
+
};
|
|
56555
|
+
}
|
|
56556
|
+
return doRequest(params, options2?.headers).then(({ response, data }) => ({
|
|
56174
56557
|
...data,
|
|
56175
56558
|
withResponse: () => ({
|
|
56176
56559
|
data,
|
|
56177
56560
|
response,
|
|
56178
56561
|
request_id: data.id
|
|
56179
56562
|
})
|
|
56180
|
-
};
|
|
56563
|
+
}));
|
|
56181
56564
|
},
|
|
56182
56565
|
async countTokens(params) {
|
|
56183
56566
|
return {
|
|
@@ -56245,16 +56628,28 @@ async function createOpenRouterClient(options) {
|
|
|
56245
56628
|
};
|
|
56246
56629
|
}
|
|
56247
56630
|
const messagesAPI = {
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56631
|
+
create(params, options2) {
|
|
56632
|
+
if (params.stream) {
|
|
56633
|
+
const requestPromise = doRequest(params, options2?.headers);
|
|
56634
|
+
return {
|
|
56635
|
+
async withResponse() {
|
|
56636
|
+
const { response, data } = await requestPromise;
|
|
56637
|
+
return {
|
|
56638
|
+
data,
|
|
56639
|
+
response,
|
|
56640
|
+
request_id: response.data?.id ?? response.headers?.["x-request-id"] ?? randomUUID4()
|
|
56641
|
+
};
|
|
56642
|
+
}
|
|
56643
|
+
};
|
|
56644
|
+
}
|
|
56645
|
+
return doRequest(params, options2?.headers).then(({ response, data }) => ({
|
|
56251
56646
|
...data,
|
|
56252
56647
|
withResponse: () => ({
|
|
56253
56648
|
data,
|
|
56254
56649
|
response,
|
|
56255
56650
|
request_id: response.data?.id ?? response.headers?.["x-request-id"] ?? randomUUID4()
|
|
56256
56651
|
})
|
|
56257
|
-
};
|
|
56652
|
+
}));
|
|
56258
56653
|
},
|
|
56259
56654
|
async countTokens(params) {
|
|
56260
56655
|
return {
|
|
@@ -56299,16 +56694,28 @@ async function createStandardAPIClient(options) {
|
|
|
56299
56694
|
return { response, data: parseAPIResponse(providerId, response.data) };
|
|
56300
56695
|
}
|
|
56301
56696
|
const messagesAPI = {
|
|
56302
|
-
|
|
56303
|
-
|
|
56304
|
-
|
|
56697
|
+
create(params, options2) {
|
|
56698
|
+
if (params.stream) {
|
|
56699
|
+
const requestPromise = doRequest(params, options2?.headers);
|
|
56700
|
+
return {
|
|
56701
|
+
async withResponse() {
|
|
56702
|
+
const { response, data } = await requestPromise;
|
|
56703
|
+
return {
|
|
56704
|
+
data,
|
|
56705
|
+
response,
|
|
56706
|
+
request_id: response.data?.id ?? response.headers?.["x-request-id"] ?? randomUUID5()
|
|
56707
|
+
};
|
|
56708
|
+
}
|
|
56709
|
+
};
|
|
56710
|
+
}
|
|
56711
|
+
return doRequest(params, options2?.headers).then(({ response, data }) => ({
|
|
56305
56712
|
...data,
|
|
56306
56713
|
withResponse: () => ({
|
|
56307
56714
|
data,
|
|
56308
56715
|
response,
|
|
56309
56716
|
request_id: response.data?.id ?? response.headers?.["x-request-id"] ?? randomUUID5()
|
|
56310
56717
|
})
|
|
56311
|
-
};
|
|
56718
|
+
}));
|
|
56312
56719
|
},
|
|
56313
56720
|
async countTokens(params) {
|
|
56314
56721
|
return {
|
|
@@ -68242,7 +68649,7 @@ var init_auth = __esm(() => {
|
|
|
68242
68649
|
|
|
68243
68650
|
// src/utils/userAgent.ts
|
|
68244
68651
|
function getURCodeUserAgent() {
|
|
68245
|
-
return `ur/${"1.27.
|
|
68652
|
+
return `ur/${"1.27.5"}`;
|
|
68246
68653
|
}
|
|
68247
68654
|
|
|
68248
68655
|
// src/utils/workloadContext.ts
|
|
@@ -68264,7 +68671,7 @@ function getUserAgent() {
|
|
|
68264
68671
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
68265
68672
|
const workload = getWorkload();
|
|
68266
68673
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
68267
|
-
return `ur-cli/${"1.27.
|
|
68674
|
+
return `ur-cli/${"1.27.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
68268
68675
|
}
|
|
68269
68676
|
function getMCPUserAgent() {
|
|
68270
68677
|
const parts = [];
|
|
@@ -68278,7 +68685,7 @@ function getMCPUserAgent() {
|
|
|
68278
68685
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
68279
68686
|
}
|
|
68280
68687
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
68281
|
-
return `ur/${"1.27.
|
|
68688
|
+
return `ur/${"1.27.5"}${suffix}`;
|
|
68282
68689
|
}
|
|
68283
68690
|
function getWebFetchUserAgent() {
|
|
68284
68691
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -68416,7 +68823,7 @@ var init_user = __esm(() => {
|
|
|
68416
68823
|
deviceId,
|
|
68417
68824
|
sessionId: getSessionId(),
|
|
68418
68825
|
email: getEmail(),
|
|
68419
|
-
appVersion: "1.27.
|
|
68826
|
+
appVersion: "1.27.5",
|
|
68420
68827
|
platform: getHostPlatformForAnalytics(),
|
|
68421
68828
|
organizationUuid,
|
|
68422
68829
|
accountUuid,
|
|
@@ -74933,7 +75340,7 @@ var init_metadata = __esm(() => {
|
|
|
74933
75340
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
74934
75341
|
WHITESPACE_REGEX = /\s+/;
|
|
74935
75342
|
getVersionBase = memoize_default(() => {
|
|
74936
|
-
const match = "1.27.
|
|
75343
|
+
const match = "1.27.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
74937
75344
|
return match ? match[0] : undefined;
|
|
74938
75345
|
});
|
|
74939
75346
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -74973,7 +75380,7 @@ var init_metadata = __esm(() => {
|
|
|
74973
75380
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
74974
75381
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
74975
75382
|
isURAiAuth: isURAISubscriber2(),
|
|
74976
|
-
version: "1.27.
|
|
75383
|
+
version: "1.27.5",
|
|
74977
75384
|
versionBase: getVersionBase(),
|
|
74978
75385
|
buildTime: "",
|
|
74979
75386
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -75643,7 +76050,7 @@ function initialize1PEventLogging() {
|
|
|
75643
76050
|
const platform2 = getPlatform();
|
|
75644
76051
|
const attributes = {
|
|
75645
76052
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
75646
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.27.
|
|
76053
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.27.5"
|
|
75647
76054
|
};
|
|
75648
76055
|
if (platform2 === "wsl") {
|
|
75649
76056
|
const wslVersion = getWslVersion();
|
|
@@ -75670,7 +76077,7 @@ function initialize1PEventLogging() {
|
|
|
75670
76077
|
})
|
|
75671
76078
|
]
|
|
75672
76079
|
});
|
|
75673
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.27.
|
|
76080
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.27.5");
|
|
75674
76081
|
}
|
|
75675
76082
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
75676
76083
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -80967,7 +81374,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
80967
81374
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
80968
81375
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
80969
81376
|
}
|
|
80970
|
-
var urVersion = "1.27.
|
|
81377
|
+
var urVersion = "1.27.5", coverage, priorityRoadmap;
|
|
80971
81378
|
var init_trends = __esm(() => {
|
|
80972
81379
|
coverage = [
|
|
80973
81380
|
{
|
|
@@ -82959,7 +83366,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
82959
83366
|
if (!isAttributionHeaderEnabled()) {
|
|
82960
83367
|
return "";
|
|
82961
83368
|
}
|
|
82962
|
-
const version2 = `${"1.27.
|
|
83369
|
+
const version2 = `${"1.27.5"}.${fingerprint}`;
|
|
82963
83370
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
82964
83371
|
const cch = "";
|
|
82965
83372
|
const workload = getWorkload();
|
|
@@ -190628,7 +191035,7 @@ function getTelemetryAttributes() {
|
|
|
190628
191035
|
attributes["session.id"] = sessionId;
|
|
190629
191036
|
}
|
|
190630
191037
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
190631
|
-
attributes["app.version"] = "1.27.
|
|
191038
|
+
attributes["app.version"] = "1.27.5";
|
|
190632
191039
|
}
|
|
190633
191040
|
const oauthAccount = getOauthAccountInfo();
|
|
190634
191041
|
if (oauthAccount) {
|
|
@@ -226030,7 +226437,7 @@ function getInstallationEnv() {
|
|
|
226030
226437
|
return;
|
|
226031
226438
|
}
|
|
226032
226439
|
function getURCodeVersion() {
|
|
226033
|
-
return "1.27.
|
|
226440
|
+
return "1.27.5";
|
|
226034
226441
|
}
|
|
226035
226442
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
226036
226443
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -228869,7 +229276,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
228869
229276
|
const client2 = new Client({
|
|
228870
229277
|
name: "ur",
|
|
228871
229278
|
title: "UR",
|
|
228872
|
-
version: "1.27.
|
|
229279
|
+
version: "1.27.5",
|
|
228873
229280
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
228874
229281
|
websiteUrl: PRODUCT_URL
|
|
228875
229282
|
}, {
|
|
@@ -229223,7 +229630,7 @@ var init_client5 = __esm(() => {
|
|
|
229223
229630
|
const client2 = new Client({
|
|
229224
229631
|
name: "ur",
|
|
229225
229632
|
title: "UR",
|
|
229226
|
-
version: "1.27.
|
|
229633
|
+
version: "1.27.5",
|
|
229227
229634
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
229228
229635
|
websiteUrl: PRODUCT_URL
|
|
229229
229636
|
}, {
|
|
@@ -239036,9 +239443,9 @@ async function assertMinVersion() {
|
|
|
239036
239443
|
if (false) {}
|
|
239037
239444
|
try {
|
|
239038
239445
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
239039
|
-
if (versionConfig.minVersion && lt("1.27.
|
|
239446
|
+
if (versionConfig.minVersion && lt("1.27.5", versionConfig.minVersion)) {
|
|
239040
239447
|
console.error(`
|
|
239041
|
-
It looks like your version of UR (${"1.27.
|
|
239448
|
+
It looks like your version of UR (${"1.27.5"}) needs an update.
|
|
239042
239449
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
239043
239450
|
|
|
239044
239451
|
To update, please run:
|
|
@@ -239254,7 +239661,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
239254
239661
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
239255
239662
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
239256
239663
|
pid: process.pid,
|
|
239257
|
-
currentVersion: "1.27.
|
|
239664
|
+
currentVersion: "1.27.5"
|
|
239258
239665
|
});
|
|
239259
239666
|
return "in_progress";
|
|
239260
239667
|
}
|
|
@@ -239263,7 +239670,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
239263
239670
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
239264
239671
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
239265
239672
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
239266
|
-
currentVersion: "1.27.
|
|
239673
|
+
currentVersion: "1.27.5"
|
|
239267
239674
|
});
|
|
239268
239675
|
console.error(`
|
|
239269
239676
|
Error: Windows NPM detected in WSL
|
|
@@ -239798,7 +240205,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
239798
240205
|
}
|
|
239799
240206
|
async function getDoctorDiagnostic() {
|
|
239800
240207
|
const installationType = await getCurrentInstallationType();
|
|
239801
|
-
const version2 = typeof MACRO !== "undefined" ? "1.27.
|
|
240208
|
+
const version2 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
239802
240209
|
const installationPath = await getInstallationPath();
|
|
239803
240210
|
const invokedBinary = getInvokedBinary();
|
|
239804
240211
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -240733,8 +241140,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
240733
241140
|
const maxVersion = await getMaxVersion();
|
|
240734
241141
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
240735
241142
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
240736
|
-
if (gte("1.27.
|
|
240737
|
-
logForDebugging(`Native installer: current version ${"1.27.
|
|
241143
|
+
if (gte("1.27.5", maxVersion)) {
|
|
241144
|
+
logForDebugging(`Native installer: current version ${"1.27.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
240738
241145
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
240739
241146
|
latency_ms: Date.now() - startTime,
|
|
240740
241147
|
max_version: maxVersion,
|
|
@@ -240745,7 +241152,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
240745
241152
|
version2 = maxVersion;
|
|
240746
241153
|
}
|
|
240747
241154
|
}
|
|
240748
|
-
if (!forceReinstall && version2 === "1.27.
|
|
241155
|
+
if (!forceReinstall && version2 === "1.27.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
240749
241156
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
240750
241157
|
logEvent("tengu_native_update_complete", {
|
|
240751
241158
|
latency_ms: Date.now() - startTime,
|
|
@@ -337657,7 +338064,7 @@ function Feedback({
|
|
|
337657
338064
|
platform: env2.platform,
|
|
337658
338065
|
gitRepo: envInfo.isGit,
|
|
337659
338066
|
terminal: env2.terminal,
|
|
337660
|
-
version: "1.27.
|
|
338067
|
+
version: "1.27.5",
|
|
337661
338068
|
transcript: normalizeMessagesForAPI(messages),
|
|
337662
338069
|
errors: sanitizedErrors,
|
|
337663
338070
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -337849,7 +338256,7 @@ function Feedback({
|
|
|
337849
338256
|
", ",
|
|
337850
338257
|
env2.terminal,
|
|
337851
338258
|
", v",
|
|
337852
|
-
"1.27.
|
|
338259
|
+
"1.27.5"
|
|
337853
338260
|
]
|
|
337854
338261
|
}, undefined, true, undefined, this)
|
|
337855
338262
|
]
|
|
@@ -337955,7 +338362,7 @@ ${sanitizedDescription}
|
|
|
337955
338362
|
` + `**Environment Info**
|
|
337956
338363
|
` + `- Platform: ${env2.platform}
|
|
337957
338364
|
` + `- Terminal: ${env2.terminal}
|
|
337958
|
-
` + `- Version: ${"1.27.
|
|
338365
|
+
` + `- Version: ${"1.27.5"}
|
|
337959
338366
|
` + `- Feedback ID: ${feedbackId}
|
|
337960
338367
|
` + `
|
|
337961
338368
|
**Errors**
|
|
@@ -341066,7 +341473,7 @@ function buildPrimarySection() {
|
|
|
341066
341473
|
}, undefined, false, undefined, this);
|
|
341067
341474
|
return [{
|
|
341068
341475
|
label: "Version",
|
|
341069
|
-
value: "1.27.
|
|
341476
|
+
value: "1.27.5"
|
|
341070
341477
|
}, {
|
|
341071
341478
|
label: "Session name",
|
|
341072
341479
|
value: nameValue
|
|
@@ -341880,55 +342287,35 @@ function ModelPicker({
|
|
|
341880
342287
|
const appThinkingEnabled = useAppState(selectThinkingEnabled);
|
|
341881
342288
|
const [hasToggledThinking, setHasToggledThinking] = import_react101.useState(false);
|
|
341882
342289
|
const [thinkingEnabled, setThinkingEnabled] = import_react101.useState(() => appThinkingEnabled ?? shouldEnableThinkingByDefault());
|
|
341883
|
-
const [ollamaModelOptions, setOllamaModelOptions] = import_react101.useState([]);
|
|
341884
342290
|
const [providerModelOptions, setProviderModelOptions] = import_react101.useState([]);
|
|
341885
|
-
const
|
|
341886
|
-
const
|
|
341887
|
-
const isLocalProvider = ["ollama", "lmstudio", "llama.cpp", "vllm"].includes(currentProvider);
|
|
342291
|
+
const [pickerError, setPickerError] = import_react101.useState(null);
|
|
342292
|
+
const currentProvider = getActiveProviderSettings(getSettingsForSource("userSettings") ?? {}).active ?? "ollama";
|
|
341888
342293
|
import_react101.useEffect(() => {
|
|
341889
|
-
|
|
341890
|
-
|
|
341891
|
-
|
|
341892
|
-
|
|
341893
|
-
|
|
341894
|
-
|
|
341895
|
-
|
|
341896
|
-
|
|
341897
|
-
if (!controller.signal.aborted) {
|
|
341898
|
-
setOllamaModelOptions([]);
|
|
341899
|
-
setProviderModelOptions([]);
|
|
341900
|
-
}
|
|
341901
|
-
});
|
|
341902
|
-
return () => controller.abort();
|
|
341903
|
-
}
|
|
341904
|
-
if (isLocalProvider) {
|
|
341905
|
-
const controller = new AbortController;
|
|
341906
|
-
getOllamaModelOptions(controller.signal).then((options2) => {
|
|
341907
|
-
if (!controller.signal.aborted) {
|
|
341908
|
-
setProviderModelOptions(options2);
|
|
341909
|
-
}
|
|
341910
|
-
}).catch(() => {
|
|
341911
|
-
if (!controller.signal.aborted) {
|
|
341912
|
-
setProviderModelOptions([]);
|
|
341913
|
-
}
|
|
341914
|
-
});
|
|
341915
|
-
return () => controller.abort();
|
|
341916
|
-
}
|
|
341917
|
-
const models = listModelsForProvider(currentProvider);
|
|
341918
|
-
if (models.length > 0) {
|
|
341919
|
-
const options2 = models.map((model) => ({
|
|
342294
|
+
const controller = new AbortController;
|
|
342295
|
+
listModelsForProviderWithSource(currentProvider, {
|
|
342296
|
+
settings: getSettingsForSource("userSettings") ?? undefined,
|
|
342297
|
+
signal: controller.signal
|
|
342298
|
+
}).then((result) => {
|
|
342299
|
+
if (controller.signal.aborted)
|
|
342300
|
+
return;
|
|
342301
|
+
setProviderModelOptions(result.models.map((model) => ({
|
|
341920
342302
|
value: model.id,
|
|
341921
342303
|
label: model.displayName,
|
|
341922
|
-
description: model.description
|
|
341923
|
-
}));
|
|
341924
|
-
|
|
341925
|
-
}
|
|
342304
|
+
description: `${model.description} \xB7 ${result.source}`
|
|
342305
|
+
})));
|
|
342306
|
+
setPickerError(result.warning ?? null);
|
|
342307
|
+
}).catch((error40) => {
|
|
342308
|
+
if (controller.signal.aborted)
|
|
342309
|
+
return;
|
|
341926
342310
|
setProviderModelOptions([]);
|
|
341927
|
-
|
|
341928
|
-
|
|
341929
|
-
|
|
341930
|
-
|
|
341931
|
-
const
|
|
342311
|
+
setPickerError(error40 instanceof Error ? error40.message : String(error40));
|
|
342312
|
+
});
|
|
342313
|
+
return () => controller.abort();
|
|
342314
|
+
}, [currentProvider]);
|
|
342315
|
+
const modelOptions = providerModelOptions;
|
|
342316
|
+
const optionsWithInitial = initial !== null && validateProviderModelPair(currentProvider, initial, {
|
|
342317
|
+
availableModels: modelOptions.map((option) => option.value)
|
|
342318
|
+
}).valid && !modelOptions.some((opt) => opt.value === initial) ? [
|
|
341932
342319
|
...modelOptions,
|
|
341933
342320
|
{
|
|
341934
342321
|
value: initial,
|
|
@@ -341979,6 +342366,15 @@ function ModelPicker({
|
|
|
341979
342366
|
logEvent("tengu_model_command_menu_effort", {
|
|
341980
342367
|
effort
|
|
341981
342368
|
});
|
|
342369
|
+
if (value !== NO_PREFERENCE) {
|
|
342370
|
+
const validation = validateProviderModelPair(currentProvider, value, {
|
|
342371
|
+
availableModels: modelOptions.map((option) => option.value)
|
|
342372
|
+
});
|
|
342373
|
+
if (validation.valid === false) {
|
|
342374
|
+
setPickerError(validation.error);
|
|
342375
|
+
return;
|
|
342376
|
+
}
|
|
342377
|
+
}
|
|
341982
342378
|
if (!skipSettingsWrite) {
|
|
341983
342379
|
const effortLevel = resolvePickerEffortPersistence(effort, getDefaultEffortLevelForOption(value), getSettingsForSource("userSettings")?.effortLevel, hasToggledEffort);
|
|
341984
342380
|
const persistable = toPersistableEffort(effortLevel);
|
|
@@ -342151,6 +342547,13 @@ function ModelPicker({
|
|
|
342151
342547
|
}, undefined, true, undefined, this)
|
|
342152
342548
|
]
|
|
342153
342549
|
}, undefined, true, undefined, this),
|
|
342550
|
+
pickerError && /* @__PURE__ */ jsx_dev_runtime172.jsxDEV(ThemedBox_default, {
|
|
342551
|
+
marginBottom: 1,
|
|
342552
|
+
children: /* @__PURE__ */ jsx_dev_runtime172.jsxDEV(ThemedText, {
|
|
342553
|
+
color: "error",
|
|
342554
|
+
children: pickerError
|
|
342555
|
+
}, undefined, false, undefined, this)
|
|
342556
|
+
}, undefined, false, undefined, this),
|
|
342154
342557
|
fastModeNotice
|
|
342155
342558
|
]
|
|
342156
342559
|
}, undefined, true, undefined, this),
|
|
@@ -342228,8 +342631,6 @@ var init_ModelPicker = __esm(() => {
|
|
|
342228
342631
|
init_AppState();
|
|
342229
342632
|
init_effort();
|
|
342230
342633
|
init_model();
|
|
342231
|
-
init_modelOptions();
|
|
342232
|
-
init_ollamaModels();
|
|
342233
342634
|
init_settings2();
|
|
342234
342635
|
init_thinking();
|
|
342235
342636
|
init_providerRegistry();
|
|
@@ -344372,7 +344773,7 @@ function Config({
|
|
|
344372
344773
|
}
|
|
344373
344774
|
}, undefined, false, undefined, this)
|
|
344374
344775
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
344375
|
-
currentVersion: "1.27.
|
|
344776
|
+
currentVersion: "1.27.5",
|
|
344376
344777
|
onChoice: (choice) => {
|
|
344377
344778
|
setShowSubmenu(null);
|
|
344378
344779
|
setTabsHidden(false);
|
|
@@ -344384,7 +344785,7 @@ function Config({
|
|
|
344384
344785
|
autoUpdatesChannel: "stable"
|
|
344385
344786
|
};
|
|
344386
344787
|
if (choice === "stay") {
|
|
344387
|
-
newSettings.minimumVersion = "1.27.
|
|
344788
|
+
newSettings.minimumVersion = "1.27.5";
|
|
344388
344789
|
}
|
|
344389
344790
|
updateSettingsForSource("userSettings", newSettings);
|
|
344390
344791
|
setSettingsData((prev_27) => ({
|
|
@@ -352454,7 +352855,7 @@ function HelpV2(t0) {
|
|
|
352454
352855
|
let t6;
|
|
352455
352856
|
if ($3[31] !== tabs) {
|
|
352456
352857
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
352457
|
-
title: `UR v${"1.27.
|
|
352858
|
+
title: `UR v${"1.27.5"}`,
|
|
352458
352859
|
color: "professionalBlue",
|
|
352459
352860
|
defaultTab: "general",
|
|
352460
352861
|
children: tabs
|
|
@@ -372556,7 +372957,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
372556
372957
|
return [];
|
|
372557
372958
|
}
|
|
372558
372959
|
}
|
|
372559
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.
|
|
372960
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.5") {
|
|
372560
372961
|
if (process.env.USER_TYPE === "ant") {
|
|
372561
372962
|
const changelog = "";
|
|
372562
372963
|
if (changelog) {
|
|
@@ -372583,7 +372984,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.3")
|
|
|
372583
372984
|
releaseNotes
|
|
372584
372985
|
};
|
|
372585
372986
|
}
|
|
372586
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.27.
|
|
372987
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.27.5") {
|
|
372587
372988
|
if (process.env.USER_TYPE === "ant") {
|
|
372588
372989
|
const changelog = "";
|
|
372589
372990
|
if (changelog) {
|
|
@@ -373753,7 +374154,7 @@ function getRecentActivitySync() {
|
|
|
373753
374154
|
return cachedActivity;
|
|
373754
374155
|
}
|
|
373755
374156
|
function getLogoDisplayData() {
|
|
373756
|
-
const version2 = process.env.DEMO_VERSION ?? "1.27.
|
|
374157
|
+
const version2 = process.env.DEMO_VERSION ?? "1.27.5";
|
|
373757
374158
|
const serverUrl = getDirectConnectServerUrl();
|
|
373758
374159
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd2());
|
|
373759
374160
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -374542,7 +374943,7 @@ function LogoV2() {
|
|
|
374542
374943
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
374543
374944
|
t2 = () => {
|
|
374544
374945
|
const currentConfig = getGlobalConfig();
|
|
374545
|
-
if (currentConfig.lastReleaseNotesSeen === "1.27.
|
|
374946
|
+
if (currentConfig.lastReleaseNotesSeen === "1.27.5") {
|
|
374546
374947
|
return;
|
|
374547
374948
|
}
|
|
374548
374949
|
saveGlobalConfig(_temp326);
|
|
@@ -375227,12 +375628,12 @@ function LogoV2() {
|
|
|
375227
375628
|
return t41;
|
|
375228
375629
|
}
|
|
375229
375630
|
function _temp326(current) {
|
|
375230
|
-
if (current.lastReleaseNotesSeen === "1.27.
|
|
375631
|
+
if (current.lastReleaseNotesSeen === "1.27.5") {
|
|
375231
375632
|
return current;
|
|
375232
375633
|
}
|
|
375233
375634
|
return {
|
|
375234
375635
|
...current,
|
|
375235
|
-
lastReleaseNotesSeen: "1.27.
|
|
375636
|
+
lastReleaseNotesSeen: "1.27.5"
|
|
375236
375637
|
};
|
|
375237
375638
|
}
|
|
375238
375639
|
function _temp243(s_0) {
|
|
@@ -392221,7 +392622,7 @@ function buildToolUseContext(tools, readFileStateCache) {
|
|
|
392221
392622
|
async function handleInitialize() {
|
|
392222
392623
|
return {
|
|
392223
392624
|
name: "ur-agent",
|
|
392224
|
-
version: "1.27.
|
|
392625
|
+
version: "1.27.5",
|
|
392225
392626
|
protocolVersion: "0.1.0"
|
|
392226
392627
|
};
|
|
392227
392628
|
}
|
|
@@ -591215,7 +591616,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
591215
591616
|
smapsRollup,
|
|
591216
591617
|
platform: process.platform,
|
|
591217
591618
|
nodeVersion: process.version,
|
|
591218
|
-
ccVersion: "1.27.
|
|
591619
|
+
ccVersion: "1.27.5"
|
|
591219
591620
|
};
|
|
591220
591621
|
}
|
|
591221
591622
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -591801,7 +592202,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
591801
592202
|
var call136 = async () => {
|
|
591802
592203
|
return {
|
|
591803
592204
|
type: "text",
|
|
591804
|
-
value: "1.27.
|
|
592205
|
+
value: "1.27.5"
|
|
591805
592206
|
};
|
|
591806
592207
|
}, version2, version_default;
|
|
591807
592208
|
var init_version = __esm(() => {
|
|
@@ -594661,64 +595062,6 @@ var init_export2 = __esm(() => {
|
|
|
594661
595062
|
});
|
|
594662
595063
|
|
|
594663
595064
|
// src/components/ProviderFirstModelPicker.tsx
|
|
594664
|
-
function getStatusFromDoctorResult(doctorResult) {
|
|
594665
|
-
if (doctorResult.ok) {
|
|
594666
|
-
return "connected";
|
|
594667
|
-
}
|
|
594668
|
-
if (doctorResult.failureReason?.includes("CLI missing") || doctorResult.failureReason?.includes("not found")) {
|
|
594669
|
-
return "missing";
|
|
594670
|
-
}
|
|
594671
|
-
if (doctorResult.failureReason?.includes("not logged in") || doctorResult.failureReason?.includes("not authenticated")) {
|
|
594672
|
-
return "unavailable";
|
|
594673
|
-
}
|
|
594674
|
-
if (doctorResult.failureReason?.includes("API key missing") || doctorResult.failureReason?.includes("endpoint")) {
|
|
594675
|
-
return "unavailable";
|
|
594676
|
-
}
|
|
594677
|
-
return "unknown";
|
|
594678
|
-
}
|
|
594679
|
-
function getCredentialType(provider) {
|
|
594680
|
-
switch (provider.authMode) {
|
|
594681
|
-
case "subscription":
|
|
594682
|
-
return "cli-login";
|
|
594683
|
-
case "enterprise-login":
|
|
594684
|
-
case "personal-login":
|
|
594685
|
-
return "cli-login";
|
|
594686
|
-
case "api":
|
|
594687
|
-
return "api-key";
|
|
594688
|
-
case "local":
|
|
594689
|
-
return provider.endpointKind ? "openai-compatible-endpoint" : "local-runtime";
|
|
594690
|
-
default:
|
|
594691
|
-
return "unknown";
|
|
594692
|
-
}
|
|
594693
|
-
}
|
|
594694
|
-
function formatStatusMessage(status2, provider, checks4) {
|
|
594695
|
-
switch (status2) {
|
|
594696
|
-
case "connected":
|
|
594697
|
-
if (provider.accessType === "api") {
|
|
594698
|
-
const envKey = provider.envKey;
|
|
594699
|
-
if (envKey) {
|
|
594700
|
-
return `${envKey} found`;
|
|
594701
|
-
}
|
|
594702
|
-
}
|
|
594703
|
-
if (provider.accessType === "local" || provider.accessType === "subscription") {
|
|
594704
|
-
return "connected";
|
|
594705
|
-
}
|
|
594706
|
-
return "available";
|
|
594707
|
-
case "missing":
|
|
594708
|
-
if (provider.commandCandidates) {
|
|
594709
|
-
return `CLI not found (tried: ${provider.commandCandidates.join(", ")})`;
|
|
594710
|
-
}
|
|
594711
|
-
return "CLI not found";
|
|
594712
|
-
case "unavailable":
|
|
594713
|
-
const failCheck = checks4.find((c4) => c4.status === "fail" || c4.status === "warn");
|
|
594714
|
-
if (failCheck) {
|
|
594715
|
-
return failCheck.message;
|
|
594716
|
-
}
|
|
594717
|
-
return "not available";
|
|
594718
|
-
case "unknown":
|
|
594719
|
-
return "status unknown";
|
|
594720
|
-
}
|
|
594721
|
-
}
|
|
594722
595065
|
function ProviderFirstModelPicker({
|
|
594723
595066
|
initial,
|
|
594724
595067
|
onSelect,
|
|
@@ -594737,28 +595080,30 @@ function ProviderFirstModelPicker({
|
|
|
594737
595080
|
const [loadingModels, setLoadingModels] = import_react188.useState(false);
|
|
594738
595081
|
const [selectedProvider, setSelectedProvider] = import_react188.useState(null);
|
|
594739
595082
|
const [modelSource, setModelSource] = import_react188.useState("static");
|
|
594740
|
-
const
|
|
595083
|
+
const [modelWarning, setModelWarning] = import_react188.useState(null);
|
|
594741
595084
|
const effortValue = useAppState(selectEffortValue2);
|
|
594742
|
-
const [effort
|
|
595085
|
+
const [effort] = import_react188.useState(effortValue !== undefined ? convertEffortValueToLevel(effortValue) : undefined);
|
|
594743
595086
|
const appThinkingEnabled = useAppState(selectThinkingEnabled2);
|
|
594744
|
-
const
|
|
594745
|
-
const [thinkingEnabled
|
|
595087
|
+
const hasToggledThinking = false;
|
|
595088
|
+
const [thinkingEnabled] = import_react188.useState(() => appThinkingEnabled ?? shouldEnableThinkingByDefault());
|
|
594746
595089
|
import_react188.useEffect(() => {
|
|
594747
595090
|
async function loadProviderStatus() {
|
|
594748
595091
|
setLoadingProviders(true);
|
|
594749
595092
|
const providers = listProviders();
|
|
595093
|
+
const settings = getSettingsForSource("userSettings");
|
|
594750
595094
|
const options2 = await Promise.all(providers.map(async (provider) => {
|
|
594751
|
-
const
|
|
594752
|
-
|
|
594753
|
-
|
|
594754
|
-
const
|
|
595095
|
+
const status2 = await getProviderStatus(provider.id, {
|
|
595096
|
+
settings: settings ?? undefined
|
|
595097
|
+
});
|
|
595098
|
+
const accessType = getProviderAccessTypeLabel(provider);
|
|
594755
595099
|
return {
|
|
594756
595100
|
value: provider.id,
|
|
594757
595101
|
label: provider.displayName,
|
|
594758
|
-
description: `${
|
|
594759
|
-
status: status2,
|
|
594760
|
-
|
|
594761
|
-
|
|
595102
|
+
description: `${accessType} \xB7 ${status2.label}`,
|
|
595103
|
+
status: status2.status,
|
|
595104
|
+
statusLabel: status2.label,
|
|
595105
|
+
accessType,
|
|
595106
|
+
credentialType: provider.credentialType,
|
|
594762
595107
|
provider
|
|
594763
595108
|
};
|
|
594764
595109
|
}));
|
|
@@ -594772,49 +595117,22 @@ function ProviderFirstModelPicker({
|
|
|
594772
595117
|
return;
|
|
594773
595118
|
async function loadModels() {
|
|
594774
595119
|
setLoadingModels(true);
|
|
595120
|
+
setModelWarning(null);
|
|
594775
595121
|
const providerId = selectedProvider.value;
|
|
594776
|
-
const
|
|
594777
|
-
|
|
594778
|
-
|
|
594779
|
-
|
|
594780
|
-
|
|
594781
|
-
|
|
594782
|
-
|
|
594783
|
-
|
|
594784
|
-
|
|
594785
|
-
|
|
594786
|
-
|
|
594787
|
-
|
|
594788
|
-
|
|
594789
|
-
|
|
594790
|
-
const options2 = await getOllamaModelOptions(controller.signal);
|
|
594791
|
-
setModelOptions(options2);
|
|
594792
|
-
setModelSource("live");
|
|
594793
|
-
controller.abort();
|
|
594794
|
-
} else {
|
|
594795
|
-
const options2 = models.map((model) => ({
|
|
594796
|
-
value: model.id,
|
|
594797
|
-
label: model.displayName,
|
|
594798
|
-
description: model.description
|
|
594799
|
-
}));
|
|
594800
|
-
setModelOptions(options2);
|
|
594801
|
-
setModelSource("static");
|
|
594802
|
-
}
|
|
594803
|
-
} else {
|
|
594804
|
-
setModelOptions([]);
|
|
594805
|
-
setModelSource("static");
|
|
594806
|
-
}
|
|
594807
|
-
}
|
|
594808
|
-
} catch (error40) {
|
|
594809
|
-
const models = listModelsForProvider(providerId);
|
|
594810
|
-
const options2 = models.filter((m) => !m.isDynamic).map((model) => ({
|
|
594811
|
-
value: model.id,
|
|
594812
|
-
label: model.displayName,
|
|
594813
|
-
description: `${model.description} (cached)`
|
|
594814
|
-
}));
|
|
594815
|
-
setModelOptions(options2);
|
|
594816
|
-
setModelSource("cache");
|
|
594817
|
-
}
|
|
595122
|
+
const controller = new AbortController;
|
|
595123
|
+
const result = await listModelsForProviderWithSource(providerId, {
|
|
595124
|
+
settings: getSettingsForSource("userSettings") ?? undefined,
|
|
595125
|
+
signal: controller.signal
|
|
595126
|
+
});
|
|
595127
|
+
controller.abort();
|
|
595128
|
+
const options2 = result.models.map((model) => ({
|
|
595129
|
+
value: model.id,
|
|
595130
|
+
label: model.displayName,
|
|
595131
|
+
description: `${model.description} \xB7 ${result.source}`
|
|
595132
|
+
}));
|
|
595133
|
+
setModelOptions(options2);
|
|
595134
|
+
setModelSource(result.source);
|
|
595135
|
+
setModelWarning(result.warning ?? null);
|
|
594818
595136
|
setLoadingModels(false);
|
|
594819
595137
|
}
|
|
594820
595138
|
loadModels();
|
|
@@ -594854,18 +595172,23 @@ function ProviderFirstModelPicker({
|
|
|
594854
595172
|
source: modelSource
|
|
594855
595173
|
});
|
|
594856
595174
|
if (selectedProvider) {
|
|
594857
|
-
const validation =
|
|
595175
|
+
const validation = validateProviderModelPair(selectedProvider.value, value, {
|
|
595176
|
+
availableModels: modelOptions.map((option22) => option22.value)
|
|
595177
|
+
});
|
|
594858
595178
|
if (validation.valid === false) {
|
|
595179
|
+
setModelWarning(validation.error);
|
|
594859
595180
|
return;
|
|
594860
595181
|
}
|
|
594861
595182
|
}
|
|
594862
595183
|
if (selectedProvider) {
|
|
594863
|
-
|
|
594864
|
-
|
|
594865
|
-
|
|
594866
|
-
model: value
|
|
594867
|
-
}
|
|
595184
|
+
const saveResult = setProviderModel(selectedProvider.value, value, {
|
|
595185
|
+
availableModels: modelOptions.map((option22) => option22.value),
|
|
595186
|
+
modelSource
|
|
594868
595187
|
});
|
|
595188
|
+
if (!saveResult.ok) {
|
|
595189
|
+
setModelWarning(saveResult.message);
|
|
595190
|
+
return;
|
|
595191
|
+
}
|
|
594869
595192
|
}
|
|
594870
595193
|
setAppState((prev) => ({
|
|
594871
595194
|
...prev,
|
|
@@ -594877,23 +595200,18 @@ function ProviderFirstModelPicker({
|
|
|
594877
595200
|
effortValue: effort,
|
|
594878
595201
|
...hasToggledThinking ? { thinkingEnabled } : {}
|
|
594879
595202
|
}));
|
|
594880
|
-
|
|
594881
|
-
|
|
594882
|
-
|
|
594883
|
-
|
|
594884
|
-
|
|
594885
|
-
|
|
594886
|
-
confirmationParts.push(`Effort: ${capitalize_default(effort)}`);
|
|
594887
|
-
}
|
|
594888
|
-
if (thinkingEnabled && focusedModel && modelSupportsThinking(parseUserSpecifiedModel(value))) {
|
|
594889
|
-
confirmationParts.push(`Thinking: on`);
|
|
594890
|
-
}
|
|
594891
|
-
onSelect(value, effort);
|
|
595203
|
+
onSelect(value, effort, selectedProvider ? {
|
|
595204
|
+
providerId: selectedProvider.value,
|
|
595205
|
+
providerName: selectedProvider.label,
|
|
595206
|
+
accessType: selectedProvider.accessType,
|
|
595207
|
+
modelSource
|
|
595208
|
+
} : undefined);
|
|
594892
595209
|
}
|
|
594893
595210
|
function handleBack() {
|
|
594894
595211
|
setStep("provider");
|
|
594895
595212
|
setSelectedProvider(null);
|
|
594896
595213
|
setModelOptions([]);
|
|
595214
|
+
setModelWarning(null);
|
|
594897
595215
|
}
|
|
594898
595216
|
if (step === "provider") {
|
|
594899
595217
|
const content2 = /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
@@ -594970,12 +595288,19 @@ function ProviderFirstModelPicker({
|
|
|
594970
595288
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
594971
595289
|
color: focusedProvider.status === "connected" ? "success" : "error",
|
|
594972
595290
|
children: focusedProvider.status
|
|
594973
|
-
}, undefined, false, undefined, this)
|
|
595291
|
+
}, undefined, false, undefined, this),
|
|
595292
|
+
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595293
|
+
dimColor: true,
|
|
595294
|
+
children: [
|
|
595295
|
+
" \xB7 ",
|
|
595296
|
+
focusedProvider.statusLabel
|
|
595297
|
+
]
|
|
595298
|
+
}, undefined, true, undefined, this)
|
|
594974
595299
|
]
|
|
594975
595300
|
}, undefined, true, undefined, this),
|
|
594976
595301
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
594977
595302
|
dimColor: true,
|
|
594978
|
-
children: focusedProvider.provider.
|
|
595303
|
+
children: focusedProvider.provider.accessPathLabel
|
|
594979
595304
|
}, undefined, false, undefined, this),
|
|
594980
595305
|
focusedProvider.status !== "connected" && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
594981
595306
|
dimColor: true,
|
|
@@ -595045,6 +595370,14 @@ function ProviderFirstModelPicker({
|
|
|
595045
595370
|
")"
|
|
595046
595371
|
]
|
|
595047
595372
|
}, undefined, true, undefined, this),
|
|
595373
|
+
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595374
|
+
dimColor: true,
|
|
595375
|
+
color: "subtle",
|
|
595376
|
+
children: [
|
|
595377
|
+
"Model source: ",
|
|
595378
|
+
modelSource
|
|
595379
|
+
]
|
|
595380
|
+
}, undefined, true, undefined, this),
|
|
595048
595381
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595049
595382
|
dimColor: true,
|
|
595050
595383
|
color: "subtle",
|
|
@@ -595102,8 +595435,18 @@ function ProviderFirstModelPicker({
|
|
|
595102
595435
|
}, undefined, false, undefined, this)
|
|
595103
595436
|
]
|
|
595104
595437
|
}, undefined, true, undefined, this),
|
|
595438
|
+
modelWarning && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
595439
|
+
marginBottom: 1,
|
|
595440
|
+
flexDirection: "column",
|
|
595441
|
+
children: /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595442
|
+
dimColor: true,
|
|
595443
|
+
color: "error",
|
|
595444
|
+
children: modelWarning
|
|
595445
|
+
}, undefined, false, undefined, this)
|
|
595446
|
+
}, undefined, false, undefined, this),
|
|
595105
595447
|
modelOptions.length === 0 && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
595106
595448
|
marginBottom: 1,
|
|
595449
|
+
flexDirection: "column",
|
|
595107
595450
|
children: [
|
|
595108
595451
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595109
595452
|
dimColor: true,
|
|
@@ -595152,14 +595495,12 @@ function ProviderFirstModelPicker({
|
|
|
595152
595495
|
}, undefined, false, undefined, this);
|
|
595153
595496
|
}
|
|
595154
595497
|
function noop8() {}
|
|
595155
|
-
var import_react188, jsx_dev_runtime346, selectCurrentProvider = (s) => s.provider?.active ?? "ollama", selectEffortValue2 = (s) => s.effortValue,
|
|
595498
|
+
var import_react188, jsx_dev_runtime346, selectCurrentProvider = (s) => s.provider?.active ?? "ollama", selectEffortValue2 = (s) => s.effortValue, selectThinkingEnabled2 = (s) => s.thinkingEnabled;
|
|
595156
595499
|
var init_ProviderFirstModelPicker = __esm(() => {
|
|
595157
|
-
init_capitalize();
|
|
595158
595500
|
init_analytics();
|
|
595159
595501
|
init_providerRegistry();
|
|
595160
595502
|
init_AppState();
|
|
595161
595503
|
init_settings2();
|
|
595162
|
-
init_ollamaModels();
|
|
595163
595504
|
init_ink2();
|
|
595164
595505
|
init_AppState();
|
|
595165
595506
|
init_ConfigurableShortcutHint();
|
|
@@ -595208,7 +595549,7 @@ function ModelPickerWrapper(t0) {
|
|
|
595208
595549
|
const handleCancel = t1;
|
|
595209
595550
|
let t2;
|
|
595210
595551
|
if ($3[3] !== isFastMode || $3[4] !== mainLoopModel || $3[5] !== onDone || $3[6] !== setAppState) {
|
|
595211
|
-
t2 = function handleSelect2(model, effort) {
|
|
595552
|
+
t2 = function handleSelect2(model, effort, metadata) {
|
|
595212
595553
|
logEvent("tengu_model_command_menu", {
|
|
595213
595554
|
action: model,
|
|
595214
595555
|
from_model: mainLoopModel,
|
|
@@ -595219,7 +595560,9 @@ function ModelPickerWrapper(t0) {
|
|
|
595219
595560
|
mainLoopModel: model,
|
|
595220
595561
|
mainLoopModelForSession: null
|
|
595221
595562
|
}));
|
|
595222
|
-
let message = `
|
|
595563
|
+
let message = metadata ? `Selected provider: ${source_default.bold(metadata.providerName)} (${metadata.accessType})
|
|
595564
|
+
Selected model: ${source_default.bold(renderModelLabel(model))}
|
|
595565
|
+
Model source: ${metadata.modelSource}` : `Set model to ${source_default.bold(renderModelLabel(model))}`;
|
|
595223
595566
|
if (effort !== undefined) {
|
|
595224
595567
|
message = message + ` with ${source_default.bold(effort)} effort`;
|
|
595225
595568
|
}
|
|
@@ -595327,10 +595670,28 @@ function SetModelAndClose({
|
|
|
595327
595670
|
setModel(null);
|
|
595328
595671
|
return;
|
|
595329
595672
|
}
|
|
595330
|
-
|
|
595331
|
-
|
|
595673
|
+
const currentProvider = getActiveProviderSettings(getInitialSettings()).active ?? "ollama";
|
|
595674
|
+
const providerValidation = validateProviderModelPair(currentProvider, model);
|
|
595675
|
+
if (providerValidation.valid === false) {
|
|
595676
|
+
onDone(`Invalid model for current provider:
|
|
595677
|
+
Selected provider: ${currentProvider}
|
|
595678
|
+
Selected model: ${model}
|
|
595679
|
+
Valid models for ${currentProvider}: ${providerValidation.validModels.join(", ") || "(no models discovered)"}
|
|
595680
|
+
Suggested action: Run /model and choose a model from ${currentProvider}${providerValidation.suggestedModel ? `, or run: ur config set model ${providerValidation.suggestedModel}` : ""}
|
|
595681
|
+
Error: ${providerValidation.error}`, {
|
|
595682
|
+
display: "system"
|
|
595683
|
+
});
|
|
595684
|
+
return;
|
|
595685
|
+
}
|
|
595686
|
+
const saved = setProviderModel(currentProvider, model);
|
|
595687
|
+
if (!saved.ok) {
|
|
595688
|
+
onDone(saved.message, {
|
|
595689
|
+
display: "system"
|
|
595690
|
+
});
|
|
595332
595691
|
return;
|
|
595333
595692
|
}
|
|
595693
|
+
setModel(model);
|
|
595694
|
+
return;
|
|
595334
595695
|
try {
|
|
595335
595696
|
const {
|
|
595336
595697
|
valid,
|
|
@@ -595382,9 +595743,6 @@ function SetModelAndClose({
|
|
|
595382
595743
|
}, [model, onDone, setAppState]);
|
|
595383
595744
|
return null;
|
|
595384
595745
|
}
|
|
595385
|
-
function isKnownAlias(model) {
|
|
595386
|
-
return MODEL_ALIASES.includes(model.toLowerCase().trim());
|
|
595387
|
-
}
|
|
595388
595746
|
function ismodelO1mUnavailable(model) {
|
|
595389
595747
|
const m = model.toLowerCase();
|
|
595390
595748
|
return !checkmodelO1mAccess() && !ismodelO1mMergeEnabled() && m.includes("modelO") && m.includes("[1m]");
|
|
@@ -595465,6 +595823,8 @@ var init_model2 = __esm(() => {
|
|
|
595465
595823
|
init_model();
|
|
595466
595824
|
init_modelAllowlist();
|
|
595467
595825
|
init_validateModel();
|
|
595826
|
+
init_providerRegistry();
|
|
595827
|
+
init_settings2();
|
|
595468
595828
|
import_compiler_runtime263 = __toESM(require_compiler_runtime(), 1);
|
|
595469
595829
|
React105 = __toESM(require_react(), 1);
|
|
595470
595830
|
jsx_dev_runtime347 = __toESM(require_jsx_dev_runtime(), 1);
|
|
@@ -595519,7 +595879,7 @@ function ProviderPicker({
|
|
|
595519
595879
|
const selectOptions = providers.map((provider) => ({
|
|
595520
595880
|
value: provider.id,
|
|
595521
595881
|
label: provider.displayName,
|
|
595522
|
-
description: `${
|
|
595882
|
+
description: `${getProviderAccessTypeLabel(provider)} \xB7 ${provider.credentialType}`
|
|
595523
595883
|
}));
|
|
595524
595884
|
const visibleCount = Math.min(10, selectOptions.length);
|
|
595525
595885
|
const hiddenCount = Math.max(0, selectOptions.length - visibleCount);
|
|
@@ -595533,14 +595893,17 @@ function ProviderPicker({
|
|
|
595533
595893
|
from_provider: currentProvider,
|
|
595534
595894
|
to_provider: value
|
|
595535
595895
|
});
|
|
595536
|
-
|
|
595537
|
-
|
|
595538
|
-
|
|
595896
|
+
const result = setSafeProviderConfig("provider", value);
|
|
595897
|
+
if (!result.ok) {
|
|
595898
|
+
return;
|
|
595899
|
+
}
|
|
595900
|
+
const saved = getActiveProviderSettings(getSettingsForSource("userSettings") ?? {});
|
|
595539
595901
|
setAppState((prev) => ({
|
|
595540
595902
|
...prev,
|
|
595541
595903
|
provider: {
|
|
595542
595904
|
...prev.provider ?? {},
|
|
595543
|
-
active: value
|
|
595905
|
+
active: saved.active ?? value,
|
|
595906
|
+
model: saved.model
|
|
595544
595907
|
}
|
|
595545
595908
|
}));
|
|
595546
595909
|
onSelect(value);
|
|
@@ -595606,10 +595969,10 @@ function ProviderPicker({
|
|
|
595606
595969
|
focusedProvider.id,
|
|
595607
595970
|
") \xB7",
|
|
595608
595971
|
" ",
|
|
595609
|
-
|
|
595972
|
+
getProviderAccessTypeLabel(focusedProvider),
|
|
595610
595973
|
" \xB7",
|
|
595611
595974
|
" ",
|
|
595612
|
-
focusedProvider.
|
|
595975
|
+
focusedProvider.accessPathLabel
|
|
595613
595976
|
]
|
|
595614
595977
|
}, undefined, true, undefined, this)
|
|
595615
595978
|
}, undefined, false, undefined, this)
|
|
@@ -595646,7 +596009,6 @@ function ProviderPicker({
|
|
|
595646
596009
|
function noop9() {}
|
|
595647
596010
|
var import_react189, jsx_dev_runtime348, selectCurrentProvider2 = (s) => s.provider?.active ?? "ollama";
|
|
595648
596011
|
var init_ProviderPicker = __esm(() => {
|
|
595649
|
-
init_capitalize();
|
|
595650
596012
|
init_analytics();
|
|
595651
596013
|
init_providerRegistry();
|
|
595652
596014
|
init_AppState();
|
|
@@ -595751,7 +596113,7 @@ var jsx_dev_runtime349, call143 = async (onDone, _context, args) => {
|
|
|
595751
596113
|
const {
|
|
595752
596114
|
resolveProviderId: resolveProviderId2,
|
|
595753
596115
|
setSafeProviderConfig: setSafeProviderConfig2,
|
|
595754
|
-
validateProviderModelCompatibility:
|
|
596116
|
+
validateProviderModelCompatibility: validateProviderModelCompatibility2,
|
|
595755
596117
|
getActiveProviderSettings: getActiveProviderSettings2
|
|
595756
596118
|
} = await Promise.resolve().then(() => (init_providerRegistry(), exports_providerRegistry));
|
|
595757
596119
|
const { getInitialSettings: getInitialSettings2 } = await Promise.resolve().then(() => (init_settings2(), exports_settings));
|
|
@@ -595765,7 +596127,7 @@ var jsx_dev_runtime349, call143 = async (onDone, _context, args) => {
|
|
|
595765
596127
|
const settings = getInitialSettings2();
|
|
595766
596128
|
const currentModel = getActiveProviderSettings2(settings).model;
|
|
595767
596129
|
if (currentModel) {
|
|
595768
|
-
const validation =
|
|
596130
|
+
const validation = validateProviderModelCompatibility2(resolvedProvider, currentModel);
|
|
595769
596131
|
if (validation.valid === false) {
|
|
595770
596132
|
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
595771
596133
|
const suggestedModel = validation.suggestedModel ?? "see available models";
|
|
@@ -601720,7 +602082,7 @@ function generateHtmlReport(data, insights) {
|
|
|
601720
602082
|
</html>`;
|
|
601721
602083
|
}
|
|
601722
602084
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
601723
|
-
const version3 = typeof MACRO !== "undefined" ? "1.27.
|
|
602085
|
+
const version3 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
601724
602086
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
601725
602087
|
const facets_summary = {
|
|
601726
602088
|
total: facets.size,
|
|
@@ -605997,7 +606359,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
605997
606359
|
init_settings2();
|
|
605998
606360
|
init_slowOperations();
|
|
605999
606361
|
init_uuid();
|
|
606000
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.27.
|
|
606362
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
606001
606363
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
606002
606364
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
606003
606365
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -607202,7 +607564,7 @@ var init_filesystem = __esm(() => {
|
|
|
607202
607564
|
});
|
|
607203
607565
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
607204
607566
|
const nonce = randomBytes18(16).toString("hex");
|
|
607205
|
-
return join200(getURTempDir(), "bundled-skills", "1.27.
|
|
607567
|
+
return join200(getURTempDir(), "bundled-skills", "1.27.5", nonce);
|
|
607206
607568
|
});
|
|
607207
607569
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
607208
607570
|
});
|
|
@@ -613492,7 +613854,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
613492
613854
|
}
|
|
613493
613855
|
function computeFingerprintFromMessages(messages) {
|
|
613494
613856
|
const firstMessageText = extractFirstMessageText(messages);
|
|
613495
|
-
return computeFingerprint(firstMessageText, "1.27.
|
|
613857
|
+
return computeFingerprint(firstMessageText, "1.27.5");
|
|
613496
613858
|
}
|
|
613497
613859
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
613498
613860
|
var init_fingerprint = () => {};
|
|
@@ -615358,7 +615720,7 @@ async function sideQuery(opts) {
|
|
|
615358
615720
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
615359
615721
|
}
|
|
615360
615722
|
const messageText = extractFirstUserMessageText(messages);
|
|
615361
|
-
const fingerprint = computeFingerprint(messageText, "1.27.
|
|
615723
|
+
const fingerprint = computeFingerprint(messageText, "1.27.5");
|
|
615362
615724
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
615363
615725
|
const systemBlocks = [
|
|
615364
615726
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -620095,7 +620457,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
620095
620457
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
620096
620458
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
620097
620459
|
betas: getSdkBetas(),
|
|
620098
|
-
ur_version: "1.27.
|
|
620460
|
+
ur_version: "1.27.5",
|
|
620099
620461
|
output_style: outputStyle2,
|
|
620100
620462
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
620101
620463
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -634723,7 +635085,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
634723
635085
|
function getSemverPart(version3) {
|
|
634724
635086
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
634725
635087
|
}
|
|
634726
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.27.
|
|
635088
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.27.5") {
|
|
634727
635089
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
634728
635090
|
if (!updatedVersion) {
|
|
634729
635091
|
return null;
|
|
@@ -634772,7 +635134,7 @@ function AutoUpdater({
|
|
|
634772
635134
|
return;
|
|
634773
635135
|
}
|
|
634774
635136
|
if (false) {}
|
|
634775
|
-
const currentVersion = "1.27.
|
|
635137
|
+
const currentVersion = "1.27.5";
|
|
634776
635138
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
634777
635139
|
let latestVersion = await getLatestVersion(channel);
|
|
634778
635140
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -635001,12 +635363,12 @@ function NativeAutoUpdater({
|
|
|
635001
635363
|
logEvent("tengu_native_auto_updater_start", {});
|
|
635002
635364
|
try {
|
|
635003
635365
|
const maxVersion = await getMaxVersion();
|
|
635004
|
-
if (maxVersion && gt("1.27.
|
|
635366
|
+
if (maxVersion && gt("1.27.5", maxVersion)) {
|
|
635005
635367
|
const msg = await getMaxVersionMessage();
|
|
635006
635368
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
635007
635369
|
}
|
|
635008
635370
|
const result = await installLatest(channel);
|
|
635009
|
-
const currentVersion = "1.27.
|
|
635371
|
+
const currentVersion = "1.27.5";
|
|
635010
635372
|
const latencyMs = Date.now() - startTime;
|
|
635011
635373
|
if (result.lockFailed) {
|
|
635012
635374
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -635143,17 +635505,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
635143
635505
|
const maxVersion = await getMaxVersion();
|
|
635144
635506
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
635145
635507
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
635146
|
-
if (gte("1.27.
|
|
635147
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.27.
|
|
635508
|
+
if (gte("1.27.5", maxVersion)) {
|
|
635509
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.27.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
635148
635510
|
setUpdateAvailable(false);
|
|
635149
635511
|
return;
|
|
635150
635512
|
}
|
|
635151
635513
|
latest = maxVersion;
|
|
635152
635514
|
}
|
|
635153
|
-
const hasUpdate = latest && !gte("1.27.
|
|
635515
|
+
const hasUpdate = latest && !gte("1.27.5", latest) && !shouldSkipVersion(latest);
|
|
635154
635516
|
setUpdateAvailable(!!hasUpdate);
|
|
635155
635517
|
if (hasUpdate) {
|
|
635156
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.27.
|
|
635518
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.27.5"} -> ${latest}`);
|
|
635157
635519
|
}
|
|
635158
635520
|
};
|
|
635159
635521
|
$3[0] = t1;
|
|
@@ -635187,7 +635549,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
635187
635549
|
wrap: "truncate",
|
|
635188
635550
|
children: [
|
|
635189
635551
|
"currentVersion: ",
|
|
635190
|
-
"1.27.
|
|
635552
|
+
"1.27.5"
|
|
635191
635553
|
]
|
|
635192
635554
|
}, undefined, true, undefined, this);
|
|
635193
635555
|
$3[3] = verbose;
|
|
@@ -647633,7 +647995,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
647633
647995
|
project_dir: getOriginalCwd(),
|
|
647634
647996
|
added_dirs: addedDirs
|
|
647635
647997
|
},
|
|
647636
|
-
version: "1.27.
|
|
647998
|
+
version: "1.27.5",
|
|
647637
647999
|
output_style: {
|
|
647638
648000
|
name: outputStyleName
|
|
647639
648001
|
},
|
|
@@ -647708,7 +648070,7 @@ function StatusLineInner({
|
|
|
647708
648070
|
const taskValues = Object.values(tasks2);
|
|
647709
648071
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
647710
648072
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
647711
|
-
version: "1.27.
|
|
648073
|
+
version: "1.27.5",
|
|
647712
648074
|
providerLabel: providerRuntime.providerLabel,
|
|
647713
648075
|
authMode: providerRuntime.authLabel,
|
|
647714
648076
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -659194,7 +659556,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
659194
659556
|
} catch {}
|
|
659195
659557
|
const data = {
|
|
659196
659558
|
trigger: trigger2,
|
|
659197
|
-
version: "1.27.
|
|
659559
|
+
version: "1.27.5",
|
|
659198
659560
|
platform: process.platform,
|
|
659199
659561
|
transcript,
|
|
659200
659562
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -671076,7 +671438,7 @@ function WelcomeV2() {
|
|
|
671076
671438
|
dimColor: true,
|
|
671077
671439
|
children: [
|
|
671078
671440
|
"v",
|
|
671079
|
-
"1.27.
|
|
671441
|
+
"1.27.5"
|
|
671080
671442
|
]
|
|
671081
671443
|
}, undefined, true, undefined, this)
|
|
671082
671444
|
]
|
|
@@ -672336,7 +672698,7 @@ function completeOnboarding() {
|
|
|
672336
672698
|
saveGlobalConfig((current) => ({
|
|
672337
672699
|
...current,
|
|
672338
672700
|
hasCompletedOnboarding: true,
|
|
672339
|
-
lastOnboardingVersion: "1.27.
|
|
672701
|
+
lastOnboardingVersion: "1.27.5"
|
|
672340
672702
|
}));
|
|
672341
672703
|
}
|
|
672342
672704
|
function showDialog(root2, renderer) {
|
|
@@ -677437,7 +677799,7 @@ function appendToLog(path24, message) {
|
|
|
677437
677799
|
cwd: getFsImplementation().cwd(),
|
|
677438
677800
|
userType: process.env.USER_TYPE,
|
|
677439
677801
|
sessionId: getSessionId(),
|
|
677440
|
-
version: "1.27.
|
|
677802
|
+
version: "1.27.5"
|
|
677441
677803
|
};
|
|
677442
677804
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
677443
677805
|
}
|
|
@@ -681531,8 +681893,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
681531
681893
|
}
|
|
681532
681894
|
async function checkEnvLessBridgeMinVersion() {
|
|
681533
681895
|
const cfg = await getEnvLessBridgeConfig();
|
|
681534
|
-
if (cfg.min_version && lt("1.27.
|
|
681535
|
-
return `Your version of UR (${"1.27.
|
|
681896
|
+
if (cfg.min_version && lt("1.27.5", cfg.min_version)) {
|
|
681897
|
+
return `Your version of UR (${"1.27.5"}) is too old for Remote Control.
|
|
681536
681898
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
681537
681899
|
}
|
|
681538
681900
|
return null;
|
|
@@ -682006,7 +682368,7 @@ async function initBridgeCore(params) {
|
|
|
682006
682368
|
const rawApi = createBridgeApiClient({
|
|
682007
682369
|
baseUrl,
|
|
682008
682370
|
getAccessToken,
|
|
682009
|
-
runnerVersion: "1.27.
|
|
682371
|
+
runnerVersion: "1.27.5",
|
|
682010
682372
|
onDebug: logForDebugging,
|
|
682011
682373
|
onAuth401,
|
|
682012
682374
|
getTrustedDeviceToken
|
|
@@ -687687,7 +688049,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
687687
688049
|
setCwd(cwd3);
|
|
687688
688050
|
const server2 = new Server({
|
|
687689
688051
|
name: "ur/tengu",
|
|
687690
|
-
version: "1.27.
|
|
688052
|
+
version: "1.27.5"
|
|
687691
688053
|
}, {
|
|
687692
688054
|
capabilities: {
|
|
687693
688055
|
tools: {}
|
|
@@ -688297,9 +688659,9 @@ async function configSetHandler(key, values2) {
|
|
|
688297
688659
|
writeError(`Invalid model for current provider:
|
|
688298
688660
|
Selected provider: ${currentProvider}
|
|
688299
688661
|
Selected model: ${value}
|
|
688300
|
-
|
|
688301
|
-
|
|
688302
|
-
|
|
688662
|
+
Valid models for ${currentProvider}: ${validation.validModels.join(", ") || "(no models discovered)"}
|
|
688663
|
+
Suggested action: Run /model and choose a model from ${currentProvider}${validation.suggestedModel ? `, or run: ur config set model ${validation.suggestedModel}` : ""}
|
|
688664
|
+
Error: ${validation.error}`);
|
|
688303
688665
|
process.exit(1);
|
|
688304
688666
|
}
|
|
688305
688667
|
}
|
|
@@ -688313,9 +688675,9 @@ async function configSetHandler(key, values2) {
|
|
|
688313
688675
|
if (validation.valid === false) {
|
|
688314
688676
|
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
688315
688677
|
const suggestedModel = validation.suggestedModel ?? "<model-name>";
|
|
688316
|
-
writeError(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}".
|
|
688678
|
+
writeError(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}" and will be cleared.
|
|
688317
688679
|
Valid models for ${newProvider}: ${validModelsStr}
|
|
688318
|
-
After changing provider, run: ur config set model ${suggestedModel}`);
|
|
688680
|
+
After changing provider, run /model or: ur config set model ${suggestedModel}`);
|
|
688319
688681
|
}
|
|
688320
688682
|
}
|
|
688321
688683
|
}
|
|
@@ -689500,7 +689862,7 @@ async function update() {
|
|
|
689500
689862
|
logEvent("tengu_update_check", {});
|
|
689501
689863
|
const diagnostic = await getDoctorDiagnostic();
|
|
689502
689864
|
const result = await checkUpgradeStatus({
|
|
689503
|
-
currentVersion: "1.27.
|
|
689865
|
+
currentVersion: "1.27.5",
|
|
689504
689866
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
689505
689867
|
installationType: diagnostic.installationType,
|
|
689506
689868
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -690746,7 +691108,7 @@ ${customInstructions}` : customInstructions;
|
|
|
690746
691108
|
}
|
|
690747
691109
|
}
|
|
690748
691110
|
logForDiagnosticsNoPII("info", "started", {
|
|
690749
|
-
version: "1.27.
|
|
691111
|
+
version: "1.27.5",
|
|
690750
691112
|
is_native_binary: isInBundledMode()
|
|
690751
691113
|
});
|
|
690752
691114
|
registerCleanup(async () => {
|
|
@@ -691530,7 +691892,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
691530
691892
|
pendingHookMessages
|
|
691531
691893
|
}, renderAndRun);
|
|
691532
691894
|
}
|
|
691533
|
-
}).version("1.27.
|
|
691895
|
+
}).version("1.27.5 (UR-AGENT)", "-v, --version", "Output the version number");
|
|
691534
691896
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
691535
691897
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
691536
691898
|
if (canUserConfigureAdvisor()) {
|
|
@@ -692407,7 +692769,7 @@ if (false) {}
|
|
|
692407
692769
|
async function main2() {
|
|
692408
692770
|
const args = process.argv.slice(2);
|
|
692409
692771
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
692410
|
-
console.log(`${"1.27.
|
|
692772
|
+
console.log(`${"1.27.5"} (UR-AGENT)`);
|
|
692411
692773
|
return;
|
|
692412
692774
|
}
|
|
692413
692775
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|