@kalera/munin-openclaw 1.0.0 → 1.1.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.
- package/.turbo/turbo-build.log +1 -1
- package/SKILL.md +12 -11
- package/dist/index.d.ts +8 -8
- package/dist/index.js +100 -7
- package/openclaw.plugin.json +23 -0
- package/package.json +9 -9
- package/src/index.ts +112 -13
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -34
- package/src/cli.ts +0 -47
package/.turbo/turbo-build.log
CHANGED
package/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "@kalera/munin-openclaw"
|
|
3
|
-
description: "Munin - The $1.6/mo Persistent Memory for OpenClaw. Stop your agent from having Alzheimer's."
|
|
3
|
+
description: "Munin - The Free (or $1.6/mo) Persistent Memory for OpenClaw. Stop your agent from having Alzheimer's."
|
|
4
4
|
version: "1.0.0"
|
|
5
5
|
metadata:
|
|
6
6
|
clawdbot:
|
|
7
7
|
type: "plugin"
|
|
8
8
|
permissions:
|
|
9
|
-
env: ["MUNIN_BASE_URL", "
|
|
9
|
+
env: ["MUNIN_BASE_URL", "MUNIN_API_KEY"]
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# 🐦 Munin: Reliable Memory for Your OpenClaw Agent
|
|
@@ -15,15 +15,15 @@ Your agent forgets everything the moment you close the tab. You've seen the "pro
|
|
|
15
15
|
|
|
16
16
|
We think that's insane.
|
|
17
17
|
|
|
18
|
-
**Munin
|
|
18
|
+
**Munin** is the pragmatic alternative. It’s the "Reliable Friend" that sits on your agent’s shoulder and whispers: *"Hey, remember when pa Kal said he preferred Python over Node last week?"*
|
|
19
19
|
|
|
20
20
|
### 💰 Why Munin? (The "No-Brainer" Math)
|
|
21
21
|
|
|
22
22
|
| Feature | Mem0 / Zep | **Munin** |
|
|
23
23
|
| :--- | :--- | :--- |
|
|
24
|
-
| **Monthly Cost** | $19.00 - $249.00 |
|
|
24
|
+
| **Monthly Cost** | $19.00 - $249.00 | **Free** (or $1.60 Pro) |
|
|
25
25
|
| **MCP Support** | Mixed | **Native / First-class** |
|
|
26
|
-
| **
|
|
26
|
+
| **Zero-Knowledge E2EE** | Optional / Complex | **Built-in (Client-side)** |
|
|
27
27
|
| **Bullshit Factor** | High (Enterprise-synergy) | **Zero (Developer-first)** |
|
|
28
28
|
|
|
29
29
|
**That’s a 10x - 150x price gap.** We aren't building "Enterprise Synergy Platforms". We're building a notebook for your AI.
|
|
@@ -33,14 +33,14 @@ We think that's insane.
|
|
|
33
33
|
## 🔒 Security & Privacy
|
|
34
34
|
|
|
35
35
|
**Trust Statement:**
|
|
36
|
-
Data stays where you tell it to stay.
|
|
36
|
+
Data stays where you tell it to stay. All data is encrypted locally (if E2EE is enabled) and isolated by your Context Core. We are completely blind to your plaintext.
|
|
37
37
|
|
|
38
38
|
**External Endpoints:**
|
|
39
39
|
Data is sent ONLY to your `MUNIN_BASE_URL`. We don't phone home. We don't sell your "memories" to train models.
|
|
40
40
|
|
|
41
|
-
## 💎
|
|
41
|
+
## 💎 E2EE with GraphRAG (Elite Tier)
|
|
42
42
|
|
|
43
|
-
If your Munin project has **
|
|
43
|
+
If your Munin project has **E2EE with GraphRAG** enabled, standard E2EE rules apply PLUS:
|
|
44
44
|
- You **MUST** generate a vector embedding of the plaintext content locally before encrypting.
|
|
45
45
|
- You **MUST** include the embedding array in the `store` payload: `{ "content": "encrypted...", "embedding": [0.1, -0.02, ...], "encryptionMeta": {...} }`.
|
|
46
46
|
- Munin will use this vector for zero-knowledge semantic search. It will reject the request if the embedding is missing.
|
|
@@ -49,13 +49,14 @@ If your Munin project has **Quantum E2EE** enabled, standard E2EE rules apply PL
|
|
|
49
49
|
|
|
50
50
|
## 🚀 Setup (Fast & Honest)
|
|
51
51
|
|
|
52
|
-
1. **Get your Munin
|
|
52
|
+
1. **Get your Munin key:** Grab a **free** cloud key at [munin.kalera.dev](https://munin.kalera.dev).
|
|
53
53
|
2. **Configure OpenClaw:** Add these to your `.env` or agent config:
|
|
54
54
|
- `MUNIN_BASE_URL`: Where your Munin lives (e.g., `https://munin.kalera.dev`).
|
|
55
|
-
- `MUNIN_PROJECT`: Your project name (e.g., `research-agent`).
|
|
56
55
|
- `MUNIN_API_KEY`: Your key to the kingdom.
|
|
57
56
|
|
|
57
|
+
*(Note: Provide your agent with the `Context Core ID` in its system prompt so it knows which project to use when making tool calls).*
|
|
58
|
+
|
|
58
59
|
3. **Profit:** Your agent now has long-term memory. No more repeating yourself.
|
|
59
60
|
|
|
60
61
|
---
|
|
61
|
-
*Built with ❤️ by Kalera for the OpenClaw Ecosystem.*
|
|
62
|
+
*Built with ❤️ by Kalera for the OpenClaw Ecosystem.*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
configSchema: import("openclaw/plugin-sdk").OpenClawPluginConfigSchema;
|
|
6
|
+
register: NonNullable<import("openclaw/plugin-sdk/plugin-runtime").OpenClawPluginDefinition["register"]>;
|
|
7
|
+
} & Pick<import("openclaw/plugin-sdk/plugin-runtime").OpenClawPluginDefinition, "kind">;
|
|
8
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,101 @@
|
|
|
1
|
+
import { definePluginEntry } from "openclaw/plugin-sdk/core";
|
|
1
2
|
import { MuninClient } from "@kalera/munin-sdk";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export default definePluginEntry({
|
|
6
|
+
id: "munin-memory",
|
|
7
|
+
name: "Munin ContextKeep",
|
|
8
|
+
description: "Persistent memory tools for OpenClaw agents.",
|
|
9
|
+
kind: "memory",
|
|
10
|
+
configSchema: z.object({
|
|
11
|
+
baseUrl: z
|
|
12
|
+
.string()
|
|
13
|
+
.default("https://munin.kalera.dev")
|
|
14
|
+
.describe("The base URL for your Munin ContextKeep server."),
|
|
15
|
+
apiKey: z.string().describe("Your API key for Munin."),
|
|
16
|
+
}),
|
|
17
|
+
register(api) {
|
|
18
|
+
const baseUrl = api.pluginConfig?.baseUrl ||
|
|
19
|
+
process.env.MUNIN_BASE_URL ||
|
|
20
|
+
"https://munin.kalera.dev";
|
|
21
|
+
const apiKey = api.pluginConfig?.apiKey || process.env.MUNIN_API_KEY;
|
|
22
|
+
if (!apiKey) {
|
|
23
|
+
api.logger.warn("Munin API key is missing. ContextKeep tools will not be registered.");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const client = new MuninClient({ baseUrl, apiKey });
|
|
27
|
+
api.registerTool({
|
|
28
|
+
name: "munin_store_memory",
|
|
29
|
+
label: "Store Munin Memory",
|
|
30
|
+
description: "Store a new memory or update an existing one in ContextKeep.",
|
|
31
|
+
parameters: Type.Object({
|
|
32
|
+
projectId: Type.String({
|
|
33
|
+
description: "The Context Core ID for isolation.",
|
|
34
|
+
}),
|
|
35
|
+
key: Type.String({ description: "Unique identifier for the memory." }),
|
|
36
|
+
content: Type.String({ description: "The content of the memory." }),
|
|
37
|
+
tags: Type.Optional(Type.String({ description: "Comma-separated list of tags." })),
|
|
38
|
+
title: Type.Optional(Type.String({ description: "Human-readable title." })),
|
|
39
|
+
}),
|
|
40
|
+
async execute(_toolCallId, params) {
|
|
41
|
+
const { projectId, ...payload } = params;
|
|
42
|
+
const res = await client.invoke(projectId, "store", payload);
|
|
43
|
+
return {
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: "text",
|
|
47
|
+
text: JSON.stringify(res.data, null, 2),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
details: res.data,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
api.registerTool({
|
|
55
|
+
name: "munin_retrieve_memory",
|
|
56
|
+
label: "Retrieve Munin Memory",
|
|
57
|
+
description: "Retrieve a memory by its key from ContextKeep.",
|
|
58
|
+
parameters: Type.Object({
|
|
59
|
+
projectId: Type.String({ description: "The Context Core ID." }),
|
|
60
|
+
key: Type.String({
|
|
61
|
+
description: "The unique identifier of the memory.",
|
|
62
|
+
}),
|
|
63
|
+
}),
|
|
64
|
+
async execute(_toolCallId, params) {
|
|
65
|
+
const { projectId, key } = params;
|
|
66
|
+
const res = await client.invoke(projectId, "retrieve", { key });
|
|
67
|
+
return {
|
|
68
|
+
content: [
|
|
69
|
+
{
|
|
70
|
+
type: "text",
|
|
71
|
+
text: JSON.stringify(res.data, null, 2),
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
details: res.data,
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
api.registerTool({
|
|
79
|
+
name: "munin_search_memories",
|
|
80
|
+
label: "Search Munin Memories",
|
|
81
|
+
description: "Search for memories by key, title, or content in ContextKeep.",
|
|
82
|
+
parameters: Type.Object({
|
|
83
|
+
projectId: Type.String({ description: "The Context Core ID." }),
|
|
84
|
+
query: Type.String({ description: "The search term." }),
|
|
85
|
+
}),
|
|
86
|
+
async execute(_toolCallId, params) {
|
|
87
|
+
const { projectId, query } = params;
|
|
88
|
+
const res = await client.invoke(projectId, "search", { query });
|
|
89
|
+
return {
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
type: "text",
|
|
93
|
+
text: JSON.stringify(res.data, null, 2),
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
details: res.data,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "munin-memory",
|
|
3
|
+
"name": "Munin ContextKeep",
|
|
4
|
+
"description": "Persistent memory and Context Core for OpenClaw agents.",
|
|
5
|
+
"kind": "memory",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"baseUrl": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"default": "https://munin.kalera.dev",
|
|
13
|
+
"description": "The base URL for your Munin ContextKeep server."
|
|
14
|
+
},
|
|
15
|
+
"apiKey": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Your API key for Munin."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["apiKey"]
|
|
21
|
+
},
|
|
22
|
+
"skills": ["."]
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalera/munin-openclaw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"openclaw": {
|
|
6
6
|
"extensions": [
|
|
7
|
-
"./dist/
|
|
7
|
+
"./dist/index.js"
|
|
8
8
|
],
|
|
9
9
|
"requires": {
|
|
10
10
|
"env": [
|
|
11
11
|
"MUNIN_BASE_URL",
|
|
12
|
-
"
|
|
12
|
+
"MUNIN_API_KEY"
|
|
13
13
|
]
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"bin": {
|
|
17
|
-
"munin-openclaw": "dist/cli.js"
|
|
18
|
-
},
|
|
19
16
|
"dependencies": {
|
|
20
|
-
"@kalera/munin-
|
|
21
|
-
"@kalera/munin-
|
|
17
|
+
"@kalera/munin-sdk": "1.0.0",
|
|
18
|
+
"@kalera/munin-runtime": "1.0.0"
|
|
22
19
|
},
|
|
23
20
|
"devDependencies": {
|
|
24
|
-
"
|
|
21
|
+
"@sinclair/typebox": "^0.34.49",
|
|
22
|
+
"openclaw": "^2026.3.28",
|
|
23
|
+
"typescript": "^5.9.2",
|
|
24
|
+
"zod": "^4.3.6"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc -p tsconfig.json",
|
package/src/index.ts
CHANGED
|
@@ -1,16 +1,115 @@
|
|
|
1
|
+
import { definePluginEntry } from "openclaw/plugin-sdk/core";
|
|
1
2
|
import { MuninClient } from "@kalera/munin-sdk";
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
4
|
+
import { z } from "zod";
|
|
2
5
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export default definePluginEntry({
|
|
7
|
+
id: "munin-memory",
|
|
8
|
+
name: "Munin ContextKeep",
|
|
9
|
+
description: "Persistent memory tools for OpenClaw agents.",
|
|
10
|
+
kind: "memory",
|
|
11
|
+
configSchema: z.object({
|
|
12
|
+
baseUrl: z
|
|
13
|
+
.string()
|
|
14
|
+
.default("https://munin.kalera.dev")
|
|
15
|
+
.describe("The base URL for your Munin ContextKeep server."),
|
|
16
|
+
apiKey: z.string().describe("Your API key for Munin."),
|
|
17
|
+
}) as any,
|
|
18
|
+
register(api) {
|
|
19
|
+
const baseUrl =
|
|
20
|
+
(api.pluginConfig?.baseUrl as string) ||
|
|
21
|
+
process.env.MUNIN_BASE_URL ||
|
|
22
|
+
"https://munin.kalera.dev";
|
|
23
|
+
const apiKey =
|
|
24
|
+
(api.pluginConfig?.apiKey as string) || process.env.MUNIN_API_KEY;
|
|
10
25
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
26
|
+
if (!apiKey) {
|
|
27
|
+
api.logger.warn(
|
|
28
|
+
"Munin API key is missing. ContextKeep tools will not be registered.",
|
|
29
|
+
);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const client = new MuninClient({ baseUrl, apiKey });
|
|
34
|
+
|
|
35
|
+
api.registerTool({
|
|
36
|
+
name: "munin_store_memory",
|
|
37
|
+
label: "Store Munin Memory",
|
|
38
|
+
description: "Store a new memory or update an existing one in ContextKeep.",
|
|
39
|
+
parameters: Type.Object({
|
|
40
|
+
projectId: Type.String({
|
|
41
|
+
description: "The Context Core ID for isolation.",
|
|
42
|
+
}),
|
|
43
|
+
key: Type.String({ description: "Unique identifier for the memory." }),
|
|
44
|
+
content: Type.String({ description: "The content of the memory." }),
|
|
45
|
+
tags: Type.Optional(
|
|
46
|
+
Type.String({ description: "Comma-separated list of tags." }),
|
|
47
|
+
),
|
|
48
|
+
title: Type.Optional(
|
|
49
|
+
Type.String({ description: "Human-readable title." }),
|
|
50
|
+
),
|
|
51
|
+
}),
|
|
52
|
+
async execute(_toolCallId: string, params: any) {
|
|
53
|
+
const { projectId, ...payload } = params;
|
|
54
|
+
const res = await client.invoke(projectId, "store", payload);
|
|
55
|
+
return {
|
|
56
|
+
content: [
|
|
57
|
+
{
|
|
58
|
+
type: "text",
|
|
59
|
+
text: JSON.stringify(res.data, null, 2),
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
details: res.data,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
api.registerTool({
|
|
68
|
+
name: "munin_retrieve_memory",
|
|
69
|
+
label: "Retrieve Munin Memory",
|
|
70
|
+
description: "Retrieve a memory by its key from ContextKeep.",
|
|
71
|
+
parameters: Type.Object({
|
|
72
|
+
projectId: Type.String({ description: "The Context Core ID." }),
|
|
73
|
+
key: Type.String({
|
|
74
|
+
description: "The unique identifier of the memory.",
|
|
75
|
+
}),
|
|
76
|
+
}),
|
|
77
|
+
async execute(_toolCallId: string, params: any) {
|
|
78
|
+
const { projectId, key } = params;
|
|
79
|
+
const res = await client.invoke(projectId, "retrieve", { key });
|
|
80
|
+
return {
|
|
81
|
+
content: [
|
|
82
|
+
{
|
|
83
|
+
type: "text",
|
|
84
|
+
text: JSON.stringify(res.data, null, 2),
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
details: res.data,
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
api.registerTool({
|
|
93
|
+
name: "munin_search_memories",
|
|
94
|
+
label: "Search Munin Memories",
|
|
95
|
+
description: "Search for memories by key, title, or content in ContextKeep.",
|
|
96
|
+
parameters: Type.Object({
|
|
97
|
+
projectId: Type.String({ description: "The Context Core ID." }),
|
|
98
|
+
query: Type.String({ description: "The search term." }),
|
|
99
|
+
}),
|
|
100
|
+
async execute(_toolCallId: string, params: any) {
|
|
101
|
+
const { projectId, query } = params;
|
|
102
|
+
const res = await client.invoke(projectId, "search", { query });
|
|
103
|
+
return {
|
|
104
|
+
content: [
|
|
105
|
+
{
|
|
106
|
+
type: "text",
|
|
107
|
+
text: JSON.stringify(res.data, null, 2),
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
details: res.data,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
});
|
package/dist/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/cli.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { executeWithRetry, loadCliEnv, parseCliArgs, safeError, startMcpServer, } from "@kalera/munin-runtime";
|
|
2
|
-
import { createOpenClawMuninAdapter } from "./index.js";
|
|
3
|
-
async function main() {
|
|
4
|
-
try {
|
|
5
|
-
const args = process.argv.slice(2);
|
|
6
|
-
// If no arguments, or 'mcp' is passed, start as MCP server
|
|
7
|
-
if (args.length === 0 || args[0] === 'mcp') {
|
|
8
|
-
await startMcpServer();
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const { action, payload } = parseCliArgs(args, "Usage: munin-openclaw <action> [payload-json] OR munin-openclaw mcp");
|
|
12
|
-
const env = loadCliEnv();
|
|
13
|
-
const adapter = createOpenClawMuninAdapter({
|
|
14
|
-
baseUrl: env.baseUrl,
|
|
15
|
-
apiKey: env.apiKey,
|
|
16
|
-
timeoutMs: env.timeoutMs,
|
|
17
|
-
});
|
|
18
|
-
const result = await executeWithRetry(async () => {
|
|
19
|
-
if (action === "capabilities") {
|
|
20
|
-
return { ok: true, data: await adapter.capabilities() };
|
|
21
|
-
}
|
|
22
|
-
const { projectId, ...p } = payload;
|
|
23
|
-
if (!projectId)
|
|
24
|
-
throw new Error("projectId required in payload");
|
|
25
|
-
return adapter.execute(projectId, action, p);
|
|
26
|
-
}, env.retries, env.backoffMs);
|
|
27
|
-
console.log(JSON.stringify(result, null, 2));
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
console.error(JSON.stringify({ ok: false, error: safeError(error) }));
|
|
31
|
-
process.exitCode = 1;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
void main();
|
package/src/cli.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
executeWithRetry,
|
|
3
|
-
loadCliEnv,
|
|
4
|
-
parseCliArgs,
|
|
5
|
-
safeError,
|
|
6
|
-
startMcpServer,
|
|
7
|
-
} from "@kalera/munin-runtime";
|
|
8
|
-
import { createOpenClawMuninAdapter } from "./index.js";
|
|
9
|
-
|
|
10
|
-
async function main() {
|
|
11
|
-
try {
|
|
12
|
-
const args = process.argv.slice(2);
|
|
13
|
-
|
|
14
|
-
// If no arguments, or 'mcp' is passed, start as MCP server
|
|
15
|
-
if (args.length === 0 || args[0] === 'mcp') {
|
|
16
|
-
await startMcpServer();
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const { action, payload } = parseCliArgs(
|
|
21
|
-
args,
|
|
22
|
-
"Usage: munin-openclaw <action> [payload-json] OR munin-openclaw mcp",
|
|
23
|
-
);
|
|
24
|
-
const env = loadCliEnv();
|
|
25
|
-
|
|
26
|
-
const adapter = createOpenClawMuninAdapter({
|
|
27
|
-
baseUrl: env.baseUrl,
|
|
28
|
-
apiKey: env.apiKey,
|
|
29
|
-
|
|
30
|
-
timeoutMs: env.timeoutMs,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const result = await executeWithRetry(async () => {
|
|
34
|
-
if (action === "capabilities") {
|
|
35
|
-
return { ok: true, data: await adapter.capabilities() };
|
|
36
|
-
}
|
|
37
|
-
const { projectId, ...p } = payload; if (!projectId) throw new Error("projectId required in payload"); return adapter.execute(projectId as string, action, p);
|
|
38
|
-
}, env.retries, env.backoffMs);
|
|
39
|
-
|
|
40
|
-
console.log(JSON.stringify(result, null, 2));
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.error(JSON.stringify({ ok: false, error: safeError(error) }));
|
|
43
|
-
process.exitCode = 1;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
void main();
|