From e14a4dd1049bd52b5ad81e2eb1748c068d50713b Mon Sep 17 00:00:00 2001 From: Danny Kim Date: Wed, 30 Sep 2026 19:31:46 +0900 Subject: [PATCH] Clarify the grant-free schema 2 contract --- README.md | 5 +++-- wit/filesystem.wit | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 789c5e9..0a9b050 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,9 @@ This package requires a Memona version that supports plugin manifest schema 2. | Username | Optional account name for HTTP basic authentication | | Password | Optional password, stored as a secret | -Public, LAN, VPN, link-local and localhost addresses work directly from the -server address; there is no separate network permission setting. +With the compatible schema 2 Memona version required above, public, LAN, VPN, +link-local and localhost addresses work directly from the server address; +that API has no separate connection network grant. Listing, reading, writing, creating directories, renaming and deleting are supported. Reads and writes stream in pieces of at most 1 MiB, so a file of any diff --git a/wit/filesystem.wit b/wit/filesystem.wit index 824db1d..624ee9d 100644 --- a/wit/filesystem.wit +++ b/wit/filesystem.wit @@ -36,9 +36,10 @@ interface host { pull: func(limit: u32) -> result, host-error>; } /// Begins a request to any HTTP or HTTPS host, including LAN and loopback - /// addresses. Each redirect and DNS result is checked, and DNS is pinned. - /// Cross-origin redirects remove request headers; HTTPS cannot downgrade. - /// The host bounds total bytes per exchange, not buffer size. + /// addresses. This API has no per-connection network grant. Each redirect + /// and DNS result is checked, and DNS is pinned. Cross-origin redirects + /// remove request headers; HTTPS cannot downgrade. The host bounds total + /// bytes per exchange, not buffer size. http: func(request: request) -> result; /// One open TCP connection. Dropping the handle closes the socket, and the @@ -51,9 +52,9 @@ interface host { write: func(data: list) -> result; } /// Opens a socket to any host, including LAN and loopback addresses, on a - /// package-declared port. The host resolves and pins DNS and starts TLS - /// when asked. Ports negotiated at runtime, such as an FTP data channel, - /// must be declared. + /// package-declared port. This API has no per-connection network grant. + /// The host resolves and pins DNS and starts TLS when asked. Ports + /// negotiated at runtime, such as an FTP data channel, must be declared. connect: func(host: string, port: u16, tls: bool) -> result; /// One datagram socket connected to a single peer. @@ -64,8 +65,8 @@ interface host { /// means none arrived inside the host's wait, not that the peer left. receive: func(limit: u32) -> result, host-error>; } - /// Connects a datagram socket under the same port rules as `connect`, for - /// the few filesystem protocols that still need one. + /// Connects a datagram socket under the same address and port rules as + /// `connect`, for the few filesystem protocols that still need one. bind: func(host: string, port: u16) -> result; /// A configuration value, typed as the package's manifest declared it.