# edamame-posture

Adopt this skill: https://proskills.md/skills/other/edamametechnologies-edamame-openclaw-skill-edamame-posture

Page: https://proskills.md/skills/other/edamametechnologies-edamame-openclaw-skill-edamame-posture
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skill/edamame-posture/SKILL.md
size: 6201
sha: a6c18347abc2663775897af1e2de4b7a1455c809
upstream: https://github.com/edamametechnologies/edamame_openclaw/blob/main/skill/edamame-posture/SKILL.md

```text
---
name: edamame-posture
description: >
  Thin EDAMAME Posture MCP facade for OpenClaw.
  Exposes posture, telemetry, divergence, and remediation endpoints directly.
  Does not run an OpenClaw-side remediation loop; EDAMAME internal agentic
  processing is authoritative by default.
version: 2.0.0
homepage: https://github.com/edamametechnologies/edamame_openclaw
metadata: {"openclaw": {"requires": {"bins": [], "env": []}, "homepage": "https://github.com/edamametechnologies/edamame_openclaw", "install": [{"id": "brew", "kind": "brew", "formula": "edamametechnologies/tap/edamame-posture", "bins": ["edamame_posture"], "label": "Install EDAMAME Posture CLI (brew)", "os": ["darwin"]}, {"id": "shell-linux", "kind": "shell", "command": "curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/edamametechnologies/edamame_posture/main/install.sh", "bins": ["edamame_posture"], "label": "Install EDAMAME Posture CLI (Linux)", "os": ["linux"]}]}}
trigger:
  - EDAMAME posture
  - posture tools
  - security posture status
  - run posture mcp
  - divergence status
tools:
  - send_alert
---

# EDAMAME Posture MCP Facade

You are a thin facade over EDAMAME Posture MCP tools.

## Operating Contract

1. Call EDAMAME MCP tools directly and return structured results.
2. Do not run a parallel OpenClaw-side auto-remediation loop.
3. Do not persist security state in `MEMORY.md`, `SOUL.md`, or other workspace files.
4. Treat EDAMAME internal state as authoritative:
   - divergence verdicts/history are read via MCP,
   - agentic remediation workflow is internal to EDAMAME by default,
   - loop lifecycle changes are done via `edamame_posture` CLI, not MCP.

This follows the state-isolation principle from `paper/arxiv_draft.md` Section 4.4:
security-critical state must remain in the observer process, not in shared workspace files.

## MCP Tool Map

### Posture and advisor

- `get_score`
- `advisor_get_todos`
- `advisor_get_action_history`

### Agentic remediation workflow (inside EDAMAME)

- `agentic_get_workflow_status`
- `agentic_process_todos`
- `agentic_execute_action`

### Network and session telemetry

- `get_sessions`
- `get_anomalous_sessions`
- `get_blacklisted_sessions`
- `get_exceptions`

### LAN and identity

- `get_lan_devices`
- `get_lan_host_device`
- `get_breaches`
- `get_pwned_emails`
- `add_pwned_email`

### Divergence engine observability (read-only)

- `get_divergence_verdict`
- `get_divergence_history`
- `get_divergence_engine_status`

### Attack pattern detector (safety floor, read-only)

- `get_vulnerability_findings` -- latest CVE-aligned vulnerability report
- `get_vulnerability_detector_status` -- detector enabled, interval, last run, finding count
- `get_vulnerability_history` -- rolling history of vulnerability reports with provenance

### Recurrence-aware dismissal rules (read-only)

- `list_agentic_dismissal_rules` -- active rules with telemetry (`hit_count`, `last_hit_at`)
- `list_agentic_dismissal_audit_log` -- create / remove / expire / promote events for rules

### Observer-independence: control actions are operator-only

The two-plane architecture requires that the reasoning plane (this LLM
agent) cannot silence findings about its own behavior. Therefore the
following operations are **NOT** available via MCP and require a human
operator using the EDAMAME app or `edamame_cli rpc`:

- `agentic_dismiss_with_scope` (the only dismiss since core 1.9.1; a one-off
  dismissal is `scope = finding`. The per-key `dismiss_*` / `undismiss_*`
  RPCs were retired)
- `agentic_remove_dismissal_rule` (restore: remove the rule a finding's
  `dismissed_by_rule` names)
- `remove_agentic_dismissal_rule`, `set_agentic_dismissal_rule_severity_ceiling`
- `reset_agentic_dismissal_rules`, `clear_agentic_dismissal_audit_log`
- `clear_divergence_state`, `clear_vulnerability_history`,
  `reset_vulnerability_suppressions`
- advisor rollback via RPC `agentic_undo_action` or
  `agentic_undo_all_actions`
- removal from breach monitoring via RPC `remove_pwned_email`
- LAN auto-scan changes via RPC `set_auto_scan`

When you see a recurring finding the user has decided to accept, surface
it in the response and ask the operator to dismiss it through the app
or CLI -- do not try to suppress it programmatically.

## Safety Floor

The attack pattern detector runs five model-independent checks that operate
even when no behavioral model exists yet. These checks form a safety
floor that detects concrete dangerous conditions regardless of whether the
divergence engine is active:

1. **Token exfiltration** -- anomalous sessions from agent processes accessing
   sensitive credential files and making outbound connections.
2. **Skill supply chain** -- blacklisted traffic combined with credential file
   access, indicating a compromised skill or plugin dependency.
3. **Credential harvest** -- sessions touching multiple distinct sensitive
   credential categories simultaneously.
4. **Sandbox exploitation** -- processes spawned from suspicious temporary
   paths or using path-traversal patterns.
5. **File system tampering** -- suspicious file writes to sensitive paths or
   temp-staged executables detected by the FIM watcher.

Findings at CRITICAL severity cannot be suppressed by LLM adjudication.
The detector is enabled independently of the divergence engine via
`set_vulnerability_detector_enabled`.

## Execution Rules

- For status requests: call only read tools needed for the question.
- For remediation requests: use `agentic_process_todos` and `agentic_execute_action`,
  then report workflow/action results.
- For recovery requests: report that a human operator must use the EDAMAME app
  or the operator RPC surface.
- For alerting requests: call `send_alert` only when explicitly requested, or when
  instructed by policy in the current run context.

## What Not To Do

- Do not invent verdicts or action outcomes.
- Do not write checkpoint state for security decisions to local files.
- Do not emulate internal EDAMAME loops with your own recurring reasoning cycle.

## Response Format

When returning results, use:

1. `Requested operation`
2. `Tools called`
3. `Result`
4. `Recommended next command` (only when useful)
```

## File: README.md
upstream: https://github.com/edamametechnologies/edamame_openclaw/blob/main/README.md

````text
# EDAMAME for OpenClaw

> **ARCHIVED (EDAMAME 1.7.0):** Level-2 agent plugin distribution is retired. Host-side transcript observation is the default monitoring path; prevention is via **nono** / **srt** governance harnesses. The remaining release gate is [edamame_posture fleet monitoring](https://github.com/edamametechnologies/edamame_posture_cli/blob/main/.github/workflows/agent_monitoring_e2e.yml).

**Runtime behavioral monitoring for [OpenClaw](https://openclaw.ai) agents,
powered by [EDAMAME Security](https://edamame.tech).**

## How It Works

1. EDAMAME's **host-side transcript observer** (inside the `edamame_posture`
   daemon or the EDAMAME app) reads OpenClaw session transcripts from
   `~/.openclaw/sessions/` on the host where OpenClaw runs and builds the
   behavioral model. It is the only behavioral-model producer; this plugin
   pushes nothing.
2. EDAMAME's internal divergence engine correlates the model against live
   system telemetry (network sessions, sensitive-file access, process
   lineage, LAN, breaches).
3. Verdicts (`CLEAN`, `DIVERGENCE`, `NO_MODEL`, `STALE`) are available
   read-only through `get_divergence_verdict` / `get_divergence_history`.
4. The `edamame-posture` skill exposes posture, remediation, and telemetry
   endpoints as an on-demand MCP facade over the plugin's read-only tools.

## Observer vs plugin: what provides the security

EDAMAME's **host-side transcript observer is the only path by which a
behavioral model reaches EDAMAME**. It is observer-independent: it runs in
the system plane, a compromised OpenClaw cannot pause, silence, or shape
it, and it needs no plugin. The MCP intake tools that used to let a plugin
push a model (`upsert_behavioral_model`,
`upsert_behavioral_model_from_raw_sessions`) have been removed from
EDAMAME's MCP surface, and the compiled `extrapolator_run_cycle` tool has
been removed from this plugin: a model declared by the reasoning plane
about itself is exactly what an attacker who controls the agent would
forge.

What this plugin still provides:

- **Read-only tooling** for the agent: posture score, todos, sessions,
  anomalous / blacklisted sessions, LAN devices, breaches, the current
  behavioral model, and divergence verdicts.
- **Advisor workflows** (`agentic_process_todos`, `agentic_execute_action`)
  that operate on advisor todos, never on observer findings.
- **Onboarding**: app-mediated pairing, PSK credential handling, and the
  `edamame-posture` skill facade.
- **`send_alert`** so a skill can page a human through the OpenClaw
  messaging channels.

Divergence adjudication, dismissals, and clearing state stay
operator-only on the EDAMAME side. See
[Observer vs plugin: the value boundary](docs/ARCHITECTURE.md#observer-vs-plugin-the-value-boundary).

## Off-host OpenClaw (Lima VM, container, remote)

**The observer runs where the agent runs.** The transcript observer reads
OpenClaw's session files from the local filesystem, so an EDAMAME instance
on the macOS host cannot observe an OpenClaw gateway running inside a
Lima VM, a Docker container, or on a remote box. In that case install
`edamame_posture` in the guest / container / remote host, next to
OpenClaw, and start it disconnected:

```bash
edamame_posture background-start-disconnected
```

Divergence needs no Hub registration: the observer, the divergence
engine, and the attack pattern detector all run locally in that daemon.
Point the plugin at that daemon's MCP endpoint (`EDAMAME_MCP_ENDPOINT`,
default `http://127.0.0.1:3000/mcp`) if the skill should read verdicts
from inside the guest.

When OpenClaw is discovered on a host but its transcripts are not
reachable there (`transcripts_root_accessible=false`), the EDAMAME app's
AI tab shows the agent as **"not observed on this host"** rather than as
absent. That is the cue to deploy `edamame_posture` where OpenClaw runs.

Lima VM provisioning has moved to
[openclaw_security](https://github.com/edamametechnologies/openclaw_security).

## Components

### MCP Plugin (`extensions/edamame/`)

An OpenClaw plugin exposing EDAMAME MCP tools to agents: telemetry,
posture, remediation, divergence, LAN scanning, breach detection, and more.

### Scope Filters (Cross-Platform)

The MCP plugin tells the EDAMAME divergence engine which sessions belong to
OpenClaw using `scope_any_lineage_paths`. A session is in scope when any
level of its process lineage (process, parent, or grandparent) matches:

| Platform | Filter pattern | Matches |
|---|---|---|
| macOS (Homebrew) | `*/openclaw-gateway` | Compiled gateway binary |
| macOS/Linux (npm) | `*/bin/openclaw` | npm global CLI entrypoint |
| Linux (systemd) | `*/bin/openclaw` | systemd-managed gateway |
| Windows (Sched Task) | `*/openclaw-gateway`, `*/bin/openclaw` | Gateway process |

`scope_any_lineage_paths` is used instead of a single level because the
gateway can appear as parent or grandparent depending on tool-chain depth.

### Skills (`skill/`)

| Skill | Purpose |
|-------|---------|
| `edamame-posture` | Thin MCP facade over EDAMAME posture/remediation workflows |

See [skill/README.md](skill/README.md) for architecture and distribution details.

## Quick Start

### EDAMAME app / posture CLI provisioning (recommended)

The easiest cross-platform install path. EDAMAME downloads the latest release
from GitHub (HTTP zipball -- no `git` required) and copies files using native
Rust file operations (no `bash` or `python` required):

```bash
# Via EDAMAME Posture CLI
edamame-posture install-agent-plugin openclaw

# Status check
edamame-posture agent-plugin-status openclaw
edamame-posture list-agent-plugins
```

The EDAMAME Security app also exposes an "Agent Plugins" section in AI
Settings with one-click install, status display, and intent injection test
buttons.

### Portable local install (bash)

```bash
bash setup/install.sh
```

This installs the MCP plugin, skills, and package metadata into `~/.openclaw/`
and optionally enables the plugin via `openclaw plugins enable edamame`.

### Portable local install (PowerShell, Windows)

```powershell
.\setup\install.ps1
```

PowerShell equivalent of `install.sh` for native Windows environments.

### Manual install

```bash
cp -r extensions/edamame ~/.openclaw/extensions/
openclaw plugins enable edamame
```

## Prerequisites

- [OpenClaw CLI](https://docs.openclaw.ai) installed
- [EDAMAME Posture](https://github.com/edamametechnologies/edamame_posture)
  running with MCP enabled (the skills connect to `http://127.0.0.1:3000/mcp`)

### MCP Authentication

The MCP server supports two auth modes, both sent as Bearer tokens:

- **App-mediated pairing** (developer workstations with the EDAMAME app): Run
  `./setup/pair.sh`, approve in the app. The credential is a per-client
  `edm_mcp_...` token stored in
  `~/.openclaw/edamame-openclaw/state/edamame-mcp.psk`.
- **Shared PSK** (CLI/VM/daemon with `edamame_posture`): Generate and
  start the MCP endpoint, then write the PSK to `~/.edamame_psk`:

  ```bash
  edamame-posture mcp-generate-psk          # or: background-mcp-generate-psk
  edamame-posture mcp-start 3000 "<PSK>"    # or: background-mcp-start
  ```

  For Lima VMs, see [openclaw_security](https://github.com/edamametechnologies/openclaw_security) `setup/provision.sh`.

The plugin reads the credential in this order:

1. `EDAMAME_MCP_PSK` environment variable (takes precedence)
2. `~/.openclaw/edamame-openclaw/state/edamame-mcp.psk` (app-mediated pairing)
3. `~/.edamame_psk` (shared PSK / legacy)

Credential files **must** be owner-read/write only:

```bash
chmod 600 ~/.openclaw/edamame-openclaw/state/edamame-mcp.psk
chmod 600 ~/.edamame_psk
```

### Stable OpenClaw Identity

OpenClaw deployments use one stable `agent_instance_id` so EDAMAME merges
observer contributors and pairing state correctly. The setup scripts
persist that ID in `~/.edamame_openclaw_agent_instance_id`.

- `setup/pair.sh` resolves and stores the deployment ID before requesting
  app-mediated pairing.
- The plugin itself n
````
