feat(ashlar): publish an Ashlar site to the mesh - #197
Closed
mrjeeves wants to merge 2 commits into
Closed
Conversation
An Ashlar program is an origin: it binds a port, and everything about reaching that port from elsewhere is a deployment fact. `ashlar run --mesh` makes this node the answer — the site goes to a private mesh's members and to nobody else, with no forwarded port and no public address. Ashlar reaches it across its one foreign boundary. Two space names derive to a co-process rather than a library: `mesh` — the roster, which `myownmesh ashlar` answers — and `mesh.sites`, answered by the new `allmystuff-ashlar` binary. They are separate because sites need a proxy able to carry a TCP connection to a peer, which this node has and MyOwnMesh alone does not; a machine can answer the roster perfectly well and genuinely be unable to publish, and an unknown call says which command answers what. Four calls over JSON Lines, all driving ops the node already had: `expose`, `unexpose`, `published`, `nearby`. Publishing stays opt-in at the node — `expose` adds one port to the owner's exposed selection and the proxy still refuses everything outside it, so nothing here can reach a service the owner never exposed. `nearby` reads what peers ADVERTISE, maps each site once, and reuses the mapping rather than re-binding a port on every render; a site that will not map is still listed, because "there but unreachable from here" is a different fact from "not there". The crate lives in the light workspace and speaks the node's control wire rather than linking `allmystuff-node`, so it builds in seconds and `cargo test --workspace` covers it. That is a real coupling and it is named in the crate docs and ARCHITECTURE.md: the frame format is defined in `node/src/node_control.rs`, re-implemented here, and pinned by `frame_roundtrips_the_node_wire`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013F9wx6nykjF97SeSfJkp4R
CI checks `cargo fmt --all --check` on every platform; the seam was written by hand and did not match rustfmt's line breaking. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013F9wx6nykjF97SeSfJkp4R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing: wrong side of the boundary.
This added a crate here so that Ashlar could publish a site, when
allmystuff-servealready exposes every op it needs on the node control socket —site_exposed,site_set_exposed,site_map,site_mappings,session_snapshot,mesh_networks— the same surface the GUI and CEC Support drive.The right shape is the one CEC Support already uses: run the node as a sidecar and drive its socket, with nothing added here. Ashlar does that itself; the work moves to ashlar#60.