plugin: implement component model runtime

This commit is contained in:
2026-06-20 01:58:53 +09:00
parent 878517dcd2
commit 57bbf14e1a
10 changed files with 1569 additions and 69 deletions
+15
View File
@@ -0,0 +1,15 @@
package yoi:host@1.0.0;
/// Grant-bound HTTPS host API. Importing this interface does not grant
/// authority; package grants are checked before registration/execution and on
/// every host call.
interface https {
request: func(request-json: string) -> string;
}
/// Grant-bound filesystem host API. No ambient WASI filesystem is exposed.
interface fs {
read: func(request-json: string) -> string;
list: func(request-json: string) -> string;
write: func(request-json: string) -> string;
}
@@ -0,0 +1,11 @@
package yoi:plugin@1.0.0;
world tool {
import yoi:host/https@1.0.0;
import yoi:host/fs@1.0.0;
/// Execute a manifest-declared Tool. `input-json` is the normal Tool input
/// JSON and the returned string is the same ToolOutput JSON accepted by the
/// legacy raw-Wasm ABI.
export call: func(tool-name: string, input-json: string) -> string;
}