revdeck 0.7.0 → 0.8.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 +19 -0
- package/CONTRIBUTING.md +5 -1
- package/README.md +10 -1
- package/README.ru.md +10 -1
- package/SECURITY.md +1 -1
- package/dist/cli.js +69 -17
- package/dist/cli.js.map +3 -3
- package/dist/daemon.js +9 -1
- package/dist/daemon.js.map +2 -2
- package/dist/mcp.js +23 -3
- package/dist/mcp.js.map +2 -2
- package/docs/capabilities.md +2 -1
- package/docs/configuration.md +1 -0
- package/docs/integrations.md +13 -2
- package/docs/ru/capabilities.md +2 -1
- package/docs/ru/configuration.md +1 -0
- package/docs/ru/integrations.md +13 -2
- package/package.json +5 -2
package/dist/mcp.js
CHANGED
|
@@ -232,6 +232,15 @@ 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 path.resolve(target);
|
|
241
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) return resolved;
|
|
242
|
+
return path.join(path.resolve(target), relative);
|
|
243
|
+
}
|
|
235
244
|
var CONFIG_FILES = [".revdeck.yml", ".revdeck.yaml"];
|
|
236
245
|
var LOCAL_CONFIG_FILES = [".revdeck.local.yml", ".revdeck.local.yaml"];
|
|
237
246
|
function findConfigFile(root) {
|
|
@@ -279,7 +288,7 @@ async function readTextNoFollow(file, maxBytes = 4 * 1024 * 1024) {
|
|
|
279
288
|
}
|
|
280
289
|
|
|
281
290
|
// src/version.ts
|
|
282
|
-
var VERSION = "0.
|
|
291
|
+
var VERSION = "0.8.0";
|
|
283
292
|
|
|
284
293
|
// src/client.ts
|
|
285
294
|
var RpcError = class extends Error {
|
|
@@ -998,6 +1007,14 @@ function mergeConfigData(base, local) {
|
|
|
998
1007
|
}
|
|
999
1008
|
async function loadConfig(root = findRepoRoot()) {
|
|
1000
1009
|
const warnings = [];
|
|
1010
|
+
if (!existsSync3(root)) {
|
|
1011
|
+
warnings.push(
|
|
1012
|
+
tr(
|
|
1013
|
+
`\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`,
|
|
1014
|
+
`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`
|
|
1015
|
+
)
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1001
1018
|
const file = findConfigFile(root);
|
|
1002
1019
|
let localFile = findLocalConfigFile(root);
|
|
1003
1020
|
if (localFile && existsSync3(path4.join(root, ".git"))) {
|
|
@@ -1239,6 +1256,9 @@ setLocale(detectLocale());
|
|
|
1239
1256
|
var server = new McpServer({ name: "revdeck", version: VERSION });
|
|
1240
1257
|
var defaultRoot = findRepoRoot(process.env.REVDECK_ROOT ?? process.cwd());
|
|
1241
1258
|
var featureId = process.env.REVDECK_FEATURE?.trim() || null;
|
|
1259
|
+
function daemonRoot(root) {
|
|
1260
|
+
return toHostRoot(root, process.env.REVDECK_HOST_ROOT, defaultRoot);
|
|
1261
|
+
}
|
|
1242
1262
|
var clientPromise = null;
|
|
1243
1263
|
var scopePromise = null;
|
|
1244
1264
|
async function client() {
|
|
@@ -1397,7 +1417,7 @@ server.registerTool(
|
|
|
1397
1417
|
}
|
|
1398
1418
|
const result = await call(
|
|
1399
1419
|
"reviews.remoteList",
|
|
1400
|
-
{ root: current2.root, scope: listScope, limit: limit ?? 50 }
|
|
1420
|
+
{ root: daemonRoot(current2.root), scope: listScope, limit: limit ?? 50 }
|
|
1401
1421
|
);
|
|
1402
1422
|
const text = result.items.map((item) => `#${item.ref.number} ${item.title} \xB7 ${item.author} \xB7 ${item.updatedAt}`).join("\n") || "Empty.";
|
|
1403
1423
|
return ok(`${result.platform}:${result.project}
|
|
@@ -1434,7 +1454,7 @@ server.registerTool(
|
|
|
1434
1454
|
continue;
|
|
1435
1455
|
}
|
|
1436
1456
|
const result = await call("reviews.open", {
|
|
1437
|
-
root: current2.root,
|
|
1457
|
+
root: daemonRoot(current2.root),
|
|
1438
1458
|
input: value
|
|
1439
1459
|
});
|
|
1440
1460
|
reviews.push(result.review);
|