Appearance
@keymaster/connect / AppMsgRecipient
Interface: AppMsgRecipient
公开目标:app / plugin 调用 sendMessage 时指定的目标只能取这两种之一。
平台内部会按以下规则映射成真实的内部 endpoint:
- 传
origin→{ kind: "origin", id: <exact origin> } - 传
appId→{ kind: "plugin", id: <appId> }
外部 app 通过 keymaster 协议调用 appmsg.send 时:sender 投影为 session 绑定 owner + event.origin;因此发送方不需要在 params 里带 senderOrigin——它由 endpoint service 内部按"调用端来自哪个 endpoint"决定。
Properties overview
| Property | Type | Required | Description |
|---|---|---|---|
recipientPublicKeyHex | string | Yes | — |
recipientOrigin? | string | No | 外部 app 形式的目标:exact origin(scheme + host + port)。 |
recipientAppId? | string | No | 内部插件 / 系统应用形式的目标:pluginEndpointId / appId。 |
Properties
recipientPublicKeyHex
recipientPublicKeyHex:
string
recipientOrigin?
optionalrecipientOrigin?:string
外部 app 形式的目标:exact origin(scheme + host + port)。
recipientAppId?
optionalrecipientAppId?:string
内部插件 / 系统应用形式的目标:pluginEndpointId / appId。