context-mode 0.5.4 → 0.5.5
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.
|
@@ -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.5.
|
|
16
|
+
"version": "0.5.5",
|
|
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.5.
|
|
3
|
+
"version": "0.5.5",
|
|
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/build/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { PolyglotExecutor } from "./executor.js";
|
|
6
6
|
import { ContentStore } from "./store.js";
|
|
7
7
|
import { detectRuntimes, getRuntimeSummary, getAvailableLanguages, hasBunRuntime, } from "./runtime.js";
|
|
8
|
-
const VERSION = "0.5.
|
|
8
|
+
const VERSION = "0.5.5";
|
|
9
9
|
const runtimes = detectRuntimes();
|
|
10
10
|
const available = getAvailableLanguages(runtimes);
|
|
11
11
|
const server = new McpServer({
|
|
@@ -389,9 +389,10 @@ server.registerTool("search", {
|
|
|
389
389
|
"- Get configuration details ('Tailwind responsive breakpoints')\n" +
|
|
390
390
|
"- Find migration steps ('App Router data fetching')\n\n" +
|
|
391
391
|
"SEARCH TIPS:\n" +
|
|
392
|
-
"-
|
|
392
|
+
"- Queries use OR semantics — results matching more terms rank higher via BM25\n" +
|
|
393
|
+
"- Use 2-4 specific technical terms per query for best results\n" +
|
|
393
394
|
"- Check 'Searchable terms' from execute/execute_file results for available vocabulary\n" +
|
|
394
|
-
"-
|
|
395
|
+
"- For broad topics, send multiple focused searches in parallel\n\n" +
|
|
395
396
|
"Returns exact content — not summaries. Each result includes heading hierarchy and full section text.",
|
|
396
397
|
inputSchema: z.object({
|
|
397
398
|
query: z.string().describe("Natural language search query"),
|
package/build/store.js
CHANGED
|
@@ -40,7 +40,7 @@ function sanitizeQuery(query) {
|
|
|
40
40
|
!["AND", "OR", "NOT", "NEAR"].includes(w.toUpperCase()));
|
|
41
41
|
if (words.length === 0)
|
|
42
42
|
return '""';
|
|
43
|
-
return words.map((w) => `"${w}"`).join(" ");
|
|
43
|
+
return words.map((w) => `"${w}"`).join(" OR ");
|
|
44
44
|
}
|
|
45
45
|
// ─────────────────────────────────────────────────────────
|
|
46
46
|
// ContentStore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
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",
|
|
@@ -92,6 +92,14 @@ Use context-mode for ANY of these, without being asked:
|
|
|
92
92
|
| Shell commands with pipes | `shell` | grep, awk, jq, native tools |
|
|
93
93
|
| File pattern matching | `shell` | find, wc, sort, uniq |
|
|
94
94
|
|
|
95
|
+
## Search Query Strategy
|
|
96
|
+
|
|
97
|
+
- BM25 uses **OR semantics** — results matching more terms rank higher automatically
|
|
98
|
+
- Use 2-4 specific technical terms per query: `search("transform refine pipe")`
|
|
99
|
+
- Send multiple `search()` calls **in parallel** for different aspects of a topic
|
|
100
|
+
- Example: instead of one broad search, send 3 focused parallel queries:
|
|
101
|
+
- `search("transform pipe preprocess")` + `search("refine superRefine check")` + `search("coerce codec")`
|
|
102
|
+
|
|
95
103
|
## Critical Rules
|
|
96
104
|
|
|
97
105
|
1. **Always console.log/print your findings.** stdout is all that enters context. No output = wasted call.
|