adhdev 0.9.76-rc.18 → 0.9.76-rc.19
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +39 -12
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -93375,7 +93375,7 @@ var init_adhdev_daemon = __esm({
|
|
|
93375
93375
|
init_version();
|
|
93376
93376
|
init_src();
|
|
93377
93377
|
init_runtime_defaults();
|
|
93378
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
93378
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.19" });
|
|
93379
93379
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
93380
93380
|
localHttpServer = null;
|
|
93381
93381
|
localWss = null;
|
package/dist/index.js
CHANGED
|
@@ -62233,7 +62233,7 @@ var init_adhdev_daemon = __esm({
|
|
|
62233
62233
|
init_version();
|
|
62234
62234
|
init_src();
|
|
62235
62235
|
init_runtime_defaults();
|
|
62236
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
62236
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.19" });
|
|
62237
62237
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
62238
62238
|
localHttpServer = null;
|
|
62239
62239
|
localWss = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adhdev",
|
|
3
|
-
"version": "0.9.76-rc.
|
|
3
|
+
"version": "0.9.76-rc.19",
|
|
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": "0.9.76-rc.
|
|
50
|
+
"@adhdev/daemon-core": "0.9.76-rc.19",
|
|
51
51
|
"@adhdev/ghostty-vt-node": "*",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"@xterm/addon-serialize": "^0.14.0",
|
|
@@ -56342,6 +56342,29 @@ async function findNodeWithRefresh(ctx, nodeId) {
|
|
|
56342
56342
|
if (!refreshed) throw new Error(`Node '${nodeId}' is not a member of mesh '${ctx.mesh.name}'`);
|
|
56343
56343
|
return refreshed;
|
|
56344
56344
|
}
|
|
56345
|
+
function unwrapCommandPayload(value) {
|
|
56346
|
+
return value?.result?.result ?? value?.result ?? value;
|
|
56347
|
+
}
|
|
56348
|
+
function extractGitStatus(value) {
|
|
56349
|
+
const payload = unwrapCommandPayload(value);
|
|
56350
|
+
return payload?.status ?? value?.status ?? payload;
|
|
56351
|
+
}
|
|
56352
|
+
function extractGitDiff(value) {
|
|
56353
|
+
const payload = unwrapCommandPayload(value);
|
|
56354
|
+
return payload?.diffSummary ?? payload?.diff ?? value?.diffSummary ?? value?.diff ?? payload;
|
|
56355
|
+
}
|
|
56356
|
+
function countUncommittedChanges(status) {
|
|
56357
|
+
if (typeof status?.uncommittedChanges === "number") return status.uncommittedChanges;
|
|
56358
|
+
const keys = ["staged", "modified", "untracked", "deleted", "renamed"];
|
|
56359
|
+
const counted = keys.reduce((sum, key) => sum + (Number.isFinite(Number(status?.[key])) ? Number(status[key]) : 0), 0);
|
|
56360
|
+
const conflicts = Array.isArray(status?.conflictFiles) ? status.conflictFiles.length : status?.hasConflicts ? 1 : 0;
|
|
56361
|
+
return counted + conflicts;
|
|
56362
|
+
}
|
|
56363
|
+
function isGitStatusDirty(status) {
|
|
56364
|
+
if (typeof status?.isDirty === "boolean") return status.isDirty;
|
|
56365
|
+
if (typeof status?.dirty === "boolean") return status.dirty;
|
|
56366
|
+
return countUncommittedChanges(status) > 0;
|
|
56367
|
+
}
|
|
56345
56368
|
async function commandForNode(ctx, node, command, args = {}) {
|
|
56346
56369
|
if (ctx.transport instanceof IpcTransport && node.daemonId) {
|
|
56347
56370
|
return ctx.transport.meshCommand(node.daemonId, command, args);
|
|
@@ -56489,18 +56512,22 @@ async function meshStatus(ctx) {
|
|
|
56489
56512
|
try {
|
|
56490
56513
|
if (!isLocalTransport(transport) && node.daemonId) {
|
|
56491
56514
|
const result = await transport.gitStatus(node.daemonId, node.workspace, false);
|
|
56492
|
-
const status = result
|
|
56493
|
-
|
|
56515
|
+
const status = extractGitStatus(result);
|
|
56516
|
+
const uncommittedChanges = countUncommittedChanges(status);
|
|
56517
|
+
const dirty = isGitStatusDirty(status);
|
|
56518
|
+
entry.health = status?.isGitRepo ? dirty ? "dirty" : "online" : "degraded";
|
|
56494
56519
|
entry.branch = status?.branch;
|
|
56495
|
-
entry.isDirty =
|
|
56496
|
-
entry.uncommittedChanges =
|
|
56520
|
+
entry.isDirty = dirty;
|
|
56521
|
+
entry.uncommittedChanges = uncommittedChanges;
|
|
56497
56522
|
} else if (isLocalTransport(transport)) {
|
|
56498
56523
|
const statusResult = await commandForNode(ctx, node, "git_status", { workspace: node.workspace });
|
|
56499
|
-
const status = statusResult
|
|
56500
|
-
|
|
56524
|
+
const status = extractGitStatus(statusResult);
|
|
56525
|
+
const uncommittedChanges = countUncommittedChanges(status);
|
|
56526
|
+
const dirty = isGitStatusDirty(status);
|
|
56527
|
+
entry.health = status?.isGitRepo ? dirty ? "dirty" : "online" : "degraded";
|
|
56501
56528
|
entry.branch = status?.branch;
|
|
56502
|
-
entry.isDirty =
|
|
56503
|
-
entry.uncommittedChanges =
|
|
56529
|
+
entry.isDirty = dirty;
|
|
56530
|
+
entry.uncommittedChanges = uncommittedChanges;
|
|
56504
56531
|
} else {
|
|
56505
56532
|
entry.health = "unknown";
|
|
56506
56533
|
entry.note = "No daemonId available for cloud status probe";
|
|
@@ -56588,8 +56615,8 @@ async function meshGitStatus(ctx, args) {
|
|
|
56588
56615
|
return JSON.stringify({
|
|
56589
56616
|
nodeId: args.node_id,
|
|
56590
56617
|
workspace: node.workspace,
|
|
56591
|
-
status: result
|
|
56592
|
-
diff: result
|
|
56618
|
+
status: extractGitStatus(result),
|
|
56619
|
+
diff: extractGitDiff(result)
|
|
56593
56620
|
}, null, 2);
|
|
56594
56621
|
} else if (isLocalTransport(ctx.transport)) {
|
|
56595
56622
|
const statusResult = await commandForNode(ctx, node, "git_status", {
|
|
@@ -56601,8 +56628,8 @@ async function meshGitStatus(ctx, args) {
|
|
|
56601
56628
|
return JSON.stringify({
|
|
56602
56629
|
nodeId: args.node_id,
|
|
56603
56630
|
workspace: node.workspace,
|
|
56604
|
-
status: statusResult
|
|
56605
|
-
diff: diffResult
|
|
56631
|
+
status: extractGitStatus(statusResult),
|
|
56632
|
+
diff: extractGitDiff(diffResult)
|
|
56606
56633
|
}, null, 2);
|
|
56607
56634
|
} else {
|
|
56608
56635
|
return JSON.stringify({ error: "No daemonId available for cloud git_status probe" });
|