@kynver-app/mcp-agent-os 0.3.26 → 0.3.28
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.
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Command Center MCP tools — unified rollup for AgentOS operators.
|
|
3
3
|
*
|
|
4
|
-
* agent_os_command_center_get proxies to GET `/api/agent-os/by-id/{agentOsId}/command-center
|
|
5
|
-
*
|
|
4
|
+
* agent_os_command_center_get proxies to GET `/api/agent-os/by-id/{agentOsId}/command-center`
|
|
5
|
+
* (full rollup; `countSnapshot` is the canonical badge contract aligned with the UI).
|
|
6
|
+
*
|
|
7
|
+
* agent_os_command_center_dashboard_contract_get proxies to
|
|
8
|
+
* `.../command-center/dashboard-contract` — slim verification payload (counts,
|
|
9
|
+
* packageVersionHealth, runtime capacity, activePlanRollups) without graph/hierarchy.
|
|
6
10
|
*/
|
|
7
11
|
type ToolResult = {
|
|
8
12
|
content: {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Command Center MCP tools — unified rollup for AgentOS operators.
|
|
3
3
|
*
|
|
4
|
-
* agent_os_command_center_get proxies to GET `/api/agent-os/by-id/{agentOsId}/command-center
|
|
5
|
-
*
|
|
4
|
+
* agent_os_command_center_get proxies to GET `/api/agent-os/by-id/{agentOsId}/command-center`
|
|
5
|
+
* (full rollup; `countSnapshot` is the canonical badge contract aligned with the UI).
|
|
6
|
+
*
|
|
7
|
+
* agent_os_command_center_dashboard_contract_get proxies to
|
|
8
|
+
* `.../command-center/dashboard-contract` — slim verification payload (counts,
|
|
9
|
+
* packageVersionHealth, runtime capacity, activePlanRollups) without graph/hierarchy.
|
|
6
10
|
*/
|
|
7
11
|
import { z } from "zod";
|
|
8
12
|
import { get } from "../lib/kynver-client.js";
|
|
@@ -18,8 +22,12 @@ export function registerCommandCenterTools({ register, resolveToolSlug, jsonResu
|
|
|
18
22
|
register("agent_os_command_center_get", [
|
|
19
23
|
"Fetch the unified Command Center rollup for the AgentOS workspace:",
|
|
20
24
|
"plan rollups, project hierarchy, action-required items, DQ inbox, harness summaries,",
|
|
21
|
-
"prReadyNotifications (journal pr_ready events),
|
|
22
|
-
"
|
|
25
|
+
"prReadyNotifications (journal pr_ready events), dailyLandedPrs (journal merge counts:",
|
|
26
|
+
"today/yesterday, rolling 24h/48h, pace + agentReadable summary), runtime capacity, and",
|
|
27
|
+
"packageVersionHealth (managed npm alignment for @kynver-app/runtime).",
|
|
28
|
+
"Includes `countSnapshot` (canonical header-chip / saved-view / review-lane counts — same",
|
|
29
|
+
"contract the dashboard badges use). For a compact runtime verification payload without",
|
|
30
|
+
"operationalGraph/hierarchy, use agent_os_command_center_dashboard_contract_get.",
|
|
23
31
|
"Same aggregate as the browser Command Center. Omit slug to use env/primary workspace;",
|
|
24
32
|
"pass agentOsId when already known from a prior identity fetch.",
|
|
25
33
|
].join(" "), {
|
|
@@ -60,4 +68,40 @@ export function registerCommandCenterTools({ register, resolveToolSlug, jsonResu
|
|
|
60
68
|
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
61
69
|
return jsonResult(await get(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/command-center${suffix}`));
|
|
62
70
|
});
|
|
71
|
+
register("agent_os_command_center_dashboard_contract_get", [
|
|
72
|
+
"Fetch the slim Command Center dashboard contract for runtime verification:",
|
|
73
|
+
"countSnapshot, readiness, packageVersionHealth, runtime capacity, activePlanRollups,",
|
|
74
|
+
"and review-lane totals — same sources as the browser dashboard badges, without",
|
|
75
|
+
"operationalGraph or hierarchy payloads (avoids MCP truncation on large boards).",
|
|
76
|
+
].join(" "), {
|
|
77
|
+
slug: z
|
|
78
|
+
.string()
|
|
79
|
+
.optional()
|
|
80
|
+
.describe("AgentOS slug. Defaults to the configured env/primary AgentOS."),
|
|
81
|
+
agentOsId: z
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe("Optional AgentOS row id. When omitted, resolved from slug."),
|
|
85
|
+
since: z
|
|
86
|
+
.string()
|
|
87
|
+
.optional()
|
|
88
|
+
.describe("ISO timestamp — only include tasks updated after this instant."),
|
|
89
|
+
limit: z
|
|
90
|
+
.number()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe("Max tasks to load when building counts (server cap 10000)."),
|
|
93
|
+
}, async (args) => {
|
|
94
|
+
const slug = await resolveToolSlug(args.slug);
|
|
95
|
+
const agentOsId = typeof args.agentOsId === "string" && args.agentOsId.trim()
|
|
96
|
+
? args.agentOsId.trim()
|
|
97
|
+
: await resolveAgentOsId(slug);
|
|
98
|
+
const qs = new URLSearchParams();
|
|
99
|
+
if (typeof args.since === "string" && args.since.trim())
|
|
100
|
+
qs.set("since", args.since.trim());
|
|
101
|
+
if (typeof args.limit === "number" && Number.isFinite(args.limit)) {
|
|
102
|
+
qs.set("limit", String(args.limit));
|
|
103
|
+
}
|
|
104
|
+
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
105
|
+
return jsonResult(await get(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/command-center/dashboard-contract${suffix}`));
|
|
106
|
+
});
|
|
63
107
|
}
|
|
@@ -57,6 +57,29 @@ export function registerMemoryQualityFeedbackTools({ register, resolveToolSlug,
|
|
|
57
57
|
const { slug: _slug, ...body } = args;
|
|
58
58
|
return jsonResult(await post(`/agent-os/${encodeURIComponent(s)}/memory/quality-feedback`, compact(body)));
|
|
59
59
|
});
|
|
60
|
+
register("agent_os_memory_quality_consent_get", [
|
|
61
|
+
"Get L2 aggregate learning consent for the AgentOS workspace.",
|
|
62
|
+
"Operator access required (owner or admin). L1 private learning is always on; L2 requires explicit opt-in.",
|
|
63
|
+
].join(" "), {
|
|
64
|
+
slug: z.string().optional().describe("AgentOS slug. Defaults to configured primary."),
|
|
65
|
+
}, async (args) => {
|
|
66
|
+
const s = await resolveToolSlug(args.slug);
|
|
67
|
+
return jsonResult(await get(`/agent-os/${encodeURIComponent(s)}/memory/quality-feedback/consent`));
|
|
68
|
+
});
|
|
69
|
+
register("agent_os_memory_quality_consent_set", [
|
|
70
|
+
"Transition L2 aggregate learning consent (request | grant | revoke | reset).",
|
|
71
|
+
"Operator access required. Grant enables de-identified aggregate export; revoke purges exported signals.",
|
|
72
|
+
].join(" "), {
|
|
73
|
+
action: z
|
|
74
|
+
.enum(["request", "grant", "revoke", "reset"])
|
|
75
|
+
.describe("Consent state-machine action."),
|
|
76
|
+
slug: z.string().optional().describe("AgentOS slug. Defaults to configured primary."),
|
|
77
|
+
}, async (args) => {
|
|
78
|
+
const s = await resolveToolSlug(args.slug);
|
|
79
|
+
return jsonResult(await post(`/agent-os/${encodeURIComponent(s)}/memory/quality-feedback/consent`, {
|
|
80
|
+
action: args.action,
|
|
81
|
+
}));
|
|
82
|
+
});
|
|
60
83
|
register("agent_os_memory_quality_status_get", [
|
|
61
84
|
"List recent memory quality feedback events for the AgentOS workspace.",
|
|
62
85
|
"Operator access required (owner or admin).",
|
|
@@ -28,6 +28,8 @@ export function registerOperatingRulesTools(deps) {
|
|
|
28
28
|
const qs = new URLSearchParams();
|
|
29
29
|
if (args.personaSlug?.trim())
|
|
30
30
|
qs.set("personaSlug", args.personaSlug.trim());
|
|
31
|
+
if (args.planId?.trim())
|
|
32
|
+
qs.set("planId", args.planId.trim());
|
|
31
33
|
if (args.includeMarkdown)
|
|
32
34
|
qs.set("includeMarkdown", "1");
|
|
33
35
|
const suffix = qs.toString() ? `?${qs}` : "";
|
package/dist/tools/tasks.js
CHANGED
|
@@ -30,8 +30,14 @@ const taskPriority = z
|
|
|
30
30
|
.describe("Priority — default 'normal'. Create coding/implementation tasks as 'normal' (routine/cleanup 'low'); " +
|
|
31
31
|
"do NOT inherit the parent plan's priority — a task on a critical plan is still 'normal'. A task only " +
|
|
32
32
|
"becomes 'critical' once it is actively BLOCKING progress (and the system already marks blocked tasks " +
|
|
33
|
-
"critical automatically). Reserve manual 'high'/'critical'
|
|
34
|
-
"
|
|
33
|
+
"critical automatically). Reserve manual 'high'/'critical' only when Will explicitly asked or there is a " +
|
|
34
|
+
"live production/security incident — pass priorityEscalationReason quoting him or the incident. The server " +
|
|
35
|
+
"downgrades unsolicited high/critical to normal. If everything is critical, nothing is — keep most tasks at normal/low.");
|
|
36
|
+
const priorityEscalationReason = z
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("Required when setting priority to high/critical: quote Will's words or name the live incident. " +
|
|
40
|
+
"Without this (and without explicit escalation in title/description), the API coerces to normal.");
|
|
35
41
|
const taskExecutor = z.enum(["inline", "harness", "acp", "manual"]);
|
|
36
42
|
const taskEventType = z.enum([
|
|
37
43
|
"created",
|
|
@@ -70,6 +76,7 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
|
|
|
70
76
|
title: z.string().describe("Short task title (required)."),
|
|
71
77
|
description: z.string().optional(),
|
|
72
78
|
priority: taskPriority.optional(),
|
|
79
|
+
priorityEscalationReason,
|
|
73
80
|
executor: taskExecutor.optional().describe("How the task runs: inline | harness | acp | manual."),
|
|
74
81
|
executorRef: z.string().optional().describe("Opaque ref to the executor process / unit."),
|
|
75
82
|
parentTaskId: z.string().optional().describe("Parent task id when this is one of 2+ coordinated workers."),
|
package/package.json
CHANGED