Skip to content

Releases: peerclaw/peerclaw-agent

v0.7.2

16 Mar 01:51

Choose a tag to compare

Changes

  • docs: add ZeroClaw plugin to multi-platform support section
  • docs: add missing API methods (NewSimple, Keypair, TrustStore, Router, SetNotificationHandler, Sessions)
  • docs: add missing Options fields (ClaimToken, HealthCheck, PlatformAdapters, InboxRelays, ConnectionGate)

Go Module

go get github.com/peerclaw/peerclaw-agent@v0.7.2

v0.7.1

15 Mar 12:12

Choose a tag to compare

Changes

  • fix: bump peerclaw-core to v0.7.0, update Sign/SignEnvelope call sites
  • ci: lower coverage threshold to 25%

Go Module

go get github.com/peerclaw/peerclaw-agent@v0.7.1

v0.7.0

15 Mar 09:52

Choose a tag to compare

What's New

  • Encrypted trust store — XChaCha20-Poly1305 encryption with HKDF-SHA256 key derivation, transparent migration from plaintext
  • Forward secrecy session rekeying — ephemeral X25519 keypairs with automatic rekey on message count / TTL thresholds

Security Fixes

  • Zero derived key material after SetEncryptionKey (crypto hygiene)
  • Handle json.Marshal errors in rekey initiation/response and contact request
  • Disconnect on session key failure, validate nonce length, track goroutines
  • Handle errors from identity.Sign() and identity.SignEnvelope()

CI

  • Add 70% coverage threshold gate

v0.6.0 — Agent Auto-Recovery

15 Mar 03:08

Choose a tag to compare

What's New

Auto Re-Register on Heartbeat 404

When the server restarts and loses agent records, the SDK now automatically detects 404 from heartbeat and re-registers — zero manual intervention required.

Server Re-Register Notification

The SDK listens for re_register notifications broadcast by the server on startup, triggering immediate re-registration for all connected agents.

HealthCheck Callback

New HealthCheck option enables dynamic heartbeat status reporting. The callback runs before each heartbeat with a 5-second timeout, returning the actual agent health status (online, degraded, offline). Platform adapters implementing platform.HealthChecker are checked automatically.

Periodic Heartbeat Loop

Start() now automatically sends heartbeats on a configurable interval (default 3 minutes), keeping agents online without manual heartbeat management.

Structured Registry Errors

New RegistryError type and IsNotFound() helper enable programmatic error handling for registry API responses.

Commits

  • 361c617 feat: add auto re-register on heartbeat 404 and server re_register notification
  • cdc5db5 feat: add HealthCheck callback for dynamic heartbeat status
  • e560747 feat: add periodic heartbeat loop to keep agents online

v0.5.0

14 Mar 18:58

Choose a tag to compare

What's New

Version Upgrade Mechanism

Adds formal compatibility checking and upgrade notification between the agent SDK and platform adapters.

Protocol Version Gate (breaking)

  • Adapter interface now requires ProtocolVersion() int — existing adapter implementations must add this method
  • SDK validates the adapter's protocol version at startup; incompatible adapters are rejected before Connect()
  • Constants MinSupportedProtocol / MaxSupportedProtocol define the supported range (currently both 1)

Heartbeat Version Advisory

  • HeartbeatResponse now includes an optional VersionAdvisory field
  • After registration, the agent sends a background heartbeat; if the server reports a newer SDK, a warning is logged once
  • Old agents ignore the new field (backward compatible)

Optional Versioned Interface

  • Adapters may implement PluginVersion() and SDKCompatRange() for soft plugin↔SDK compat checks
  • OpenClaw adapter implements this; others can adopt incrementally
  • SDK logs a warning if it falls outside the adapter's declared range

Registration Metadata

  • ClaimRegister() now auto-injects sdk_version (was already done for Register())
  • Both registration paths inject platform_name and platform_protocol when a platform adapter is configured

Startup Log

  • On successful adapter connect, a structured log line shows platform name, protocol version, SDK version, and plugin version (if available)

Breaking Changes

  • platform.Adapter interface gains ProtocolVersion() int — all implementations must add this one-liner

Compatibility

Scenario Result
Old agent + new server version_advisory in heartbeat → old agent ignores it
New agent + old server version_advisory absent → decoded as nil
Old adapter + new SDK Missing ProtocolVersion()compile error (trivial fix)
Non-Go plugins (TS/Rust/Python) Not affected — they use the bridge protocol

v0.4.0

13 Mar 06:22

Choose a tag to compare

What's New

  • Contact sync — Agent syncs server contacts to local TrustStore on startup (additive, non-fatal)
  • Bidirectional contact pushAddContact() / RemoveContact() propagate changes to server (best-effort)
  • Agent-to-agent contact requestsSendContactRequest() via server REST API with P2P Envelope fallback; whitelist bypass for incoming requests
  • Signaling error handling — Agent processes signaling_error messages from server (e.g., "not in contacts" rejection), fails pending connections with clear error
  • RegistryClient auth — Ed25519 signature authentication for contacts and contact-request endpoints

Cleanup

  • Removed unused NostrSignaling + CompositeSignaling (875 lines) — tracked in CANDIDATE_FEATURES.md
  • Removed unused DomainVerifier + RecoveryManager (148 lines) — tracked in CANDIDATE_FEATURES.md
  • Removed DHT reference from Discovery interface comment

Dependencies

  • Bumped peerclaw-core to v0.6.0

v0.3.0

13 Mar 04:05

Choose a tag to compare

What's New

P2P File Transfer with E2E Encryption

Pure peer-to-peer large file transfer over WebRTC DataChannels — zero server dependency in the data path.

  • Binary frame protocol[seq|length|flags|encrypted_chunk] with 64KB default chunk size
  • Mutual authentication — 3-step Ed25519 challenge-response handshake before any data flows
  • Per-chunk encryption — XChaCha20-Poly1305 with AAD = file_id|seq preventing reorder attacks
  • Pipeline push + backpressure — Near line-speed transfer (1MB high-water, 256KB low-water)
  • Resume support — Persisted last-confirmed sequence, reconnect picks up where it left off
  • Nostr fallback — When WebRTC NAT traversal fails, chunks sent as encrypted Nostr events
  • Mailbox wakeup — Immediate inbox sync on file offer instead of waiting for poll interval

New Public API

fileID, err := agent.SendFile(ctx, peerID, "/path/to/file")
transfers := agent.ListTransfers()
info, ok := agent.GetTransfer(fileID)
agent.CancelTransfer(fileID)

New Options

  • FileTransferDir — Directory for received files
  • ResumeStatePath — Path to persist resume state

Transport Enhancements

  • CreateDataChannel() and RegisterDataChannelHandler() on WebRTC transport
  • Backpressure control in Send()
  • TriggerSync() on mailbox transport for wakeup signals

Other Changes

  • License changed from MIT to Apache 2.0
  • peerclaw-core bumped to v0.5.0

v0.2.0: Security Audit + Encrypt-Then-Sign

12 Mar 06:22

Choose a tag to compare

Highlights

  • Encrypt-then-sign (H-07): Messages are now encrypted before signing, enabling pre-authentication — receivers can verify sender identity without decrypting, preventing decryption-oracle attacks
  • WebSocket migration (M-40): Migrated from nhooyr.io/websocket to github.com/coder/websocket
  • Comprehensive security audit (R2-R6): Fixed 30+ findings including mandatory signature verification, DTLS fingerprint pinning, trust/reputation hardening, dead code removal

Breaking Changes

  • Encrypted message format changed (encrypt-then-sign). All communicating agents must upgrade simultaneously.

Changes

  • fix: mandatory signature verification and full-envelope signing (C-01, C-02)
  • fix: Phase R2 security hardening (H-08, H-09, H-10, H-12)
  • fix: Phase R3 security hardening (M-13)
  • fix: Phase R4 security hardening across agent module
  • fix: Phase R5 security hardening across agent module
  • fix: Phase R6 security hardening — trust, reputation, DHT
  • fix: DTLS fingerprint pinning and inbox channel race fix
  • fix(security): H-07 encrypt-then-sign for pre-authentication
  • fix(deps): M-40 migrate nhooyr.io/websocket to coder/websocket
  • chore: remove dead code (DHT, transport selector, sandbox)
  • chore(deps): bump peerclaw-core to v0.4.0