@kalera/munin-gemini 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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @kalera/munin-gemini@1.0.0 build /home/runner/work/munin-for-agents/munin-for-agents/adapters/gemini
2
+ > @kalera/munin-gemini@1.0.2 build /home/runner/work/munin-for-agents/munin-for-agents/adapters/gemini
3
3
  > tsc -p tsconfig.json
4
4
 
package/README.md CHANGED
@@ -11,10 +11,20 @@
11
11
  import { createGeminiCliMuninAdapter } from "@kalera/munin-gemini";
12
12
 
13
13
  const adapter = createGeminiCliMuninAdapter({
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
- await adapter.callTool("list", { limit: 10 });
18
+ await adapter.callTool("your-context-core-id", "list", { limit: 10 });
19
+ ```
20
+
21
+ ## Setup as Extension
22
+
23
+ To use this adapter as an extension for Gemini CLI:
24
+
25
+ 1. Create a `gemini-extension.json` (see examples in this repo).
26
+ 2. Configure environment variables:
27
+ ```bash
28
+ export MUNIN_API_KEY="your-api-key"
29
+ export MUNIN_PROJECT="your-context-core-id"
20
30
  ```
package/dist/cli.js CHANGED
@@ -1,8 +1,14 @@
1
- import { executeWithRetry, loadCliEnv, parseCliArgs, safeError, } from "@kalera/munin-runtime";
1
+ import { executeWithRetry, loadCliEnv, parseCliArgs, safeError, startMcpServer, } from "@kalera/munin-runtime";
2
2
  import { createGeminiCliMuninAdapter } from "./index.js";
3
3
  async function main() {
4
4
  try {
5
- const { action, payload } = parseCliArgs(process.argv.slice(2), "Usage: munin-gemini <tool-name> [payload-json]");
5
+ const args = process.argv.slice(2);
6
+ // Start MCP server if requested or empty args
7
+ if (args.length === 0 || args[0] === 'mcp') {
8
+ await startMcpServer();
9
+ return;
10
+ }
11
+ const { action, payload } = parseCliArgs(args, "Usage: munin-gemini <tool-name> [payload-json] OR munin-gemini mcp");
6
12
  const env = loadCliEnv();
7
13
  const adapter = createGeminiCliMuninAdapter({
8
14
  baseUrl: env.baseUrl,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare function createGeminiCliMuninAdapter(config: {
2
- baseUrl: string;
2
+ baseUrl?: string;
3
3
  apiKey?: string;
4
4
  timeoutMs?: number;
5
5
  }): {
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ export function createGeminiCliMuninAdapter(config) {
7
7
  };
8
8
  }
9
9
  // Ensure defaults for Gemini CLI if run as an extension
10
- const baseUrl = process.env.MUNIN_BASE_URL || "http://127.0.0.1:3237";
10
+ const baseUrl = process.env.MUNIN_BASE_URL || "https://munin.kalera.dev";
11
11
  const apiKey = process.env.MUNIN_API_KEY;
12
12
  const extensionClient = new MuninClient({ baseUrl, apiKey });
13
13
  export const tools = [
@@ -1,9 +1,30 @@
1
1
  {
2
2
  "name": "kalera-munin",
3
- "version": "1.0.0",
4
- "description": "Kalera Munin - Long-Term Memory extension for Gemini CLI",
5
- "main": "dist/index.js",
3
+ "version": "1.0.4",
4
+ "description": "Kalera Munin - Long-Term Memory with GraphRAG Context Cores for Gemini CLI",
5
+ "topics": ["memory", "agent", "kalera", "context", "mcp"],
6
6
  "permissions": {
7
- "env": ["MUNIN_BASE_URL", "MUNIN_PROJECT", "MUNIN_API_KEY"]
7
+ "env": [
8
+ "MUNIN_PROJECT",
9
+ "MUNIN_API_KEY"
10
+ ]
11
+ },
12
+ "settings": [
13
+ {
14
+ "name": "API Key",
15
+ "description": "Munin API Key for authentication.",
16
+ "envVar": "MUNIN_API_KEY"
17
+ },
18
+ {
19
+ "name": "Project ID",
20
+ "description": "Default Context Core (Project) ID for Munin. (Optional)",
21
+ "envVar": "MUNIN_PROJECT"
22
+ }
23
+ ],
24
+ "mcpServers": {
25
+ "munin-mcp": {
26
+ "command": "npx",
27
+ "args": ["-y", "@kalera/munin-gemini@latest", "mcp"]
28
+ }
8
29
  }
9
30
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@kalera/munin-gemini",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "munin-gemini": "dist/cli.js"
7
7
  },
8
8
  "dependencies": {
9
- "@kalera/munin-sdk": "1.0.0",
10
- "@kalera/munin-runtime": "1.0.0"
9
+ "@kalera/munin-runtime": "1.0.2",
10
+ "@kalera/munin-sdk": "1.0.2"
11
11
  },
12
12
  "devDependencies": {
13
13
  "typescript": "^5.9.2"
package/src/cli.ts CHANGED
@@ -3,21 +3,29 @@ import {
3
3
  loadCliEnv,
4
4
  parseCliArgs,
5
5
  safeError,
6
+ startMcpServer,
6
7
  } from "@kalera/munin-runtime";
7
8
  import { createGeminiCliMuninAdapter } from "./index.js";
8
9
 
9
10
  async function main() {
10
11
  try {
12
+ const args = process.argv.slice(2);
13
+
14
+ // Start MCP server if requested or empty args
15
+ if (args.length === 0 || args[0] === 'mcp') {
16
+ await startMcpServer();
17
+ return;
18
+ }
19
+
11
20
  const { action, payload } = parseCliArgs(
12
- process.argv.slice(2),
13
- "Usage: munin-gemini <tool-name> [payload-json]",
21
+ args,
22
+ "Usage: munin-gemini <tool-name> [payload-json] OR munin-gemini mcp",
14
23
  );
15
24
  const env = loadCliEnv();
16
25
 
17
26
  const adapter = createGeminiCliMuninAdapter({
18
27
  baseUrl: env.baseUrl,
19
28
  apiKey: env.apiKey,
20
-
21
29
  timeoutMs: env.timeoutMs,
22
30
  });
23
31
 
@@ -25,7 +33,9 @@ async function main() {
25
33
  if (action === "capabilities") {
26
34
  return { ok: true, data: await adapter.capabilities() };
27
35
  }
28
- const { projectId, ...p } = payload; if (!projectId) throw new Error("projectId required in payload"); return adapter.callTool(projectId as string, action, p);
36
+ const { projectId, ...p } = payload;
37
+ if (!projectId) throw new Error("projectId required in payload");
38
+ return adapter.callTool(projectId as string, action, p);
29
39
  }, env.retries, env.backoffMs);
30
40
 
31
41
  console.log(JSON.stringify(result, null, 2));
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MuninClient } from "@kalera/munin-sdk";
2
2
 
3
3
  export function createGeminiCliMuninAdapter(config: {
4
- baseUrl: string;
4
+ baseUrl?: string;
5
5
  apiKey?: string;
6
6
  timeoutMs?: number;
7
7
  }) {
@@ -15,7 +15,7 @@ export function createGeminiCliMuninAdapter(config: {
15
15
  }
16
16
 
17
17
  // Ensure defaults for Gemini CLI if run as an extension
18
- const baseUrl = process.env.MUNIN_BASE_URL || "http://127.0.0.1:3237";
18
+ const baseUrl = process.env.MUNIN_BASE_URL || "https://munin.kalera.dev";
19
19
  const apiKey = process.env.MUNIN_API_KEY;
20
20
 
21
21
  const extensionClient = new MuninClient({ baseUrl, apiKey });