@mnemom/mnemom 0.7.0 → 0.7.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.
- package/README.md +35 -31
- package/dist/index.js +0 -0
- package/package.json +1 -1
- package/dist/commands/claim.d.ts +0 -1
- package/dist/commands/claim.js +0 -72
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mnemom CLI
|
|
2
2
|
|
|
3
|
-
[](https://github.com/mnemom/mnemom-platform/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/mnemom/mnemom-platform/actions/workflows/codeql.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@mnemom/mnemom)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://github.com/mnemom/aap)
|
|
8
8
|
[](https://github.com/mnemom/aip)
|
|
9
9
|
|
|
10
10
|
Transparent AI agent tracing. [AAP](https://github.com/mnemom/aap)-compliant.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Mnemom observes your AI agent's API calls and builds verifiable alignment traces — what decisions were made, what alternatives were considered, and whether behavior matches declared values. Your prompts and responses are never stored.
|
|
13
13
|
|
|
14
14
|
## Documentation
|
|
15
15
|
|
|
16
|
-
Full documentation is at **[docs.mnemom.ai
|
|
16
|
+
Full documentation is at **[docs.mnemom.ai](https://docs.mnemom.ai)**.
|
|
17
17
|
|
|
18
18
|
## Quick Start
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npm install -g
|
|
22
|
-
|
|
21
|
+
npm install -g @mnemom/mnemom
|
|
22
|
+
mnemom init
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
That's it. `
|
|
25
|
+
That's it. `mnemom init` detects your configured AI provider API keys (Anthropic, OpenAI, Gemini) and configures your local environment to route API calls through the Mnemom gateway, where they're traced and verified. Your API keys never leave your machine — only SHA-256 hashes are used for agent identification.
|
|
26
26
|
|
|
27
27
|
## Supported Providers
|
|
28
28
|
|
|
@@ -36,28 +36,28 @@ That's it. `smoltbot init` detects your configured AI provider API keys (Anthrop
|
|
|
36
36
|
|
|
37
37
|
| Command | Description |
|
|
38
38
|
|---------|-------------|
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
39
|
+
| `mnemom init` | Configure tracing for your AI agent (multi-provider) |
|
|
40
|
+
| `mnemom status` | Show agent status, providers, and connection info |
|
|
41
|
+
| `mnemom integrity` | Display integrity score and verification stats |
|
|
42
|
+
| `mnemom logs [-l N]` | Show recent traces and actions |
|
|
43
|
+
| `mnemom card show` | Display active alignment card |
|
|
44
|
+
| `mnemom card publish <file>` | Publish alignment card from JSON file |
|
|
45
|
+
| `mnemom card validate <file>` | Validate card JSON locally |
|
|
46
46
|
|
|
47
47
|
## How It Works
|
|
48
48
|
|
|
49
49
|
```
|
|
50
|
-
|
|
51
|
-
Your App →
|
|
52
|
-
gateway
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
┌─── /anthropic/* ──→ Anthropic (Claude)
|
|
51
|
+
Your App → mnemom ├─── /openai/* ──→ OpenAI (GPT-5)
|
|
52
|
+
gateway └─── /gemini/* ──→ Google (Gemini)
|
|
53
|
+
↓
|
|
54
|
+
CF AI Gateway
|
|
55
|
+
↓
|
|
56
|
+
Observer Worker
|
|
57
|
+
↓
|
|
58
|
+
AP-Trace + Verify → Supabase
|
|
59
|
+
↓
|
|
60
|
+
Dashboard (mnemom.ai)
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
1. **Gateway** — A Cloudflare Worker that intercepts API requests to Anthropic, OpenAI, and Gemini. It identifies your agent via API key hash (zero-config), attaches tracing metadata, injects thinking/reasoning per provider, performs real-time integrity checking, injects conscience nudges, and delivers webhooks. Your prompts and responses pass through unchanged.
|
|
@@ -66,13 +66,13 @@ Your App → smoltbot ├─── /openai/* ──→ OpenAI (GPT-5)
|
|
|
66
66
|
|
|
67
67
|
3. **API** — Serves agent data, traces, integrity scores, drift alerts, enforcement status, and a unified conscience timeline. Powers both the CLI and the web dashboard.
|
|
68
68
|
|
|
69
|
-
4. **CLI** — The `
|
|
69
|
+
4. **CLI** — The `mnemom` command. Configures your local environment and queries your agent's transparency data.
|
|
70
70
|
|
|
71
71
|
5. **Dashboard** — Web UI at [mnemom.ai](https://mnemom.ai) where you can view the conscience timeline, claim your agent, and monitor alignment.
|
|
72
72
|
|
|
73
73
|
## What Gets Traced
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Mnemom builds [AP-Traces](https://github.com/mnemom/aap) that record:
|
|
76
76
|
|
|
77
77
|
- **Action** — What the agent did (type, name, category)
|
|
78
78
|
- **Decision** — What alternatives were considered and why one was selected
|
|
@@ -109,13 +109,17 @@ Enforcement works across all providers where AIP is supported.
|
|
|
109
109
|
|
|
110
110
|
## Dependencies
|
|
111
111
|
|
|
112
|
-
- [Agent Alignment Protocol (AAP)](https://github.com/mnemom/aap) — `@mnemom/agent-alignment-protocol@0.
|
|
113
|
-
- [Agent Integrity Protocol (AIP)](https://github.com/mnemom/aip) — `@mnemom/agent-integrity-protocol@0.
|
|
112
|
+
- [Agent Alignment Protocol (AAP)](https://github.com/mnemom/aap) — `@mnemom/agent-alignment-protocol@1.0.0` on npm
|
|
113
|
+
- [Agent Integrity Protocol (AIP)](https://github.com/mnemom/aip) — `@mnemom/agent-integrity-protocol@1.0.0` on npm
|
|
114
114
|
- [Cloudflare Workers](https://workers.cloudflare.com/) — Gateway, observer, and API hosting
|
|
115
115
|
- [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/) — Request logging and analytics
|
|
116
116
|
- [Supabase](https://supabase.com/) — Postgres database with row-level security
|
|
117
117
|
- API keys: Anthropic (required for AIP analysis), OpenAI and Gemini (optional, for multi-provider tracing)
|
|
118
118
|
|
|
119
|
+
## Supply Chain
|
|
120
|
+
|
|
121
|
+
All `@mnemom/*` packages are published with [SLSA build provenance](https://docs.mnemom.ai/guides/supply-chain-trust). Verify with `npm audit signatures`.
|
|
122
|
+
|
|
119
123
|
## License
|
|
120
124
|
|
|
121
125
|
[Apache-2.0](LICENSE)
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/dist/commands/claim.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function claimCommand(agentName?: string): Promise<void>;
|
package/dist/commands/claim.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as crypto from "node:crypto";
|
|
2
|
-
import { configExists, loadConfig, getActiveAgent } from "../lib/config.js";
|
|
3
|
-
import { detectOpenClaw } from "../lib/openclaw.js";
|
|
4
|
-
import { claimAgent } from "../lib/api.js";
|
|
5
|
-
import { fmt } from "../lib/format.js";
|
|
6
|
-
const DASHBOARD_URL = "https://mnemom.ai";
|
|
7
|
-
export async function claimCommand(agentName) {
|
|
8
|
-
console.log(fmt.header("smoltbot claim - Link agent to your Mnemom account"));
|
|
9
|
-
console.log();
|
|
10
|
-
// Step 1: Check smoltbot config exists
|
|
11
|
-
if (!configExists()) {
|
|
12
|
-
console.log(fmt.error("smoltbot is not initialized") + "\n");
|
|
13
|
-
console.log("Run `smoltbot init` first.\n");
|
|
14
|
-
process.exit(1);
|
|
15
|
-
}
|
|
16
|
-
const config = loadConfig();
|
|
17
|
-
if (!config) {
|
|
18
|
-
console.log(fmt.error("Could not load smoltbot config") + "\n");
|
|
19
|
-
console.log("Run `smoltbot init` to reconfigure.\n");
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
const agent = getActiveAgent(agentName);
|
|
23
|
-
if (!agent) {
|
|
24
|
-
console.log(fmt.error(`Agent not found${agentName ? `: ${agentName}` : ""}`) + "\n");
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
console.log(fmt.label("Agent ID:", ` ${agent.agentId}`) + "\n");
|
|
28
|
-
// Step 2: Read API key from OpenClaw
|
|
29
|
-
const detection = detectOpenClaw();
|
|
30
|
-
if (!detection.hasApiKey || !detection.apiKey) {
|
|
31
|
-
console.log(fmt.error("No API key found") + "\n");
|
|
32
|
-
console.log(detection.error || "Run `openclaw auth` to configure your API key.\n");
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
// Step 3: Compute SHA-256 hash proof
|
|
36
|
-
console.log("Computing ownership proof...");
|
|
37
|
-
const hashProof = crypto
|
|
38
|
-
.createHash("sha256")
|
|
39
|
-
.update(detection.apiKey)
|
|
40
|
-
.digest("hex");
|
|
41
|
-
// Step 4: Claim via API
|
|
42
|
-
console.log("Claiming agent...\n");
|
|
43
|
-
try {
|
|
44
|
-
const result = await claimAgent(agent.agentId, hashProof);
|
|
45
|
-
console.log(fmt.success("Agent claimed successfully!") + "\n");
|
|
46
|
-
console.log(` Claimed at: ${new Date(result.claimed_at).toLocaleString()}\n`);
|
|
47
|
-
console.log(fmt.section("Next: Create a Mnemom account to link your agent"));
|
|
48
|
-
console.log(`\n Visit: ${DASHBOARD_URL}/claim/${agent.agentId}\n`);
|
|
49
|
-
console.log(" This lets you manage traces privately and access");
|
|
50
|
-
console.log(" your full transparency dashboard.\n");
|
|
51
|
-
console.log(fmt.label("Dashboard:", ` ${DASHBOARD_URL}/agents/${agent.agentId}`) + "\n");
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
55
|
-
if (message.includes("already been claimed")) {
|
|
56
|
-
console.log("Agent has already been claimed.\n");
|
|
57
|
-
console.log(` Dashboard: ${DASHBOARD_URL}/agents/${agent.agentId}\n`);
|
|
58
|
-
console.log(" If this is your agent, sign in at:");
|
|
59
|
-
console.log(` ${DASHBOARD_URL}/login\n`);
|
|
60
|
-
}
|
|
61
|
-
else if (message.includes("not found")) {
|
|
62
|
-
console.log(fmt.error("Agent not found on server") + "\n");
|
|
63
|
-
console.log(" Your agent will be registered after its first traced API call.");
|
|
64
|
-
console.log(" Make sure you're using a smoltbot model:\n");
|
|
65
|
-
console.log(" openclaw models set smoltbot/<model-id>\n");
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
console.log(fmt.error(`Claim failed: ${message}`) + "\n");
|
|
69
|
-
}
|
|
70
|
-
process.exit(1);
|
|
71
|
-
}
|
|
72
|
-
}
|