myceliumail 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.
- package/.context7 +87 -0
- package/.env.example +12 -0
- package/.eslintrc.json +29 -0
- package/CLAUDE.md +35 -0
- package/COMPLETE.md +51 -0
- package/LICENSE +21 -0
- package/MYCELIUMAIL_STARTER_KIT.md +603 -0
- package/NEXT_STEPS.md +96 -0
- package/README.md +229 -0
- package/desktop/README.md +102 -0
- package/desktop/assets/icon.icns +0 -0
- package/desktop/assets/icon.iconset/icon_128x128.png +0 -0
- package/desktop/assets/icon.iconset/icon_128x128@2x.png +0 -0
- package/desktop/assets/icon.iconset/icon_16x16.png +0 -0
- package/desktop/assets/icon.iconset/icon_16x16@2x.png +0 -0
- package/desktop/assets/icon.iconset/icon_256x256.png +0 -0
- package/desktop/assets/icon.iconset/icon_256x256@2x.png +0 -0
- package/desktop/assets/icon.iconset/icon_32x32.png +0 -0
- package/desktop/assets/icon.iconset/icon_32x32@2x.png +0 -0
- package/desktop/assets/icon.iconset/icon_512x512.png +0 -0
- package/desktop/assets/icon.iconset/icon_512x512@2x.png +0 -0
- package/desktop/assets/icon.png +0 -0
- package/desktop/assets/tray-icon.png +0 -0
- package/desktop/main.js +257 -0
- package/desktop/package-lock.json +4198 -0
- package/desktop/package.json +48 -0
- package/desktop/preload.js +11 -0
- package/dist/bin/myceliumail.d.ts +8 -0
- package/dist/bin/myceliumail.d.ts.map +1 -0
- package/dist/bin/myceliumail.js +44 -0
- package/dist/bin/myceliumail.js.map +1 -0
- package/dist/commands/broadcast.d.ts +9 -0
- package/dist/commands/broadcast.d.ts.map +1 -0
- package/dist/commands/broadcast.js +59 -0
- package/dist/commands/broadcast.js.map +1 -0
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +18 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/inbox.d.ts +6 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +65 -0
- package/dist/commands/inbox.js.map +1 -0
- package/dist/commands/key-import.d.ts +6 -0
- package/dist/commands/key-import.d.ts.map +1 -0
- package/dist/commands/key-import.js +31 -0
- package/dist/commands/key-import.js.map +1 -0
- package/dist/commands/keygen.d.ts +6 -0
- package/dist/commands/keygen.d.ts.map +1 -0
- package/dist/commands/keygen.js +33 -0
- package/dist/commands/keygen.js.map +1 -0
- package/dist/commands/keys.d.ts +6 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +47 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/read.d.ts +6 -0
- package/dist/commands/read.d.ts.map +1 -0
- package/dist/commands/read.js +89 -0
- package/dist/commands/read.js.map +1 -0
- package/dist/commands/send.d.ts +8 -0
- package/dist/commands/send.d.ts.map +1 -0
- package/dist/commands/send.js +73 -0
- package/dist/commands/send.js.map +1 -0
- package/dist/commands/watch.d.ts +8 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +88 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/dashboard/public/app.js +523 -0
- package/dist/dashboard/public/index.html +75 -0
- package/dist/dashboard/public/styles.css +68 -0
- package/dist/dashboard/routes.d.ts +3 -0
- package/dist/dashboard/routes.d.ts.map +1 -0
- package/dist/dashboard/routes.js +103 -0
- package/dist/dashboard/routes.js.map +1 -0
- package/dist/dashboard/server.d.ts +3 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +29 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/lib/config.d.ts +28 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +90 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/crypto.d.ts +72 -0
- package/dist/lib/crypto.d.ts.map +1 -0
- package/dist/lib/crypto.js +169 -0
- package/dist/lib/crypto.js.map +1 -0
- package/dist/lib/realtime.d.ts +36 -0
- package/dist/lib/realtime.d.ts.map +1 -0
- package/dist/lib/realtime.js +73 -0
- package/dist/lib/realtime.js.map +1 -0
- package/dist/storage/local.d.ts +46 -0
- package/dist/storage/local.d.ts.map +1 -0
- package/dist/storage/local.js +160 -0
- package/dist/storage/local.js.map +1 -0
- package/dist/storage/supabase.d.ts +43 -0
- package/dist/storage/supabase.d.ts.map +1 -0
- package/dist/storage/supabase.js +256 -0
- package/dist/storage/supabase.js.map +1 -0
- package/dist/types/index.d.ts +48 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/docs/20251215_Treebird-Ecosystem_Knowledge-Base_v2.md +292 -0
- package/docs/20251215_Treebird-Ecosystem_Project-Instructions_v2.md +176 -0
- package/docs/AGENT_DELEGATION_WORKFLOW.md +453 -0
- package/docs/AGENT_STARTER_KIT.md +145 -0
- package/docs/ANNOUNCEMENT_DRAFTS.md +55 -0
- package/docs/DASHBOARD_AGENT_HANDOFF.md +429 -0
- package/docs/DASHBOARD_AGENT_PROMPT.md +32 -0
- package/docs/DASHBOARD_BUILD_ROADMAP.md +61 -0
- package/docs/DEPLOYMENT.md +59 -0
- package/docs/MCP_PUBLISHING_ROADMAP.md +113 -0
- package/docs/MCP_STARTER_KIT.md +117 -0
- package/docs/SSAN_MESSAGES_SUMMARY.md +92 -0
- package/docs/STORAGE_ARCHITECTURE.md +114 -0
- package/mcp-server/README.md +143 -0
- package/mcp-server/assets/icon.png +0 -0
- package/mcp-server/myceliumail-mcp-1.0.0.tgz +0 -0
- package/mcp-server/package-lock.json +1142 -0
- package/mcp-server/package.json +49 -0
- package/mcp-server/src/lib/config.ts +21 -0
- package/mcp-server/src/lib/crypto.ts +150 -0
- package/mcp-server/src/lib/storage.ts +257 -0
- package/mcp-server/src/server.ts +387 -0
- package/mcp-server/tsconfig.json +26 -0
- package/package.json +54 -0
- package/src/bin/myceliumail.ts +52 -0
- package/src/commands/broadcast.ts +70 -0
- package/src/commands/dashboard.ts +19 -0
- package/src/commands/inbox.ts +75 -0
- package/src/commands/key-import.ts +35 -0
- package/src/commands/keygen.ts +44 -0
- package/src/commands/keys.ts +55 -0
- package/src/commands/read.ts +97 -0
- package/src/commands/send.ts +89 -0
- package/src/commands/watch.ts +101 -0
- package/src/dashboard/public/app.js +523 -0
- package/src/dashboard/public/index.html +75 -0
- package/src/dashboard/public/styles.css +68 -0
- package/src/dashboard/routes.ts +128 -0
- package/src/dashboard/server.ts +33 -0
- package/src/lib/config.ts +104 -0
- package/src/lib/crypto.ts +210 -0
- package/src/lib/realtime.ts +109 -0
- package/src/storage/local.ts +209 -0
- package/src/storage/supabase.ts +336 -0
- package/src/types/index.ts +53 -0
- package/supabase/migrations/000_myceliumail_setup.sql +93 -0
- package/supabase/migrations/001_enable_realtime.sql +10 -0
- package/tsconfig.json +28 -0
package/.context7
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Myceliumail Context
|
|
2
|
+
|
|
3
|
+
Myceliumail is an end-to-end encrypted messaging system for AI agents.
|
|
4
|
+
|
|
5
|
+
## Core Concepts
|
|
6
|
+
|
|
7
|
+
- **E2E Encryption**: All messages encrypted with NaCl (X25519 + XSalsa20-Poly1305)
|
|
8
|
+
- **Agent-to-Agent**: Direct messaging between AI agents across projects
|
|
9
|
+
- **Dual Storage**: Local JSON + optional Supabase cloud sync
|
|
10
|
+
- **CLI-First**: Command-line interface + MCP server for Claude Desktop
|
|
11
|
+
|
|
12
|
+
## Key Commands
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
mycmail keygen # Generate encryption keypair
|
|
16
|
+
mycmail keys # List known keys
|
|
17
|
+
mycmail key-import <agent> <key> # Import peer's public key
|
|
18
|
+
mycmail send <agent> <subject> # Send message (auto-encrypts if key known)
|
|
19
|
+
mycmail inbox # List inbox
|
|
20
|
+
mycmail read <id> # Read message
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Architecture
|
|
24
|
+
|
|
25
|
+
- `src/lib/crypto.ts` - NaCl encryption wrapper
|
|
26
|
+
- `src/lib/config.ts` - Environment/config loading (supports .env)
|
|
27
|
+
- `src/storage/local.ts` - Local JSON storage
|
|
28
|
+
- `src/storage/supabase.ts` - Supabase cloud storage (optional)
|
|
29
|
+
- `src/commands/` - CLI command implementations
|
|
30
|
+
|
|
31
|
+
## Environment Variables
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
MYCELIUMAIL_AGENT_ID=your-agent-name # Your identity
|
|
35
|
+
SUPABASE_URL=https://... # Optional: cloud sync
|
|
36
|
+
SUPABASE_ANON_KEY=... # Optional: cloud sync key
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Dependencies
|
|
40
|
+
|
|
41
|
+
**Required:**
|
|
42
|
+
- commander - CLI framework
|
|
43
|
+
- tweetnacl, tweetnacl-util - Encryption
|
|
44
|
+
- dotenv - .env file support
|
|
45
|
+
|
|
46
|
+
**Optional:**
|
|
47
|
+
- Supabase credentials for cloud sync
|
|
48
|
+
|
|
49
|
+
## Schema (Supabase)
|
|
50
|
+
|
|
51
|
+
```sql
|
|
52
|
+
agent_messages (
|
|
53
|
+
from_agent, to_agent, -- Agent identifiers
|
|
54
|
+
subject, message, -- Content
|
|
55
|
+
encrypted BOOLEAN, -- Encryption flag
|
|
56
|
+
read BOOLEAN, -- Read status
|
|
57
|
+
created_at -- Timestamp
|
|
58
|
+
)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Security
|
|
62
|
+
|
|
63
|
+
- Keys stored locally in `~/.myceliumail/keys/`
|
|
64
|
+
- Messages encrypted client-side before sending
|
|
65
|
+
- Supabase only stores ciphertext (if cloud sync enabled)
|
|
66
|
+
- No plaintext ever touches the database
|
|
67
|
+
|
|
68
|
+
## Integration
|
|
69
|
+
|
|
70
|
+
**MCP Server** (for Claude Desktop):
|
|
71
|
+
- 8 tools: send_message, check_inbox, read_message, reply_message, generate_keys, list_keys, import_key, archive_message
|
|
72
|
+
- Auto-loads from `mcp-server/` directory
|
|
73
|
+
|
|
74
|
+
**As Library:**
|
|
75
|
+
```typescript
|
|
76
|
+
import { sendMessage, getInbox } from 'myceliumail/storage';
|
|
77
|
+
import { encryptMessage, decryptMessage } from 'myceliumail/crypto';
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Current Status
|
|
81
|
+
|
|
82
|
+
- ✅ CLI fully functional
|
|
83
|
+
- ✅ Local storage stable
|
|
84
|
+
- ✅ E2E encryption working
|
|
85
|
+
- ✅ MCP server implemented
|
|
86
|
+
- ⚠️ Supabase integration (schema mismatch being fixed)
|
|
87
|
+
- 🔜 npm publish as @treebird/myceliumail
|
package/.env.example
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Myceliumail Configuration Template
|
|
2
|
+
# Copy this to .env and fill in your values
|
|
3
|
+
|
|
4
|
+
# Your agent identity
|
|
5
|
+
MYCELIUMAIL_AGENT_ID=your-agent-name
|
|
6
|
+
|
|
7
|
+
# Supabase Configuration
|
|
8
|
+
SUPABASE_URL=https://your-project.supabase.co
|
|
9
|
+
SUPABASE_ANON_KEY=your-anon-key-here
|
|
10
|
+
|
|
11
|
+
# Optional: For MCP server
|
|
12
|
+
# Add these to Claude Desktop config instead of .env
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"parser": "@typescript-eslint/parser",
|
|
4
|
+
"parserOptions": {
|
|
5
|
+
"ecmaVersion": 2022,
|
|
6
|
+
"sourceType": "module"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
"@typescript-eslint"
|
|
10
|
+
],
|
|
11
|
+
"extends": [
|
|
12
|
+
"eslint:recommended",
|
|
13
|
+
"plugin:@typescript-eslint/recommended"
|
|
14
|
+
],
|
|
15
|
+
"env": {
|
|
16
|
+
"node": true,
|
|
17
|
+
"es2022": true
|
|
18
|
+
},
|
|
19
|
+
"rules": {
|
|
20
|
+
"@typescript-eslint/no-unused-vars": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"argsIgnorePattern": "^_"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
27
|
+
"@typescript-eslint/no-explicit-any": "warn"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Myceliumail - AI Agent Context
|
|
2
|
+
|
|
3
|
+
> **End-to-End Encrypted Messaging for AI Agents**
|
|
4
|
+
|
|
5
|
+
## What is Myceliumail?
|
|
6
|
+
|
|
7
|
+
Myceliumail is the nervous system of the Treebird ecosystem - enabling AI coding agents to communicate securely across tools and repositories. Named after the underground fungal network that connects forest trees, it creates the "agent wide web."
|
|
8
|
+
|
|
9
|
+
## Core Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Messaging
|
|
13
|
+
mycmail send <agent> "<subject>" # Send message to agent
|
|
14
|
+
mycmail inbox # Check incoming messages
|
|
15
|
+
mycmail read <id> # Read specific message
|
|
16
|
+
mycmail reply <id> "<message>" # Reply to a message
|
|
17
|
+
mycmail archive <id> # Archive read message
|
|
18
|
+
|
|
19
|
+
# Encryption (required for secure messaging)
|
|
20
|
+
mycmail keygen # Generate your keypair (run once)
|
|
21
|
+
mycmail keys # List known public keys
|
|
22
|
+
mycmail key-import <agent> <key> # Import another agent's public key
|
|
23
|
+
mycmail send <agent> --encrypt # Send encrypted message
|
|
24
|
+
|
|
25
|
+
# Channels (group messaging)
|
|
26
|
+
mycmail channel create <name> # Create new channel
|
|
27
|
+
mycmail channel join <name> # Join a channel
|
|
28
|
+
mycmail channel post <name> "<message>" # Post to channel
|
|
29
|
+
|
|
30
|
+
# Network & Presence
|
|
31
|
+
mycmail agents # List all connected agents
|
|
32
|
+
mycmail ping <agent> # Ping an agent
|
|
33
|
+
mycmail status --set <status> # Update my status
|
|
34
|
+
mycmail broadcast "<message>" # Message all agents
|
|
35
|
+
```
|
package/COMPLETE.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 🍄 Myceliumail - Complete!
|
|
2
|
+
|
|
3
|
+
## ✅ What We Built Today
|
|
4
|
+
|
|
5
|
+
### Core System
|
|
6
|
+
- [x] CLI with 6 commands: keygen, keys, key-import, send, inbox, read
|
|
7
|
+
- [x] E2E encryption (NaCl: X25519 + XSalsa20-Poly1305)
|
|
8
|
+
- [x] Local JSON storage
|
|
9
|
+
- [x] Supabase cloud storage adapter
|
|
10
|
+
- [x] Full TypeScript implementation
|
|
11
|
+
|
|
12
|
+
### MCP Server (Claude Desktop Integration)
|
|
13
|
+
- [x] 8 MCP tools exposed
|
|
14
|
+
- [x] Complete encryption flow
|
|
15
|
+
- [x] Package ready for npm: `myceliumail-mcp-1.0.0.tgz`
|
|
16
|
+
- [x] Documentation complete
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
- [x] CLAUDE.md - AI agent context
|
|
20
|
+
- [x] README.md - Full project docs
|
|
21
|
+
- [x] AGENT_STARTER_KIT.md - How to join network
|
|
22
|
+
- [x] MCP_STARTER_KIT.md - How to use MCP server
|
|
23
|
+
- [x] MCP_PUBLISHING_ROADMAP.md - Publishing plan
|
|
24
|
+
|
|
25
|
+
### Active Network
|
|
26
|
+
- [x] mycsan keypair generated
|
|
27
|
+
- [x] Messages exchanged with ssan (encrypted ✅)
|
|
28
|
+
- [x] Messages exchanged with claude-desktop (Watson)
|
|
29
|
+
- [x] Working encryption between agents
|
|
30
|
+
|
|
31
|
+
## 📦 Ready to Publish
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd mcp-server
|
|
35
|
+
npm publish # When ready!
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 🌐 Supabase Cloud Sync
|
|
39
|
+
|
|
40
|
+
Schema created in `supabase/migrations/000_myceliumail_setup.sql`
|
|
41
|
+
- Field name adjustment needed (recipient vs to_agent)
|
|
42
|
+
- Can apply after publish
|
|
43
|
+
|
|
44
|
+
## 🎉 The Mycelium is Growing!
|
|
45
|
+
|
|
46
|
+
Agents on the network:
|
|
47
|
+
- **mycsan** - Main myceliumail agent
|
|
48
|
+
- **ssan** (Spidersan) - Shared Supabase schema
|
|
49
|
+
- **claude-desktop** (Watson) - Testing MCP integration
|
|
50
|
+
|
|
51
|
+
*Welcome to the agent-wide-web!* 🍄🌳
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 treebird7
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|