@kynver-app/mcp-agent-os 0.3.68 → 0.3.71
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/index.js +3 -19
- package/dist/sse.js +3 -15
- package/dist/worker.js +2 -0
- package/package.json +5 -4
- package/dist/context/context-budget-receipt.d.ts +0 -9
- package/dist/context/context-budget-receipt.js +0 -34
- package/dist/index.d.ts +0 -7
- package/dist/lib/kynver-client.d.ts +0 -23
- package/dist/lib/kynver-client.js +0 -151
- package/dist/lib/mcp-json-result.d.ts +0 -12
- package/dist/lib/mcp-json-result.js +0 -30
- package/dist/lib/mcp-sse-server.d.ts +0 -44
- package/dist/lib/mcp-sse-server.js +0 -441
- package/dist/lib/package-version.d.ts +0 -7
- package/dist/lib/package-version.js +0 -44
- package/dist/server.d.ts +0 -11
- package/dist/server.js +0 -751
- package/dist/sse.d.ts +0 -1
- package/dist/tools/action-required.d.ts +0 -24
- package/dist/tools/action-required.js +0 -140
- package/dist/tools/cmo-control.d.ts +0 -20
- package/dist/tools/cmo-control.js +0 -26
- package/dist/tools/command-center.d.ts +0 -24
- package/dist/tools/command-center.js +0 -155
- package/dist/tools/context-expand.d.ts +0 -18
- package/dist/tools/context-expand.js +0 -26
- package/dist/tools/context-preview.d.ts +0 -14
- package/dist/tools/context-preview.js +0 -51
- package/dist/tools/current-focus.d.ts +0 -17
- package/dist/tools/current-focus.js +0 -126
- package/dist/tools/diagnostics.d.ts +0 -24
- package/dist/tools/diagnostics.js +0 -69
- package/dist/tools/graph.d.ts +0 -25
- package/dist/tools/graph.js +0 -153
- package/dist/tools/kariad-marketing-loop.d.ts +0 -21
- package/dist/tools/kariad-marketing-loop.js +0 -41
- package/dist/tools/kariad-outcome-import.d.ts +0 -17
- package/dist/tools/kariad-outcome-import.js +0 -37
- package/dist/tools/macro-controls.d.ts +0 -23
- package/dist/tools/macro-controls.js +0 -54
- package/dist/tools/memory-ledger.d.ts +0 -19
- package/dist/tools/memory-ledger.js +0 -48
- package/dist/tools/memory-quality-feedback.d.ts +0 -23
- package/dist/tools/memory-quality-feedback.js +0 -123
- package/dist/tools/memory-vault.d.ts +0 -21
- package/dist/tools/memory-vault.js +0 -24
- package/dist/tools/mesh-liveness.d.ts +0 -20
- package/dist/tools/mesh-liveness.js +0 -40
- package/dist/tools/monitor.d.ts +0 -17
- package/dist/tools/monitor.js +0 -51
- package/dist/tools/operating-rules.d.ts +0 -7
- package/dist/tools/operating-rules.js +0 -39
- package/dist/tools/plan-audit-rollup.d.ts +0 -19
- package/dist/tools/plan-audit-rollup.js +0 -49
- package/dist/tools/plan-progress.d.ts +0 -2
- package/dist/tools/plan-progress.js +0 -128
- package/dist/tools/plan-to-factory.d.ts +0 -2
- package/dist/tools/plan-to-factory.js +0 -23
- package/dist/tools/plans.d.ts +0 -29
- package/dist/tools/plans.js +0 -205
- package/dist/tools/pr-backlog.d.ts +0 -22
- package/dist/tools/pr-backlog.js +0 -43
- package/dist/tools/provider-evidence.d.ts +0 -23
- package/dist/tools/provider-evidence.js +0 -60
- package/dist/tools/skills.d.ts +0 -28
- package/dist/tools/skills.js +0 -79
- package/dist/tools/task-board-watchdog.d.ts +0 -20
- package/dist/tools/task-board-watchdog.js +0 -42
- package/dist/tools/taskflow.d.ts +0 -21
- package/dist/tools/taskflow.js +0 -124
- package/dist/tools/tasks.d.ts +0 -26
- package/dist/tools/tasks.js +0 -251
- package/dist/tools/workbench.d.ts +0 -17
- package/dist/tools/workbench.js +0 -178
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diagnostics MCP tool — agent-drivable read surface for the Visible
|
|
3
|
-
* Diagnostics registry (GET `/api/agent-os/by-id/{agentOsId}/diagnostics`).
|
|
4
|
-
*
|
|
5
|
-
* Gives the runtime agent the same end-to-end health report the Command
|
|
6
|
-
* Center Health tab renders: every registered check (dispatch-funnel,
|
|
7
|
-
* next-action-closed-loop, verify-live-health, …) with status, summary, and
|
|
8
|
-
* detail. The route accepts the daemon's harness-callback auth (runtime.read);
|
|
9
|
-
* humans are admin-gated server-side.
|
|
10
|
-
*/
|
|
11
|
-
type ToolResult = {
|
|
12
|
-
content: {
|
|
13
|
-
type: "text";
|
|
14
|
-
text: string;
|
|
15
|
-
}[];
|
|
16
|
-
structuredContent?: unknown;
|
|
17
|
-
};
|
|
18
|
-
export interface DiagnosticsToolDeps {
|
|
19
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
20
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
21
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
22
|
-
}
|
|
23
|
-
export declare function registerDiagnosticsTools({ register, resolveToolSlug, jsonResult, }: DiagnosticsToolDeps): void;
|
|
24
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diagnostics MCP tool — agent-drivable read surface for the Visible
|
|
3
|
-
* Diagnostics registry (GET `/api/agent-os/by-id/{agentOsId}/diagnostics`).
|
|
4
|
-
*
|
|
5
|
-
* Gives the runtime agent the same end-to-end health report the Command
|
|
6
|
-
* Center Health tab renders: every registered check (dispatch-funnel,
|
|
7
|
-
* next-action-closed-loop, verify-live-health, …) with status, summary, and
|
|
8
|
-
* detail. The route accepts the daemon's harness-callback auth (runtime.read);
|
|
9
|
-
* humans are admin-gated server-side.
|
|
10
|
-
*/
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
import { get } from "../lib/kynver-client.js";
|
|
13
|
-
async function resolveAgentOsId(slug) {
|
|
14
|
-
const row = await get(`/agent-os/${encodeURIComponent(slug)}`);
|
|
15
|
-
const id = typeof row.id === "string" ? row.id.trim() : "";
|
|
16
|
-
if (!id) {
|
|
17
|
-
throw new Error(`AgentOS slug "${slug}" did not resolve to an id. Pass agentOsId explicitly or ensure GET /api/agent-os/{slug} returns id.`);
|
|
18
|
-
}
|
|
19
|
-
return id;
|
|
20
|
-
}
|
|
21
|
-
export function registerDiagnosticsTools({ register, resolveToolSlug, jsonResult, }) {
|
|
22
|
-
register("agent_os_diagnostics", [
|
|
23
|
-
"Run the AgentOS Visible Diagnostics checks and return the structured health report",
|
|
24
|
-
"(overallStatus, criticalFailing, per-check status/summary/detail). Pass checkSlug to run",
|
|
25
|
-
"ONE check — e.g. `dispatch-funnel` for the last dispatch tick end-to-end (candidates",
|
|
26
|
-
"inspected, starts, skip reasons, top skipped task ids) or `next-action-closed-loop` for",
|
|
27
|
-
"lane-progression conversions. Pass list=true to enumerate registered checks without",
|
|
28
|
-
"running them. Read-only and safe for unattended invocation; use during verify_live to",
|
|
29
|
-
"confirm factory health without reading server logs.",
|
|
30
|
-
].join(" "), {
|
|
31
|
-
slug: z
|
|
32
|
-
.string()
|
|
33
|
-
.optional()
|
|
34
|
-
.describe("AgentOS slug. Defaults to the configured env/primary AgentOS."),
|
|
35
|
-
agentOsId: z
|
|
36
|
-
.string()
|
|
37
|
-
.optional()
|
|
38
|
-
.describe("Optional AgentOS row id. When omitted, resolved from slug."),
|
|
39
|
-
checkSlug: z
|
|
40
|
-
.string()
|
|
41
|
-
.optional()
|
|
42
|
-
.describe('Run a single named check (e.g. "dispatch-funnel").'),
|
|
43
|
-
category: z
|
|
44
|
-
.string()
|
|
45
|
-
.optional()
|
|
46
|
-
.describe('Filter the full report to one category: runtime | policy | data | integration | feature | configuration | security.'),
|
|
47
|
-
list: z
|
|
48
|
-
.boolean()
|
|
49
|
-
.optional()
|
|
50
|
-
.describe("List registered check metadata without running anything."),
|
|
51
|
-
}, async (args) => {
|
|
52
|
-
const slug = await resolveToolSlug(args.slug);
|
|
53
|
-
const agentOsId = typeof args.agentOsId === "string" && args.agentOsId.trim()
|
|
54
|
-
? args.agentOsId.trim()
|
|
55
|
-
: await resolveAgentOsId(slug);
|
|
56
|
-
const qs = new URLSearchParams();
|
|
57
|
-
if (typeof args.checkSlug === "string" && args.checkSlug.trim()) {
|
|
58
|
-
qs.set("slug", args.checkSlug.trim());
|
|
59
|
-
}
|
|
60
|
-
if (typeof args.category === "string" && args.category.trim()) {
|
|
61
|
-
qs.set("category", args.category.trim());
|
|
62
|
-
}
|
|
63
|
-
if (args.list)
|
|
64
|
-
qs.set("list", "1");
|
|
65
|
-
const suffix = qs.toString() ? `?${qs}` : "";
|
|
66
|
-
const payload = await get(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/diagnostics${suffix}`);
|
|
67
|
-
return jsonResult(payload);
|
|
68
|
-
});
|
|
69
|
-
}
|
package/dist/tools/graph.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Operational-graph MCP tools — "Agent SEE" (graph M6).
|
|
3
|
-
*
|
|
4
|
-
* agent_os_graph_query proxies to GET `/api/agent-os/{slug}/graph/query`, which
|
|
5
|
-
* returns server-computed insights (bottlenecks, per-owner load, orphans) over
|
|
6
|
-
* the operational graph. Read-only; the Kynver route enforces session +
|
|
7
|
-
* workspace scope. Kept in its own module so server.ts stays slim.
|
|
8
|
-
*
|
|
9
|
-
* agent_os_memory_graph_expand (PR10) proxies scoped memory-entity neighborhood
|
|
10
|
-
* expansion through the authenticated app route — handles/previews only.
|
|
11
|
-
*/
|
|
12
|
-
type ToolResult = {
|
|
13
|
-
content: {
|
|
14
|
-
type: "text";
|
|
15
|
-
text: string;
|
|
16
|
-
}[];
|
|
17
|
-
structuredContent?: unknown;
|
|
18
|
-
};
|
|
19
|
-
export interface GraphToolDeps {
|
|
20
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
21
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
22
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
23
|
-
}
|
|
24
|
-
export declare function registerGraphTools({ register, resolveToolSlug, jsonResult }: GraphToolDeps): void;
|
|
25
|
-
export {};
|
package/dist/tools/graph.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Operational-graph MCP tools — "Agent SEE" (graph M6).
|
|
3
|
-
*
|
|
4
|
-
* agent_os_graph_query proxies to GET `/api/agent-os/{slug}/graph/query`, which
|
|
5
|
-
* returns server-computed insights (bottlenecks, per-owner load, orphans) over
|
|
6
|
-
* the operational graph. Read-only; the Kynver route enforces session +
|
|
7
|
-
* workspace scope. Kept in its own module so server.ts stays slim.
|
|
8
|
-
*
|
|
9
|
-
* agent_os_memory_graph_expand (PR10) proxies scoped memory-entity neighborhood
|
|
10
|
-
* expansion through the authenticated app route — handles/previews only.
|
|
11
|
-
*/
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
import { get, post } from "../lib/kynver-client.js";
|
|
14
|
-
export function registerGraphTools({ register, resolveToolSlug, jsonResult }) {
|
|
15
|
-
register("agent_os_graph_query", [
|
|
16
|
-
"Read the operational graph's computed insights for the AgentOS:",
|
|
17
|
-
"top bottlenecks (highest downstream impact among still-active or blocked work),",
|
|
18
|
-
"per-owner load (who is carrying work and who is blocked), and orphaned tasks.",
|
|
19
|
-
"Use this to answer questions like 'what is my biggest bottleneck',",
|
|
20
|
-
"'what is blocking project X', 'what is <persona> working on', or 'what is unassigned'.",
|
|
21
|
-
"Read-only — modifies nothing. Returns { available, generatedAt, stats, insights }.",
|
|
22
|
-
].join(" "), {
|
|
23
|
-
slug: z
|
|
24
|
-
.string()
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("AgentOS slug. Defaults to the configured env/primary AgentOS."),
|
|
27
|
-
bottlenecks: z
|
|
28
|
-
.number()
|
|
29
|
-
.int()
|
|
30
|
-
.min(1)
|
|
31
|
-
.max(50)
|
|
32
|
-
.optional()
|
|
33
|
-
.describe("Max bottleneck rows to return (default 10)."),
|
|
34
|
-
owners: z
|
|
35
|
-
.number()
|
|
36
|
-
.int()
|
|
37
|
-
.min(1)
|
|
38
|
-
.max(50)
|
|
39
|
-
.optional()
|
|
40
|
-
.describe("Max per-owner load rows to return (default 12)."),
|
|
41
|
-
orphans: z
|
|
42
|
-
.number()
|
|
43
|
-
.int()
|
|
44
|
-
.min(1)
|
|
45
|
-
.max(100)
|
|
46
|
-
.optional()
|
|
47
|
-
.describe("Max orphan rows to return (default 25)."),
|
|
48
|
-
}, async (args) => {
|
|
49
|
-
const slug = await resolveToolSlug(args.slug);
|
|
50
|
-
const qs = new URLSearchParams();
|
|
51
|
-
if (args.bottlenecks !== undefined)
|
|
52
|
-
qs.set("bottlenecks", String(args.bottlenecks));
|
|
53
|
-
if (args.owners !== undefined)
|
|
54
|
-
qs.set("owners", String(args.owners));
|
|
55
|
-
if (args.orphans !== undefined)
|
|
56
|
-
qs.set("orphans", String(args.orphans));
|
|
57
|
-
const suffix = qs.toString() ? "?" + qs.toString() : "";
|
|
58
|
-
return jsonResult(await get(`/agent-os/${slug}/graph/query${suffix}`));
|
|
59
|
-
});
|
|
60
|
-
register("agent_os_graph_view", [
|
|
61
|
-
"Steer the human's open 3D web view (shared focus) — spotlight + fly the camera to a node, a SET",
|
|
62
|
-
"of nodes, or a whole goal constellation, filter, or reset, so you and the user are provably",
|
|
63
|
-
"looking at the same thing while you narrate.",
|
|
64
|
-
"kind=focus spotlights the target(s) and DIMS the rest (isolate); kind=highlight spotlights",
|
|
65
|
-
"WITHOUT dimming. Give exactly one of: nodeId (a single node, e.g. 'task:abc'), nodeIds (an",
|
|
66
|
-
"explicit set — 'frame these three bottlenecks'), or clusterId (the BARE goalId, NOT the",
|
|
67
|
-
"'goal:abc' node id — 'frame this whole goal'). An unrecognized target is dropped silently.",
|
|
68
|
-
"frameAll=false keeps the camera put (spotlight only, no fly). kind=filter sets which type/status",
|
|
69
|
-
"buckets are hidden; kind=reset clears focus + filters + spotlight.",
|
|
70
|
-
"Takes effect only while the user has the 3D Web tab open (delivered over SSE).",
|
|
71
|
-
"Requires Redis in multi-instance/serverless prod to fan out; single-instance dev works without it.",
|
|
72
|
-
].join(" "), {
|
|
73
|
-
slug: z.string().optional().describe("AgentOS slug. Defaults to env/primary."),
|
|
74
|
-
kind: z
|
|
75
|
-
.enum(["focus", "filter", "reset", "highlight"])
|
|
76
|
-
.describe("focus (spotlight + dim rest) | highlight (spotlight, no dim) | filter | reset."),
|
|
77
|
-
nodeId: z
|
|
78
|
-
.string()
|
|
79
|
-
.optional()
|
|
80
|
-
.describe("focus/highlight: a single target node id (e.g. 'task:abc123')."),
|
|
81
|
-
nodeIds: z
|
|
82
|
-
.array(z.string())
|
|
83
|
-
.optional()
|
|
84
|
-
.describe("focus/highlight: an explicit SET of node ids to frame together."),
|
|
85
|
-
clusterId: z
|
|
86
|
-
.string()
|
|
87
|
-
.optional()
|
|
88
|
-
.describe("focus/highlight: a whole goal constellation = the BARE goalId (the Goal entity id, " +
|
|
89
|
-
"e.g. 'abc'; the value in each node's web3d.constellation.goalId), NOT the prefixed " +
|
|
90
|
-
"'goal:abc' graph node id. An unknown id resolves to nothing (no-op)."),
|
|
91
|
-
frameAll: z
|
|
92
|
-
.boolean()
|
|
93
|
-
.optional()
|
|
94
|
-
.describe("focus/highlight: also fly the camera to frame the set (default true)."),
|
|
95
|
-
hiddenKinds: z
|
|
96
|
-
.array(z.string())
|
|
97
|
-
.optional()
|
|
98
|
-
.describe("For kind=filter: node kinds to hide (e.g. ['repo_file']). [] clears."),
|
|
99
|
-
hiddenStatuses: z
|
|
100
|
-
.array(z.string())
|
|
101
|
-
.optional()
|
|
102
|
-
.describe("For kind=filter: statuses to hide (e.g. ['done']). [] clears."),
|
|
103
|
-
}, async (args) => {
|
|
104
|
-
const slug = await resolveToolSlug(args.slug);
|
|
105
|
-
return jsonResult(await post(`/agent-os/${slug}/graph/view`, {
|
|
106
|
-
kind: args.kind,
|
|
107
|
-
nodeId: args.nodeId,
|
|
108
|
-
nodeIds: args.nodeIds,
|
|
109
|
-
clusterId: args.clusterId,
|
|
110
|
-
frameAll: args.frameAll,
|
|
111
|
-
hiddenKinds: args.hiddenKinds,
|
|
112
|
-
hiddenStatuses: args.hiddenStatuses,
|
|
113
|
-
source: "agent",
|
|
114
|
-
}));
|
|
115
|
-
});
|
|
116
|
-
register("agent_os_memory_graph_expand", [
|
|
117
|
-
"Expand a scoped memory-entity graph neighborhood from an opaque start handle.",
|
|
118
|
-
"Returns compact previews and expansion handles only — never raw entity IDs or full memory bodies.",
|
|
119
|
-
"Requires graph view + expansion security gates (scoped opt-in). Read-only.",
|
|
120
|
-
].join(" "), {
|
|
121
|
-
slug: z.string().optional().describe("AgentOS slug. Defaults to env/primary."),
|
|
122
|
-
startEntityHandle: z
|
|
123
|
-
.string()
|
|
124
|
-
.describe("Opaque graph entity handle (gent:…) issued by the server."),
|
|
125
|
-
grantToken: z
|
|
126
|
-
.string()
|
|
127
|
-
.describe("Signed expansion grant (kve:g:…) bound to this graph handle and envelope."),
|
|
128
|
-
purpose: z
|
|
129
|
-
.string()
|
|
130
|
-
.describe("Informational only — the server enforces the graph-expansion purpose bound into the grant and ignores this value."),
|
|
131
|
-
envelopeId: z.string().describe("Active context envelope id binding this expansion."),
|
|
132
|
-
asOf: z.string().optional().describe("Optional UTC ISO as-of instant for temporal filtering."),
|
|
133
|
-
maxDepth: z
|
|
134
|
-
.number()
|
|
135
|
-
.int()
|
|
136
|
-
.min(1)
|
|
137
|
-
.max(1)
|
|
138
|
-
.optional()
|
|
139
|
-
.describe("Traversal depth; the server caps expansion depth at 1."),
|
|
140
|
-
maxNodes: z.number().int().min(1).max(36).optional(),
|
|
141
|
-
}, async (args) => {
|
|
142
|
-
const slug = await resolveToolSlug(args.slug);
|
|
143
|
-
return jsonResult(await post(`/agent-os/${slug}/memory-graph/expand`, {
|
|
144
|
-
startEntityHandle: args.startEntityHandle,
|
|
145
|
-
grantToken: args.grantToken,
|
|
146
|
-
purpose: args.purpose,
|
|
147
|
-
envelopeId: args.envelopeId,
|
|
148
|
-
asOf: args.asOf,
|
|
149
|
-
maxDepth: args.maxDepth,
|
|
150
|
-
maxNodes: args.maxNodes,
|
|
151
|
-
}));
|
|
152
|
-
});
|
|
153
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KariAd campaign brief MCP tool (M4).
|
|
3
|
-
*
|
|
4
|
-
* agent_os_kariad_campaign_brief_create — fuse macro trends, Kynver goals,
|
|
5
|
-
* and KariAd deep memory into a cited RuntimeCampaignBrief.
|
|
6
|
-
* Does not publish or spend.
|
|
7
|
-
*/
|
|
8
|
-
type ToolResult = {
|
|
9
|
-
content: {
|
|
10
|
-
type: "text";
|
|
11
|
-
text: string;
|
|
12
|
-
}[];
|
|
13
|
-
structuredContent?: unknown;
|
|
14
|
-
};
|
|
15
|
-
export interface KariAdMarketingLoopToolDeps {
|
|
16
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
17
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
18
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
19
|
-
}
|
|
20
|
-
export declare function registerKariAdMarketingLoopTools({ register, resolveToolSlug, jsonResult, }: KariAdMarketingLoopToolDeps): void;
|
|
21
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KariAd campaign brief MCP tool (M4).
|
|
3
|
-
*
|
|
4
|
-
* agent_os_kariad_campaign_brief_create — fuse macro trends, Kynver goals,
|
|
5
|
-
* and KariAd deep memory into a cited RuntimeCampaignBrief.
|
|
6
|
-
* Does not publish or spend.
|
|
7
|
-
*/
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
import { post } from "../lib/kynver-client.js";
|
|
10
|
-
const slugField = z
|
|
11
|
-
.string()
|
|
12
|
-
.optional()
|
|
13
|
-
.describe("AgentOS slug. Defaults to env/primary AgentOS.");
|
|
14
|
-
export function registerKariAdMarketingLoopTools({ register, resolveToolSlug, jsonResult, }) {
|
|
15
|
-
register("agent_os_kariad_campaign_brief_create", [
|
|
16
|
-
"Create a compact, cited RuntimeCampaignBrief by combining on-demand macro/social trend signals,",
|
|
17
|
-
"Kynver marketplace/runtime goals, and KariAd deep brand memory.",
|
|
18
|
-
"Returns content angles with source links, target audiences, selected brand/workspace, risk labels,",
|
|
19
|
-
"and recommended next KariAd actions.",
|
|
20
|
-
"Does NOT publish, schedule, or spend — approval is always required before KariAd execution tools (M5).",
|
|
21
|
-
"Call agent_os_macro_controls_get first when trend awareness matters for the marketing task.",
|
|
22
|
-
].join(" "), {
|
|
23
|
-
slug: slugField,
|
|
24
|
-
workspaceId: z.string().describe("KariAd workspace id (from kari_whoami / connection preflight)."),
|
|
25
|
-
brandId: z.string().describe("KariAd brand id for voice, audience, and calendar context."),
|
|
26
|
-
brandName: z.string().optional().describe("Optional display name when brand id is known."),
|
|
27
|
-
goalStatement: z
|
|
28
|
-
.string()
|
|
29
|
-
.optional()
|
|
30
|
-
.describe("Campaign goal override. When omitted, inferred from active Kynver goals/projects."),
|
|
31
|
-
}, async (args) => {
|
|
32
|
-
const s = await resolveToolSlug(args.slug);
|
|
33
|
-
const payload = await post(`/agent-os/${encodeURIComponent(s)}/kariad-marketing-loop/briefs`, {
|
|
34
|
-
workspaceId: args.workspaceId,
|
|
35
|
-
brandId: args.brandId,
|
|
36
|
-
...(args.brandName ? { brandName: args.brandName } : {}),
|
|
37
|
-
...(args.goalStatement ? { goalStatement: args.goalStatement } : {}),
|
|
38
|
-
});
|
|
39
|
-
return jsonResult(payload);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* M6 outcome import MCP tool — agent_os_kariad_outcome_import
|
|
3
|
-
*/
|
|
4
|
-
type ToolResult = {
|
|
5
|
-
content: {
|
|
6
|
-
type: "text";
|
|
7
|
-
text: string;
|
|
8
|
-
}[];
|
|
9
|
-
structuredContent?: unknown;
|
|
10
|
-
};
|
|
11
|
-
export interface KariAdOutcomeImportToolDeps {
|
|
12
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
13
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
14
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
15
|
-
}
|
|
16
|
-
export declare function registerKariAdOutcomeImportTools({ register, resolveToolSlug, jsonResult, }: KariAdOutcomeImportToolDeps): void;
|
|
17
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* M6 outcome import MCP tool — agent_os_kariad_outcome_import
|
|
3
|
-
*/
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { post } from "../lib/kynver-client.js";
|
|
6
|
-
const slugField = z
|
|
7
|
-
.string()
|
|
8
|
-
.optional()
|
|
9
|
-
.describe("AgentOS slug. Defaults to env/primary AgentOS.");
|
|
10
|
-
export function registerKariAdOutcomeImportTools({ register, resolveToolSlug, jsonResult, }) {
|
|
11
|
-
register("agent_os_kariad_outcome_import", [
|
|
12
|
-
"Import KariAd campaign outcome summaries and produce separate KariAd vs Kynver memory proposals",
|
|
13
|
-
"with correct ownership, provider-quality metrics, and duplicate suppression.",
|
|
14
|
-
"Set writeback=true to route cleared proposals to KariAd submit_memory_proposal and Kynver MARM.",
|
|
15
|
-
"Requires planId + briefId from the marketing loop execution window.",
|
|
16
|
-
].join(" "), {
|
|
17
|
-
slug: slugField,
|
|
18
|
-
workspaceId: z.string().describe("KariAd workspace id."),
|
|
19
|
-
brandId: z.string().describe("KariAd brand id."),
|
|
20
|
-
planId: z.string().describe("KariAd execution plan id for attribution."),
|
|
21
|
-
briefId: z.string().describe("Runtime campaign brief id for attribution."),
|
|
22
|
-
writeback: z
|
|
23
|
-
.boolean()
|
|
24
|
-
.optional()
|
|
25
|
-
.describe("When true, persist proposals to KariAd/Kynver. Default dry-run."),
|
|
26
|
-
}, async (args) => {
|
|
27
|
-
const s = await resolveToolSlug(args.slug);
|
|
28
|
-
const payload = await post(`/agent-os/${encodeURIComponent(s)}/kariad-marketing-loop/outcomes/import`, {
|
|
29
|
-
workspaceId: args.workspaceId,
|
|
30
|
-
brandId: args.brandId,
|
|
31
|
-
planId: args.planId,
|
|
32
|
-
briefId: args.briefId,
|
|
33
|
-
writeback: args.writeback === true,
|
|
34
|
-
});
|
|
35
|
-
return jsonResult(payload);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Macro/social trend on-demand catch-up MCP tool.
|
|
3
|
-
*
|
|
4
|
-
* Runtime agents call agent_os_macro_controls_get before producing social media
|
|
5
|
-
* posts, ad copy, campaign briefs, launch announcements, or any trend-sensitive
|
|
6
|
-
* marketing content so they can adapt angle and tone to current signals.
|
|
7
|
-
*
|
|
8
|
-
* Read-only. Backed by GET /api/agent-os/{slug}/macro-controls.
|
|
9
|
-
*/
|
|
10
|
-
type ToolResult = {
|
|
11
|
-
content: {
|
|
12
|
-
type: "text";
|
|
13
|
-
text: string;
|
|
14
|
-
}[];
|
|
15
|
-
structuredContent?: unknown;
|
|
16
|
-
};
|
|
17
|
-
export interface MacroControlsToolDeps {
|
|
18
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
19
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
20
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
21
|
-
}
|
|
22
|
-
export declare function registerMacroControlsTools({ register, resolveToolSlug, jsonResult, }: MacroControlsToolDeps): void;
|
|
23
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Macro/social trend on-demand catch-up MCP tool.
|
|
3
|
-
*
|
|
4
|
-
* Runtime agents call agent_os_macro_controls_get before producing social media
|
|
5
|
-
* posts, ad copy, campaign briefs, launch announcements, or any trend-sensitive
|
|
6
|
-
* marketing content so they can adapt angle and tone to current signals.
|
|
7
|
-
*
|
|
8
|
-
* Read-only. Backed by GET /api/agent-os/{slug}/macro-controls.
|
|
9
|
-
*/
|
|
10
|
-
import { z } from "zod";
|
|
11
|
-
import { get } from "../lib/kynver-client.js";
|
|
12
|
-
const slugField = z
|
|
13
|
-
.string()
|
|
14
|
-
.optional()
|
|
15
|
-
.describe("AgentOS slug. Defaults to env/primary AgentOS.");
|
|
16
|
-
export function registerMacroControlsTools({ register, resolveToolSlug, jsonResult, }) {
|
|
17
|
-
register("agent_os_macro_controls_get", [
|
|
18
|
-
"Fetch the current macro/social trend snapshot so you can adapt marketing content to active signals.",
|
|
19
|
-
"",
|
|
20
|
-
"WHEN TO CALL: before generating social media posts, ad copy, campaign briefs, launch announcements,",
|
|
21
|
-
"trend-reactive content, or any marketing material where current events could affect brand perception.",
|
|
22
|
-
"This is an on-demand catch-up step — call it at the START of social/content/marketing work, not on",
|
|
23
|
-
"every message.",
|
|
24
|
-
"",
|
|
25
|
-
"WHAT YOU GET: a compact MacroControlSnapshot with active MacroTrendSignals (topic, sensitivity,",
|
|
26
|
-
"summary, confidence, sourceLinks), a globalSensitivity aggregate ('safe'|'cautious'|'sensitive'|'blocked'),",
|
|
27
|
-
"isStale flag, and agentGuidance text you should incorporate into your content plan.",
|
|
28
|
-
"",
|
|
29
|
-
"GATING RULES:",
|
|
30
|
-
"- globalSensitivity='blocked': do NOT publish related content — surface the blocked topics to the",
|
|
31
|
-
" operator and wait for explicit approval before proceeding.",
|
|
32
|
-
"- globalSensitivity='sensitive': draft with extra care, avoid direct references to flagged topics,",
|
|
33
|
-
" prefer evergreen angles, and flag for human review before posting.",
|
|
34
|
-
"- globalSensitivity='cautious': note flagged topics in your plan; adjust tone but may proceed.",
|
|
35
|
-
"- globalSensitivity='safe' or isStale=true with no signals: proceed with standard brand voice.",
|
|
36
|
-
"",
|
|
37
|
-
"If isStale=true AND signals are present, treat the data as advisory only and note staleness in your",
|
|
38
|
-
"output so the operator knows to refresh. Read-only; safe for unattended invocation.",
|
|
39
|
-
].join("\n"), {
|
|
40
|
-
slug: slugField,
|
|
41
|
-
includeSensitiveSignals: z
|
|
42
|
-
.boolean()
|
|
43
|
-
.optional()
|
|
44
|
-
.describe("When true, include 'sensitive' and 'blocked' signals in full detail. " +
|
|
45
|
-
"Default true — omit only when generating a safe-for-display summary."),
|
|
46
|
-
}, async ({ slug, includeSensitiveSignals = true, }) => {
|
|
47
|
-
const s = await resolveToolSlug(slug);
|
|
48
|
-
const snapshot = await get(`/agent-os/${encodeURIComponent(s)}/macro-controls`);
|
|
49
|
-
if (!includeSensitiveSignals && Array.isArray(snapshot.signals)) {
|
|
50
|
-
snapshot.signals = snapshot.signals.filter((sig) => sig.sensitivity === "safe" || sig.sensitivity === "cautious");
|
|
51
|
-
}
|
|
52
|
-
return jsonResult(snapshot);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory ledger MCP tools (audited-memory M5) — agent-readable summaries so
|
|
3
|
-
* the runtime agent can narrate what was read and why, then steer the
|
|
4
|
-
* workbench to the Memory activity panel.
|
|
5
|
-
*/
|
|
6
|
-
type ToolResult = {
|
|
7
|
-
content: {
|
|
8
|
-
type: "text";
|
|
9
|
-
text: string;
|
|
10
|
-
}[];
|
|
11
|
-
structuredContent?: unknown;
|
|
12
|
-
};
|
|
13
|
-
export interface MemoryLedgerToolDeps {
|
|
14
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
15
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
16
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
17
|
-
}
|
|
18
|
-
export declare function registerMemoryLedgerTools({ register, resolveToolSlug, jsonResult, }: MemoryLedgerToolDeps): void;
|
|
19
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory ledger MCP tools (audited-memory M5) — agent-readable summaries so
|
|
3
|
-
* the runtime agent can narrate what was read and why, then steer the
|
|
4
|
-
* workbench to the Memory activity panel.
|
|
5
|
-
*/
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
import { get } from "../lib/kynver-client.js";
|
|
8
|
-
export function registerMemoryLedgerTools({ register, resolveToolSlug, jsonResult, }) {
|
|
9
|
-
register("agent_os_memory_ledger_summary", [
|
|
10
|
-
"Read a narrated summary of the workspace owner's signed memory access ledger",
|
|
11
|
-
"(receipt counts, recent human-framed activity lines, chain integrity, and workbench",
|
|
12
|
-
"steering hints). Use when the operator asks what memories were read, what changed,",
|
|
13
|
-
"or wants a weekly digest. Customer vocabulary only — no retrieval mechanics.",
|
|
14
|
-
"After summarizing, offer to open Memory activity via agent_os_workbench_view",
|
|
15
|
-
"(kind=open_panel, panel=memory-activity). Read-only and safe for unattended use.",
|
|
16
|
-
].join(" "), {
|
|
17
|
-
slug: z.string().optional().describe("AgentOS slug. Defaults to env/primary."),
|
|
18
|
-
periodDays: z
|
|
19
|
-
.number()
|
|
20
|
-
.int()
|
|
21
|
-
.min(1)
|
|
22
|
-
.max(90)
|
|
23
|
-
.optional()
|
|
24
|
-
.describe("Rolling window in days when from/to omitted (default 7)."),
|
|
25
|
-
from: z.string().optional().describe("Inclusive ISO lower bound."),
|
|
26
|
-
to: z.string().optional().describe("Inclusive ISO upper bound."),
|
|
27
|
-
recentLimit: z
|
|
28
|
-
.number()
|
|
29
|
-
.int()
|
|
30
|
-
.min(1)
|
|
31
|
-
.max(25)
|
|
32
|
-
.optional()
|
|
33
|
-
.describe("Recent narrated lines (default 12)."),
|
|
34
|
-
}, async (args) => {
|
|
35
|
-
const slug = await resolveToolSlug(args.slug);
|
|
36
|
-
const params = new URLSearchParams();
|
|
37
|
-
if (args.periodDays != null)
|
|
38
|
-
params.set("periodDays", String(args.periodDays));
|
|
39
|
-
if (args.from)
|
|
40
|
-
params.set("from", args.from);
|
|
41
|
-
if (args.to)
|
|
42
|
-
params.set("to", args.to);
|
|
43
|
-
if (args.recentLimit != null)
|
|
44
|
-
params.set("recentLimit", String(args.recentLimit));
|
|
45
|
-
const qs = params.toString();
|
|
46
|
-
return jsonResult(await get(`/agent-os/${encodeURIComponent(slug)}/memory-ledger/summary${qs ? `?${qs}` : ""}`));
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools for the Memory Quality Feedback pipeline.
|
|
3
|
-
*
|
|
4
|
-
* agent_os_record_memory_quality_feedback — POST a feedback event (operator only).
|
|
5
|
-
* agent_os_memory_quality_status_get — GET recent feedback events with optional filters.
|
|
6
|
-
*
|
|
7
|
-
* Both proxy to `/api/agent-os/{slug}/memory/quality-feedback` on Kynver.
|
|
8
|
-
*/
|
|
9
|
-
type ToolResult = {
|
|
10
|
-
content: {
|
|
11
|
-
type: "text";
|
|
12
|
-
text: string;
|
|
13
|
-
}[];
|
|
14
|
-
structuredContent?: unknown;
|
|
15
|
-
};
|
|
16
|
-
export interface MemoryQualityFeedbackToolDeps {
|
|
17
|
-
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
18
|
-
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
19
|
-
jsonResult: (data: unknown) => ToolResult;
|
|
20
|
-
compact: (source: Record<string, unknown>) => Record<string, unknown>;
|
|
21
|
-
}
|
|
22
|
-
export declare function registerMemoryQualityFeedbackTools({ register, resolveToolSlug, jsonResult, compact, }: MemoryQualityFeedbackToolDeps): void;
|
|
23
|
-
export {};
|