Companion SDK
パッケージ@consenger/[email protected]
Protocolcompanion.plugin.v1
実行環境Vifu Web iframe / iOS WKWebView
状態公開 alpha
@consenger/companion-sdk は、companion-native agentic game 向けの browser SDK です。ゲームは安全な gameplay context を Vifu host に公開し、companion から要求された command を受け取れます。
本番で扱う範囲は意図的に絞っています。対象は Vifu Web に読み込まれる browser game と、iOS の WKWebView runtime です。Node.js や任意の backend 連携は、この SDK の公開契約には含めません。
互換性
| Package | Protocol | Capability | Runtime |
|---|---|---|---|
@consenger/[email protected] | companion.plugin.v1 | companion.plugin.v1 | Vifu Web iframe、iOS WKWebView |
基本モデル
- Context は、現在の問題、score、選択中の単語、scene など、読み取り可能なゲーム状態です。
- Command は、companion がゲームに実行を依頼できる、ゲーム所有の操作です。
- Observation は、ゲームが報告する小さな event や fact です。
- Signal は、ゲームが companion に注目してほしいと明示する、まれな moment です。
- Reaction は、signal や command の後にゲーム側で出す local feedback です。
companion に渡すデータは小さく、player-facing なものに限定します。access token、隠し答え、private user note、実装詳細の状態は公開しないでください。
次に読むページ
- クイックスタート は最小の install と integration path を示します。
- SDK API リファレンス は public method を説明します。
- Manifest リファレンス は
companion.plugin.v1を説明します。 - トラブルシューティング は runtime issue を扱います。
