context-mode 2.0.0-next.24 → 2.0.0-next.26
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/.codex-plugin/plugin.json +1 -1
- package/README.md +276 -247
- package/SHA256SUMS +15 -15
- package/cli.mjs +23 -14
- package/copilot/plugin.json +1 -1
- package/gemini-extension.json +1 -1
- package/hook.mjs +60 -60
- package/opencode/plugin.js +259 -112
- package/package.json +1 -1
- package/pi/index.js +290 -143
- package/qwen-extension.json +1 -1
- package/run.mjs +24 -22
- package/search.mjs +24 -22
- package/server.mjs +257 -127
package/SHA256SUMS
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
3645e151d22dcdc4a7bd680b61a640b4eae2f5751c328a39c6036090744e8af0 .claude-plugin/marketplace.json
|
|
2
|
+
a1042ed44f0d618f16f1c005995e1f76b4a1781f3e5ab8b85b6b6c16bf8c149b .claude-plugin/plugin.json
|
|
3
3
|
187503e1455560d4ab5a72e3b8cd2f274abd4ccc5faa60dd66c37e44bb5f10c2 .codex-plugin/hooks.json
|
|
4
4
|
4edea851775bc3f0418f8d9cf6ead74f2767c3a9e3b8c05749eacb78ebb3b896 .codex-plugin/mcp.json
|
|
5
|
-
|
|
5
|
+
d1c5a899a2c848fba015339526adbb539c8254b0aa6c50c0913ec3af45e0bd15 .codex-plugin/plugin.json
|
|
6
6
|
92f11a867c41c9e575ccb978ff205ae2011c244a14aa3c576e914e537105caa0 LICENSE
|
|
7
|
-
|
|
7
|
+
8366c1cb599828b6bffaf2cc459bdefb3d0df631d0225e1cd3bcfed2733be287 README.md
|
|
8
8
|
1773e40a89384dd1af9023ba533da1908f3e2435dbaaa7cc941edf0514148313 claude-code/skills/ctx-doctor/SKILL.md
|
|
9
9
|
34fffb9c76d69c551f07036230bec0fbaca7a69177a5a47f89ddb9a9990a1fa2 claude-code/skills/ctx-stats/SKILL.md
|
|
10
10
|
d8f835d2f2b3eb70c5902f8707e7c5857977cec9e20ace76c499378a04e178e0 claude-code/skills/ctx-upgrade/SKILL.md
|
|
11
|
-
|
|
11
|
+
25e83a0ce0ecba92641d9b91a41a316aedcb035cd4f752747cbce328290c9448 cli.mjs
|
|
12
12
|
83c297020ed0c592fc68c9c482546a6999d41df5d06d8a329498f10edb1bd38e codex/skills/ctx-doctor/SKILL.md
|
|
13
13
|
adc2c374f699d3698110920bb48411965de09fc6e7232ce59c913f6d58c0d738 codex/skills/ctx-stats/SKILL.md
|
|
14
14
|
5c12cdd19a5e3ed7d9ba3a47b24d03864a28d36cf7006876284ee07cd4221ec4 codex/skills/ctx-upgrade/SKILL.md
|
|
15
|
-
|
|
15
|
+
bef3d88dc526f9f67d1992ce55dde9e96513e8e7c88a260c93b441db99a80672 copilot/plugin.json
|
|
16
16
|
e3bc6cae0bd51b806d81631879711bbc48c679fc929b2642ed4634438364167d fixtures/hook-roundtrip.json
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
76225831f2fa1e761b740672c3881e918da5bf985664a153619457f49d4bf1c1 gemini-extension.json
|
|
18
|
+
7a9b99aaea8d220cc20bead47ea161008bedade54bd0f809f0e9206d485e7646 hook.mjs
|
|
19
19
|
1f8d8650d2b38737522cab6b875878e8baf84a74acf98cd924c7af22852d873f hooks/claude-code.json
|
|
20
20
|
2524a0eb52683b65c65943c5097db513e9845ba14e84324b39e9a8ea2bb43193 hooks/codex.json
|
|
21
21
|
b656fed2b754ebcfd4c156bee81d5879c21a8083fc0d6b8e3241462b63a214b6 hooks/copilot-cli.json
|
|
@@ -24,16 +24,16 @@ f336d1db67de49e641687bbd41ba1a9424e31dfe2377b2284bf44358288ebd8b hooks/kiro.jso
|
|
|
24
24
|
017c9cc3997dd53231b8548b1a1609fddc51177af53501565a4f334602039860 hooks/qwen.json
|
|
25
25
|
33f69267645338d0dc392ce551dcd7c69a0b508113469d6ea637d3f34239ef1d hooks/vscode.json
|
|
26
26
|
085630bccf2073ac9a62be24ef91dfc47d106092dc82c822db70890b7d3ae1c0 hooks/zcode.json
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
fd949c50d37d214b25290821f8a2775e643e525c2e35b58c08859421a8b1457e opencode/plugin.js
|
|
28
|
+
d030c9cebebd64f952c074a3b3061dfb2e13aadf13a6a185463e3aecd89c8b14 package.json
|
|
29
|
+
1b6c06feddcaf209c689c3abe9cca3294903064523f3bc0e3a53b1758ec2b9c0 pi/index.js
|
|
30
30
|
8712881622c9905aa4836af50d903042d34a91506264e459bc7839331f6f0192 pi/skills/ctx-doctor/SKILL.md
|
|
31
31
|
8d6e8e2a82eb079bddc60727f52d9f9a6e0bf9e15391357fed82ee76ab5fe76c pi/skills/ctx-stats/SKILL.md
|
|
32
32
|
db6f9c006bc864a7271f1eeffb1e316ebb537a3414f1c22f8b9de0a896e8e3c5 pi/skills/ctx-upgrade/SKILL.md
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
afbfe96acc6eeb05623e0a10b7f2bd18b281f2bac13ddc0b47d26d8df80f4b49 qwen-extension.json
|
|
34
|
+
cd2c35d662911b5147d1540c9549172393c8ced94239bb1fdc959424f2160b6b run.mjs
|
|
35
|
+
cd2c35d662911b5147d1540c9549172393c8ced94239bb1fdc959424f2160b6b search.mjs
|
|
36
|
+
188e94d4ac79c31e69328d578a8d1dba41b7c9655e81a573b78202fa0c7ab00a server.mjs
|
|
37
37
|
e5503a22a6238901484d123efc11d2d933aa9a54c6ac2018812cfa65ec4e53e3 skills/ctx-doctor/SKILL.md
|
|
38
38
|
1044587a1906c69f2467c089a25e19819a290ea5728389bd1f086c6dfc0d0c51 skills/ctx-stats/SKILL.md
|
|
39
39
|
c1cac75b7506ee0d06089ce611ac6dc9314cf12435da318ce88ad50e2c5debbf skills/ctx-upgrade/SKILL.md
|
package/cli.mjs
CHANGED
|
@@ -242,6 +242,8 @@ var NODE_MIN = "24.15.0";
|
|
|
242
242
|
var DATA_ROOT = "~/.context-mode";
|
|
243
243
|
var HOST_PLUGINS_DIR_NAME = "plugins";
|
|
244
244
|
var INSTALLED_PLUGINS_FILE = "installed_plugins.json";
|
|
245
|
+
var PROJECT_PLUGIN_SCOPES = Object.freeze(["local", "project"]);
|
|
246
|
+
var PLUGIN_SCOPE_RANK = Object.freeze({ local: 0, project: 1, user: 2, managed: 2 });
|
|
245
247
|
var MCP_HINT_EVERY_DEFAULT = 10;
|
|
246
248
|
function readHintEvery(raw) {
|
|
247
249
|
if (raw === void 0 || raw.trim() === "") return MCP_HINT_EVERY_DEFAULT;
|
|
@@ -4418,7 +4420,7 @@ ${i2}
|
|
|
4418
4420
|
}).prompt();
|
|
4419
4421
|
|
|
4420
4422
|
// src/core/project/config-dir.ts
|
|
4421
|
-
import { join as join2, posix, win32 } from "node:path";
|
|
4423
|
+
import { basename, dirname as dirname2, join as join2, posix, resolve, win32 } from "node:path";
|
|
4422
4424
|
|
|
4423
4425
|
// src/core/contracts/errors.ts
|
|
4424
4426
|
var ERROR_TEXT = Object.freeze({
|
|
@@ -4554,7 +4556,7 @@ import path3 from "node:path";
|
|
|
4554
4556
|
|
|
4555
4557
|
// src/core/ops/host-config.ts
|
|
4556
4558
|
import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
4557
|
-
import { dirname as
|
|
4559
|
+
import { dirname as dirname3, join as join3 } from "node:path";
|
|
4558
4560
|
|
|
4559
4561
|
// node_modules/eslint-visitor-keys/lib/visitor-keys.js
|
|
4560
4562
|
var KEYS2 = {
|
|
@@ -7371,7 +7373,7 @@ function detectV1(agent, home, scope = {}) {
|
|
|
7371
7373
|
|
|
7372
7374
|
// src/core/ops/plugin-root.ts
|
|
7373
7375
|
import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync3, realpathSync as realpathSync2 } from "node:fs";
|
|
7374
|
-
import { dirname as
|
|
7376
|
+
import { dirname as dirname4, isAbsolute, join as join5, sep } from "node:path";
|
|
7375
7377
|
import { fileURLToPath } from "node:url";
|
|
7376
7378
|
|
|
7377
7379
|
// src/core/ops/doctor-config.ts
|
|
@@ -8155,7 +8157,7 @@ function askCodexHome(env) {
|
|
|
8155
8157
|
}
|
|
8156
8158
|
return void 0;
|
|
8157
8159
|
}
|
|
8158
|
-
function sameDir(a2, b3, platform) {
|
|
8160
|
+
function sameDir(a2, b3, platform = process.platform) {
|
|
8159
8161
|
if (platform !== "win32") return path10.posix.normalize(a2) === path10.posix.normalize(b3);
|
|
8160
8162
|
const norm = (p3) => {
|
|
8161
8163
|
const bare = p3.startsWith(WIN_VERBATIM_PREFIX) ? p3.slice(WIN_VERBATIM_PREFIX.length) : p3;
|
|
@@ -8206,15 +8208,21 @@ function pluginHooksFromReply(m3, pluginId) {
|
|
|
8206
8208
|
}
|
|
8207
8209
|
return out2;
|
|
8208
8210
|
}
|
|
8209
|
-
function listPluginHooks(env, pluginId, cwd) {
|
|
8211
|
+
async function listPluginHooks(env, pluginId, cwd) {
|
|
8212
|
+
const r2 = await askPluginHooks(env, pluginId, cwd);
|
|
8213
|
+
return r2.kind === "list" ? r2.hooks : void 0;
|
|
8214
|
+
}
|
|
8215
|
+
function askPluginHooks(env, pluginId, cwd) {
|
|
8210
8216
|
const bin = whichBin("codex", env);
|
|
8211
|
-
if (!bin) return Promise.resolve(
|
|
8212
|
-
return new Promise((
|
|
8217
|
+
if (!bin) return Promise.resolve({ kind: "absent" });
|
|
8218
|
+
return new Promise((resolve2) => {
|
|
8219
|
+
let asked;
|
|
8220
|
+
const done_ = (hooks) => hooks === void 0 ? { kind: "silent" } : { kind: "list", hooks, codexHome: asked };
|
|
8213
8221
|
let f2;
|
|
8214
8222
|
try {
|
|
8215
8223
|
f2 = spawnForm(bin, ["app-server"], env);
|
|
8216
8224
|
} catch {
|
|
8217
|
-
|
|
8225
|
+
resolve2({ kind: "silent" });
|
|
8218
8226
|
return;
|
|
8219
8227
|
}
|
|
8220
8228
|
const child = spawn(f2.command, f2.args, { env, cwd, stdio: ["pipe", "pipe", "ignore"], windowsVerbatimArguments: f2.windowsVerbatimArguments, windowsHide: true });
|
|
@@ -8224,7 +8232,7 @@ function listPluginHooks(env, pluginId, cwd) {
|
|
|
8224
8232
|
let result;
|
|
8225
8233
|
const settle = () => {
|
|
8226
8234
|
clearTimeout(grace);
|
|
8227
|
-
|
|
8235
|
+
resolve2(done_(result));
|
|
8228
8236
|
};
|
|
8229
8237
|
let grace;
|
|
8230
8238
|
const finish2 = (v) => {
|
|
@@ -8269,6 +8277,7 @@ function listPluginHooks(env, pluginId, cwd) {
|
|
|
8269
8277
|
}
|
|
8270
8278
|
if (!isObj3(m3)) continue;
|
|
8271
8279
|
if (m3.id === 1) {
|
|
8280
|
+
asked = codexHomeFromReply(line);
|
|
8272
8281
|
send({ method: "initialized" });
|
|
8273
8282
|
send({ id: 2, method: "hooks/list", params: { cwds: [cwd] } });
|
|
8274
8283
|
} else if (m3.id === 2) finish2(pluginHooksFromReply(m3, pluginId));
|
|
@@ -8347,12 +8356,12 @@ function frame(buf) {
|
|
|
8347
8356
|
function listCopilotHooks(env, file, cwd) {
|
|
8348
8357
|
const bin = whichBin("copilot", env);
|
|
8349
8358
|
if (!bin) return Promise.resolve(void 0);
|
|
8350
|
-
return new Promise((
|
|
8359
|
+
return new Promise((resolve2) => {
|
|
8351
8360
|
let f2;
|
|
8352
8361
|
try {
|
|
8353
8362
|
f2 = spawnForm(bin, ["--server", "--stdio", "--no-auto-update"], env);
|
|
8354
8363
|
} catch {
|
|
8355
|
-
|
|
8364
|
+
resolve2(void 0);
|
|
8356
8365
|
return;
|
|
8357
8366
|
}
|
|
8358
8367
|
const child = spawn2(f2.command, f2.args, { env, cwd, stdio: ["pipe", "pipe", "ignore"], windowsVerbatimArguments: f2.windowsVerbatimArguments, windowsHide: true });
|
|
@@ -8364,7 +8373,7 @@ function listCopilotHooks(env, file, cwd) {
|
|
|
8364
8373
|
clearTimeout(timer);
|
|
8365
8374
|
child.stdin.destroy();
|
|
8366
8375
|
child.kill();
|
|
8367
|
-
|
|
8376
|
+
resolve2(v);
|
|
8368
8377
|
};
|
|
8369
8378
|
const timer = setTimeout(() => finish2(void 0), ASK_TIMEOUT_MS2);
|
|
8370
8379
|
child.on("error", () => finish2(void 0));
|
|
@@ -8873,7 +8882,7 @@ function copyCheck(row, pkgDir) {
|
|
|
8873
8882
|
return { name: "copy", ok: false, detail: `${c3.host} runs context-mode ${old}, the installed package is ${pkg}; run ${c3.bin} ${c3.refresh.join(" ")}` };
|
|
8874
8883
|
}
|
|
8875
8884
|
function mcpCheck(cmd, env) {
|
|
8876
|
-
return new Promise((
|
|
8885
|
+
return new Promise((resolve2) => {
|
|
8877
8886
|
const child = spawn3(cmd[0], cmd.slice(1), { env, stdio: ["pipe", "pipe", "ignore"], detached: process.platform !== "win32", windowsHide: true });
|
|
8878
8887
|
const reap = () => {
|
|
8879
8888
|
child.kill();
|
|
@@ -8885,7 +8894,7 @@ function mcpCheck(cmd, env) {
|
|
|
8885
8894
|
clearTimeout(timer);
|
|
8886
8895
|
process.off("exit", reap);
|
|
8887
8896
|
child.kill();
|
|
8888
|
-
|
|
8897
|
+
resolve2({ name: "mcp", ok, detail });
|
|
8889
8898
|
};
|
|
8890
8899
|
const timer = setTimeout(() => done(false, "no MCP answer before timeout"), VERIFY_TIMEOUT_MS);
|
|
8891
8900
|
child.on("error", (e) => done(false, e.message));
|
package/copilot/plugin.json
CHANGED
package/gemini-extension.json
CHANGED