ur-agent 1.24.1 → 1.25.0
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 +2 -1
- package/README.md +55 -4
- package/dist/cli.js +961 -75
- package/docs/CODE_FEATURE_INVENTORY.md +2 -1
- package/docs/CONFIGURATION.md +38 -2
- package/docs/USAGE.md +27 -3
- package/docs/VALIDATION.md +1 -1
- package/docs/providers.md +104 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -66884,7 +66884,7 @@ var init_auth = __esm(() => {
|
|
|
66884
66884
|
|
|
66885
66885
|
// src/utils/userAgent.ts
|
|
66886
66886
|
function getURCodeUserAgent() {
|
|
66887
|
-
return `ur/${"1.
|
|
66887
|
+
return `ur/${"1.25.0"}`;
|
|
66888
66888
|
}
|
|
66889
66889
|
|
|
66890
66890
|
// src/utils/workloadContext.ts
|
|
@@ -66906,7 +66906,7 @@ function getUserAgent() {
|
|
|
66906
66906
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
66907
66907
|
const workload = getWorkload();
|
|
66908
66908
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
66909
|
-
return `ur-cli/${"1.
|
|
66909
|
+
return `ur-cli/${"1.25.0"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
66910
66910
|
}
|
|
66911
66911
|
function getMCPUserAgent() {
|
|
66912
66912
|
const parts = [];
|
|
@@ -66920,7 +66920,7 @@ function getMCPUserAgent() {
|
|
|
66920
66920
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
66921
66921
|
}
|
|
66922
66922
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
66923
|
-
return `ur/${"1.
|
|
66923
|
+
return `ur/${"1.25.0"}${suffix}`;
|
|
66924
66924
|
}
|
|
66925
66925
|
function getWebFetchUserAgent() {
|
|
66926
66926
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -67058,7 +67058,7 @@ var init_user = __esm(() => {
|
|
|
67058
67058
|
deviceId,
|
|
67059
67059
|
sessionId: getSessionId(),
|
|
67060
67060
|
email: getEmail(),
|
|
67061
|
-
appVersion: "1.
|
|
67061
|
+
appVersion: "1.25.0",
|
|
67062
67062
|
platform: getHostPlatformForAnalytics(),
|
|
67063
67063
|
organizationUuid,
|
|
67064
67064
|
accountUuid,
|
|
@@ -73575,7 +73575,7 @@ var init_metadata = __esm(() => {
|
|
|
73575
73575
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
73576
73576
|
WHITESPACE_REGEX = /\s+/;
|
|
73577
73577
|
getVersionBase = memoize_default(() => {
|
|
73578
|
-
const match = "1.
|
|
73578
|
+
const match = "1.25.0".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
73579
73579
|
return match ? match[0] : undefined;
|
|
73580
73580
|
});
|
|
73581
73581
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -73615,7 +73615,7 @@ var init_metadata = __esm(() => {
|
|
|
73615
73615
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
73616
73616
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
73617
73617
|
isURAiAuth: isURAISubscriber2(),
|
|
73618
|
-
version: "1.
|
|
73618
|
+
version: "1.25.0",
|
|
73619
73619
|
versionBase: getVersionBase(),
|
|
73620
73620
|
buildTime: "",
|
|
73621
73621
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -74285,7 +74285,7 @@ function initialize1PEventLogging() {
|
|
|
74285
74285
|
const platform2 = getPlatform();
|
|
74286
74286
|
const attributes = {
|
|
74287
74287
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
74288
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.
|
|
74288
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.25.0"
|
|
74289
74289
|
};
|
|
74290
74290
|
if (platform2 === "wsl") {
|
|
74291
74291
|
const wslVersion = getWslVersion();
|
|
@@ -74312,7 +74312,7 @@ function initialize1PEventLogging() {
|
|
|
74312
74312
|
})
|
|
74313
74313
|
]
|
|
74314
74314
|
});
|
|
74315
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.
|
|
74315
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.25.0");
|
|
74316
74316
|
}
|
|
74317
74317
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
74318
74318
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -76721,7 +76721,7 @@ function isMcpServerCommandEntry(entry) {
|
|
|
76721
76721
|
function isMcpServerUrlEntry(entry) {
|
|
76722
76722
|
return "serverUrl" in entry && entry.serverUrl !== undefined;
|
|
76723
76723
|
}
|
|
76724
|
-
var EnvironmentVariablesSchema, PermissionsSchema, ExtraKnownMarketplaceSchema, AllowedMcpServerEntrySchema, DeniedMcpServerEntrySchema, CUSTOMIZATION_SURFACES, SettingsSchema;
|
|
76724
|
+
var EnvironmentVariablesSchema, PermissionsSchema, ExtraKnownMarketplaceSchema, AllowedMcpServerEntrySchema, DeniedMcpServerEntrySchema, CUSTOMIZATION_SURFACES, PROVIDER_SETTING_IDS, NonSecretPreferenceSchema, SettingsSchema;
|
|
76725
76725
|
var init_types2 = __esm(() => {
|
|
76726
76726
|
init_v4();
|
|
76727
76727
|
init_sandboxTypes();
|
|
@@ -76781,6 +76781,26 @@ var init_types2 = __esm(() => {
|
|
|
76781
76781
|
"hooks",
|
|
76782
76782
|
"mcp"
|
|
76783
76783
|
];
|
|
76784
|
+
PROVIDER_SETTING_IDS = [
|
|
76785
|
+
"codex-cli",
|
|
76786
|
+
"claude-code-cli",
|
|
76787
|
+
"gemini-cli",
|
|
76788
|
+
"antigravity-cli",
|
|
76789
|
+
"openai-api",
|
|
76790
|
+
"anthropic-api",
|
|
76791
|
+
"gemini-api",
|
|
76792
|
+
"openrouter",
|
|
76793
|
+
"openai-compatible",
|
|
76794
|
+
"ollama",
|
|
76795
|
+
"lmstudio",
|
|
76796
|
+
"llama.cpp",
|
|
76797
|
+
"vllm"
|
|
76798
|
+
];
|
|
76799
|
+
NonSecretPreferenceSchema = exports_external.union([
|
|
76800
|
+
exports_external.string(),
|
|
76801
|
+
exports_external.number(),
|
|
76802
|
+
exports_external.boolean()
|
|
76803
|
+
]);
|
|
76784
76804
|
SettingsSchema = lazySchema(() => exports_external.object({
|
|
76785
76805
|
$schema: exports_external.literal(UR_CODE_SETTINGS_SCHEMA_URL).optional().describe("JSON Schema reference for UR settings"),
|
|
76786
76806
|
apiKeyHelper: exports_external.string().optional().describe("Path to a script that outputs authentication values"),
|
|
@@ -76809,6 +76829,14 @@ var init_types2 = __esm(() => {
|
|
|
76809
76829
|
includeGitInstructions: exports_external.boolean().optional().describe("Include built-in commit and PR workflow instructions in UR's system prompt (default: true)"),
|
|
76810
76830
|
permissions: PermissionsSchema().optional().describe("Tool usage permissions configuration"),
|
|
76811
76831
|
model: exports_external.string().optional().describe("Override the default model used by UR"),
|
|
76832
|
+
provider: exports_external.object({
|
|
76833
|
+
active: exports_external.enum(PROVIDER_SETTING_IDS).optional().describe("Active legal model provider adapter"),
|
|
76834
|
+
model: exports_external.string().optional().describe("Selected model name for the active provider"),
|
|
76835
|
+
baseUrl: exports_external.string().optional().describe("Provider base URL without embedded credentials"),
|
|
76836
|
+
commandPath: exports_external.string().optional().describe("Explicit official CLI executable path for subscription providers"),
|
|
76837
|
+
fallback: exports_external.union([exports_external.enum(PROVIDER_SETTING_IDS), exports_external.literal("disabled")]).optional().describe("Optional fallback provider; UR asks before using it"),
|
|
76838
|
+
preferences: exports_external.record(exports_external.string(), NonSecretPreferenceSchema).optional().describe("Non-secret provider preferences only")
|
|
76839
|
+
}).optional().describe("Legal provider configuration; credentials must stay in environment variables or official CLIs"),
|
|
76812
76840
|
availableModels: exports_external.array(exports_external.string()).optional().describe("Allowlist of models that users can select. " + 'Accepts family aliases ("modelO" allows any modelO version), ' + 'version prefixes ("modelO-4-5" allows only that version), ' + "and full model IDs. " + "If undefined, all models are available. If empty array, only the default model is available. " + "Typically set in managed settings by enterprise administrators."),
|
|
76813
76841
|
modelOverrides: exports_external.record(exports_external.string(), exports_external.string()).optional().describe('Override mapping from URHQ model ID (e.g. "ur-modelO-4-6") to provider-specific ' + "model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by " + "enterprise administrators."),
|
|
76814
76842
|
enableAllProjectMcpServers: exports_external.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),
|
|
@@ -79550,7 +79578,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
79550
79578
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
79551
79579
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
79552
79580
|
}
|
|
79553
|
-
var urVersion = "1.
|
|
79581
|
+
var urVersion = "1.25.0", coverage, priorityRoadmap;
|
|
79554
79582
|
var init_trends = __esm(() => {
|
|
79555
79583
|
coverage = [
|
|
79556
79584
|
{
|
|
@@ -81542,7 +81570,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
81542
81570
|
if (!isAttributionHeaderEnabled()) {
|
|
81543
81571
|
return "";
|
|
81544
81572
|
}
|
|
81545
|
-
const version2 = `${"1.
|
|
81573
|
+
const version2 = `${"1.25.0"}.${fingerprint}`;
|
|
81546
81574
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
81547
81575
|
const cch = "";
|
|
81548
81576
|
const workload = getWorkload();
|
|
@@ -124970,7 +124998,7 @@ function getEffortLevelDescription(level) {
|
|
|
124970
124998
|
case "high":
|
|
124971
124999
|
return "Comprehensive implementation with extensive testing and documentation";
|
|
124972
125000
|
case "max":
|
|
124973
|
-
return "Maximum capability with deepest reasoning
|
|
125001
|
+
return "Maximum capability with deepest reasoning";
|
|
124974
125002
|
}
|
|
124975
125003
|
}
|
|
124976
125004
|
function getEffortValueDescription(value) {
|
|
@@ -128869,7 +128897,7 @@ How to use the statusLine command:
|
|
|
128869
128897
|
"project_dir": "string", // Project root directory path
|
|
128870
128898
|
"added_dirs": ["string"] // Directories added via /add-dir
|
|
128871
128899
|
},
|
|
128872
|
-
"version": "string", // UR-AGENT app version (e.g., "1.
|
|
128900
|
+
"version": "string", // UR-AGENT app version (e.g., "1.25.0")
|
|
128873
128901
|
"output_style": {
|
|
128874
128902
|
"name": "string", // Output style name (e.g., "default", "Explanatory", "Learning")
|
|
128875
128903
|
},
|
|
@@ -189211,7 +189239,7 @@ function getTelemetryAttributes() {
|
|
|
189211
189239
|
attributes["session.id"] = sessionId;
|
|
189212
189240
|
}
|
|
189213
189241
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
189214
|
-
attributes["app.version"] = "1.
|
|
189242
|
+
attributes["app.version"] = "1.25.0";
|
|
189215
189243
|
}
|
|
189216
189244
|
const oauthAccount = getOauthAccountInfo();
|
|
189217
189245
|
if (oauthAccount) {
|
|
@@ -224617,7 +224645,7 @@ function getInstallationEnv() {
|
|
|
224617
224645
|
return;
|
|
224618
224646
|
}
|
|
224619
224647
|
function getURCodeVersion() {
|
|
224620
|
-
return "1.
|
|
224648
|
+
return "1.25.0";
|
|
224621
224649
|
}
|
|
224622
224650
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
224623
224651
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -227345,7 +227373,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
227345
227373
|
const client2 = new Client({
|
|
227346
227374
|
name: "ur",
|
|
227347
227375
|
title: "UR",
|
|
227348
|
-
version: "1.
|
|
227376
|
+
version: "1.25.0",
|
|
227349
227377
|
description: "URHQ's agentic coding tool",
|
|
227350
227378
|
websiteUrl: PRODUCT_URL
|
|
227351
227379
|
}, {
|
|
@@ -227699,7 +227727,7 @@ var init_client5 = __esm(() => {
|
|
|
227699
227727
|
const client2 = new Client({
|
|
227700
227728
|
name: "ur",
|
|
227701
227729
|
title: "UR",
|
|
227702
|
-
version: "1.
|
|
227730
|
+
version: "1.25.0",
|
|
227703
227731
|
description: "URHQ's agentic coding tool",
|
|
227704
227732
|
websiteUrl: PRODUCT_URL
|
|
227705
227733
|
}, {
|
|
@@ -237512,9 +237540,9 @@ async function assertMinVersion() {
|
|
|
237512
237540
|
if (false) {}
|
|
237513
237541
|
try {
|
|
237514
237542
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
237515
|
-
if (versionConfig.minVersion && lt("1.
|
|
237543
|
+
if (versionConfig.minVersion && lt("1.25.0", versionConfig.minVersion)) {
|
|
237516
237544
|
console.error(`
|
|
237517
|
-
It looks like your version of UR (${"1.
|
|
237545
|
+
It looks like your version of UR (${"1.25.0"}) needs an update.
|
|
237518
237546
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
237519
237547
|
|
|
237520
237548
|
To update, please run:
|
|
@@ -237730,7 +237758,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
237730
237758
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
237731
237759
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
237732
237760
|
pid: process.pid,
|
|
237733
|
-
currentVersion: "1.
|
|
237761
|
+
currentVersion: "1.25.0"
|
|
237734
237762
|
});
|
|
237735
237763
|
return "in_progress";
|
|
237736
237764
|
}
|
|
@@ -237739,7 +237767,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
237739
237767
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
237740
237768
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
237741
237769
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
237742
|
-
currentVersion: "1.
|
|
237770
|
+
currentVersion: "1.25.0"
|
|
237743
237771
|
});
|
|
237744
237772
|
console.error(`
|
|
237745
237773
|
Error: Windows NPM detected in WSL
|
|
@@ -238274,7 +238302,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
238274
238302
|
}
|
|
238275
238303
|
async function getDoctorDiagnostic() {
|
|
238276
238304
|
const installationType = await getCurrentInstallationType();
|
|
238277
|
-
const version2 = typeof MACRO !== "undefined" ? "1.
|
|
238305
|
+
const version2 = typeof MACRO !== "undefined" ? "1.25.0" : "unknown";
|
|
238278
238306
|
const installationPath = await getInstallationPath();
|
|
238279
238307
|
const invokedBinary = getInvokedBinary();
|
|
238280
238308
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -239209,8 +239237,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
239209
239237
|
const maxVersion = await getMaxVersion();
|
|
239210
239238
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
239211
239239
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
239212
|
-
if (gte("1.
|
|
239213
|
-
logForDebugging(`Native installer: current version ${"1.
|
|
239240
|
+
if (gte("1.25.0", maxVersion)) {
|
|
239241
|
+
logForDebugging(`Native installer: current version ${"1.25.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
239214
239242
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
239215
239243
|
latency_ms: Date.now() - startTime,
|
|
239216
239244
|
max_version: maxVersion,
|
|
@@ -239221,7 +239249,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
239221
239249
|
version2 = maxVersion;
|
|
239222
239250
|
}
|
|
239223
239251
|
}
|
|
239224
|
-
if (!forceReinstall && version2 === "1.
|
|
239252
|
+
if (!forceReinstall && version2 === "1.25.0" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
239225
239253
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
239226
239254
|
logEvent("tengu_native_update_complete", {
|
|
239227
239255
|
latency_ms: Date.now() - startTime,
|
|
@@ -294235,7 +294263,7 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
294235
294263
|
questionSchema = lazySchema(() => exports_external.object({
|
|
294236
294264
|
question: exports_external.string().describe('The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"'),
|
|
294237
294265
|
header: exports_external.string().describe(`Very short label displayed as a chip/tag (max ${ASK_USER_QUESTION_TOOL_CHIP_WIDTH} chars). Examples: "Auth method", "Library", "Approach".`),
|
|
294238
|
-
options: exports_external.array(questionOptionSchema()).min(2).max(
|
|
294266
|
+
options: exports_external.array(questionOptionSchema()).min(2).max(8).describe(`The available choices for this question. Must have 2-8 options. Keep options concise and distinct; there should be no 'Other' option, that will be provided automatically.`),
|
|
294239
294267
|
multiSelect: exports_external.boolean().default(false).describe("Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.")
|
|
294240
294268
|
}));
|
|
294241
294269
|
annotationsSchema = lazySchema(() => {
|
|
@@ -336133,7 +336161,7 @@ function Feedback({
|
|
|
336133
336161
|
platform: env2.platform,
|
|
336134
336162
|
gitRepo: envInfo.isGit,
|
|
336135
336163
|
terminal: env2.terminal,
|
|
336136
|
-
version: "1.
|
|
336164
|
+
version: "1.25.0",
|
|
336137
336165
|
transcript: normalizeMessagesForAPI(messages),
|
|
336138
336166
|
errors: sanitizedErrors,
|
|
336139
336167
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -336325,7 +336353,7 @@ function Feedback({
|
|
|
336325
336353
|
", ",
|
|
336326
336354
|
env2.terminal,
|
|
336327
336355
|
", v",
|
|
336328
|
-
"1.
|
|
336356
|
+
"1.25.0"
|
|
336329
336357
|
]
|
|
336330
336358
|
}, undefined, true, undefined, this)
|
|
336331
336359
|
]
|
|
@@ -336431,7 +336459,7 @@ ${sanitizedDescription}
|
|
|
336431
336459
|
` + `**Environment Info**
|
|
336432
336460
|
` + `- Platform: ${env2.platform}
|
|
336433
336461
|
` + `- Terminal: ${env2.terminal}
|
|
336434
|
-
` + `- Version: ${"1.
|
|
336462
|
+
` + `- Version: ${"1.25.0"}
|
|
336435
336463
|
` + `- Feedback ID: ${feedbackId}
|
|
336436
336464
|
` + `
|
|
336437
336465
|
**Errors**
|
|
@@ -339542,7 +339570,7 @@ function buildPrimarySection() {
|
|
|
339542
339570
|
}, undefined, false, undefined, this);
|
|
339543
339571
|
return [{
|
|
339544
339572
|
label: "Version",
|
|
339545
|
-
value: "1.
|
|
339573
|
+
value: "1.25.0"
|
|
339546
339574
|
}, {
|
|
339547
339575
|
label: "Session name",
|
|
339548
339576
|
value: nameValue
|
|
@@ -342820,7 +342848,7 @@ function Config({
|
|
|
342820
342848
|
}
|
|
342821
342849
|
}, undefined, false, undefined, this)
|
|
342822
342850
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
342823
|
-
currentVersion: "1.
|
|
342851
|
+
currentVersion: "1.25.0",
|
|
342824
342852
|
onChoice: (choice) => {
|
|
342825
342853
|
setShowSubmenu(null);
|
|
342826
342854
|
setTabsHidden(false);
|
|
@@ -342832,7 +342860,7 @@ function Config({
|
|
|
342832
342860
|
autoUpdatesChannel: "stable"
|
|
342833
342861
|
};
|
|
342834
342862
|
if (choice === "stay") {
|
|
342835
|
-
newSettings.minimumVersion = "1.
|
|
342863
|
+
newSettings.minimumVersion = "1.25.0";
|
|
342836
342864
|
}
|
|
342837
342865
|
updateSettingsForSource("userSettings", newSettings);
|
|
342838
342866
|
setSettingsData((prev_27) => ({
|
|
@@ -350902,7 +350930,7 @@ function HelpV2(t0) {
|
|
|
350902
350930
|
let t6;
|
|
350903
350931
|
if ($3[31] !== tabs) {
|
|
350904
350932
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
350905
|
-
title: `UR v${"1.
|
|
350933
|
+
title: `UR v${"1.25.0"}`,
|
|
350906
350934
|
color: "professionalBlue",
|
|
350907
350935
|
defaultTab: "general",
|
|
350908
350936
|
children: tabs
|
|
@@ -371004,7 +371032,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
371004
371032
|
return [];
|
|
371005
371033
|
}
|
|
371006
371034
|
}
|
|
371007
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.
|
|
371035
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.25.0") {
|
|
371008
371036
|
if (process.env.USER_TYPE === "ant") {
|
|
371009
371037
|
const changelog = "";
|
|
371010
371038
|
if (changelog) {
|
|
@@ -371031,7 +371059,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.24.1")
|
|
|
371031
371059
|
releaseNotes
|
|
371032
371060
|
};
|
|
371033
371061
|
}
|
|
371034
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.
|
|
371062
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.25.0") {
|
|
371035
371063
|
if (process.env.USER_TYPE === "ant") {
|
|
371036
371064
|
const changelog = "";
|
|
371037
371065
|
if (changelog) {
|
|
@@ -372201,7 +372229,7 @@ function getRecentActivitySync() {
|
|
|
372201
372229
|
return cachedActivity;
|
|
372202
372230
|
}
|
|
372203
372231
|
function getLogoDisplayData() {
|
|
372204
|
-
const version2 = process.env.DEMO_VERSION ?? "1.
|
|
372232
|
+
const version2 = process.env.DEMO_VERSION ?? "1.25.0";
|
|
372205
372233
|
const serverUrl = getDirectConnectServerUrl();
|
|
372206
372234
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd2());
|
|
372207
372235
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -372990,7 +373018,7 @@ function LogoV2() {
|
|
|
372990
373018
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
372991
373019
|
t2 = () => {
|
|
372992
373020
|
const currentConfig = getGlobalConfig();
|
|
372993
|
-
if (currentConfig.lastReleaseNotesSeen === "1.
|
|
373021
|
+
if (currentConfig.lastReleaseNotesSeen === "1.25.0") {
|
|
372994
373022
|
return;
|
|
372995
373023
|
}
|
|
372996
373024
|
saveGlobalConfig(_temp326);
|
|
@@ -373675,12 +373703,12 @@ function LogoV2() {
|
|
|
373675
373703
|
return t41;
|
|
373676
373704
|
}
|
|
373677
373705
|
function _temp326(current) {
|
|
373678
|
-
if (current.lastReleaseNotesSeen === "1.
|
|
373706
|
+
if (current.lastReleaseNotesSeen === "1.25.0") {
|
|
373679
373707
|
return current;
|
|
373680
373708
|
}
|
|
373681
373709
|
return {
|
|
373682
373710
|
...current,
|
|
373683
|
-
lastReleaseNotesSeen: "1.
|
|
373711
|
+
lastReleaseNotesSeen: "1.25.0"
|
|
373684
373712
|
};
|
|
373685
373713
|
}
|
|
373686
373714
|
function _temp243(s_0) {
|
|
@@ -390669,7 +390697,7 @@ function buildToolUseContext(tools, readFileStateCache) {
|
|
|
390669
390697
|
async function handleInitialize() {
|
|
390670
390698
|
return {
|
|
390671
390699
|
name: "ur-agent",
|
|
390672
|
-
version: "1.
|
|
390700
|
+
version: "1.25.0",
|
|
390673
390701
|
protocolVersion: "0.1.0"
|
|
390674
390702
|
};
|
|
390675
390703
|
}
|
|
@@ -589663,7 +589691,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
589663
589691
|
smapsRollup,
|
|
589664
589692
|
platform: process.platform,
|
|
589665
589693
|
nodeVersion: process.version,
|
|
589666
|
-
ccVersion: "1.
|
|
589694
|
+
ccVersion: "1.25.0"
|
|
589667
589695
|
};
|
|
589668
589696
|
}
|
|
589669
589697
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -590249,7 +590277,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
590249
590277
|
var call136 = async () => {
|
|
590250
590278
|
return {
|
|
590251
590279
|
type: "text",
|
|
590252
|
-
value: "1.
|
|
590280
|
+
value: "1.25.0"
|
|
590253
590281
|
};
|
|
590254
590282
|
}, version2, version_default;
|
|
590255
590283
|
var init_version = __esm(() => {
|
|
@@ -594796,7 +594824,7 @@ Effort levels:
|
|
|
594796
594824
|
- low: Quick, straightforward implementation
|
|
594797
594825
|
- medium: Balanced approach with standard testing
|
|
594798
594826
|
- high: Comprehensive implementation with extensive testing
|
|
594799
|
-
- max: Maximum capability with deepest reasoning
|
|
594827
|
+
- max: Maximum capability with deepest reasoning
|
|
594800
594828
|
- auto: Use the default effort level for your model`);
|
|
594801
594829
|
return;
|
|
594802
594830
|
}
|
|
@@ -599341,7 +599369,7 @@ function generateHtmlReport(data, insights) {
|
|
|
599341
599369
|
</html>`;
|
|
599342
599370
|
}
|
|
599343
599371
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
599344
|
-
const version3 = typeof MACRO !== "undefined" ? "1.
|
|
599372
|
+
const version3 = typeof MACRO !== "undefined" ? "1.25.0" : "unknown";
|
|
599345
599373
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
599346
599374
|
const facets_summary = {
|
|
599347
599375
|
total: facets.size,
|
|
@@ -603616,7 +603644,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
603616
603644
|
init_settings2();
|
|
603617
603645
|
init_slowOperations();
|
|
603618
603646
|
init_uuid();
|
|
603619
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.
|
|
603647
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.25.0" : "unknown";
|
|
603620
603648
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
603621
603649
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
603622
603650
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -604821,7 +604849,7 @@ var init_filesystem = __esm(() => {
|
|
|
604821
604849
|
});
|
|
604822
604850
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
604823
604851
|
const nonce = randomBytes18(16).toString("hex");
|
|
604824
|
-
return join200(getURTempDir(), "bundled-skills", "1.
|
|
604852
|
+
return join200(getURTempDir(), "bundled-skills", "1.25.0", nonce);
|
|
604825
604853
|
});
|
|
604826
604854
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
604827
604855
|
});
|
|
@@ -611111,7 +611139,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
611111
611139
|
}
|
|
611112
611140
|
function computeFingerprintFromMessages(messages) {
|
|
611113
611141
|
const firstMessageText = extractFirstMessageText(messages);
|
|
611114
|
-
return computeFingerprint(firstMessageText, "1.
|
|
611142
|
+
return computeFingerprint(firstMessageText, "1.25.0");
|
|
611115
611143
|
}
|
|
611116
611144
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
611117
611145
|
var init_fingerprint = () => {};
|
|
@@ -612977,7 +613005,7 @@ async function sideQuery(opts) {
|
|
|
612977
613005
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
612978
613006
|
}
|
|
612979
613007
|
const messageText = extractFirstUserMessageText(messages);
|
|
612980
|
-
const fingerprint = computeFingerprint(messageText, "1.
|
|
613008
|
+
const fingerprint = computeFingerprint(messageText, "1.25.0");
|
|
612981
613009
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
612982
613010
|
const systemBlocks = [
|
|
612983
613011
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -617714,7 +617742,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
617714
617742
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
617715
617743
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
617716
617744
|
betas: getSdkBetas(),
|
|
617717
|
-
ur_version: "1.
|
|
617745
|
+
ur_version: "1.25.0",
|
|
617718
617746
|
output_style: outputStyle2,
|
|
617719
617747
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
617720
617748
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -632342,7 +632370,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
632342
632370
|
function getSemverPart(version3) {
|
|
632343
632371
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
632344
632372
|
}
|
|
632345
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.
|
|
632373
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.25.0") {
|
|
632346
632374
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react224.useState(() => getSemverPart(initialVersion));
|
|
632347
632375
|
if (!updatedVersion) {
|
|
632348
632376
|
return null;
|
|
@@ -632391,7 +632419,7 @@ function AutoUpdater({
|
|
|
632391
632419
|
return;
|
|
632392
632420
|
}
|
|
632393
632421
|
if (false) {}
|
|
632394
|
-
const currentVersion = "1.
|
|
632422
|
+
const currentVersion = "1.25.0";
|
|
632395
632423
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
632396
632424
|
let latestVersion = await getLatestVersion(channel);
|
|
632397
632425
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -632620,12 +632648,12 @@ function NativeAutoUpdater({
|
|
|
632620
632648
|
logEvent("tengu_native_auto_updater_start", {});
|
|
632621
632649
|
try {
|
|
632622
632650
|
const maxVersion = await getMaxVersion();
|
|
632623
|
-
if (maxVersion && gt("1.
|
|
632651
|
+
if (maxVersion && gt("1.25.0", maxVersion)) {
|
|
632624
632652
|
const msg = await getMaxVersionMessage();
|
|
632625
632653
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
632626
632654
|
}
|
|
632627
632655
|
const result = await installLatest(channel);
|
|
632628
|
-
const currentVersion = "1.
|
|
632656
|
+
const currentVersion = "1.25.0";
|
|
632629
632657
|
const latencyMs = Date.now() - startTime;
|
|
632630
632658
|
if (result.lockFailed) {
|
|
632631
632659
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -632762,17 +632790,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
632762
632790
|
const maxVersion = await getMaxVersion();
|
|
632763
632791
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
632764
632792
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
632765
|
-
if (gte("1.
|
|
632766
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.
|
|
632793
|
+
if (gte("1.25.0", maxVersion)) {
|
|
632794
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.25.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
632767
632795
|
setUpdateAvailable(false);
|
|
632768
632796
|
return;
|
|
632769
632797
|
}
|
|
632770
632798
|
latest = maxVersion;
|
|
632771
632799
|
}
|
|
632772
|
-
const hasUpdate = latest && !gte("1.
|
|
632800
|
+
const hasUpdate = latest && !gte("1.25.0", latest) && !shouldSkipVersion(latest);
|
|
632773
632801
|
setUpdateAvailable(!!hasUpdate);
|
|
632774
632802
|
if (hasUpdate) {
|
|
632775
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.
|
|
632803
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.25.0"} -> ${latest}`);
|
|
632776
632804
|
}
|
|
632777
632805
|
};
|
|
632778
632806
|
$3[0] = t1;
|
|
@@ -632806,7 +632834,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
632806
632834
|
wrap: "truncate",
|
|
632807
632835
|
children: [
|
|
632808
632836
|
"currentVersion: ",
|
|
632809
|
-
"1.
|
|
632837
|
+
"1.25.0"
|
|
632810
632838
|
]
|
|
632811
632839
|
}, undefined, true, undefined, this);
|
|
632812
632840
|
$3[3] = verbose;
|
|
@@ -645119,6 +645147,715 @@ var init_VimTextInput = __esm(() => {
|
|
|
645119
645147
|
jsx_dev_runtime420 = __toESM(require_jsx_dev_runtime(), 1);
|
|
645120
645148
|
});
|
|
645121
645149
|
|
|
645150
|
+
// src/services/providers/providerRegistry.ts
|
|
645151
|
+
import { spawn as spawn12 } from "child_process";
|
|
645152
|
+
function isProviderId(value) {
|
|
645153
|
+
return PROVIDER_IDS.includes(value);
|
|
645154
|
+
}
|
|
645155
|
+
function getProviderDefinition(id) {
|
|
645156
|
+
return PROVIDERS[id];
|
|
645157
|
+
}
|
|
645158
|
+
function getActiveProviderSettings(settings = getInitialSettings()) {
|
|
645159
|
+
const configured = settings.provider ?? {};
|
|
645160
|
+
const active = configured.active && isProviderId(configured.active) ? configured.active : "ollama";
|
|
645161
|
+
return {
|
|
645162
|
+
active,
|
|
645163
|
+
model: configured.model ?? settings.model,
|
|
645164
|
+
baseUrl: configured.baseUrl,
|
|
645165
|
+
commandPath: configured.commandPath,
|
|
645166
|
+
fallback: configured.fallback
|
|
645167
|
+
};
|
|
645168
|
+
}
|
|
645169
|
+
function getProviderRuntimeInfo(settings = getInitialSettings()) {
|
|
645170
|
+
const providerSettings = getActiveProviderSettings(settings);
|
|
645171
|
+
const provider = providerSettings.active ?? "ollama";
|
|
645172
|
+
const definition = getProviderDefinition(provider);
|
|
645173
|
+
return {
|
|
645174
|
+
provider,
|
|
645175
|
+
providerLabel: definition.statusBarName,
|
|
645176
|
+
authMode: definition.authMode,
|
|
645177
|
+
authLabel: authModeLabel(definition.authMode),
|
|
645178
|
+
model: providerSettings.model,
|
|
645179
|
+
baseUrl: providerSettings.baseUrl ?? definition.defaultBaseUrl,
|
|
645180
|
+
fallback: providerSettings.fallback
|
|
645181
|
+
};
|
|
645182
|
+
}
|
|
645183
|
+
function authModeLabel(mode2) {
|
|
645184
|
+
switch (mode2) {
|
|
645185
|
+
case "subscription":
|
|
645186
|
+
return "subscription";
|
|
645187
|
+
case "enterprise-login":
|
|
645188
|
+
return "enterprise-login";
|
|
645189
|
+
case "personal-login":
|
|
645190
|
+
return "personal-login";
|
|
645191
|
+
case "api":
|
|
645192
|
+
return "API";
|
|
645193
|
+
case "local":
|
|
645194
|
+
return "local";
|
|
645195
|
+
}
|
|
645196
|
+
}
|
|
645197
|
+
function listProviders() {
|
|
645198
|
+
return PROVIDER_IDS.map((id) => PROVIDERS[id]);
|
|
645199
|
+
}
|
|
645200
|
+
function hasSecretLikeValue(value) {
|
|
645201
|
+
const trimmed = value.trim();
|
|
645202
|
+
if (/^(sk-|sk_|sk-proj-|sk-ant-|xox[baprs]-|gh[pousr]_|AIza)/i.test(trimmed)) {
|
|
645203
|
+
return true;
|
|
645204
|
+
}
|
|
645205
|
+
if (/token|refresh|oauth|secret|api[_-]?key/i.test(trimmed)) {
|
|
645206
|
+
return true;
|
|
645207
|
+
}
|
|
645208
|
+
try {
|
|
645209
|
+
const url3 = new URL(trimmed);
|
|
645210
|
+
return Boolean(url3.username || url3.password);
|
|
645211
|
+
} catch {
|
|
645212
|
+
return false;
|
|
645213
|
+
}
|
|
645214
|
+
}
|
|
645215
|
+
function normalizeBaseUrl2(value) {
|
|
645216
|
+
const trimmed = value.trim();
|
|
645217
|
+
const withScheme = /^https?:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`;
|
|
645218
|
+
const url3 = new URL(withScheme);
|
|
645219
|
+
if (url3.username || url3.password) {
|
|
645220
|
+
throw new Error("base_url must not contain embedded credentials");
|
|
645221
|
+
}
|
|
645222
|
+
return withScheme.replace(/\/$/, "");
|
|
645223
|
+
}
|
|
645224
|
+
function setSafeProviderConfig(key, value) {
|
|
645225
|
+
const trimmed = value.trim();
|
|
645226
|
+
if (!trimmed) {
|
|
645227
|
+
return { ok: false, message: `Missing value for ${key}.` };
|
|
645228
|
+
}
|
|
645229
|
+
if (hasSecretLikeValue(trimmed)) {
|
|
645230
|
+
return {
|
|
645231
|
+
ok: false,
|
|
645232
|
+
message: "Refusing to store credential-like data. Put API keys in environment variables and select API mode explicitly."
|
|
645233
|
+
};
|
|
645234
|
+
}
|
|
645235
|
+
let settings;
|
|
645236
|
+
try {
|
|
645237
|
+
if (key === "provider") {
|
|
645238
|
+
if (!isProviderId(trimmed)) {
|
|
645239
|
+
return {
|
|
645240
|
+
ok: false,
|
|
645241
|
+
message: `Unknown provider "${trimmed}". Run: ur provider list`
|
|
645242
|
+
};
|
|
645243
|
+
}
|
|
645244
|
+
settings = { provider: { active: trimmed } };
|
|
645245
|
+
} else if (key === "provider.fallback") {
|
|
645246
|
+
if (trimmed !== "disabled" && !isProviderId(trimmed)) {
|
|
645247
|
+
return {
|
|
645248
|
+
ok: false,
|
|
645249
|
+
message: `Unknown fallback provider "${trimmed}". Run: ur provider list`
|
|
645250
|
+
};
|
|
645251
|
+
}
|
|
645252
|
+
settings = { provider: { fallback: trimmed } };
|
|
645253
|
+
} else if (key === "provider.command_path") {
|
|
645254
|
+
settings = { provider: { commandPath: trimmed } };
|
|
645255
|
+
} else if (key === "model") {
|
|
645256
|
+
settings = { provider: { model: trimmed }, model: trimmed };
|
|
645257
|
+
} else {
|
|
645258
|
+
settings = { provider: { baseUrl: normalizeBaseUrl2(trimmed) } };
|
|
645259
|
+
}
|
|
645260
|
+
} catch (error40) {
|
|
645261
|
+
return {
|
|
645262
|
+
ok: false,
|
|
645263
|
+
message: error40 instanceof Error ? error40.message : String(error40)
|
|
645264
|
+
};
|
|
645265
|
+
}
|
|
645266
|
+
const result = updateSettingsForSource("userSettings", settings);
|
|
645267
|
+
if (result.error) {
|
|
645268
|
+
return {
|
|
645269
|
+
ok: false,
|
|
645270
|
+
message: `Failed to write UR-AGENT settings: ${result.error.message}`
|
|
645271
|
+
};
|
|
645272
|
+
}
|
|
645273
|
+
return { ok: true, message: `Set ${key} to ${trimmed}.` };
|
|
645274
|
+
}
|
|
645275
|
+
function outputText(result) {
|
|
645276
|
+
return `${result.stdout}
|
|
645277
|
+
${result.stderr}
|
|
645278
|
+
${result.error ?? ""}`.trim();
|
|
645279
|
+
}
|
|
645280
|
+
function classifiesAsLoggedIn(text) {
|
|
645281
|
+
return /logged in|authenticated|signed in|active account|using chatgpt/i.test(text);
|
|
645282
|
+
}
|
|
645283
|
+
function classifiesAsNotLoggedIn(text) {
|
|
645284
|
+
return /not logged in|not authenticated|not signed in|login required|unauthenticated/i.test(text);
|
|
645285
|
+
}
|
|
645286
|
+
function classifyGeminiAccountSupport(text) {
|
|
645287
|
+
if (/personal.*unsupported|unsupported.*personal|consumer.*unsupported/i.test(text)) {
|
|
645288
|
+
return "personal-unsupported";
|
|
645289
|
+
}
|
|
645290
|
+
if (/enterprise|standard|code assist|workspace/i.test(text)) {
|
|
645291
|
+
return "enterprise-supported";
|
|
645292
|
+
}
|
|
645293
|
+
return "unknown";
|
|
645294
|
+
}
|
|
645295
|
+
async function resolveCommand(definition, settings, adapters) {
|
|
645296
|
+
if (settings.commandPath) {
|
|
645297
|
+
return settings.commandPath;
|
|
645298
|
+
}
|
|
645299
|
+
for (const candidate of definition.commandCandidates ?? []) {
|
|
645300
|
+
const found = await (adapters.which ?? which)(candidate);
|
|
645301
|
+
if (found)
|
|
645302
|
+
return found;
|
|
645303
|
+
}
|
|
645304
|
+
return null;
|
|
645305
|
+
}
|
|
645306
|
+
async function runCommand(file4, args, adapters) {
|
|
645307
|
+
if (adapters.run) {
|
|
645308
|
+
return adapters.run(file4, args);
|
|
645309
|
+
}
|
|
645310
|
+
return execFileNoThrow(file4, args, {
|
|
645311
|
+
timeout: 15000,
|
|
645312
|
+
preserveOutputOnError: true,
|
|
645313
|
+
audit: false
|
|
645314
|
+
});
|
|
645315
|
+
}
|
|
645316
|
+
function addFailure(result, reason, fix) {
|
|
645317
|
+
result.ok = false;
|
|
645318
|
+
result.failureReason ??= reason;
|
|
645319
|
+
result.suggestedFix ??= fix;
|
|
645320
|
+
}
|
|
645321
|
+
function endpointUrl(baseUrl, kind) {
|
|
645322
|
+
const trimmed = baseUrl.replace(/\/$/, "");
|
|
645323
|
+
if (kind === "ollama") {
|
|
645324
|
+
return `${trimmed}/api/tags`;
|
|
645325
|
+
}
|
|
645326
|
+
return `${trimmed}/models`;
|
|
645327
|
+
}
|
|
645328
|
+
function isLocalBaseUrl(value) {
|
|
645329
|
+
return LOCALHOST_RE.test(value);
|
|
645330
|
+
}
|
|
645331
|
+
async function checkEndpoint(definition, settings, adapters, result) {
|
|
645332
|
+
if (!definition.endpointKind)
|
|
645333
|
+
return;
|
|
645334
|
+
const baseUrl = settings.baseUrl ?? definition.defaultBaseUrl;
|
|
645335
|
+
if (!baseUrl) {
|
|
645336
|
+
result.checks.push({
|
|
645337
|
+
name: "base_url",
|
|
645338
|
+
status: "fail",
|
|
645339
|
+
message: "No base_url configured."
|
|
645340
|
+
});
|
|
645341
|
+
addFailure(result, "missing base_url", "Run: ur config set base_url <url>");
|
|
645342
|
+
return;
|
|
645343
|
+
}
|
|
645344
|
+
const url3 = endpointUrl(baseUrl, definition.endpointKind);
|
|
645345
|
+
try {
|
|
645346
|
+
const response = await (adapters.fetch ?? fetch)(url3, {
|
|
645347
|
+
method: "GET",
|
|
645348
|
+
headers: definition.accessType === "api" && (adapters.env ?? process.env)[definition.envKey ?? ""] ? { Authorization: `Bearer ${(adapters.env ?? process.env)[definition.envKey ?? ""]}` } : undefined
|
|
645349
|
+
});
|
|
645350
|
+
if (!response.ok) {
|
|
645351
|
+
result.checks.push({
|
|
645352
|
+
name: "endpoint",
|
|
645353
|
+
status: "fail",
|
|
645354
|
+
message: `${url3} returned HTTP ${response.status}.`
|
|
645355
|
+
});
|
|
645356
|
+
addFailure(result, `endpoint returned HTTP ${response.status}`, `Start the provider server or update base_url: ur config set base_url ${baseUrl}`);
|
|
645357
|
+
return;
|
|
645358
|
+
}
|
|
645359
|
+
result.checks.push({
|
|
645360
|
+
name: "endpoint",
|
|
645361
|
+
status: "pass",
|
|
645362
|
+
message: `${url3} is reachable.`
|
|
645363
|
+
});
|
|
645364
|
+
if (settings.model) {
|
|
645365
|
+
const body = await response.text().catch(() => "");
|
|
645366
|
+
if (body && !body.includes(settings.model)) {
|
|
645367
|
+
result.checks.push({
|
|
645368
|
+
name: "model",
|
|
645369
|
+
status: "warn",
|
|
645370
|
+
message: `Model "${settings.model}" was not found in the detectable model list.`
|
|
645371
|
+
});
|
|
645372
|
+
} else {
|
|
645373
|
+
result.checks.push({
|
|
645374
|
+
name: "model",
|
|
645375
|
+
status: "pass",
|
|
645376
|
+
message: `Model "${settings.model}" is detectable.`
|
|
645377
|
+
});
|
|
645378
|
+
}
|
|
645379
|
+
}
|
|
645380
|
+
} catch (error40) {
|
|
645381
|
+
result.checks.push({
|
|
645382
|
+
name: "endpoint",
|
|
645383
|
+
status: "fail",
|
|
645384
|
+
message: `${url3} is not reachable.`
|
|
645385
|
+
});
|
|
645386
|
+
addFailure(result, error40 instanceof Error ? error40.message : "endpoint unavailable", `Start the provider server or update base_url: ur config set base_url ${baseUrl}`);
|
|
645387
|
+
}
|
|
645388
|
+
}
|
|
645389
|
+
async function checkSubscriptionProvider(definition, settings, adapters, result) {
|
|
645390
|
+
const commandPath = await resolveCommand(definition, settings, adapters);
|
|
645391
|
+
if (!commandPath) {
|
|
645392
|
+
const command8 = definition.commandCandidates?.[0] ?? definition.id;
|
|
645393
|
+
result.checks.push({
|
|
645394
|
+
name: "cli",
|
|
645395
|
+
status: "fail",
|
|
645396
|
+
message: `${command8} is not installed or not on PATH.`
|
|
645397
|
+
});
|
|
645398
|
+
addFailure(result, "CLI missing", `Install the official ${definition.displayName} CLI, then run ur auth ${authAliasForProvider(definition.id)}.`);
|
|
645399
|
+
return;
|
|
645400
|
+
}
|
|
645401
|
+
result.checks.push({
|
|
645402
|
+
name: "cli",
|
|
645403
|
+
status: "pass",
|
|
645404
|
+
message: `${commandPath} found.`
|
|
645405
|
+
});
|
|
645406
|
+
if (definition.versionArgs) {
|
|
645407
|
+
const version3 = await runCommand(commandPath, definition.versionArgs, adapters);
|
|
645408
|
+
result.checks.push({
|
|
645409
|
+
name: "version",
|
|
645410
|
+
status: version3.code === 0 ? "pass" : "warn",
|
|
645411
|
+
message: outputText(version3) || `${definition.displayName} version check exited ${version3.code}.`
|
|
645412
|
+
});
|
|
645413
|
+
}
|
|
645414
|
+
if (definition.id === "claude-code-cli" && (adapters.env ?? process.env).ANTHROPIC_API_KEY) {
|
|
645415
|
+
result.checks.push({
|
|
645416
|
+
name: "api_key_override",
|
|
645417
|
+
status: "warn",
|
|
645418
|
+
message: "ANTHROPIC_API_KEY is set and may override Claude Code subscription login. Unset it to test subscription auth."
|
|
645419
|
+
});
|
|
645420
|
+
}
|
|
645421
|
+
if (definition.id === "gemini-cli") {
|
|
645422
|
+
const versionText = result.checks.find((check3) => check3.name === "version")?.message ?? "";
|
|
645423
|
+
const support = classifyGeminiAccountSupport(versionText);
|
|
645424
|
+
if (support === "personal-unsupported") {
|
|
645425
|
+
result.checks.push({
|
|
645426
|
+
name: "account_type",
|
|
645427
|
+
status: "fail",
|
|
645428
|
+
message: definition.unsupportedPersonalAccountMessage ?? "Unsupported account type."
|
|
645429
|
+
});
|
|
645430
|
+
addFailure(result, "unsupported account type", "Use an official Gemini Code Assist Standard/Enterprise login path.");
|
|
645431
|
+
} else if (support === "enterprise-supported") {
|
|
645432
|
+
result.checks.push({
|
|
645433
|
+
name: "account_type",
|
|
645434
|
+
status: "pass",
|
|
645435
|
+
message: "Gemini Code Assist Standard/Enterprise path is supported by the detected CLI output."
|
|
645436
|
+
});
|
|
645437
|
+
} else {
|
|
645438
|
+
result.checks.push({
|
|
645439
|
+
name: "account_type",
|
|
645440
|
+
status: "warn",
|
|
645441
|
+
message: "Gemini CLI status is not exposed by this CLI. UR-AGENT will only use the official Gemini CLI flow and will not support personal-account bypasses."
|
|
645442
|
+
});
|
|
645443
|
+
}
|
|
645444
|
+
}
|
|
645445
|
+
if (!definition.statusArgs) {
|
|
645446
|
+
result.checks.push({
|
|
645447
|
+
name: "login_status",
|
|
645448
|
+
status: "skip",
|
|
645449
|
+
message: "No stable official status command is configured for this provider."
|
|
645450
|
+
});
|
|
645451
|
+
return;
|
|
645452
|
+
}
|
|
645453
|
+
const status2 = await runCommand(commandPath, definition.statusArgs, adapters);
|
|
645454
|
+
const text = outputText(status2);
|
|
645455
|
+
if (status2.code === 0 && !classifiesAsNotLoggedIn(text)) {
|
|
645456
|
+
result.checks.push({
|
|
645457
|
+
name: "login_status",
|
|
645458
|
+
status: classifiesAsLoggedIn(text) ? "pass" : "warn",
|
|
645459
|
+
message: text || "Status command succeeded."
|
|
645460
|
+
});
|
|
645461
|
+
return;
|
|
645462
|
+
}
|
|
645463
|
+
result.checks.push({
|
|
645464
|
+
name: "login_status",
|
|
645465
|
+
status: "fail",
|
|
645466
|
+
message: text || `${definition.displayName} is not logged in.`
|
|
645467
|
+
});
|
|
645468
|
+
addFailure(result, "not logged in", `Run: ur auth ${authAliasForProvider(definition.id)}`);
|
|
645469
|
+
}
|
|
645470
|
+
async function checkApiProvider(definition, settings, adapters, result) {
|
|
645471
|
+
const env4 = adapters.env ?? process.env;
|
|
645472
|
+
const baseUrl = settings.baseUrl ?? definition.defaultBaseUrl;
|
|
645473
|
+
const requiresKey = definition.id !== "openai-compatible" || !baseUrl || !isLocalBaseUrl(baseUrl);
|
|
645474
|
+
if (definition.envKey && requiresKey) {
|
|
645475
|
+
if (env4[definition.envKey]) {
|
|
645476
|
+
result.checks.push({
|
|
645477
|
+
name: "api_key",
|
|
645478
|
+
status: "pass",
|
|
645479
|
+
message: `${definition.envKey} is present.`
|
|
645480
|
+
});
|
|
645481
|
+
} else {
|
|
645482
|
+
result.checks.push({
|
|
645483
|
+
name: "api_key",
|
|
645484
|
+
status: "fail",
|
|
645485
|
+
message: `${definition.envKey} is not set.`
|
|
645486
|
+
});
|
|
645487
|
+
addFailure(result, "API key missing", `Set ${definition.envKey} in your environment or choose a subscription/local provider.`);
|
|
645488
|
+
}
|
|
645489
|
+
}
|
|
645490
|
+
await checkEndpoint(definition, settings, adapters, result);
|
|
645491
|
+
}
|
|
645492
|
+
function fallbackResult(settings, active, ok) {
|
|
645493
|
+
if (ok)
|
|
645494
|
+
return;
|
|
645495
|
+
if (!settings.fallback || settings.fallback === "disabled") {
|
|
645496
|
+
return {
|
|
645497
|
+
enabled: false,
|
|
645498
|
+
message: "Fallback is disabled. UR-AGENT will not silently switch providers. Optional: ur config set provider.fallback ollama"
|
|
645499
|
+
};
|
|
645500
|
+
}
|
|
645501
|
+
if (settings.fallback === active) {
|
|
645502
|
+
return {
|
|
645503
|
+
enabled: false,
|
|
645504
|
+
message: "Fallback points at the selected provider and will not be used."
|
|
645505
|
+
};
|
|
645506
|
+
}
|
|
645507
|
+
return {
|
|
645508
|
+
enabled: true,
|
|
645509
|
+
provider: settings.fallback,
|
|
645510
|
+
message: `Fallback is configured as ${settings.fallback}, but UR-AGENT will ask before using it.`
|
|
645511
|
+
};
|
|
645512
|
+
}
|
|
645513
|
+
async function doctorProvider(provider, options2 = {}) {
|
|
645514
|
+
const allSettings = options2.settings ?? getInitialSettings();
|
|
645515
|
+
const providerSettings = getActiveProviderSettings(allSettings);
|
|
645516
|
+
const active = provider ?? providerSettings.active ?? "ollama";
|
|
645517
|
+
const definition = getProviderDefinition(active);
|
|
645518
|
+
const settingsForProvider = {
|
|
645519
|
+
...providerSettings,
|
|
645520
|
+
active
|
|
645521
|
+
};
|
|
645522
|
+
const result = {
|
|
645523
|
+
provider: active,
|
|
645524
|
+
displayName: definition.displayName,
|
|
645525
|
+
accessType: definition.accessType,
|
|
645526
|
+
authMode: definition.authMode,
|
|
645527
|
+
selected: active === providerSettings.active,
|
|
645528
|
+
ok: true,
|
|
645529
|
+
checks: [
|
|
645530
|
+
{
|
|
645531
|
+
name: "legal_path",
|
|
645532
|
+
status: "pass",
|
|
645533
|
+
message: definition.legalPath
|
|
645534
|
+
}
|
|
645535
|
+
]
|
|
645536
|
+
};
|
|
645537
|
+
if (definition.accessType === "subscription") {
|
|
645538
|
+
await checkSubscriptionProvider(definition, settingsForProvider, options2.adapters ?? {}, result);
|
|
645539
|
+
} else if (definition.accessType === "api") {
|
|
645540
|
+
await checkApiProvider(definition, settingsForProvider, options2.adapters ?? {}, result);
|
|
645541
|
+
} else {
|
|
645542
|
+
await checkEndpoint(definition, settingsForProvider, options2.adapters ?? {}, result);
|
|
645543
|
+
}
|
|
645544
|
+
result.fallback = fallbackResult(providerSettings, active, result.ok);
|
|
645545
|
+
return result;
|
|
645546
|
+
}
|
|
645547
|
+
function authAliasForProvider(provider) {
|
|
645548
|
+
switch (provider) {
|
|
645549
|
+
case "codex-cli":
|
|
645550
|
+
return "chatgpt";
|
|
645551
|
+
case "claude-code-cli":
|
|
645552
|
+
return "claude";
|
|
645553
|
+
case "gemini-cli":
|
|
645554
|
+
return "gemini";
|
|
645555
|
+
case "antigravity-cli":
|
|
645556
|
+
return "antigravity";
|
|
645557
|
+
default:
|
|
645558
|
+
return "provider";
|
|
645559
|
+
}
|
|
645560
|
+
}
|
|
645561
|
+
function providerForAuthAlias(alias2) {
|
|
645562
|
+
switch (alias2) {
|
|
645563
|
+
case "chatgpt":
|
|
645564
|
+
return "codex-cli";
|
|
645565
|
+
case "claude":
|
|
645566
|
+
return "claude-code-cli";
|
|
645567
|
+
case "gemini":
|
|
645568
|
+
return "gemini-cli";
|
|
645569
|
+
case "antigravity":
|
|
645570
|
+
return "antigravity-cli";
|
|
645571
|
+
default:
|
|
645572
|
+
return null;
|
|
645573
|
+
}
|
|
645574
|
+
}
|
|
645575
|
+
function buildProviderAuthCommand(provider, options2 = {}) {
|
|
645576
|
+
const definition = getProviderDefinition(provider);
|
|
645577
|
+
const command8 = definition.commandCandidates?.[0];
|
|
645578
|
+
if (!command8)
|
|
645579
|
+
return null;
|
|
645580
|
+
const args = options2.deviceAuth && definition.deviceLoginArgs ? definition.deviceLoginArgs : definition.loginArgs;
|
|
645581
|
+
if (!args)
|
|
645582
|
+
return null;
|
|
645583
|
+
if (provider === "gemini-cli") {
|
|
645584
|
+
return {
|
|
645585
|
+
command: command8,
|
|
645586
|
+
args,
|
|
645587
|
+
instructions: "The detected Gemini CLI does not expose a stable non-interactive login subcommand. Launching the official Gemini CLI is the only supported path; complete the Gemini Code Assist login flow if prompted."
|
|
645588
|
+
};
|
|
645589
|
+
}
|
|
645590
|
+
if (provider === "antigravity-cli") {
|
|
645591
|
+
return {
|
|
645592
|
+
command: command8,
|
|
645593
|
+
args,
|
|
645594
|
+
instructions: "UR-AGENT will only launch the official Antigravity CLI. Use its documented login flow where supported; UR-AGENT will not invent flags or reuse browser sessions."
|
|
645595
|
+
};
|
|
645596
|
+
}
|
|
645597
|
+
return {
|
|
645598
|
+
command: command8,
|
|
645599
|
+
args,
|
|
645600
|
+
instructions: `Launching ${definition.legalPath}.`
|
|
645601
|
+
};
|
|
645602
|
+
}
|
|
645603
|
+
async function launchProviderAuth(alias2, options2 = {}) {
|
|
645604
|
+
const provider = providerForAuthAlias(alias2);
|
|
645605
|
+
if (!provider) {
|
|
645606
|
+
return { ok: false, message: `Unknown auth provider "${alias2}".` };
|
|
645607
|
+
}
|
|
645608
|
+
const authCommand = buildProviderAuthCommand(provider, options2);
|
|
645609
|
+
if (!authCommand) {
|
|
645610
|
+
return {
|
|
645611
|
+
ok: false,
|
|
645612
|
+
message: `No official login command is configured for ${provider}.`
|
|
645613
|
+
};
|
|
645614
|
+
}
|
|
645615
|
+
const commandPath = await resolveCommand(getProviderDefinition(provider), {}, {});
|
|
645616
|
+
if (!commandPath) {
|
|
645617
|
+
return {
|
|
645618
|
+
ok: false,
|
|
645619
|
+
message: `${authCommand.command} is not installed. Install the official CLI first.`
|
|
645620
|
+
};
|
|
645621
|
+
}
|
|
645622
|
+
const printable = [authCommand.command, ...authCommand.args].join(" ");
|
|
645623
|
+
if (options2.dryRun || !process.stdin.isTTY || !process.stdout.isTTY) {
|
|
645624
|
+
return {
|
|
645625
|
+
ok: true,
|
|
645626
|
+
message: `${authCommand.instructions}
|
|
645627
|
+
Run: ${printable}`,
|
|
645628
|
+
command: printable
|
|
645629
|
+
};
|
|
645630
|
+
}
|
|
645631
|
+
await new Promise((resolve49, reject2) => {
|
|
645632
|
+
const child = spawn12(commandPath, authCommand.args, {
|
|
645633
|
+
stdio: "inherit",
|
|
645634
|
+
env: process.env
|
|
645635
|
+
});
|
|
645636
|
+
child.on("error", reject2);
|
|
645637
|
+
child.on("exit", (code) => {
|
|
645638
|
+
if (code === 0)
|
|
645639
|
+
resolve49();
|
|
645640
|
+
else
|
|
645641
|
+
reject2(new Error(`${printable} exited with code ${code ?? 1}`));
|
|
645642
|
+
});
|
|
645643
|
+
});
|
|
645644
|
+
return { ok: true, message: `Completed: ${printable}`, command: printable };
|
|
645645
|
+
}
|
|
645646
|
+
function formatProviderList(json2 = false) {
|
|
645647
|
+
const providers = listProviders().map((provider) => ({
|
|
645648
|
+
id: provider.id,
|
|
645649
|
+
name: provider.displayName,
|
|
645650
|
+
accessType: provider.accessType,
|
|
645651
|
+
authMode: provider.authMode,
|
|
645652
|
+
legalPath: provider.legalPath
|
|
645653
|
+
}));
|
|
645654
|
+
if (json2) {
|
|
645655
|
+
return JSON.stringify(providers, null, 2);
|
|
645656
|
+
}
|
|
645657
|
+
return [
|
|
645658
|
+
"Provider Access type Legal path",
|
|
645659
|
+
"---------------------------------------------------------",
|
|
645660
|
+
...providers.map((provider) => `${provider.name.padEnd(20)} ${provider.accessType.padEnd(17)} ${provider.legalPath}`)
|
|
645661
|
+
].join(`
|
|
645662
|
+
`);
|
|
645663
|
+
}
|
|
645664
|
+
function formatProviderDoctor(result, json2 = false) {
|
|
645665
|
+
if (json2) {
|
|
645666
|
+
return JSON.stringify(result, null, 2);
|
|
645667
|
+
}
|
|
645668
|
+
const lines = [
|
|
645669
|
+
`Provider: ${result.displayName} (${result.provider})`,
|
|
645670
|
+
`Auth: ${authModeLabel(result.authMode)}`,
|
|
645671
|
+
`Status: ${result.ok ? "ready" : "not ready"}`
|
|
645672
|
+
];
|
|
645673
|
+
for (const check3 of result.checks) {
|
|
645674
|
+
lines.push(`- ${check3.status.toUpperCase()} ${check3.name}: ${check3.message}`);
|
|
645675
|
+
}
|
|
645676
|
+
if (result.failureReason) {
|
|
645677
|
+
lines.push(`Failure reason: ${result.failureReason}`);
|
|
645678
|
+
}
|
|
645679
|
+
if (result.suggestedFix) {
|
|
645680
|
+
lines.push(`Suggested fix: ${result.suggestedFix}`);
|
|
645681
|
+
}
|
|
645682
|
+
if (result.fallback) {
|
|
645683
|
+
lines.push(`Fallback: ${result.fallback.message}`);
|
|
645684
|
+
}
|
|
645685
|
+
return lines.join(`
|
|
645686
|
+
`);
|
|
645687
|
+
}
|
|
645688
|
+
function formatProviderStatus(result, json2 = false) {
|
|
645689
|
+
if (json2) {
|
|
645690
|
+
return JSON.stringify(result, null, 2);
|
|
645691
|
+
}
|
|
645692
|
+
const failure = result.failureReason ? `
|
|
645693
|
+
Failure reason: ${result.failureReason}` : "";
|
|
645694
|
+
const fix = result.suggestedFix ? `
|
|
645695
|
+
Suggested fix: ${result.suggestedFix}` : "";
|
|
645696
|
+
return `Selected provider: ${result.displayName} (${result.provider})
|
|
645697
|
+
Auth mode: ${authModeLabel(result.authMode)}
|
|
645698
|
+
Ready: ${result.ok ? "yes" : "no"}${failure}${fix}`;
|
|
645699
|
+
}
|
|
645700
|
+
var PROVIDER_IDS, LOCALHOST_RE, PROVIDERS;
|
|
645701
|
+
var init_providerRegistry = __esm(() => {
|
|
645702
|
+
init_execFileNoThrow();
|
|
645703
|
+
init_settings2();
|
|
645704
|
+
init_which();
|
|
645705
|
+
PROVIDER_IDS = [
|
|
645706
|
+
"codex-cli",
|
|
645707
|
+
"claude-code-cli",
|
|
645708
|
+
"gemini-cli",
|
|
645709
|
+
"antigravity-cli",
|
|
645710
|
+
"openai-api",
|
|
645711
|
+
"anthropic-api",
|
|
645712
|
+
"gemini-api",
|
|
645713
|
+
"openrouter",
|
|
645714
|
+
"openai-compatible",
|
|
645715
|
+
"ollama",
|
|
645716
|
+
"lmstudio",
|
|
645717
|
+
"llama.cpp",
|
|
645718
|
+
"vllm"
|
|
645719
|
+
];
|
|
645720
|
+
LOCALHOST_RE = /^(https?:\/\/)?(localhost|127\.0\.0\.1|\[::1\]|::1)(:\d+)?(\/|$)/i;
|
|
645721
|
+
PROVIDERS = {
|
|
645722
|
+
"codex-cli": {
|
|
645723
|
+
id: "codex-cli",
|
|
645724
|
+
displayName: "ChatGPT/Codex",
|
|
645725
|
+
statusBarName: "ChatGPT/Codex",
|
|
645726
|
+
accessType: "subscription",
|
|
645727
|
+
authMode: "subscription",
|
|
645728
|
+
legalPath: "official Codex CLI login",
|
|
645729
|
+
commandCandidates: ["codex"],
|
|
645730
|
+
versionArgs: ["--version"],
|
|
645731
|
+
statusArgs: ["login", "status"],
|
|
645732
|
+
loginArgs: ["login"],
|
|
645733
|
+
deviceLoginArgs: ["login", "--device-auth"]
|
|
645734
|
+
},
|
|
645735
|
+
"claude-code-cli": {
|
|
645736
|
+
id: "claude-code-cli",
|
|
645737
|
+
displayName: "Claude Code",
|
|
645738
|
+
statusBarName: "Claude Code",
|
|
645739
|
+
accessType: "subscription",
|
|
645740
|
+
authMode: "subscription",
|
|
645741
|
+
legalPath: "official Claude Code CLI login",
|
|
645742
|
+
commandCandidates: ["claude"],
|
|
645743
|
+
versionArgs: ["--version"],
|
|
645744
|
+
statusArgs: ["auth", "status"],
|
|
645745
|
+
loginArgs: ["auth", "login"]
|
|
645746
|
+
},
|
|
645747
|
+
"gemini-cli": {
|
|
645748
|
+
id: "gemini-cli",
|
|
645749
|
+
displayName: "Gemini CLI",
|
|
645750
|
+
statusBarName: "Gemini CLI",
|
|
645751
|
+
accessType: "subscription",
|
|
645752
|
+
authMode: "enterprise-login",
|
|
645753
|
+
legalPath: "official Gemini Code Assist login",
|
|
645754
|
+
commandCandidates: ["gemini"],
|
|
645755
|
+
versionArgs: ["--version"],
|
|
645756
|
+
loginArgs: [],
|
|
645757
|
+
unsupportedPersonalAccountMessage: "Personal Google account login is not enabled by UR-AGENT. Use an official Gemini Code Assist Standard/Enterprise path if your Gemini CLI supports it."
|
|
645758
|
+
},
|
|
645759
|
+
"antigravity-cli": {
|
|
645760
|
+
id: "antigravity-cli",
|
|
645761
|
+
displayName: "Antigravity",
|
|
645762
|
+
statusBarName: "Antigravity",
|
|
645763
|
+
accessType: "subscription",
|
|
645764
|
+
authMode: "personal-login",
|
|
645765
|
+
legalPath: "official Antigravity CLI login, where supported",
|
|
645766
|
+
commandCandidates: ["antigravity", "google-antigravity", "ag"],
|
|
645767
|
+
versionArgs: ["--version"],
|
|
645768
|
+
loginArgs: []
|
|
645769
|
+
},
|
|
645770
|
+
"openai-api": {
|
|
645771
|
+
id: "openai-api",
|
|
645772
|
+
displayName: "OpenAI API",
|
|
645773
|
+
statusBarName: "OpenAI",
|
|
645774
|
+
accessType: "api",
|
|
645775
|
+
authMode: "api",
|
|
645776
|
+
legalPath: "OPENAI_API_KEY",
|
|
645777
|
+
envKey: "OPENAI_API_KEY"
|
|
645778
|
+
},
|
|
645779
|
+
"anthropic-api": {
|
|
645780
|
+
id: "anthropic-api",
|
|
645781
|
+
displayName: "Anthropic Claude API",
|
|
645782
|
+
statusBarName: "Anthropic",
|
|
645783
|
+
accessType: "api",
|
|
645784
|
+
authMode: "api",
|
|
645785
|
+
legalPath: "ANTHROPIC_API_KEY",
|
|
645786
|
+
envKey: "ANTHROPIC_API_KEY"
|
|
645787
|
+
},
|
|
645788
|
+
"gemini-api": {
|
|
645789
|
+
id: "gemini-api",
|
|
645790
|
+
displayName: "Gemini API",
|
|
645791
|
+
statusBarName: "Gemini API",
|
|
645792
|
+
accessType: "api",
|
|
645793
|
+
authMode: "api",
|
|
645794
|
+
legalPath: "GEMINI_API_KEY",
|
|
645795
|
+
envKey: "GEMINI_API_KEY"
|
|
645796
|
+
},
|
|
645797
|
+
openrouter: {
|
|
645798
|
+
id: "openrouter",
|
|
645799
|
+
displayName: "OpenRouter",
|
|
645800
|
+
statusBarName: "OpenRouter",
|
|
645801
|
+
accessType: "api",
|
|
645802
|
+
authMode: "api",
|
|
645803
|
+
legalPath: "OPENROUTER_API_KEY",
|
|
645804
|
+
envKey: "OPENROUTER_API_KEY"
|
|
645805
|
+
},
|
|
645806
|
+
"openai-compatible": {
|
|
645807
|
+
id: "openai-compatible",
|
|
645808
|
+
displayName: "OpenAI-compatible",
|
|
645809
|
+
statusBarName: "OpenAI-compatible",
|
|
645810
|
+
accessType: "api",
|
|
645811
|
+
authMode: "api",
|
|
645812
|
+
legalPath: "user-selected OpenAI-compatible base URL with API key only when required by that endpoint",
|
|
645813
|
+
envKey: "OPENAI_API_KEY",
|
|
645814
|
+
endpointKind: "openai-compatible"
|
|
645815
|
+
},
|
|
645816
|
+
ollama: {
|
|
645817
|
+
id: "ollama",
|
|
645818
|
+
displayName: "Ollama",
|
|
645819
|
+
statusBarName: "Ollama",
|
|
645820
|
+
accessType: "local",
|
|
645821
|
+
authMode: "local",
|
|
645822
|
+
legalPath: "localhost Ollama runtime",
|
|
645823
|
+
defaultBaseUrl: "http://localhost:11434",
|
|
645824
|
+
endpointKind: "ollama"
|
|
645825
|
+
},
|
|
645826
|
+
lmstudio: {
|
|
645827
|
+
id: "lmstudio",
|
|
645828
|
+
displayName: "LM Studio",
|
|
645829
|
+
statusBarName: "LM Studio",
|
|
645830
|
+
accessType: "local",
|
|
645831
|
+
authMode: "local",
|
|
645832
|
+
legalPath: "local OpenAI-compatible server",
|
|
645833
|
+
defaultBaseUrl: "http://localhost:1234/v1",
|
|
645834
|
+
endpointKind: "openai-compatible"
|
|
645835
|
+
},
|
|
645836
|
+
"llama.cpp": {
|
|
645837
|
+
id: "llama.cpp",
|
|
645838
|
+
displayName: "llama.cpp",
|
|
645839
|
+
statusBarName: "llama.cpp",
|
|
645840
|
+
accessType: "local",
|
|
645841
|
+
authMode: "local",
|
|
645842
|
+
legalPath: "local OpenAI-compatible server",
|
|
645843
|
+
defaultBaseUrl: "http://localhost:8080/v1",
|
|
645844
|
+
endpointKind: "openai-compatible"
|
|
645845
|
+
},
|
|
645846
|
+
vllm: {
|
|
645847
|
+
id: "vllm",
|
|
645848
|
+
displayName: "vLLM",
|
|
645849
|
+
statusBarName: "vLLM",
|
|
645850
|
+
accessType: "local",
|
|
645851
|
+
authMode: "local",
|
|
645852
|
+
legalPath: "OpenAI-compatible server",
|
|
645853
|
+
defaultBaseUrl: "http://localhost:8000/v1",
|
|
645854
|
+
endpointKind: "openai-compatible"
|
|
645855
|
+
}
|
|
645856
|
+
};
|
|
645857
|
+
});
|
|
645858
|
+
|
|
645122
645859
|
// src/utils/statusBar.ts
|
|
645123
645860
|
function statusBarShouldDisplay({
|
|
645124
645861
|
settingsStatusLineConfigured,
|
|
@@ -645141,6 +645878,8 @@ function statusBarShouldDisplay({
|
|
|
645141
645878
|
}
|
|
645142
645879
|
function buildDefaultStatusBar({
|
|
645143
645880
|
version: version3,
|
|
645881
|
+
providerLabel,
|
|
645882
|
+
authMode,
|
|
645144
645883
|
model,
|
|
645145
645884
|
mode: mode2,
|
|
645146
645885
|
branch: branch2,
|
|
@@ -645151,6 +645890,12 @@ function buildDefaultStatusBar({
|
|
|
645151
645890
|
isCheckingUpdate
|
|
645152
645891
|
}) {
|
|
645153
645892
|
const parts = [`UR-AGENT v${version3}`];
|
|
645893
|
+
if (providerLabel) {
|
|
645894
|
+
parts.push(`Provider: ${providerLabel}`);
|
|
645895
|
+
}
|
|
645896
|
+
if (authMode) {
|
|
645897
|
+
parts.push(`Auth: ${authMode}`);
|
|
645898
|
+
}
|
|
645154
645899
|
if (model) {
|
|
645155
645900
|
parts.push(`model: ${model}`);
|
|
645156
645901
|
}
|
|
@@ -645200,6 +645945,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
645200
645945
|
mainLoopModel,
|
|
645201
645946
|
exceeds200kTokens
|
|
645202
645947
|
});
|
|
645948
|
+
const providerRuntime = getProviderRuntimeInfo(settings);
|
|
645203
645949
|
const outputStyleName = settings?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME;
|
|
645204
645950
|
const currentUsage = getCurrentUsage(messages);
|
|
645205
645951
|
const contextWindowSize = getContextWindowForModel(runtimeModel, getSdkBetas());
|
|
@@ -645230,12 +645976,20 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
645230
645976
|
id: runtimeModel,
|
|
645231
645977
|
display_name: renderModelName(runtimeModel)
|
|
645232
645978
|
},
|
|
645979
|
+
provider: {
|
|
645980
|
+
id: providerRuntime.provider,
|
|
645981
|
+
display_name: providerRuntime.providerLabel,
|
|
645982
|
+
auth_mode: providerRuntime.authLabel,
|
|
645983
|
+
model: providerRuntime.model,
|
|
645984
|
+
base_url: providerRuntime.baseUrl,
|
|
645985
|
+
fallback: providerRuntime.fallback
|
|
645986
|
+
},
|
|
645233
645987
|
workspace: {
|
|
645234
645988
|
current_dir: getCwd2(),
|
|
645235
645989
|
project_dir: getOriginalCwd(),
|
|
645236
645990
|
added_dirs: addedDirs
|
|
645237
645991
|
},
|
|
645238
|
-
version: "1.
|
|
645992
|
+
version: "1.25.0",
|
|
645239
645993
|
output_style: {
|
|
645240
645994
|
name: outputStyleName
|
|
645241
645995
|
},
|
|
@@ -645306,11 +646060,14 @@ function StatusLineInner({
|
|
|
645306
646060
|
addNotification
|
|
645307
646061
|
} = useNotifications();
|
|
645308
646062
|
const mainLoopModel = useMainLoopModel();
|
|
646063
|
+
const providerRuntime = getProviderRuntimeInfo(settings);
|
|
645309
646064
|
const taskValues = Object.values(tasks2);
|
|
645310
646065
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
645311
646066
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
645312
|
-
version: "1.
|
|
645313
|
-
|
|
646067
|
+
version: "1.25.0",
|
|
646068
|
+
providerLabel: providerRuntime.providerLabel,
|
|
646069
|
+
authMode: providerRuntime.authLabel,
|
|
646070
|
+
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
645314
646071
|
mode: permissionMode,
|
|
645315
646072
|
branch: branch2,
|
|
645316
646073
|
taskRunningCount,
|
|
@@ -645474,6 +646231,7 @@ function StatusLineInner({
|
|
|
645474
646231
|
var import_react248, jsx_dev_runtime421, StatusLine;
|
|
645475
646232
|
var init_StatusLine = __esm(() => {
|
|
645476
646233
|
init_analytics();
|
|
646234
|
+
init_providerRegistry();
|
|
645477
646235
|
init_AppState();
|
|
645478
646236
|
init_state();
|
|
645479
646237
|
init_outputStyles();
|
|
@@ -656792,7 +657550,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
656792
657550
|
} catch {}
|
|
656793
657551
|
const data = {
|
|
656794
657552
|
trigger: trigger2,
|
|
656795
|
-
version: "1.
|
|
657553
|
+
version: "1.25.0",
|
|
656796
657554
|
platform: process.platform,
|
|
656797
657555
|
transcript,
|
|
656798
657556
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -668309,7 +669067,7 @@ async function checkEndpoints() {
|
|
|
668309
669067
|
const oauthConfig = getOauthConfig();
|
|
668310
669068
|
const tokenUrl = new URL(oauthConfig.TOKEN_URL);
|
|
668311
669069
|
const endpoints = [`${oauthConfig.BASE_API_URL}/api/hello`, `${tokenUrl.origin}/v1/oauth/hello`];
|
|
668312
|
-
const
|
|
669070
|
+
const checkEndpoint2 = async (url3) => {
|
|
668313
669071
|
try {
|
|
668314
669072
|
const response = await axios_default.get(url3, {
|
|
668315
669073
|
headers: {
|
|
@@ -668336,7 +669094,7 @@ async function checkEndpoints() {
|
|
|
668336
669094
|
};
|
|
668337
669095
|
}
|
|
668338
669096
|
};
|
|
668339
|
-
const results = await Promise.all(endpoints.map(
|
|
669097
|
+
const results = await Promise.all(endpoints.map(checkEndpoint2));
|
|
668340
669098
|
const failedResult = results.find((result) => !result.success);
|
|
668341
669099
|
if (failedResult) {
|
|
668342
669100
|
logEvent("tengu_preflight_check_failed", {
|
|
@@ -668674,7 +669432,7 @@ function WelcomeV2() {
|
|
|
668674
669432
|
dimColor: true,
|
|
668675
669433
|
children: [
|
|
668676
669434
|
"v",
|
|
668677
|
-
"1.
|
|
669435
|
+
"1.25.0"
|
|
668678
669436
|
]
|
|
668679
669437
|
}, undefined, true, undefined, this)
|
|
668680
669438
|
]
|
|
@@ -669934,7 +670692,7 @@ function completeOnboarding() {
|
|
|
669934
670692
|
saveGlobalConfig((current) => ({
|
|
669935
670693
|
...current,
|
|
669936
670694
|
hasCompletedOnboarding: true,
|
|
669937
|
-
lastOnboardingVersion: "1.
|
|
670695
|
+
lastOnboardingVersion: "1.25.0"
|
|
669938
670696
|
}));
|
|
669939
670697
|
}
|
|
669940
670698
|
function showDialog(root2, renderer) {
|
|
@@ -675035,7 +675793,7 @@ function appendToLog(path24, message) {
|
|
|
675035
675793
|
cwd: getFsImplementation().cwd(),
|
|
675036
675794
|
userType: process.env.USER_TYPE,
|
|
675037
675795
|
sessionId: getSessionId(),
|
|
675038
|
-
version: "1.
|
|
675796
|
+
version: "1.25.0"
|
|
675039
675797
|
};
|
|
675040
675798
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
675041
675799
|
}
|
|
@@ -679129,8 +679887,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
679129
679887
|
}
|
|
679130
679888
|
async function checkEnvLessBridgeMinVersion() {
|
|
679131
679889
|
const cfg = await getEnvLessBridgeConfig();
|
|
679132
|
-
if (cfg.min_version && lt("1.
|
|
679133
|
-
return `Your version of UR (${"1.
|
|
679890
|
+
if (cfg.min_version && lt("1.25.0", cfg.min_version)) {
|
|
679891
|
+
return `Your version of UR (${"1.25.0"}) is too old for Remote Control.
|
|
679134
679892
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
679135
679893
|
}
|
|
679136
679894
|
return null;
|
|
@@ -679604,7 +680362,7 @@ async function initBridgeCore(params) {
|
|
|
679604
680362
|
const rawApi = createBridgeApiClient({
|
|
679605
680363
|
baseUrl,
|
|
679606
680364
|
getAccessToken,
|
|
679607
|
-
runnerVersion: "1.
|
|
680365
|
+
runnerVersion: "1.25.0",
|
|
679608
680366
|
onDebug: logForDebugging,
|
|
679609
680367
|
onAuth401,
|
|
679610
680368
|
getTrustedDeviceToken
|
|
@@ -685285,7 +686043,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
685285
686043
|
setCwd(cwd3);
|
|
685286
686044
|
const server2 = new Server({
|
|
685287
686045
|
name: "ur/tengu",
|
|
685288
|
-
version: "1.
|
|
686046
|
+
version: "1.25.0"
|
|
685289
686047
|
}, {
|
|
685290
686048
|
capabilities: {
|
|
685291
686049
|
tools: {}
|
|
@@ -685821,6 +686579,84 @@ var init_mcp5 = __esm(() => {
|
|
|
685821
686579
|
jsx_dev_runtime487 = __toESM(require_jsx_dev_runtime(), 1);
|
|
685822
686580
|
});
|
|
685823
686581
|
|
|
686582
|
+
// src/cli/handlers/providers.ts
|
|
686583
|
+
var exports_providers = {};
|
|
686584
|
+
__export(exports_providers, {
|
|
686585
|
+
providerStatusHandler: () => providerStatusHandler,
|
|
686586
|
+
providerListHandler: () => providerListHandler,
|
|
686587
|
+
providerDoctorHandler: () => providerDoctorHandler,
|
|
686588
|
+
providerAuthHandler: () => providerAuthHandler,
|
|
686589
|
+
configSetHandler: () => configSetHandler
|
|
686590
|
+
});
|
|
686591
|
+
function writeOutput(text) {
|
|
686592
|
+
process.stdout.write(text.endsWith(`
|
|
686593
|
+
`) ? text : `${text}
|
|
686594
|
+
`);
|
|
686595
|
+
}
|
|
686596
|
+
function writeError(text) {
|
|
686597
|
+
process.stderr.write(text.endsWith(`
|
|
686598
|
+
`) ? text : `${text}
|
|
686599
|
+
`);
|
|
686600
|
+
}
|
|
686601
|
+
async function providerListHandler(options2 = {}) {
|
|
686602
|
+
writeOutput(formatProviderList(Boolean(options2.json)));
|
|
686603
|
+
process.exit(0);
|
|
686604
|
+
}
|
|
686605
|
+
async function providerStatusHandler(options2 = {}) {
|
|
686606
|
+
const settings = getInitialSettings();
|
|
686607
|
+
const active = getActiveProviderSettings(settings).active ?? "ollama";
|
|
686608
|
+
const result = await doctorProvider(active, { settings });
|
|
686609
|
+
writeOutput(formatProviderStatus(result, Boolean(options2.json)));
|
|
686610
|
+
process.exit(result.ok ? 0 : 1);
|
|
686611
|
+
}
|
|
686612
|
+
async function providerDoctorHandler(providerArg, options2 = {}) {
|
|
686613
|
+
let provider;
|
|
686614
|
+
if (providerArg) {
|
|
686615
|
+
if (!isProviderId(providerArg)) {
|
|
686616
|
+
writeError(`Unknown provider "${providerArg}". Run: ur provider list`);
|
|
686617
|
+
process.exit(1);
|
|
686618
|
+
}
|
|
686619
|
+
provider = providerArg;
|
|
686620
|
+
}
|
|
686621
|
+
const settings = getInitialSettings();
|
|
686622
|
+
const active = getActiveProviderSettings(settings).active ?? "ollama";
|
|
686623
|
+
const result = await doctorProvider(provider ?? active, { settings });
|
|
686624
|
+
writeOutput(formatProviderDoctor(result, Boolean(options2.json)));
|
|
686625
|
+
process.exit(result.ok ? 0 : 1);
|
|
686626
|
+
}
|
|
686627
|
+
async function providerAuthHandler(alias2, options2 = {}) {
|
|
686628
|
+
const result = await launchProviderAuth(alias2, {
|
|
686629
|
+
deviceAuth: options2.deviceAuth,
|
|
686630
|
+
dryRun: options2.dryRun
|
|
686631
|
+
});
|
|
686632
|
+
if (options2.json) {
|
|
686633
|
+
writeOutput(JSON.stringify(result, null, 2));
|
|
686634
|
+
} else if (result.ok) {
|
|
686635
|
+
writeOutput(result.message);
|
|
686636
|
+
} else {
|
|
686637
|
+
writeError(result.message);
|
|
686638
|
+
}
|
|
686639
|
+
process.exit(result.ok ? 0 : 1);
|
|
686640
|
+
}
|
|
686641
|
+
async function configSetHandler(key, values2) {
|
|
686642
|
+
const value = Array.isArray(values2) ? values2.join(" ") : values2;
|
|
686643
|
+
if (key !== "provider" && key !== "provider.fallback" && key !== "provider.command_path" && key !== "model" && key !== "base_url") {
|
|
686644
|
+
writeError(`Unsupported config key "${key}". Supported: provider, provider.fallback, provider.command_path, model, base_url`);
|
|
686645
|
+
process.exit(1);
|
|
686646
|
+
}
|
|
686647
|
+
const result = setSafeProviderConfig(key, value);
|
|
686648
|
+
if (result.ok) {
|
|
686649
|
+
writeOutput(result.message);
|
|
686650
|
+
process.exit(0);
|
|
686651
|
+
}
|
|
686652
|
+
writeError(result.message);
|
|
686653
|
+
process.exit(1);
|
|
686654
|
+
}
|
|
686655
|
+
var init_providers = __esm(() => {
|
|
686656
|
+
init_providerRegistry();
|
|
686657
|
+
init_settings2();
|
|
686658
|
+
});
|
|
686659
|
+
|
|
685824
686660
|
// src/cli/handlers/plugins.ts
|
|
685825
686661
|
var exports_plugins = {};
|
|
685826
686662
|
__export(exports_plugins, {
|
|
@@ -686988,7 +687824,7 @@ async function update() {
|
|
|
686988
687824
|
logEvent("tengu_update_check", {});
|
|
686989
687825
|
const diagnostic = await getDoctorDiagnostic();
|
|
686990
687826
|
const result = await checkUpgradeStatus({
|
|
686991
|
-
currentVersion: "1.
|
|
687827
|
+
currentVersion: "1.25.0",
|
|
686992
687828
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
686993
687829
|
installationType: diagnostic.installationType,
|
|
686994
687830
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -688234,7 +689070,7 @@ ${customInstructions}` : customInstructions;
|
|
|
688234
689070
|
}
|
|
688235
689071
|
}
|
|
688236
689072
|
logForDiagnosticsNoPII("info", "started", {
|
|
688237
|
-
version: "1.
|
|
689073
|
+
version: "1.25.0",
|
|
688238
689074
|
is_native_binary: isInBundledMode()
|
|
688239
689075
|
});
|
|
688240
689076
|
registerCleanup(async () => {
|
|
@@ -689018,7 +689854,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
689018
689854
|
pendingHookMessages
|
|
689019
689855
|
}, renderAndRun);
|
|
689020
689856
|
}
|
|
689021
|
-
}).version("1.
|
|
689857
|
+
}).version("1.25.0 (UR-AGENT)", "-v, --version", "Output the version number");
|
|
689022
689858
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
689023
689859
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
689024
689860
|
if (canUserConfigureAdvisor()) {
|
|
@@ -689138,6 +689974,56 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
689138
689974
|
} = await Promise.resolve().then(() => (init_auth6(), exports_auth2));
|
|
689139
689975
|
await authLogout2();
|
|
689140
689976
|
});
|
|
689977
|
+
auth2.command("chatgpt").description("Sign in through the official Codex CLI for ChatGPT subscription access").option("--device-auth", "Use Codex CLI device authorization when supported").option("--dry-run", "Show the official command without launching it").option("--json", "Output as JSON").action(async (options2) => {
|
|
689978
|
+
const {
|
|
689979
|
+
providerAuthHandler: providerAuthHandler2
|
|
689980
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
689981
|
+
await providerAuthHandler2("chatgpt", options2);
|
|
689982
|
+
});
|
|
689983
|
+
auth2.command("claude").description("Sign in through the official Claude Code CLI subscription login").option("--dry-run", "Show the official command without launching it").option("--json", "Output as JSON").action(async (options2) => {
|
|
689984
|
+
const {
|
|
689985
|
+
providerAuthHandler: providerAuthHandler2
|
|
689986
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
689987
|
+
await providerAuthHandler2("claude", options2);
|
|
689988
|
+
});
|
|
689989
|
+
auth2.command("gemini").description("Use the official Gemini CLI login flow where supported").option("--dry-run", "Show the official command without launching it").option("--json", "Output as JSON").action(async (options2) => {
|
|
689990
|
+
const {
|
|
689991
|
+
providerAuthHandler: providerAuthHandler2
|
|
689992
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
689993
|
+
await providerAuthHandler2("gemini", options2);
|
|
689994
|
+
});
|
|
689995
|
+
auth2.command("antigravity").description("Use the official Antigravity CLI login flow where supported").option("--dry-run", "Show the official command without launching it").option("--json", "Output as JSON").action(async (options2) => {
|
|
689996
|
+
const {
|
|
689997
|
+
providerAuthHandler: providerAuthHandler2
|
|
689998
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
689999
|
+
await providerAuthHandler2("antigravity", options2);
|
|
690000
|
+
});
|
|
690001
|
+
const provider = program2.command("provider").description("Manage legal model providers").configureHelp(createSortedHelpConfig());
|
|
690002
|
+
provider.command("list").description("List supported provider adapters and legal access paths").option("--json", "Output as JSON").action(async (options2) => {
|
|
690003
|
+
const {
|
|
690004
|
+
providerListHandler: providerListHandler2
|
|
690005
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
690006
|
+
await providerListHandler2(options2);
|
|
690007
|
+
});
|
|
690008
|
+
provider.command("status").description("Show selected provider readiness").option("--json", "Output as JSON").action(async (options2) => {
|
|
690009
|
+
const {
|
|
690010
|
+
providerStatusHandler: providerStatusHandler2
|
|
690011
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
690012
|
+
await providerStatusHandler2(options2);
|
|
690013
|
+
});
|
|
690014
|
+
provider.command("doctor [provider]").description("Check a provider without reading hidden credential files").option("--json", "Output as JSON").action(async (providerArg, options2) => {
|
|
690015
|
+
const {
|
|
690016
|
+
providerDoctorHandler: providerDoctorHandler2
|
|
690017
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
690018
|
+
await providerDoctorHandler2(providerArg, options2);
|
|
690019
|
+
});
|
|
690020
|
+
const configCmd = program2.command("config").description("Manage safe UR-AGENT settings").configureHelp(createSortedHelpConfig());
|
|
690021
|
+
configCmd.command("set <key> <value...>").description("Set a safe non-secret setting: provider, provider.fallback, provider.command_path, model, or base_url").action(async (key, value) => {
|
|
690022
|
+
const {
|
|
690023
|
+
configSetHandler: configSetHandler2
|
|
690024
|
+
} = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
690025
|
+
await configSetHandler2(key, value);
|
|
690026
|
+
});
|
|
689141
690027
|
const coworkOption = () => new Option("--cowork", "Use cowork_plugins directory").hideHelp();
|
|
689142
690028
|
const pluginCmd = program2.command("plugin").alias("plugins").description("Manage UR plugins").configureHelp(createSortedHelpConfig());
|
|
689143
690029
|
pluginCmd.command("validate <path>").description("Validate a plugin or marketplace manifest").addOption(coworkOption()).action(async (manifestPath5, options2) => {
|
|
@@ -689845,7 +690731,7 @@ if (false) {}
|
|
|
689845
690731
|
async function main2() {
|
|
689846
690732
|
const args = process.argv.slice(2);
|
|
689847
690733
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
689848
|
-
console.log(`${"1.
|
|
690734
|
+
console.log(`${"1.25.0"} (UR-AGENT)`);
|
|
689849
690735
|
return;
|
|
689850
690736
|
}
|
|
689851
690737
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|