bolt/host-api
bolt/host-api
此内容目前仅提供英文版。
导入自 @norbital-ai/bolt/host-api
@norbital-ai/bolt/host-api: this release's HostApi (@norbital-ai/host-api), the one value a host takes from a release it runs on its own module graph.
host-api
HOST_API const
const HOST_API: HostApi This release's HostApi implementation, the one value a host imports from a release.
成员
| 名称 | 类型 | 说明 |
|---|---|---|
guest_execution | 'source' | Hosts admit only runtimes that evaluate tenant source without restoring native snapshots. |
version | number | The HOST_API the release speaks. |
contract | string | The artifact contract this release implements. |
cookies | { readonly session: string; readonly preview: string; } | |
cookie_site | (secure: boolean) => string | The session cookie's site attributes. |
verify | (release: Release, options: Signal) => Promise<void> | Refuses an artifact this release did not build or whose files do not match their digests. |
describe | (release: Release, options: Signal) => Promise<ReleaseFacts> | What the release says about itself, decoded by its own Bolt ( |
frame_policy | (release: Release, path: string, options: Signal) => Promise<string> | The client page's content security policy for |
needs_guest | (request: Request) => Promise<boolean> | Whether a request may run a guest body, so the host admits only these under its compute envelope. |
schema | { /** The schema state the release plans from (what a successor's plan is diffed against). */ slice(release: Release, options: Signal): Promise<SchemaSlice>; /** The destructive steps planning `release` over `applied` (another release's `slice`) would take. */ destructive(applied: SchemaSlice, release: Release, options: Signal): Promise<readonly string[]>; /** * An author's migrations set on top … | |
activate | (ports: HostPorts, options: Signal) => Promise<ActiveWorkspace> | Applies the artifact's verified migration files (checksummed, one transaction each under the |
branch | (ports: BranchPorts, options: Signal) => Promise<WorkspaceBranch> | |
links | (host: LinkHost, options: Signal) => Promise<WorkspaceLinks> |