jasper-context-compactor 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/cli.js +11 -0
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -11,6 +11,7 @@ const readline = require('readline');
11
11
 
12
12
  const OPENCLAW_CONFIG = path.join(os.homedir(), '.openclaw', 'openclaw.json');
13
13
  const OPENCLAW_EXTENSIONS = path.join(os.homedir(), '.openclaw', 'extensions', 'context-compactor');
14
+ const OLD_EXTENSIONS = path.join(os.homedir(), '.openclaw', 'extensions', 'openclaw-context-compactor');
14
15
 
15
16
  function log(msg) {
16
17
  console.log(`📦 ${msg}`);
@@ -97,6 +98,16 @@ async function setup() {
97
98
  }
98
99
  }
99
100
 
101
+ // Clean up old package name if it exists
102
+ if (fs.existsSync(OLD_EXTENSIONS)) {
103
+ try {
104
+ fs.rmSync(OLD_EXTENSIONS, { recursive: true });
105
+ console.log(' ✓ Removed old openclaw-context-compactor extension');
106
+ } catch (e) {
107
+ console.log(` ⚠ Could not remove old extension: ${e.message}`);
108
+ }
109
+ }
110
+
100
111
  // Load existing config
101
112
  let config = {};
102
113
  if (fs.existsSync(OPENCLAW_CONFIG)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jasper-context-compactor",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Context compaction plugin for OpenClaw - works with local models (MLX, llama.cpp) that don't report token limits",
5
5
  "main": "index.ts",
6
6
  "bin": {