@agentistics/mcp 2.144.0 → 2.145.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.
@@ -1034,6 +1034,12 @@ var AGENT_TOOL_POLICY = {
1034
1034
  routes: ["GET /api/away", "PUT /api/away", "PUT /api/away/session", "POST /api/away/notice"],
1035
1035
  reason: "reads or switches away mode (what newly started sessions are told about the owner being out) and lets a leader raise a notice in the owner's bell; reversible by switching it off; the server accepts writes only from a verified LEADER session"
1036
1036
  },
1037
+ agentistics_session_switch_account: {
1038
+ ...GROUPS,
1039
+ risk: "W",
1040
+ routes: ["GET /api/fleet/switch-account", "POST /api/fleet/switch-account"],
1041
+ reason: "continues a session on another account of the same harness: the conversation is copied (never moved) and resumed under the same id; an agent may only target accounts that are on for agents"
1042
+ },
1037
1043
  agentistics_summary: { ...DATA, capability: "localTranscripts", host: true, risk: "R", routes: ["GET /api/data", "GET /api/runtime/metrics"], reason: "reads computed metrics" },
1038
1044
  agentistics_harnesses: { ...DATA, capability: "localTranscripts", host: true, risk: "R", routes: ["GET /api/data", "GET /api/runtime/metrics", "GET /api/plan-limits"], reason: "reads computed metrics per harness and whether each can be spawned" },
1039
1045
  agentistics_plan_limits: { ...DATA, capability: "localTranscripts", host: true, risk: "R", routes: ["GET /api/plan-limits"], reason: "reads subscription windows and routing guidance; does not start work" },
@@ -2387,6 +2393,19 @@ var TOOLS = [
2387
2393
  required: []
2388
2394
  }
2389
2395
  },
2396
+ {
2397
+ name: "agentistics_session_switch_account",
2398
+ description: "Continue a session on ANOTHER account of the same harness (multiple accounts must be on). Use it when a session hit its account's usage limit and another account has room. With no `accountId` it lists the accounts the session can move to (the recommended one first, from the plan router) and whether its last turn stopped on a usage limit. With `accountId` it ends the session, copies its conversation to that account (never moves it) and resumes the SAME conversation there; the session keeps its name, task and note under a new id, which is returned. `resendPending: true` re-sends, once, the message the limit refused. Claude Code and Codex only; an account that is off for agents, removed or signed out is refused in words.",
2399
+ inputSchema: {
2400
+ type: "object",
2401
+ properties: {
2402
+ ref: { type: "string", description: "The session: managed id or conversation id." },
2403
+ accountId: { type: "string", description: "The target account id (acc_…). Omit to list the options." },
2404
+ resendPending: { type: "boolean", description: "Re-send the message the usage limit refused, once." }
2405
+ },
2406
+ required: ["ref"]
2407
+ }
2408
+ },
2390
2409
  {
2391
2410
  name: "agentistics_session_away",
2392
2411
  description: "Read or switch AWAY MODE, or send the owner a notice while away — the owner is out (asleep, travelling) and the fleet carries on without asking them. With no `on` it reports the state (`active`, `until`, what is pre-authorised). With `on: true` it switches it on: `until` is an ISO instant (omit = until the owner says they are back), `authorised` lists what the owner pre-approved (releases = publish releases the leader approved; workers = open worker sessions within the plan limits; merges = merge PRs the leader reviewed), `note` is free text. `on: false` switches it off. Every session started while it is active is told in its briefing. With `target` (a session's managed id or conversation id) `on` switches THAT session's own away mode instead — it alone is told the owner is out, even with the global switch off, and a running one is told the change; sessions it starts inherit it. Ceilings are per PROVIDER: `topCaps` maps a harness (claude, codex, gemini, copilot, antigravity, kimi, opencode) to how many workers may run on its top model tier at once. Only a LEADER session may switch it; use it when the owner tells you they are leaving or are back.",
@@ -2864,6 +2883,20 @@ async function callTool(req) {
2864
2883
  });
2865
2884
  return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
2866
2885
  }
2886
+ case "agentistics_session_switch_account": {
2887
+ const a = args;
2888
+ if (typeof a?.accountId !== "string" || !a.accountId) {
2889
+ const body = await apiGet(`/api/fleet/switch-account?id=${encodeURIComponent(String(a?.ref ?? ""))}`);
2890
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
2891
+ }
2892
+ const body = await apiSend("POST", "/api/fleet/switch-account", {
2893
+ id: a.ref,
2894
+ accountId: a.accountId,
2895
+ resendPending: a.resendPending === true,
2896
+ session: sessionProof(process.env) ?? null
2897
+ });
2898
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
2899
+ }
2867
2900
  case "agentistics_session_away": {
2868
2901
  const a = args;
2869
2902
  if (typeof a?.notice === "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.144.0",
3
+ "version": "2.145.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",