chore(rebrand): replace mesh with vervain (VA-28) #24

Merged
David merged 1 commit from chore/vervain-rebrand-va-28 into main 2026-05-20 21:38:07 +02:00
Owner

Summary

Closes VA-28. Sweeps every "mesh"-flavored identifier from the agent and replaces it with "vervain". 659 line references across 56 files, plus 5 crate directory renames and 2 on-disk artifact renames. The Rust-side rename is mechanical; the diff is large but reads as a single coordinated rebrand. Wire-protocol u32 codes and SHA-384 hash values are unchanged - only Rust types and field names are renamed - so the on-wire format is byte-compatible with VA-27 (last main HEAD).

What's renamed

  • Crates (Cargo manifests + dirs + workspace deps + binary targets + lib names + every use ...:: import): meshagent becomes vervain-agent; meshagent-config becomes vervain-agent-config; meshagent-kvm becomes vervain-agent-kvm; meshagent-mcp becomes vervain-agent-mcp; meshagent-protocol becomes vervain-agent-protocol. Self-update helper binary becomes vervain-agent-self-update-helper. The meshcore Cargo feature becomes vervain-core.
  • Build / tooling: compose.yml, justfile, .forgejo/workflows/build-package.yml (PACKAGE_NAME + ARTIFACT_NAME), oci-build/release.Dockerfile, .dockerignore, .gitignore, .idea/vervain-agent.iml. Forgejo published artifact moves to vervain-agent-x86_64-unknown-linux-gnu.
  • Rust source identifiers: MeshCommand becomes AgentCommand (variants unchanged, integer wire codes preserved); MeshCore/MeshCoreInstance/MeshCoreSlot become VervainCore*; MeshAgent capability bit becomes VervainAgent; MeshType becomes GroupType; MeshID becomes GroupID; MeshName becomes GroupName; MeshServer becomes ServerURL; MeshNodeCertificate becomes VervainAgentNodeCertificate; MeshPolicyGuid becomes VervainAgentPolicyGuid (incl. exeMeshPolicyGuid becomes exePolicyGuid). Field renames: mesh_id becomes group_id, mesh_server becomes server_url. Module rename: meshcore becomes vervain_core. Env-var constants: MESHAGENT_VERSION / MESHAGENT_GIT_HASH / MESHAGENT_BUILD_DATE become VERVAIN_AGENT_* (VERVAIN underscore-separated per resolution). Doc references to upstream C identifiers and file paths (meshcore/agentcore.c, meshcore.js::tunnel, etc.) are reworded to "upstream agentcore.c" / "the upstream tunnel.js" so the mesh prefix is dropped without losing the provenance pointer.
  • .msh key strings (line-oriented config parsed by vervain-agent-config): MeshServer= becomes ServerURL=; MeshID= becomes GroupID=; MeshName= becomes GroupName=; MeshType= becomes GroupType=. The .msh extension itself + the --msh CLI flag + the MshConfig type name stay (blocked on VA-29).
  • On-disk artifacts: run/meshagent.msh becomes run/vervain-agent.msh; run/meshagent.msh.template becomes run/vervain-agent.msh.template. Data dir paths: meshagent.db becomes vervain-agent.db. Installed-system paths: /usr/local/sbin/meshagent becomes /usr/local/sbin/vervain-agent; /etc/meshagent/ becomes /etc/vervain-agent/; /var/lib/meshagent becomes /var/lib/vervain-agent; ~/.local/bin/meshagent, ~/.config/meshagent/ likewise. systemd unit Description= reads "Vervain Agent". No migration shim per resolution (no live deployments).
  • Docs (slice 8): README.md is fully reworked (the historical-attribution sentence pointing at the upstream GitHub repo is dropped; the project is now framed as "a Rust agent for the Vervain remote-management platform"). ROADMAP.md prose updated. Module-level docstrings throughout crates/vervain-agent/src/ rewritten.
  • mDNS + cert CN: service type _meshagent._tcp.local. becomes _vervain-agent._tcp.local.; self-signed cert CommonName MeshNodeCertificate becomes VervainAgentNodeCertificate. These will need paired updates in vervain-server when the server's LAN-discovery + cert-validation code lands.

Resolutions to the issue's open questions (already locked in the VA-28 issue comment)

  1. .msh replacement extension: deferred to VA-29 (encrypted SQLite store keyed by filename hash, planning ticket).
  2. MeshCommand becomes AgentCommand. Integer wire codes unchanged.
  3. mesh_id becomes group_id (doc comment said "SHA-384 group id"; agent_id was already taken by the platform-code field on AuthInfo).
  4. URL paths /agent.ashx + /meshrelay.ashx: paired with VS-24 in vervain-server. Agent-side dial updates land once VS-24 picks the new strings (see "Blocked" below).
  5. Env var naming: VERVAIN underscore-separated. VERVAIN_AGENT_VERSION, not VERVAINAGENT_VERSION.
  6. Installed-system paths: rename outright, no migration shim. Per resolution: "no breaking changes since the app is not in use."

Blocked (intentionally not in this PR)

  • VA-28 slice 6 (URL paths): /agent.ashx and /meshrelay.ashx still appear in host/tunnel.rs, dispatch.rs, net.rs, and a handful of integration tests. These are server-defined paths and need to land in lockstep with VS-24. Once VS-24 picks the new strings, a follow-up PR swaps them on the agent side. Grep for meshrelay.ashx to find the dial sites.
  • VA-28 slice 5 (.msh extension itself + MshConfig type name + --msh CLI flag): blocked on VA-29's encrypted-SQLite design. The .msh key string renames inside the format did land here (per resolution: "the in-memory field is group_id regardless of how it's persisted").

Test plan

  • cargo build --workspace (clean).
  • cargo test --workspace (full suite green).
  • cargo clippy --workspace --all-targets -- --deny warnings (clean).
  • cargo fmt --all --check (clean - required a follow-up cargo fmt --all after the bulk sed; sed renames left a couple of import-order regressions that fmt normalized).
  • just pre-commit (single docker build against oci-build/check.Dockerfile covering fmt + clippy + build + tests; same gate Forgejo CI runs).
  • Manual: a real vervain-agent invocation against a stub server. Not required since the rename is mechanical and the test suite drives the same code paths the runtime does.

Operator notes

  • Existing local sled stores (run/meshagent.db/, run/meshagent-host.db/) are now stale because the agent will create fresh vervain-agent.db/ paths on next run. They are not committed (the new .gitignore patterns target the new names). Delete them at will: rm -rf run/meshagent*.db/.
  • just dev regenerates run/vervain-agent.msh from the renamed template; no operator action needed beyond a fresh just dev invocation.
  • Installed binaries from any prior release (/usr/local/sbin/meshagent, /etc/meshagent/, etc.) will not be cleaned up automatically. Per resolution this is acceptable since there are no live deployments.

#VA-28 State Done

## Summary Closes VA-28. Sweeps every "mesh"-flavored identifier from the agent and replaces it with "vervain". 659 line references across 56 files, plus 5 crate directory renames and 2 on-disk artifact renames. The Rust-side rename is mechanical; the diff is large but reads as a single coordinated rebrand. Wire-protocol u32 codes and SHA-384 hash values are unchanged - only Rust types and field names are renamed - so the on-wire format is byte-compatible with VA-27 (last main HEAD). ## What's renamed - Crates (Cargo manifests + dirs + workspace deps + binary targets + lib names + every `use ...::` import): `meshagent` becomes `vervain-agent`; `meshagent-config` becomes `vervain-agent-config`; `meshagent-kvm` becomes `vervain-agent-kvm`; `meshagent-mcp` becomes `vervain-agent-mcp`; `meshagent-protocol` becomes `vervain-agent-protocol`. Self-update helper binary becomes `vervain-agent-self-update-helper`. The `meshcore` Cargo feature becomes `vervain-core`. - Build / tooling: `compose.yml`, `justfile`, `.forgejo/workflows/build-package.yml` (`PACKAGE_NAME` + `ARTIFACT_NAME`), `oci-build/release.Dockerfile`, `.dockerignore`, `.gitignore`, `.idea/vervain-agent.iml`. Forgejo published artifact moves to `vervain-agent-x86_64-unknown-linux-gnu`. - Rust source identifiers: `MeshCommand` becomes `AgentCommand` (variants unchanged, integer wire codes preserved); `MeshCore`/`MeshCoreInstance`/`MeshCoreSlot` become `VervainCore*`; `MeshAgent` capability bit becomes `VervainAgent`; `MeshType` becomes `GroupType`; `MeshID` becomes `GroupID`; `MeshName` becomes `GroupName`; `MeshServer` becomes `ServerURL`; `MeshNodeCertificate` becomes `VervainAgentNodeCertificate`; `MeshPolicyGuid` becomes `VervainAgentPolicyGuid` (incl. `exeMeshPolicyGuid` becomes `exePolicyGuid`). Field renames: `mesh_id` becomes `group_id`, `mesh_server` becomes `server_url`. Module rename: `meshcore` becomes `vervain_core`. Env-var constants: `MESHAGENT_VERSION` / `MESHAGENT_GIT_HASH` / `MESHAGENT_BUILD_DATE` become `VERVAIN_AGENT_*` (VERVAIN underscore-separated per resolution). Doc references to upstream C identifiers and file paths (`meshcore/agentcore.c`, `meshcore.js::tunnel`, etc.) are reworded to "upstream `agentcore.c`" / "the upstream tunnel.js" so the mesh prefix is dropped without losing the provenance pointer. - `.msh` key strings (line-oriented config parsed by `vervain-agent-config`): `MeshServer=` becomes `ServerURL=`; `MeshID=` becomes `GroupID=`; `MeshName=` becomes `GroupName=`; `MeshType=` becomes `GroupType=`. The `.msh` extension itself + the `--msh` CLI flag + the `MshConfig` type name stay (blocked on VA-29). - On-disk artifacts: `run/meshagent.msh` becomes `run/vervain-agent.msh`; `run/meshagent.msh.template` becomes `run/vervain-agent.msh.template`. Data dir paths: `meshagent.db` becomes `vervain-agent.db`. Installed-system paths: `/usr/local/sbin/meshagent` becomes `/usr/local/sbin/vervain-agent`; `/etc/meshagent/` becomes `/etc/vervain-agent/`; `/var/lib/meshagent` becomes `/var/lib/vervain-agent`; `~/.local/bin/meshagent`, `~/.config/meshagent/` likewise. systemd unit Description= reads "Vervain Agent". No migration shim per resolution (no live deployments). - Docs (slice 8): README.md is fully reworked (the historical-attribution sentence pointing at the upstream GitHub repo is dropped; the project is now framed as "a Rust agent for the Vervain remote-management platform"). ROADMAP.md prose updated. Module-level docstrings throughout `crates/vervain-agent/src/` rewritten. - mDNS + cert CN: service type `_meshagent._tcp.local.` becomes `_vervain-agent._tcp.local.`; self-signed cert CommonName `MeshNodeCertificate` becomes `VervainAgentNodeCertificate`. These will need paired updates in `vervain-server` when the server's LAN-discovery + cert-validation code lands. ## Resolutions to the issue's open questions (already locked in the VA-28 issue comment) 1. `.msh` replacement extension: deferred to VA-29 (encrypted SQLite store keyed by filename hash, planning ticket). 2. `MeshCommand` becomes `AgentCommand`. Integer wire codes unchanged. 3. `mesh_id` becomes `group_id` (doc comment said "SHA-384 group id"; `agent_id` was already taken by the platform-code field on `AuthInfo`). 4. URL paths `/agent.ashx` + `/meshrelay.ashx`: paired with VS-24 in `vervain-server`. Agent-side dial updates land once VS-24 picks the new strings (see "Blocked" below). 5. Env var naming: VERVAIN underscore-separated. `VERVAIN_AGENT_VERSION`, not `VERVAINAGENT_VERSION`. 6. Installed-system paths: rename outright, no migration shim. Per resolution: "no breaking changes since the app is not in use." ## Blocked (intentionally not in this PR) - VA-28 slice 6 (URL paths): `/agent.ashx` and `/meshrelay.ashx` still appear in `host/tunnel.rs`, `dispatch.rs`, `net.rs`, and a handful of integration tests. These are server-defined paths and need to land in lockstep with VS-24. Once VS-24 picks the new strings, a follow-up PR swaps them on the agent side. Grep for `meshrelay.ashx` to find the dial sites. - VA-28 slice 5 (`.msh` extension itself + `MshConfig` type name + `--msh` CLI flag): blocked on VA-29's encrypted-SQLite design. The .msh key string renames inside the format did land here (per resolution: "the in-memory field is `group_id` regardless of how it's persisted"). ## Test plan - [x] `cargo build --workspace` (clean). - [x] `cargo test --workspace` (full suite green). - [x] `cargo clippy --workspace --all-targets -- --deny warnings` (clean). - [x] `cargo fmt --all --check` (clean - required a follow-up `cargo fmt --all` after the bulk sed; sed renames left a couple of import-order regressions that fmt normalized). - [x] `just pre-commit` (single docker build against `oci-build/check.Dockerfile` covering fmt + clippy + build + tests; same gate Forgejo CI runs). - [ ] Manual: a real `vervain-agent` invocation against a stub server. Not required since the rename is mechanical and the test suite drives the same code paths the runtime does. ## Operator notes - Existing local sled stores (`run/meshagent.db/`, `run/meshagent-host.db/`) are now stale because the agent will create fresh `vervain-agent.db/` paths on next run. They are not committed (the new `.gitignore` patterns target the new names). Delete them at will: `rm -rf run/meshagent*.db/`. - `just dev` regenerates `run/vervain-agent.msh` from the renamed template; no operator action needed beyond a fresh `just dev` invocation. - Installed binaries from any prior release (`/usr/local/sbin/meshagent`, `/etc/meshagent/`, etc.) will not be cleaned up automatically. Per resolution this is acceptable since there are no live deployments. #VA-28 State Done
chore(rebrand): replace mesh with vervain (VA-28)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 4m47s
9d101ef141
Renames every "mesh"-flavored identifier to "vervain" across crates, build tooling, on-disk artifacts, and docs. The legacy MeshCentral lineage is dropped entirely: the agent no longer references the upstream brand in code, manifests, paths, env vars, or doc comments. Wire-protocol u32 codes and SHA-384 hash values are unchanged; only the Rust-side type and field names are renamed.

Crates renamed (Cargo manifests, directory paths, workspace deps, binary targets, lib names, imports): meshagent -> vervain-agent (binary + lib + crate root); meshagent-config -> vervain-agent-config; meshagent-kvm -> vervain-agent-kvm; meshagent-mcp -> vervain-agent-mcp; meshagent-protocol -> vervain-agent-protocol. The self-update helper binary becomes vervain-agent-self-update-helper. The meshcore Cargo feature becomes vervain-core.

Build / tooling: compose.yml, justfile, .forgejo/workflows/build-package.yml (PACKAGE_NAME + ARTIFACT_NAME), oci-build/release.Dockerfile, .dockerignore, .gitignore, .idea/vervain-agent.iml. The published Forgejo generic-package URL now ships under vervain-agent.

Rust source identifier renames: MeshCommand -> AgentCommand (variants unchanged, integer wire codes preserved); MeshCore / MeshCoreInstance / MeshCoreSlot -> VervainCore* (Wasm sandbox); MeshAgent capability bit -> VervainAgent; MeshType -> GroupType; MeshID -> GroupID; MeshName -> GroupName; MeshServer -> ServerURL; MeshNodeCertificate -> VervainAgentNodeCertificate; MeshPolicyGuid -> VervainAgentPolicyGuid (with exeMeshPolicyGuid -> exePolicyGuid). Field renames: mesh_id -> group_id, mesh_server -> server_url. Module rename: meshcore -> vervain_core. Const env-var renames: MESHAGENT_VERSION / MESHAGENT_GIT_HASH / MESHAGENT_BUILD_DATE -> VERVAIN_AGENT_* (VERVAIN underscore-separated from AGENT per resolution). Doc references to upstream C identifiers (MeshCommand_AgentUpdate, etc.) are reworded to refer to "the upstream <name>" without leaking the mesh prefix; file-path doc pointers (meshcore/agentcore.c, meshcore/agentcore.h, meshcore/meshdefines.h, meshcore/KVM/Linux/, meshcore.js::tunnel) are reworded to "upstream agentcore.c" etc.

.msh key strings (parsed by vervain-agent-config): MeshServer= -> ServerURL=; MeshID= -> GroupID=; MeshName= -> GroupName=; MeshType= -> GroupType=. The .msh extension itself stays (blocked on VA-29's encrypted-SQLite design); CLI flag --msh and the MshConfig type name are preserved for the same reason. The case-sensitivity test's lowercase variant is updated to "groupname".

On-disk artifact renames: run/meshagent.msh -> run/vervain-agent.msh; run/meshagent.msh.template -> run/vervain-agent.msh.template; data dir meshagent.db -> vervain-agent.db (state from prior runs sits as untracked stale dirs on disk; user can delete). Installed-system paths: /usr/local/sbin/meshagent -> /usr/local/sbin/vervain-agent; /etc/meshagent/ -> /etc/vervain-agent/; /var/lib/meshagent -> /var/lib/vervain-agent; ~/.local/bin/meshagent and ~/.config/meshagent/ likewise. systemd service Description= now reads "Vervain Agent". No migration shim per resolution (no live deployments).

Docs (slice 8): README.md fully reworked - the historical-attribution sentence pointing to the upstream GitHub repo is dropped; the rewrite is now framed as "A Rust agent for the Vervain remote-management platform". ROADMAP.md prose updated. Module-level docstrings throughout crates/vervain-agent/src/ rewritten to drop MeshCentral / MeshAgent references.

The mDNS service type (_meshagent._tcp.local. -> _vervain-agent._tcp.local.) and the self-signed-cert CN (MeshNodeCertificate -> VervainAgentNodeCertificate) are also renamed; both will need paired updates in vervain-server when the server-side LAN-discovery / cert-validation code lands.

Out of scope (blocked):
- URL paths /agent.ashx and /meshrelay.ashx survive in the agent code; they are owned by the server's HTTP router and tracked under VS-24 (paired ticket in vervain-server). VA-28 slice 6 (agent-side URL dial updates) lands once VS-24 picks the new path strings.
- The .msh -> encrypted-SQLite config replacement is tracked under VA-29 (planning ticket). VA-28 slice 5 (.msh extension + CLI flag + MshConfig type rename) lands once VA-29's design is approved.

Verification: cargo build --workspace + cargo test --workspace + cargo clippy --workspace --all-targets -- --deny warnings + cargo fmt --all --check all green via just pre-commit (single docker build against oci-build/check.Dockerfile, same gate Forgejo CI runs).

#VA-28 State Done
David merged commit 6618c7a136 into main 2026-05-20 21:38:07 +02:00
David deleted branch chore/vervain-rebrand-va-28 2026-05-20 21:38:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-agent!24
No description provided.