- README: 'Private & secure by design' headline section, sharper tagline,
contents, 'Built for' use-cases, security/privacy badges, live CI badge
- package.json: richer description + keywords, homepage/bugs fields
- add GitHub Actions CI (Node 20/22, npm test) and CITATION.cff
- docs/index: keyword-rich intro
docs: add Hugging Face mirror link + model-card metadata
mo
5a4e0ff
feat(devices): multi-device task claiming — only the winning device executes a task
mo
c9ee91e
- #pollTasks checks the claim response: claimed:false (another device won
the race) skips execution instead of double-running the task
- pairs with the cloud-side device registry: agents get device_id, tasks
are filtered per device, runs trace the executing device
- loadMemoryContext(): inject ~/.mona-agent/memory notes into the system
prompt at task start (capped at 3KB, per-file 800 chars)
- Few-shot protocol examples in #toolsPrompt — two perfect exemplars of the
reason→tool/answer JSON protocol
- Verification pass now routes to the strongest available model
(profile 'complex') regardless of the worker model — critic vs actor
- Uncertainty rule: 'If you cannot verify a fact with a tool, say so plainly
instead of guessing'
- 2 new tests for the parser upgrade paths (28/28 passing)
docs: enterprise documentation suite — compliance mappings (CRA, ISO 27001, IEC 62443), threat model, data flow, audit & deployment guides, SBOM, use cases, security.txt
mo
5c5b617
- new docs/additional-documents/: COMPLIANCE, CRA-READINESS, ISO-27001-MAPPING, IEC-62443, THREAT-MODEL, DATA-FLOW, SECURITY-AUDIT, DEPLOYMENT-GUIDE, ENTERPRISE-FAQ, SBOM
- docs/USE-CASES.md, docs/.well-known/security.txt
- docs index + README link the additional documents section
- CHANGELOG v2.2.0 entry; versions: root 2.2.0, desktop 1.4.1
feat(brain): auto smart/cheap mode — per-task brain profiles with provider routing (simple/standard/complex heuristics, quality-first vs cost-first key ordering)
mo
bf62c9f
fix(parser): lenient answer salvage — no raw JSON leaks when the brain breaks JSON with unescaped quotes (e.g. German „..." quotes); 3 new tests
mo
d0f0aa1
feat(reasoning): deep reasoning engine — plan, act, reflect, verify
mo
9b04a00
- reasoning protocol: brain replies with explicit reasoning JSON
({reasoning, tool, args} | {reasoning, answer} | plain text)
- parseBrainReply parser: tolerant to prose/fences/arrays, malformed JSON
triggers the corrective nudge instead of leaking raw JSON to users
- reflect phase: after every tool result the brain must decide whether the
goal is satisfied before acting again
- self-verification pass: the final answer is re-checked against the tool
evidence before it reaches the user (caught 'Hi RULESOK' = two words live)
- owner-tunable brain config from the cloud: maxSteps, temperature,
extraRules, verify toggle — delivered with the task queue
- agent system prompt now injected into device tasks
- temperature is forwarded to the LLM call (all 5 providers)
- 9 new parser tests (43/43 passing)
feat(trace): deep insight — live run traces with per-step usage, tokens, timing and cost
mo
854b98d
- think() now returns { text, usage, model, provider } from the SSE stream
- run lifecycle reporting: runStart / runStep / runFinish (best-effort, never blocks the loop)
- every brain step, tool call and tool result is traced live to the cloud
- task result carries usage totals + model/provider so old paths keep working
- trace reporting is sngine-only; docker platform behavior unchanged
feat(tools): persistent memory + web research tools for the agent
mo
3046dfd
fix(cloud): WAF-safe transport — base64 bodies for agent API payloads
mo
20765cf
Shared-hosting WAFs (ModSecurity on LiteSpeed) intermittently return 403
when tool results containing shell-like strings ride inside think()
payloads. All agent POST bodies (think, activity, task results, tool
results) are now base64-encoded at the transport layer and decoded
server-side — the WAF sees only opaque data. Auth, CSRF and rate
limiting remain enforced at the application layer.
Also: background shell processes now capture output to a log file and
report its path, so GUI/daemon launches are observable and debuggable.
New capabilities, so every real-world request works end to end:
- tools/apps: launch and quit desktop applications, multi-OS
(macOS open/osascript, Linux gtk-launch/pkill, Windows start/taskkill)
- tools/browser: open URLs and run searches (YouTube, Google, web) in the
default browser, multi-OS; watch mode attempts autoplay via Safari
automation with a graceful fallback
- tools/shell: background mode — GUI apps, servers and tkinter windows
detach instead of dying with the 15s timeout
- agent prompt: explicit guidance for background execution and tkinter
windows, plus the never-give-up rule
- tests: 34 passing (8 new cases for URL building and validation)
Polish:
- professional tone across all text: emojis removed from docs, CLI,
installer and logs
- dashboard template: emoji-free labels, text action buttons
(Start / Stop / Delete instead of glyphs)
docs: README rewrite — story-driven, sharper, more readable
Fail is never allowed:
- think() retries transient failures (network/429/5xx) with backoff
- malformed or empty brain replies trigger corrective nudges (max 2)
- tool errors inject a diagnostic hint + auto-capture a debug snapshot
(sysinfo, uname, node version) into the activity feed
- step exhaustion forces one plain-text conclusion instead of giving up
- task results are reported with retries — the conversation is never
left dangling
- daemon survives uncaught exceptions / unhandled rejections (log only)
Live-verified: broken command (exit 127) → auto-debug → brain pivoted to
a working tool → real answer.
fix(agent): robust tool-call parsing — prose, fences and nested braces
mo
0b356a1
The brain sometimes wraps its tool call in a sentence or a code fence.
The old parser only matched flat JSON, so such calls were never executed
and the raw tool JSON landed in the conversation. Now the parser
extracts a balanced JSON object anywhere in the reply (string-aware
brace matching), executes it, and the loop completes with a real final
answer.
docs: compliance & trust — CRA, NIS2, EU AI Act, GDPR, SBOM
polish: community touchpoints — star/share links, CLI + installer CTAs
mo
e4af19b
fix(cli): login crash on failed verify — readline used after close
mo
c02c7c8
The readline interface was closed right after the key prompt, so the
'Save anyway?' fallback on a failed verify threw ERR_USE_AFTER_CLOSE.
Close the interface only at the end of both paths.
feat(agent): agentic execution loop — the agent that acts
mo
181b8c1
Tasks from the dashboard now flow through a cloud task queue; the
device claims them within seconds and runs the full loop: the
mona.expert brain plans (think), the device executes local tools
(act), results stream back (observe), and the answer lands in the
conversation (deliver). Up to 8 tool steps per task, live execution
trace in the dashboard feed, zero inbound ports.
- agent.js: task poller (2s) + agentic loop with tool-call parsing
- cloud.js: pollTasks / claimTask / taskResult / postActivity
- provider-agnostic tool protocol: plain text or one JSON tool call
- docs: execution loop in ARCHITECTURE + README, CHANGELOG 2.1.0
- version bump: 2.1.0
docs: examples and integrations — boot units, health check, automation recipes
- Restructure daemon into apps/desktop/ (bin, src, test, install.sh, package.json)
- New packages: engine (remote brain client), protocol (typed messages)
- New apps/gateway/ — local control-plane gateway for Docker platform
- Replace platform/ dir and packages/providers with monorepo layout
- Database: new initial schema migration + seeds, drop legacy mysql schema.sql
- scripts: keygen/setup updates + check-invariants
- .env.example template (no secrets); sqlite as default DB driver
- control.js: #httpStats() — POST metrics to /api/v1/agent/stats every 10s,
metrics start in connect() independent of WS; skip WS reconnect loop when
server can't upgrade (Sngine/Hostinger), keep HTTPS metrics running
- Tests: 26/26 pass
Removes all provider-key machinery from the control plane UI: no
provider vault, no Add Key flow, no third-party keys anywhere. One key
(mona.expert) and one brain (mona.expert engine) — the engine assigns
models and issues all direction. Dashboard shows engine branding and a
security panel stating the invariant.
feat: control plane platform + dashboard (dark glass UI)
mo
352ddbd
Adds the Docker control plane (express platform, agent WS channel,
LLM proxy, key vault) and the redesigned dashboard: deep-navy glass
theme with violet-cyan gradients, live status dots, agent cards,
chat bubbles, audit timeline, polished modals.
The only key a device ever holds is its MONA key — provider keys
stay encrypted in the cloud vault.
refactor: agent never names an LLM provider or model
Mona
0040641
The device only speaks MONA: it sends the MONA key and the request —
provider/model selection belongs to the control plane. Removed
MONA_LLM_PROVIDER/MONA_LLM_MODEL defaults and the provider/model
fields from llm:request. The platform defaults the provider instead.
- config.js: drop DEFAULTS.llm
- agent.js/control.js: llmRequest sends messages only
- README: remove MONA_LLM_* env vars
- docker-control test: llm:error trigger via message content
fix(tui): log panel cut off the two newest entries + auto-follow
Mona
f7d6d0f
The Activity panel draws a header row and bottom border, so only
(panel height - 2) entries fit — but the render window was sized for
the full panel height. The two newest log lines were silently dropped
on every render. The log window now matches the visible rows.
Also: new activity auto-follows — scrolling up to read history no
longer leaves the view stuck; the next event snaps back to the latest
entry. Added 'g' / End to jump to the end manually.
- tui.js: logViewH sizing, auto-follow in #log, g/End keys, injectable
stdin for tests
- test/tui-scroll.test.mjs: auto-follow + jump-to-end coverage
The daemon now speaks the local Docker control plane's native protocol:
- register on connect (flat message, agentId in WS query)
- dashboard chat messages map to run commands, replies via chat:response
- llm:request/llm:response RPC proxies LLM calls through the platform
vault (keys stay in the cloud), provider/model from MONA_LLM_PROVIDER/
MONA_LLM_MODEL (default openai/gpt-4o-mini)
- live status broadcasts with metrics; sngine protocol untouched
Fixes: platform detection uses hostname (host includes the port),
DEFAULTS.llm added. New docker-control test suite (24 tests total).
device.metrics now carries cpuPercent (sampled), cpuModel,
mem.used/percent, diskPercent (statfs on home volume) and
uptimeSeconds — matching the control-plane devices table. TUI fields
(cpuLoad, mem.total/free, uptime) unchanged. Metrics interval is now
injectable for tests.
- control.js: async cpu sampling, statfs disk %, options param
- tests: metrics payload shape + backward compat
feat: versioned WS envelope (v:1) + capabilities in hello
Mona
dfd5fc7
Every control-channel message now carries a protocol version field so
the gateway can evolve the wire format without guessing. The hello
handshake announces device capabilities (tool list with descriptions,
shell allowlist/unsafe flag, platform) so the control plane can enforce
agent_permissions without probing the device.
- control.js: #send adds v:1; hello includes capabilities
- agent.js: passes tools.list() + shell security posture
- shell.js: exports security { allowlist, unsafe, platform }
- tests: hello envelope shape + capabilities
feat: stop reconnect loop on credential rejection (4001/4003)
Mona
4360e71
The cloud can now terminate a connection permanently by closing with
4001 (unauthorized) or 4003 (device revoked). Previously the daemon
retried forever (up to 30s apart) against a credential the server had
rejected. Now it stops, emits 'auth-failed' and tells the user to
re-login. Wired through daemon, headless CLI and TUI.
Also: control-channel tests for terminal close, backoff reconnect and
queue flush (test/control.test.mjs), npm test runs both suites.
- Dashboard: connection state machine (connecting/connected/reconnecting)
with animated spinner, reconnect timer + attempt counter
- Inline login: press l to paste the agent.mona.expert API key and
connect without leaving the terminal
- Setup mode: no key saved? GUI shows a step-by-step connect guide
(get key → paste → agent connects → control from dashboard)
- Task panel: live streaming preview, token/elapsed counter, wrap
- Activity log: color-coded levels with word wrapping
- Header chips: agent ID + live connection status; footer key hints
- Adaptive layout: side-by-side on wide terminals, stacked on narrow
- Debug bar: cloud URL, WS URL, creds path, reconnect counter
- README: new dashboard walkthrough + connect-your-agent guide
- render harness for TUI dev (test/render-harness.mjs)
mo: installer — auto-add ~/.local/bin to PATH (fix 'command not found' after install)
Mona
7e27ccc
mo: fix Authorization header case for Apache/PHP compatibility
Mona
4b88879
- PHP $_SERVER['HTTP_AUTHORIZATION'] requires capital-A Authorization header
- Updated api.js and cloud.js to use proper header case
- All 14 tests passing, all API endpoints verified
mo: platform-aware API client, sngine integration, Docker support
Mona
5cdc985
- Config auto-detects platform type (sngine vs Docker) and sets correct API paths
- Cloud client uses platform-aware endpoints for verify, think, tool-result
- API client works with both sngine-based and Docker control planes
- REST API now accepts Bearer tokens (agent auth) in addition to session cookies
- Fixed agent ID regex to support hyphens in IDs
- WebSocket relay running on agent.mona.expert:4390
- All 14 tests passing
mo: multi-OS support, API client, enhanced CLI and TUI
Mona
64bc9a3
- Multi-OS shell tool: detects macOS/Linux/Windows, adapts shell, PATH, and command mapping
- Enhanced CLI: new commands 'connect', 'chat', 'exec', 'debug'
- API client (src/api.js): HTTP direct communication with control plane (health, chat, tools, streaming)
- Improved TUI: reconnect, debug overlay, help screen, platform indicator, ASCII-safe Windows fallback
- Sysinfo tool: per-platform details (machine type, kernel version, Windows version)
- All 14 tests passing
docs: add README with architecture, tools, and open-source model
Mona
719700f
Comprehensive documentation covering:
- Architecture diagram (device <-> cloud split)
- Quick start with one-line install
- Terminal dashboard preview
- Four built-in tools with security model
- CLI commands reference
- Environment variable configuration
- Project structure map
- Open-source vs SaaS model clarification
- Development setup and test instructions
MIT license included. No emoji — clean, professional format.
test: add unit tests for tools, registry, and configuration
Mona
d47d046
14 tests using Node.js built-in test runner (node --test):
- sysinfo: host info, memory percentage, load averages
- shell: allowed commands, disallowed commands, empty/rejected
- files: workspace listing, write/read/delete cycle, path traversal
- net: URL validation, HTTP method restrictions
- registry: tool discovery, unknown tool handling, descriptions
- config: cloud endpoints, version constants
Zero external test dependencies. All tests pass in under 400ms.
feat: add CLI with login, gui, start, status, and help commands
Mona
17d402e
Command-line interface with five commands:
- login: interactive API key verification and secure storage
- gui: full terminal dashboard with live metrics
- start: headless daemon mode with console logging
- status: display connection state and config paths
- help: usage guide with environment variables
Auto-detection: GUI if TTY, headless otherwise when no command
is specified. Graceful shutdown on SIGINT/SIGTERM.
Removed deprecated GUI server and telemetry files from v0.1.0.
feat: add terminal dashboard with live system metrics
Mona
5b137c2
Full-screen ANSI terminal dashboard with zero dependencies:
- System panel: hostname, OS, CPUs, memory bar, load, uptime
- Task panel: streaming token output, live token count, elapsed time
- Activity log: timestamped event feed with icon coding
- Footer: keyboard shortcuts (q quit, c clear, arrows scroll)
Pure Node.js builtins — readline for keyboard input, ANSI escape
codes for rendering. 4fps render loop driven by EventEmitter events
from the agent daemon. Handles terminal resize dynamically.
No blessed, no ink, no ncurses bindings. Zero npm deps for TUI.
feat: add network operations tool with HTTP-only guard
Mona
1d40be8
Network tool with two operations:
- fetch: HTTP GET/POST/HEAD with HTML text extraction,
content type detection, 15s timeout, 50KB response cap
- ping: connectivity check via HEAD request with latency
Security:
- HTTP(S) URLs only — rejects other protocols
- Methods restricted to GET, POST, HEAD
- Response body size limited to 50KB
- User-Agent header identifies mona-agent version
- AbortController with 15s timeout per request
feat: add file operations tool with workspace sandboxing
Mona
9f8b551
File system operations confined to a workspace directory:
- read: load file content (50KB cap, truncation flag)
- write: create/overwrite with recursive directory creation
- list: enumerate directory entries with type info
- delete: recursive removal with force
- stat: file metadata (size, type, timestamps)
Path traversal prevention via absolute path resolution and
prefix check. Workspace defaults to ~/.mona-agent/workspace,
configurable via MONA_WORKSPACE env var.
Auto-creates workspace on first use.
feat: add sandboxed shell execution with allowlist and pattern blocking
Mona
fe11cca
Shell command execution with defense-in-depth:
- Extended allowlist of 20+ safe commands (df, uptime, uname, etc.)
- MONA_ALLOW_CMDS env var to extend
- Dangerous pattern blocking always enforced (rm -rf /, mkfs,
fork bombs, dd, chmod 777 /) — even in unsafe mode
- MONA_SHELL_UNSAFE=1 flag for unrestricted access
- 15s timeout, 1MB output buffer, stdout/stderr separation
- Command length validation (max 2000 chars)
Safe by default. Extensible when needed. Dangerous always blocked.
feat: add read-only system information tool
Mona
5309613
Safe, zero-write device telemetry tool:
- Hostname, OS, platform, architecture, kernel release
- CPU count and model
- Memory: total, free, used, percentage
- Load averages (1, 5, 15 min)
- System uptime
- Network interfaces (IPv4, non-loopback)
Read-only. No side effects. No user input.
feat: introduce modular tool registry pattern
Mona
c46bcaa
Pluggable tool registry with built-in validation:
- Registration with name/description/args/run contract
- Tool listing for cloud brain context
- Timeout enforcement via AbortController (30s per tool)
- Error handling with graceful degradation
- Available tools reported on unknown tool calls
Four built-in tools: sysinfo, shell, files, net.
feat: add agent daemon with cloud-brain reasoning loop
Mona
4e94437
Core daemon orchestrating commands from the control plane:
- Command dispatcher for run, tool, ping, and reset actions
- Cloud reasoning via streaming SSE with token emission
- Tool execution with per-action lifecycle events
- Task statistics tracking (tasks, tokens, tool calls, errors)
- EventEmitter for TUI/headless integration
The daemon receives commands, delegates reasoning to the cloud,
executes local tools, and streams everything back upstream.
feat: add WebSocket control channel with auto-reconnect
Mona
bf21785
WebSocket relay that dials OUT to the control plane:
- Typed message protocol (hello, command, metrics, tokens, results)
- Exponential backoff with 30% jitter (1s-30s range)
- Queued messages flushed on connect
- Device metrics stream (CPU, memory, load, uptime) at configurable interval
- EventEmitter interface for agent daemon integration
No local server. No inbound ports. Device only connects out.