A gateway, not a port
The source projects contributed ideas, not an architecture to preserve. DreenMind keeps the parts that survive a failure review: durable state, narrow edges, explicit approvals, and a small runtime. It drops plugin marketplaces, multi-agent choreography, and hosted control planes.
The result is one process with clear layers. The gateway owns the turn and the database. The CLI and Telegram adapter are clients. The provider and tools are edges. The sandbox is a contract, not an execution path.
Three sources, three boundaries
| Source | Kept | Left behind |
|---|---|---|
| Hermes Agent | Loop discipline, tool-call structure, session continuity, provider abstraction. | Hosted assumptions, broad channel surface, features outside one-operator scope. |
| OpenClaw | Approval thinking, workspace confinement, operator-first controls, explicit policy. | Plugin marketplace, broad integrations, multi-user assumptions. |
| PicoClaw | Small binary, local-first deployment, simple operational shape. | Feature breadth that would enlarge the trust surface. |
The synthesis is documented in the ignored audit workspace. The tree contains the decisions and the code, not the upstream snapshots.
Layers and import direction
| Layer | Packages | Responsibility |
|---|---|---|
| Entrypoint | cmd/dreenmind | Process start, flags, exit codes. |
| Application | internal/app | CLI commands, init, serve, doctor, secrets. |
| Gateway | internal/gateway | HTTP API, turn orchestration, approvals. |
| Agent | internal/agent | Provider loop and tool-call handling. |
| State | internal/state | SQLite schema, messages, sessions, search. |
| Edges | internal/provider, internal/channel, internal/tools, internal/sandbox | Adapters and policy boundaries. |
| Primitives | internal/config, internal/vault, internal/identity, internal/ids, internal/logging, internal/version | Cross-cutting primitives. |
Boundary tests enforce the direction. Edges do not import the application layer, and the state package does not learn about channels.
One writer
There is one gateway process and one SQLite writer. CLI clients are HTTP clients, not database clients. This removes a class of races that appear when a desktop app, a bot, and a CLI all open the same file.
WAL mode allows readers while the gateway writes. Startup runs a quick integrity check. The message search index is derived state and can be rebuilt; the messages themselves are not disposable.
Derived state is allowed to be rebuilt
FTS5 search is an index. If it is stale or damaged, doctor --repair can rebuild it without pretending the conversation history was recreated.
Contracts at the edges
Provider
OpenAI-compatible chat completions
Tool calling required; 60-second request timeout; no streaming.
Channel
CLI and optional Telegram
Private chats only; pairing required; groups ignored.
Tools
Workspace and exact-host fetch
Policy checked before execution; output treated as untrusted.
Sandbox
Docker contract
Fail-closed when unavailable; no execution tool.
Each contract has a failure mode. A provider error is sanitized and recorded. A tool timeout becomes a tool error, not a silent retry. A missing sandbox disables the path.
Runtime dependencies
| Dependency | Role | License |
|---|---|---|
| Go standard library | HTTP, crypto, filesystem, process, SQL primitives. | BSD-3-Clause |
| Modernc SQLite | Pure-Go SQLite driver; no CGO. | BSD-3-Clause |
| Argon2id / AES-GCM | Vault key derivation and encryption via Go crypto. | BSD-3-Clause |
| Telegram Bot API | Long polling over HTTPS; no third-party SDK required. | Service terms apply |
| Docker | Optional sandbox runtime. | Apache-2.0 |
The dependency list is intentionally small. Every runtime dependency is another update path and another license to audit.
What is deliberately absent
- No plugin marketplace or dynamic tool loading.
- No MCP client or server.
- No multi-agent orchestration or remote worker nodes.
- No hosted control plane or shared tenancy.
- No native provider matrix; the contract is OpenAI-compatible.
- No group chats, team approvals, or role hierarchy.
- No shell execution tool.
These are not roadmap promises. They are outside the current shape. Some may be reconsidered later; none are implied by the current tree.
Source provenance
The audit workspace records the upstream snapshots used during synthesis. The project repository keeps the decisions, not the full third-party source trees. The three source hashes are recorded so the review can be reproduced.
Hermes Agent f1e0a3b7c9d2e4a6b8c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2
OpenClaw 4b2c6d8e0f1a3b5c7d9e1f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c1d3e5f7a9b1c
PicoClaw 9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8bThese hashes identify audit inputs. They are not release checksums and do not imply that upstream code is shipped.