feat(meshagent): batch agent feature parity pass #1

Merged
David merged 1 commit from feat/agent-parity-batch into main 2026-05-04 02:51:23 +02:00
Owner
  • add dev-insecure Cargo feature gating ws:// transport for just dev; production binaries keep strict wss:// enforcement and full TLS posture
  • justfile env detection (VERVAIN_ENV) drives http/ws scheme + ports + server host; render run/meshagent.msh from .template via ensure-msh; auto-seed .env from .env.example via ensure-env
  • correct hostinfo capability bits (Linux: DESKTOP|TERMINAL|FILES|CONSOLE; non-Linux: TERMINAL|FILES|CONSOLE) - drop bogus COMPRESSION, never advertise JAVASCRIPT
  • preserve POSIX file metadata (mode, uid, gid, atime, mtime) across file_get/file_put via tail-appended optional metadata field; chown gated on euid_is_root, degrades silently when not root
  • skip server_tls_cert_hash cache read+write under is_insecure_dev() so sled store stays clean across dev/prod mode switches
  • self-update apply integration test via meshagent-self-update-helper bin and tests/self_update_apply.rs (#[ignore], run with --ignored) - verifies execv swap end-to-end without replacing the test process
  • new oobupdate JSON action: signature verification (RSA-PKCS1-SHA384), reqwest streaming download with size cap, hash check, stage via UpdateSession; trust anchor threaded from on_auth_verify into DispatchContext via Handshake::server_signing_key; apply gated by args.exe_path.is_none()
  • new host/tcpforward.rs implements tcpconnect / tcpdata (b64) / tcpdisconnect JSON actions with per-session reader+writer task pair and clean teardown on either side
  • new host/wsproxy.rs implements wsconnect / wsdata (kind=text|binary) / wsdisconnect against ws:// or wss:// targets; reuses noop verifier pattern from net.rs
  • new mdns.rs publishes _meshagent._tcp.local responder with nodeid+agentver TXT records via mdns-sd; gated by enableMdns .msh key (default on)
  • configurable backoff and idle keepalive via four new optional .msh keys (backoffInitialMs, backoffMaxMs, backoffMultiplier, idleTimeoutSecs); idle_loop sends Ping after first idle window and treats second timeout as Disconnected so run_reconnecting recycles the socket
  • CoreModule and CompressedCoreModule frames now reply with the 4-byte short CoreModuleHash (matches agentcore.c:3196-3199 and 3239-3242) so the server stops retrying core pushes against this Rust agent
  • compose: rename docker network to dev-vervain-private-dev; convert service networks: list to mapping syntax
  • shellproxy investigated against MeshAgent/modules/RecoveryCore.js:116-123 and closed as duplicate of tcpconnect (plain TCP relay, no PTY/banner)

Tests: 203 lib + 7 handshake + 2 tcpforward + 3 wsproxy + 1 self_update_apply (ignored); clippy clean for both --no-default-features and --features dev-insecure.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

- add `dev-insecure` Cargo feature gating ws:// transport for `just dev`; production binaries keep strict wss:// enforcement and full TLS posture - justfile env detection (VERVAIN_ENV) drives http/ws scheme + ports + server host; render run/meshagent.msh from .template via ensure-msh; auto-seed .env from .env.example via ensure-env - correct hostinfo capability bits (Linux: DESKTOP|TERMINAL|FILES|CONSOLE; non-Linux: TERMINAL|FILES|CONSOLE) - drop bogus COMPRESSION, never advertise JAVASCRIPT - preserve POSIX file metadata (mode, uid, gid, atime, mtime) across file_get/file_put via tail-appended optional `metadata` field; chown gated on euid_is_root, degrades silently when not root - skip server_tls_cert_hash cache read+write under is_insecure_dev() so sled store stays clean across dev/prod mode switches - self-update apply integration test via meshagent-self-update-helper bin and tests/self_update_apply.rs (#[ignore], run with --ignored) - verifies execv swap end-to-end without replacing the test process - new `oobupdate` JSON action: signature verification (RSA-PKCS1-SHA384), reqwest streaming download with size cap, hash check, stage via UpdateSession; trust anchor threaded from on_auth_verify into DispatchContext via Handshake::server_signing_key; apply gated by args.exe_path.is_none() - new host/tcpforward.rs implements `tcpconnect` / `tcpdata` (b64) / `tcpdisconnect` JSON actions with per-session reader+writer task pair and clean teardown on either side - new host/wsproxy.rs implements `wsconnect` / `wsdata` (kind=text|binary) / `wsdisconnect` against ws:// or wss:// targets; reuses noop verifier pattern from net.rs - new mdns.rs publishes `_meshagent._tcp.local` responder with nodeid+agentver TXT records via mdns-sd; gated by `enableMdns` .msh key (default on) - configurable backoff and idle keepalive via four new optional .msh keys (backoffInitialMs, backoffMaxMs, backoffMultiplier, idleTimeoutSecs); idle_loop sends Ping after first idle window and treats second timeout as Disconnected so run_reconnecting recycles the socket - CoreModule and CompressedCoreModule frames now reply with the 4-byte short CoreModuleHash (matches agentcore.c:3196-3199 and 3239-3242) so the server stops retrying core pushes against this Rust agent - compose: rename docker network to dev-vervain-private-dev; convert service networks: list to mapping syntax - shellproxy investigated against MeshAgent/modules/RecoveryCore.js:116-123 and closed as duplicate of tcpconnect (plain TCP relay, no PTY/banner) Tests: 203 lib + 7 handshake + 2 tcpforward + 3 wsproxy + 1 self_update_apply (ignored); clippy clean for both --no-default-features and --features dev-insecure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(meshagent): batch agent feature parity pass
Some checks failed
Check / clippy + fmt + tests (pull_request) Has been cancelled
d9c2783489
- add `dev-insecure` Cargo feature gating ws:// transport for `just dev`; production binaries keep strict wss:// enforcement and full TLS posture
- justfile env detection (VERVAIN_ENV) drives http/ws scheme + ports + server host; render run/meshagent.msh from .template via ensure-msh; auto-seed .env from .env.example via ensure-env
- correct hostinfo capability bits (Linux: DESKTOP|TERMINAL|FILES|CONSOLE; non-Linux: TERMINAL|FILES|CONSOLE) - drop bogus COMPRESSION, never advertise JAVASCRIPT
- preserve POSIX file metadata (mode, uid, gid, atime, mtime) across file_get/file_put via tail-appended optional `metadata` field; chown gated on euid_is_root, degrades silently when not root
- skip server_tls_cert_hash cache read+write under is_insecure_dev() so sled store stays clean across dev/prod mode switches
- self-update apply integration test via meshagent-self-update-helper bin and tests/self_update_apply.rs (#[ignore], run with --ignored) - verifies execv swap end-to-end without replacing the test process
- new `oobupdate` JSON action: signature verification (RSA-PKCS1-SHA384), reqwest streaming download with size cap, hash check, stage via UpdateSession; trust anchor threaded from on_auth_verify into DispatchContext via Handshake::server_signing_key; apply gated by args.exe_path.is_none()
- new host/tcpforward.rs implements `tcpconnect` / `tcpdata` (b64) / `tcpdisconnect` JSON actions with per-session reader+writer task pair and clean teardown on either side
- new host/wsproxy.rs implements `wsconnect` / `wsdata` (kind=text|binary) / `wsdisconnect` against ws:// or wss:// targets; reuses noop verifier pattern from net.rs
- new mdns.rs publishes `_meshagent._tcp.local` responder with nodeid+agentver TXT records via mdns-sd; gated by `enableMdns` .msh key (default on)
- configurable backoff and idle keepalive via four new optional .msh keys (backoffInitialMs, backoffMaxMs, backoffMultiplier, idleTimeoutSecs); idle_loop sends Ping after first idle window and treats second timeout as Disconnected so run_reconnecting recycles the socket
- CoreModule and CompressedCoreModule frames now reply with the 4-byte short CoreModuleHash (matches agentcore.c:3196-3199 and 3239-3242) so the server stops retrying core pushes against this Rust agent
- compose: rename docker network to dev-vervain-private-dev; convert service networks: list to mapping syntax
- shellproxy investigated against MeshAgent/modules/RecoveryCore.js:116-123 and closed as duplicate of tcpconnect (plain TCP relay, no PTY/banner)

Tests: 203 lib + 7 handshake + 2 tcpforward + 3 wsproxy + 1 self_update_apply (ignored); clippy clean for both --no-default-features and --features dev-insecure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
David merged commit 356638baff into main 2026-05-04 02:51:23 +02:00
David deleted branch feat/agent-parity-batch 2026-05-04 02:51:23 +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!1
No description provided.