The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(security/egress): add README for egress module
Steven Enamakel0413a017545e
diff --git a/crates/openhuman-core/src/security/egress/README.md b/crates/openhuman-core/src/security/egress/README.mdindex 572306861e..464f1816aa 100644--- a/crates/openhuman-core/src/security/egress/README.md+++ b/crates/openhuman-core/src/security/egress/README.md@@ -8,39 +8,39 @@ plus the `LocalOnly` enforcement chokepoint built on top of it.| File | Purpose || --- | --- |-| `types.rs` | `EgressDescriptor`, `DataKind`, `EgressReason`, `IdentificationRisk` — the descriptor contract |+| `types.rs` | `EgressDescriptor`, `DataKind`, `EgressReason`, `IdentificationRisk`: the descriptor contract || `emit.rs` | `emit_external_transfer`, the single publish chokepoint, plus per-turn dedup || `enforce.rs` | `local_only_blocks` (pure decision) and its two side-effecting wrappers, `enforce_egress` / `local_only_tool_block` |## Public surface-- `EgressDescriptor` — `provider_slug` (destination, e.g. `"openai"`,+- `EgressDescriptor`: `provider_slug` (destination, e.g. `"openai"`,`"composio"`, `"openhuman_backend"`, `"network"`), `service` (endpoint/model/- host), `is_external` (false for local runtimes — never published),+ host), `is_external` (false for local runtimes, never published),`reason: EgressReason`, `data_kinds: Vec<DataKind>`, and the S5 forward-compatfields `risk_level: IdentificationRisk` / `risk_categories: Vec<String>`(default `Unknown`/empty until the PII/identification-risk detector- populates them). Built via semantic constructors —+ populates them). Built via semantic constructors,`EgressDescriptor::inference`, `::composio`, `::integration`, `::embedding`,- `::network_fetch` — rather than the struct literal.-- `emit_external_transfer(descriptor)` — the one call every external-egress+ `::network_fetch`, rather than the struct literal.+- `emit_external_transfer(descriptor)`: the one call every external-egresspoint makes right before a transfer leaves the device. It drops non-externaltransfers, attaches best-effort chat routing from`security::approval::APPROVAL_CHAT_CONTEXT`, and fire-and-forget publishes- `DomainEvent::ExternalTransferPending` on `crate::core::bus::BUS` — this+ `DomainEvent::ExternalTransferPending` on `crate::core::bus::BUS`. Thisnever blocks or fails the caller.-- `dedup_turn_scope(f)` — runs `f` with a per-turn dedup ledger so a single+- `dedup_turn_scope(f)`: runs `f` with a per-turn dedup ledger so a singlemanaged chat turn's multi-model fan-out (primary + workload-tier + summarizerbuilds) collapses repeated disclosures of the same destination into oneevent; every other call path emits unconditionally.-- `local_only_blocks(mode, desc) -> bool` — pure decision: blocks only when+- `local_only_blocks(mode, desc) -> bool`: pure decision, blocks only when`mode == PrivacyMode::LocalOnly`, `desc.is_external`, and the transfer is notan exempt backend control-plane round-trip (`is_control_plane`, private).`Standard` and `Sensitive` never block here.-- `enforce_egress(desc) -> anyhow::Result<()>` — thin wrapper for+- `enforce_egress(desc) -> anyhow::Result<()>`: thin wrapper for`anyhow`-returning egress sites (composio, integrations, cloud embeddings);`Err` with a clean, non-sensitive message when blocked.-- `local_only_tool_block(desc) -> Option<String>` — thin wrapper for agent+- `local_only_tool_block(desc) -> Option<String>`: thin wrapper for agenttools that return `Ok(ToolResult::error(..))` on denial; the message isprefixed with `POLICY_BLOCKED_MARKER` so the harness treats it as apermanent, non-retryable block.@@ -52,25 +52,25 @@ Both `enforce_egress` and `local_only_tool_block` read the live mode via## Relates to-- `config/schema/privacy.rs` — `PrivacyMode` (`Standard` / `Sensitive` /+- `config/schema/privacy.rs`: `PrivacyMode` (`Standard` / `Sensitive` /`LocalOnly`), the config-facing enum `local_only_blocks` matches on.-- [`../pii/README.md`](../pii/README.md) — the identification-risk detector+- [`../pii/README.md`](../pii/README.md): the identification-risk detectorthat will eventually populate `EgressDescriptor::risk_level` /`risk_categories` via `EgressDescriptor::with_risk`.-- `core/events.rs` — `DomainEvent::ExternalTransferPending { descriptor,+- `core/events.rs`: `DomainEvent::ExternalTransferPending { descriptor,thread_id, client_id }`, the event `emit_external_transfer` publishes.## Used by-- `memory/guard/policy.rs` — memory-write egress guard.+- `memory/guard/policy.rs`: memory-write egress guard.- `integrations/client/requests.rs`, `integrations/composio/client/execute.rs`,- `integrations/composio/execute_dispatch.rs` — backend and Composio calls.-- `tools/impl/network/{curl,http_request,web_fetch}.rs` — agent network-fetch+ `integrations/composio/execute_dispatch.rs`: backend and Composio calls.+- `tools/impl/network/{curl,http_request,web_fetch}.rs`: agent network-fetchtools.- `search/tools/{tavily/client,exa}.rs`, `embeddings/cloud_adapter.rs`,- `inference/provider/factory.rs` and its `factory/` submodules — search and+ `inference/provider/factory.rs` and its `factory/` submodules: search andcloud inference/embedding providers.-- `web_chat/event_bus.rs` — subscribes to `ExternalTransferPending` and+- `web_chat/event_bus.rs`: subscribes to `ExternalTransferPending` andbridges it to the `external_transfer_pending` socket event for the frontend.## Tests