@sdotwinter/openclaw-deterministic 0.1.0 → 0.1.2
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.
- package/bin/cli.js +38 -16
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const path = require("path");
|
|
4
|
+
const pkg = require("../package.json");
|
|
4
5
|
|
|
5
6
|
const command = process.argv[2];
|
|
6
7
|
|
|
@@ -9,27 +10,48 @@ if (!command) {
|
|
|
9
10
|
process.exit(0);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
switch (command) {
|
|
14
|
+
case "doctor":
|
|
15
|
+
require(path.join(__dirname, "doctor"));
|
|
16
|
+
break;
|
|
17
|
+
|
|
18
|
+
case "install":
|
|
19
|
+
require(path.join(__dirname, "install"));
|
|
20
|
+
break;
|
|
21
|
+
|
|
22
|
+
case "init":
|
|
23
|
+
require(path.join(__dirname, "init"));
|
|
24
|
+
break;
|
|
25
|
+
|
|
26
|
+
case "revert":
|
|
27
|
+
require(path.join(__dirname, "revert"));
|
|
28
|
+
break;
|
|
29
|
+
|
|
30
|
+
case "--version":
|
|
31
|
+
case "-v":
|
|
32
|
+
console.log(`openclaw-deterministic v${pkg.version}`);
|
|
33
|
+
process.exit(0);
|
|
34
|
+
break;
|
|
35
|
+
|
|
36
|
+
case "--help":
|
|
37
|
+
case "-h":
|
|
38
|
+
showHelp();
|
|
39
|
+
process.exit(0);
|
|
40
|
+
break;
|
|
41
|
+
|
|
42
|
+
default:
|
|
43
|
+
console.error(`Unknown command: ${command}\n`);
|
|
44
|
+
showHelp();
|
|
45
|
+
process.exit(1);
|
|
26
46
|
}
|
|
27
47
|
|
|
28
48
|
function showHelp() {
|
|
29
|
-
console.log("
|
|
49
|
+
console.log("\nOpenClaw Deterministic CLI\n");
|
|
30
50
|
console.log("Usage:");
|
|
31
51
|
console.log(" oc-deterministic init");
|
|
32
52
|
console.log(" oc-deterministic doctor");
|
|
33
53
|
console.log(" oc-deterministic install");
|
|
34
|
-
console.log(" oc-deterministic
|
|
54
|
+
console.log(" oc-deterministic revert");
|
|
55
|
+
console.log(" oc-deterministic --version");
|
|
56
|
+
console.log(" oc-deterministic --help\n");
|
|
35
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdotwinter/openclaw-deterministic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Deterministic governance and memory compaction layer for OpenClaw",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openclaw",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "commonjs",
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"bin": {
|
|
27
|
-
|
|
27
|
+
"oc-deterministic": "bin/cli.js"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"test": "echo \"No tests specified\""
|