@kalera/munin-claude 0.1.0 → 1.0.1

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-claude@0.1.0 build /home/runner/work/munin-for-agents/munin-for-agents/adapters/claude
2
+ > @kalera/munin-claude@1.0.1 build /home/runner/work/munin-for-agents/munin-for-agents/adapters/claude
3
3
  > tsc -p tsconfig.json
4
4
 
package/README.md CHANGED
@@ -11,10 +11,19 @@
11
11
  import { createClaudeCodeMuninAdapter } from "@kalera/munin-claude";
12
12
 
13
13
  const adapter = createClaudeCodeMuninAdapter({
14
- baseUrl: process.env.MUNIN_BASE_URL!,
15
14
  apiKey: process.env.MUNIN_API_KEY,
16
- project: process.env.MUNIN_PROJECT ?? "default",
15
+ project: process.env.MUNIN_PROJECT ?? "default-core",
17
16
  });
18
17
 
19
18
  await adapter.execute("search", { query: "ecosystem" });
20
19
  ```
20
+
21
+ ## Setup as MCP Server
22
+
23
+ To use this adapter as a standard MCP server in Claude Desktop or other clients:
24
+
25
+ ```bash
26
+ export MUNIN_API_KEY="your-api-key"
27
+ export MUNIN_PROJECT="your-context-core-id"
28
+ npx -y @kalera/munin-claude mcp
29
+ ```
package/dist/cli.js CHANGED
@@ -13,14 +13,16 @@ async function main() {
13
13
  const adapter = createClaudeCodeMuninAdapter({
14
14
  baseUrl: env.baseUrl,
15
15
  apiKey: env.apiKey,
16
- project: env.project,
17
16
  timeoutMs: env.timeoutMs,
18
17
  });
19
18
  const result = await executeWithRetry(async () => {
20
19
  if (action === "capabilities") {
21
20
  return { ok: true, data: await adapter.capabilities() };
22
21
  }
23
- return adapter.execute(action, payload);
22
+ const { projectId, ...p } = payload;
23
+ if (!projectId)
24
+ throw new Error("projectId required in payload");
25
+ return adapter.execute(projectId, action, p);
24
26
  }, env.retries, env.backoffMs);
25
27
  console.log(JSON.stringify(result, null, 2));
26
28
  }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  export declare function createClaudeCodeMuninAdapter(config: {
2
- baseUrl: string;
2
+ baseUrl?: string;
3
3
  apiKey?: string;
4
- project: string;
5
4
  timeoutMs?: number;
6
5
  }): {
7
- execute: (action: string, payload: Record<string, unknown>) => Promise<import("@kalera/munin-sdk").MuninResponse<unknown>>;
6
+ execute: (projectId: string, action: string, payload: Record<string, unknown>) => Promise<import("@kalera/munin-sdk").MuninResponse<unknown>>;
8
7
  capabilities: () => Promise<import("@kalera/munin-sdk").MuninCapabilities>;
9
8
  };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { MuninClient } from "@kalera/munin-sdk";
2
2
  export function createClaudeCodeMuninAdapter(config) {
3
3
  const client = new MuninClient(config);
4
4
  return {
5
- execute: async (action, payload) => client.invoke(action, payload, { ensureCapability: true }),
5
+ execute: async (projectId, action, payload) => client.invoke(projectId, action, payload, { ensureCapability: true }),
6
6
  capabilities: () => client.capabilities(),
7
7
  };
8
8
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@kalera/munin-claude",
3
- "version": "0.1.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "munin-claude": "dist/cli.js"
7
7
  },
8
8
  "dependencies": {
9
- "@kalera/munin-sdk": "0.1.0",
10
- "@kalera/munin-runtime": "0.1.0"
9
+ "@kalera/munin-sdk": "1.0.1",
10
+ "@kalera/munin-runtime": "1.0.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "typescript": "^5.9.2"
package/src/cli.ts CHANGED
@@ -26,7 +26,7 @@ async function main() {
26
26
  const adapter = createClaudeCodeMuninAdapter({
27
27
  baseUrl: env.baseUrl,
28
28
  apiKey: env.apiKey,
29
- project: env.project,
29
+
30
30
  timeoutMs: env.timeoutMs,
31
31
  });
32
32
 
@@ -34,7 +34,7 @@ async function main() {
34
34
  if (action === "capabilities") {
35
35
  return { ok: true, data: await adapter.capabilities() };
36
36
  }
37
- return adapter.execute(action, payload);
37
+ const { projectId, ...p } = payload; if (!projectId) throw new Error("projectId required in payload"); return adapter.execute(projectId as string, action, p);
38
38
  }, env.retries, env.backoffMs);
39
39
 
40
40
  console.log(JSON.stringify(result, null, 2));
package/src/index.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import { MuninClient } from "@kalera/munin-sdk";
2
2
 
3
3
  export function createClaudeCodeMuninAdapter(config: {
4
- baseUrl: string;
4
+ baseUrl?: string;
5
5
  apiKey?: string;
6
- project: string;
6
+
7
7
  timeoutMs?: number;
8
8
  }) {
9
9
  const client = new MuninClient(config);
10
10
 
11
11
  return {
12
- execute: async (action: string, payload: Record<string, unknown>) =>
13
- client.invoke(action as any, payload, { ensureCapability: true }),
12
+ execute: async (projectId: string, action: string, payload: Record<string, unknown>) =>
13
+ client.invoke(projectId, action as any, payload, { ensureCapability: true }),
14
14
  capabilities: () => client.capabilities(),
15
15
  };
16
16
  }