Expand description
HostJsLib — a JavaScript library the host gives plugin code: a namespace
of async functions, JSON in and JSON out, that becomes a global in the
runtime of every plugin command and function whose package uses it
(docs/agix-sdk.md §10「宿主 JS 库」). The host never sees the
script engine: the engine writes the stubs, and each call reaches the host
through HostFn with who made it and a cancellation signal.
Re-exports§
pub use crate::command::PackageSource;
Structs§
- Host
Call Context - Who calls a host function, from where; the host decides on it whether the call goes ahead.
- Host
JsError - A host function’s failure, as the script’s rejected
Errorcarries it. - Host
JsLib
Traits§
- HostFn
- One function of a host library. Any
Fn(HostCallContext, Value) -> impl Future<Output = Result<Value, HostJsError>>is one.