daemora 1.0.10 → 1.0.13
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 +50 -20
- package/SOUL.md +23 -4
- package/daemora-ui/dist/assets/index-BcDDa2OZ.js +92 -0
- package/daemora-ui/dist/assets/index-BiEJ-Ev9.css +1 -0
- package/daemora-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/skills/planning.md +168 -0
- package/src/agents/systemPrompt.js +2 -1
- package/src/cli.js +124 -4
- package/src/index.js +32 -2
- package/src/safety/CommandGuard.js +22 -1
- package/src/setup/theme.js +1 -0
- package/src/setup/wizard.js +220 -26
- package/src/tenants/TenantManager.js +37 -0
- package/src/tools/_paths.js +39 -0
- package/src/tools/applyPatch.js +6 -0
- package/src/tools/browserAutomation.js +18 -6
- package/src/tools/createDocument.js +4 -0
- package/src/tools/executeCommand.js +4 -2
- package/src/tools/generateImage.js +7 -3
- package/src/tools/replyWithFile.js +4 -0
- package/src/tools/screenCapture.js +6 -1
- package/src/tools/sendFile.js +4 -0
- package/src/tools/sshTool.js +2 -2
- package/src/tools/textToSpeech.js +21 -12
- package/src/tools/transcribeAudio.js +15 -4
- package/daemora-ui/dist/assets/index-D7W1-PNQ.js +0 -92
- package/daemora-ui/dist/assets/index-DzMLJeoL.css +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
# Daemora
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="public/banner.svg" alt="Daemora — Autonomous AI Agent" width="100%" />
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>A fully autonomous, self-hosted AI agent — production-secure, multi-tenant, multi-channel.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://npmjs.com/package/daemora"><img src="https://img.shields.io/npm/v/daemora?color=black&label=npm" alt="npm" /></a>
|
|
13
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-black" alt="license" /></a>
|
|
14
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-20%2B-black" alt="node" /></a>
|
|
15
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-black" alt="platform" />
|
|
16
|
+
</p>
|
|
9
17
|
|
|
10
18
|
Daemora runs on your own machine. It connects to your messaging apps, accepts tasks in plain language, executes them autonomously with 51 built-in tools across 20 channels, and reports back - without you watching over it.
|
|
11
19
|
|
|
@@ -87,19 +95,21 @@ Unlike cloud AI assistants, nothing leaves your infrastructure except the tokens
|
|
|
87
95
|
└──────────────────────────────┘
|
|
88
96
|
```
|
|
89
97
|
|
|
90
|
-
### Security Architecture (
|
|
98
|
+
### Security Architecture (12 Layers)
|
|
91
99
|
|
|
92
100
|
```
|
|
93
|
-
LAYER 1
|
|
94
|
-
LAYER 2
|
|
95
|
-
LAYER 3
|
|
96
|
-
LAYER 4
|
|
97
|
-
LAYER 5
|
|
98
|
-
LAYER 6
|
|
99
|
-
LAYER 7
|
|
100
|
-
LAYER 8
|
|
101
|
-
LAYER 9
|
|
102
|
-
LAYER 10
|
|
101
|
+
LAYER 1 Permission Tiers ────── minimal / standard / full
|
|
102
|
+
LAYER 2 Filesystem Sandbox ──── ALLOWED_PATHS · BLOCKED_PATHS · hardcoded blocks · per-tenant workspace isolation
|
|
103
|
+
LAYER 3 Secret Vault ─────────── AES-256-GCM · scrypt key derivation · passphrase on start
|
|
104
|
+
LAYER 4 Channel Allowlists ──── per-channel user ID whitelist
|
|
105
|
+
LAYER 5 A2A Security ─────────── bearer token · agent allowlist · rate limiting
|
|
106
|
+
LAYER 6 Audit Trail ──────────── append-only JSONL · secrets redacted · tenantId tagged
|
|
107
|
+
LAYER 7 Supervisor Agent ─────── runaway loop detection · cost overruns · dangerous patterns
|
|
108
|
+
LAYER 8 Input Sanitisation ──── untrusted-input wrapping · prompt injection detection
|
|
109
|
+
LAYER 9 Multi-Tenant Isolation ─ AsyncLocalStorage · no cross-tenant data leakage
|
|
110
|
+
LAYER 10 Security Audit CLI ──── daemora doctor · 8 checks · scored output
|
|
111
|
+
LAYER 11 Command Guard ─────────── blocks env dumps · .env reads · credential exfil · CLI privilege escalation
|
|
112
|
+
LAYER 12 Tool Filesystem Guard ── all 18 file-touching tools enforce checkRead/checkWrite
|
|
103
113
|
```
|
|
104
114
|
|
|
105
115
|
---
|
|
@@ -218,7 +228,7 @@ sequenceDiagram
|
|
|
218
228
|
|
|
219
229
|
```bash
|
|
220
230
|
npm install -g daemora
|
|
221
|
-
daemora setup # interactive wizard (
|
|
231
|
+
daemora setup # interactive wizard (11 steps) - models, channels, tools, cleanup, vault, MCP, multi-tenant
|
|
222
232
|
daemora start # start the agent
|
|
223
233
|
```
|
|
224
234
|
|
|
@@ -319,7 +329,8 @@ Enable only what you need. Each channel supports `{CHANNEL}_ALLOWLIST` and `{CHA
|
|
|
319
329
|
| **WhatsApp** | `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_WHATSAPP_FROM` |
|
|
320
330
|
| **Discord** | `DISCORD_BOT_TOKEN` |
|
|
321
331
|
| **Slack** | `SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN` |
|
|
322
|
-
| **Email** | `
|
|
332
|
+
| **Email (Resend)** | `RESEND_API_KEY`, `RESEND_FROM` |
|
|
333
|
+
| **Email (IMAP/SMTP)** | `EMAIL_USER`, `EMAIL_PASSWORD`, `EMAIL_IMAP_HOST`, `EMAIL_SMTP_HOST` |
|
|
323
334
|
| **LINE** | `LINE_CHANNEL_ACCESS_TOKEN`, `LINE_CHANNEL_SECRET` |
|
|
324
335
|
| **Signal** | `SIGNAL_CLI_PATH`, `SIGNAL_PHONE_NUMBER` |
|
|
325
336
|
| **Microsoft Teams** | `TEAMS_APP_ID`, `TEAMS_APP_PASSWORD` |
|
|
@@ -352,6 +363,11 @@ ALLOWED_PATHS=/home/user/work # Sandbox: restrict file access to these dire
|
|
|
352
363
|
BLOCKED_PATHS=/home/user/.secrets # Always block these, even inside allowed paths
|
|
353
364
|
RESTRICT_COMMANDS=true # Block shell commands referencing paths outside sandbox
|
|
354
365
|
|
|
366
|
+
# Multi-tenant mode
|
|
367
|
+
MULTI_TENANT_ENABLED=true # Enable per-user isolation
|
|
368
|
+
AUTO_REGISTER_TENANTS=true # Auto-create tenants on first message
|
|
369
|
+
TENANT_ISOLATE_FILESYSTEM=true # Tenant temp files → data/tenants/{id}/workspace/
|
|
370
|
+
|
|
355
371
|
# Per-tenant API key encryption (required for production multi-tenant mode)
|
|
356
372
|
# Generate: openssl rand -hex 32
|
|
357
373
|
DAEMORA_TENANT_KEY=
|
|
@@ -473,6 +489,13 @@ daemora tenant plan telegram:123 pro
|
|
|
473
489
|
# Store a tenant's own OpenAI key (AES-256-GCM encrypted at rest)
|
|
474
490
|
daemora tenant apikey set telegram:123 OPENAI_API_KEY sk-their-key
|
|
475
491
|
|
|
492
|
+
# Manage per-tenant workspace paths
|
|
493
|
+
daemora tenant workspace telegram:123 # Show workspace paths
|
|
494
|
+
daemora tenant workspace telegram:123 add /home/user # Add to allowedPaths
|
|
495
|
+
daemora tenant workspace telegram:123 remove /home/user
|
|
496
|
+
daemora tenant workspace telegram:123 block /secrets # Add to blockedPaths
|
|
497
|
+
daemora tenant workspace telegram:123 unblock /secrets
|
|
498
|
+
|
|
476
499
|
# Suspend a user
|
|
477
500
|
daemora tenant suspend telegram:123 "Exceeded usage policy"
|
|
478
501
|
```
|
|
@@ -483,7 +506,7 @@ Per-tenant isolation:
|
|
|
483
506
|
|---|---|
|
|
484
507
|
| Memory | `data/tenants/{id}/MEMORY.md` - never shared across users |
|
|
485
508
|
| Sessions | Persistent per-user sessions + per-sub-agent sessions (`userId--coder`, `userId--researcher`) |
|
|
486
|
-
| Filesystem | `allowedPaths` and `blockedPaths` scoped per user |
|
|
509
|
+
| Filesystem | `allowedPaths` and `blockedPaths` scoped per user. `TENANT_ISOLATE_FILESYSTEM=true` → temp files in `data/tenants/{id}/workspace/` |
|
|
487
510
|
| API keys | AES-256-GCM encrypted; passed through call stack, never via `process.env` |
|
|
488
511
|
| Cost tracking | Per-tenant daily cost recorded in audit log |
|
|
489
512
|
| MCP servers | `mcpServers` field restricts which servers a tenant can call |
|
|
@@ -504,7 +527,9 @@ daemora doctor
|
|
|
504
527
|
| Feature | Description |
|
|
505
528
|
|---|---|
|
|
506
529
|
| **Permission tiers** | `minimal` / `standard` / `full` - controls which tools the agent can call |
|
|
507
|
-
| **Filesystem sandbox** | Directory scoping via `ALLOWED_PATHS`, hardcoded blocks for `.ssh`, `.env`, `.aws
|
|
530
|
+
| **Filesystem sandbox** | Directory scoping via `ALLOWED_PATHS`, hardcoded blocks for `.ssh`, `.env`, `.aws`. All 18 file-touching tools enforce FilesystemGuard |
|
|
531
|
+
| **Tenant workspace isolation** | `TENANT_ISOLATE_FILESYSTEM=true` → each tenant's temp files go to `data/tenants/{id}/workspace/` |
|
|
532
|
+
| **Command guard** | Blocks env dumps, `.env` reads, credential exfiltration, CLI privilege escalation (daemora/aegis commands) |
|
|
508
533
|
| **Secret vault** | AES-256-GCM encrypted secrets, passphrase required on start |
|
|
509
534
|
| **Channel allowlists** | Per-channel user ID whitelist - blocks unknown senders |
|
|
510
535
|
| **Secret scanning** | Redacts API keys and tokens from tool output before the model sees them |
|
|
@@ -599,6 +624,11 @@ daemora tenant unsuspend <id> Unsuspend a tenant
|
|
|
599
624
|
daemora tenant apikey set <id> <KEY> <value> Store per-tenant API key (encrypted)
|
|
600
625
|
daemora tenant apikey delete <id> <KEY> Remove a per-tenant API key
|
|
601
626
|
daemora tenant apikey list <id> List stored key names (values never shown)
|
|
627
|
+
daemora tenant workspace <id> Show workspace paths (allowed + blocked)
|
|
628
|
+
daemora tenant workspace <id> add <path> Add directory to tenant's allowedPaths
|
|
629
|
+
daemora tenant workspace <id> remove <path> Remove from allowedPaths
|
|
630
|
+
daemora tenant workspace <id> block <path> Add to tenant's blockedPaths
|
|
631
|
+
daemora tenant workspace <id> unblock <path> Remove from blockedPaths
|
|
602
632
|
|
|
603
633
|
daemora cleanup Run data cleanup now (uses configured retention)
|
|
604
634
|
daemora cleanup stats Show storage usage (tasks, sessions, audit, costs)
|
package/SOUL.md
CHANGED
|
@@ -45,17 +45,36 @@ A task is complete when:
|
|
|
45
45
|
## Understand → Plan → Execute
|
|
46
46
|
|
|
47
47
|
1. **Understand** — Read the full request carefully. Identify every part of what the user wants. Check conversation history for context. If the request has multiple parts, handle ALL of them.
|
|
48
|
-
2. **Plan**
|
|
49
|
-
3. **Execute** — work through each step. Verify after each one. If 3+ steps in and something doesn't add up, stop and re-assess.
|
|
48
|
+
2. **Plan** — before acting, decide: plan or just do it?
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
**Plan first** when ANY of these apply:
|
|
51
|
+
- Multiple steps required — the task needs 3+ distinct actions to complete.
|
|
52
|
+
- Multiple valid approaches — the task can be solved several ways. Pick the right one first.
|
|
53
|
+
- Unclear scope — you need to explore or research before understanding the full extent of work.
|
|
54
|
+
- User preferences matter — the outcome could go multiple reasonable directions.
|
|
55
|
+
- High stakes — mistakes are costly to undo (emails sent, files restructured, data transformed).
|
|
56
|
+
- Multi-agent work — parallel or sequential agent coordination needed.
|
|
57
|
+
- New feature or system change — adding functionality or modifying existing behavior.
|
|
58
|
+
- Multi-file code changes — 3+ files affected. Map them out first.
|
|
59
|
+
|
|
60
|
+
**Skip planning** — do it directly:
|
|
61
|
+
- Single-action tasks (send one email, fetch one page, fix a typo).
|
|
62
|
+
- Tasks where the user gave very specific, detailed instructions.
|
|
63
|
+
- Quick lookups, simple questions, casual conversation.
|
|
64
|
+
|
|
65
|
+
**When in doubt → plan.** The cost of planning is low. The cost of rework is high.
|
|
66
|
+
|
|
67
|
+
Planning means: load the planning skill (`readFile("skills/planning.md")`), gather context, break work into concrete steps, **present the plan to the user and get confirmation**, then execute. Keep plans short — a list of actions, not an essay.
|
|
68
|
+
|
|
69
|
+
3. **Confirm** — before executing a complex plan, present it to the user. Numbered list of concrete actions. Ask "want me to go ahead?" Only skip confirmation for simple tasks that don't need planning.
|
|
70
|
+
4. **Execute** — work through each step. Verify after each one. If 3+ steps in and something doesn't add up, stop and re-assess the plan.
|
|
52
71
|
|
|
53
72
|
---
|
|
54
73
|
|
|
55
74
|
## Building & Coding - Full Ownership
|
|
56
75
|
|
|
57
76
|
When you build or create something:
|
|
58
|
-
1. **Plan first for complex tasks.**
|
|
77
|
+
1. **Plan first for complex tasks.** Load the planning skill, explore the codebase, break work into steps, confirm with the user, then build. Simple tasks (single file, clear action) → skip planning.
|
|
59
78
|
2. **Read before touching.** Never edit a file you haven't read in this session.
|
|
60
79
|
3. **Build, don't describe.** Write the actual code with writeFile/editFile. Never describe what code would look like.
|
|
61
80
|
4. **Verify after every write.** After writeFile/editFile, read the file back to confirm it's correct.
|