feat(host): add worker resource-provider transport v1

- Add a host-managed helper process speaking framed JSON (4-byte BE length)
  with ping/open/read/write/close/shutdown, max 1 MiB frames and structured
  error mapping (ADR-0035).
- Add StdHost::register_worker_resource_provider using the same protocol,
  kind-conflict and name-grant checks as the in-process provider; pure/strict
  refuse provider kinds.
- Tests spawn a Python helper and cover round-trip, grant/mode denial and
  missing-program failure; no parser/Value/runtime/HostOp change.
- Update ADR/spec/status/README/changelog and evidence; C ABI binding remains
  open.

Gate: fmt, clippy -D warnings, 433 tests passed.
This commit is contained in:
cflmy committed 2026-11-20 23:25:09 +08:00
1 parent 12be02e24b
commit 01f6fe46a7
12 files changed
+585 -8

No files matched your search

+9
View File
@@ -28,6 +28,15 @@ pub trait ResourceProvider: Send {
}
/// Resource kinds served by this provider.
fn kinds(&self) -> &[&str];
/// Owned kind list used by registration. Providers with dynamically owned
/// kind strings override this.
fn kind_strings(&self) -> Vec<String> {
self.kinds()
.iter()
.map(|kind| (*kind).to_string())
.collect()
}
/// Open one descriptor, returning a provider-private token.
fn open(
&mut self,