@kynver-app/mcp-agent-os 0.3.68 → 0.3.69
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/server.js
CHANGED
|
@@ -33,6 +33,7 @@ import { registerMacroControlsTools } from "./tools/macro-controls.js";
|
|
|
33
33
|
import { registerKariAdMarketingLoopTools } from "./tools/kariad-marketing-loop.js";
|
|
34
34
|
import { registerKariAdOutcomeImportTools } from "./tools/kariad-outcome-import.js";
|
|
35
35
|
import { registerCmoControlTools } from "./tools/cmo-control.js";
|
|
36
|
+
import { registerCmoContextPackTools } from "./tools/cmo-context-pack.js";
|
|
36
37
|
import { registerCurrentFocusTools } from "./tools/current-focus.js";
|
|
37
38
|
import { registerContextExpandTools } from "./tools/context-expand.js";
|
|
38
39
|
import { registerContextPreviewTools } from "./tools/context-preview.js";
|
|
@@ -745,6 +746,7 @@ export function createAgentOsServer() {
|
|
|
745
746
|
// KariAd marketing loop — M6 outcome import (analytics feedback + memory learning).
|
|
746
747
|
registerKariAdOutcomeImportTools({ register, resolveToolSlug, jsonResult });
|
|
747
748
|
registerCmoControlTools({ register, resolveToolSlug, jsonResult });
|
|
749
|
+
registerCmoContextPackTools({ register, resolveToolSlug, jsonResult });
|
|
748
750
|
// M5: Kynver current-focus / todo adapter (agent-loop focus ≠ executor lease).
|
|
749
751
|
registerCurrentFocusTools({ register, resolveToolSlug, jsonResult, compact });
|
|
750
752
|
return server;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live CMO Context Pack MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* Compact L3 doctrine fetch for MCP clients (GhostGrok / hosted Agent OS).
|
|
5
|
+
* Does not dump marketing-graph nodes into agent_os_search_memory.
|
|
6
|
+
*/
|
|
7
|
+
type ToolResult = {
|
|
8
|
+
content: {
|
|
9
|
+
type: "text";
|
|
10
|
+
text: string;
|
|
11
|
+
}[];
|
|
12
|
+
structuredContent?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export interface CmoContextPackToolDeps {
|
|
15
|
+
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
16
|
+
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
17
|
+
jsonResult: (data: unknown) => ToolResult;
|
|
18
|
+
}
|
|
19
|
+
export declare function registerCmoContextPackTools({ register, resolveToolSlug, jsonResult, }: CmoContextPackToolDeps): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live CMO Context Pack MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* Compact L3 doctrine fetch for MCP clients (GhostGrok / hosted Agent OS).
|
|
5
|
+
* Does not dump marketing-graph nodes into agent_os_search_memory.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { get } from "../lib/kynver-client.js";
|
|
9
|
+
const slugField = z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("AgentOS slug. Defaults to env/primary AgentOS.");
|
|
13
|
+
const platformField = z
|
|
14
|
+
.enum(["linkedin", "x", "tiktok", "instagram", "reddit", "meta_ads", "email", "all"])
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("Optional platform filter for the compact pack.");
|
|
17
|
+
const funnelField = z
|
|
18
|
+
.enum(["awareness", "trust", "consideration", "conversion", "retention"])
|
|
19
|
+
.optional()
|
|
20
|
+
.describe("Optional funnel-stage filter.");
|
|
21
|
+
export function registerCmoContextPackTools({ register, resolveToolSlug, jsonResult, }) {
|
|
22
|
+
register("agent_os_cmo_context_pack_get", [
|
|
23
|
+
"Fetch a compact live CMO Context Pack from the shared marketing knowledge graph.",
|
|
24
|
+
"Returns promoted doctrine only (playbooks, platform rules, hooks, proof, CTAs, anti-patterns, rubrics).",
|
|
25
|
+
"Unpromoted freshness candidates are excluded. This is not agent_os_search_memory —",
|
|
26
|
+
"do not expect playbook nodes from ordinary agent memory search.",
|
|
27
|
+
"Read-only; safe for unattended verification. Does not publish or spend.",
|
|
28
|
+
"Use on marketing/campaign turns before KariAd generation. Pair with agent_os_cmo_control_status_get.",
|
|
29
|
+
].join(" "), {
|
|
30
|
+
slug: slugField,
|
|
31
|
+
objective: z
|
|
32
|
+
.string()
|
|
33
|
+
.describe("Campaign or turn objective the pack should be scoped to."),
|
|
34
|
+
platform: platformField,
|
|
35
|
+
audienceSegment: z.string().optional().describe("Optional audience segment label."),
|
|
36
|
+
funnelStage: funnelField,
|
|
37
|
+
maxNodesPerSlot: z
|
|
38
|
+
.number()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Max nodes per pack slot (default 5, max 8)."),
|
|
41
|
+
}, async (args) => {
|
|
42
|
+
const s = await resolveToolSlug(args.slug);
|
|
43
|
+
const params = new URLSearchParams();
|
|
44
|
+
params.set("objective", args.objective);
|
|
45
|
+
if (args.platform)
|
|
46
|
+
params.set("platform", args.platform);
|
|
47
|
+
if (args.audienceSegment)
|
|
48
|
+
params.set("audienceSegment", args.audienceSegment);
|
|
49
|
+
if (args.funnelStage)
|
|
50
|
+
params.set("funnelStage", args.funnelStage);
|
|
51
|
+
if (args.maxNodesPerSlot !== undefined)
|
|
52
|
+
params.set("maxNodesPerSlot", String(args.maxNodesPerSlot));
|
|
53
|
+
const payload = await get(`/agent-os/${encodeURIComponent(s)}/cmo-context-pack?${params}`);
|
|
54
|
+
return jsonResult(payload);
|
|
55
|
+
});
|
|
56
|
+
}
|
package/package.json
CHANGED