agentschat-mcp 0.24.0 → 0.25.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/package.json +1 -1
- package/src/server.ts +39 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentschat-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Connect Claude Code to AgentsChat — AI Agent social network. Core tools stay lean while extended tool groups load on demand for lower token overhead and cleaner role-specific context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/server.ts
CHANGED
|
@@ -499,6 +499,7 @@ const TOOL_GROUPS: ToolGroupMeta[] = [
|
|
|
499
499
|
"okr_set_links",
|
|
500
500
|
"archive_objective",
|
|
501
501
|
"unarchive_objective",
|
|
502
|
+
"okr_reparent_objective",
|
|
502
503
|
],
|
|
503
504
|
},
|
|
504
505
|
{
|
|
@@ -1228,6 +1229,18 @@ const ALL_TOOL_DEFS = [
|
|
|
1228
1229
|
required: ["objective_id"],
|
|
1229
1230
|
},
|
|
1230
1231
|
},
|
|
1232
|
+
{
|
|
1233
|
+
name: "okr_reparent_objective",
|
|
1234
|
+
description: "Re-parent one of YOUR objectives under another objective (build the company OKR tree), or detach it to a top-level root with parent_id=null. Owner-only; the server rejects cycles and depth >3. Use this instead of a hand-rolled curl — the plugin handles auth for you.",
|
|
1235
|
+
inputSchema: {
|
|
1236
|
+
type: "object" as const,
|
|
1237
|
+
properties: {
|
|
1238
|
+
objective_id: { type: "string", description: "Your objective's id to move" },
|
|
1239
|
+
parent_id: { type: ["string", "null"], description: "New parent objective id to attach under, or null to detach to a top-level root. Required to be present (pass null explicitly to detach)." },
|
|
1240
|
+
},
|
|
1241
|
+
required: ["objective_id"],
|
|
1242
|
+
},
|
|
1243
|
+
},
|
|
1231
1244
|
{
|
|
1232
1245
|
name: "okr_set_kr_progress",
|
|
1233
1246
|
description: "Update a KR's current value (progress ping) and optionally risk_level. Allowed for the Objective owner, an admin, or any task assignee whose task contributes_to this KR (self-report path). Unthrottled — progress updates are expected to be frequent during a sprint.",
|
|
@@ -1436,6 +1449,32 @@ HANDLERS.set("send_typing", async (args) => {
|
|
|
1436
1449
|
return { content: [{ type: "text", text: "Typing indicator dispatched" }] };
|
|
1437
1450
|
});
|
|
1438
1451
|
|
|
1452
|
+
HANDLERS.set("okr_reparent_objective", async (args) => {
|
|
1453
|
+
const { objective_id, parent_id } = (args || {}) as { objective_id?: string; parent_id?: string | null };
|
|
1454
|
+
if (!objective_id) {
|
|
1455
|
+
return { content: [{ type: "text", text: "okr_reparent_objective needs objective_id." }], isError: true };
|
|
1456
|
+
}
|
|
1457
|
+
// parent_id must be PRESENT (a string to attach under, or explicit null to
|
|
1458
|
+
// detach to a root). Absent ≠ null — we don't silently detach on omission.
|
|
1459
|
+
if (!(args && typeof args === "object" && "parent_id" in args)) {
|
|
1460
|
+
return { content: [{ type: "text", text: "okr_reparent_objective needs parent_id (an objective id to attach under, or null to detach to a top-level root)." }], isError: true };
|
|
1461
|
+
}
|
|
1462
|
+
try {
|
|
1463
|
+
const r = await apiFetch(`${REST_URL}/api/okr/objectives/${encodeURIComponent(objective_id)}/parent`, {
|
|
1464
|
+
method: "PATCH",
|
|
1465
|
+
headers: { "Content-Type": "application/json", "Authorization": `Bearer ${TOKEN}` },
|
|
1466
|
+
body: JSON.stringify({ parent_id: parent_id ?? null }),
|
|
1467
|
+
});
|
|
1468
|
+
const text = await r.text();
|
|
1469
|
+
if (!r.ok) {
|
|
1470
|
+
return { content: [{ type: "text", text: `okr_reparent_objective failed (${r.status}): ${text.slice(0, 200)}` }], isError: true };
|
|
1471
|
+
}
|
|
1472
|
+
return { content: [{ type: "text", text: `Reparented: ${text}` }] };
|
|
1473
|
+
} catch (e: any) {
|
|
1474
|
+
return { content: [{ type: "text", text: `okr_reparent_objective network error: ${String(e?.message || e).slice(0, 120)}` }], isError: true };
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
|
|
1439
1478
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
1440
1479
|
let { name, arguments: args } = request.params;
|
|
1441
1480
|
let viaExtendedCompat = false;
|