@agentistics/mcp 2.200.6 → 2.201.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 +97 -3
- package/package.json +1 -1
package/dist/agentistics-mcp.js
CHANGED
|
@@ -994,6 +994,18 @@ var AGENT_TOOL_POLICY = {
|
|
|
994
994
|
routes: ["POST /api/session-message"],
|
|
995
995
|
reason: "types a message into another session through the composer path; additive, rate-limited, sender verified"
|
|
996
996
|
},
|
|
997
|
+
agentistics_task_phase: {
|
|
998
|
+
...TASKS,
|
|
999
|
+
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"
|
|
1002
|
+
},
|
|
1003
|
+
agentistics_task_stage: {
|
|
1004
|
+
...TASKS,
|
|
1005
|
+
risk: "W",
|
|
1006
|
+
routes: ["POST /api/deliveries/:subtask"],
|
|
1007
|
+
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
|
+
},
|
|
997
1009
|
agentistics_wait: {
|
|
998
1010
|
...GROUPS,
|
|
999
1011
|
risk: "W",
|
|
@@ -1160,6 +1172,12 @@ function routeRecommendation(budgets, kind, authorHarness) {
|
|
|
1160
1172
|
}
|
|
1161
1173
|
var NEW_PERIOD_MS = 5 * 60000;
|
|
1162
1174
|
var DISCONTINUITY_RESET_MS = 60 * 60000;
|
|
1175
|
+
// ../core/src/opencodeGo.ts
|
|
1176
|
+
var GO_WINDOW_MS = {
|
|
1177
|
+
"5h": 5 * 3600000,
|
|
1178
|
+
week: 7 * 24 * 3600000,
|
|
1179
|
+
month: 30 * 24 * 3600000
|
|
1180
|
+
};
|
|
1163
1181
|
// ../core/src/flowRunId.ts
|
|
1164
1182
|
function isFlowRunId(id) {
|
|
1165
1183
|
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);
|
|
@@ -2438,6 +2456,50 @@ var TOOLS = [
|
|
|
2438
2456
|
description: "Delete a task and its comments, subtasks, files and links. The SESSIONS filed under it are kept — deleting a board entry never deletes work.",
|
|
2439
2457
|
inputSchema: { type: "object", properties: { ref: { type: "string" } }, required: ["ref"] }
|
|
2440
2458
|
},
|
|
2459
|
+
{
|
|
2460
|
+
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 green for the merge sha AND the batch's tag exists); 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). In autonomous mode nothing here ever asks or waits for the owner.",
|
|
2462
|
+
inputSchema: {
|
|
2463
|
+
type: "object",
|
|
2464
|
+
properties: {
|
|
2465
|
+
action: { type: "string", enum: ["get", "phase", "gate", "block", "unblock", "step", "configure", "approve", "stage-run", "merge"] },
|
|
2466
|
+
subtaskId: { type: "string" },
|
|
2467
|
+
to: { type: "string", enum: ["executando", "qa", "ajuste", "revisao_lider", "pr_merge", "ci", "publicado"] },
|
|
2468
|
+
verdict: { type: "string", enum: ["APROVADO", "REPROVADO"] },
|
|
2469
|
+
findings: { type: "string" },
|
|
2470
|
+
reviewedSha: { type: "string" },
|
|
2471
|
+
detail: { type: "string" },
|
|
2472
|
+
name: { type: "string", enum: ["predispatch", "vaga", "salvo", "qa-modelo", "cabeca", "delecoes", "mergeado", "release"] },
|
|
2473
|
+
phase: { type: "string", description: "approve: the phase whose human gate is answered" },
|
|
2474
|
+
decision: { type: "string", enum: ["approve", "reject"] },
|
|
2475
|
+
note: { type: "string" },
|
|
2476
|
+
reason: { type: "string", enum: ["dependencia", "pedido_de_bloqueio", "limite", "maquina", "externo", "fora_das_autorizacoes"] },
|
|
2477
|
+
text: { type: "string" },
|
|
2478
|
+
step: { type: "number" },
|
|
2479
|
+
patch: { type: "object" }
|
|
2480
|
+
},
|
|
2481
|
+
required: []
|
|
2482
|
+
}
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
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.',
|
|
2487
|
+
inputSchema: {
|
|
2488
|
+
type: "object",
|
|
2489
|
+
properties: {
|
|
2490
|
+
subtaskId: { type: "string" },
|
|
2491
|
+
prompt: { type: "string" },
|
|
2492
|
+
harness: { type: "string" },
|
|
2493
|
+
model: { type: "string" },
|
|
2494
|
+
effort: { type: "string" },
|
|
2495
|
+
account: { type: "string" },
|
|
2496
|
+
cwd: { type: "string" },
|
|
2497
|
+
versionTarget: { type: "string" },
|
|
2498
|
+
pedidoId: { type: "string" }
|
|
2499
|
+
},
|
|
2500
|
+
required: ["subtaskId"]
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2441
2503
|
{
|
|
2442
2504
|
name: "agentistics_session_groups",
|
|
2443
2505
|
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).',
|
|
@@ -2544,7 +2606,7 @@ var TOOLS = [
|
|
|
2544
2606
|
},
|
|
2545
2607
|
{
|
|
2546
2608
|
name: "agentistics_session_away",
|
|
2547
|
-
description:
|
|
2609
|
+
description: 'Read or switch AUTONOMOUS MODE, or send the owner a notice while autonomous — the fleet works on its own, without asking permission or questions (the owner may be asleep or travelling). While it is on, every new session is born in the no-questions approval mode unless its caller names a mode. 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. `schedule` makes it SCHEDULED instead of open-ended: `{enabled:true, days:{mon:{windows:[{from:"09:00",to:"18:00"}]}, tue:{windows:[],allDay:true}}}` (local clock, weekdays mon…sun, hour windows per day, `allDay` = whole day) — it is on only inside those windows. Omitted `authorised` = all three. `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 autonomous 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.',
|
|
2548
2610
|
inputSchema: {
|
|
2549
2611
|
type: "object",
|
|
2550
2612
|
properties: {
|
|
@@ -2552,8 +2614,9 @@ var TOOLS = [
|
|
|
2552
2614
|
until: { type: "string", description: "ISO instant the autonomous period ends. Omit for 'until I turn it off'." },
|
|
2553
2615
|
authorised: { type: "array", items: { type: "string", enum: ["releases", "workers", "merges"] } },
|
|
2554
2616
|
note: { type: "string", description: "Free text from the owner (max 500 chars)." },
|
|
2555
|
-
|
|
2556
|
-
|
|
2617
|
+
schedule: { type: "object", description: "Optional agenda: {enabled:true, days:{<mon|tue|wed|thu|fri|sat|sun>:{windows:[{from:'HH:MM',to:'HH:MM'}], allDay?:true}}}. Autonomous mode is on only inside the windows (machine-local time; to<=from crosses midnight). Omit for 'until I turn it off'." },
|
|
2618
|
+
maxWorkers: { type: "number", description: "Ceiling of worker sessions at once while autonomous (default 4)." },
|
|
2619
|
+
topCaps: { type: "object", additionalProperties: { type: "number" }, description: "Per provider (harness id → number): ceiling of workers on that provider's top model tier at once (Opus, top GPT tier, Gemini Pro, …). A provider with no entry gets 1." },
|
|
2557
2620
|
target: { type: "string", description: "A session's managed id or conversation id: switch only that session's own autonomous mode (with `on`)." },
|
|
2558
2621
|
notice: { type: "string", description: "While autonomous: a warning or decision that cannot wait, sent to the owner's bell/Nay as a notice (max 500 chars) instead of a question that blocks your turn. Leaders only; ignores the other fields." }
|
|
2559
2622
|
},
|
|
@@ -3011,6 +3074,36 @@ async function callTool(req) {
|
|
|
3011
3074
|
const body = await apiSend("DELETE", `/api/tasks/${encodeURIComponent(ref)}`);
|
|
3012
3075
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3013
3076
|
}
|
|
3077
|
+
case "agentistics_task_phase": {
|
|
3078
|
+
const a = args ?? {};
|
|
3079
|
+
const action = typeof a.action === "string" ? a.action : "get";
|
|
3080
|
+
if (action === "get") {
|
|
3081
|
+
const body = a.subtaskId ? await apiGet(`/api/deliveries/${encodeURIComponent(String(a.subtaskId))}`) : await apiGet("/api/deliveries");
|
|
3082
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3083
|
+
}
|
|
3084
|
+
if (typeof a.subtaskId !== "string" || !a.subtaskId)
|
|
3085
|
+
throw new Error("subtaskId is required");
|
|
3086
|
+
const { subtaskId, action: _a, ...rest } = a;
|
|
3087
|
+
const body = await apiSend("POST", `/api/deliveries/${encodeURIComponent(subtaskId)}`, { ...rest, action, ...action === "approve" ? {} : { session: sessionProof(process.env) } });
|
|
3088
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3089
|
+
}
|
|
3090
|
+
case "agentistics_task_stage": {
|
|
3091
|
+
const a = args ?? {};
|
|
3092
|
+
if (typeof a.subtaskId !== "string" || !a.subtaskId)
|
|
3093
|
+
throw new Error("subtaskId is required");
|
|
3094
|
+
const draft = {};
|
|
3095
|
+
for (const k of ["prompt", "harness", "model", "effort", "account", "cwd"])
|
|
3096
|
+
if (typeof a[k] === "string" && a[k].trim())
|
|
3097
|
+
draft[k] = a[k];
|
|
3098
|
+
const body = await apiSend("POST", `/api/deliveries/${encodeURIComponent(a.subtaskId)}`, {
|
|
3099
|
+
action: "stage",
|
|
3100
|
+
draft,
|
|
3101
|
+
session: sessionProof(process.env),
|
|
3102
|
+
...typeof a.versionTarget === "string" ? { versionTarget: a.versionTarget } : {},
|
|
3103
|
+
...typeof a.pedidoId === "string" ? { pedidoId: a.pedidoId } : {}
|
|
3104
|
+
});
|
|
3105
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
3106
|
+
}
|
|
3014
3107
|
case "agentistics_session_groups": {
|
|
3015
3108
|
const body = await apiGet("/api/session-groups");
|
|
3016
3109
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
@@ -3090,6 +3183,7 @@ async function callTool(req) {
|
|
|
3090
3183
|
const body = await apiSend("PUT", "/api/away", {
|
|
3091
3184
|
on: a.on,
|
|
3092
3185
|
...a.until !== undefined ? { until: a.until } : {},
|
|
3186
|
+
...a.schedule !== undefined ? { schedule: a.schedule } : {},
|
|
3093
3187
|
...a.authorised !== undefined ? { authorised: a.authorised } : {},
|
|
3094
3188
|
...a.note !== undefined ? { note: a.note } : {},
|
|
3095
3189
|
...a.maxWorkers !== undefined ? { maxWorkers: a.maxWorkers } : {},
|
package/package.json
CHANGED