@kalera/munin-runtime 1.4.0 → 1.4.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @kalera/munin-runtime@1.4.0 build /home/runner/work/munin-for-agents/munin-for-agents/packages/runtime
2
+ > @kalera/munin-runtime@1.4.2 build /home/runner/work/munin-for-agents/munin-for-agents/packages/runtime
3
3
  > tsc -p tsconfig.json
4
4
 
@@ -14,7 +14,7 @@ export function createMcpServerInstance(env, opts) {
14
14
  });
15
15
  const server = new Server({
16
16
  name: "munin-mcp-server",
17
- version: "1.4.0",
17
+ version: "1.4.1",
18
18
  }, {
19
19
  capabilities: {
20
20
  tools: {},
@@ -176,7 +176,10 @@ export function createMcpServerInstance(env, opts) {
176
176
  key: { type: "string", description: "Memory key (provide this OR id, not both)" },
177
177
  id: { type: "string", description: "Memory ID (provide this OR key, not both)" },
178
178
  },
179
- required: ["key"],
179
+ oneOf: [
180
+ { required: ["key"] },
181
+ { required: ["id"] },
182
+ ],
180
183
  },
181
184
  },
182
185
  {
@@ -190,7 +193,11 @@ export function createMcpServerInstance(env, opts) {
190
193
  id: { type: "string", description: "Memory ID (provide this OR key, not both)" },
191
194
  version: { type: "number", description: "The version number to rollback to (required)" },
192
195
  },
193
- required: ["key", "version"],
196
+ required: ["version"],
197
+ oneOf: [
198
+ { required: ["key"] },
199
+ { required: ["id"] },
200
+ ],
194
201
  },
195
202
  },
196
203
  {
@@ -207,6 +214,22 @@ export function createMcpServerInstance(env, opts) {
207
214
  required: ["key", "v1", "v2"],
208
215
  },
209
216
  },
217
+ {
218
+ name: "munin_delete_memory",
219
+ description: "Permanently delete a memory by key or id from the current Munin Context Core. This action is destructive and cannot be undone — the memory and all its version history are removed. Use with caution. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
220
+ inputSchema: {
221
+ type: "object",
222
+ properties: {
223
+ projectId: { type: "string", description: "Optional. Defaults to active project." },
224
+ key: { type: "string", description: "Memory key (provide this OR id, not both)" },
225
+ id: { type: "string", description: "Memory ID (provide this OR key, not both)" }
226
+ },
227
+ oneOf: [
228
+ { required: ["key"] },
229
+ { required: ["id"] }
230
+ ]
231
+ }
232
+ },
210
233
  {
211
234
  name: "munin_acknowledge_setup",
212
235
  description: "Acknowledge that you have read the latest Munin setup guide. Call this AFTER reading the setup guide URL provided in any ERR_STALE_PROTOCOL response. Subsequent write actions (store, share) will then proceed without setup-version errors. Pass the version exactly as shown in the remediation hint.",
@@ -268,13 +291,25 @@ export function createMcpServerInstance(env, opts) {
268
291
  break;
269
292
  }
270
293
  case "munin_versions":
294
+ if (!args.key && !args.id) {
295
+ throw new Error("munin_versions requires either 'key' or 'id' to identify the target memory.");
296
+ }
271
297
  result = await client.invoke(projectId, "versions", { key: args.key, id: args.id });
272
298
  break;
273
299
  case "munin_rollback":
300
+ if (!args.key && !args.id) {
301
+ throw new Error("munin_rollback requires either 'key' or 'id' to identify the target memory.");
302
+ }
303
+ if (typeof args.version !== "number") {
304
+ throw new Error("munin_rollback requires a numeric 'version' to roll back to.");
305
+ }
274
306
  result = await client.invoke(projectId, "rollback", { key: args.key, id: args.id, version: args.version });
275
307
  break;
276
- case "munin_diff_memory":
277
- result = await client.invoke(projectId, "diff", { key: args.key, v1: args.v1, v2: args.v2 });
308
+ case "munin_delete_memory":
309
+ if (!args.key && !args.id) {
310
+ throw new Error("munin_delete_memory requires either 'key' or 'id' to identify the target memory.");
311
+ }
312
+ result = await client.invoke(projectId, "delete", { key: args.key, id: args.id });
278
313
  break;
279
314
  case "munin_acknowledge_setup":
280
315
  result = await client.invoke(projectId, "acknowledge_setup", { version: args.version });
package/package.json CHANGED
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@modelcontextprotocol/sdk": "^1.27.1",
15
- "@kalera/munin-sdk": "1.4.0"
15
+ "@kalera/munin-sdk": "1.4.2"
16
16
  },
17
- "version": "1.4.0",
17
+ "version": "1.4.2",
18
18
  "scripts": {
19
19
  "build": "tsc -p tsconfig.json",
20
20
  "lint": "tsc -p tsconfig.json --noEmit",
package/src/mcp-server.ts CHANGED
@@ -26,7 +26,7 @@ export function createMcpServerInstance(
26
26
  const server = new Server(
27
27
  {
28
28
  name: "munin-mcp-server",
29
- version: "1.4.0",
29
+ version: "1.4.1",
30
30
  },
31
31
  {
32
32
  capabilities: {
@@ -191,7 +191,10 @@ export function createMcpServerInstance(
191
191
  key: { type: "string", description: "Memory key (provide this OR id, not both)" },
192
192
  id: { type: "string", description: "Memory ID (provide this OR key, not both)" },
193
193
  },
194
- required: ["key"],
194
+ oneOf: [
195
+ { required: ["key"] },
196
+ { required: ["id"] },
197
+ ],
195
198
  },
196
199
  },
197
200
  {
@@ -205,7 +208,11 @@ export function createMcpServerInstance(
205
208
  id: { type: "string", description: "Memory ID (provide this OR key, not both)" },
206
209
  version: { type: "number", description: "The version number to rollback to (required)" },
207
210
  },
208
- required: ["key", "version"],
211
+ required: ["version"],
212
+ oneOf: [
213
+ { required: ["key"] },
214
+ { required: ["id"] },
215
+ ],
209
216
  },
210
217
  },
211
218
  {
@@ -222,6 +229,22 @@ export function createMcpServerInstance(
222
229
  required: ["key", "v1", "v2"],
223
230
  },
224
231
  },
232
+ {
233
+ name: "munin_delete_memory",
234
+ description: "Permanently delete a memory by key or id from the current Munin Context Core. This action is destructive and cannot be undone — the memory and all its version history are removed. Use with caution. IMPORTANT: Call this as an MCP tool, NOT as a shell command.",
235
+ inputSchema: {
236
+ type: "object",
237
+ properties: {
238
+ projectId: { type: "string", description: "Optional. Defaults to active project." },
239
+ key: { type: "string", description: "Memory key (provide this OR id, not both)" },
240
+ id: { type: "string", description: "Memory ID (provide this OR key, not both)" }
241
+ },
242
+ oneOf: [
243
+ { required: ["key"] },
244
+ { required: ["id"] }
245
+ ]
246
+ }
247
+ },
225
248
  {
226
249
  name: "munin_acknowledge_setup",
227
250
  description: "Acknowledge that you have read the latest Munin setup guide. Call this AFTER reading the setup guide URL provided in any ERR_STALE_PROTOCOL response. Subsequent write actions (store, share) will then proceed without setup-version errors. Pass the version exactly as shown in the remediation hint.",
@@ -291,13 +314,25 @@ export function createMcpServerInstance(
291
314
  break;
292
315
  }
293
316
  case "munin_versions":
317
+ if (!args.key && !args.id) {
318
+ throw new Error("munin_versions requires either 'key' or 'id' to identify the target memory.");
319
+ }
294
320
  result = await client.invoke(projectId, "versions", { key: args.key, id: args.id });
295
321
  break;
296
322
  case "munin_rollback":
323
+ if (!args.key && !args.id) {
324
+ throw new Error("munin_rollback requires either 'key' or 'id' to identify the target memory.");
325
+ }
326
+ if (typeof args.version !== "number") {
327
+ throw new Error("munin_rollback requires a numeric 'version' to roll back to.");
328
+ }
297
329
  result = await client.invoke(projectId, "rollback", { key: args.key, id: args.id, version: args.version });
298
330
  break;
299
- case "munin_diff_memory":
300
- result = await client.invoke(projectId, "diff", { key: args.key, v1: args.v1, v2: args.v2 });
331
+ case "munin_delete_memory":
332
+ if (!args.key && !args.id) {
333
+ throw new Error("munin_delete_memory requires either 'key' or 'id' to identify the target memory.");
334
+ }
335
+ result = await client.invoke(projectId, "delete", { key: args.key, id: args.id });
301
336
  break;
302
337
  case "munin_acknowledge_setup":
303
338
  result = await client.invoke(projectId, "acknowledge_setup", { version: args.version });