@agentistics/mcp 2.156.0 → 2.157.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.
@@ -1,5 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // session-role-args.ts
4
+ function sessionRoleBody(a, session) {
5
+ const retire = typeof a?.retirePredecessor === "string" ? a.retirePredecessor.trim() : "";
6
+ return {
7
+ ...a?.ref ? { ref: a.ref } : {},
8
+ ...a?.role !== undefined ? { role: a.role } : {},
9
+ ...retire ? { retirePredecessor: retire } : {},
10
+ session: session ?? null
11
+ };
12
+ }
13
+
3
14
  // orphan-guard.ts
4
15
  function installOrphanGuard(d) {
5
16
  const initial = d.getPpid();
@@ -2404,7 +2415,8 @@ var TOOLS = [
2404
2415
  type: "object",
2405
2416
  properties: {
2406
2417
  ref: { type: "string", description: "A session reference (managed id, conversation id, exact title or unique id prefix). Omit for your own session." },
2407
- role: { type: "string", enum: ["leader", "worker", "auto"], description: "The role to set. Omit to read it." }
2418
+ role: { type: "string", enum: ["leader", "worker", "auto"], description: "The role to set. Omit to read it." },
2419
+ retirePredecessor: { type: "string", description: "A leader taking over can pass the previous leader on the SAME task (managed id, conversation id, exact title or unique id prefix); the server closes it when it goes quiet. Only for your own session declared leader; otherwise the role still changes and the reply says why the retire was refused." }
2408
2420
  },
2409
2421
  required: []
2410
2422
  }
@@ -2893,11 +2905,7 @@ async function callTool(req) {
2893
2905
  }
2894
2906
  case "agentistics_session_role": {
2895
2907
  const a = args;
2896
- const body = await apiSend("POST", "/api/session-roles", {
2897
- ...a?.ref ? { ref: a.ref } : {},
2898
- ...a?.role !== undefined ? { role: a.role } : {},
2899
- session: sessionProof(process.env) ?? null
2900
- });
2908
+ const body = await apiSend("POST", "/api/session-roles", sessionRoleBody(a, sessionProof(process.env)));
2901
2909
  return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
2902
2910
  }
2903
2911
  case "agentistics_session_switch_account": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.156.0",
3
+ "version": "2.157.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",