feat(cli): add namespace workspace sync - #724
Conversation
|
|
Signed-off-by: mrLi <50289372+15258725278@users.noreply.github.com>
1aa1c02 to
84feb38
Compare
FenjuFu
left a comment
There was a problem hiding this comment.
Reviewed the sync core. The fingerprinting and status model are clean and correct:
snapshotSkillDirectoryhashes each file with SHA-256 and folds sortedpath:hashpairs into an aggregatesha256:fingerprint, so the workspace fingerprint is deterministic and order-independent.statusdoes a proper three-way comparison — local directory snapshot vs stored workspace metadata vs remote — which lets it distinguishlocal-changed(snapshot ≠ metadata),update-available(metadata ≠ remote),up-to-date, and orphaned local dirs (flagging "local changes detected"). That is the right basis for a safe pull/push and mirrors git-style status.- Unmanaged directories are called out with a distinct reason rather than being silently treated as installed.
Scope is contained to the CLI, existing 0.1.9 behavior is preserved, the version bump to 0.1.10 is included, and coverage is good (fingerprint/install-service/client unit tests plus the 187-line sync-command integration test; DCO green). One thing worth confirming in the description or a test: that push refuses to clobber when a slug is simultaneously local-changed and update-available (a true divergence), rather than pushing over newer remote state. Otherwise this looks well-built — merge decision to the maintainers.
Summary
sync pull,status,diff, andpushworkflowsVerification
bun run lintbun run typecheckbun test(389 passed)bun run buildnode dist/index.js version->SkillHub CLI 0.1.10node dist/index.js help syncThe matching server namespace manifest and strict publish-validation APIs are already deployed and authenticated-smoke-tested in production.