revdeck 0.7.0 → 0.8.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/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +5 -1
- package/README.md +11 -1
- package/README.ru.md +11 -1
- package/SECURITY.md +1 -1
- package/dist/cli.js +54 -15
- package/dist/cli.js.map +2 -2
- package/dist/daemon.js +9 -1
- package/dist/daemon.js.map +2 -2
- package/dist/mcp.js +26 -3
- package/dist/mcp.js.map +2 -2
- package/docs/capabilities.md +2 -1
- package/docs/configuration.md +1 -0
- package/docs/integrations.md +16 -2
- package/docs/ru/capabilities.md +2 -1
- package/docs/ru/configuration.md +1 -0
- package/docs/ru/integrations.md +15 -2
- package/package.json +5 -2
package/dist/mcp.js
CHANGED
|
@@ -232,6 +232,18 @@ function findRepoRoot(start = process.cwd()) {
|
|
|
232
232
|
dir = parent;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
+
function toHostRoot(root, hostRoot = process.env.REVDECK_HOST_ROOT, containerRoot = findRepoRoot()) {
|
|
236
|
+
const resolved = path.resolve(root);
|
|
237
|
+
const target = hostRoot?.trim();
|
|
238
|
+
if (!target) return resolved;
|
|
239
|
+
const relative = path.relative(path.resolve(containerRoot), resolved);
|
|
240
|
+
if (relative === "") return target;
|
|
241
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) return resolved;
|
|
242
|
+
const windows = /^[A-Za-z]:[\\/]/.test(target) || target.startsWith("\\\\");
|
|
243
|
+
const separator = windows ? "\\" : "/";
|
|
244
|
+
const prefix = target.replace(/[\\/]+$/, "");
|
|
245
|
+
return `${prefix}${separator}${relative.split(path.sep).join(separator)}`;
|
|
246
|
+
}
|
|
235
247
|
var CONFIG_FILES = [".revdeck.yml", ".revdeck.yaml"];
|
|
236
248
|
var LOCAL_CONFIG_FILES = [".revdeck.local.yml", ".revdeck.local.yaml"];
|
|
237
249
|
function findConfigFile(root) {
|
|
@@ -279,7 +291,7 @@ async function readTextNoFollow(file, maxBytes = 4 * 1024 * 1024) {
|
|
|
279
291
|
}
|
|
280
292
|
|
|
281
293
|
// src/version.ts
|
|
282
|
-
var VERSION = "0.
|
|
294
|
+
var VERSION = "0.8.1";
|
|
283
295
|
|
|
284
296
|
// src/client.ts
|
|
285
297
|
var RpcError = class extends Error {
|
|
@@ -998,6 +1010,14 @@ function mergeConfigData(base, local) {
|
|
|
998
1010
|
}
|
|
999
1011
|
async function loadConfig(root = findRepoRoot()) {
|
|
1000
1012
|
const warnings = [];
|
|
1013
|
+
if (!existsSync3(root)) {
|
|
1014
|
+
warnings.push(
|
|
1015
|
+
tr(
|
|
1016
|
+
`\u043A\u0430\u0442\u0430\u043B\u043E\u0433 ${root} \u043D\u0435 \u0432\u0438\u0434\u0435\u043D \u0442\u043E\u043C\u0443, \u043A\u0442\u043E \u0447\u0438\u0442\u0430\u0435\u0442 \u043A\u043E\u043D\u0444\u0438\u0433: \u0432 devcontainer \u0434\u0435\u043C\u043E\u043D \u043D\u0430 \u0445\u043E\u0441\u0442\u0435 \u043D\u0435 \u0432\u0438\u0434\u0438\u0442 \u043F\u0443\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u2014 \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 revdeck devcontainer --write \u0438\u043B\u0438 \u0437\u0430\u0434\u0430\u0439\u0442\u0435 REVDECK_HOST_ROOT`,
|
|
1017
|
+
`the directory ${root} is not visible to the config reader: in a devcontainer the host daemon cannot see the container path \u2014 run revdeck devcontainer --write or set REVDECK_HOST_ROOT`
|
|
1018
|
+
)
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1001
1021
|
const file = findConfigFile(root);
|
|
1002
1022
|
let localFile = findLocalConfigFile(root);
|
|
1003
1023
|
if (localFile && existsSync3(path4.join(root, ".git"))) {
|
|
@@ -1239,6 +1259,9 @@ setLocale(detectLocale());
|
|
|
1239
1259
|
var server = new McpServer({ name: "revdeck", version: VERSION });
|
|
1240
1260
|
var defaultRoot = findRepoRoot(process.env.REVDECK_ROOT ?? process.cwd());
|
|
1241
1261
|
var featureId = process.env.REVDECK_FEATURE?.trim() || null;
|
|
1262
|
+
function daemonRoot(root) {
|
|
1263
|
+
return toHostRoot(root, process.env.REVDECK_HOST_ROOT, defaultRoot);
|
|
1264
|
+
}
|
|
1242
1265
|
var clientPromise = null;
|
|
1243
1266
|
var scopePromise = null;
|
|
1244
1267
|
async function client() {
|
|
@@ -1397,7 +1420,7 @@ server.registerTool(
|
|
|
1397
1420
|
}
|
|
1398
1421
|
const result = await call(
|
|
1399
1422
|
"reviews.remoteList",
|
|
1400
|
-
{ root: current2.root, scope: listScope, limit: limit ?? 50 }
|
|
1423
|
+
{ root: daemonRoot(current2.root), scope: listScope, limit: limit ?? 50 }
|
|
1401
1424
|
);
|
|
1402
1425
|
const text = result.items.map((item) => `#${item.ref.number} ${item.title} \xB7 ${item.author} \xB7 ${item.updatedAt}`).join("\n") || "Empty.";
|
|
1403
1426
|
return ok(`${result.platform}:${result.project}
|
|
@@ -1434,7 +1457,7 @@ server.registerTool(
|
|
|
1434
1457
|
continue;
|
|
1435
1458
|
}
|
|
1436
1459
|
const result = await call("reviews.open", {
|
|
1437
|
-
root: current2.root,
|
|
1460
|
+
root: daemonRoot(current2.root),
|
|
1438
1461
|
input: value
|
|
1439
1462
|
});
|
|
1440
1463
|
reviews.push(result.review);
|