@kalera/munin-runtime 1.0.0 → 1.0.2
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/.turbo/turbo-build.log +1 -1
- package/dist/index.js +1 -5
- package/dist/mcp-server.js +17 -17
- package/package.json +2 -2
- package/src/index.ts +1 -6
- package/src/mcp-server.ts +17 -17
package/.turbo/turbo-build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -18,12 +18,8 @@ export function parseCliArgs(argv, usage) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export function loadCliEnv() {
|
|
21
|
-
const baseUrl = process.env.MUNIN_BASE_URL;
|
|
22
|
-
if (!baseUrl) {
|
|
23
|
-
throw new Error("MUNIN_BASE_URL is required");
|
|
24
|
-
}
|
|
25
21
|
return {
|
|
26
|
-
baseUrl,
|
|
22
|
+
baseUrl: "https://munin.kalera.dev",
|
|
27
23
|
apiKey: process.env.MUNIN_API_KEY,
|
|
28
24
|
timeoutMs: Number(process.env.MUNIN_TIMEOUT_MS ?? 15000),
|
|
29
25
|
retries: Number(process.env.MUNIN_RETRIES ?? 3),
|
package/dist/mcp-server.js
CHANGED
|
@@ -23,11 +23,11 @@ export async function startMcpServer() {
|
|
|
23
23
|
tools: [
|
|
24
24
|
{
|
|
25
25
|
name: "munin_store_memory",
|
|
26
|
-
description: "Store or update a memory in Munin.
|
|
26
|
+
description: "Store or update a memory in Munin Context Core. It will automatically use the active project from environment if projectId is omitted. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
27
27
|
inputSchema: {
|
|
28
28
|
type: "object",
|
|
29
29
|
properties: {
|
|
30
|
-
projectId: { type: "string", description: "
|
|
30
|
+
projectId: { type: "string", description: "Optional. Only use if cross-saving to a different Context Core ID." },
|
|
31
31
|
key: { type: "string", description: "Unique identifier for this memory" },
|
|
32
32
|
content: { type: "string", description: "The content to remember" },
|
|
33
33
|
title: { type: "string", description: "Optional title" },
|
|
@@ -37,58 +37,58 @@ export async function startMcpServer() {
|
|
|
37
37
|
description: "List of tags, e.g. ['planning', 'frontend']"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
required: ["
|
|
40
|
+
required: ["key", "content"],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: "munin_retrieve_memory",
|
|
45
|
-
description: "Retrieve a memory by its unique key.",
|
|
45
|
+
description: "Retrieve a memory by its unique key from the current Munin Context Core. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
46
46
|
inputSchema: {
|
|
47
47
|
type: "object",
|
|
48
48
|
properties: {
|
|
49
|
-
projectId: { type: "string", description: "The Munin
|
|
49
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
50
50
|
key: { type: "string", description: "Unique identifier" },
|
|
51
51
|
},
|
|
52
|
-
required: ["
|
|
52
|
+
required: ["key"],
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
name: "munin_search_memories",
|
|
57
|
-
description: "Search for memories using semantic search or keywords.",
|
|
57
|
+
description: "Search for memories using semantic search or keywords. Returns formatted, token-efficient GraphRAG context. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
58
58
|
inputSchema: {
|
|
59
59
|
type: "object",
|
|
60
60
|
properties: {
|
|
61
|
-
projectId: { type: "string", description: "The Munin
|
|
61
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
62
62
|
query: { type: "string", description: "Search query" },
|
|
63
63
|
tags: { type: "array", items: { type: "string" } },
|
|
64
64
|
limit: { type: "number", description: "Max results (default: 10)" },
|
|
65
65
|
},
|
|
66
|
-
required: ["
|
|
66
|
+
required: ["query"],
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
name: "munin_list_memories",
|
|
71
|
-
description: "List all memories with pagination.",
|
|
71
|
+
description: "List all memories with pagination. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
72
72
|
inputSchema: {
|
|
73
73
|
type: "object",
|
|
74
74
|
properties: {
|
|
75
|
-
projectId: { type: "string", description: "The Munin
|
|
75
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
76
76
|
limit: { type: "number" },
|
|
77
77
|
offset: { type: "number" },
|
|
78
78
|
},
|
|
79
|
-
required: [
|
|
79
|
+
required: [],
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
name: "munin_recent_memories",
|
|
84
|
-
description: "Get the most recently updated memories.",
|
|
84
|
+
description: "Get the most recently updated memories. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
85
85
|
inputSchema: {
|
|
86
86
|
type: "object",
|
|
87
87
|
properties: {
|
|
88
|
-
projectId: { type: "string", description: "The Munin
|
|
88
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
89
89
|
limit: { type: "number" },
|
|
90
90
|
},
|
|
91
|
-
required: [
|
|
91
|
+
required: [],
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
],
|
|
@@ -97,9 +97,9 @@ export async function startMcpServer() {
|
|
|
97
97
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
98
98
|
try {
|
|
99
99
|
const args = request.params.arguments || {};
|
|
100
|
-
const projectId = args.projectId;
|
|
100
|
+
const projectId = args.projectId || process.env.MUNIN_PROJECT;
|
|
101
101
|
if (!projectId) {
|
|
102
|
-
throw new Error("projectId is required");
|
|
102
|
+
throw new Error("projectId is required in arguments or MUNIN_PROJECT environment variable");
|
|
103
103
|
}
|
|
104
104
|
// Remove projectId from args before sending as payload
|
|
105
105
|
const { projectId: _ignored, ...payload } = args;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalera/munin-runtime",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
15
|
-
"@kalera/munin-sdk": "1.0.
|
|
15
|
+
"@kalera/munin-sdk": "1.0.2"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc -p tsconfig.json",
|
package/src/index.ts
CHANGED
|
@@ -34,13 +34,8 @@ export function parseCliArgs(argv: string[], usage: string): ParsedCliArgs {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function loadCliEnv(): CliEnv {
|
|
37
|
-
const baseUrl = process.env.MUNIN_BASE_URL;
|
|
38
|
-
if (!baseUrl) {
|
|
39
|
-
throw new Error("MUNIN_BASE_URL is required");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
37
|
return {
|
|
43
|
-
baseUrl,
|
|
38
|
+
baseUrl: "https://munin.kalera.dev",
|
|
44
39
|
apiKey: process.env.MUNIN_API_KEY,
|
|
45
40
|
timeoutMs: Number(process.env.MUNIN_TIMEOUT_MS ?? 15000),
|
|
46
41
|
retries: Number(process.env.MUNIN_RETRIES ?? 3),
|
package/src/mcp-server.ts
CHANGED
|
@@ -33,11 +33,11 @@ export async function startMcpServer() {
|
|
|
33
33
|
tools: [
|
|
34
34
|
{
|
|
35
35
|
name: "munin_store_memory",
|
|
36
|
-
description: "Store or update a memory in Munin.
|
|
36
|
+
description: "Store or update a memory in Munin Context Core. It will automatically use the active project from environment if projectId is omitted. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
37
37
|
inputSchema: {
|
|
38
38
|
type: "object",
|
|
39
39
|
properties: {
|
|
40
|
-
projectId: { type: "string", description: "
|
|
40
|
+
projectId: { type: "string", description: "Optional. Only use if cross-saving to a different Context Core ID." },
|
|
41
41
|
key: { type: "string", description: "Unique identifier for this memory" },
|
|
42
42
|
content: { type: "string", description: "The content to remember" },
|
|
43
43
|
title: { type: "string", description: "Optional title" },
|
|
@@ -47,58 +47,58 @@ export async function startMcpServer() {
|
|
|
47
47
|
description: "List of tags, e.g. ['planning', 'frontend']"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
required: ["
|
|
50
|
+
required: ["key", "content"],
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
name: "munin_retrieve_memory",
|
|
55
|
-
description: "Retrieve a memory by its unique key.",
|
|
55
|
+
description: "Retrieve a memory by its unique key from the current Munin Context Core. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
56
56
|
inputSchema: {
|
|
57
57
|
type: "object",
|
|
58
58
|
properties: {
|
|
59
|
-
projectId: { type: "string", description: "The Munin
|
|
59
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
60
60
|
key: { type: "string", description: "Unique identifier" },
|
|
61
61
|
},
|
|
62
|
-
required: ["
|
|
62
|
+
required: ["key"],
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
name: "munin_search_memories",
|
|
67
|
-
description: "Search for memories using semantic search or keywords.",
|
|
67
|
+
description: "Search for memories using semantic search or keywords. Returns formatted, token-efficient GraphRAG context. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
68
68
|
inputSchema: {
|
|
69
69
|
type: "object",
|
|
70
70
|
properties: {
|
|
71
|
-
projectId: { type: "string", description: "The Munin
|
|
71
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
72
72
|
query: { type: "string", description: "Search query" },
|
|
73
73
|
tags: { type: "array", items: { type: "string" } },
|
|
74
74
|
limit: { type: "number", description: "Max results (default: 10)" },
|
|
75
75
|
},
|
|
76
|
-
required: ["
|
|
76
|
+
required: ["query"],
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
name: "munin_list_memories",
|
|
81
|
-
description: "List all memories with pagination.",
|
|
81
|
+
description: "List all memories with pagination. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
82
82
|
inputSchema: {
|
|
83
83
|
type: "object",
|
|
84
84
|
properties: {
|
|
85
|
-
projectId: { type: "string", description: "The Munin
|
|
85
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
86
86
|
limit: { type: "number" },
|
|
87
87
|
offset: { type: "number" },
|
|
88
88
|
},
|
|
89
|
-
required: [
|
|
89
|
+
required: [],
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
name: "munin_recent_memories",
|
|
94
|
-
description: "Get the most recently updated memories.",
|
|
94
|
+
description: "Get the most recently updated memories. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
|
|
95
95
|
inputSchema: {
|
|
96
96
|
type: "object",
|
|
97
97
|
properties: {
|
|
98
|
-
projectId: { type: "string", description: "The Munin
|
|
98
|
+
projectId: { type: "string", description: "Optional. The Munin Context Core ID." },
|
|
99
99
|
limit: { type: "number" },
|
|
100
100
|
},
|
|
101
|
-
required: [
|
|
101
|
+
required: [],
|
|
102
102
|
},
|
|
103
103
|
},
|
|
104
104
|
],
|
|
@@ -108,10 +108,10 @@ export async function startMcpServer() {
|
|
|
108
108
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
109
109
|
try {
|
|
110
110
|
const args = request.params.arguments || {};
|
|
111
|
-
const projectId = args.projectId as string;
|
|
111
|
+
const projectId = (args.projectId as string) || process.env.MUNIN_PROJECT;
|
|
112
112
|
|
|
113
113
|
if (!projectId) {
|
|
114
|
-
throw new Error("projectId is required");
|
|
114
|
+
throw new Error("projectId is required in arguments or MUNIN_PROJECT environment variable");
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// Remove projectId from args before sending as payload
|