Host Bridge Protocol
Companion SDK は Vifu host と小さな JSON-RPC protocol で通信します。game code は protocol を直接送らず、SDK API を使ってください。
| Method | Direction | Description |
|---|---|---|
companion.initialize | host to game | bridge を初期化します。 |
companion.contexts/list | host to game | registered context を一覧します。 |
companion.contexts/read | host to game | context snapshot を読みます。 |
companion.commands/list | host to game | registered command を一覧します。 |
companion.commands/call | host to game | game command を request します。 |
companion.observe | game to host | observation を送ります。 |
companion.signal | game to host | signal を送ります。 |
game が state と command を所有します。host が command execution を request しても、input validation と実際の state change は game 側の責任です。
