# 规范消息样例

> Summary: Browser Protocol v2 与 Control Hello 的中性、可下载规范样例。
> Authority: normative
> Implementation: active
> Canonical: https://maplecity1314.github.io/BPA/reference/examples/
> Raw: https://maplecity1314.github.io/BPA/raw/reference/examples.md
> Digest: sha256:cfa44f449ce9781d172f7838df6dba7ece07ffeaf89b41405ef5a4d9d361f74b

Browser 样例覆盖 Session、Capability、Command、Result、Cancel、Heartbeat、
Evidence 与恢复消息。Control 样例覆盖 Hello、Welcome 和不兼容响应。公开示例使用
中性标识，不包含业务适配器、真实来源或凭据。

  下载 Browser 消息

  下载 Control Hello

## Control Hello

```json
{
  "version": "bpa.control/hello/1",
  "kind": "hello",
  "requestId": "hello-01",
  "supportedApplicationProtocols": ["bpa.control/1"],
  "runtime": {
    "name": "example-client",
    "version": "0.4.0"
  },
  "maxFrameBytes": 524288,
  "features": ["evidence_refs", "resource_bindings"]
}
```

## Session Hello

```json
{
  "protocol": "bpa.browser/2",
  "version": "2.0.0",
  "message_id": "message-hello",
  "session_id": "new",
  "seq": 0,
  "sent_at": "2026-07-27T06:00:00.000Z",
  "type": "session.hello",
  "trace_id": "trace-session",
  "payload": {
    "browser_instance_id": "browser-example-01",
    "extension_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "extension_version": "0.2.0",
    "supported_protocols": ["bpa.browser/2"],
    "features": ["page_observation_v2", "exact_tab_binding_v2", "active_page_probe_v1"],
    "last_acked_command_seq": 0
  }
}
```

## Command Dispatch

```json
{
  "protocol": "bpa.browser/2",
  "version": "2.0.0",
  "message_id": "message-command",
  "session_id": "session-01",
  "seq": 2,
  "type": "command.dispatch",
  "payload": {
    "command_seq": 1,
    "workflow_id": "example.page-context-observe",
    "node": {
      "id": "browser.page.context.read",
      "version": "1.1.0"
    },
    "fencing_token": 1,
    "permission_grant": {
      "domains": ["https://example.com"],
      "risk_level": "R0"
    }
  }
}
```

上面的节选只用于阅读，不是可直接校验的完整消息。下载文件包含所有必需字段，并在仓库测试中逐条通过正式 Schema 与 Session Guard。
