context-mode 2.0.0-next.11 → 2.0.0-next.12
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/SHA256SUMS +14 -14
- package/cli.mjs +34 -3
- package/copilot/plugin.json +1 -1
- package/gemini-extension.json +1 -1
- package/hook.mjs +88 -84
- package/opencode/plugin.js +335 -143
- package/package.json +1 -1
- package/pi/index.js +386 -181
- package/qwen-extension.json +1 -1
- package/run.mjs +41 -12
- package/search.mjs +41 -12
- package/server.mjs +162 -86
package/SHA256SUMS
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
b919c9286699883fa2c0729855797799ec9bdeffddce4f0cbcd4ab1e3dac9819 .claude-plugin/marketplace.json
|
|
2
|
+
0e8ae6d856f52dea73d2c5daed96db2b9de75371a511728ac6370cbddc5ca8f1 .claude-plugin/plugin.json
|
|
3
3
|
187503e1455560d4ab5a72e3b8cd2f274abd4ccc5faa60dd66c37e44bb5f10c2 .codex-plugin/hooks.json
|
|
4
4
|
4edea851775bc3f0418f8d9cf6ead74f2767c3a9e3b8c05749eacb78ebb3b896 .codex-plugin/mcp.json
|
|
5
|
-
|
|
5
|
+
de8bbb1faaa128727745defca915a86182f18964375404db52c5d2f715538c2a .codex-plugin/plugin.json
|
|
6
6
|
1773e40a89384dd1af9023ba533da1908f3e2435dbaaa7cc941edf0514148313 claude-code/skills/ctx-doctor/SKILL.md
|
|
7
7
|
34fffb9c76d69c551f07036230bec0fbaca7a69177a5a47f89ddb9a9990a1fa2 claude-code/skills/ctx-stats/SKILL.md
|
|
8
8
|
d8f835d2f2b3eb70c5902f8707e7c5857977cec9e20ace76c499378a04e178e0 claude-code/skills/ctx-upgrade/SKILL.md
|
|
9
|
-
|
|
9
|
+
1f11df2de7600f24a37463bcd0c3ef177495e21e8969976f3f0777f44a1319b5 cli.mjs
|
|
10
10
|
83c297020ed0c592fc68c9c482546a6999d41df5d06d8a329498f10edb1bd38e codex/skills/ctx-doctor/SKILL.md
|
|
11
11
|
adc2c374f699d3698110920bb48411965de09fc6e7232ce59c913f6d58c0d738 codex/skills/ctx-stats/SKILL.md
|
|
12
12
|
5c12cdd19a5e3ed7d9ba3a47b24d03864a28d36cf7006876284ee07cd4221ec4 codex/skills/ctx-upgrade/SKILL.md
|
|
13
|
-
|
|
13
|
+
0919e54b31fd8b9145b08119625d9b5fd4525ebe9c7b33e7fe9271f5adc92ccc copilot/plugin.json
|
|
14
14
|
832bf0d31c37a448f3904bc41c7df071777aec2f8fce9d667f1fcf5b03a52a91 fixtures/hook-roundtrip.json
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
614539f4b5adfb0aeb486d2fb78f9b73df14a2f48f52d867e8098cd9140c1566 gemini-extension.json
|
|
16
|
+
8e63f34106d0c3423263aa4371415c8d164d7f30a0212a34918176efeecaf428 hook.mjs
|
|
17
17
|
1f8d8650d2b38737522cab6b875878e8baf84a74acf98cd924c7af22852d873f hooks/claude-code.json
|
|
18
18
|
2524a0eb52683b65c65943c5097db513e9845ba14e84324b39e9a8ea2bb43193 hooks/codex.json
|
|
19
19
|
b656fed2b754ebcfd4c156bee81d5879c21a8083fc0d6b8e3241462b63a214b6 hooks/copilot-cli.json
|
|
@@ -22,16 +22,16 @@ f336d1db67de49e641687bbd41ba1a9424e31dfe2377b2284bf44358288ebd8b hooks/kiro.jso
|
|
|
22
22
|
017c9cc3997dd53231b8548b1a1609fddc51177af53501565a4f334602039860 hooks/qwen.json
|
|
23
23
|
33f69267645338d0dc392ce551dcd7c69a0b508113469d6ea637d3f34239ef1d hooks/vscode.json
|
|
24
24
|
085630bccf2073ac9a62be24ef91dfc47d106092dc82c822db70890b7d3ae1c0 hooks/zcode.json
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
80fe2d99d3d4486d54d5ed158724f5fc18f0e887cf8feec3f74d325d9a7b241b opencode/plugin.js
|
|
26
|
+
64a1612c9507793c16b50b8c3a0198097a758dcde4e971abe7d9cacc61d71c1d package.json
|
|
27
|
+
14140fe9a47b388e6c8e2b2b10b27510ac04ef9b06b4cb02820343caac20cb2d pi/index.js
|
|
28
28
|
8712881622c9905aa4836af50d903042d34a91506264e459bc7839331f6f0192 pi/skills/ctx-doctor/SKILL.md
|
|
29
29
|
8d6e8e2a82eb079bddc60727f52d9f9a6e0bf9e15391357fed82ee76ab5fe76c pi/skills/ctx-stats/SKILL.md
|
|
30
30
|
db6f9c006bc864a7271f1eeffb1e316ebb537a3414f1c22f8b9de0a896e8e3c5 pi/skills/ctx-upgrade/SKILL.md
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
e8d391027ff68014f06fc8123eab0458085d9ebd1aef90e37be08a10a7887e85 qwen-extension.json
|
|
32
|
+
bc2bd344afb7f1003f7182f32b52e12af6bf5254a4bec6c0c6ef1ec2835cddbc run.mjs
|
|
33
|
+
bc2bd344afb7f1003f7182f32b52e12af6bf5254a4bec6c0c6ef1ec2835cddbc search.mjs
|
|
34
|
+
b8b8f2b4b816f515d70da6859512a3db4460dcee59f4ad3222ee52005a536809 server.mjs
|
|
35
35
|
e5503a22a6238901484d123efc11d2d933aa9a54c6ac2018812cfa65ec4e53e3 skills/ctx-doctor/SKILL.md
|
|
36
36
|
1044587a1906c69f2467c089a25e19819a290ea5728389bd1f086c6dfc0d0c51 skills/ctx-stats/SKILL.md
|
|
37
37
|
c1cac75b7506ee0d06089ce611ac6dc9314cf12435da318ce88ad50e2c5debbf skills/ctx-upgrade/SKILL.md
|
package/cli.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as __cmRequire}from"node:module";if(typeof process.getBuiltinModule!=="function")process.getBuiltinModule=(id)=>__cmRequire(import.meta.url)(id);
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -87,7 +88,7 @@ var require_src = __commonJS({
|
|
|
87
88
|
|
|
88
89
|
// src/entries/cli.ts
|
|
89
90
|
import { spawn as spawn2 } from "node:child_process";
|
|
90
|
-
import { readFileSync as readFileSync6, realpathSync as
|
|
91
|
+
import { readFileSync as readFileSync6, realpathSync as realpathSync6 } from "node:fs";
|
|
91
92
|
import path8 from "node:path";
|
|
92
93
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
93
94
|
|
|
@@ -255,6 +256,24 @@ var DENY_WHAT = Object.freeze({
|
|
|
255
256
|
webfetch: "WebFetch"
|
|
256
257
|
});
|
|
257
258
|
var DENY_WEBFETCH_TOOLS = Object.freeze(["ctx_index", "ctx_search"]);
|
|
259
|
+
var HOOK_FAIL_TOOL_KEYS = Object.freeze(["tool_name", "toolName", "tool"]);
|
|
260
|
+
var HOOK_FAIL_EVENT_KEYS = Object.freeze(["hook_event_name", "hookEventName", "type"]);
|
|
261
|
+
var HOOK_FAIL_INPUT_KEYS = Object.freeze(["tool_input", "toolArgs", "input", "args"]);
|
|
262
|
+
var HOOK_FAIL_CWD_KEYS = Object.freeze(["cwd", "directory"]);
|
|
263
|
+
var HOOK_FAIL_PRE_EVENTS = Object.freeze(["pretooluse", "beforetool", "tool_call", "execute.before", "tool.execute.before"]);
|
|
264
|
+
var HOOK_FAULT_STAGES = Object.freeze(["decode", "project", "policy", "store", "encode"]);
|
|
265
|
+
var HOOK_FAIL_TOOLS = Object.freeze({
|
|
266
|
+
shell: Object.freeze(["Bash", "bash", "shell"]),
|
|
267
|
+
read: Object.freeze(["Read", "read_file"]),
|
|
268
|
+
grep: Object.freeze(["Grep", "grep_search"]),
|
|
269
|
+
fetch: Object.freeze(["WebFetch", "web_fetch", "fetch"])
|
|
270
|
+
});
|
|
271
|
+
var HOOK_FAIL_REDIRECT = Object.freeze({
|
|
272
|
+
read: "Read the file in parts with offset and limit, or process it with ctx_execute(language, code); only what you print comes back.",
|
|
273
|
+
shell: "Run the command with ctx_execute(language, code) or ctx_batch instead; only the part that matches your intent comes back.",
|
|
274
|
+
grep: "Search with ctx_execute(language, code), or index the files with ctx_index and query them with ctx_search.",
|
|
275
|
+
fetch: "Index the URL with ctx_index and query it with ctx_search."
|
|
276
|
+
});
|
|
258
277
|
var BOUNDED_COMMANDS = Object.freeze(["pwd", "whoami", "uname", "id", "realpath", "ln"]);
|
|
259
278
|
var BOUNDED_GIT_SUBCOMMANDS = Object.freeze(["status"]);
|
|
260
279
|
var VERSION_PROBE_FLAGS = Object.freeze(["--version", "-v"]);
|
|
@@ -9129,6 +9148,18 @@ Run context-mode ${cmd} --help.`);
|
|
|
9129
9148
|
}
|
|
9130
9149
|
}
|
|
9131
9150
|
|
|
9151
|
+
// src/entries/is-entry.ts
|
|
9152
|
+
import { realpathSync as realpathSync5 } from "node:fs";
|
|
9153
|
+
function isEntry(main2, argv1, self) {
|
|
9154
|
+
if (main2 !== void 0) return main2;
|
|
9155
|
+
if (argv1 === void 0 || argv1 === "") return false;
|
|
9156
|
+
try {
|
|
9157
|
+
return realpathSync5(argv1) === realpathSync5(self);
|
|
9158
|
+
} catch {
|
|
9159
|
+
return false;
|
|
9160
|
+
}
|
|
9161
|
+
}
|
|
9162
|
+
|
|
9132
9163
|
// src/entries/cli.ts
|
|
9133
9164
|
var EXIT_OK2 = 0;
|
|
9134
9165
|
var EXIT_FAIL2 = 1;
|
|
@@ -9174,7 +9205,7 @@ function route(argv, version) {
|
|
|
9174
9205
|
` };
|
|
9175
9206
|
}
|
|
9176
9207
|
function main() {
|
|
9177
|
-
const dir = path8.dirname(
|
|
9208
|
+
const dir = path8.dirname(realpathSync6(fileURLToPath2(import.meta.url)));
|
|
9178
9209
|
let version = "";
|
|
9179
9210
|
try {
|
|
9180
9211
|
version = String(JSON.parse(readFileSync6(path8.join(dir, PACKAGE_FILE), "utf8")).version);
|
|
@@ -9213,7 +9244,7 @@ function main() {
|
|
|
9213
9244
|
process.exitCode = signal === "SIGINT" ? EXIT_SIGINT2 : code ?? EXIT_FAIL2;
|
|
9214
9245
|
});
|
|
9215
9246
|
}
|
|
9216
|
-
if (import.meta.main) main();
|
|
9247
|
+
if (isEntry(import.meta.main, process.argv[1], fileURLToPath2(import.meta.url))) main();
|
|
9217
9248
|
export {
|
|
9218
9249
|
HELP2 as HELP,
|
|
9219
9250
|
V1_PLATFORM_AGENT,
|
package/copilot/plugin.json
CHANGED
package/gemini-extension.json
CHANGED