@agent-inspect/mcp-server 6.7.3 → 6.7.5
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.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1636,6 +1636,12 @@ async function searchTraces(metas, options) {
|
|
|
1636
1636
|
...sessionLabel ? { sessionId: sessionLabel } : {}
|
|
1637
1637
|
});
|
|
1638
1638
|
}
|
|
1639
|
+
results.sort((a, b) => {
|
|
1640
|
+
const ta = a.timestamp ?? 0;
|
|
1641
|
+
const tb = b.timestamp ?? 0;
|
|
1642
|
+
if (ta !== tb) return tb - ta;
|
|
1643
|
+
return a.runId.localeCompare(b.runId);
|
|
1644
|
+
});
|
|
1639
1645
|
return results.slice(0, limit);
|
|
1640
1646
|
}
|
|
1641
1647
|
for (const m of filtered) {
|
|
@@ -1683,7 +1689,7 @@ async function searchTraces(metas, options) {
|
|
|
1683
1689
|
results.sort((a, b) => {
|
|
1684
1690
|
const ta = a.timestamp ?? 0;
|
|
1685
1691
|
const tb = b.timestamp ?? 0;
|
|
1686
|
-
if (ta !== tb) return
|
|
1692
|
+
if (ta !== tb) return tb - ta;
|
|
1687
1693
|
const runCmp = a.runId.localeCompare(b.runId);
|
|
1688
1694
|
if (runCmp !== 0) return runCmp;
|
|
1689
1695
|
return (a.stepName ?? "").localeCompare(b.stepName ?? "");
|
|
@@ -2672,13 +2678,24 @@ function inc(map, key) {
|
|
|
2672
2678
|
map[key] = (map[key] ?? 0) + 1;
|
|
2673
2679
|
}
|
|
2674
2680
|
function computeRunStatus(events) {
|
|
2681
|
+
let runTerminal;
|
|
2682
|
+
let sawRunEvent = false;
|
|
2683
|
+
for (const e of events) {
|
|
2684
|
+
if (e.kind !== "RUN") continue;
|
|
2685
|
+
sawRunEvent = true;
|
|
2686
|
+
if (e.status === "ok" || e.status === "error") {
|
|
2687
|
+
runTerminal = e.status;
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
if (sawRunEvent) {
|
|
2691
|
+
return runTerminal ?? "running";
|
|
2692
|
+
}
|
|
2675
2693
|
let hasRunning = false;
|
|
2676
2694
|
for (const e of events) {
|
|
2677
2695
|
if (e.status === "error") return "error";
|
|
2678
2696
|
if (e.status === "running") hasRunning = true;
|
|
2679
2697
|
}
|
|
2680
|
-
|
|
2681
|
-
return "ok";
|
|
2698
|
+
return hasRunning ? "running" : "ok";
|
|
2682
2699
|
}
|
|
2683
2700
|
var TreeBuilder = class {
|
|
2684
2701
|
constructor(options) {
|