@sdotwinter/openclaw-deterministic 0.17.9 → 0.17.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bin/revert.js +11 -1
  2. package/index.js +13 -0
  3. package/package.json +1 -1
package/bin/revert.js CHANGED
@@ -46,10 +46,20 @@ function restoreDirectoryRecursive(srcDir, destDir) {
46
46
  }
47
47
 
48
48
  function restoreBackup(timestamp) {
49
+ // Validate timestamp format (ISO-like: YYYY-MM-DDTHH-MM-SS.mmmZ)
50
+ const timestampRegex = /^\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z$/;
51
+ if (!timestampRegex.test(timestamp)) {
52
+ console.error(`Invalid timestamp format: ${timestamp}`);
53
+ console.error("Expected format: 2026-02-21T04-43-51.094Z");
54
+ console.error("Use 'oc-deterministic revert --list' to see available backups.");
55
+ process.exit(1);
56
+ }
57
+
49
58
  const backupDir = path.join(BACKUP_ROOT, timestamp);
50
59
 
51
60
  if (!fs.existsSync(backupDir)) {
52
- console.log("Backup not found.");
61
+ console.error(`Backup not found: ${timestamp}`);
62
+ console.error("Use 'oc-deterministic revert --list' to see available backups.");
53
63
  process.exit(1);
54
64
  }
55
65
 
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ // OpenClaw Deterministic - Entry point
2
+ // Re-exports CLI for programmatic use
3
+
4
+ module.exports = {
5
+ doctor: require("./bin/doctor"),
6
+ status: require("./bin/status"),
7
+ install: require("./bin/install"),
8
+ init: require("./bin/init"),
9
+ enable: require("./bin/enable"),
10
+ revert: require("./bin/revert"),
11
+ audit: require("./bin/audit"),
12
+ upgrade: require("./bin/upgrade"),
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdotwinter/openclaw-deterministic",
3
- "version": "0.17.9",
3
+ "version": "0.17.10",
4
4
  "description": "Deterministic governance and memory compaction layer for OpenClaw",
5
5
  "keywords": [
6
6
  "openclaw",