feat(cli): answer an Ashlar program's mesh space - #107
Closed
mrjeeves wants to merge 2 commits into
Closed
Conversation
Ashlar reaches everything outside its builtin set across one boundary, and the space named `mesh` — who else is on the private network this machine joined — derives to `myownmesh ashlar` rather than to a library the project supplies. That is the point: this daemon is already installed once per machine, so an Ashlar site gets a live roster of everyone else running it with no binding file, no shim, and nothing vendored. JSON Lines on stdin/stdout, five calls, shapes fixed by Ashlar's `mesh.Here` and `mesh.Peer`: `here`, `peers`, `enter`, `revision`, `reread`. Two decisions worth naming: - `revision` and `reread` answer the same number and only one of them marks the collection changed. Ashlar's reactive annotation marks on every call that carries it, so a poll that always marked would re-render every connected page on a timer instead of when the roster moved. - `here` is `Active` or `Shelved` — the states where app traffic can actually flow. Sighted, handshaking and pending-approval peers are known and not reachable, and a live dot on a peer nothing can reach is worse than no dot. `enter` joins open + auto-approving, because a roster nobody can join is not a roster. That makes the mesh id the secret, so the shared `ashlar` default is a public square by design and anything private wants an unguessable id; the code and the README both say so rather than implying privacy. Publishing a site's port to peers is deliberately NOT answered here — it needs a proxy that can carry a TCP connection, which is AllMyStuff's. One binary claiming both would make "the mesh is installed" and "sites can be published" the same claim; an unknown call names the five that exist. `ctl::roundtrip` becomes `pub(crate)` so both clients share one wire. Driven against a live daemon: joined a network, set a label, and answered the whole contract, with an Ashlar site rendering the real device id. 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 subcommand 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 subcommand to MyOwnMesh so that Ashlar could reach it, which is exactly the failure Ashlar's own ADR-0017 records — "Ashlar was not binding to foreign systems; it was requiring them to be re-authored. That is the opposite of a boundary." An integration that only works once the foreign system ships a change for you is not an integration.
The daemon already exposes everything the roster needs on its control socket —
identity_show,networks_list,peers_list,network_add— the same surfacemyownmesh ctland the GUI drive. Ashlar speaks that socket itself instead, as a sidecar, with no change here. The work moves to ashlar#60.