Repository navigation
Releases: GooDAnDReaDY/dsh-time-machine
Releases · GooDAnDReaDY/dsh-time-machine
Release list
v0.1.31 [DSH v0.2.1-rc.2]
Security
- Canonical DSH session authentication & fail-closed LAN guard (#99): Integrated
getConnection(ctx)and delegated request verification to DSH core serviceconnection.requestRejection(request)across all 7 HTTP web routes (/snapshots,/diff,/create,/delete,/prune,/rollback,/rollback-file) and the plugin updater (lib/updater.js). Unauthenticated LAN clients and reverse-proxy requests lacking DSH session authentication are rejected with HTTP 401 Unauthorized / 403 Forbidden fail-closed, preventing unauthorized remote execution of snapshot rollback, deletion, pruning, creation, and inspection. - Fail-closed network boundary when auth service is absent (#99): In environments where the DSH connection service is not registered, all non-loopback requests from LAN or WAN are rejected with HTTP 401 Unauthorized, eliminating the possibility of spoofing
Origin,Host, orSec-Fetch-Siteheaders to bypass guards.
Added
- Authentication & session verification test suite (#99): Added comprehensive test coverage in
test/http-updater-routes.test.mjsverifyinggetConnection(ctx)context resolution,assertTrustedSettingsRequestauth status matrix (401/403/fail-closed/admitted), mutating route protection against unauthenticated LAN callers, and updater rejection gating. Total test count expanded to 82 passing tests.
Verification
- Unit tests: 82/82 passed (100% pass rate).
- Preflight: FAIL=0, WARN=3.
- Tested and verified on DeepSeek Harness production environment.
Provenance
- Gitea commit:
3d5accb497fb0407b8799beebe012b9711d6ed25 - Mirror commit:
24e1749f66f14568ad2e6861c0c7b426547792cd
v0.1.30 [DSH v0.2.1-rc.2]
Fixed
- Lossless JSON compliance in non-git workspaces (#96, GitHub #8): Fixed an issue where
time_machine_*tools (time_machine_checkpoint_create,time_machine_checkpoint_list, etc.) failed withvalue is not lossless JSONwhen executed in a workspace without an initialized Git repository. InShadowSnapshotEngine(lib/snapshot.js),cwdproperty is now omitted whenhasGitis false instead of being assignedundefined. - Eliminated explicit undefined in rollback results (#96): In
_doRollbackSnapshot,preRollbackIdandpreRollbackSnapshotare now conditionally attached only when a pre-rollback checkpoint actually exists, preventingundefinedproperty values from breaking lossless JSON serialization.
Added
- Comprehensive lossless JSON regression tests (#96): Added unit test suite in
test/dsh-time-machine.test.mjsverifying strict lossless JSON round-tripping for non-git checkpoint creation, list operations, and selective rollbacks, expanding the test suite to 78 passing tests.
Verification
- Unit tests: 78/78 passed (100% pass rate).
- Preflight:
FAIL=0. - Tested and verified on DeepSeek Harness production environment.
v0.1.29
Security
- Strict rollback workspace validation (#93):
rollbackSnapshotandrollbackFileinShadowSnapshotEnginenow strictly validate any caller-suppliedcwdagainst the snapshot's recorded workspace (snap.cwd). If a foreign or mismatched directory is supplied, the operation immediately aborts withTarget workspace mismatch, preventing execution ofgit read-tree,checkout-index, andgit clean -fdin arbitrary repositories on disk. - Enforce private network subnet check on Origin auth (#93):
isTrustedSettingsRequestnow explicitly verifies that the remote client connection originates from loopback (127.0.0.1,::1) or private RFC1918 subnets (192.168.0.0/16,10.0.0.0/8,172.16.0.0/12). Inbound requests from public WAN addresses are rejected with403 Forbiddeneven ifHostandOriginheaders match.
Added
- Regression test coverage (#93): Added unit tests for foreign
cwdrejection intest/dsh-time-machine.test.mjsand WAN IP rejection intest/http-updater-routes.test.mjs, expanding the test suite to 77 passing tests.
Changed
- Pinned npm registry in publishConfig (#93): Explicitly configured
registry: "https://registry.npmjs.org/"inpackage.jsonpublishConfig.
Verification
- Unit tests: 77/77 passed (100% pass rate).
- Preflight:
FAIL=0. - Verified on DSH test server and production environments.
v0.1.28
Security
- Sanitize HTTP Host header and reject header spoofing (#82):
isTrustedSettingsRequeststrictly inspects the verifiedHostheader, eliminating trust in spoofableX-Forwarded-Host. Requests without origin/referer headers are now strictly restricted to loopback addresses, preventing LAN clients from bypassing CSRF protection.
Added
- Automatic pre-rollback snapshot protection (#81):
rollbackSnapshotnow automatically creates apre-rollbackcheckpoint before executing destructivegit clean -fdand index resets. Both modified and untracked files are preserved, returningpreRollbackIdin the response and surfacing recovery notices in the web interface. - Comprehensive test suite (#84): Added
test/http-updater-routes.test.mjsproviding exhaustive coverage forwriteJson,readBody, the complete CSRF vector matrix, updater semver/security validation, and mutating web routes (405 Method Not Allowed,403 Forbidden,400 Bad Request). Total test count expanded to 76 tests.
Changed
- Unified plugin logging (#77): Passed
ctx.loggerintoShadowSnapshotEngineand migrated all 18 host-side diagnostic warnings and errors from rawconsole.*to structured plugin logging. - Package distribution files (#83): Added localized
README.zh.mdandREADME.ru.mddocumentation files to the npm packagefilesdeclaration. - Repository cleanup (#85): Removed extraneous
=artifact file from the Git repository root.
Verification
- Unit tests: 76/76 passed (100% pass rate).
- Preflight:
FAIL=0. - Verified on DSH 0.2.0-rc.2 test server and confirmed web endpoints (
GET /dsh-time-machine/snapshotsHTTP 200).
v0.1.27
Fixed
- Tool calls without
cwd/sessionIdnow reliably resolve active workspaces (#7):- In tool calls such as
time_machine_checkpoint_createortime_machine_file_rollbackwhere LLMs or clients omitcwdorsessionId, the plugin now resolves workspace paths viaexecution.agent.session,execution.agent.workspace, session event history, and active workspace tracking, eliminating silent fallbacks to process root and memory-only degradation. - Snapshots now track their originating workspace (
snap.cwd), so rollback, diff, and delete operations automatically resolve the correct target workspace even when callers omit the workspace path.
- In tool calls such as
- Explicit warning on memory-only checkpoints: Added diagnostic feedback (
warning: "Target path is not a Git repository...") when manual checkpoints fall back to memory-only mode. - Support volatile config accessors on initialization: Wrapped plugin config resolution with
plainConfigto handle volatile boxed accessors in DSH core.
Verification
- Unit tests: 64/64 passed (100% pass rate).
- Preflight:
FAIL=0. - Verified on DSH 0.2.0-rc.2 test server and confirmed web endpoints (
GET /dsh-time-machine/snapshotsHTTP 200).
v0.1.26
Fixed
- Silent degradation to memory-only snapshots on DSH 0.2.0-rc.2 (#7):
cwdOf()now resolves workspaces across kernel variations by checkingctx.workspaceRegistry(.current,.active,.list),session.workspace.path, andexecution.path/execution.workspacePath. - Explicit warning when snapshot target is not a Git repository: Prevents silent degradation to memory-only snapshots without diagnostic feedback when auto-snapshots run outside a Git workspace.
- Rollback file index cleanup: Added explicit Git staging index reset (
git reset HEAD -- <path>) following file rollbacks so files do not remain staged in the index.
Verification
- Unit tests: 63/63 passed (100% pass rate).
- Preflight:
FAIL=0. - Tested on DSH 0.2.0-rc.2 test server and verified web endpoints (
GET /dsh-time-machine/snapshotsHTTP 200).
v0.1.25
Fixed
- Crash on startup and first turn on DSH 0.1.7+/0.2.0 due to DataCloneError (#6): volatile schema fields in
configare passed intoapply(ctx, config)as accessor objects withget()functions. CallingstructuredClone(config)threwDataCloneError, preventingengine.setMaxfrom applying and crashing the host turn onturn/start. Volatile accessors are now safely unwrapped withplainConfigbefore schema evaluation.
Verification
- Unit tests: 61/61 passed (100% pass rate).
- Preflight:
FAIL=0. - Tested on DSH 0.2.0-rc.2 test server and production contours.
v0.1.22
Security
- Strict path traversal and symlink escape protection in selective rollback:
rollbackFilenow strictly rejects absolute paths,..directory traversal attempts, and symlink escapes outside the repository workspace before invoking Git checkout or unlinking files (#65). - Hardened HTTP trust validation against same-site requests:
isTrustedSettingsRequestnow categorically rejectssec-fetch-site: same-siterequests, enforces verifiedOriginorRefererheaders matching the server Host for all non-loopback clients, and restricts unauthenticated requests strictly to local loopback (#38).
v0.1.21
Security
- Hardened HTTP settings & web routes validation: improved
isTrustedSettingsRequestto rejectSec-Fetch-Site: cross-site, validatedOrigin/Refererheaders againstHostandX-Forwarded-Host, and removed unverified token fallbacks. AddedisTrustedSettingsRequestprotection toGET /dsh-time-machine/snapshotsandGET /dsh-time-machine/diff(#59, #60).
Fixed
- Cleanup orphaned indices in non-git directories:
cleanupOrphanedIndicesnow safely verifies whether the working directory is a git repository before invokinggit rev-parse --git-dir, preventing fatal git errors during startup in non-git directories (#57, #61). - Descriptive rollback errors without git commit:
rollbackSnapshotandrollbackFilenow fail with an explicit error if a target snapshot lacks an associated git commit, avoiding false success (#58). - Session snapshot limits on turn end: event listener for
turn/endnow respects the configuredmaxSnapshotslimit instead of truncating history to 3 snapshots (#56).
Performance
- Optimized snapshot creation: added
skipIfNoChangesfast check usinggit status --porcelainand HEAD verification to avoid redundantgit add -Aand object writes on clean trees, plus label newline sanitization (#55).
Release
- Canonical GitHub mirror publishing script: added executable
scripts/publish-github.shwith--checkdry-run and sanitized tree packaging for mirror synchronization (#53).