context-mode 1.0.8 → 1.0.9
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/build/cli.js +22 -10
- package/build/server.js +1 -1
- package/cli.bundle.mjs +14 -14
- package/hooks/pretooluse.mjs +3 -1
- package/package.json +1 -1
- package/server.bundle.mjs +1 -1
|
@@ -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.9"
|
|
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.9",
|
|
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.9",
|
|
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",
|
package/build/cli.js
CHANGED
|
@@ -15,6 +15,7 @@ import * as p from "@clack/prompts";
|
|
|
15
15
|
import color from "picocolors";
|
|
16
16
|
import { execSync } from "node:child_process";
|
|
17
17
|
import { readFileSync, cpSync, accessSync, existsSync, readdirSync, rmSync, closeSync, openSync, constants } from "node:fs";
|
|
18
|
+
import { request as httpsRequest } from "node:https";
|
|
18
19
|
import { resolve, dirname, join } from "node:path";
|
|
19
20
|
import { tmpdir, devNull } from "node:os";
|
|
20
21
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -107,16 +108,27 @@ function getLocalVersion() {
|
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
async function fetchLatestVersion() {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
// Use node:https instead of global fetch to avoid a Windows libuv assertion
|
|
112
|
+
// (UV_HANDLE_CLOSING) caused by undici's connection-pool background threads
|
|
113
|
+
// racing with process.exit() teardown on Node.js v24+.
|
|
114
|
+
return new Promise((resolve) => {
|
|
115
|
+
const req = httpsRequest("https://registry.npmjs.org/context-mode/latest", { headers: { Connection: "close" } }, (res) => {
|
|
116
|
+
let raw = "";
|
|
117
|
+
res.on("data", (chunk) => { raw += chunk; });
|
|
118
|
+
res.on("end", () => {
|
|
119
|
+
try {
|
|
120
|
+
const data = JSON.parse(raw);
|
|
121
|
+
resolve(data.version ?? "unknown");
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
resolve("unknown");
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
req.on("error", () => resolve("unknown"));
|
|
129
|
+
req.setTimeout(5000, () => { req.destroy(); resolve("unknown"); });
|
|
130
|
+
req.end();
|
|
131
|
+
});
|
|
120
132
|
}
|
|
121
133
|
/* -------------------------------------------------------
|
|
122
134
|
* Doctor — adapter-aware diagnostics
|
package/build/server.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ContentStore, cleanupStaleDBs } from "./store.js";
|
|
|
13
13
|
import { readBashPolicies, evaluateCommandDenyOnly, extractShellCommands, readToolDenyPatterns, evaluateFilePath, } from "./security.js";
|
|
14
14
|
import { detectRuntimes, getRuntimeSummary, getAvailableLanguages, hasBunRuntime, } from "./runtime.js";
|
|
15
15
|
import { classifyNonZeroExit } from "./exit-classify.js";
|
|
16
|
-
const VERSION = "1.0.
|
|
16
|
+
const VERSION = "1.0.9";
|
|
17
17
|
// Prevent silent server death from unhandled async errors
|
|
18
18
|
process.on("unhandledRejection", (err) => {
|
|
19
19
|
process.stderr.write(`[context-mode] unhandledRejection: ${err}\n`);
|