- security-sweep-2026-06-01.md: fresh sweep of alpha.6 (1 fixed, findings + carry-overs) - code-review-2026-06-01.md: optimisation/cleanliness notes (pool error handler, O(n) bcrypt token scan, FTS index alignment, dup auth parsing) - yerin-security-agent.md: security-agent design + tool roadmap + Orthos role proposal - plan-6-brainstorm-brief.md: Sacred Valley widget inventory + open design questions - security-followups.md: marked the pending_changes CHECK finding RESOLVED Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5.4 KiB
Yerin — the Void 2.0 Security Agent
Cradle note: Yerin is the sword artist — fast, vigilant, the one who notices the threat first and calls it. In Void 1.x she already owns the 5-minute alert cron. In Void 2.0 she becomes a first-class read-only security/observability agent: she watches, reports, and proposes — she never silently acts.
Design principles
- Read-only by capability. Yerin's agent record gets
{ read: true }and nowrite/suggest. Anything she wants changed she raises to you; she cannot mutate state. (If you later want her to be able to propose a remediation, addsuggest: trueand the existing pending-change flow gives you an approval gate for free.) - Own toolset, own registry. Security tools live in
lib/ai/agent/tools/security/behindsecurityRegistry— separate from Dross'scompanionRegistry, so she gets investigative tools, notpropose_change. - No secret material, ever. Tools project explicit columns and rely on the
audit layer's write-time redaction.
agent_inventorydeliberately never doesSELECT *.
Built this pass (TDD, on main, not deployed)
lib/ai/agent/tools/security/ + securityRegistry, tests in
tests/ai/security_tools.test.js:
| Tool | What it answers |
|---|---|
audit_log |
"Who did what, newest first?" Filter by actor_kind / actor_id. Reads the redacted audit trail. Capped at 200. |
agent_inventory |
"Which agents exist and what is each allowed to do?" Returns id/slug/name/kind/model + capabilities + scopes. Never returns token material. |
Roadmap — tools to add next (designed, not yet built)
Each is read-only and maps to an existing repo, so each is a small TDD task:
pending_review— listpending_changesawaiting approval (the queue of agent-proposed mutations). WrapspendingChanges.listPending. Security-relevant because it's exactly where a prompt-injected agent's intent surfaces.resource_exposure— inventory of resources withurl/host/status(attack surface / what's reachable). Wrapsresources.listBySpaceacross spaces.token_audit— agent tokens withlabel,last_used,revoked_at(NOT the hash) to spot stale/unused credentials. Needs a small repo read.recent_captures— newly ingested refs/source_docs (untrusted external content entering the system), so Yerin can flag suspicious inbound material.
Stretch (needs new plumbing, your call):
tls_expiry/service_health— port Void 1.x'slib/security.jscert checks + the Yerin alert cron into a tool she can call on demand.- Active probes (e.g. "is this CT's admin port exposed?") would require
network egress — must go through
safeFetchand be owner-gated. Defer.
Wiring Yerin up (the remaining integration steps — left for you)
These touch live agent seeding / MCP config, so they're documented rather than done unsupervised:
- Seed the agent. A migration (010) inserting a
yerinagent row withcapabilities = {"read": true},kind: 'claude'(or'ollama'if you want her cheap/local), and a persona prompt. Mirror migration 007's companion seed. - Expose
securityRegistryover MCP.lib/mcp/companion-stdio.jscurrently hardcodescompanionRegistry. Parameterise it (envVOID_TOOL_REGISTRY=securityselects the registry) so a Yerin session spawns with her tools. ~10 lines. - A Yerin entry point. Either a route (
POST /api/security/ask) reusing theclaude_clidriver with Yerin's persona +securityRegistry, or a scheduled cron that runs a standing "anything suspicious in the last 24h?" pass and files the result as a Sacred Valley card (ties into Plan 6).
Adjacent agent roles (so the roster stays coherent)
- Dross — companion/chat (Lindon's own spirit-AI; the right-rail assistant). Read + suggest. Already live.
- Yerin — security/vigilance (this doc). Read-only.
- Orthos — see the role proposal below.
Proposed role: Orthos — the local-model Advisor / Council
Orthos in Cradle is the ancient dragon-turtle: a powerful ally with long experience and a deep spiritual (Path of Black Flame) connection — exactly your framing. That maps cleanly onto a specific, useful Void 2.0 role:
Orthos = the reflective Advisor, running on the local Ollama model (free, always-on), not Claude. He plays to a local model's strengths (summarisation & synthesis, not precise tool-use):
- The long view / "council briefing." A scheduled pass that fuses recent captures, open tasks, and audit highlights into a short reflective digest — the Void 1.x "Orthos council briefing" reborn as a Sacred Valley widget.
- "Spiritual connection" = the knowledge graph. Let Orthos traverse the embedding/RRF links to surface non-obvious connections across Spaces ("these three captures in two different Spaces are converging on X"). That's the literal mechanisation of his deep-sight: semantic connection-finding over the vector store.
- Why local: it's high-frequency, low-stakes, cost-sensitive reflection —
perfect for
llama3.1:8bon192.168.1.185, keeping Claude budget for Dross. Capability:{ read: true },kind: 'ollama',model: 'llama3.1:8b'.
So the trio reads naturally: Dross converses, Yerin guards, Orthos
reflects — and two of the three (Yerin alerts, Orthos council) become Plan 6
Sacred Valley widgets. See docs/plan-6-brainstorm-brief.md.