@agentistics/mcp 2.201.1 → 2.202.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.
- package/dist/agentistics-mcp.js +145 -11
- package/package.json +1 -1
package/dist/agentistics-mcp.js
CHANGED
|
@@ -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
|
|
|
@@ -997,8 +1004,8 @@ var AGENT_TOOL_POLICY = {
|
|
|
997
1004
|
agentistics_task_phase: {
|
|
998
1005
|
...TASKS,
|
|
999
1006
|
risk: "W",
|
|
1000
|
-
routes: ["GET /api/deliveries", "GET /api/deliveries/:subtask", "POST /api/deliveries/:subtask"],
|
|
1001
|
-
reason: "reads or moves a delivery through the fixed phase table; a skipped phase is refused (422 fase_pulada) and every gate is checked by the host from evidence, never from the caller"
|
|
1007
|
+
routes: ["GET /api/deliveries", "GET /api/deliveries/:subtask", "POST /api/deliveries/:subtask", "POST /api/deliveries/release"],
|
|
1008
|
+
reason: "reads or moves a delivery through the fixed phase table; release declares which pieces a release shipped (leader/owner only; the host still reads the green run and the tag); a skipped phase is refused (422 fase_pulada) and every gate is checked by the host from evidence, never from the caller"
|
|
1002
1009
|
},
|
|
1003
1010
|
agentistics_task_stage: {
|
|
1004
1011
|
...TASKS,
|
|
@@ -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";
|
|
@@ -2290,7 +2358,7 @@ var TOOLS = [
|
|
|
2290
2358
|
},
|
|
2291
2359
|
{
|
|
2292
2360
|
name: "agentistics_task_subtask",
|
|
2293
|
-
description: "Add a subtask, or change one. Pass `title` to add; pass `id` with `done`, `status`, `dueDate`, `startDate`, `blockedBy` or `parentGroupId` to edit one. `startedAt`/`deliveredAt` are system-stamped facts (when real work began / when this piece reached `done`) and are never set through this tool — they are read back on the subtask record. A subtask carries the same columns its parent does; its own cost, tokens, rounds and harness are rolled up from the sessions filed under it — the PARENT task's rollup is the sum of all its subtasks' sessions. A subtask CAN be blocked by another subtask of the SAME parent (pass `blockedBy` as the full list of sibling subtask ids that must be `done` first; a sibling outside this task, or the subtask itself, is dropped rather than accepted) — this is separate from agentistics_task_blocked_by, which blocks a whole TASK on other tasks. **`done` REQUIRES the subtask to have at least one session filed under it** and is refused (422, `done_needs_session`) without one — EXCEPT for a group MEMBER (`parentGroupId` set), which can never hold a session of its own (see below) and therefore reaches `done` through this same edit with no session required; a GROUP itself (`isGroup: true`) and an ordinary loose subtask both still need one. **The moment every one of a task's top-level subtasks (loose subtasks and groups — a group's own members never count separately) reaches `done`, the parent task auto-delivers too.** To put a session ON a subtask use agentistics_task_session with `subtaskId` — a subtask holds ANY NUMBER of sessions, so the link lives on the session, not in a field here. **SUBTASK GROUPS are a real hierarchy level, not a label**: pass `isGroup: true` with `title` to create a GROUP — a peer row that CAN hold a session, exactly like a loose subtask. Pass `id` (a subtask) with `parentGroupId` (a group's own subtask id, from the SAME parent task) to make it a MEMBER of that group — join with the group's id, leave with `parentGroupId: ''`. A refused reference (the id names no subtask, names one that is not `isGroup: true`, names a different task, or the subtask being patched is itself a group) is refused as `invalid_group` (422). **Joining a group is ALSO refused (422, `subtask_has_sessions`) when the subtask already has a session filed on it** — a member gets no rollup bucket of its own, so that session's cost would silently drop out of every visible breakdown while the task's own total kept counting it; detach the session first. **A MEMBER can never hold a session of its own** — filing on one is refused by agentistics_task_session with `subtask_in_group` (422); only the group itself accounts for a session, and a member's own status/dates/comments still exist and feed the group's progress percentage.",
|
|
2361
|
+
description: "Joining a staged subtask to a group folds its queued delivery and brief into the group, keeping one queue card and an audit reason. " + "Add a subtask, or change one. Pass `title` to add; pass `id` with `done`, `status`, `dueDate`, `startDate`, `blockedBy` or `parentGroupId` to edit one. `startedAt`/`deliveredAt` are system-stamped facts (when real work began / when this piece reached `done`) and are never set through this tool — they are read back on the subtask record. A subtask carries the same columns its parent does; its own cost, tokens, rounds and harness are rolled up from the sessions filed under it — the PARENT task's rollup is the sum of all its subtasks' sessions. A subtask CAN be blocked by another subtask of the SAME parent (pass `blockedBy` as the full list of sibling subtask ids that must be `done` first; a sibling outside this task, or the subtask itself, is dropped rather than accepted) — this is separate from agentistics_task_blocked_by, which blocks a whole TASK on other tasks. **`done` REQUIRES the subtask to have at least one session filed under it** and is refused (422, `done_needs_session`) without one — EXCEPT for a group MEMBER (`parentGroupId` set), which can never hold a session of its own (see below) and therefore reaches `done` through this same edit with no session required; a GROUP itself (`isGroup: true`) and an ordinary loose subtask both still need one. **The moment every one of a task's top-level subtasks (loose subtasks and groups — a group's own members never count separately) reaches `done`, the parent task auto-delivers too.** To put a session ON a subtask use agentistics_task_session with `subtaskId` — a subtask holds ANY NUMBER of sessions, so the link lives on the session, not in a field here. **SUBTASK GROUPS are a real hierarchy level, not a label**: pass `isGroup: true` with `title` to create a GROUP — a peer row that CAN hold a session, exactly like a loose subtask. Pass `id` (a subtask) with `parentGroupId` (a group's own subtask id, from the SAME parent task) to make it a MEMBER of that group — join with the group's id, leave with `parentGroupId: ''`. A refused reference (the id names no subtask, names one that is not `isGroup: true`, names a different task, or the subtask being patched is itself a group) is refused as `invalid_group` (422). **Joining a group is ALSO refused (422, `subtask_has_sessions`) when the subtask already has a session filed on it** — a member gets no rollup bucket of its own, so that session's cost would silently drop out of every visible breakdown while the task's own total kept counting it; detach the session first. **A MEMBER can never hold a session of its own** — filing on one is refused by agentistics_task_session with `subtask_in_group` (422); only the group itself accounts for a session, and a member's own status/dates/comments still exist and feed the group's progress percentage.",
|
|
2294
2362
|
inputSchema: {
|
|
2295
2363
|
type: "object",
|
|
2296
2364
|
properties: {
|
|
@@ -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,12 +2529,16 @@ var TOOLS = [
|
|
|
2458
2529
|
},
|
|
2459
2530
|
{
|
|
2460
2531
|
name: "agentistics_task_phase",
|
|
2461
|
-
description: "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 = release.yml
|
|
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: {
|
|
2465
|
-
action: { type: "string", enum: ["get", "phase", "gate", "block", "unblock", "step", "configure", "approve", "stage-run", "merge"] },
|
|
2536
|
+
action: { type: "string", enum: ["get", "phase", "gate", "block", "unblock", "dequeue", "tick", "step", "configure", "approve", "stage-run", "merge", "release"] },
|
|
2466
2537
|
subtaskId: { type: "string" },
|
|
2538
|
+
version: { type: "string", description: "release: the version the pieces shipped in, x.y.z" },
|
|
2539
|
+
mergeSha: { type: "string", description: "release: the commit on main that carries the release (information only: stored on the record; a short sha is resolved to 40 characters or refused). The publication evidence is the version tag's own green release.yml run" },
|
|
2540
|
+
repo: { type: "string", description: "release: the repository owner/name the release belongs to (default agentistics/agentistics); recorded on every piece, the release gate reads it there" },
|
|
2541
|
+
subtaskIds: { type: "array", items: { type: "string" }, description: "release: every subtask in the release" },
|
|
2467
2542
|
to: { type: "string", enum: ["executando", "qa", "ajuste", "revisao_lider", "pr_merge", "ci", "publicado"] },
|
|
2468
2543
|
verdict: { type: "string", enum: ["APROVADO", "REPROVADO"] },
|
|
2469
2544
|
findings: { type: "string" },
|
|
@@ -2473,7 +2548,7 @@ var TOOLS = [
|
|
|
2473
2548
|
phase: { type: "string", description: "approve: the phase whose human gate is answered" },
|
|
2474
2549
|
decision: { type: "string", enum: ["approve", "reject"] },
|
|
2475
2550
|
note: { type: "string" },
|
|
2476
|
-
reason: { type: "string",
|
|
2551
|
+
reason: { type: "string", description: "dequeue: required free-text audit reason (leader only); block: dependencia | pedido_de_bloqueio | limite | maquina | externo | fora_das_autorizacoes" },
|
|
2477
2552
|
text: { type: "string" },
|
|
2478
2553
|
step: { type: "number" },
|
|
2479
2554
|
patch: { type: "object" }
|
|
@@ -2483,7 +2558,7 @@ var TOOLS = [
|
|
|
2483
2558
|
},
|
|
2484
2559
|
{
|
|
2485
2560
|
name: "agentistics_task_stage",
|
|
2486
|
-
description: 'FLUXO.ENTREGA-DSL pre-dispatch — write the STAGED SESSION on a subtask (prompt/brief, harness, model, effort, account, cwd) and open its delivery in `fila` ("Na fila"). A leader receiving a request from the owner stages it in the SAME turn: the demand flow reminds the leader (never the owner) after 10 minutes of an owner request with no staged subtask. The fields merge over what the subtask already holds, and the predispatch gate is checked right away (the reply says what is still missing). Nothing starts here — `agentistics_task_phase action=stage-run` starts it once the vaga gate passes. `pedidoId` links the owner request this answers.',
|
|
2561
|
+
description: "Placement is deterministic: a queued piece of the same task sharing a file, area tag or UI surface is returned as an `encaixe` warning so you can extend that brief or group the pieces. Withdrawn pieces are excluded. " + 'FLUXO.ENTREGA-DSL pre-dispatch — write the STAGED SESSION on a subtask (prompt/brief, harness, model, effort, account, cwd) and open its delivery in `fila` ("Na fila"). A leader receiving a request from the owner stages it in the SAME turn: the demand flow reminds the leader (never the owner) after 10 minutes of an owner request with no staged subtask. The fields merge over what the subtask already holds, and the predispatch gate is checked right away (the reply says what is still missing). Nothing starts here — `agentistics_task_phase action=stage-run` starts it once the vaga gate passes. `pedidoId` links the owner request this answers.',
|
|
2487
2562
|
inputSchema: {
|
|
2488
2563
|
type: "object",
|
|
2489
2564
|
properties: {
|
|
@@ -2500,6 +2575,24 @@ var TOOLS = [
|
|
|
2500
2575
|
required: ["subtaskId"]
|
|
2501
2576
|
}
|
|
2502
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
|
+
},
|
|
2503
2596
|
{
|
|
2504
2597
|
name: "agentistics_session_groups",
|
|
2505
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).',
|
|
@@ -2830,6 +2923,11 @@ var TOOLS = [
|
|
|
2830
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.",
|
|
2831
2924
|
inputSchema: { type: "object", properties: {}, required: [] }
|
|
2832
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
|
+
},
|
|
2833
2931
|
{
|
|
2834
2932
|
name: "agentistics_tag_detail",
|
|
2835
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.",
|
|
@@ -3081,9 +3179,20 @@ async function callTool(req) {
|
|
|
3081
3179
|
const body = a.subtaskId ? await apiGet(`/api/deliveries/${encodeURIComponent(String(a.subtaskId))}`) : await apiGet("/api/deliveries");
|
|
3082
3180
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3083
3181
|
}
|
|
3084
|
-
if (
|
|
3182
|
+
if (action === "release") {
|
|
3183
|
+
const body = await apiSend("POST", "/api/deliveries/release", {
|
|
3184
|
+
version: a.version,
|
|
3185
|
+
mergeSha: a.mergeSha,
|
|
3186
|
+
repo: a.repo,
|
|
3187
|
+
subtaskIds: a.subtaskIds,
|
|
3188
|
+
session: sessionProof(process.env)
|
|
3189
|
+
});
|
|
3190
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3191
|
+
}
|
|
3192
|
+
if (action !== "tick" && (typeof a.subtaskId !== "string" || !a.subtaskId))
|
|
3085
3193
|
throw new Error("subtaskId is required");
|
|
3086
|
-
const { subtaskId, action: _a, ...rest } = a;
|
|
3194
|
+
const { subtaskId: _s, action: _a, ...rest } = a;
|
|
3195
|
+
const subtaskId = action === "tick" ? "tick" : a.subtaskId;
|
|
3087
3196
|
const body = await apiSend("POST", `/api/deliveries/${encodeURIComponent(subtaskId)}`, { ...rest, action, ...action === "approve" ? {} : { session: sessionProof(process.env) } });
|
|
3088
3197
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3089
3198
|
}
|
|
@@ -3104,6 +3213,24 @@ async function callTool(req) {
|
|
|
3104
3213
|
});
|
|
3105
3214
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3106
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
|
+
}
|
|
3107
3234
|
case "agentistics_session_groups": {
|
|
3108
3235
|
const body = await apiGet("/api/session-groups");
|
|
3109
3236
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
@@ -3490,6 +3617,13 @@ async function callTool(req) {
|
|
|
3490
3617
|
}));
|
|
3491
3618
|
return { content: [{ type: "text", text: JSON.stringify(rows, null, 2) }] };
|
|
3492
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
|
+
}
|
|
3493
3627
|
case "agentistics_tag_detail": {
|
|
3494
3628
|
const wanted = (args?.tag ?? "").trim();
|
|
3495
3629
|
if (!wanted)
|
package/package.json
CHANGED