@agentistics/mcp 2.183.0 → 2.185.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.
@@ -976,6 +976,12 @@ var AGENT_TOOL_POLICY = {
976
976
  routes: ["POST /api/session-message"],
977
977
  reason: "types a message into another session through the composer path; additive, rate-limited, sender verified"
978
978
  },
979
+ agentistics_wait: {
980
+ ...GROUPS,
981
+ risk: "W",
982
+ routes: ["POST /api/flows/wait"],
983
+ reason: "registers, acknowledges or cancels the calling session's OWN durable wait (closed condition set); the wake goes through the composer path; sender verified"
984
+ },
979
985
  agentistics_checkin_report: {
980
986
  ...GROUPS,
981
987
  risk: "W",
@@ -2455,6 +2461,26 @@ var TOOLS = [
2455
2461
  required: ["to", "kind", "body"]
2456
2462
  }
2457
2463
  },
2464
+ {
2465
+ name: "agentistics_wait",
2466
+ description: "EXPERIMENTAL (AGENTISTICS_FLOWS) — a DURABLE wait the SERVER keeps for YOU: instead of polling or running a background command, register what you wait for and a deadline; when the condition is met (or the deadline passes, once) the server types a wake message into your own session, headed `[from flow wait · nudge]`, naming the wait id and generation. Conditions are a closed set: `{kind:'handback', from:<session id>, since?:ISO}` (a handback FROM that session), `{kind:'memory', minAvailableMB}` (free memory, two stable readings), `{kind:'time', at:ISO}`, `{kind:'gate', gate:'sessao-parada'|'arvore-limpa'|'trabalho-salvo', sessionId}`. action=register needs `condition` + `deadlineAt` (ISO UTC, ≤30 days; pass `requestId` to make a retry the same wait); action=ack (`waitId`, `generation`) confirms you RECEIVED the wake — without it the wake is sent again (at most 3 times), so ack every wake, and treat a repeated wake for the same id+generation as already handled; action=cancel (`waitId`) before it fires; action=list your open waits; action=handoff (`from`: the previous leader on the same task) moves its waits to you. A wait is never 'working' nor an approval.",
2467
+ inputSchema: {
2468
+ type: "object",
2469
+ properties: {
2470
+ action: { type: "string", enum: ["register", "cancel", "ack", "list", "handoff"] },
2471
+ condition: { type: "object", description: "register: the condition (closed set, see the description)." },
2472
+ deadlineAt: { type: "string", description: "register: ISO UTC deadline; the wake fires once when it passes without the condition." },
2473
+ label: { type: "string", description: "register: one short line shown as 'aguardando <label> até <deadline>'." },
2474
+ requestId: { type: "string", description: "register: optional idempotency key; the same key returns the same wait." },
2475
+ reopen: { type: "boolean", description: "register: if you have ended when it fires, may the server reopen you (only when the host supports it)? Otherwise your leader is told." },
2476
+ waitId: { type: "string", description: "cancel/ack: the wait id." },
2477
+ generation: { type: "number", description: "ack: the generation named in the wake message." },
2478
+ from: { type: "string", description: "handoff: the previous leader's session id." },
2479
+ all: { type: "boolean", description: "list: include finished waits." }
2480
+ },
2481
+ required: ["action"]
2482
+ }
2483
+ },
2458
2484
  {
2459
2485
  name: "agentistics_session_role",
2460
2486
  description: 'Get or set a session\'s ROLE (leader | worker | auto). With no `ref` it is YOUR OWN session. Setting `leader` stores the role, renames the session to "[ LEADER ] - <title>" ("[ LÍDER ] - …" in a Portuguese UI) keeping the user\'s title, and the briefing then tells the model it is a leader; `worker`/`auto` strip the prefix. Use it to declare yourself leader when the work grows to several fronts — do not rename the session by hand. Setting ANOTHER session\'s role works only for sessions you started yourself. Idempotent. With no `role` it just reports the current one and the role line.',
@@ -3043,6 +3069,23 @@ async function callTool(req) {
3043
3069
  });
3044
3070
  return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3045
3071
  }
3072
+ case "agentistics_wait": {
3073
+ const a = args;
3074
+ const body = await apiSend("POST", "/api/flows/wait", {
3075
+ action: a?.action,
3076
+ condition: a?.condition,
3077
+ deadlineAt: a?.deadlineAt,
3078
+ label: a?.label,
3079
+ requestId: a?.requestId,
3080
+ reopen: a?.reopen,
3081
+ waitId: a?.waitId,
3082
+ generation: a?.generation,
3083
+ from: a?.from,
3084
+ all: a?.all,
3085
+ session: sessionProof(process.env)
3086
+ });
3087
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3088
+ }
3046
3089
  case "agentistics_checkin_report": {
3047
3090
  const a = args;
3048
3091
  const body = await apiSend("POST", "/api/checkin/report", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.183.0",
3
+ "version": "2.185.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",