context-mode 1.0.139 → 1.0.140
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 +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/build/server.d.ts +6 -0
- package/build/server.js +34 -1
- package/cli.bundle.mjs +115 -114
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/server.bundle.mjs +85 -84
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Claude Code plugins by Mert Koseoğlu",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.140"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
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 11 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
|
|
16
|
-
"version": "1.0.
|
|
16
|
+
"version": "1.0.140",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Mert Koseoğlu"
|
|
19
19
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.140",
|
|
4
4
|
"description": "MCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mert Koseoğlu",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.140",
|
|
4
4
|
"description": "MCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mert Koseoğlu",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "Context Mode",
|
|
4
4
|
"kind": "tool",
|
|
5
5
|
"description": "OpenClaw plugin that saves 98% of your context window. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.140",
|
|
7
7
|
"sandbox": {
|
|
8
8
|
"mode": "permissive",
|
|
9
9
|
"filesystem_access": "full",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.140",
|
|
4
4
|
"description": "OpenClaw plugin that saves 98% of your context window. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mert Koseoğlu",
|
package/build/server.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export declare function shouldSuppressMcpToolsForNativePluginHost(opts?: {
|
|
|
15
15
|
platform?: PlatformId;
|
|
16
16
|
settings?: Record<string, unknown> | null;
|
|
17
17
|
}): boolean;
|
|
18
|
+
export declare function emitSuppressionDiagnostic(opts?: {
|
|
19
|
+
platform?: string;
|
|
20
|
+
write?: (chunk: string) => void;
|
|
21
|
+
}): void;
|
|
22
|
+
/** Test-only: reset the one-shot emission flag so suites can re-exercise. */
|
|
23
|
+
export declare function __resetSuppressionDiagnosticForTests(): void;
|
|
18
24
|
type ToolContextOverride = {
|
|
19
25
|
projectDir: string;
|
|
20
26
|
sessionId?: string;
|
package/build/server.js
CHANGED
|
@@ -155,11 +155,44 @@ function settingsHasLegacyContextModeMcp(settings) {
|
|
|
155
155
|
Object.prototype.hasOwnProperty.call(mcp, "context-mode"));
|
|
156
156
|
}
|
|
157
157
|
const suppressMcpToolsForNativePluginHost = shouldSuppressMcpToolsForNativePluginHost();
|
|
158
|
+
/**
|
|
159
|
+
* Issue #623 — surface why ctx_* tools/list is empty on suppressed legacy MCP
|
|
160
|
+
* children. When a user upgrades OpenCode/Kilo from v1.0.136 → v1.0.137+ without
|
|
161
|
+
* running `context-mode upgrade`, their opencode.json still has BOTH the legacy
|
|
162
|
+
* mcp.context-mode block AND the plugin entry. The plugin path registers the
|
|
163
|
+
* tools natively, but the legacy MCP child runs in parallel and used to expose
|
|
164
|
+
* duplicate tools — v1.0.137 suppressed those duplicates. The suppression was
|
|
165
|
+
* silent, leaving any MCP client that inspected the child via tools/list with
|
|
166
|
+
* an empty list and no diagnostic. Emit one stderr line per process so an
|
|
167
|
+
* operator running the child directly (or any non-plugin MCP host) sees the
|
|
168
|
+
* exact reason and the `context-mode upgrade` fix.
|
|
169
|
+
*
|
|
170
|
+
* Exported for test (suppression-diagnostic regression guard).
|
|
171
|
+
*/
|
|
172
|
+
let __suppressionDiagnosticEmitted = false;
|
|
173
|
+
export function emitSuppressionDiagnostic(opts = {}) {
|
|
174
|
+
if (__suppressionDiagnosticEmitted)
|
|
175
|
+
return;
|
|
176
|
+
__suppressionDiagnosticEmitted = true;
|
|
177
|
+
const write = opts.write ?? ((c) => { process.stderr.write(c); });
|
|
178
|
+
const platform = opts.platform ?? "opencode/kilo";
|
|
179
|
+
write(`[context-mode] ctx_* tools/list intentionally empty on this MCP child: ` +
|
|
180
|
+
`legacy mcp.context-mode block coexists with plugin: ["context-mode"] in ` +
|
|
181
|
+
`${platform}.json — plugin-native tools are the supported path (#623). ` +
|
|
182
|
+
`Run \`context-mode upgrade\` to remove the legacy block (preserves other ` +
|
|
183
|
+
`MCP servers).\n`);
|
|
184
|
+
}
|
|
185
|
+
/** Test-only: reset the one-shot emission flag so suites can re-exercise. */
|
|
186
|
+
export function __resetSuppressionDiagnosticForTests() {
|
|
187
|
+
__suppressionDiagnosticEmitted = false;
|
|
188
|
+
}
|
|
158
189
|
const originalRegisterTool = server.registerTool.bind(server);
|
|
159
190
|
server.registerTool = (...args) => {
|
|
160
191
|
const [name, config, handler] = args;
|
|
161
|
-
if (suppressMcpToolsForNativePluginHost)
|
|
192
|
+
if (suppressMcpToolsForNativePluginHost) {
|
|
193
|
+
emitSuppressionDiagnostic();
|
|
162
194
|
return undefined;
|
|
195
|
+
}
|
|
163
196
|
REGISTERED_CTX_TOOLS.push({ name, config, handler });
|
|
164
197
|
return originalRegisterTool(...args);
|
|
165
198
|
};
|