in reviewhumanPR #346Transport
Porch: add home-gateway Lab integration with duplicate-delivery and forged-sender checks
Porch is a permissioned gateway between AI agents and a connected home. Agents connect to it over MCP, each with its own key.
Description
The pitch.
## Summary Porch is a permissioned gateway between AI agents and a connected home. Agents connect to it over MCP, each with its own key. Porch checks every request against that agent's scopes and the household's safety rules, dry-runs it, sends it through its Device Hub (LG ThinQ, Matter, Google Home, or simulated copies), reads the device back, and writes the decision to an audit log. Risky actions, such as unlocking the front door, wait for the household owner. This PR adds a Lab integration in `examples/porch/`. Town agents find a running Porch through the town index and act on a home through it: - `porch_town.py`: a Lab plugin with the adapter role (a Town agent that forwards signed Town messages to Porch over MCP), scripted home agents, the owner, an independent hub auditor, an impersonator, and the `porch_home` validator; - `porch_home.yaml`, the end-to-end scenario, and `porch_home_no_dedup.yaml`, a negative control that fails on purpose; - `evidence/`: the bundle recorded from a live run; - `tests/test_porch_integration.py`: 9 tests. 7 run in CI without Porch; 2 run against a live Porch when `PORCH_CONFIG` is set. No Town source file changes. `MANIFEST.in` gains one rule so the example's scenario files and README ship in the sdist next to the plugin. Porch's own code is not in this PR. ## Integration ``` energy-agent, concierge-agent, stranger, impersonator (Town agents) | signed Town messages: town index, auth, transport with a duplicate fault v porch the adapter, a Town agent with a card in the town index | MCP over streamable HTTP, one Porch key per Town agent v Porch gateway scopes, safety rules, approvals, dry run, verify, audit log | HTTP v Porch Device Hub -> devices (simulated by the hub in this test) owner -> Porch owner API: who is home, approvals, the audit log auditor -> Device Hub: reads device state directly, not Porch's answer ``` - **Project:** the Porch gateway and the Porch Device Hub, hosted separately in `yooncham/porch-device-hub-yc`, tested at `main` = `64a9a4a`. The repository is private; course staff can ask the team for read access. Porch runs as its own two processes, started by its `porch_gateway/start.sh`: the Device Hub on `:8100` and the gateway on `:8000`. The hub simulated all 8 devices in this test. - **Interface tested:** Porch's agent interface, MCP over streamable HTTP, with the tools `describe_home` and `request_action`, used by several Town agents at once. Also Porch's owner HTTP API (who is home, approvals, the audit log). - **Adapter (`porch_gateway` role):** the only role that speaks MCP to Porch. It publishes a card with `home.describe` and `home.act` in the town index. Each Town message becomes one MCP tool call under the sending agent's own Porch key, so Porch applies that agent's scopes. The adapter reads the keys from Porch's own config file (`PORCH_CONFIG`) and keeps them in memory. None is written to a scenario, a message, an event or the bundle; the tests check the bundle for them. - **Ground truth:** after each step the `auditor` role reads the device state straight from the Device Hub, and at the end the `owner` role reads Porch's audit log. The validator reads only the recorded events: decisions from the adapter's record of Porch's answers, device state from the auditor's hub reads, and the number of executions from Porch's audit log. - **What Town supplies:** discovery (the index), sender identity (the auth layer, `hmac.v1`), delivery with a `duplicate` fault (the transport), and the evidence bundle. - **Why a Lab scenario:** Track's task is fixed to the quote and Path needs an A2A endpoint, while Porch is an MCP server for home actions. `nandatown mcp test` probes initialization and tool listing only, so it cannot judge a permissioned action or an owner approval. ## Reproduce Town base commit `6f9a7c0` (current `main`), nandatown 0.2.0, evaluator `lab-0.2.6`, seed 42, adapter `porch-town-adapter/0.1.0` (the integration c …
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/346/head:pr-346
git checkout pr-346