Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 96 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,98 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

---

## [1.0.1] — Unreleased — "Alignment"
## [1.1.0] — 2026-06-25 — "Containment"

Pilot operational release. Validated through a **real operational bring-up** (no mocks) — boot,
onboarding, scheduler, email, research, briefing, runtime, recovery, and Discord all exercised on
real infrastructure (**9/9 stages live-validated**). Classified **Pilot Ready** (not Production
Ready). Full evidence in `blueprint/implementations/v1.1.0/`.

### Branding

- **Hermes → Nexus Agent.** The autonomous planning/research runtime is renamed throughout code,
tests, ADRs, and documentation. Registry id is now `nexus`; runtime records persist `runtime="nexus"`.
`nexus/execution/runners/hermes.py` → `nexus_agent.py` and `hermes_tools.py` → `nexus_agent_tools.py`
(git history preserved). Third-party Nous Research / `hermes-agent` references and historical tags
(`hermes-experimental`, `hermes-pilot`) were intentionally **not** renamed.

### Architecture

- No architectural changes. Runtime registry, governance gates, sandbox boundary, scheduler ports,
and memory/event-sourcing boundaries preserved. ADR history intact.

### Runtime

- **Nexus Agent: Experimental → Pilot.** Fail-fast initialization (refuse to start without an LLM
capability), operator-tunable `execution.agent_max_steps`, honest terminal lifecycle
(`completed`/`failed`/`timed_out`/`cancelled`), cancellation wiring, and `resume_goal`
checkpoint recovery (H-2/H-4).
- **Multi-provider LLM gateway** — Groq → Zenmux → OpenRouter (free models) fallback chain;
resilient to single-provider 402/429 (`nexus/intelligence/openrouter.py`).
- Orchestrator exit-status finalization honors the agent's truthful terminal status
(`resolve_exit_status`, H-4).

### Governance

- A-001 fail-closed owner authorization verified live at boot; `RepositoryValidated` /
`RuntimeAuthorized` audited per execution. Config now also reads `DISCORD_OWNER_ID` (operator-
friendly alias) for owner-id resolution.

### Sandbox

- **Pilot Safe** (Track S): default-secure (`enabled=False`, `provider=local`, `network=none`,
`fs=restricted`), execution fails closed, S-3 startup gate enforced.

### Research

- Live-validated: 20 findings parsed from a live RSS feed, LLM-scored, and persisted
(`research.completed`).

### Scheduler

- Live-validated: audited jobs executing (`scheduler.job.started:4` / `completed:4`) with metrics
and failure isolation.

### Operational Validation

- New `python -m nexus onboard` — safe, read-only staged operator onboarding (`nexus/onboarding.py`).
- Email (SMTP) real delivery after a one-line double-STARTTLS fix
(`nexus/communication/email/service.py`).
- Discord real gateway delivery (bot → guild → `#general`, message id confirmed).
- Recovery: interrupt → fresh-adapter resume → completion, no corruption, audit continuity.
- Config alignment: `NOTIFY_SMTP_*` / `NOTIFY_EMAIL_FROM` mapped into the email config so the
existing SMTP service delivers without a parallel credential store. `.env` remained the single
source of truth (never rewritten).

### Breaking Changes

- **None for persisted data or external APIs.** The runtime id `hermes` and runner type
`hermes_agent` still resolve (registry alias + retained enum member). Source imports of
`HermesRuntimeAdapter` still work via a module-level alias.
- Internal module paths changed: import the agent runtime from
`nexus.execution.runners.nexus_agent` (the old `hermes` module path no longer exists).

### Migration Notes

- No database migration required. On a fresh deployment the schema is created from the current
models (`create_all`); existing databases with the v1.1.0 task columns need no change.
- Operators using the singular `DISCORD_OWNER_ID` env key are now supported directly.
- LLM defaults changed to free OpenRouter models; set `GROQ_API_KEY` / `ZENMUX_API` to enable the
full fallback chain, or supply a paid/BYOK OpenRouter key for sustained load.

### Known Issues

- Free-tier LLM rate-limits under sustained load (mitigated, not eliminated, by the fallback chain).
- `create_all`-only schema management; Alembic migrations incomplete (manual recreate handled drift).
- `.env` `DISCORD_*_CHANNEL` ids not yet read into `settings.discord.channels` (delivery works).
- Gemini / Claude runtimes remain generic shell runners (Experimental).
- No production web `SearchProvider` for agent tools.
- In-code version string (`nexus/__init__.py`, `pyproject.toml`) still reads `0.1.0` — pre-existing
documented debt; source bump deferred to v1.2 (out of release-workstream scope).

---

## [1.0.1] — 2026-06-24 — "Alignment"

A correctness, safety, and operational-completeness release. **No new features.** Every change traces
to an accepted onboarding-audit finding (A-001…A-006).
Expand Down Expand Up @@ -39,15 +130,15 @@ to an accepted onboarding-audit finding (A-001…A-006).

### Pending

- **A-005** — Hermes runtime reality audit (AP-105).
- **A-005** — Nexus runtime reality audit (AP-105).
- **A-006** — Sandbox safety review.

### Known issues / residual debt

- In-code version string (`nexus/__init__.py`, `pyproject.toml`) still reads `0.1.0` while the release
tag is `v1.0.0` (source/config change, out of the documentation-only AP-104 scope).
- `/api/v1/status` reports subsystems as literal `"stub"`; health is a boot-time boolean, not live.
- Concrete Gemini/Claude runtimes are generic shell runners; Hermes contains simulated branches.
- Concrete Gemini/Claude runtimes are generic shell runners; Nexus contains simulated branches.
- Default sandbox `provider="local"` provides no isolation.
- Alembic migrations incomplete; `create_all` is the current schema source.

Expand All @@ -63,7 +154,7 @@ to an accepted onboarding-audit finding (A-001…A-006).
audited (`nexus/execution/service.py`, `nexus/approvals/service.py`).
- **Runtime governance** — 11-gate governance authorizing every execution decision
(`nexus/execution/governance.py`).
- **Runtime registry + adapter split** — CLI/Agent adapters for Gemini, Claude, and Hermes runtimes
- **Runtime registry + adapter split** — CLI/Agent adapters for Gemini, Claude, and Nexus runtimes
(AP-301…AP-304; `nexus/execution/runners/`).
- **Event-sourced memory** — immutable `audit_log`, checkpoint replay, resumable context
(`nexus/memory/`).
Expand All @@ -80,7 +171,7 @@ to an accepted onboarding-audit finding (A-001…A-006).

- Fail-open owner authentication (A-001); execution-timeout field bug (A-002); **no scheduler** so
research/briefing/metrics/expiry never fired autonomously (A-003); documentation drift (A-004);
Hermes simulated behaviors (A-005); default-off sandbox isolation (A-006).
Nexus simulated behaviors (A-005); default-off sandbox isolation (A-006).

---

Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Nexus is a deterministic, auditable, and recoverable orchestration system that c

- **Tasks** — creation, lifecycle, prioritization (✅ production-ready)
- **Approvals** — un-bypassable, DB-backed governance workflows with audit trails (✅ production-ready)
- **Agent Execution** — runtime registry over Gemini / Claude / Hermes adapters (🟡 governed core ready; concrete runtimes stubbed/mocked)
- **Agent Execution** — runtime registry over Gemini / Claude / Nexus adapters (🟡 governed core ready; Gemini/Claude stubbed, Nexus Experimental)
- **Research** — autonomous monitoring (✅ engine built, now scheduled; activates when feeds are configured)
- **Communication** — Discord, Email (future: WhatsApp, Slack)
- **Scheduling** — APScheduler-driven jobs for research, briefings, expiry sweeps, metrics, health (✅ single-node, new in v1.0.1)
Expand Down Expand Up @@ -99,7 +99,7 @@ All execution paths must remain observable, auditable, and interruptible.
│ EXECUTION LAYER │
│ Runtime Registry + │
│ Adapters: Gemini / │
│ Claude / Hermes
│ Claude / Nexus
│ (11-gate governance) │
└─────────────────────────┘
```
Expand All @@ -124,8 +124,8 @@ the **current built status** of every subsystem.
| Research engine | 🟡 Operational (latent) | Built + scheduled; activates once `research_feeds` configured |
| Daily briefing engine | 🟡 Operational | Built + scheduled 08:00 (Asia/Kolkata) |
| Gemini / Claude runtimes | 🟠 Stubbed | Generic shell runners; real CLI binary integration pending |
| Hermes runtime | 🔴 Mocked (partial) | Simulated branches in production; full audit = AP-105 |
| Sandbox isolation | 🟠 Experimental | Default `provider="local"` = **no isolation**; review = A-006 |
| Nexus runtime | 🟠 Experimental | Honest: no prod mock, provider-backed search (`SearchProvider` DI), goal-derived planning, structured tool-calls, truthful outcomes (v1.1.0 H-2). Lifecycle safety (terminate/resume) = Pilot/H-4 |
| Sandbox isolation | 🟢 Pilot Safe | **Default-secure fail-closed** + boot-validated + workspace-confined (v1.1.0 Track S). Isolation opt-in (`provider=docker`); residual R-04/R-08/R-09 |

---

Expand All @@ -136,7 +136,9 @@ governance layer that authorizes every run:

- **Gemini** (`gemini`) — CLI adapter (currently a governed generic shell runner).
- **Claude** (`claude`) — CLI adapter (currently a governed generic shell runner).
- **Hermes** — Agent adapter (autonomous loop; contains simulated/mocked branches today — see AP-105).
- **Nexus** — Agent adapter (autonomous loop). **Experimental** (v1.1.0 H-2): real model decisions via
structured tool-calls, provider-backed search, goal-derived planning, truthful exit status. Not yet
lifecycle-safe (no terminate/resume) — that is the Pilot bar (H-4).

The governance abstraction and registry are production-quality; the **concrete runtime behaviors are
still stubbed/mocked** and must not be represented as full CLI/agent integrations.
Expand Down Expand Up @@ -170,9 +172,23 @@ future (see [scheduler-future-scaling.md](blueprint/implementations/v1.0.1/sched

## Sandboxing

Execution sandbox is configurable (`local` / `docker` / `mock`). **The default is `local` — no
container isolation** — with command-blacklist governance as the guard. Treat host exposure as real
until the A-006 sandbox safety review lands. Configure Docker isolation before running untrusted commands.
Execution sandbox is configurable (`docker` / `local` / `mock`) and is **default-secure** as of
v1.1.0 Track S (**Pilot Safe**, `ADR-sandbox-pilot-safe`):

- **Fails closed by default.** With sandboxing disabled or an unrecognized provider, the manager
**refuses to execute** rather than silently running on the host (no fail-open).
- **Boot-validated.** Startup aborts on an incoherent sandbox config or an unavailable
policy-enforcing provider (Docker availability is probed at boot).
- **Honest enforcement.** Each execution is audited with whether the provider actually enforces the
policy (`policy_enforced`); a host run is declared, never pretended.
- **Workspace-confined file tools.** Agent `read_file`/`write_file` are confined to the approved
workspace (path traversal / absolute / symlink escapes fail closed).

Container isolation remains **opt-in**: set `sandbox.enabled=true`, `sandbox.provider=docker` (Docker
present), and ideally `filesystem_policy=readonly` before running untrusted commands. Running on the
host (`provider=local`) is possible only as a deliberate, startup-warned, audited choice. Residual
items: command-blacklist robustness (R-04, governance-owned), shell exec surface (R-08), and the
non-readonly default mount (R-09).

---

Expand Down
2 changes: 1 addition & 1 deletion blueprint/DECISIONS/ADR-003-pi-evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ We will proceed by implementing the Event Gateway, Task Engine, and Workflow Orc
- [docs/03_AGENT_DESIGN.md](../../docs/03_AGENT_DESIGN.md) — Pi Integration Evaluation
- [docs/05_CRITICAL_CONSTRAINTS.md](../../docs/05_CRITICAL_CONSTRAINTS.md) — Constraint 25
- [docs/06_DEVELOPMENT_PHASES.md](../../docs/06_DEVELOPMENT_PHASES.md) — Phase 8
- [docs/07_HERMES_AGENT.md](../../docs/07_HERMES_AGENT.md) — Reference 1
- [docs/07_NEXUS_AGENT.md](../../docs/07_NEXUS_AGENT.md) — Reference 1
- [docs/RULES.md](../../docs/RULES.md) — Pi Integration Consideration
4 changes: 2 additions & 2 deletions blueprint/DECISIONS/ADR-010-execution-timeouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Every execution record must contain:
class ExecutionRecord(BaseModel):
id: UUID
task_id: UUID
runner: RunnerType # GEMINI, CLAUDE, HERMES, RESEARCH
runner: RunnerType # GEMINI, CLAUDE, NEXUS, RESEARCH
started_at: datetime # When execution began
last_heartbeat: datetime # Updated periodically during execution
timeout_threshold: int # Seconds until timeout
Expand Down Expand Up @@ -113,7 +113,7 @@ The runner is responsible for:
This constraint is **mandatory** for:
- Gemini CLI Runner
- Claude Code Runner
- Hermes Agent Runner (if adopted)
- Nexus Agent Runner (if adopted)
- Research Agent Jobs

---
Expand Down
4 changes: 2 additions & 2 deletions blueprint/DECISIONS/ADR-011-local-first-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Nexus MVP targets **local machine** as the primary deployment environment.
Nexus requires:
- Gemini CLI (local binary)
- Claude Code (local binary)
- Hermes Agent (local binary, already installed)
- Nexus Agent (local binary, already installed)
- Local Git repositories
- Local execution environments

Expand All @@ -35,7 +35,7 @@ Hill's Machine
├── D:/projects/fosterx
├── Gemini CLI (installed)
├── Claude Code (installed)
└── Hermes Agent (installed)
└── Nexus Agent (installed)
```

---
Expand Down
2 changes: 1 addition & 1 deletion blueprint/DECISIONS/ADR-command-bus-evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

The Nexus Control Plane has successfully completed the foundation layer (Phase 1) and is productizing its core workflows (Phase 2). However, the recent integration health audit revealed that the presentation layer ([bot.py](file:///D:/nexus/nexus/communication/discord/bot.py)) directly interacts with the database persistence layer ([database.py](file:///D:/nexus/nexus/database.py)), manages context transaction loops, and instantiates operational services ([TaskService](file:///D:/nexus/nexus/memory/task_service.py), [ApprovalService](file:///D:/nexus/nexus/approvals/service.py)).

As we prepare to add more communication adapters (Email, custom HTTP APIs) and diverse execution runner agents (Gemini, Claude, Hermes), continuing to execute operational logic directly inside UI controllers will lead to duplicated code and leaking boundaries.
As we prepare to add more communication adapters (Email, custom HTTP APIs) and diverse execution runner agents (Gemini, Claude, Nexus), continuing to execute operational logic directly inside UI controllers will lead to duplicated code and leaking boundaries.

---

Expand Down
47 changes: 0 additions & 47 deletions blueprint/DECISIONS/ADR-hermes-runtime-evaluation.md

This file was deleted.

Loading
Loading