Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(security): point PII detection docs at tinymemory_api::safety

Steven Enamakel3527c97a0879
diff --git a/crates/openhuman-core/src/platform/cost/README.md b/crates/openhuman-core/src/platform/cost/README.md
index 5a48ab2c50..d1ea70f7c7 100644
--- a/crates/openhuman-core/src/platform/cost/README.md
+++ b/crates/openhuman-core/src/platform/cost/README.md
@@ -23,7 +23,7 @@ Local API-usage cost tracking for the agent. Records per-call token usage and co
| `crates/openhuman-core/src/platform/cost/rpc.rs` | RPC-facing handlers (`dashboard`, `daily_history`, `summary`) returning `Outcome<Value>`; DTO types; `resolve_tracker` with a cached fallback tracker + error-replay TTL. |
| `crates/openhuman-core/src/platform/cost/schemas.rs` | Controller schemas + `handle_*` JSON-RPC dispatchers; `all_controller_schemas` / `all_registered_controllers`. |
| `crates/openhuman-core/src/platform/cost/tracker_tests.rs` | Sibling test suite for [`tracker.rs`](./tracker.rs) (`#[path]`-included). |
-| [`catalog.rs`](./catalog.rs) | Product configuration enrichment, source attribution and runtime/local model overlays over the published pricing and windows owned by [TinyAgents registry](../../../../../vendor/tinyagents/crates/tinyagents-registry/src/pricing/mod.rs). The owner exposes `ModelPrice`, `lookup`, `estimate_cost_usd` and `PRICING_AS_OF`; this adapter exposes the default registry and unified model catalog. |
+| `crates/openhuman-core/src/platform/cost/catalog.rs` | Product configuration enrichment, source attribution, flat catalog projection, and discovered local-model overlays. Published prices, context windows, ID matching, and estimation belong to [`tinyagents_registry::pricing`](https://github.com/tinyhumansai/tinyagents/blob/a55f25a924a673c812c7aa95e562488dd0d0f3b3/crates/tinyagents-registry/src/pricing/README.md). |
| `crates/openhuman-core/src/platform/cost/route.rs` | `CostRoute` / `route_for_model`: derives from the model id whether a record counts against OpenHuman-managed credits or is BYOK/local (#5016). |
| `crates/openhuman-core/src/platform/cost/scope.rs` | `UsageScope::ambient`: a record's attribution (thread, origin, agent definition, sub-agent task, embedded/SaaS user agent, provider) read from the recording task's turn origin, memory identity and `CoreContext`. |
| `crates/openhuman-core/src/platform/cost/report.rs` | Pure usage reports over ledger records: `build_report` (group by day/week/month/model/provider/route/agent/thread/origin/session_agent; tokens, charged vs estimated cost, cache-hit ratio) and `build_cache_report` (per-call hits, cold calls, uncached premium). |
diff --git a/crates/openhuman-core/src/security/README.md b/crates/openhuman-core/src/security/README.md
index ccaa576a90..b1e3c6ca3f 100644
--- a/crates/openhuman-core/src/security/README.md
+++ b/crates/openhuman-core/src/security/README.md
@@ -173,7 +173,7 @@ decision. See [approval/README.md](approval/README.md).
| [`encryption/`](encryption/README.md) | AES-256-GCM at-rest encryption for memory storage and the encrypt/decrypt RPCs. |
| [`keyring/`](keyring/README.md) | OS keychain backend with an encrypted-file fallback, and the `SecretStore` config-field codec. |
| [`keyring_consent/`](keyring_consent/README.md) | Consent gate for falling back from the OS keychain to local encrypted storage. |
-| [TinyMemory API safety](../../../../vendor/tinymemory/crates/tinymemory-api/src/safety/mod.rs) | Owns the local PII and identification-risk detector. OpenHuman supplies privacy policy and enables the `local-safety` feature for its callers. |
+| [`tinymemory_api::safety`](https://github.com/tinyhumansai/tinymemory/blob/d1b06334faf7f8abb62bd1bd4ec4c4d4862f53a4/crates/tinymemory-api/src/safety/README.md) (upstream contract) | Fully local PII and identification-risk detection. `scan` and `redact_identifiers` require the API's opt-in `local-safety` feature; detection results and policy decisions remain separate. |
| [`prompt_injection/`](prompt_injection/README.md) | Deterministic prompt-injection screening (`Allow`, `Review`, `Block`). |
| [`live_policy.rs`](./live_policy.rs) | Process-global, hot-swappable current `SecurityPolicy` and privacy mode. |
| [`scrub.rs`](./scrub.rs) | Secret and PII scrubbing with the host's policy (`Policy::corroborated`) over TinyMemory's scrubbers. |
@@ -215,11 +215,10 @@ decision. See [approval/README.md](approval/README.md).
- `SecretStore` (re-exported from [`keyring/`](./keyring/)): encrypted-on-disk secrets whose
master key lives in keychain-backed storage.
- The [`egress`](./egress) re-exports at the crate root: `enforce_egress`,
- `emit_external_transfer`, `local_only_blocks`, `local_only_tool_block` and
- `EgressDescriptor`.
-- `tinymemory_api::safety` owns `scan_pii` and its result types; the security
- domain no longer re-exports them. Host redaction applies product policy over
- that detector in [`agent/session_host/stop_summary.rs`](../agent/session_host/stop_summary.rs).
+ `emit_external_transfer`, `local_only_blocks`, `local_only_tool_block`,
+ `EgressDescriptor`. Local PII detection is consumed directly from
+ `tinymemory_api::safety::{scan, PiiScanResult, PiiCategory, RiskLevel}`;
+ this security module does not re-export it.
## RPC surface
diff --git a/crates/openhuman-core/src/security/egress/README.md b/crates/openhuman-core/src/security/egress/README.md
index 4fdbafc7e5..5c7fa541d4 100644
--- a/crates/openhuman-core/src/security/egress/README.md
+++ b/crates/openhuman-core/src/security/egress/README.md
@@ -54,7 +54,7 @@ Both `enforce_egress` and `local_only_tool_block` read the live mode via
- `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
+- [`tinymemory_api::safety`](https://github.com/tinyhumansai/tinymemory/blob/d1b06334faf7f8abb62bd1bd4ec4c4d4862f53a4/crates/tinymemory-api/src/safety/README.md): the opt-in local identification-risk detector
that will eventually populate `EgressDescriptor::risk_level` /
`risk_categories` via `EgressDescriptor::with_risk`.
- `core/events.rs`: `DomainEvent::ExternalTransferPending { descriptor,
diff --git a/docs/gitbooks/en/developing/architecture/security.md b/docs/gitbooks/en/developing/architecture/security.md
index 321aaa3696..1b97eb7d21 100644
--- a/docs/gitbooks/en/developing/architecture/security.md
+++ b/docs/gitbooks/en/developing/architecture/security.md
@@ -83,7 +83,9 @@ One check never turns off. `is_always_forbidden` blocks credential stores (`~/.s
| `schemas.rs` | Controller schemas + handler dispatch. |
| `mod.rs` | Re-exports of the public surface above. |
| `live_policy.rs`, `scrub.rs`, `tools.rs` | Live-policy lookup, the host scrubbing policy (`scrub::host_policy`), and the domain's own agent tools. |
-| `approval/`, `credentials/`, `devices/`, `egress/`, `encryption/`, `keyring_consent/`, `pii/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface. This page covers the policy core only. |
+| `approval/`, `credentials/`, `devices/`, `egress/`, `encryption/`, `keyring_consent/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface. This page covers the policy core only. |
+
+Local PII detection belongs to [`tinymemory_api::safety`](https://github.com/tinyhumansai/tinymemory/blob/d1b06334faf7f8abb62bd1bd4ec4c4d4862f53a4/crates/tinymemory-api/src/safety/README.md) behind its `local-safety` feature. OpenHuman keeps privacy policy and redaction decisions.
## Calls into
diff --git a/gitbooks/developing/architecture/security.md b/gitbooks/developing/architecture/security.md
index 321aaa3696..1b97eb7d21 100644
--- a/gitbooks/developing/architecture/security.md
+++ b/gitbooks/developing/architecture/security.md
@@ -83,7 +83,9 @@ One check never turns off. `is_always_forbidden` blocks credential stores (`~/.s
| `schemas.rs` | Controller schemas + handler dispatch. |
| `mod.rs` | Re-exports of the public surface above. |
| `live_policy.rs`, `scrub.rs`, `tools.rs` | Live-policy lookup, the host scrubbing policy (`scrub::host_policy`), and the domain's own agent tools. |
-| `approval/`, `credentials/`, `devices/`, `egress/`, `encryption/`, `keyring_consent/`, `pii/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface. This page covers the policy core only. |
+| `approval/`, `credentials/`, `devices/`, `egress/`, `encryption/`, `keyring_consent/`, `prompt_injection/` | Sibling kernel-security domains under the same module. Each owns its own surface. This page covers the policy core only. |
+
+Local PII detection belongs to [`tinymemory_api::safety`](https://github.com/tinyhumansai/tinymemory/blob/d1b06334faf7f8abb62bd1bd4ec4c4d4862f53a4/crates/tinymemory-api/src/safety/README.md) behind its `local-safety` feature. OpenHuman keeps privacy policy and redaction decisions.
## Calls into