Repository navigation
ZTM Chat v2.0.0 Release Notes
Release: ZTM v2.0 "OpenClaw Edition" 🛡️🤖
We are thrilled to announce the release of ZTM v2.0, codenamed the "OpenClaw Edition." This milestone update is specifically engineered to empower OpenClaw users with a seamless, decentralized, and ultra-secure management experience.
By integrating the power of the Zero Trust Mesh (ZTM) with the most versatile local AI agent, we are redefining how users interact with their private AI infrastructure. This release focuses on two core pillars: Private Communication and Invisible Management.
Key Features in this Edition:
- Native OpenClaw Chat Channel:
Say goodbye to third-party IM dependencies. With the new built-in Chat Channel, users can now send commands and receive feedback from OpenClaw directly through ZTM-Chat. This ensures a 100% Peer-to-Peer (P2P) experience where your sensitive AI prompts never leave your private mesh. It is encrypted, serverless, and completely private. - ZTM Tunnel for OpenClaw Web Console:
Remote management no longer requires risky port forwarding or complex VPNs. Using ZTM Tunnel, you can securely map your remote OpenClaw Web Console (port 18789) to your local machine. This allows you to access the full management UI vialocalhostfrom anywhere in the world, with zero exposure to the public internet. - Zero-Knowledge, Zero-Exposure Architecture:
This edition leverages the Pipy-based programmable proxy to ensure that your OpenClaw instance remains "invisible" to hackers and scanners. Authorization is strictly certificate-based, ensuring that only you have the keys to your AI’s kingdom.
Why "OpenClaw Edition"?
OpenClaw provides the "brawn" to execute system-level tasks, and ZTM 2.0 provides the "armor" to protect those capabilities. Whether you are running OpenClaw on a home NAS or a secure server, ZTM 2.0 ensures that your AI assistant remains powerful, reachable, and—most importantly—private.
Total control, zero exposure. Welcome to the future of decentralized AI management.
Breaking Changes
Architecture Refactoring
- Migrated from storage API to Chat App HTTP API (
22275d2) - Reorganized ztm-chat directory structure into focused domains (
b943436) - Modularized
channel.tsinto focused submodules (d57fcad) - Implemented dependency injection container for decoupling (
710a751,535ed83) - Removed
MessageDeduplicatorin favor of Watermark-based deduplication (a0e7d29)
Path Changes
- Changed config path to
~/.openclaw/ztm/config.json(cb57b46) - Changed state file path to
~/.openclaw/ztm/state.json(c9830e9)
Features
New Capabilities
- Persistent Pairing State (
0980ced): Added persistent pairing state store with auto-cleanup - Message Flow Logging (
7ba7f06): Added message flow logging and conditional watermark updates - UI Hints (
8ff6e80): Added uiHints support to configuration schema - Memory Monitoring (
008d49c): Added memory usage monitoring to MessageDeduplicator - Concurrency Control (
2d14557): Added Semaphore to limit concurrent message processing in watch loop - State Cleanup (
9029ba0): Added state cleanup to prevent unboundedstate.jsongrowth - Directory Creation (
69dc42b): Ensure~/.openclaw/ztmdirectory exists on plugin startup
Performance Improvements
- Optimized Message Watching (
0cd1c10): Optimized message watching and polling for reduced latency - Static Imports (
086a528,811ad7a): Replaced dynamic imports with static imports throughout - Pre-compiled Regex (
0bfdff4): Pre-compile regex patterns in ZTM API client - Test Isolation (
46087b1): Isolated MessageStateStore tests to avoid polluting real state.json
Bug Fixes
Critical Fixes
- Infinite Loop Prevention (
66fed84): Handle message format and prevent infinite loops - Duplicate Prevention (
cd93429): Prevent duplicate message processing using<=in watermark check - Memory Leak (
7c9a1ae): Prevent memory leak inlastSeenFilesMap - Async Error Handling (
175ae94): Properly propagate async errors instead of silently swallowing them - Self-pairing (
a2fb0d7): Filter out bot's own username to prevent self-pairing - Plugin Loading (
6a6cbcf): ExportregisterPluginfunction to fix OpenClaw plugin loading - File Metadata (
8d1840c): Persist file metadata (time + size) to detect append-only changes across restarts - Watermark Persistence (
329bb6b): Persist message watermarks to prevent re-processing on restart - API Timeout (
719acd4): Resolve ZTM Chat API timeout issues - Message Reception (
2a51ce7): Fix ztm-api message reception and watch loop bugs - Watch Fallback (
2386fad): Correct watch path, regex, and add polling fallback for ZTM watch API
Other Fixes
- Whitespace Messages (
212923f): Skip empty or whitespace-only messages inprocessIncomingMessage - Error Propagation (
f3a7fbc): Prevent unhandled promise rejection by not re-throwing logged errors - Mesh Connectivity (
30b14b5): Resolve race condition between ztm join and mesh connectivity check - Pairing Integration (
4d347d7): Implement AI dispatch pipeline and persist pairing approvals across restarts - Pairing Store (
c6b0477): Integrate pairing store and fix DM policy bypass - API Regex (
c941555): Correct ZTM API regex syntax and path prefixes - Storage API (
115f4b0): Use ZTM Agent storage API instead of Chat app API - Pairing Command (
72b4f47): Correct OpenClaw pairing command syntax - Config Resolution (
91f82a0): Apply config defaults inresolveZTMChatAccount - Mesh Name (
ac83928,fd8e1d5): Make meshName optional and set default to "openclaw-mesh"
Refactoring
Code Organization
- Modularization (
73505b7): Splitchannel.tsinto modular submodules - Function Extraction (
11de02c): ExtractwatchLoopinto single-responsibility functions - Helper Functions (
bc30708,474fbda): Extract helper functions for data transformation - Result Pattern (
c98a356): ImplementResult<T, E>type pattern for consistent error handling - Directory Structure (
6ec0972): Moveonboarding.tstosrc/onboarding/directory - Runtime Directory (
8011cda): Moveruntime.tstoruntime/directory - Test Utilities (
82ce688): Add test utilities for dependency injection
Type Safety
- Type-safe Imports (
c487a14): Replaceas anytype assertions with type-safe alternatives - Typed Interfaces (
89c88a5): Replaceanytype with typedChannelPlugininterface - Eliminate Any (
95fad36): Eliminateanytypes inchannel.ts - Type Guards (
4d71326): Use type guard for file metadata inwatchChanges - Interface Extends (
aeb6006): Use interface extends instead of type intersection - Test Type Safety (
aed0500,4bcd17e): Improve test type safety with proper mocking patterns
Code Quality
- Node.js Prefix (
67b5551): Usenode:prefix for Node.js built-in module imports - Logger Cleanup (
4003aa2): Remove logger fallback and use module-level logger - Error Handling (
be90632): AddhandleResultutility for unified error handling - Constants (
159d29f): Extract identifier pattern to shared constant - URL Validation (
7343f16): Extract URL validation logic to shared utility - Unused Code (
d07646f): Remove unused exported functions from ZTM API - Config Unification (
1faeb54): Unify schema and types for ZTM Chat configuration - Config Helper (
2b8b2ca): UsemergeAccountConfighelper inresolveZTMChatAccount - Message Deduplication (
f4024d1): Simplify message deduplication logic - Cleanup (
65fe70c): Reorganize ztm-chat directory structure and clean up deprecated code
Testing
New Tests
- Comprehensive Tests (
922777f): Add comprehensive polling tests and enhance integration tests - Integration Tests (
2b4a12d): Add integration tests for Watch→Polling fallback and Pairing flow - E2E Tests (
9c6844a): Add E2E tests forstartAccountgateway function - Mock Tests (
295a8bc): Add unit tests forMockZTMClient
Test Improvements
- Test Utilities (
bc30708): Extract test utilities fromztm-api.ts - Type Safety (
4bcd17e): Improve type safety inpolling.test.ts - Test Isolation (
46087b1): Isolate MessageStateStore tests
Documentation
- README Updates (
14c4957): Improve README with ZTM setup instructions and reorganization - CLI Examples (
03243f2): Update CLI command examples to use correct OpenClaw syntax
Chores
- Dependency Updates (
fd35c84): Update dependencies and clean up local tarball - Test Fixes (
8059865): Resolve test failures and TypeScript type errors - DI Container (
182a467): Improve DI container with typed factory functions
Contributors
Thanks to all contributors who made this release possible!