feat(host): add IP-literal blocking TCP resource endpoint (P5)

- resource.open("tcp", ip:port, ["read","write"]) with exact IP grants,
  project mode only, 5s connect/read/write timeouts; no DNS/TLS/UDP/server
  sockets (ADR-0034).
- Add TCP stream storage/dispatch in the resource table; CLI --allow-net IP;
  pure/strict preflight rejects the grant and the language endpoint.
- Host loopback echo/grant/DNS/strict tests and a .mq.md CLI echo test.
- Update specs, status, architecture, README, changelog and evidence.

Gate: fmt, clippy -D warnings, 426 tests passed.
This commit is contained in:
cflmy committed 2026-11-20 23:05:06 +08:00
1 parent 1d87f98539
commit 00bdcad1ff
15 files changed
+435 -4

No files matched your search

+6
View File
@@ -374,6 +374,12 @@ impl Capabilities {
self
}
/// Grant network access to one IP literal host (ADR-0034).
pub fn allow_net(mut self, host: impl Into<String>) -> Self {
self.net_hosts.push(host.into());
self
}
/// Grant a registered resource provider by its stable name (ADR-0033).
pub fn allow_resource_provider(mut self, name: impl Into<String>) -> Self {
self.resource_providers.push(name.into());