adhdev 0.9.81-rc.1 → 0.9.81
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/dist/cli/index.js +61 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +61 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +32 -3
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adhdev",
|
|
3
|
-
"version": "0.9.81
|
|
3
|
+
"version": "0.9.81",
|
|
4
4
|
"description": "ADHDev — Agent Dashboard Hub for Dev. Remote-control AI coding agents from anywhere.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/daemon-core": "
|
|
50
|
+
"@adhdev/daemon-core": "*",
|
|
51
51
|
"@adhdev/ghostty-vt-node": "*",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"@xterm/addon-serialize": "^0.14.0",
|
|
@@ -613,6 +613,14 @@ function extractGitDiff(value) {
|
|
|
613
613
|
const payload = unwrapCommandPayload(value);
|
|
614
614
|
return payload?.diffSummary ?? payload?.diff ?? value?.diffSummary ?? value?.diff ?? payload;
|
|
615
615
|
}
|
|
616
|
+
function extractSubmodules(value, ignorePaths) {
|
|
617
|
+
const payload = unwrapCommandPayload(value);
|
|
618
|
+
const subs = payload?.submodules ?? value?.submodules;
|
|
619
|
+
if (!Array.isArray(subs)) return void 0;
|
|
620
|
+
if (ignorePaths.length === 0) return subs;
|
|
621
|
+
const ignoreSet = new Set(ignorePaths);
|
|
622
|
+
return subs.filter((s) => s?.path && !ignoreSet.has(s.path));
|
|
623
|
+
}
|
|
616
624
|
function extractLaunchPayload(value) {
|
|
617
625
|
return findNestedPayload(value, (payload) => Boolean(payload?.sessionId || payload?.id || payload?.runtimeSessionId));
|
|
618
626
|
}
|
|
@@ -1345,8 +1353,18 @@ async function meshStatus(ctx) {
|
|
|
1345
1353
|
entry.isDirty = dirty;
|
|
1346
1354
|
entry.uncommittedChanges = uncommittedChanges;
|
|
1347
1355
|
entry.branchConvergence = buildBranchConvergence(mesh, node, status, dirty, uncommittedChanges);
|
|
1356
|
+
const submodules = extractSubmodules(result, node.policy?.submoduleIgnorePaths || []);
|
|
1357
|
+
if (submodules && submodules.some((s) => s?.outOfSync)) {
|
|
1358
|
+
entry.submoduleWarning = "One or more submodules are out of sync with the parent repo. Run `git submodule update` or check deployment readiness.";
|
|
1359
|
+
entry.outOfSyncSubmodules = submodules.filter((s) => s?.outOfSync).map((s) => s.path);
|
|
1360
|
+
}
|
|
1348
1361
|
} else if (isLocalTransport(transport)) {
|
|
1349
|
-
const
|
|
1362
|
+
const autoDiscover = node.policy?.autoDiscoverSubmodules !== false;
|
|
1363
|
+
const statusResult = await commandForNode(ctx, node, "git_status", {
|
|
1364
|
+
workspace: node.workspace,
|
|
1365
|
+
includeSubmodules: autoDiscover,
|
|
1366
|
+
submoduleIgnorePaths: node.policy?.submoduleIgnorePaths || void 0
|
|
1367
|
+
});
|
|
1350
1368
|
const status = extractGitStatus(statusResult);
|
|
1351
1369
|
const uncommittedChanges = countUncommittedChanges(status);
|
|
1352
1370
|
const dirty = isGitStatusDirty(status);
|
|
@@ -1355,6 +1373,11 @@ async function meshStatus(ctx) {
|
|
|
1355
1373
|
entry.isDirty = dirty;
|
|
1356
1374
|
entry.uncommittedChanges = uncommittedChanges;
|
|
1357
1375
|
entry.branchConvergence = buildBranchConvergence(mesh, node, status, dirty, uncommittedChanges);
|
|
1376
|
+
const submodules = extractSubmodules(statusResult, node.policy?.submoduleIgnorePaths || []);
|
|
1377
|
+
if (submodules && submodules.some((s) => s?.outOfSync)) {
|
|
1378
|
+
entry.submoduleWarning = "One or more submodules are out of sync with the parent repo. Run `git submodule update` or check deployment readiness.";
|
|
1379
|
+
entry.outOfSyncSubmodules = submodules.filter((s) => s?.outOfSync).map((s) => s.path);
|
|
1380
|
+
}
|
|
1358
1381
|
} else {
|
|
1359
1382
|
entry.health = "unknown";
|
|
1360
1383
|
entry.note = "No daemonId available for cloud status probe";
|
|
@@ -2001,6 +2024,8 @@ async function meshLaunchSession(ctx, args) {
|
|
|
2001
2024
|
}
|
|
2002
2025
|
async function meshGitStatus(ctx, args) {
|
|
2003
2026
|
const node = await findNodeWithRefresh(ctx, args.node_id);
|
|
2027
|
+
const autoDiscoverSubmodules = node.policy?.autoDiscoverSubmodules !== false;
|
|
2028
|
+
const submoduleIgnorePaths = node.policy?.submoduleIgnorePaths || [];
|
|
2004
2029
|
try {
|
|
2005
2030
|
if (!isLocalTransport(ctx.transport) && node.daemonId) {
|
|
2006
2031
|
const result = await ctx.transport.gitStatus(node.daemonId, node.workspace, true);
|
|
@@ -2009,11 +2034,14 @@ async function meshGitStatus(ctx, args) {
|
|
|
2009
2034
|
workspace: node.workspace,
|
|
2010
2035
|
status: extractGitStatus(result),
|
|
2011
2036
|
diff: extractGitDiff(result),
|
|
2037
|
+
submodules: autoDiscoverSubmodules ? extractSubmodules(result, submoduleIgnorePaths) : void 0,
|
|
2012
2038
|
relatedRepos: await collectRelatedRepoStatuses(ctx, node)
|
|
2013
2039
|
}, null, 2);
|
|
2014
2040
|
} else if (isLocalTransport(ctx.transport)) {
|
|
2015
2041
|
const statusResult = await commandForNode(ctx, node, "git_status", {
|
|
2016
|
-
workspace: node.workspace
|
|
2042
|
+
workspace: node.workspace,
|
|
2043
|
+
includeSubmodules: autoDiscoverSubmodules,
|
|
2044
|
+
submoduleIgnorePaths: submoduleIgnorePaths.length > 0 ? submoduleIgnorePaths : void 0
|
|
2017
2045
|
});
|
|
2018
2046
|
const diffResult = await commandForNode(ctx, node, "git_diff_summary", {
|
|
2019
2047
|
workspace: node.workspace
|
|
@@ -2023,6 +2051,7 @@ async function meshGitStatus(ctx, args) {
|
|
|
2023
2051
|
workspace: node.workspace,
|
|
2024
2052
|
status: extractGitStatus(statusResult),
|
|
2025
2053
|
diff: extractGitDiff(diffResult),
|
|
2054
|
+
submodules: autoDiscoverSubmodules ? extractSubmodules(statusResult, submoduleIgnorePaths) : void 0,
|
|
2026
2055
|
relatedRepos: await collectRelatedRepoStatuses(ctx, node)
|
|
2027
2056
|
}, null, 2);
|
|
2028
2057
|
} else {
|
|
@@ -3920,7 +3949,7 @@ async function startMcpServer(opts) {
|
|
|
3920
3949
|
const meshCtx = { mesh, transport, ...localDaemonId ? { localDaemonId } : {}, ...localMachineId ? { localMachineId } : {} };
|
|
3921
3950
|
const coordinatorPrompt = await buildMeshModeCoordinatorPrompt(mesh);
|
|
3922
3951
|
const server2 = new import_server.Server(
|
|
3923
|
-
{ name: "adhdev-mcp-server", version: "0.9.
|
|
3952
|
+
{ name: "adhdev-mcp-server", version: "0.9.81" },
|
|
3924
3953
|
{ capabilities: { tools: {}, resources: {} } }
|
|
3925
3954
|
);
|
|
3926
3955
|
const { ListResourcesRequestSchema, ReadResourceRequestSchema } = await import("@modelcontextprotocol/sdk/types.js");
|