@adhdev/daemon-standalone 0.9.76-rc.48 → 0.9.76-rc.49
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/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +29 -1
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -50759,14 +50759,33 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
50759
50759
|
const requestedSessionIds = Array.isArray(args.sessionIds) ? new Set(args.sessionIds.map((id) => typeof id === "string" ? id.trim() : "").filter(Boolean)) : void 0;
|
|
50760
50760
|
const sessions = await this.deps.sessionHostControl.listSessions();
|
|
50761
50761
|
const matched = sessions.filter((record2) => this.sessionMatchesMeshNode(record2, args.node, args.nodeId, requestedSessionIds));
|
|
50762
|
+
const hasExplicitSessionIds = !!requestedSessionIds?.size;
|
|
50762
50763
|
const stoppedSessionIds = [];
|
|
50763
50764
|
const deletedSessionIds = [];
|
|
50764
50765
|
const skippedSessionIds = [];
|
|
50766
|
+
const skippedLiveSessionIds = [];
|
|
50765
50767
|
const deleteUnsupportedSessionIds = [];
|
|
50768
|
+
const recordsRemainSessionIds = [];
|
|
50766
50769
|
const errors = [];
|
|
50770
|
+
const matchedBySurfaceKind = {
|
|
50771
|
+
live_runtime: 0,
|
|
50772
|
+
recovery_snapshot: 0,
|
|
50773
|
+
inactive_record: 0
|
|
50774
|
+
};
|
|
50775
|
+
for (const record2 of matched) {
|
|
50776
|
+
const surfaceKind = getSessionHostSurfaceKind(record2);
|
|
50777
|
+
matchedBySurfaceKind[surfaceKind] += 1;
|
|
50778
|
+
}
|
|
50767
50779
|
for (const record2 of matched) {
|
|
50768
50780
|
const sessionId = String(record2.sessionId);
|
|
50769
50781
|
const completed = this.isCompletedHostedSession(record2);
|
|
50782
|
+
const surfaceKind = getSessionHostSurfaceKind(record2);
|
|
50783
|
+
const liveRuntime = surfaceKind === "live_runtime";
|
|
50784
|
+
if (!hasExplicitSessionIds && liveRuntime) {
|
|
50785
|
+
skippedSessionIds.push(sessionId);
|
|
50786
|
+
skippedLiveSessionIds.push(sessionId);
|
|
50787
|
+
continue;
|
|
50788
|
+
}
|
|
50770
50789
|
try {
|
|
50771
50790
|
if (args.mode === "stop") {
|
|
50772
50791
|
if (!completed) {
|
|
@@ -50795,6 +50814,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
50795
50814
|
const message = e?.message || String(e);
|
|
50796
50815
|
if (message.includes("Unsupported session host request: delete_session") && (args.mode === "delete_stopped" || args.mode === "stop_and_delete")) {
|
|
50797
50816
|
deleteUnsupportedSessionIds.push(sessionId);
|
|
50817
|
+
recordsRemainSessionIds.push(sessionId);
|
|
50798
50818
|
if (args.mode === "stop_and_delete" && !completed) {
|
|
50799
50819
|
try {
|
|
50800
50820
|
await this.deps.sessionHostControl.stopSession(sessionId);
|
|
@@ -50810,15 +50830,23 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
50810
50830
|
errors.push({ sessionId, error: message });
|
|
50811
50831
|
}
|
|
50812
50832
|
}
|
|
50833
|
+
const deleteUnsupported = deleteUnsupportedSessionIds.length > 0;
|
|
50813
50834
|
return {
|
|
50814
50835
|
success: errors.length === 0,
|
|
50815
50836
|
mode: args.mode,
|
|
50816
50837
|
dryRun: args.dryRun === true,
|
|
50817
50838
|
matchedCount: matched.length,
|
|
50839
|
+
matchedBySurfaceKind,
|
|
50818
50840
|
stoppedSessionIds,
|
|
50819
50841
|
deletedSessionIds,
|
|
50820
50842
|
skippedSessionIds,
|
|
50821
|
-
|
|
50843
|
+
skippedLiveSessionIds,
|
|
50844
|
+
...deleteUnsupported ? {
|
|
50845
|
+
deleteUnsupported: true,
|
|
50846
|
+
effectiveCleanup: args.mode === "stop_and_delete" ? "stopped_only_records_remain" : "delete_unsupported_records_remain",
|
|
50847
|
+
deleteUnsupportedSessionIds,
|
|
50848
|
+
recordsRemainSessionIds
|
|
50849
|
+
} : {},
|
|
50822
50850
|
...errors.length ? { errors } : {}
|
|
50823
50851
|
};
|
|
50824
50852
|
}
|