# Global Oversight Hub

The **Armorer Core** acts as a "Superior Observer" over all installed agents. It is a persistent background service that combines real-time security monitoring with autonomous command execution.

## The Superiority Principle

Armorer’s oversight is built on a specific Docker architecture that guarantees the integrity of the security layer.

### Unidirectional Read-Write Access
The Core container mounts the parent `installed/` directory where all agent data lives. This creates a powerful security asymmetry:

1.  **The Core sees all**: Every time an agent writes a message to its session log, the Core's filesystem watcher detects it instantly.
2.  **The Agent is blind**: The agent runs in a standard sandbox. It has no access to the Core's memory, network, or the Docker socket. It is completely unaware that it is being watched.
3.  **Instant Intervention**: Because the Core has `RW` access to the agent's files on the host level, it can redact a leaked API key from a log file **before** the agent can even read its own history for the next turn.

## Real-time Redaction

When the Core detects a file change in a **Monitor Target**:
1.  It triggers an internal **Oversight Agent**.
2.  The Oversight Agent scans the new content for secrets (GitHub tokens, OpenAI keys, etc.).
3.  If a leak is found, the Core **overwrites the file immediately**, replacing the secret with `[REDACTED]`.
4.  A notification is logged to the `events.json` file, which will alert you the next time you use the CLI.

## Asynchronous Command Processing



The Core isn't just a watcher; it's also an executor. It uses an **Inbox/Outbox** pattern to handle commands:



-   **CLI Interface**: When you use `armorer chat`, the CLI writes your request into the Core's `inbox` on the shared volume.

-   **Core Processing**: The Core picks up the JSON task, performs the requested actions (searching files, managing agents), and writes the result to the `outbox`.



### The "Smart Client" Protocol

Since the Core runs as a background service (headless), it cannot directly ask you questions. Instead, it uses a **Structured Protocol**:



1.  **Detection**: The Core finds a secret (e.g., "GitHub Token found").

2.  **Request**: It sends a structured JSON response saying: `{"message": "Found key...", "requires_confirmation": true}`.

3.  **Interaction**: The local CLI sees this flag and **renders a native interactive menu** (Yes/No).

4.  **Action**: Your choice is sent back to the Core as a new task, authorizing the `redact_secret` tool to proceed.



## Managing the Core



You can manage the background service directly from the CLI:



```bash

# Check if the Core is Active

armorer core status



# View internal security logs

armorer core logs



# Restart and Self-Heal the Core

armorer core restart

```
