@kalera/munin-sdk 1.2.6 → 1.2.9
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/README.md +64 -0
- package/dist/client.js +1 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/test/client.test.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @kalera/munin-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for [Munin Context Core](https://munin.kalera.dev) — a long-term memory system for AI agents with E2EE and GraphRAG.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @kalera/munin-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { MuninClient } from "@kalera/munin-sdk";
|
|
15
|
+
|
|
16
|
+
const client = new MuninClient({
|
|
17
|
+
baseUrl: "https://munin.kalera.dev",
|
|
18
|
+
apiKey: process.env.MUNIN_API_KEY,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Store a memory
|
|
22
|
+
await client.store("my-project", {
|
|
23
|
+
key: "architecture-decision-001",
|
|
24
|
+
content: "We chose PostgreSQL over MongoDB for ACID compliance.",
|
|
25
|
+
tags: ["architecture", "database"],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Retrieve it
|
|
29
|
+
const result = await client.retrieve("my-project", { key: "architecture-decision-001" });
|
|
30
|
+
|
|
31
|
+
// Semantic search
|
|
32
|
+
const search = await client.search("my-project", { query: "database decisions" });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## API
|
|
36
|
+
|
|
37
|
+
### `new MuninClient(config?)`
|
|
38
|
+
|
|
39
|
+
| Option | Default | Description |
|
|
40
|
+
|--------|---------|-------------|
|
|
41
|
+
| `baseUrl` | `https://munin.kalera.dev` | Munin API base URL |
|
|
42
|
+
| `apiKey` | — | API key (`MUNIN_API_KEY`) |
|
|
43
|
+
| `timeoutMs` | `15000` | Request timeout in milliseconds |
|
|
44
|
+
| `fetchImpl` | global `fetch` | Custom fetch implementation |
|
|
45
|
+
|
|
46
|
+
### Methods
|
|
47
|
+
|
|
48
|
+
| Method | Description |
|
|
49
|
+
|--------|-------------|
|
|
50
|
+
| `store(projectId, payload)` | Store or update a memory |
|
|
51
|
+
| `retrieve(projectId, payload)` | Retrieve a memory by key |
|
|
52
|
+
| `search(projectId, payload)` | Semantic/keyword search |
|
|
53
|
+
| `list(projectId, payload?)` | List all memories (paginated) |
|
|
54
|
+
| `recent(projectId, payload?)` | Most recently updated memories |
|
|
55
|
+
| `share(projectId, memoryIds, targetProjectIds)` | Share memories across projects |
|
|
56
|
+
| `capabilities(forceRefresh?)` | Get server capability flags |
|
|
57
|
+
|
|
58
|
+
## Encryption
|
|
59
|
+
|
|
60
|
+
For E2EE projects, set the `MUNIN_ENCRYPTION_KEY` environment variable. The SDK will automatically inject it into store/retrieve requests.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
package/dist/client.js
CHANGED
package/package.json
CHANGED
package/src/client.ts
CHANGED