Update master #7

Merged
mahmoud merged 22 commits from development into main 2026-04-05 14:36:31 +00:00
Member
No description provided.
- Reorganize into 5 crates: hero_sync (CLI), hero_sync_sdk, hero_sync_server, hero_sync_ui, hero_sync_rhai
- Replace all REST endpoints with single POST /rpc JSON-RPC 2.0 dispatcher
- CLI now depends only on SDK, communicates via OpenRPC over Unix socket
- UI backend forwards JSON-RPC calls to server via Unix socket (no reverse proxy)
- Dashboard JS uses rpc() helper for all server communication
- SDK client supports both Unix socket and TCP with JSON-RPC 2.0 protocol
- Add sync.run, sync.status, sync.verify RPC methods
- Add hash_file() to SDK as local operation (no server needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The run target now depends on install (which depends on build), so
binaries are automatically copied to ~/hero/bin. The server and UI
are also launched from the installed location for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds hero_sync demo {start,stop,status} commands that communicate
with the server via SDK/OpenRPC over Unix socket.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover the full stack through SDK → OpenRPC → Unix socket → Server:
- Health and info via OpenRPC
- Profile CRUD (save, get, delete, TOML roundtrip)
- Logs retrieval
- Demo server lifecycle management
- Full sync pull (download 7 files, verify, re-sync idempotent)
- Full sync push (upload local files, verify on WebDAV)
- Full sync bidirectional (upload + download in single operation)
- Dry-run mode (no files modified)
- Error handling (nonexistent profiles, invalid TOML)
- SDK local operations (hash_file)
- CLI binary smoke tests (help, version, hash)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, DeletedLocal always re-downloaded and DeletedRemote always
re-uploaded, treating every deletion as needing restoration. Now:

- Bidirectional: deletions propagate to the other side
  (local delete → delete remote, remote delete → delete local)
- Pull: remote is authoritative (local delete → re-download)
- Push: local is authoritative (remote delete → re-upload)

This fixes the issue where deleting a local file/directory and syncing
would re-download it instead of removing it from the remote.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add profile name prefix to all executor log messages for multi-profile clarity
- Pass profile name through SyncEngine to execute_plan
- Add sync (pull/push/bidirectional) and status buttons per profile in dashboard
- Add Sync Result and Status modals to dashboard HTML
- Add WebDAV end-to-end test suite
- Update Cargo.lock dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detect file renames in the diff phase by correlating delete+create pairs
that share the same content hash, converting them to efficient WebDAV MOVE
operations instead of full DELETE + PUT cycles. Includes direction-aware
planner logic, safe MOVE validation with fallback to delete+upload, and
comprehensive unit + integration tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Profiles can now reference reusable ignore template files via
ignore_templates = ["git", "python", ...] in the [exclude] section.
Six built-in templates (default, git, python, rust, node, ide) are
embedded in the binary and written to ~/hero/cfg/hero_sync/ignore/
on first server start. Templates are merged with inline patterns at
sync time. Adds ignore.list/ignore.get RPC methods and template
checkboxes in the dashboard UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-sync: 11 files changed, 718 insertions(+), 60 deletions(-)
Some checks failed
Build / build-and-test (push) Failing after 44s
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
6dee38c50d
Switch openrpc imports from herolib_clients to herolib_core
Some checks failed
Build / build-and-test (push) Failing after 2s
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
c16f938f89
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor hero_sync: restructure crates, consolidate modules, and update dependencies
Some checks failed
Build / build-and-test (push) Failing after 9s
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
27d910f430
Refactor hero_sync UI to use openrpc_proxy! macro and add integration tests
Some checks failed
Build / build-and-test (push) Failing after 0s
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
9df2da8644
- Replace manual JSON-RPC proxy implementation with openrpc_proxy! macro
  from herolib_derive. This auto-generates /rpc, /health, and /.well-known/openrpc.json
  endpoints from the server's OpenRPC spec, eliminating ~100 lines of manual code.

- Add herolib_derive to workspace dependencies with git source

- Add dirs crate dependency to hero_sync_ui (required by openrpc_proxy! macro)

- Create integration tests in hero_sync_examples/tests/integration.rs
  - Tests server health check
  - Tests OpenRPC spec discovery
  - Tests info endpoint
  - Uses zinit for service lifecycle management
  - Demonstrates proper SDK usage patterns

All changes maintain Unix socket architecture (no TCP), socket permissions (0o770),
and discovery manifest endpoints. Code compiles and passes all checks.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
fix: triggers on build workflow
Some checks failed
Build / ci (pull_request) Failing after 29s
Build / build-macos (macos-amd64, x86_64-apple-darwin) (pull_request) Waiting to run
Build / build-macos (macos-arm64, aarch64-apple-darwin) (pull_request) Waiting to run
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (pull_request) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (pull_request) Has been skipped
c6e4ee2294
fix: linting issues
Some checks failed
Build / ci (pull_request) Failing after 1m24s
Build / build-macos (macos-amd64, x86_64-apple-darwin) (pull_request) Waiting to run
Build / build-macos (macos-arm64, aarch64-apple-darwin) (pull_request) Waiting to run
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (pull_request) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (pull_request) Has been skipped
15f4507bb6
fix: run pre-requisites step in ci
Some checks are pending
Build / ci (pull_request) Successful in 2m11s
Build / build-macos (macos-amd64, x86_64-apple-darwin) (pull_request) Waiting to run
Build / build-macos (macos-arm64, aarch64-apple-darwin) (pull_request) Waiting to run
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (pull_request) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (pull_request) Has been skipped
64053f78c7
chore: disable macOS CI workflow — no runner available
All checks were successful
Build / ci (pull_request) Successful in 2m41s
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (pull_request) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (pull_request) Has been skipped
9606b9261b
fix: add rustls-tls
All checks were successful
Build / ci (pull_request) Successful in 2m9s
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (pull_request) Has been skipped
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (pull_request) Has been skipped
fb10be3b14
Merge pull request 'Release Workflow' (#6) from development_release into development
All checks were successful
Build / ci (push) Successful in 2m37s
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Successful in 1m47s
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Successful in 2m36s
a26296720e
Reviewed-on: #6
Sign in to join this conversation.
No reviewers
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
lhumina_code/hero_sync!7
No description provided.