clawarmor 2.0.0 → 2.2.0

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/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  import { paint } from './lib/output/colors.js';
5
5
 
6
- const VERSION = '2.0.0';
6
+ const VERSION = '2.2.0';
7
7
  const GATEWAY_PORT_DEFAULT = 18789;
8
8
 
9
9
  function isLocalhost(host) {
@@ -45,7 +45,8 @@ function usage() {
45
45
  console.log(` ${paint.cyan('trend')} Show score over last N audits (ASCII chart)`);
46
46
  console.log(` ${paint.cyan('compare')} Compare coverage vs openclaw security audit`);
47
47
  console.log(` ${paint.cyan('fix')} Auto-apply safe fixes (--dry-run to preview, --apply to run)`);
48
- console.log(` ${paint.cyan('harden')} Interactive hardening wizard (--dry-run, --auto)`);
48
+ console.log(` ${paint.cyan('harden')} Interactive hardening wizard (--dry-run, --auto, --monitor)`);
49
+ console.log(` ${paint.cyan('rollback')} Restore config from a snapshot (--list, --id <id>)`);
49
50
  console.log(` ${paint.cyan('status')} One-screen security posture dashboard`);
50
51
  console.log(` ${paint.cyan('watch')} Monitor config and skill changes in real time`);
51
52
  console.log(` ${paint.cyan('protect')} Install/uninstall/status the full guard system`);
@@ -156,7 +157,7 @@ if (cmd === 'compare') {
156
157
 
157
158
  if (cmd === 'fix') {
158
159
  const { runFix } = await import('./lib/fix.js');
159
- const fixFlags = { apply: process.argv.includes('--apply'), dryRun: process.argv.includes('--dry-run') };
160
+ const fixFlags = { apply: process.argv.includes('--apply'), dryRun: process.argv.includes('--dry-run'), force: process.argv.includes('--force') };
160
161
  process.exit(await runFix(fixFlags));
161
162
  }
162
163
 
@@ -202,11 +203,25 @@ if (cmd === 'harden') {
202
203
  const hardenFlags = {
203
204
  dryRun: args.includes('--dry-run'),
204
205
  auto: args.includes('--auto'),
206
+ force: args.includes('--force'),
207
+ monitor: args.includes('--monitor'),
208
+ monitorReport: args.includes('--monitor-report'),
209
+ monitorOff: args.includes('--monitor-off'),
205
210
  };
206
211
  const { runHarden } = await import('./lib/harden.js');
207
212
  process.exit(await runHarden(hardenFlags));
208
213
  }
209
214
 
215
+ if (cmd === 'rollback') {
216
+ const idIdx = args.indexOf('--id');
217
+ const rollbackFlags = {
218
+ list: args.includes('--list'),
219
+ id: idIdx !== -1 ? args[idIdx + 1] : null,
220
+ };
221
+ const { runRollback } = await import('./lib/rollback.js');
222
+ process.exit(await runRollback(rollbackFlags));
223
+ }
224
+
210
225
  if (cmd === 'status') {
211
226
  const { runStatus } = await import('./lib/status.js');
212
227
  process.exit(await runStatus());
Binary file