Skip to content

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

docs(inbound): describe the blocked list on inbound results

Steven Enamakel7fb91f6f07e8
diff --git a/crates/openhuman-core/src/inbound/README.md b/crates/openhuman-core/src/inbound/README.md
index 50d5ee8669..2f20594c23 100644
--- a/crates/openhuman-core/src/inbound/README.md
+++ b/crates/openhuman-core/src/inbound/README.md
@@ -36,6 +36,8 @@ pusher ── inbound.offer ──▶ queues (dedupe on source:event_id, debounc
max_batch cap, interactive lane, instant)
│ Deliver(turn)
▼
+ per-event injection screen (blocked → result.blocked)
+ │
pinned agent turn (no triage, fresh thread,
TrustedAutomation{Workflow, require_approval})
│ text
@@ -43,6 +45,12 @@ pusher ── inbound.offer ──▶ queues (dedupe on source:event_id, debounc
inbound.results ◀── store ──▶ InboundTurnCompleted (wake only)
```
+- Each event's text is screened with the prompt-injection guard
+ `inference.agent_chat` uses before the prompt is rendered. A blocked event
+ is left out and listed on the result as `blocked: [{event_id, reason}]`
+ (verdict and rule codes, no text). Every event blocked: the turn completes
+ with empty `text`, no model call, and `InboundTurnCompleted` is still
+ published.
- The events carry no text; the SSE stream only wakes a consumer. Read the
text over `inbound.results`.
- A delivery waits for the agent within its budget (28 s, under the module's
diff --git a/crates/openhuman-core/src/inbound/schemas.rs b/crates/openhuman-core/src/inbound/schemas.rs
index 85aa265fe4..e94c6dbcfe 100644
--- a/crates/openhuman-core/src/inbound/schemas.rs
+++ b/crates/openhuman-core/src/inbound/schemas.rs
@@ -155,7 +155,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
outputs: vec![json_output(
"result",
"`{results: [{turn_id, source, key, agent_id, status, text?, error?, \
- event_ids, created_ms, completed_ms?}]}`.",
+ event_ids, blocked: [{event_id, reason}], created_ms, completed_ms?}]}`.",
)],
},
"result_ack" => ControllerSchema {
diff --git a/docs/gitbooks/en/developing/components.md b/docs/gitbooks/en/developing/components.md
index 7d81a50d43..ff63f8d00f 100644
--- a/docs/gitbooks/en/developing/components.md
+++ b/docs/gitbooks/en/developing/components.md
@@ -115,12 +115,12 @@ result_ttl_days = 7
| `prompt` | a short instruction | the turn's message; `{{events}}` is replaced with the batch as a JSON array of `{id, text, payload, received_at_ms}` (without the placeholder the JSON is appended) |
| `result_ttl_days` | `7` | how long a turn's result is kept |
-Sources are read at startup, like the rest of `[inbound]`. Each one gets its own policy at the head of the module's pipeline: acknowledged at ingest, weighted into the interactive lane, released at once, and debounced with its own windows (`sources[].coalesce` in `tinyeventqueues`, which needs a module release that has it). Events of one source and key coalesce into one batch; each batch runs as one turn of the pinned agent on a fresh thread, under a non-interactive origin whose external-effect tool calls park for approval (as a remote trigger's do), so the agent should be tool-less or read-only. A turn that fails is retried with the lane's back-off and stored as failed after its last attempt; a turn still running at the delivery budget is acknowledged and stores its result when it ends; a turn left running when the core stopped is run again at the next start.
+Sources are read at startup, like the rest of `[inbound]`. Each one gets its own policy at the head of the module's pipeline: acknowledged at ingest, weighted into the interactive lane, released at once, and debounced with its own windows (`sources[].coalesce` in `tinyeventqueues`, which needs a module release that has it). Events of one source and key coalesce into one batch; each batch runs as one turn of the pinned agent on a fresh thread, under a non-interactive origin whose external-effect tool calls park for approval (as a remote trigger's do), so the agent should be tool-less or read-only. Each event's text is screened on its own with the prompt-injection guard `inference_agent_chat` applies: a blocked event is left out of the prompt and listed on the result as `blocked: [{event_id, reason}]` (the reason is the guard's verdict and rule codes, never the text), so one injected event cannot fail or hold back its batch. A batch with every event blocked completes with empty `text`, without calling the model, and still publishes `InboundTurnCompleted`. The guard still checks the rendered prompt as a whole; if that fires the turn fails and is retried like any other failure. A turn that fails is retried with the lane's back-off and stored as failed after its last attempt; a turn still running at the delivery budget is acknowledged and stores its result when it ends; a turn left running when the core stopped is run again at the next start.
| RPC | Params | Result |
| --- | --- | --- |
| `openhuman.inbound_offer` | `source`, `key`, `event_id`, `text`, `payload?`, `received_at_ms?` | `{disposition}`: `accepted`, or `duplicate` for a redelivered `event_id` (a success); an unconfigured source is an error |
-| `openhuman.inbound_results` | `source?`, `since_ms?`, `limit?` (50, at most 500), `status?` (`running`, `completed`, `failed`) | `{results: [{turn_id, source, key, agent_id, status, text?, error?, event_ids, created_ms, completed_ms?}]}`, oldest first, acknowledged results left out |
+| `openhuman.inbound_results` | `source?`, `since_ms?`, `limit?` (50, at most 500), `status?` (`running`, `completed`, `failed`) | `{results: [{turn_id, source, key, agent_id, status, text?, error?, event_ids, blocked, created_ms, completed_ms?}]}`, oldest first, acknowledged results left out |
| `openhuman.inbound_result_ack` | `turn_id` | `{acked: true}`; an unknown turn is an error |
| Event (domain `inbound`) | Fields | When |