a2acalling 0.6.48 → 0.6.49

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 CHANGED
@@ -2491,8 +2491,30 @@ a2a add "${inviteUrl}" "${ownerText || 'friend'}" && a2a call "${ownerText || 'f
2491
2491
  const { execSync } = require('child_process');
2492
2492
  const path = require('path');
2493
2493
  const pkg = require('../package.json');
2494
+ const { A2AConfig } = require('../src/lib/config');
2494
2495
  const currentVersion = pkg.version;
2495
2496
  const checkOnly = args.flags.check || args.flags.c;
2497
+ const autoMode = args.flags.auto ? String(args.flags.auto).trim().toLowerCase() : null;
2498
+
2499
+ if (autoMode) {
2500
+ const config = new A2AConfig();
2501
+ if (autoMode === 'status') {
2502
+ const au = config.getAutoUpdate ? config.getAutoUpdate() : { enabled: true, intervalMs: 3600000, allowMajor: false };
2503
+ console.log('Auto-update configuration:\n');
2504
+ console.log(` Enabled: ${au.enabled ? 'yes' : 'no'}`);
2505
+ console.log(` Interval: ${Math.floor((au.intervalMs || 3600000) / 1000)}s`);
2506
+ console.log(` Allow major updates: ${au.allowMajor ? 'yes' : 'no'}`);
2507
+ console.log(` Last known good version: ${au.lastGoodVersion || '(none)'}`);
2508
+ return;
2509
+ }
2510
+ if (autoMode === 'on' || autoMode === 'off') {
2511
+ config.setAutoUpdate({ enabled: autoMode === 'on' });
2512
+ console.log(`Auto-update ${autoMode === 'on' ? 'enabled' : 'disabled'}.`);
2513
+ return;
2514
+ }
2515
+ console.error('Invalid --auto value. Use: on | off | status');
2516
+ process.exit(1);
2517
+ }
2496
2518
 
2497
2519
  console.log(`\nšŸ“¦ A2A Update\n${'─'.repeat(50)}\n`);
2498
2520
  console.log(` Installed: v${currentVersion}`);
@@ -2681,6 +2703,7 @@ Server:
2681
2703
 
2682
2704
  update Update A2A to latest version (npm or git pull)
2683
2705
  --check, -c Check for updates without installing
2706
+ --auto Manage auto-update: on|off|status
2684
2707
 
2685
2708
  install Install A2A for OpenClaw
2686
2709
  setup Auto setup (gateway-aware dashboard install)