context-mode 0.5.16 → 0.5.17

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",
16
+ "version": "0.5.17",
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.16",
3
+ "version": "0.5.17",
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.16";
8
+ const VERSION = "0.5.17";
9
9
  const runtimes = detectRuntimes();
10
10
  const available = getAvailableLanguages(runtimes);
11
11
  const server = new McpServer({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-mode",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
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",
@@ -16,6 +16,9 @@ description: |
16
16
  "outdated packages", "dependency tree", "cloud resources", "CI/CD output".
17
17
  Also triggers on ANY MCP tool output (Playwright, Context7, GitHub API) that
18
18
  may exceed 20 lines, and any operation where output size is uncertain.
19
+ CRITICAL: When spawning subagents (Task tool), ALWAYS include explicit MCP tool
20
+ names (mcp__context-mode__execute, mcp__context-mode__fetch_and_index, etc.)
21
+ in the subagent prompt. Subagents inherit tools but NOT skill instructions.
19
22
  ---
20
23
 
21
24
  # Context Mode: Default for All Large Output
@@ -249,6 +252,41 @@ browser_network_requests(includeStatic: false, filename: "/tmp/network.md")
249
252
  >
250
253
  > Data flow: **Playwright → file → server-side read → context**. Never: **Playwright → context → index(content) → context again**.
251
254
 
255
+ ## Subagent Usage (CRITICAL)
256
+
257
+ **Subagents inherit MCP tools but NOT skill instructions.** When you spawn a subagent via the Task tool, the subagent has access to `mcp__context-mode__execute`, `mcp__context-mode__execute_file`, `mcp__context-mode__fetch_and_index`, and `mcp__context-mode__search` — but it doesn't know it should use them instead of Bash/Read/WebFetch.
258
+
259
+ **You MUST include explicit tool names in every subagent prompt.** This is the only way to ensure subagents use context-mode tools.
260
+
261
+ ### Rules for spawning subagents:
262
+
263
+ 1. **Never write a subagent prompt that says "analyze this URL" or "run tests"** without specifying which tool to use.
264
+ 2. **Always include the full MCP tool name** in the subagent prompt: `mcp__context-mode__execute`, not "context-mode execute" or "execute".
265
+ 3. **Always add "do NOT use Bash, Read, or WebFetch"** to prevent fallback to standard tools.
266
+ 4. **For browser tasks**, specify `mcp__context-mode__execute` with `language: "shell"` and the exact agent-browser commands.
267
+ 5. **For doc fetching**, specify `mcp__context-mode__fetch_and_index` with exact url and source parameters, then `mcp__context-mode__search` with query and source.
268
+
269
+ ### Template for subagent prompts:
270
+
271
+ ```
272
+ Use mcp__context-mode__execute with language "[lang]" and code:
273
+ [exact code here]
274
+ Set intent to "[what you're looking for]".
275
+ Do NOT use Bash, Read, or WebFetch.
276
+ ```
277
+
278
+ ### Example — parallel browser + docs analysis:
279
+
280
+ ```
281
+ Task 1: Use mcp__context-mode__execute with language "shell" and code:
282
+ AGENT_BROWSER_SESSION="session-a" agent-browser open https://example.com 2>&1 && AGENT_BROWSER_SESSION="session-a" agent-browser snapshot -i 2>&1
283
+ Set intent to "links buttons forms". Do NOT use Bash.
284
+
285
+ Task 2: Use mcp__context-mode__fetch_and_index with url "https://docs.example.com" and source "Example Docs".
286
+ Then use mcp__context-mode__search with query "authentication setup" and source "Example".
287
+ Do NOT use WebFetch.
288
+ ```
289
+
252
290
  ## Anti-Patterns
253
291
 
254
292
  - Using `curl http://api/endpoint` via Bash → 50KB floods context. Use `execute` with fetch instead.