1
0
silverbullet/plugos/sandboxes/sandbox.ts

12 lines
310 B
TypeScript
Raw Normal View History

2024-01-14 12:38:39 +00:00
import { Plug } from "../plug.ts";
import { Manifest } from "../types.ts";
export type SandboxFactory<HookT> = (plug: Plug<HookT>) => Sandbox<HookT>;
export interface Sandbox<HookT> {
manifest?: Manifest<HookT>;
init(): Promise<void>;
invoke(name: string, args: any[]): Promise<any>;
stop(): void;
}