rpc(Mark a method (or a function-valued class field) as remote-callable. Only decorated members dispatch over the agent socket; reserved names — the lifecycle hooks (options?): {(value,context):void; <V>(value,context): (initial) =>V; }
constructor/alarm/fetch/webSocket), the
connection seams (authorize/onAttach/onConnect), and _-prefixed
names — remain non-dispatchable even if decorated, and an undecorated
override of a decorated base method is not dispatchable.
The optional metadata is introspectable via rpcSurface, so a caller
can discover what an agent exposes remotely.
Parameters
Returns
{(
value, context): void; <V>(value, context): (initial) => V; }
Example
RpcOptions
Metadata attached to a remote-callable method via@rpc().
Properties
description?
Human-readable summary of what the method does.readonlyoptionaldescription?:string