Companion SDK
Package@consenger/companion-sdk@0.1.0-alpha.0
Protocolcompanion.plugin.v1
RuntimeVifu Web iframe / iOS WKWebView
StatusPublic alpha
@consenger/companion-sdk is the browser SDK for companion-native agentic games. It lets a game expose safe gameplay context to the Vifu host and receive companion-triggered commands.
The production scope is intentionally narrow: browser games loaded by Vifu Web or by the iOS WKWebView runtime. Node.js and arbitrary backend integrations are not part of this SDK contract.
Compatibility
| Package | Protocol | Capability | Runtime |
|---|---|---|---|
@consenger/companion-sdk@0.1.x | companion.plugin.v1 | companion.plugin.v1 | Vifu Web iframe, iOS WKWebView |
Mental model
- Context is readable game state, such as the current prompt, score, selected word, or scene.
- Command is a game-owned action the companion may ask the game to run.
- Observation is a compact event or fact the game reports.
- Signal is a rare moment where the game asks the companion to pay attention.
- Reaction is local feedback from the game after a signal or command.
Keep companion data compact and player-facing. Do not expose access tokens, hidden answers, private user notes, or implementation details.
Next pages
- Quickstart shows the minimal install and integration path.
- SDK API Reference documents each public method.
- Manifest Reference documents
companion.plugin.v1. - Troubleshooting covers common runtime issues.
