@agentistics/mcp 2.201.2 → 2.202.1

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  // live-delivery-args.ts
4
4
  var LIVE_STAGES = ["queue", "running", "qa", "adjust", "leader", "merge", "published"];
5
+ var LIVE_SORTS = ["priority", "time-in-stage", "recent"];
5
6
  function liveDeliveryQuery(a) {
6
7
  const q = new URLSearchParams;
7
8
  const task = typeof a?.task === "string" ? a.task.trim() : "";
@@ -11,6 +12,12 @@ function liveDeliveryQuery(a) {
11
12
  q.set("stage", a.stage);
12
13
  if (a?.stalledOnly === true)
13
14
  q.set("stalled", "1");
15
+ if (a?.onlyActive === false)
16
+ q.set("onlyActive", "0");
17
+ if (a?.showQueue === false)
18
+ q.set("showQueue", "0");
19
+ if (typeof a?.sort === "string" && LIVE_SORTS.includes(a.sort))
20
+ q.set("sort", a.sort);
14
21
  return q.toString() ? `?${q}` : "";
15
22
  }
16
23
 
@@ -1006,6 +1013,18 @@ var AGENT_TOOL_POLICY = {
1006
1013
  routes: ["POST /api/deliveries/:subtask"],
1007
1014
  reason: "writes the pre-dispatch (staged session draft) on a subtask and opens its delivery in the queue; nothing starts until stage-run passes the predispatch and vaga gates"
1008
1015
  },
1016
+ agentistics_task_queue: {
1017
+ ...TASKS,
1018
+ risk: "R",
1019
+ routes: ["GET /api/deliveries/queue/:task"],
1020
+ reason: "reads the delivery queue in leaving order with every fact the Fila tab shows (priority, pre-dispatch, slot verdict, hold, open question, notes); read only"
1021
+ },
1022
+ agentistics_task_queue_answer: {
1023
+ ...TASKS,
1024
+ risk: "W",
1025
+ routes: ["POST /api/deliveries/:subtask", "POST /api/deliveries/queue-next"],
1026
+ reason: "answers the queue question (sim opens the session through the same claim-guarded stage run; nao/agendar keep the piece queued with a recorded reason); leader of the task or owner only, every decision is a comment on the subtask"
1027
+ },
1009
1028
  agentistics_wait: {
1010
1029
  ...GROUPS,
1011
1030
  risk: "W",
@@ -1059,6 +1078,12 @@ var AGENT_TOOL_POLICY = {
1059
1078
  agentistics_export_pdf: { ...DATA, risk: "R", routes: [], reason: "composes a local dashboard URL; calls nothing and exports nothing itself" },
1060
1079
  agentistics_tags: { ...DATA, risk: "R", routes: ["GET /api/tags"], reason: "reads aggregate-only tag cards" },
1061
1080
  agentistics_tag_detail: { ...DATA, risk: "R", routes: ["GET /api/tags", "GET /api/tags/:id"], reason: "reads one tag aggregate (counts and sums only)" },
1081
+ agentistics_vault_status: {
1082
+ ...TASKS,
1083
+ risk: "R",
1084
+ routes: ["GET /api/vault"],
1085
+ reason: "reads how the vault is protected (state, ways to confirm in use and offered, password rules) through an allowlist; never an item, a key id or a secret"
1086
+ },
1062
1087
  agentistics_flow_run: { ...DATA, capability: "localShell", host: true, risk: "R", routes: ["POST /api/flows/run"], reason: "runs only the built-in deterministic flow gates; it deletes nothing" },
1063
1088
  agentistics_flow_status: { ...DATA, capability: "localShell", host: true, risk: "R", routes: ["GET /api/flows/status/:runId"], reason: "reads a durable deterministic flow run" }
1064
1089
  };
@@ -1182,6 +1207,21 @@ var GO_WINDOW_MS = {
1182
1207
  function isFlowRunId(id) {
1183
1208
  return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(id);
1184
1209
  }
1210
+ // ../core/src/vaultPassword.ts
1211
+ var VAULT_PASSWORD_RULES = ["length", "upper", "special", "digit"];
1212
+ var VAULT_PASSWORD_MIN_LENGTH = 9;
1213
+ var VAULT_PASSWORD_MIN_SPECIAL = 2;
1214
+ var VAULT_PASSWORD_RULE_TEXT = {
1215
+ length: { en: `At least ${VAULT_PASSWORD_MIN_LENGTH} characters`, pt: `Pelo menos ${VAULT_PASSWORD_MIN_LENGTH} caracteres` },
1216
+ upper: { en: "At least 1 uppercase letter", pt: "Pelo menos 1 letra maiúscula" },
1217
+ special: { en: `At least ${VAULT_PASSWORD_MIN_SPECIAL} special characters (like ! @ # $)`, pt: `Pelo menos ${VAULT_PASSWORD_MIN_SPECIAL} caracteres especiais (como ! @ # $)` },
1218
+ digit: { en: "At least 1 number", pt: "Pelo menos 1 número" }
1219
+ };
1220
+ var UPPER = "ABCDEFGHJKLMNPQRSTUVWXYZ";
1221
+ var LOWER = "abcdefghijkmnopqrstuvwxyz";
1222
+ var DIGITS = "23456789";
1223
+ var SPECIALS = "!@#$%&*+-=?_";
1224
+ var ALL = UPPER + LOWER + DIGITS + SPECIALS;
1185
1225
  // flow-status.ts
1186
1226
  function flowStatusRunId(runId) {
1187
1227
  if (!isFlowRunId(runId))
@@ -1682,6 +1722,34 @@ function harnessesTool(rows, body) {
1682
1722
  return rows.map((row) => ({ ...row, ...body.harnesses?.[row.harness] }));
1683
1723
  }
1684
1724
 
1725
+ // vault-tool.ts
1726
+ var PRESENCE = new Set(["touchid", "hello", "password", "fido2"]);
1727
+ var rules = () => ({
1728
+ minLength: VAULT_PASSWORD_MIN_LENGTH,
1729
+ minSpecial: VAULT_PASSWORD_MIN_SPECIAL,
1730
+ rules: VAULT_PASSWORD_RULES.map((id) => ({ id, ...VAULT_PASSWORD_RULE_TEXT[id] }))
1731
+ });
1732
+ function vaultStatusTool(body) {
1733
+ const b = body && typeof body === "object" ? body : {};
1734
+ const v = b.view && typeof b.view === "object" ? b.view : b;
1735
+ const wrappers = Array.isArray(v.wrappers) ? v.wrappers.filter((w) => typeof w === "string") : [];
1736
+ const offered = Array.isArray(v.unlockMethods) ? v.unlockMethods.flatMap((m) => {
1737
+ const o = m && typeof m === "object" ? m : {};
1738
+ return typeof o.id === "string" && PRESENCE.has(o.id) ? [{ id: o.id, advanced: o.advanced === true }] : [];
1739
+ }) : [];
1740
+ const state = typeof v.state === "string" ? v.state : typeof b.state === "string" ? b.state : "unknown";
1741
+ return {
1742
+ state,
1743
+ confirmsWith: wrappers.filter((w) => PRESENCE.has(w)),
1744
+ offered,
1745
+ legacyAppCode: v.legacyAppCode === true,
1746
+ recoveryKey: typeof v.recoveryCreatedAt === "string" && v.recoveryCreatedAt.length > 0,
1747
+ autoLockMinutes: typeof v.autoLockMinutes === "number" ? v.autoLockMinutes : null,
1748
+ passwordRules: rules(),
1749
+ note: "Setting up, unlocking and confirming are done by the person on the /vault page or with `agentop vault`; an agent never handles the vault password or the 24 words."
1750
+ };
1751
+ }
1752
+
1685
1753
  // legacy-analytics.ts
1686
1754
  function legacySummary(data, harness) {
1687
1755
  const unified = !harness || harness === "all";
@@ -2389,13 +2457,16 @@ var TOOLS = [
2389
2457
  },
2390
2458
  {
2391
2459
  name: "agentistics_live_delivery",
2392
- description: 'What is being DELIVERED right now — the Live Delivery line, the same source as the screen. Use it to answer "what is running", "when does X ship" and "is anything stalled". Returns a `summary` (active deliveries, agents working, stalled, the next delivery with an estimate), the active `deliveries` with their stage (queue, running, qa, adjust, leader, merge, published), the agents on each (harness, model, account, live state), time in the stage and in total, the ETA with its source and confidence (`kind: none` means there is NO estimate — say so, never invent a time), the last action, and the `leaders` band (each leader\'s current action, its workers and what waits on a decision — leaders are never deliveries). Filters: `task` (id or part of the title), `stage`, `stalledOnly`.',
2460
+ description: 'What is being DELIVERED right now — the Live Delivery line, the same source as the screen. Use it to answer "what is running", "when does X ship" and "is anything stalled". Returns a `summary` (active deliveries, agents working, stalled, the next delivery with an estimate), the active `deliveries` with their stage (queue, running, qa, adjust, leader, merge, published), the agents on each (harness, model, account, live state), time in the stage and in total, the step inside the stage (`step`, with `stepSource` = `reported` or `signals` and `stepSignal` naming the observed fact — null `step` means nothing is observable, say so; the screen then draws no percent), the ETA with its source and confidence (`kind: none` means there is NO estimate — say so, never invent a time), the last action, and the `leaders` band (each leader\'s current action, its workers and what waits on a decision — leaders are never deliveries). Each delivery carries its Agentask `priority` (urgent | high | medium | low; a subtask inherits its task\'s). Filters: `task` (id or part of the title), `stage`, `stalledOnly`, and the screen\'s own switches — `onlyActive` (the stages after the queue; default true) and `showQueue` (the Na fila column; default true), pass false to turn one off — plus `sort` (how each stage lists its cards; default `priority`, highest first, ties by longest in the stage). Stage names on screen: queue = Na fila, running = Em desenvolvimento, qa = QA. `history` is the screen\'s Histórico column: pieces published more than 24 h ago (up to 30 days, newest first, same `task` filter, no live agents) — Publicado keeps a card for 24 h and then it moves there.',
2393
2461
  inputSchema: {
2394
2462
  type: "object",
2395
2463
  properties: {
2396
2464
  task: { type: "string", description: "A task id or part of its title." },
2397
2465
  stage: { type: "string", enum: ["queue", "running", "qa", "adjust", "leader", "merge", "published"] },
2398
- stalledOnly: { type: "boolean", description: "Only deliveries that need a person, lost an agent or are blocked." }
2466
+ stalledOnly: { type: "boolean", description: "Only deliveries that need a person, lost an agent or are blocked." },
2467
+ onlyActive: { type: "boolean", description: `The screen's "apenas ativas": the cards of the stages after the queue. Default true; false hides them.` },
2468
+ showQueue: { type: "boolean", description: `The screen's "exibir itens na fila": the cards of the Na fila column. Default true; false hides them.` },
2469
+ sort: { type: "string", enum: ["priority", "time-in-stage", "recent"], description: "Order within each stage. Default priority (highest first, ties by longest in the stage)." }
2399
2470
  },
2400
2471
  required: []
2401
2472
  }
@@ -2458,7 +2529,7 @@ var TOOLS = [
2458
2529
  },
2459
2530
  {
2460
2531
  name: "agentistics_task_phase",
2461
- description: "`tick` also enables the mandatory owner-request/placement flows through the official engine switches and reads canonical pedidos; after 10 minutes without complete staging it wakes the current live task leader, including after a handoff or restart, and never asks the owner. " + "Queue actions: `dequeue` withdraws a queued piece with a required free-text `reason` (task leader or owner only), keeps the draft/history, and refuses dispatch until explicitly restaged; `tick` reconciles stale queued pieces against board review/done/abandoned and records a comment. Vacancy counts live backend processes; lost/exited/closed sessions reserve no slots. " + "FLUXO.ENTREGA-DSL — read or move a DELIVERY (one subtask) through its fixed phases: fila → executando → qa → (ajuste ⇄ qa) → revisao_lider → pr_merge → ci → publicado, plus bloqueado (from any phase, back to the stored origin only). Any transition outside that table is REFUSED (422 `fase_pulada`) with a sentence naming what is missing — executando → revisao_lider, ajuste → revisao_lider and every other skip included. The gates each edge needs are run BY THE SERVER from evidence (predispatch, vaga, salvo = sha on origin per ls-remote, qa-modelo = QA model ≠ author model from the registry and never Sonnet over Sonnet, cabeca = the pushed branch is still at the sha QA tested, delecoes = no file deleted outright by the PR, mergeado = gh says the PR is MERGED, the merge commit is on origin/main and the PR head is the sha QA approved — the merge sha is READ FROM THE PR, never from you, release = the batch's version tag exists AND the release.yml run that produced it is green, read in the repository the release recorded); salvo needs every check run on the pushed head to have concluded green (pending or absent refuse); you never pass proof. `action`: `get` (default; omit `subtaskId` to list every delivery) | `phase` (`to` + what that edge reads: `verdict` APROVADO/REPROVADO + `findings` from qa, `reviewedSha` = the sha QA approved for revisao_lider → pr_merge, `detail` for a request for change or a failure reason) | `gate` (`name`: run ONE gate and record its evidence) | `block` (`reason` one of dependencia, pedido_de_bloqueio, limite, maquina, externo, fora_das_autorizacoes; `text`) | `unblock` (`detail`; the leader of the task or the owner — an owner-decision block only the owner) | `step` (`step` 1..9: the step of the current phase, for the Live %) | `configure` (the LEADER of the task or the owner only; `patch`: versionTarget, humanGates [phases needing the owner's approval — skipped and recorded as 'pulado: modo autônomo' while autonomous mode is on], leaderSessionId, pr, tag, allowDeletions {paths, reason}; the QA and author sessions are never settable — the host records them from the sessions it opened and the registry) | `approve` (`phase`, `decision` approve|reject, `note`: answers a human gate the owner was ASKED about; a session identity is deliberately not sent, the owner answers through this same door as the Live card button and `agentop flow approve`) | `stage-run` (predispatch + vaga gates, then start the staged session and move to executando) | `merge` (delecoes gate, squash-merge the PR, move to ci; a failure goes back to revisao_lider) | `release` (the LEADER of the task or the owner DECLARES what a release contains: `version` x.y.z, `mergeSha` = the commit on main carrying it (information only; 40 characters, or a short sha the server resolves), optional `repo` = owner/name (default agentistics/agentistics), `subtaskIds` = every piece in it; no `subtaskId`. Each piece gets its record (a legacy one is adopted), versionTarget/mergeSha/tag/repo, goes to ci and then to publicado as soon as the tag `v<version>` exists and the release.yml run that produced it is green — read by the server from the TAG, not from the sha — with the release's own publish time; a declared piece is never sent back to revisao_lider by the tick (a red tag run keeps it in ci and wakes the leader once); done/abandoned/blocked/unknown/other-task pieces refuse the whole batch, which is written in ONE store write; a second run changes nothing). In autonomous mode nothing here ever asks or waits for the owner.",
2532
+ description: "`tick` also enables the mandatory owner-request/placement flows through the official engine switches and reads canonical pedidos; after 10 minutes without complete staging it wakes the current live task leader, including after a handoff or restart, and never asks the owner. " + "Queue actions: `dequeue` withdraws a queued piece with a required free-text `reason` (task leader or owner only), keeps the draft/history, and refuses dispatch until explicitly restaged; `tick` reconciles stale queued pieces against board review/done/abandoned and records a comment. Vacancy counts live backend processes; lost/exited/closed sessions reserve no slots. " + "FLUXO.ENTREGA-DSL — read or move a DELIVERY (one subtask) through its fixed phases: fila → executando → qa → (ajuste ⇄ qa) → revisao_lider → pr_merge → ci → publicado, plus bloqueado (from any phase, back to the stored origin only). Any transition outside that table is REFUSED (422 `fase_pulada`) with a sentence naming what is missing — executando → revisao_lider, ajuste → revisao_lider and every other skip included. The gates each edge needs are run BY THE SERVER from evidence (predispatch, vaga, salvo = sha on origin per ls-remote, qa-modelo = QA model ≠ author model from the registry and never Sonnet over Sonnet, cabeca = the pushed branch is still at the sha QA tested, delecoes = no file deleted outright by the PR, mergeado = gh says the PR is MERGED, the merge commit is on origin/main and the PR head is the sha QA approved — the merge sha is READ FROM THE PR, never from you, release = the batch's version tag exists AND the release.yml run that produced it is green, read in the repository the release recorded); salvo needs every check run on the pushed head to have concluded green (pending or absent refuse); you never pass proof. `action`: `get` (default; omit `subtaskId` to list every delivery) | `phase` (`to` + what that edge reads: `verdict` APROVADO/REPROVADO + `findings` from qa, `reviewedSha` = the sha QA approved for revisao_lider → pr_merge, `detail` for a request for change or a failure reason) | `gate` (`name`: run ONE gate and record its evidence) | `block` (`reason` one of dependencia, pedido_de_bloqueio, limite, maquina, externo, fora_das_autorizacoes; `text`) | `unblock` (`detail`; the leader of the task or the owner — an owner-decision block only the owner) | `step` (`step` 1..9: the step of the current phase, for the Live %. The Live already DERIVES the step from real signals — a session open, a file edit, a test run, a commit, the gates, the PR — so report only when you know better; the card shows the larger of the two and says which it is. Works for a legacy piece with no delivery record too: only the board's `step` event is written, nothing is adopted into the flow) | `configure` (the LEADER of the task or the owner only; `patch`: versionTarget, humanGates [phases needing the owner's approval — skipped and recorded as 'pulado: modo autônomo' while autonomous mode is on], leaderSessionId, pr, tag, allowDeletions {paths, reason}; the QA and author sessions are never settable — the host records them from the sessions it opened and the registry) | `approve` (`phase`, `decision` approve|reject, `note`: answers a human gate the owner was ASKED about; a session identity is deliberately not sent, the owner answers through this same door as the Live card button and `agentop flow approve`) | `stage-run` (predispatch + vaga gates, then start the staged session and move to executando) | `merge` (delecoes gate, squash-merge the PR, move to ci; a failure goes back to revisao_lider) | `release` (the LEADER of the task or the owner DECLARES what a release contains: `version` x.y.z, `mergeSha` = the commit on main carrying it (information only; 40 characters, or a short sha the server resolves), optional `repo` = owner/name (default agentistics/agentistics), `subtaskIds` = every piece in it; no `subtaskId`. Each piece gets its record (a legacy one is adopted), versionTarget/mergeSha/tag/repo, goes to ci and then to publicado as soon as the tag `v<version>` exists and the release.yml run that produced it is green — read by the server from the TAG, not from the sha — with the release's own publish time; a declared piece is never sent back to revisao_lider by the tick (a red tag run keeps it in ci and wakes the leader once); done/abandoned/blocked/unknown/other-task pieces refuse the whole batch, which is written in ONE store write; a second run changes nothing). In autonomous mode nothing here ever asks or waits for the owner.",
2462
2533
  inputSchema: {
2463
2534
  type: "object",
2464
2535
  properties: {
@@ -2504,6 +2575,24 @@ var TOOLS = [
2504
2575
  required: ["subtaskId"]
2505
2576
  }
2506
2577
  },
2578
+ {
2579
+ name: "agentistics_task_queue",
2580
+ description: `FILA.PRIORIDADE — read the delivery QUEUE ("Na fila") exactly as the task page's Fila tab shows it, from the same source, in the order pieces LEAVE: the task's priority (urgent → low), then arrival. ` + "Each item: `position` (in its task) and `globalPosition`, `priority`, the subtask/group (with `group.members`), the full PRE-DISPATCH (`predispatch`: harness, model, effort, account and its name, cwd, prompt), the slot gate's last verdict (`slot`; ok=false carries the raw reason such as `no slot: 4 workers running (machine ceiling 4)`), " + "`hold` (the leader said `nao <motivo>` or `agendar <ISO> <motivo>`: kind, reason, until, who, `active`), `ask` (the system question to the leader: when, delivered, approved, `expiresAt` = 10 min, `onTimeout` = `sim` with autonomous mode on, `esperar` with it off), the leader, and the subtask's notes (`notes.last` the newest 3, `notes.total`). " + "`recent` lists pieces the queue opened in the last 24 h with the session they opened. Pass `taskId` for one task's queue. To change the order, change the TASK's priority with `agentistics_task_edit`; to edit a piece's pre-dispatch use `agentistics_task_stage`; to start now / schedule / answer use `agentistics_task_queue_answer`; to withdraw use `agentistics_task_phase action=dequeue`.",
2581
+ inputSchema: { type: "object", properties: { taskId: { type: "string", description: "Only this task's queued pieces. Omit for every task." } }, required: [] }
2582
+ },
2583
+ {
2584
+ name: "agentistics_task_queue_answer",
2585
+ description: "FILA.PRIORIDADE — answer the queue's SYSTEM QUESTION (the message headed `[from flow fila · confirmar]` that arrives in a leader's composer when a slot opens and its piece is next), or act on a queued piece from the Fila tab. Leader of the task or owner only. " + "`answer` is one of: `sim` (open the session now — if no slot is free right now the approval is kept and the next tick starts it; never opens twice), `nao <motivo>` (the piece stays queued with the reason on its card; the flow moves on to the next one), `agendar <ISO> <motivo>` (stays queued, becomes a candidate again only from that FUTURE instant, shown on the card as `começa às HH:MM`). " + "A `nao` or `agendar` without a reason, and an `agendar` in the past, are refused with a sentence. Every decision is recorded as a comment on the subtask (who, why, when). With no answer in 10 minutes: autonomous mode ON → the flow carries on as `sim` and records it; OFF → it keeps waiting and reminds you. " + "Set `runNow: true` instead of `answer` to run the queue flow once right now (what happens automatically when a worker ends and every minute).",
2586
+ inputSchema: {
2587
+ type: "object",
2588
+ properties: {
2589
+ subtaskId: { type: "string" },
2590
+ answer: { type: "string", description: "`sim` | `nao <motivo>` | `agendar <ISO> <motivo>`" },
2591
+ runNow: { type: "boolean", description: "Run the queue flow now instead of answering." }
2592
+ },
2593
+ required: []
2594
+ }
2595
+ },
2507
2596
  {
2508
2597
  name: "agentistics_session_groups",
2509
2598
  description: 'List the user\'s SESSION GROUPS — the named folders in the Sessions sidebar ("Saved to later", "Pelvie", …) — with the sessions in each. A group is how a person keeps a fleet of assistants organised; every session belongs to at most one. Each member carries its `id` (the managed session id you can pass to the other tools), `title`, `state` and `harness` when the session is on this machine right now, or only its `key` when it is gone. Call this BEFORE creating a group, so you file a session under an existing one instead of making a near-duplicate. Only works on a machine, not on a central (a central has no local sessions to organise).',
@@ -2834,6 +2923,11 @@ var TOOLS = [
2834
2923
  description: "List all tags — saved cross-cutting filters over repos/projects/machines/teams/accounts — with their aggregate sessions, cost, and tokens. Use for 'what tags exist' or 'how much did tag X cost' questions.",
2835
2924
  inputSchema: { type: "object", properties: {}, required: [] }
2836
2925
  },
2926
+ {
2927
+ name: "agentistics_vault_status",
2928
+ description: "How this machine's vault is protected — never what it holds. Returns the state (open/locked/uninitialized…), the ways to confirm it is you already in use (touchid = Touch ID or the Mac password, hello = Windows Hello, password = the vault's own password, fido2 = a security key), the ways this machine offers (a security key only when its tools are present, marked advanced), whether an old app-code record is still on disk (it is no longer asked; it is deleted once a way to confirm is chosen), whether the 24-word recovery key exists, the auto-lock minutes, and the vault-password rules (the same table the page and the server enforce). Setting up, unlocking and confirming are the person's: on the /vault page or with `agentop vault` — never pass a vault password or recovery words through a tool.",
2929
+ inputSchema: { type: "object", properties: {}, required: [] }
2930
+ },
2837
2931
  {
2838
2932
  name: "agentistics_tag_detail",
2839
2933
  description: "Get full detail for one tag by name or id: aggregate totals plus per-source breakdown and distributions (top projects, models, harnesses, repos, members/users), daily activity series, and the active date window. Call agentistics_tags first to find the id/name.",
@@ -3119,6 +3213,24 @@ async function callTool(req) {
3119
3213
  });
3120
3214
  return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3121
3215
  }
3216
+ case "agentistics_task_queue": {
3217
+ const a = args ?? {};
3218
+ const body = await apiGet(`/api/deliveries/queue/${encodeURIComponent(typeof a.taskId === "string" ? a.taskId : "")}`);
3219
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3220
+ }
3221
+ case "agentistics_task_queue_answer": {
3222
+ const a = args ?? {};
3223
+ if (a.runNow === true) {
3224
+ const body = await apiSend("POST", "/api/deliveries/queue-next", { session: sessionProof(process.env) });
3225
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3226
+ }
3227
+ if (typeof a.subtaskId !== "string" || !a.subtaskId)
3228
+ throw new Error("subtaskId is required");
3229
+ if (typeof a.answer !== "string" || !a.answer.trim())
3230
+ throw new Error("answer is required: sim | nao <motivo> | agendar <ISO> <motivo>");
3231
+ const body = await apiSend("POST", `/api/deliveries/${encodeURIComponent(a.subtaskId)}`, { action: "queue-answer", answer: a.answer, session: sessionProof(process.env) });
3232
+ return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
3233
+ }
3122
3234
  case "agentistics_session_groups": {
3123
3235
  const body = await apiGet("/api/session-groups");
3124
3236
  return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
@@ -3505,6 +3617,13 @@ async function callTool(req) {
3505
3617
  }));
3506
3618
  return { content: [{ type: "text", text: JSON.stringify(rows, null, 2) }] };
3507
3619
  }
3620
+ case "agentistics_vault_status": {
3621
+ const res = await fetch(`${API}/api/vault`);
3622
+ const body = await res.json().catch(() => ({}));
3623
+ if (!res.ok && !(body && typeof body === "object" && body.view))
3624
+ throw new Error(`GET /api/vault → HTTP ${res.status}`);
3625
+ return text(vaultStatusTool(body));
3626
+ }
3508
3627
  case "agentistics_tag_detail": {
3509
3628
  const wanted = (args?.tag ?? "").trim();
3510
3629
  if (!wanted)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.201.2",
3
+ "version": "2.202.1",
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",