aicq-chat-plugin 2.5.2 → 2.5.3

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
@@ -7,6 +7,7 @@
7
7
  * aicq-plugin Same as above
8
8
  * aicq-plugin start Start the plugin server
9
9
  * aicq-plugin install Install plugin to OpenClaw only
10
+ * aicq-plugin uninstall Remove plugin from OpenClaw
10
11
  * aicq-plugin status Check plugin status
11
12
  * aicq-plugin --port <port> Specify port (default 6109)
12
13
  * aicq-plugin --help Show help
@@ -334,6 +335,45 @@ function installToOpenClaw() {
334
335
  return true;
335
336
  }
336
337
 
338
+ // ── Uninstall from OpenClaw ─────────────────────────────────────────
339
+ function uninstallFromOpenClaw() {
340
+ const PLUGIN_ID = 'aicq-chat';
341
+ let removed = false;
342
+
343
+ // Remove from skills/ directory
344
+ const workspace = findOpenClawWorkspace();
345
+ if (workspace) {
346
+ const skillDir = path.join(workspace, 'skills', PLUGIN_ID);
347
+ if (fs.existsSync(skillDir)) {
348
+ console.log(`[AICQ] Removing skill from ${skillDir}...`);
349
+ fs.rmSync(skillDir, { recursive: true, force: true });
350
+ console.log('[AICQ] Skill removed.');
351
+ removed = true;
352
+ }
353
+ }
354
+
355
+ // Remove from plugins/ directory
356
+ const openclawDir = findOpenClawDir();
357
+ if (openclawDir) {
358
+ const pluginDir = path.join(openclawDir, 'plugins', PLUGIN_ID);
359
+ if (fs.existsSync(pluginDir)) {
360
+ console.log(`[AICQ] Removing plugin from ${pluginDir}...`);
361
+ fs.rmSync(pluginDir, { recursive: true, force: true });
362
+ console.log('[AICQ] Plugin removed.');
363
+ removed = true;
364
+ }
365
+ }
366
+
367
+ if (!removed) {
368
+ console.log('[AICQ] AICQ plugin not found in any OpenClaw directory.');
369
+ console.log('[AICQ] Nothing to uninstall.');
370
+ } else {
371
+ console.log('[AICQ] Restart OpenClaw to complete the uninstall.');
372
+ }
373
+
374
+ return removed;
375
+ }
376
+
337
377
  // ── Help ────────────────────────────────────────────────────────────
338
378
  if (command === '--help' || command === '-h') {
339
379
  console.log(`
@@ -344,9 +384,10 @@ Usage:
344
384
  aicq-plugin [command] [options]
345
385
 
346
386
  Commands:
347
- start Install to OpenClaw (if needed) and start plugin server (default)
348
- install Install plugin to OpenClaw only (don't start server)
349
- status Check if the plugin is running
387
+ start Install to OpenClaw (if needed) and start plugin server (default)
388
+ install Install plugin to OpenClaw only (don't start server)
389
+ uninstall Remove plugin from OpenClaw (skills/ and plugins/)
390
+ status Check if the plugin is running
350
391
 
351
392
  Options:
352
393
  --port, -p <port> Plugin server port (default: 6109)
@@ -364,6 +405,7 @@ Examples:
364
405
  npx aicq-chat-plugin # Install + start
365
406
  aicq-plugin # Start on default port
366
407
  aicq-plugin install # Install to OpenClaw only
408
+ aicq-plugin uninstall # Remove from OpenClaw
367
409
  aicq-plugin --port 8080 # Start on port 8080
368
410
  aicq-plugin -s http://localhost # Connect to local server
369
411
  `);
@@ -407,6 +449,12 @@ if (command === 'install') {
407
449
  process.exit(0);
408
450
  }
409
451
 
452
+ // ── Uninstall ───────────────────────────────────────────────────────
453
+ if (command === 'uninstall' || command === 'remove') {
454
+ uninstallFromOpenClaw();
455
+ process.exit(0);
456
+ }
457
+
410
458
  // ── Start (default) — auto-install then run ─────────────────────────
411
459
  installToOpenClaw();
412
460
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "aicq-chat",
3
3
  "name": "AICQ Encrypted Chat",
4
- "version": "2.5.2",
4
+ "version": "2.5.3",
5
5
  "description": "End-to-end encrypted chat plugin for OpenClaw agents — Node.js implementation with full UI",
6
6
  "entry": "index.js",
7
7
  "activation": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aicq-chat-plugin",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "AICQ End-to-end Encrypted Chat Plugin for OpenClaw — Full UI with friend management, group chat, file transfer, and AI agent communication",
5
5
  "main": "index.js",
6
6
  "bin": {