context-mode 0.7.0 → 0.7.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +0 -1
- package/build/cli.js +19 -2
- package/package.json +1 -1
- package/server.bundle.mjs +76 -42
- package/skills/doctor/SKILL.md +2 -2
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"name": "context-mode",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution in 10 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
|
|
16
|
-
"version": "0.7.
|
|
16
|
+
"version": "0.7.1",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Mert Koseoğlu"
|
|
19
19
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution in 10 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mert Koseoğlu",
|
package/README.md
CHANGED
|
@@ -59,7 +59,6 @@ Code Mode showed that tool definitions can be compressed by 99.9%. Context Mode
|
|
|
59
59
|
| `index` | Chunk markdown into FTS5 with BM25 ranking. | 60 KB → 40 B |
|
|
60
60
|
| `search` | Query indexed content with multiple queries in one call. | On-demand retrieval |
|
|
61
61
|
| `fetch_and_index` | Fetch URL, convert to markdown, index. | 60 KB → 40 B |
|
|
62
|
-
| `stats` | Session token tracking with per-tool breakdown. | — |
|
|
63
62
|
|
|
64
63
|
## How the Sandbox Works
|
|
65
64
|
|
package/build/cli.js
CHANGED
|
@@ -301,7 +301,7 @@ async function doctor() {
|
|
|
301
301
|
async function upgrade() {
|
|
302
302
|
console.clear();
|
|
303
303
|
p.intro(color.bgCyan(color.black(" context-mode upgrade ")));
|
|
304
|
-
|
|
304
|
+
let pluginRoot = getPluginRoot();
|
|
305
305
|
const settingsPath = getSettingsPath();
|
|
306
306
|
const changes = [];
|
|
307
307
|
const s = p.spinner();
|
|
@@ -358,6 +358,23 @@ async function upgrade() {
|
|
|
358
358
|
timeout: 60000,
|
|
359
359
|
});
|
|
360
360
|
s.stop("Dependencies ready");
|
|
361
|
+
// Step 2.5: Migrate versioned cache directory if version changed
|
|
362
|
+
const cacheMatch = pluginRoot.match(/^(.*\/plugins\/cache\/[^/]+\/[^/]+\/)(\d+\.\d+\.\d+[^/]*)$/);
|
|
363
|
+
if (cacheMatch && newVersion !== cacheMatch[2] && newVersion !== "unknown") {
|
|
364
|
+
const oldDirVersion = cacheMatch[2];
|
|
365
|
+
const newCacheDir = cacheMatch[1] + newVersion;
|
|
366
|
+
s.start(`Migrating cache: ${oldDirVersion} → ${newVersion}`);
|
|
367
|
+
try {
|
|
368
|
+
execSync(`rm -rf "${newCacheDir}"`, { stdio: "pipe" });
|
|
369
|
+
execSync(`mv "${pluginRoot}" "${newCacheDir}"`, { stdio: "pipe" });
|
|
370
|
+
pluginRoot = newCacheDir;
|
|
371
|
+
s.stop(color.green(`Cache directory: ${newVersion}`));
|
|
372
|
+
changes.push(`Migrated cache: ${oldDirVersion} → ${newVersion}`);
|
|
373
|
+
}
|
|
374
|
+
catch {
|
|
375
|
+
s.stop(color.yellow("Cache migration skipped — using existing directory"));
|
|
376
|
+
}
|
|
377
|
+
}
|
|
361
378
|
// Update global npm package from same GitHub source
|
|
362
379
|
s.start("Updating npm global package");
|
|
363
380
|
try {
|
|
@@ -406,7 +423,7 @@ async function upgrade() {
|
|
|
406
423
|
}
|
|
407
424
|
// Step 4: Fix hooks
|
|
408
425
|
p.log.step("Configuring PreToolUse hooks...");
|
|
409
|
-
const hookScriptPath =
|
|
426
|
+
const hookScriptPath = resolve(pluginRoot, "hooks", "pretooluse.sh");
|
|
410
427
|
const settings = readSettings() ?? {};
|
|
411
428
|
const desiredHookEntry = {
|
|
412
429
|
matcher: "Bash|Read|Grep|Glob|WebFetch|WebSearch|Task",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution, FTS5 knowledge base, and intent-driven search.",
|
|
6
6
|
"author": "Mert Koseoğlu",
|