@rdmind/rdmind 0.1.1-alpha.1 → 0.1.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +20 -23
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -160375,12 +160375,14 @@ var init_geminiContentGenerator = __esm({
|
|
|
160375
160375
|
}
|
|
160376
160376
|
baseUrl;
|
|
160377
160377
|
apiKey;
|
|
160378
|
+
samplingParams;
|
|
160378
160379
|
userTier;
|
|
160379
160380
|
telemetryService;
|
|
160380
160381
|
errorHandler;
|
|
160381
160382
|
constructor(config2, cliConfig) {
|
|
160382
160383
|
this.baseUrl = config2.baseUrl || "https://runway.devops.rednote.life/openai/google/v1";
|
|
160383
160384
|
this.apiKey = config2.apiKey || "";
|
|
160385
|
+
this.samplingParams = config2.samplingParams;
|
|
160384
160386
|
if (!this.apiKey) {
|
|
160385
160387
|
throw new Error("Gemini API key is required");
|
|
160386
160388
|
}
|
|
@@ -160487,10 +160489,14 @@ var init_geminiContentGenerator = __esm({
|
|
|
160487
160489
|
parts: [{ text: systemInstruction }]
|
|
160488
160490
|
};
|
|
160489
160491
|
}
|
|
160492
|
+
const temperature = this.samplingParams?.temperature ?? 1;
|
|
160490
160493
|
return {
|
|
160491
160494
|
body: {
|
|
160492
160495
|
contents: this.sanitizeContents(request4.contents),
|
|
160493
|
-
generationConfig
|
|
160496
|
+
generationConfig: {
|
|
160497
|
+
...generationConfig,
|
|
160498
|
+
temperature
|
|
160499
|
+
},
|
|
160494
160500
|
tools,
|
|
160495
160501
|
systemInstruction: formattedSystemInstruction
|
|
160496
160502
|
},
|
|
@@ -160714,7 +160720,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
160714
160720
|
};
|
|
160715
160721
|
}
|
|
160716
160722
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
160717
|
-
const version3 = "0.1.1-alpha.
|
|
160723
|
+
const version3 = "0.1.1-alpha.3";
|
|
160718
160724
|
const userAgent2 = `QwenCode/${version3} (${process.platform}; ${process.arch})`;
|
|
160719
160725
|
const baseHeaders = {
|
|
160720
160726
|
"User-Agent": userAgent2
|
|
@@ -178183,7 +178189,7 @@ var init_turn = __esm({
|
|
|
178183
178189
|
yield { type: "content" /* Content */, value: text };
|
|
178184
178190
|
}
|
|
178185
178191
|
const functionCalls = resp.functionCalls ?? [];
|
|
178186
|
-
if (resp.candidates?.[0]?.content?.parts) {
|
|
178192
|
+
if (functionCalls.length === 0 && resp.candidates?.[0]?.content?.parts) {
|
|
178187
178193
|
for (const part of resp.candidates[0].content.parts) {
|
|
178188
178194
|
if (part.functionCall) {
|
|
178189
178195
|
functionCalls.push(part.functionCall);
|
|
@@ -235006,8 +235012,8 @@ var init_git_commit = __esm({
|
|
|
235006
235012
|
"packages/core/src/generated/git-commit.ts"() {
|
|
235007
235013
|
"use strict";
|
|
235008
235014
|
init_esbuild_shims();
|
|
235009
|
-
GIT_COMMIT_INFO = "
|
|
235010
|
-
CLI_VERSION = "0.1.1-alpha.
|
|
235015
|
+
GIT_COMMIT_INFO = "de3b095";
|
|
235016
|
+
CLI_VERSION = "0.1.1-alpha.3";
|
|
235011
235017
|
}
|
|
235012
235018
|
});
|
|
235013
235019
|
|
|
@@ -345318,7 +345324,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
345318
345324
|
// packages/cli/src/utils/version.ts
|
|
345319
345325
|
async function getCliVersion() {
|
|
345320
345326
|
const pkgJson = await getPackageJson();
|
|
345321
|
-
return "0.1.1-alpha.
|
|
345327
|
+
return "0.1.1-alpha.3";
|
|
345322
345328
|
}
|
|
345323
345329
|
__name(getCliVersion, "getCliVersion");
|
|
345324
345330
|
|
|
@@ -351604,7 +351610,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
351604
351610
|
|
|
351605
351611
|
// packages/cli/src/generated/git-commit.ts
|
|
351606
351612
|
init_esbuild_shims();
|
|
351607
|
-
var GIT_COMMIT_INFO2 = "
|
|
351613
|
+
var GIT_COMMIT_INFO2 = "de3b095";
|
|
351608
351614
|
|
|
351609
351615
|
// packages/cli/src/utils/systemInfo.ts
|
|
351610
351616
|
async function getNpmVersion() {
|
|
@@ -389408,14 +389414,14 @@ var XHS_SSO_MODELS = [
|
|
|
389408
389414
|
displayName: "gemini-3-pro-preview(low)",
|
|
389409
389415
|
baseUrl: "https://runway.devops.rednote.life/openai/google/v1",
|
|
389410
389416
|
contextWindow: "1M",
|
|
389411
|
-
description: "
|
|
389417
|
+
description: "Google\u8FC4\u4ECA\u4E3A\u6B62\u6700\u667A\u80FD\u7684\u6A21\u578B(\u601D\u8003\u65F6\u95F4\u77ED)"
|
|
389412
389418
|
},
|
|
389413
389419
|
{
|
|
389414
389420
|
id: "gemini-3-pro-preview(high)",
|
|
389415
389421
|
displayName: "gemini-3-pro-preview(high)",
|
|
389416
389422
|
baseUrl: "https://runway.devops.rednote.life/openai/google/v1",
|
|
389417
389423
|
contextWindow: "1M",
|
|
389418
|
-
description: "
|
|
389424
|
+
description: "Google\u8FC4\u4ECA\u4E3A\u6B62\u6700\u667A\u80FD\u7684\u6A21\u578B(\u601D\u8003\u65F6\u95F4\u957F)"
|
|
389419
389425
|
}
|
|
389420
389426
|
];
|
|
389421
389427
|
|
|
@@ -401409,7 +401415,7 @@ function setDebugMode2(enabled) {
|
|
|
401409
401415
|
}
|
|
401410
401416
|
__name(setDebugMode2, "setDebugMode");
|
|
401411
401417
|
function isDebugEnabled3() {
|
|
401412
|
-
return globalDebugMode3 || process.env["
|
|
401418
|
+
return globalDebugMode3 || process.env["RDMIND_DEBUG_PLUGIN_SYNC"] === "1";
|
|
401413
401419
|
}
|
|
401414
401420
|
__name(isDebugEnabled3, "isDebugEnabled");
|
|
401415
401421
|
function debugLog3(message, ...args) {
|
|
@@ -401421,14 +401427,12 @@ __name(debugLog3, "debugLog");
|
|
|
401421
401427
|
function getSsoCredentials() {
|
|
401422
401428
|
try {
|
|
401423
401429
|
const credsPath = path117.join(os42.homedir(), ".rdmind", "xhs_sso_creds.json");
|
|
401424
|
-
debugLog3(`\u5C1D\u8BD5\u4ECE\u8DEF\u5F84\u8BFB\u53D6SSO\u51ED\u8BC1: ${credsPath}`);
|
|
401425
401430
|
if (fs103.existsSync(credsPath)) {
|
|
401426
401431
|
const content = fs103.readFileSync(credsPath, "utf-8");
|
|
401427
401432
|
const parsed = JSON.parse(content);
|
|
401428
401433
|
const rdmindSsoId = parsed?.["rdmind_sso_id"];
|
|
401429
401434
|
const ssoName = parsed?.["sso_name"];
|
|
401430
401435
|
if (typeof rdmindSsoId === "string" && rdmindSsoId && typeof ssoName === "string" && ssoName) {
|
|
401431
|
-
debugLog3("\u6210\u529F\u8BFB\u53D6rdmind_sso_id\u548Csso_name");
|
|
401432
401436
|
return {
|
|
401433
401437
|
rdmind_sso_id: rdmindSsoId,
|
|
401434
401438
|
sso_name: ssoName
|
|
@@ -401440,13 +401444,12 @@ function getSsoCredentials() {
|
|
|
401440
401444
|
debugLog3("SSO\u51ED\u8BC1\u6587\u4EF6\u4E0D\u5B58\u5728");
|
|
401441
401445
|
}
|
|
401442
401446
|
} catch (error2) {
|
|
401443
|
-
|
|
401447
|
+
debugLog3("\u8BFB\u53D6 xhs_sso_creds.json \u4E2D\u7684\u51ED\u8BC1\u4FE1\u606F\u5931\u8D25:", error2);
|
|
401444
401448
|
}
|
|
401445
401449
|
return null;
|
|
401446
401450
|
}
|
|
401447
401451
|
__name(getSsoCredentials, "getSsoCredentials");
|
|
401448
401452
|
function getClientPlugins() {
|
|
401449
|
-
debugLog3("\u83B7\u53D6\u5BA2\u6237\u7AEF\u63D2\u4EF6\u5217\u8868");
|
|
401450
401453
|
const plugins = [];
|
|
401451
401454
|
try {
|
|
401452
401455
|
const rdmindDir = path117.join(os42.homedir(), ".rdmind");
|
|
@@ -401454,7 +401457,6 @@ function getClientPlugins() {
|
|
|
401454
401457
|
for (const pluginType of pluginTypes) {
|
|
401455
401458
|
const pluginTypeDir = path117.join(rdmindDir, pluginType);
|
|
401456
401459
|
if (!fs103.existsSync(pluginTypeDir)) {
|
|
401457
|
-
debugLog3(`\u63D2\u4EF6\u7C7B\u578B\u76EE\u5F55\u4E0D\u5B58\u5728: ${pluginTypeDir}`);
|
|
401458
401460
|
continue;
|
|
401459
401461
|
}
|
|
401460
401462
|
const idDirs = fs103.readdirSync(pluginTypeDir);
|
|
@@ -401482,15 +401484,13 @@ function getClientPlugins() {
|
|
|
401482
401484
|
}
|
|
401483
401485
|
}
|
|
401484
401486
|
} catch (error2) {
|
|
401485
|
-
|
|
401487
|
+
debugLog3("\u8BFB\u53D6\u5BA2\u6237\u7AEF\u63D2\u4EF6\u5217\u8868\u5931\u8D25:", error2);
|
|
401486
401488
|
}
|
|
401487
|
-
debugLog3(`\u627E\u5230 ${plugins.length} \u4E2A\u63D2\u4EF6`);
|
|
401488
401489
|
return plugins;
|
|
401489
401490
|
}
|
|
401490
401491
|
__name(getClientPlugins, "getClientPlugins");
|
|
401491
401492
|
async function syncPlugins() {
|
|
401492
401493
|
try {
|
|
401493
|
-
debugLog3("\u5F00\u59CB\u63D2\u4EF6\u540C\u6B65\u6D41\u7A0B");
|
|
401494
401494
|
const credentials = getSsoCredentials();
|
|
401495
401495
|
if (!credentials) {
|
|
401496
401496
|
debugLog3("\u672A\u627E\u5230\u6709\u6548\u7684SSO\u51ED\u8BC1\uFF0C\u8DF3\u8FC7\u63D2\u4EF6\u540C\u6B65");
|
|
@@ -401501,10 +401501,8 @@ async function syncPlugins() {
|
|
|
401501
401501
|
rdmindSsoId: credentials.rdmind_sso_id,
|
|
401502
401502
|
clientPlugins
|
|
401503
401503
|
};
|
|
401504
|
-
debugLog3("\u6784\u5EFA\u540C\u6B65\u8BF7\u6C42", request4);
|
|
401505
401504
|
const apiBaseUrl = process.env["RDMIND_API_BASE_URL"]?.trim() || PALLAS_HTTP_BASE;
|
|
401506
401505
|
const url3 = `${apiBaseUrl}/pallas/rdmind/cli/sync`;
|
|
401507
|
-
debugLog3(`\u51C6\u5907\u53D1\u9001POST\u8BF7\u6C42\u5230: ${url3}`);
|
|
401508
401506
|
const response = await fetch(url3, {
|
|
401509
401507
|
method: "POST",
|
|
401510
401508
|
headers: {
|
|
@@ -401514,9 +401512,8 @@ async function syncPlugins() {
|
|
|
401514
401512
|
},
|
|
401515
401513
|
body: JSON.stringify(request4)
|
|
401516
401514
|
});
|
|
401517
|
-
debugLog3(`\u6536\u5230\u54CD\u5E94\u72B6\u6001: ${response.status}`);
|
|
401518
401515
|
if (!response.ok) {
|
|
401519
|
-
|
|
401516
|
+
debugLog3(
|
|
401520
401517
|
`\u63D2\u4EF6\u540C\u6B65\u5931\u8D25\uFF0CHTTP ${response.status}: ${response.statusText}`
|
|
401521
401518
|
);
|
|
401522
401519
|
return;
|
|
@@ -401524,7 +401521,7 @@ async function syncPlugins() {
|
|
|
401524
401521
|
const result = await response.json();
|
|
401525
401522
|
debugLog3("\u63D2\u4EF6\u540C\u6B65\u6210\u529F\uFF0C\u670D\u52A1\u5668\u54CD\u5E94:", result);
|
|
401526
401523
|
} catch (error2) {
|
|
401527
|
-
|
|
401524
|
+
debugLog3("\u63D2\u4EF6\u540C\u6B65\u5F02\u5E38:", error2);
|
|
401528
401525
|
}
|
|
401529
401526
|
}
|
|
401530
401527
|
__name(syncPlugins, "syncPlugins");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdmind/rdmind",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.3",
|
|
4
4
|
"description": "RDMind - AI-powered coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"locales"
|
|
21
21
|
],
|
|
22
22
|
"config": {
|
|
23
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.1.1-alpha.
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.1.1-alpha.3"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|