@rdmind/rdmind 0.2.0-alpha.0 → 0.2.0-alpha.1
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 +284 -128
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -33943,7 +33943,7 @@ var require_src5 = __commonJS({
|
|
|
33943
33943
|
};
|
|
33944
33944
|
}
|
|
33945
33945
|
__name(_asyncToGenerator, "_asyncToGenerator");
|
|
33946
|
-
var
|
|
33946
|
+
var readFile12 = fs112.readFile ? (0, _util.promisify)(fs112.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
|
|
33947
33947
|
return _regenerator().w(function(_context) {
|
|
33948
33948
|
while (1) switch (_context.n) {
|
|
33949
33949
|
case 0:
|
|
@@ -34085,7 +34085,7 @@ var require_src5 = __commonJS({
|
|
|
34085
34085
|
break;
|
|
34086
34086
|
case 1:
|
|
34087
34087
|
_context2.n = 2;
|
|
34088
|
-
return
|
|
34088
|
+
return readFile12(keyFile, "utf8");
|
|
34089
34089
|
case 2:
|
|
34090
34090
|
key = _context2.v;
|
|
34091
34091
|
body = JSON.parse(key);
|
|
@@ -34103,7 +34103,7 @@ var require_src5 = __commonJS({
|
|
|
34103
34103
|
});
|
|
34104
34104
|
case 4:
|
|
34105
34105
|
_context2.n = 5;
|
|
34106
|
-
return
|
|
34106
|
+
return readFile12(keyFile, "utf8");
|
|
34107
34107
|
case 5:
|
|
34108
34108
|
_privateKey = _context2.v;
|
|
34109
34109
|
return _context2.a(2, {
|
|
@@ -35741,7 +35741,7 @@ var require_filesubjecttokensupplier = __commonJS({
|
|
|
35741
35741
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
35742
35742
|
var util_1 = __require("util");
|
|
35743
35743
|
var fs112 = __require("fs");
|
|
35744
|
-
var
|
|
35744
|
+
var readFile12 = (0, util_1.promisify)(fs112.readFile ?? (() => {
|
|
35745
35745
|
}));
|
|
35746
35746
|
var realpath2 = (0, util_1.promisify)(fs112.realpath ?? (() => {
|
|
35747
35747
|
}));
|
|
@@ -35784,7 +35784,7 @@ var require_filesubjecttokensupplier = __commonJS({
|
|
|
35784
35784
|
throw err;
|
|
35785
35785
|
}
|
|
35786
35786
|
let subjectToken;
|
|
35787
|
-
const rawText = await
|
|
35787
|
+
const rawText = await readFile12(parsedFilePath, { encoding: "utf8" });
|
|
35788
35788
|
if (this.formatType === "text") {
|
|
35789
35789
|
subjectToken = rawText;
|
|
35790
35790
|
} else if (this.formatType === "json" && this.subjectTokenFieldName) {
|
|
@@ -81450,7 +81450,7 @@ var require_error = __commonJS({
|
|
|
81450
81450
|
init_esbuild_shims();
|
|
81451
81451
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
81452
81452
|
exports2.getErrorMessage = getErrorMessage4;
|
|
81453
|
-
exports2.getErrorCode =
|
|
81453
|
+
exports2.getErrorCode = getErrorCode2;
|
|
81454
81454
|
function getErrorMessage4(error2) {
|
|
81455
81455
|
if (error2 instanceof Error) {
|
|
81456
81456
|
return error2.message;
|
|
@@ -81459,14 +81459,14 @@ var require_error = __commonJS({
|
|
|
81459
81459
|
}
|
|
81460
81460
|
}
|
|
81461
81461
|
__name(getErrorMessage4, "getErrorMessage");
|
|
81462
|
-
function
|
|
81462
|
+
function getErrorCode2(error2) {
|
|
81463
81463
|
if (typeof error2 === "object" && error2 !== null && "code" in error2 && typeof error2.code === "number") {
|
|
81464
81464
|
return error2.code;
|
|
81465
81465
|
} else {
|
|
81466
81466
|
return null;
|
|
81467
81467
|
}
|
|
81468
81468
|
}
|
|
81469
|
-
__name(
|
|
81469
|
+
__name(getErrorCode2, "getErrorCode");
|
|
81470
81470
|
}
|
|
81471
81471
|
});
|
|
81472
81472
|
|
|
@@ -123711,8 +123711,8 @@ var require_async = __commonJS({
|
|
|
123711
123711
|
cb(null, x3);
|
|
123712
123712
|
}
|
|
123713
123713
|
}, "maybeRealpath");
|
|
123714
|
-
var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(
|
|
123715
|
-
|
|
123714
|
+
var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile12, pkgfile, cb) {
|
|
123715
|
+
readFile12(pkgfile, function(readFileErr, body) {
|
|
123716
123716
|
if (readFileErr) cb(readFileErr);
|
|
123717
123717
|
else {
|
|
123718
123718
|
try {
|
|
@@ -123747,7 +123747,7 @@ var require_async = __commonJS({
|
|
|
123747
123747
|
opts = normalizeOptions(x3, opts);
|
|
123748
123748
|
var isFile3 = opts.isFile || defaultIsFile;
|
|
123749
123749
|
var isDirectory = opts.isDirectory || defaultIsDir;
|
|
123750
|
-
var
|
|
123750
|
+
var readFile12 = opts.readFile || fs112.readFile;
|
|
123751
123751
|
var realpath2 = opts.realpath || defaultRealpath;
|
|
123752
123752
|
var readPackage2 = opts.readPackage || defaultReadPackage;
|
|
123753
123753
|
if (opts.readFile && opts.readPackage) {
|
|
@@ -123873,7 +123873,7 @@ var require_async = __commonJS({
|
|
|
123873
123873
|
var pkgfile = path122.join(pkgdir, "package.json");
|
|
123874
123874
|
isFile3(pkgfile, function(err2, ex) {
|
|
123875
123875
|
if (!ex) return loadpkg(path122.dirname(dir), cb2);
|
|
123876
|
-
readPackage2(
|
|
123876
|
+
readPackage2(readFile12, pkgfile, function(err3, pkgParam) {
|
|
123877
123877
|
if (err3) cb2(err3);
|
|
123878
123878
|
var pkg2 = pkgParam;
|
|
123879
123879
|
if (pkg2 && opts.packageFilter) {
|
|
@@ -123898,7 +123898,7 @@ var require_async = __commonJS({
|
|
|
123898
123898
|
isFile3(pkgfile, function(err2, ex) {
|
|
123899
123899
|
if (err2) return cb2(err2);
|
|
123900
123900
|
if (!ex) return loadAsFile(path122.join(x4, "index"), fpkg, cb2);
|
|
123901
|
-
readPackage2(
|
|
123901
|
+
readPackage2(readFile12, pkgfile, function(err3, pkgParam) {
|
|
123902
123902
|
if (err3) return cb2(err3);
|
|
123903
123903
|
var pkg2 = pkgParam;
|
|
123904
123904
|
if (pkg2 && opts.packageFilter) {
|
|
@@ -132128,7 +132128,7 @@ var init_converter = __esm({
|
|
|
132128
132128
|
const response = new GenerateContentResponse();
|
|
132129
132129
|
if (choice2) {
|
|
132130
132130
|
const parts = [];
|
|
132131
|
-
const reasoningText = choice2.delta
|
|
132131
|
+
const reasoningText = choice2.delta?.reasoning_content;
|
|
132132
132132
|
if (reasoningText) {
|
|
132133
132133
|
parts.push({ text: reasoningText, thought: true });
|
|
132134
132134
|
}
|
|
@@ -143788,6 +143788,153 @@ var init_open = __esm({
|
|
|
143788
143788
|
}
|
|
143789
143789
|
});
|
|
143790
143790
|
|
|
143791
|
+
// packages/core/src/utils/fetch.ts
|
|
143792
|
+
import { URL as URL2 } from "node:url";
|
|
143793
|
+
function isPrivateIp(url2) {
|
|
143794
|
+
try {
|
|
143795
|
+
const hostname5 = new URL2(url2).hostname;
|
|
143796
|
+
return PRIVATE_IP_RANGES.some((range) => range.test(hostname5));
|
|
143797
|
+
} catch (_e2) {
|
|
143798
|
+
return false;
|
|
143799
|
+
}
|
|
143800
|
+
}
|
|
143801
|
+
async function fetchWithTimeout(url2, timeout2) {
|
|
143802
|
+
const controller = new AbortController();
|
|
143803
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout2);
|
|
143804
|
+
try {
|
|
143805
|
+
const response = await fetch(url2, { signal: controller.signal });
|
|
143806
|
+
return response;
|
|
143807
|
+
} catch (error2) {
|
|
143808
|
+
if (isNodeError(error2) && error2.code === "ABORT_ERR") {
|
|
143809
|
+
throw new FetchError2(`Request timed out after ${timeout2}ms`, "ETIMEDOUT");
|
|
143810
|
+
}
|
|
143811
|
+
throw new FetchError2(getErrorMessage(error2));
|
|
143812
|
+
} finally {
|
|
143813
|
+
clearTimeout(timeoutId);
|
|
143814
|
+
}
|
|
143815
|
+
}
|
|
143816
|
+
function getErrorCode(error2) {
|
|
143817
|
+
if (!error2 || typeof error2 !== "object") {
|
|
143818
|
+
return void 0;
|
|
143819
|
+
}
|
|
143820
|
+
if ("code" in error2 && typeof error2["code"] === "string") {
|
|
143821
|
+
return error2["code"];
|
|
143822
|
+
}
|
|
143823
|
+
return void 0;
|
|
143824
|
+
}
|
|
143825
|
+
function formatUnknownErrorMessage(error2) {
|
|
143826
|
+
if (typeof error2 === "string") {
|
|
143827
|
+
return error2;
|
|
143828
|
+
}
|
|
143829
|
+
if (typeof error2 === "number" || typeof error2 === "boolean" || typeof error2 === "bigint") {
|
|
143830
|
+
return String(error2);
|
|
143831
|
+
}
|
|
143832
|
+
if (error2 instanceof Error) {
|
|
143833
|
+
return error2.message;
|
|
143834
|
+
}
|
|
143835
|
+
if (!error2 || typeof error2 !== "object") {
|
|
143836
|
+
return void 0;
|
|
143837
|
+
}
|
|
143838
|
+
const message = error2["message"];
|
|
143839
|
+
if (typeof message === "string") {
|
|
143840
|
+
return message;
|
|
143841
|
+
}
|
|
143842
|
+
return void 0;
|
|
143843
|
+
}
|
|
143844
|
+
function formatErrorCause(error2) {
|
|
143845
|
+
if (!(error2 instanceof Error)) {
|
|
143846
|
+
return void 0;
|
|
143847
|
+
}
|
|
143848
|
+
const cause = error2.cause;
|
|
143849
|
+
if (!cause) {
|
|
143850
|
+
return void 0;
|
|
143851
|
+
}
|
|
143852
|
+
const causeCode = getErrorCode(cause);
|
|
143853
|
+
const causeMessage = formatUnknownErrorMessage(cause);
|
|
143854
|
+
if (!causeCode && !causeMessage) {
|
|
143855
|
+
return void 0;
|
|
143856
|
+
}
|
|
143857
|
+
if (causeCode && causeMessage && !causeMessage.includes(causeCode)) {
|
|
143858
|
+
return `${causeCode}: ${causeMessage}`;
|
|
143859
|
+
}
|
|
143860
|
+
return causeMessage ?? causeCode;
|
|
143861
|
+
}
|
|
143862
|
+
function formatFetchErrorForUser(error2, options2 = {}) {
|
|
143863
|
+
const errorMessage = getErrorMessage(error2);
|
|
143864
|
+
const code2 = error2 instanceof Error ? getErrorCode(error2.cause) ?? getErrorCode(error2) : getErrorCode(error2);
|
|
143865
|
+
const cause = formatErrorCause(error2);
|
|
143866
|
+
const fullErrorMessage = [
|
|
143867
|
+
errorMessage,
|
|
143868
|
+
cause ? `(cause: ${cause})` : void 0
|
|
143869
|
+
].filter(Boolean).join(" ");
|
|
143870
|
+
const shouldShowFetchHints = errorMessage.toLowerCase().includes("fetch failed") || code2 != null && FETCH_TROUBLESHOOTING_ERROR_CODES.has(code2);
|
|
143871
|
+
const shouldShowTlsHint = code2 != null && TLS_ERROR_CODES.has(code2);
|
|
143872
|
+
if (!shouldShowFetchHints) {
|
|
143873
|
+
return fullErrorMessage;
|
|
143874
|
+
}
|
|
143875
|
+
const hintLines = [
|
|
143876
|
+
"",
|
|
143877
|
+
"Troubleshooting:",
|
|
143878
|
+
...options2.url ? [`- Confirm you can reach ${options2.url} from this machine.`] : [],
|
|
143879
|
+
"- If you are behind a proxy, pass `--proxy <url>` (or set `proxy` in settings).",
|
|
143880
|
+
...shouldShowTlsHint ? [
|
|
143881
|
+
"- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` to your CA bundle."
|
|
143882
|
+
] : []
|
|
143883
|
+
];
|
|
143884
|
+
return `${fullErrorMessage}${hintLines.join("\n")}`;
|
|
143885
|
+
}
|
|
143886
|
+
var PRIVATE_IP_RANGES, TLS_ERROR_CODES, FETCH_TROUBLESHOOTING_ERROR_CODES, FetchError2;
|
|
143887
|
+
var init_fetch = __esm({
|
|
143888
|
+
"packages/core/src/utils/fetch.ts"() {
|
|
143889
|
+
"use strict";
|
|
143890
|
+
init_esbuild_shims();
|
|
143891
|
+
init_errors();
|
|
143892
|
+
PRIVATE_IP_RANGES = [
|
|
143893
|
+
/^10\./,
|
|
143894
|
+
/^127\./,
|
|
143895
|
+
/^172\.(1[6-9]|2[0-9]|3[0-1])\./,
|
|
143896
|
+
/^192\.168\./,
|
|
143897
|
+
/^::1$/,
|
|
143898
|
+
/^fc00:/,
|
|
143899
|
+
/^fe80:/
|
|
143900
|
+
];
|
|
143901
|
+
TLS_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
143902
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
143903
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
143904
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
143905
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
143906
|
+
"CERT_HAS_EXPIRED",
|
|
143907
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
143908
|
+
]);
|
|
143909
|
+
FETCH_TROUBLESHOOTING_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
143910
|
+
...TLS_ERROR_CODES,
|
|
143911
|
+
"ECONNRESET",
|
|
143912
|
+
"ETIMEDOUT",
|
|
143913
|
+
"ECONNREFUSED",
|
|
143914
|
+
"ENOTFOUND",
|
|
143915
|
+
"EAI_AGAIN",
|
|
143916
|
+
"EHOSTUNREACH",
|
|
143917
|
+
"ENETUNREACH"
|
|
143918
|
+
]);
|
|
143919
|
+
FetchError2 = class extends Error {
|
|
143920
|
+
constructor(message, code2) {
|
|
143921
|
+
super(message);
|
|
143922
|
+
this.code = code2;
|
|
143923
|
+
this.name = "FetchError";
|
|
143924
|
+
}
|
|
143925
|
+
static {
|
|
143926
|
+
__name(this, "FetchError");
|
|
143927
|
+
}
|
|
143928
|
+
};
|
|
143929
|
+
__name(isPrivateIp, "isPrivateIp");
|
|
143930
|
+
__name(fetchWithTimeout, "fetchWithTimeout");
|
|
143931
|
+
__name(getErrorCode, "getErrorCode");
|
|
143932
|
+
__name(formatUnknownErrorMessage, "formatUnknownErrorMessage");
|
|
143933
|
+
__name(formatErrorCause, "formatErrorCause");
|
|
143934
|
+
__name(formatFetchErrorForUser, "formatFetchErrorForUser");
|
|
143935
|
+
}
|
|
143936
|
+
});
|
|
143937
|
+
|
|
143791
143938
|
// packages/core/src/qwen/sharedTokenManager.ts
|
|
143792
143939
|
import path9 from "node:path";
|
|
143793
143940
|
import { promises as fs13, unlinkSync } from "node:fs";
|
|
@@ -144710,8 +144857,11 @@ Server requested to slow down, increasing poll interval to ${pollInterval}ms'`
|
|
|
144710
144857
|
console.error("\n" + timeoutMessage);
|
|
144711
144858
|
return { success: false, reason: "timeout", message: timeoutMessage };
|
|
144712
144859
|
} catch (error2) {
|
|
144713
|
-
const
|
|
144714
|
-
|
|
144860
|
+
const fullErrorMessage = formatFetchErrorForUser(error2, {
|
|
144861
|
+
url: QWEN_OAUTH_BASE_URL
|
|
144862
|
+
});
|
|
144863
|
+
const message = `Device authorization flow failed: ${fullErrorMessage}`;
|
|
144864
|
+
qwenOAuth2Events.emit("auth-progress" /* AuthProgress */, "error", message);
|
|
144715
144865
|
console.error(message);
|
|
144716
144866
|
return { success: false, reason: "error", message };
|
|
144717
144867
|
} finally {
|
|
@@ -144763,6 +144913,7 @@ var init_qwenOAuth2 = __esm({
|
|
|
144763
144913
|
"use strict";
|
|
144764
144914
|
init_esbuild_shims();
|
|
144765
144915
|
init_open();
|
|
144916
|
+
init_fetch();
|
|
144766
144917
|
init_sharedTokenManager();
|
|
144767
144918
|
QWEN_OAUTH_BASE_URL = "https://chat.qwen.ai";
|
|
144768
144919
|
QWEN_OAUTH_DEVICE_CODE_ENDPOINT = `${QWEN_OAUTH_BASE_URL}/api/v1/oauth2/device/code`;
|
|
@@ -156907,7 +157058,7 @@ __export(geminiContentGenerator_exports2, {
|
|
|
156907
157058
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
156908
157059
|
});
|
|
156909
157060
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
156910
|
-
const version2 = "0.2.0-alpha.
|
|
157061
|
+
const version2 = "0.2.0-alpha.1";
|
|
156911
157062
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
156912
157063
|
const baseHeaders = {
|
|
156913
157064
|
"User-Agent": userAgent2
|
|
@@ -162354,7 +162505,7 @@ var require_levenshtein = __commonJS({
|
|
|
162354
162505
|
});
|
|
162355
162506
|
|
|
162356
162507
|
// packages/core/src/utils/summarizer.ts
|
|
162357
|
-
async function summarizeToolOutput(textToSummarize, geminiClient, abortSignal, maxOutputTokens = 2e3) {
|
|
162508
|
+
async function summarizeToolOutput(textToSummarize, geminiClient, abortSignal, maxOutputTokens = 2e3, model) {
|
|
162358
162509
|
if (!textToSummarize || textToSummarize.length < maxOutputTokens) {
|
|
162359
162510
|
return textToSummarize;
|
|
162360
162511
|
}
|
|
@@ -162371,7 +162522,7 @@ async function summarizeToolOutput(textToSummarize, geminiClient, abortSignal, m
|
|
|
162371
162522
|
contents,
|
|
162372
162523
|
toolOutputSummarizerConfig,
|
|
162373
162524
|
abortSignal,
|
|
162374
|
-
|
|
162525
|
+
model || DEFAULT_QWEN_MODEL
|
|
162375
162526
|
);
|
|
162376
162527
|
return getResponseText(parsedResponse) || textToSummarize;
|
|
162377
162528
|
} catch (error2) {
|
|
@@ -172342,7 +172493,8 @@ var init_shellExecutionService = __esm({
|
|
|
172342
172493
|
stdio: ["ignore", "pipe", "pipe"],
|
|
172343
172494
|
windowsVerbatimArguments: true,
|
|
172344
172495
|
shell: isWindows8 ? true : "bash",
|
|
172345
|
-
detached:
|
|
172496
|
+
detached: !isWindows8,
|
|
172497
|
+
windowsHide: isWindows8,
|
|
172346
172498
|
env: {
|
|
172347
172499
|
...process.env,
|
|
172348
172500
|
QWEN_CODE: "1",
|
|
@@ -173920,7 +174072,8 @@ ${result.output}`;
|
|
|
173920
174072
|
llmContent,
|
|
173921
174073
|
this.config.getGeminiClient(),
|
|
173922
174074
|
signal,
|
|
173923
|
-
summarizeConfig[ShellTool.Name].tokenBudget
|
|
174075
|
+
summarizeConfig[ShellTool.Name].tokenBudget,
|
|
174076
|
+
this.config.getModel()
|
|
173924
174077
|
);
|
|
173925
174078
|
return {
|
|
173926
174079
|
llmContent: summary,
|
|
@@ -191696,7 +191849,7 @@ function gitInstanceFactory(baseDir, options2) {
|
|
|
191696
191849
|
customBinaryPlugin(plugins, config2.binary, config2.unsafe?.allowUnsafeCustomBinary);
|
|
191697
191850
|
return new Git(config2, plugins);
|
|
191698
191851
|
}
|
|
191699
|
-
var import_file_exists, import_debug, import_promise_deferred, import_promise_deferred2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL2, NOOP, objectToString, init_util3, filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions2, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils6, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task2, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config2, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a4, GrepQuery, init_grep, reset_exports, ResetMode, ResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log2, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version4, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, clone_exports, init_clone, parsers10, init_parse_fetch, fetch_exports,
|
|
191852
|
+
var import_file_exists, import_debug, import_promise_deferred, import_promise_deferred2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL2, NOOP, objectToString, init_util3, filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions2, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils6, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task2, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config2, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a4, GrepQuery, init_grep, reset_exports, ResetMode, ResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log2, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version4, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, clone_exports, init_clone, parsers10, init_parse_fetch, fetch_exports, init_fetch2, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, simpleGit;
|
|
191700
191853
|
var init_esm12 = __esm({
|
|
191701
191854
|
"node_modules/simple-git/dist/esm/index.js"() {
|
|
191702
191855
|
init_esbuild_shims();
|
|
@@ -193910,7 +194063,7 @@ var init_esm12 = __esm({
|
|
|
193910
194063
|
});
|
|
193911
194064
|
__name(disallowedCommand2, "disallowedCommand2");
|
|
193912
194065
|
__name(fetchTask, "fetchTask");
|
|
193913
|
-
|
|
194066
|
+
init_fetch2 = __esm2({
|
|
193914
194067
|
"src/lib/tasks/fetch.ts"() {
|
|
193915
194068
|
"use strict";
|
|
193916
194069
|
init_parse_fetch();
|
|
@@ -194098,7 +194251,7 @@ var init_esm12 = __esm({
|
|
|
194098
194251
|
var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS2(clone_exports));
|
|
194099
194252
|
var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS2(clean_exports));
|
|
194100
194253
|
var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS2(diff_exports));
|
|
194101
|
-
var { fetchTask: fetchTask2 } = (
|
|
194254
|
+
var { fetchTask: fetchTask2 } = (init_fetch2(), __toCommonJS2(fetch_exports));
|
|
194102
194255
|
var { moveTask: moveTask2 } = (init_move(), __toCommonJS2(move_exports));
|
|
194103
194256
|
var { pullTask: pullTask2 } = (init_pull(), __toCommonJS2(pull_exports));
|
|
194104
194257
|
var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS2(push_exports));
|
|
@@ -209968,7 +210121,7 @@ var init_promptIdContext = __esm({
|
|
|
209968
210121
|
|
|
209969
210122
|
// packages/core/src/utils/llm-edit-fixer.ts
|
|
209970
210123
|
import { createHash as createHash4 } from "node:crypto";
|
|
209971
|
-
async function FixLLMEditWithInstruction(instruction, old_string, new_string, error2, current_content, baseLlmClient, abortSignal) {
|
|
210124
|
+
async function FixLLMEditWithInstruction(instruction, old_string, new_string, error2, current_content, baseLlmClient, abortSignal, model) {
|
|
209972
210125
|
let promptId = promptIdContext.getStore();
|
|
209973
210126
|
if (!promptId) {
|
|
209974
210127
|
promptId = `llm-fixer-fallback-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
@@ -210000,7 +210153,7 @@ async function FixLLMEditWithInstruction(instruction, old_string, new_string, er
|
|
|
210000
210153
|
contents,
|
|
210001
210154
|
schema: SearchReplaceEditSchema,
|
|
210002
210155
|
abortSignal,
|
|
210003
|
-
model:
|
|
210156
|
+
model: model || DEFAULT_QWEN_MODEL,
|
|
210004
210157
|
systemInstruction: EDIT_SYS_PROMPT,
|
|
210005
210158
|
promptId,
|
|
210006
210159
|
maxAttempts: 1
|
|
@@ -210311,7 +210464,8 @@ var init_smart_edit = __esm({
|
|
|
210311
210464
|
initialError.raw,
|
|
210312
210465
|
currentContent,
|
|
210313
210466
|
this.config.getBaseLlmClient(),
|
|
210314
|
-
abortSignal
|
|
210467
|
+
abortSignal,
|
|
210468
|
+
this.config.getModel()
|
|
210315
210469
|
);
|
|
210316
210470
|
if (fixedEdit.noChangesRequired) {
|
|
210317
210471
|
return {
|
|
@@ -212559,11 +212713,11 @@ var init_sdk_control_client_transport = __esm({
|
|
|
212559
212713
|
import { execFile as execFile9 } from "node:child_process";
|
|
212560
212714
|
import { promisify as promisify7 } from "node:util";
|
|
212561
212715
|
import { platform as platform4 } from "node:os";
|
|
212562
|
-
import { URL as
|
|
212716
|
+
import { URL as URL3 } from "node:url";
|
|
212563
212717
|
function validateUrl(url2) {
|
|
212564
212718
|
let parsedUrl;
|
|
212565
212719
|
try {
|
|
212566
|
-
parsedUrl = new
|
|
212720
|
+
parsedUrl = new URL3(url2);
|
|
212567
212721
|
} catch (_error) {
|
|
212568
212722
|
throw new Error(`Invalid URL: ${url2}`);
|
|
212569
212723
|
}
|
|
@@ -213630,7 +213784,7 @@ var init_oauth_utils = __esm({
|
|
|
213630
213784
|
// packages/core/src/mcp/oauth-provider.ts
|
|
213631
213785
|
import * as http4 from "node:http";
|
|
213632
213786
|
import * as crypto11 from "node:crypto";
|
|
213633
|
-
import { URL as
|
|
213787
|
+
import { URL as URL4 } from "node:url";
|
|
213634
213788
|
var OAUTH_DISPLAY_MESSAGE_EVENT, HTTP_OK, MCPOAuthProvider;
|
|
213635
213789
|
var init_oauth_provider = __esm({
|
|
213636
213790
|
"packages/core/src/mcp/oauth-provider.ts"() {
|
|
@@ -213716,7 +213870,7 @@ var init_oauth_provider = __esm({
|
|
|
213716
213870
|
const server = http4.createServer(
|
|
213717
213871
|
async (req, res) => {
|
|
213718
213872
|
try {
|
|
213719
|
-
const url2 = new
|
|
213873
|
+
const url2 = new URL4(
|
|
213720
213874
|
req.url,
|
|
213721
213875
|
`http://localhost:${OAUTH_REDIRECT_PORT}`
|
|
213722
213876
|
);
|
|
@@ -213825,7 +213979,7 @@ var init_oauth_provider = __esm({
|
|
|
213825
213979
|
);
|
|
213826
213980
|
}
|
|
213827
213981
|
}
|
|
213828
|
-
const url2 = new
|
|
213982
|
+
const url2 = new URL4(config2.authorizationUrl);
|
|
213829
213983
|
params.forEach((value, key) => {
|
|
213830
213984
|
url2.searchParams.append(key, value);
|
|
213831
213985
|
});
|
|
@@ -214092,7 +214246,7 @@ var init_oauth_provider = __esm({
|
|
|
214092
214246
|
"Cannot perform dynamic registration without authorization URL"
|
|
214093
214247
|
);
|
|
214094
214248
|
}
|
|
214095
|
-
const authUrl2 = new
|
|
214249
|
+
const authUrl2 = new URL4(config2.authorizationUrl);
|
|
214096
214250
|
const serverUrl = `${authUrl2.protocol}//${authUrl2.host}`;
|
|
214097
214251
|
console.debug("\u2192 Attempting dynamic client registration...");
|
|
214098
214252
|
const authServerMetadata = await OAuthUtils.discoverAuthorizationServerMetadata(serverUrl);
|
|
@@ -221271,61 +221425,6 @@ var init_html_to_text = __esm({
|
|
|
221271
221425
|
}
|
|
221272
221426
|
});
|
|
221273
221427
|
|
|
221274
|
-
// packages/core/src/utils/fetch.ts
|
|
221275
|
-
import { URL as URL4 } from "node:url";
|
|
221276
|
-
function isPrivateIp(url2) {
|
|
221277
|
-
try {
|
|
221278
|
-
const hostname5 = new URL4(url2).hostname;
|
|
221279
|
-
return PRIVATE_IP_RANGES.some((range) => range.test(hostname5));
|
|
221280
|
-
} catch (_e2) {
|
|
221281
|
-
return false;
|
|
221282
|
-
}
|
|
221283
|
-
}
|
|
221284
|
-
async function fetchWithTimeout(url2, timeout2) {
|
|
221285
|
-
const controller = new AbortController();
|
|
221286
|
-
const timeoutId = setTimeout(() => controller.abort(), timeout2);
|
|
221287
|
-
try {
|
|
221288
|
-
const response = await fetch(url2, { signal: controller.signal });
|
|
221289
|
-
return response;
|
|
221290
|
-
} catch (error2) {
|
|
221291
|
-
if (isNodeError(error2) && error2.code === "ABORT_ERR") {
|
|
221292
|
-
throw new FetchError2(`Request timed out after ${timeout2}ms`, "ETIMEDOUT");
|
|
221293
|
-
}
|
|
221294
|
-
throw new FetchError2(getErrorMessage(error2));
|
|
221295
|
-
} finally {
|
|
221296
|
-
clearTimeout(timeoutId);
|
|
221297
|
-
}
|
|
221298
|
-
}
|
|
221299
|
-
var PRIVATE_IP_RANGES, FetchError2;
|
|
221300
|
-
var init_fetch2 = __esm({
|
|
221301
|
-
"packages/core/src/utils/fetch.ts"() {
|
|
221302
|
-
"use strict";
|
|
221303
|
-
init_esbuild_shims();
|
|
221304
|
-
init_errors();
|
|
221305
|
-
PRIVATE_IP_RANGES = [
|
|
221306
|
-
/^10\./,
|
|
221307
|
-
/^127\./,
|
|
221308
|
-
/^172\.(1[6-9]|2[0-9]|3[0-1])\./,
|
|
221309
|
-
/^192\.168\./,
|
|
221310
|
-
/^::1$/,
|
|
221311
|
-
/^fc00:/,
|
|
221312
|
-
/^fe80:/
|
|
221313
|
-
];
|
|
221314
|
-
FetchError2 = class extends Error {
|
|
221315
|
-
constructor(message, code2) {
|
|
221316
|
-
super(message);
|
|
221317
|
-
this.code = code2;
|
|
221318
|
-
this.name = "FetchError";
|
|
221319
|
-
}
|
|
221320
|
-
static {
|
|
221321
|
-
__name(this, "FetchError");
|
|
221322
|
-
}
|
|
221323
|
-
};
|
|
221324
|
-
__name(isPrivateIp, "isPrivateIp");
|
|
221325
|
-
__name(fetchWithTimeout, "fetchWithTimeout");
|
|
221326
|
-
}
|
|
221327
|
-
});
|
|
221328
|
-
|
|
221329
221428
|
// packages/core/src/tools/web-fetch.ts
|
|
221330
221429
|
var import_undici2, URL_FETCH_TIMEOUT_MS, MAX_CONTENT_LENGTH, WebFetchToolInvocation, WebFetchTool;
|
|
221331
221430
|
var init_web_fetch = __esm({
|
|
@@ -221335,7 +221434,7 @@ var init_web_fetch = __esm({
|
|
|
221335
221434
|
init_html_to_text();
|
|
221336
221435
|
import_undici2 = __toESM(require_undici(), 1);
|
|
221337
221436
|
init_config3();
|
|
221338
|
-
|
|
221437
|
+
init_fetch();
|
|
221339
221438
|
init_partUtils();
|
|
221340
221439
|
init_tool_error();
|
|
221341
221440
|
init_tools();
|
|
@@ -225954,7 +226053,7 @@ var init_modelKeyFetcher = __esm({
|
|
|
225954
226053
|
"packages/core/src/config/modelKeyFetcher.ts"() {
|
|
225955
226054
|
"use strict";
|
|
225956
226055
|
init_esbuild_shims();
|
|
225957
|
-
|
|
226056
|
+
init_fetch();
|
|
225958
226057
|
MODEL_KEY_API_BASE = "https://athena-next.devops.xiaohongshu.com/api/media/model/key";
|
|
225959
226058
|
__name(fetchModelKey, "fetchModelKey");
|
|
225960
226059
|
}
|
|
@@ -226866,7 +226965,7 @@ var init_xhsSSOAuth = __esm({
|
|
|
226866
226965
|
"packages/core/src/xhs-sso/xhsSSOAuth.ts"() {
|
|
226867
226966
|
"use strict";
|
|
226868
226967
|
init_esbuild_shims();
|
|
226869
|
-
|
|
226968
|
+
init_fetch();
|
|
226870
226969
|
init_secure_browser_launcher();
|
|
226871
226970
|
init_xhsSSOStorage();
|
|
226872
226971
|
init_xhsApiConfig();
|
|
@@ -226948,7 +227047,7 @@ var init_xhsSSOTrigger = __esm({
|
|
|
226948
227047
|
"packages/core/src/xhs-sso/xhsSSOTrigger.ts"() {
|
|
226949
227048
|
"use strict";
|
|
226950
227049
|
init_esbuild_shims();
|
|
226951
|
-
|
|
227050
|
+
init_fetch();
|
|
226952
227051
|
init_secure_browser_launcher();
|
|
226953
227052
|
init_xhsApiConfig();
|
|
226954
227053
|
__name(triggerSSOAuth, "triggerSSOAuth");
|
|
@@ -234835,7 +234934,7 @@ var init_src2 = __esm({
|
|
|
234835
234934
|
init_textUtils();
|
|
234836
234935
|
init_formatters();
|
|
234837
234936
|
init_generateContentResponseUtilities();
|
|
234838
|
-
|
|
234937
|
+
init_fetch();
|
|
234839
234938
|
init_secure_browser_launcher();
|
|
234840
234939
|
init_ripgrepUtils();
|
|
234841
234940
|
init_fileSearch();
|
|
@@ -235032,8 +235131,8 @@ var init_git_commit = __esm({
|
|
|
235032
235131
|
"packages/core/src/generated/git-commit.ts"() {
|
|
235033
235132
|
"use strict";
|
|
235034
235133
|
init_esbuild_shims();
|
|
235035
|
-
GIT_COMMIT_INFO = "
|
|
235036
|
-
CLI_VERSION = "0.2.0-alpha.
|
|
235134
|
+
GIT_COMMIT_INFO = "194b6d44";
|
|
235135
|
+
CLI_VERSION = "0.2.0-alpha.1";
|
|
235037
235136
|
}
|
|
235038
235137
|
});
|
|
235039
235138
|
|
|
@@ -236145,6 +236244,7 @@ __export(core_exports5, {
|
|
|
236145
236244
|
filter: () => filter3,
|
|
236146
236245
|
findGitRoot: () => findGitRoot,
|
|
236147
236246
|
flatMapTextParts: () => flatMapTextParts,
|
|
236247
|
+
formatFetchErrorForUser: () => formatFetchErrorForUser,
|
|
236148
236248
|
formatMemoryUsage: () => formatMemoryUsage,
|
|
236149
236249
|
generateCodeChallenge: () => generateCodeChallenge,
|
|
236150
236250
|
generateCodeVerifier: () => generateCodeVerifier,
|
|
@@ -294322,6 +294422,63 @@ function getNestedProperty(obj, path122) {
|
|
|
294322
294422
|
}
|
|
294323
294423
|
return current;
|
|
294324
294424
|
}
|
|
294425
|
+
function getSettingsFileKeyWarnings(settings, settingsFilePath) {
|
|
294426
|
+
const version2 = settings[SETTINGS_VERSION_KEY];
|
|
294427
|
+
if (typeof version2 !== "number" || version2 < SETTINGS_VERSION) {
|
|
294428
|
+
return [];
|
|
294429
|
+
}
|
|
294430
|
+
const warnings = [];
|
|
294431
|
+
const ignoredLegacyKeys = /* @__PURE__ */ new Set();
|
|
294432
|
+
for (const [oldKey, newPath] of Object.entries(MIGRATION_MAP)) {
|
|
294433
|
+
if (oldKey === newPath) {
|
|
294434
|
+
continue;
|
|
294435
|
+
}
|
|
294436
|
+
if (!(oldKey in settings)) {
|
|
294437
|
+
continue;
|
|
294438
|
+
}
|
|
294439
|
+
const oldValue = settings[oldKey];
|
|
294440
|
+
if (KNOWN_V2_CONTAINERS.has(oldKey) && typeof oldValue === "object" && oldValue !== null && !Array.isArray(oldValue)) {
|
|
294441
|
+
continue;
|
|
294442
|
+
}
|
|
294443
|
+
ignoredLegacyKeys.add(oldKey);
|
|
294444
|
+
warnings.push(
|
|
294445
|
+
`\u26A0\uFE0F Legacy setting '${oldKey}' will be ignored in ${settingsFilePath}. Please use '${newPath}' instead.`
|
|
294446
|
+
);
|
|
294447
|
+
}
|
|
294448
|
+
const schemaKeys = new Set(Object.keys(getSettingsSchema()));
|
|
294449
|
+
for (const key of Object.keys(settings)) {
|
|
294450
|
+
if (key === SETTINGS_VERSION_KEY) {
|
|
294451
|
+
continue;
|
|
294452
|
+
}
|
|
294453
|
+
if (ignoredLegacyKeys.has(key)) {
|
|
294454
|
+
continue;
|
|
294455
|
+
}
|
|
294456
|
+
if (schemaKeys.has(key)) {
|
|
294457
|
+
continue;
|
|
294458
|
+
}
|
|
294459
|
+
warnings.push(
|
|
294460
|
+
`\u26A0\uFE0F Unknown setting '${key}' will be ignored in ${settingsFilePath}.`
|
|
294461
|
+
);
|
|
294462
|
+
}
|
|
294463
|
+
return warnings;
|
|
294464
|
+
}
|
|
294465
|
+
function getSettingsWarnings(loadedSettings) {
|
|
294466
|
+
const warningSet = /* @__PURE__ */ new Set();
|
|
294467
|
+
for (const scope of ["User" /* User */, "Workspace" /* Workspace */]) {
|
|
294468
|
+
const settingsFile = loadedSettings.forScope(scope);
|
|
294469
|
+
if (settingsFile.rawJson === void 0) {
|
|
294470
|
+
continue;
|
|
294471
|
+
}
|
|
294472
|
+
const settingsObject = settingsFile.originalSettings;
|
|
294473
|
+
for (const warning of getSettingsFileKeyWarnings(
|
|
294474
|
+
settingsObject,
|
|
294475
|
+
settingsFile.path
|
|
294476
|
+
)) {
|
|
294477
|
+
warningSet.add(warning);
|
|
294478
|
+
}
|
|
294479
|
+
}
|
|
294480
|
+
return [...warningSet];
|
|
294481
|
+
}
|
|
294325
294482
|
function migrateSettingsToV1(v2Settings) {
|
|
294326
294483
|
const v1Settings = {};
|
|
294327
294484
|
const v2Keys = new Set(Object.keys(v2Settings));
|
|
@@ -294774,6 +294931,8 @@ var init_settings = __esm({
|
|
|
294774
294931
|
KNOWN_V2_CONTAINERS = new Set(
|
|
294775
294932
|
Object.values(MIGRATION_MAP).map((path122) => path122.split(".")[0])
|
|
294776
294933
|
);
|
|
294934
|
+
__name(getSettingsFileKeyWarnings, "getSettingsFileKeyWarnings");
|
|
294935
|
+
__name(getSettingsWarnings, "getSettingsWarnings");
|
|
294777
294936
|
__name(migrateSettingsToV1, "migrateSettingsToV1");
|
|
294778
294937
|
__name(mergeSettings, "mergeSettings");
|
|
294779
294938
|
LoadedSettings = class {
|
|
@@ -322652,7 +322811,7 @@ var require_src42 = __commonJS({
|
|
|
322652
322811
|
};
|
|
322653
322812
|
}
|
|
322654
322813
|
__name(_asyncToGenerator, "_asyncToGenerator");
|
|
322655
|
-
var
|
|
322814
|
+
var readFile12 = fs112.readFile ? (0, _util.promisify)(fs112.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
|
|
322656
322815
|
return _regenerator().w(function(_context) {
|
|
322657
322816
|
while (1) switch (_context.n) {
|
|
322658
322817
|
case 0:
|
|
@@ -322794,7 +322953,7 @@ var require_src42 = __commonJS({
|
|
|
322794
322953
|
break;
|
|
322795
322954
|
case 1:
|
|
322796
322955
|
_context2.n = 2;
|
|
322797
|
-
return
|
|
322956
|
+
return readFile12(keyFile, "utf8");
|
|
322798
322957
|
case 2:
|
|
322799
322958
|
key = _context2.v;
|
|
322800
322959
|
body = JSON.parse(key);
|
|
@@ -322812,7 +322971,7 @@ var require_src42 = __commonJS({
|
|
|
322812
322971
|
});
|
|
322813
322972
|
case 4:
|
|
322814
322973
|
_context2.n = 5;
|
|
322815
|
-
return
|
|
322974
|
+
return readFile12(keyFile, "utf8");
|
|
322816
322975
|
case 5:
|
|
322817
322976
|
_privateKey = _context2.v;
|
|
322818
322977
|
return _context2.a(2, {
|
|
@@ -324450,7 +324609,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
|
|
|
324450
324609
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
324451
324610
|
var util_1 = __require("util");
|
|
324452
324611
|
var fs112 = __require("fs");
|
|
324453
|
-
var
|
|
324612
|
+
var readFile12 = (0, util_1.promisify)(fs112.readFile ?? (() => {
|
|
324454
324613
|
}));
|
|
324455
324614
|
var realpath2 = (0, util_1.promisify)(fs112.realpath ?? (() => {
|
|
324456
324615
|
}));
|
|
@@ -324493,7 +324652,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
|
|
|
324493
324652
|
throw err;
|
|
324494
324653
|
}
|
|
324495
324654
|
let subjectToken;
|
|
324496
|
-
const rawText = await
|
|
324655
|
+
const rawText = await readFile12(parsedFilePath, { encoding: "utf8" });
|
|
324497
324656
|
if (this.formatType === "text") {
|
|
324498
324657
|
subjectToken = rawText;
|
|
324499
324658
|
} else if (this.formatType === "json" && this.subjectTokenFieldName) {
|
|
@@ -327697,8 +327856,8 @@ var require_graceful_fs = __commonJS({
|
|
|
327697
327856
|
fs113.createReadStream = createReadStream3;
|
|
327698
327857
|
fs113.createWriteStream = createWriteStream4;
|
|
327699
327858
|
var fs$readFile = fs113.readFile;
|
|
327700
|
-
fs113.readFile =
|
|
327701
|
-
function
|
|
327859
|
+
fs113.readFile = readFile12;
|
|
327860
|
+
function readFile12(path122, options2, cb) {
|
|
327702
327861
|
if (typeof options2 === "function")
|
|
327703
327862
|
cb = options2, options2 = null;
|
|
327704
327863
|
return go$readFile(path122, options2, cb);
|
|
@@ -327714,7 +327873,7 @@ var require_graceful_fs = __commonJS({
|
|
|
327714
327873
|
}
|
|
327715
327874
|
__name(go$readFile, "go$readFile");
|
|
327716
327875
|
}
|
|
327717
|
-
__name(
|
|
327876
|
+
__name(readFile12, "readFile");
|
|
327718
327877
|
var fs$writeFile = fs113.writeFile;
|
|
327719
327878
|
fs113.writeFile = writeFile11;
|
|
327720
327879
|
function writeFile11(path122, data, options2, cb) {
|
|
@@ -329273,8 +329432,8 @@ var require_graceful_fs2 = __commonJS({
|
|
|
329273
329432
|
fs113.createReadStream = createReadStream3;
|
|
329274
329433
|
fs113.createWriteStream = createWriteStream4;
|
|
329275
329434
|
var fs$readFile = fs113.readFile;
|
|
329276
|
-
fs113.readFile =
|
|
329277
|
-
function
|
|
329435
|
+
fs113.readFile = readFile12;
|
|
329436
|
+
function readFile12(path122, options2, cb) {
|
|
329278
329437
|
if (typeof options2 === "function")
|
|
329279
329438
|
cb = options2, options2 = null;
|
|
329280
329439
|
return go$readFile(path122, options2, cb);
|
|
@@ -329290,7 +329449,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
329290
329449
|
}
|
|
329291
329450
|
__name(go$readFile, "go$readFile");
|
|
329292
329451
|
}
|
|
329293
|
-
__name(
|
|
329452
|
+
__name(readFile12, "readFile");
|
|
329294
329453
|
var fs$writeFile = fs113.writeFile;
|
|
329295
329454
|
fs113.writeFile = writeFile11;
|
|
329296
329455
|
function writeFile11(path122, data, options2, cb) {
|
|
@@ -345750,7 +345909,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
345750
345909
|
// packages/cli/src/utils/version.ts
|
|
345751
345910
|
async function getCliVersion() {
|
|
345752
345911
|
const pkgJson = await getPackageJson();
|
|
345753
|
-
return "0.2.0-alpha.
|
|
345912
|
+
return "0.2.0-alpha.1";
|
|
345754
345913
|
}
|
|
345755
345914
|
__name(getCliVersion, "getCliVersion");
|
|
345756
345915
|
|
|
@@ -353848,7 +354007,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
353848
354007
|
|
|
353849
354008
|
// packages/cli/src/generated/git-commit.ts
|
|
353850
354009
|
init_esbuild_shims();
|
|
353851
|
-
var GIT_COMMIT_INFO2 = "
|
|
354010
|
+
var GIT_COMMIT_INFO2 = "194b6d44";
|
|
353852
354011
|
|
|
353853
354012
|
// packages/cli/src/utils/systemInfo.ts
|
|
353854
354013
|
async function getNpmVersion() {
|
|
@@ -406862,7 +407021,6 @@ import { exec as exec4, execSync as execSync7, spawn as spawn10 } from "node:chi
|
|
|
406862
407021
|
import os45 from "node:os";
|
|
406863
407022
|
import path119 from "node:path";
|
|
406864
407023
|
import fs108 from "node:fs";
|
|
406865
|
-
import { readFile as readFile12 } from "node:fs/promises";
|
|
406866
407024
|
import { fileURLToPath as fileURLToPath18 } from "node:url";
|
|
406867
407025
|
import { promisify as promisify11 } from "node:util";
|
|
406868
407026
|
import { randomBytes as randomBytes6 } from "node:crypto";
|
|
@@ -406899,20 +407057,15 @@ async function shouldUseCurrentUserInSandbox() {
|
|
|
406899
407057
|
return false;
|
|
406900
407058
|
}
|
|
406901
407059
|
if (os45.platform() === "linux") {
|
|
406902
|
-
|
|
406903
|
-
|
|
406904
|
-
|
|
406905
|
-
|
|
406906
|
-
|
|
406907
|
-
|
|
406908
|
-
);
|
|
406909
|
-
return true;
|
|
406910
|
-
}
|
|
406911
|
-
} catch (_err) {
|
|
406912
|
-
console.warn(
|
|
406913
|
-
"Warning: Could not read /etc/os-release to auto-detect Debian/Ubuntu for UID/GID default."
|
|
407060
|
+
const debugEnv = [process.env["DEBUG"], process.env["DEBUG_MODE"]].some(
|
|
407061
|
+
(v2) => v2 === "true" || v2 === "1"
|
|
407062
|
+
);
|
|
407063
|
+
if (debugEnv) {
|
|
407064
|
+
console.error(
|
|
407065
|
+
"INFO: Using current user UID/GID in Linux sandbox. Set SANDBOX_SET_UID_GID=false to disable."
|
|
406914
407066
|
);
|
|
406915
407067
|
}
|
|
407068
|
+
return true;
|
|
406916
407069
|
}
|
|
406917
407070
|
return false;
|
|
406918
407071
|
}
|
|
@@ -410175,7 +410328,7 @@ var GeminiAgent = class {
|
|
|
410175
410328
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
410176
410329
|
description: APPROVAL_MODE_INFO[mode].description
|
|
410177
410330
|
}));
|
|
410178
|
-
const version2 = "0.2.0-alpha.
|
|
410331
|
+
const version2 = "0.2.0-alpha.1";
|
|
410179
410332
|
return {
|
|
410180
410333
|
protocolVersion: PROTOCOL_VERSION,
|
|
410181
410334
|
agentInfo: {
|
|
@@ -410659,12 +410812,15 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
410659
410812
|
}
|
|
410660
410813
|
let input = config2.getQuestion();
|
|
410661
410814
|
const startupWarnings = [
|
|
410662
|
-
|
|
410663
|
-
|
|
410664
|
-
|
|
410665
|
-
|
|
410666
|
-
|
|
410667
|
-
|
|
410815
|
+
.../* @__PURE__ */ new Set([
|
|
410816
|
+
...await getStartupWarnings(),
|
|
410817
|
+
...await getUserStartupWarnings({
|
|
410818
|
+
workspaceRoot: process.cwd(),
|
|
410819
|
+
useRipgrep: settings.merged.tools?.useRipgrep ?? true,
|
|
410820
|
+
useBuiltinRipgrep: settings.merged.tools?.useBuiltinRipgrep ?? true
|
|
410821
|
+
}),
|
|
410822
|
+
...getSettingsWarnings(settings)
|
|
410823
|
+
])
|
|
410668
410824
|
];
|
|
410669
410825
|
const { isL4Repository: isL4Repository2, autoSwitchToQSModel: autoSwitchToQSModel2 } = await Promise.resolve().then(() => (init_l4RepositoryAutoSwitch(), l4RepositoryAutoSwitch_exports));
|
|
410670
410826
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdmind/rdmind",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.1",
|
|
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.2.0-alpha.
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.2.0-alpha.1"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|