@agentistics/mcp 2.97.0 → 2.99.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 +107 -12
- package/package.json +1 -1
package/dist/agentistics-mcp.js
CHANGED
|
@@ -754,6 +754,13 @@ var AGENT_TOOL_POLICY = {
|
|
|
754
754
|
routes: ["DELETE /api/tasks/statuses/:id", "POST /api/tasks/statuses/:id", "POST /api/tasks/statuses"],
|
|
755
755
|
reason: "status vocabulary is configuration; the server refuses to remove a protected status (§3.5)"
|
|
756
756
|
},
|
|
757
|
+
agentistics_task_types: { ...TASKS, risk: "R", routes: ["GET /api/tasks/types"], reason: "reads the type vocabulary" },
|
|
758
|
+
agentistics_task_type_edit: {
|
|
759
|
+
...TASKS,
|
|
760
|
+
risk: "W",
|
|
761
|
+
routes: ["DELETE /api/tasks/types/:id", "POST /api/tasks/types/:id", "POST /api/tasks/types"],
|
|
762
|
+
reason: "type vocabulary is configuration; the server refuses to remove a type still in use"
|
|
763
|
+
},
|
|
757
764
|
agentistics_task_comment: { ...TASKS, risk: "W", routes: ["POST /api/tasks/:ref/comments"], reason: "appends a note; additive, destroys nothing" },
|
|
758
765
|
agentistics_task_subtask: { ...TASKS, risk: "W", routes: ["POST /api/tasks/:ref/subtasks"], reason: "adds or edits a subtask; reversible by another edit" },
|
|
759
766
|
agentistics_task_link: { ...TASKS, risk: "W", routes: ["POST /api/tasks/:ref/links"], reason: "adds or removes a link; reversible by the inverse call" },
|
|
@@ -787,6 +794,12 @@ var AGENT_TOOL_POLICY = {
|
|
|
787
794
|
],
|
|
788
795
|
reason: "folders are labels: deleting one ungroups its sessions and touches no session (§5 defect 3: W, not D)"
|
|
789
796
|
},
|
|
797
|
+
agentistics_session_notify: {
|
|
798
|
+
...GROUPS,
|
|
799
|
+
risk: "W",
|
|
800
|
+
routes: ["POST /api/session-notify"],
|
|
801
|
+
reason: "a per-session on/off switch for delivery; reversible, and the session state is untouched"
|
|
802
|
+
},
|
|
790
803
|
agentistics_summary: { ...DATA, risk: "R", routes: ["GET /api/data"], reason: "reads computed metrics" },
|
|
791
804
|
agentistics_harnesses: { ...DATA, risk: "R", routes: ["GET /api/data"], reason: "reads computed metrics per harness" },
|
|
792
805
|
agentistics_projects: { ...DATA, risk: "R", routes: ["GET /api/data"], reason: "reads computed metrics per project" },
|
|
@@ -1092,6 +1105,21 @@ function createAgentAuditSink(opts = {}) {
|
|
|
1092
1105
|
};
|
|
1093
1106
|
}
|
|
1094
1107
|
|
|
1108
|
+
// task-comment-args.ts
|
|
1109
|
+
function taskCommentRequest(args) {
|
|
1110
|
+
const a = args ?? {};
|
|
1111
|
+
const subtaskId = typeof a.subtaskId === "string" && a.subtaskId.trim() ? a.subtaskId.trim() : undefined;
|
|
1112
|
+
return {
|
|
1113
|
+
path: `/api/tasks/${encodeURIComponent(String(a.ref))}/comments`,
|
|
1114
|
+
payload: {
|
|
1115
|
+
body: typeof a.body === "string" ? a.body : "",
|
|
1116
|
+
author: typeof a.author === "string" && a.author ? a.author : "assistant",
|
|
1117
|
+
...subtaskId ? { subtaskId } : {},
|
|
1118
|
+
...Array.isArray(a.attachments) && a.attachments.length > 0 ? { attachments: a.attachments } : {}
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1095
1123
|
// agentistics-mcp.ts
|
|
1096
1124
|
var API = process.env.AGENTISTICS_API ?? "http://localhost:47291";
|
|
1097
1125
|
var HARNESS_PARAM = harnessParam();
|
|
@@ -1205,7 +1233,7 @@ var TOOLS = [
|
|
|
1205
1233
|
},
|
|
1206
1234
|
{
|
|
1207
1235
|
name: "agentistics_task",
|
|
1208
|
-
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Open ONE task: its attempts (one per configuration tried), the sessions filed under it with their live state, its comments, subtasks, files, links and full metrics (models, harnesses, agent runs, tokens, delivery time). `ref` is the task id or its exact title.",
|
|
1236
|
+
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Open ONE task: its attempts (one per configuration tried), the sessions filed under it with their live state, its comments, subtasks, files, links and full metrics (models, harnesses, agent runs, tokens, delivery time). Comments come twice: `comments` (flat, oldest first, each with `subtaskId` when it was left on a subtask or group) and `commentThreads` — the same comments grouped by their OWN target (`target: {kind: 'task'|'group'|'subtask', id, title}`; the task first, empty targets omitted). `ref` is the task id or its exact title.",
|
|
1209
1237
|
inputSchema: {
|
|
1210
1238
|
type: "object",
|
|
1211
1239
|
properties: { ref: { type: "string", description: "Task id or exact title." } },
|
|
@@ -1251,6 +1279,25 @@ var TOOLS = [
|
|
|
1251
1279
|
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. List every status this board currently has (id, label, color, and whether it is protected — todo/in_progress/blocked/done can never be deleted or have their id changed, but their label and color can). Call this before agentistics_task_status if you are not sure a status you want to move a task to actually exists.",
|
|
1252
1280
|
inputSchema: { type: "object", properties: {} }
|
|
1253
1281
|
},
|
|
1282
|
+
{
|
|
1283
|
+
name: "agentistics_task_types",
|
|
1284
|
+
description: "BETA — Agentask (the task board) is new and still changing. List the task TYPE vocabulary (id, label, color, order, usageCount). A type is a second classification beside the status (e.g. CORE); a task may carry one or none. Call this before setting `type` through agentistics_task_edit.",
|
|
1285
|
+
inputSchema: { type: "object", properties: {} }
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
name: "agentistics_task_type_edit",
|
|
1289
|
+
description: "BETA — Agentask (the task board) is new and still changing. Add, rename/recolor, or delete a task type. Pass `label` (and optional `color`, a `#rrggbb` hex string) alone to CREATE a type — its id is derived from the label. Pass `id` with `label` and/or `color` to EDIT. Pass `id` with `remove: true` to DELETE: refused (422, `in_use`, with `usageCount`) while any task still carries it.",
|
|
1290
|
+
inputSchema: {
|
|
1291
|
+
type: "object",
|
|
1292
|
+
properties: {
|
|
1293
|
+
id: { type: "string", description: "Required to edit or delete; omit to create." },
|
|
1294
|
+
label: { type: "string" },
|
|
1295
|
+
color: { type: "string", description: "#rrggbb" },
|
|
1296
|
+
remove: { type: "boolean" }
|
|
1297
|
+
},
|
|
1298
|
+
required: []
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1254
1301
|
{
|
|
1255
1302
|
name: "agentistics_task_status_edit",
|
|
1256
1303
|
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Add, rename/recolor, or delete a status. Pass `label` (and optional `color`, a `#rrggbb` hex string) alone to CREATE a new, non-protected status — its id is derived from the label and returned. Pass `id` with `label` and/or `color` to EDIT an existing status's label/color — works on a protected one too, only its id can never change. Pass `id` with `remove: true` to DELETE it: refused (422, `protected`) for todo/in_progress/blocked/done regardless of usage, and refused (422, `in_use`, with `usageCount`) for any other status still referenced by at least one task or subtask.",
|
|
@@ -1266,11 +1313,24 @@ var TOOLS = [
|
|
|
1266
1313
|
},
|
|
1267
1314
|
{
|
|
1268
1315
|
name: "agentistics_task_comment",
|
|
1269
|
-
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Leave a comment on a task. Use it to tell the person and the other assistants what you did, what you found, or what you are blocked on. `author` is free text — say who you are (e.g. 'claude:3f5f').",
|
|
1316
|
+
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Leave a comment on a task — or on ONE of its subtasks or subtask GROUPS by passing `subtaskId` (a group's own id is allowed; omit it to comment on the task itself). `body` may be empty when `attachments` is given. Comments carry attachments as REFERENCES into the chat's own attachment store (`{name, path}`; agentistics_task returns them on each comment with a `url` that serves the file) — there is no second store. Use it to tell the person and the other assistants what you did, what you found, or what you are blocked on; comment where the work is (the subtask you are on) rather than on the whole task. An unknown, deleted or other task's `subtaskId` is REFUSED with a sentence (422, `no_such_subtask` / `wrong_delivery`) — never silently filed on the task. Threads read downward: a subtask's thread is its own comments, a group's thread is its own plus its members', the task's is everything. The activity log names the target. `author` is free text — say who you are (e.g. 'claude:3f5f').",
|
|
1270
1317
|
inputSchema: {
|
|
1271
1318
|
type: "object",
|
|
1272
|
-
properties: {
|
|
1273
|
-
|
|
1319
|
+
properties: {
|
|
1320
|
+
ref: { type: "string" },
|
|
1321
|
+
body: { type: "string" },
|
|
1322
|
+
author: { type: "string" },
|
|
1323
|
+
subtaskId: {
|
|
1324
|
+
type: "string",
|
|
1325
|
+
description: "Optional target: a subtask or subtask GROUP id of this task (from agentistics_task's `subtasks`). Omit for the task itself."
|
|
1326
|
+
},
|
|
1327
|
+
attachments: {
|
|
1328
|
+
type: "array",
|
|
1329
|
+
description: "Optional files left with the comment, as {name, path} references to files already in agentop's attachments directory (the path the chat upload returns). Paths outside it are dropped. At most 10.",
|
|
1330
|
+
items: { type: "object", properties: { name: { type: "string" }, path: { type: "string" } }, required: ["path"] }
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
required: ["ref"]
|
|
1274
1334
|
}
|
|
1275
1335
|
},
|
|
1276
1336
|
{
|
|
@@ -1374,14 +1434,15 @@ var TOOLS = [
|
|
|
1374
1434
|
},
|
|
1375
1435
|
{
|
|
1376
1436
|
name: "agentistics_task_edit",
|
|
1377
|
-
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Set a task's fields: `title`, `detail`, `priority` (urgent | high | medium | low
|
|
1437
|
+
description: "BETA — Agentask (the task board) is new and still changing; its shapes may move between releases. Set a task's fields: `title`, `detail`, `priority` (urgent | high | medium | low), `type` (an id from agentistics_task_types; empty string clears it), `dueDate` / `startDate` (yyyy-mm-dd), `labels`. An absent field is left alone; an EMPTY STRING clears it. `priority` defaults to `low`; a legacy `none` is stored as `low`. `startedAt`/`deliveredAt` are system-stamped facts and are never set through this tool. Pass `actor` so the change is recorded against you in the activity log.",
|
|
1378
1438
|
inputSchema: {
|
|
1379
1439
|
type: "object",
|
|
1380
1440
|
properties: {
|
|
1381
1441
|
ref: { type: "string" },
|
|
1382
1442
|
title: { type: "string" },
|
|
1383
1443
|
detail: { type: "string" },
|
|
1384
|
-
priority: { type: "string", enum: ["urgent", "high", "medium", "low"
|
|
1444
|
+
priority: { type: "string", enum: ["urgent", "high", "medium", "low"] },
|
|
1445
|
+
type: { type: "string", description: "A task type id (see agentistics_task_types); empty string clears it." },
|
|
1385
1446
|
dueDate: { type: "string" },
|
|
1386
1447
|
startDate: { type: "string" },
|
|
1387
1448
|
labels: { type: "array", items: { type: "string" } },
|
|
@@ -1458,6 +1519,18 @@ var TOOLS = [
|
|
|
1458
1519
|
required: ["action"]
|
|
1459
1520
|
}
|
|
1460
1521
|
},
|
|
1522
|
+
{
|
|
1523
|
+
name: "agentistics_session_notify",
|
|
1524
|
+
description: "Switch a session's notifications on or off, or read the switch. `ref` is a managed id, a conversation id, an exact title or a unique id prefix. With `notify` ('on' | 'off') it sets the switch; with `ref` alone it reads it. Muting removes the INTERRUPTION only (bell, Nay card, sound, desktop toast, peer message): the session still shows as waiting and its events are still recorded in the inbox. The mute follows the conversation, so it survives a reopen. 404 for a ref that matches nothing, 409 for an ambiguous one.",
|
|
1525
|
+
inputSchema: {
|
|
1526
|
+
type: "object",
|
|
1527
|
+
properties: {
|
|
1528
|
+
ref: { type: "string", description: "A session reference." },
|
|
1529
|
+
notify: { type: "string", enum: ["on", "off"], description: "Set the switch. Omit to read it." }
|
|
1530
|
+
},
|
|
1531
|
+
required: ["ref"]
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1461
1534
|
{
|
|
1462
1535
|
name: "agentistics_summary",
|
|
1463
1536
|
description: "Get an overview of AI coding usage metrics (across all tracked harnesses — Claude Code, Codex, Gemini, Copilot, Antigravity — or scoped to one): total tokens, estimated cost, sessions, streak, most used model, and top project. Good starting point for any metrics question.",
|
|
@@ -1717,6 +1790,24 @@ async function callTool(req) {
|
|
|
1717
1790
|
const body = await apiGet("/api/tasks/statuses");
|
|
1718
1791
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1719
1792
|
}
|
|
1793
|
+
case "agentistics_task_types": {
|
|
1794
|
+
const body = await apiGet("/api/tasks/types");
|
|
1795
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1796
|
+
}
|
|
1797
|
+
case "agentistics_task_type_edit": {
|
|
1798
|
+
const a = args;
|
|
1799
|
+
const id = typeof a?.id === "string" && a.id ? a.id : null;
|
|
1800
|
+
if (id && a?.remove === true) {
|
|
1801
|
+
const body = await apiSend("DELETE", `/api/tasks/types/${encodeURIComponent(id)}`);
|
|
1802
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1803
|
+
}
|
|
1804
|
+
const payload = {
|
|
1805
|
+
...typeof a?.label === "string" ? { label: a.label } : {},
|
|
1806
|
+
...typeof a?.color === "string" ? { color: a.color } : {}
|
|
1807
|
+
};
|
|
1808
|
+
const body = id ? await apiSend("POST", `/api/tasks/types/${encodeURIComponent(id)}`, payload) : await apiSend("POST", "/api/tasks/types", payload);
|
|
1809
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1810
|
+
}
|
|
1720
1811
|
case "agentistics_task_status_edit": {
|
|
1721
1812
|
const a = args;
|
|
1722
1813
|
const id = typeof a?.id === "string" && a.id ? a.id : null;
|
|
@@ -1732,11 +1823,7 @@ async function callTool(req) {
|
|
|
1732
1823
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1733
1824
|
}
|
|
1734
1825
|
case "agentistics_task_comment": {
|
|
1735
|
-
const
|
|
1736
|
-
const body = await apiSend("POST", `/api/tasks/${encodeURIComponent(String(a?.ref))}/comments`, {
|
|
1737
|
-
body: a?.body,
|
|
1738
|
-
author: a?.author ?? "assistant"
|
|
1739
|
-
});
|
|
1826
|
+
const body = await apiSend("POST", `/api/tasks/${encodeURIComponent(String(args?.ref))}/comments`, taskCommentRequest(args).payload);
|
|
1740
1827
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1741
1828
|
}
|
|
1742
1829
|
case "agentistics_task_subtask": {
|
|
@@ -1799,7 +1886,7 @@ async function callTool(req) {
|
|
|
1799
1886
|
const a = args;
|
|
1800
1887
|
const ref = encodeURIComponent(String(a?.ref ?? ""));
|
|
1801
1888
|
const patch = {};
|
|
1802
|
-
for (const f of ["title", "detail", "priority", "dueDate", "startDate", "actor"]) {
|
|
1889
|
+
for (const f of ["title", "detail", "priority", "type", "dueDate", "startDate", "actor"]) {
|
|
1803
1890
|
if (typeof a?.[f] === "string")
|
|
1804
1891
|
patch[f] = a[f];
|
|
1805
1892
|
}
|
|
@@ -1864,6 +1951,14 @@ async function callTool(req) {
|
|
|
1864
1951
|
}
|
|
1865
1952
|
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1866
1953
|
}
|
|
1954
|
+
case "agentistics_session_notify": {
|
|
1955
|
+
const a = args;
|
|
1956
|
+
const body = await apiSend("POST", "/api/session-notify", {
|
|
1957
|
+
ref: a?.ref,
|
|
1958
|
+
...a?.notify !== undefined ? { notify: a.notify } : {}
|
|
1959
|
+
});
|
|
1960
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
1961
|
+
}
|
|
1867
1962
|
case "agentistics_summary": {
|
|
1868
1963
|
const harness = args?.harness;
|
|
1869
1964
|
const unified = !harness || harness === "all";
|