# Protocol-Native Runtime

Capsulang declares MCP, A2A, and A2UI as checked protocol contracts rather than hidden host code.

```text
MCP   -> tools, resources, prompts
A2A   -> collaborator agents, messages, tasks, artifacts
A2UI  -> user-facing dynamic surfaces, state, actions, envelopes
```

The capsule still emits typed effect intents. Host policy, credentials, transport hardening, UI rendering, adapter execution, trace, and ledger writes remain host responsibilities.

## CLI

```bash
caps check examples/30_protocol_native_a2ui.caps --json
caps protocol-plan examples/30_protocol_native_a2ui.caps --json
caps a2ui-manifest examples/30_protocol_native_a2ui.caps --json
caps a2ui-envelope examples/30_protocol_native_a2ui.caps repo_review_ui --kind components --json
```

## Effects

```lisp
(mcp.call port.tool)
(mcp.read-resource port.resource)
(mcp.subscribe-resource port.resource)
(a2a.message agent)
(a2a.task agent.skill)
(a2a.receive-artifact agent.artifact)
(a2ui.emit surface)
(a2ui.update-data surface.path)
(a2ui.await-action surface.action)
(requires-user-confirmation)
(requires-auth scope)
(uses-untrusted-external-data)
```

External protocol results enter the runtime with untrusted provenance until a capsule or host validation step accepts them.
