@adhdev/daemon-standalone 0.9.82-rc.353 → 0.9.82-rc.355
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 +699 -219
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +36 -5
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -5024,22 +5024,53 @@ function formatSpecDebugResult(result, options) {
|
|
|
5024
5024
|
}
|
|
5025
5025
|
if (snap.sections && typeof snap.sections === "object") {
|
|
5026
5026
|
lines.push("");
|
|
5027
|
-
lines.push("
|
|
5027
|
+
lines.push("## Sections");
|
|
5028
5028
|
for (const [id, text] of Object.entries(snap.sections)) {
|
|
5029
|
-
const
|
|
5030
|
-
|
|
5029
|
+
const raw = String(text ?? "");
|
|
5030
|
+
const lineCount = raw.length === 0 ? 0 : raw.split("\n").length;
|
|
5031
|
+
lines.push("");
|
|
5032
|
+
lines.push(`### section: ${id} (${lineCount} lines, ${raw.length} chars)`);
|
|
5033
|
+
lines.push("```");
|
|
5034
|
+
lines.push(raw);
|
|
5035
|
+
lines.push("```");
|
|
5031
5036
|
}
|
|
5032
5037
|
}
|
|
5033
5038
|
const history = Array.isArray(snap.stateHistory) ? snap.stateHistory : [];
|
|
5034
5039
|
if (history.length > 0) {
|
|
5035
5040
|
lines.push("");
|
|
5036
|
-
lines.push("
|
|
5041
|
+
lines.push("## State History (newest first)");
|
|
5037
5042
|
const now = Date.now();
|
|
5038
5043
|
for (const entry of [...history].reverse().slice(0, 20)) {
|
|
5039
5044
|
const agoMs = now - entry.at;
|
|
5040
5045
|
const ago = agoMs < 2e3 ? `${agoMs}ms ago` : `${(agoMs / 1e3).toFixed(1)}s ago`;
|
|
5041
5046
|
const dur = entry.durationMs > 0 ? ` held ${entry.durationMs}ms` : "";
|
|
5042
|
-
|
|
5047
|
+
const via = entry.via ? ` via ${entry.via}` : "";
|
|
5048
|
+
lines.push(` ${String(entry.stateId).padEnd(18)} ${ago}${dur}${via}`);
|
|
5049
|
+
const rules = Array.isArray(entry.matchedRules) ? entry.matchedRules : [];
|
|
5050
|
+
for (const rule of rules) {
|
|
5051
|
+
lines.push(` ${String(rule)}`);
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
}
|
|
5055
|
+
const timeline = Array.isArray(snap.eventTimeline) ? snap.eventTimeline : [];
|
|
5056
|
+
if (timeline.length > 0) {
|
|
5057
|
+
lines.push("");
|
|
5058
|
+
lines.push("## Event Timeline (oldest first)");
|
|
5059
|
+
const now = Date.now();
|
|
5060
|
+
const arrow = {
|
|
5061
|
+
input: "\u2192 in ",
|
|
5062
|
+
output: "\u2190 out",
|
|
5063
|
+
resize: "\u21F2 size",
|
|
5064
|
+
cursor: "\u2316 cur",
|
|
5065
|
+
spawn: "\u23FB spawn",
|
|
5066
|
+
exit: "\u23F9 exit"
|
|
5067
|
+
};
|
|
5068
|
+
for (const ev of timeline.slice(-120)) {
|
|
5069
|
+
const agoMs = now - (ev.ts ?? now);
|
|
5070
|
+
const ago = agoMs < 2e3 ? `${agoMs}ms` : `${(agoMs / 1e3).toFixed(1)}s`;
|
|
5071
|
+
const tag = arrow[String(ev.kind)] ?? String(ev.kind);
|
|
5072
|
+
const bytes = typeof ev.bytes === "number" ? ` [${ev.bytes}b]` : "";
|
|
5073
|
+
lines.push(` -${ago.padStart(6)} ${tag}${bytes} ${String(ev.content ?? "")}`);
|
|
5043
5074
|
}
|
|
5044
5075
|
}
|
|
5045
5076
|
return lines.join("\n");
|