@agentistics/mcp 2.165.3 → 2.166.0

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.
@@ -1283,6 +1283,9 @@ function startedByIndex(rows) {
1283
1283
  }
1284
1284
  return out;
1285
1285
  }
1286
+ function startedByFleetPayload(payload) {
1287
+ return startedByIndex(Array.isArray(payload.rows) ? payload.rows : []);
1288
+ }
1286
1289
 
1287
1290
  // agent-audit.ts
1288
1291
  import { createHash } from "node:crypto";
@@ -3064,7 +3067,7 @@ async function callTool(req) {
3064
3067
  const limit = Math.min(args?.limit ?? 20, 50);
3065
3068
  const harness = args?.harness;
3066
3069
  const data = await apiGet("/api/data");
3067
- const startedBy = await apiGet("/api/fleet").then((f) => startedByIndex(f?.rows ?? [])).catch(() => new Map);
3070
+ const startedBy = await apiGet("/api/fleet?format=links-v1").then((f) => startedByFleetPayload(f ?? {})).catch(() => new Map);
3068
3071
  const rows = filterSessions(data.sessions ?? [], harness).slice(0, limit).map((s) => {
3069
3072
  const { input, output, cacheRead, cacheWrite, cost, unpriced } = sessionTokens2(s);
3070
3073
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.165.3",
3
+ "version": "2.166.0",
4
4
  "description": "Agentistics MCP server — Claude Code analytics for Claude Desktop and Claude Code",
5
5
  "type": "module",
6
6
  "main": "./dist/agentistics-mcp.js",