@kalera/munin-runtime 0.1.0 → 1.0.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @kalera/munin-runtime@0.1.0 build /home/runner/work/munin-for-agents/munin-for-agents/packages/runtime
2
+ > @kalera/munin-runtime@1.0.0 build /home/runner/work/munin-for-agents/munin-for-agents/packages/runtime
3
3
  > tsc -p tsconfig.json
4
4
 
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export interface ParsedCliArgs {
4
4
  }
5
5
  export interface CliEnv {
6
6
  baseUrl: string;
7
- project: string;
8
7
  apiKey?: string;
9
8
  timeoutMs: number;
10
9
  retries: number;
package/dist/index.js CHANGED
@@ -24,7 +24,6 @@ export function loadCliEnv() {
24
24
  }
25
25
  return {
26
26
  baseUrl,
27
- project: process.env.MUNIN_PROJECT ?? "default",
28
27
  apiKey: process.env.MUNIN_API_KEY,
29
28
  timeoutMs: Number(process.env.MUNIN_TIMEOUT_MS ?? 15000),
30
29
  retries: Number(process.env.MUNIN_RETRIES ?? 3),
@@ -7,13 +7,12 @@ export async function startMcpServer() {
7
7
  const env = loadCliEnv();
8
8
  const client = new MuninClient({
9
9
  baseUrl: env.baseUrl,
10
- project: env.project,
11
10
  apiKey: env.apiKey,
12
11
  timeoutMs: env.timeoutMs,
13
12
  });
14
13
  const server = new Server({
15
14
  name: "munin-mcp-server",
16
- version: "0.1.0",
15
+ version: "1.0.0",
17
16
  }, {
18
17
  capabilities: {
19
18
  tools: {},
@@ -28,6 +27,7 @@ export async function startMcpServer() {
28
27
  inputSchema: {
29
28
  type: "object",
30
29
  properties: {
30
+ projectId: { type: "string", description: "The Munin Project ID (get this from your workspace rules/instructions)" },
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,7 +37,7 @@ export async function startMcpServer() {
37
37
  description: "List of tags, e.g. ['planning', 'frontend']"
38
38
  }
39
39
  },
40
- required: ["key", "content"],
40
+ required: ["projectId", "key", "content"],
41
41
  },
42
42
  },
43
43
  {
@@ -46,9 +46,10 @@ export async function startMcpServer() {
46
46
  inputSchema: {
47
47
  type: "object",
48
48
  properties: {
49
+ projectId: { type: "string", description: "The Munin Project ID" },
49
50
  key: { type: "string", description: "Unique identifier" },
50
51
  },
51
- required: ["key"],
52
+ required: ["projectId", "key"],
52
53
  },
53
54
  },
54
55
  {
@@ -57,11 +58,12 @@ export async function startMcpServer() {
57
58
  inputSchema: {
58
59
  type: "object",
59
60
  properties: {
61
+ projectId: { type: "string", description: "The Munin Project ID" },
60
62
  query: { type: "string", description: "Search query" },
61
63
  tags: { type: "array", items: { type: "string" } },
62
64
  limit: { type: "number", description: "Max results (default: 10)" },
63
65
  },
64
- required: ["query"],
66
+ required: ["projectId", "query"],
65
67
  },
66
68
  },
67
69
  {
@@ -70,9 +72,11 @@ export async function startMcpServer() {
70
72
  inputSchema: {
71
73
  type: "object",
72
74
  properties: {
75
+ projectId: { type: "string", description: "The Munin Project ID" },
73
76
  limit: { type: "number" },
74
77
  offset: { type: "number" },
75
78
  },
79
+ required: ["projectId"],
76
80
  },
77
81
  },
78
82
  {
@@ -81,8 +85,10 @@ export async function startMcpServer() {
81
85
  inputSchema: {
82
86
  type: "object",
83
87
  properties: {
88
+ projectId: { type: "string", description: "The Munin Project ID" },
84
89
  limit: { type: "number" },
85
90
  },
91
+ required: ["projectId"],
86
92
  },
87
93
  },
88
94
  ],
@@ -91,22 +97,28 @@ export async function startMcpServer() {
91
97
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
92
98
  try {
93
99
  const args = request.params.arguments || {};
100
+ const projectId = args.projectId;
101
+ if (!projectId) {
102
+ throw new Error("projectId is required");
103
+ }
104
+ // Remove projectId from args before sending as payload
105
+ const { projectId: _ignored, ...payload } = args;
94
106
  let result;
95
107
  switch (request.params.name) {
96
108
  case "munin_store_memory":
97
- result = await client.store(args);
109
+ result = await client.store(projectId, payload);
98
110
  break;
99
111
  case "munin_retrieve_memory":
100
- result = await client.retrieve(args);
112
+ result = await client.retrieve(projectId, payload);
101
113
  break;
102
114
  case "munin_search_memories":
103
- result = await client.search(args);
115
+ result = await client.search(projectId, payload);
104
116
  break;
105
117
  case "munin_list_memories":
106
- result = await client.list(args);
118
+ result = await client.list(projectId, payload);
107
119
  break;
108
120
  case "munin_recent_memories":
109
- result = await client.recent(args);
121
+ result = await client.recent(projectId, payload);
110
122
  break;
111
123
  default:
112
124
  throw new Error(`Unknown tool: ${request.params.name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalera/munin-runtime",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
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": "0.1.0"
15
+ "@kalera/munin-sdk": "1.0.0"
16
16
  },
17
17
  "scripts": {
18
18
  "build": "tsc -p tsconfig.json",
package/src/index.ts CHANGED
@@ -5,7 +5,6 @@ export interface ParsedCliArgs {
5
5
 
6
6
  export interface CliEnv {
7
7
  baseUrl: string;
8
- project: string;
9
8
  apiKey?: string;
10
9
  timeoutMs: number;
11
10
  retries: number;
@@ -42,7 +41,6 @@ export function loadCliEnv(): CliEnv {
42
41
 
43
42
  return {
44
43
  baseUrl,
45
- project: process.env.MUNIN_PROJECT ?? "default",
46
44
  apiKey: process.env.MUNIN_API_KEY,
47
45
  timeoutMs: Number(process.env.MUNIN_TIMEOUT_MS ?? 15000),
48
46
  retries: Number(process.env.MUNIN_RETRIES ?? 3),
package/src/mcp-server.ts CHANGED
@@ -12,7 +12,6 @@ export async function startMcpServer() {
12
12
 
13
13
  const client = new MuninClient({
14
14
  baseUrl: env.baseUrl,
15
- project: env.project,
16
15
  apiKey: env.apiKey,
17
16
  timeoutMs: env.timeoutMs,
18
17
  });
@@ -20,7 +19,7 @@ export async function startMcpServer() {
20
19
  const server = new Server(
21
20
  {
22
21
  name: "munin-mcp-server",
23
- version: "0.1.0",
22
+ version: "1.0.0",
24
23
  },
25
24
  {
26
25
  capabilities: {
@@ -38,6 +37,7 @@ export async function startMcpServer() {
38
37
  inputSchema: {
39
38
  type: "object",
40
39
  properties: {
40
+ projectId: { type: "string", description: "The Munin Project ID (get this from your workspace rules/instructions)" },
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,7 +47,7 @@ export async function startMcpServer() {
47
47
  description: "List of tags, e.g. ['planning', 'frontend']"
48
48
  }
49
49
  },
50
- required: ["key", "content"],
50
+ required: ["projectId", "key", "content"],
51
51
  },
52
52
  },
53
53
  {
@@ -56,9 +56,10 @@ export async function startMcpServer() {
56
56
  inputSchema: {
57
57
  type: "object",
58
58
  properties: {
59
+ projectId: { type: "string", description: "The Munin Project ID" },
59
60
  key: { type: "string", description: "Unique identifier" },
60
61
  },
61
- required: ["key"],
62
+ required: ["projectId", "key"],
62
63
  },
63
64
  },
64
65
  {
@@ -67,11 +68,12 @@ export async function startMcpServer() {
67
68
  inputSchema: {
68
69
  type: "object",
69
70
  properties: {
71
+ projectId: { type: "string", description: "The Munin Project ID" },
70
72
  query: { type: "string", description: "Search query" },
71
73
  tags: { type: "array", items: { type: "string" } },
72
74
  limit: { type: "number", description: "Max results (default: 10)" },
73
75
  },
74
- required: ["query"],
76
+ required: ["projectId", "query"],
75
77
  },
76
78
  },
77
79
  {
@@ -80,9 +82,11 @@ export async function startMcpServer() {
80
82
  inputSchema: {
81
83
  type: "object",
82
84
  properties: {
85
+ projectId: { type: "string", description: "The Munin Project ID" },
83
86
  limit: { type: "number" },
84
87
  offset: { type: "number" },
85
88
  },
89
+ required: ["projectId"],
86
90
  },
87
91
  },
88
92
  {
@@ -91,8 +95,10 @@ export async function startMcpServer() {
91
95
  inputSchema: {
92
96
  type: "object",
93
97
  properties: {
98
+ projectId: { type: "string", description: "The Munin Project ID" },
94
99
  limit: { type: "number" },
95
100
  },
101
+ required: ["projectId"],
96
102
  },
97
103
  },
98
104
  ],
@@ -102,23 +108,32 @@ export async function startMcpServer() {
102
108
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
103
109
  try {
104
110
  const args = request.params.arguments || {};
111
+ const projectId = args.projectId as string;
112
+
113
+ if (!projectId) {
114
+ throw new Error("projectId is required");
115
+ }
116
+
117
+ // Remove projectId from args before sending as payload
118
+ const { projectId: _ignored, ...payload } = args;
119
+
105
120
  let result;
106
121
 
107
122
  switch (request.params.name) {
108
123
  case "munin_store_memory":
109
- result = await client.store(args);
124
+ result = await client.store(projectId, payload);
110
125
  break;
111
126
  case "munin_retrieve_memory":
112
- result = await client.retrieve(args);
127
+ result = await client.retrieve(projectId, payload);
113
128
  break;
114
129
  case "munin_search_memories":
115
- result = await client.search(args);
130
+ result = await client.search(projectId, payload);
116
131
  break;
117
132
  case "munin_list_memories":
118
- result = await client.list(args);
133
+ result = await client.list(projectId, payload);
119
134
  break;
120
135
  case "munin_recent_memories":
121
- result = await client.recent(args);
136
+ result = await client.recent(projectId, payload);
122
137
  break;
123
138
  default:
124
139
  throw new Error(`Unknown tool: ${request.params.name}`);