context-mode 2.0.0-next.6 → 2.0.0-next.7
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 +17 -17
- package/cli.mjs +72 -15
- package/copilot/plugin.json +1 -1
- package/gemini-extension.json +1 -1
- package/hook.mjs +81 -81
- package/opencode/plugin.js +73 -16
- package/package.json +1 -1
- package/pi/index.js +73 -16
- package/qwen-extension.json +1 -1
- package/run.mjs +72 -15
- package/search.mjs +72 -15
- package/server.mjs +73 -16
- package/skills/ctx-doctor/SKILL.md +1 -1
- package/skills/ctx-stats/SKILL.md +1 -1
- package/skills/ctx-upgrade/SKILL.md +1 -1
package/SHA256SUMS
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
7362028009067c6db76e755a639e87a1e3cfe4dfc8d913fcefd5169d55103080 .claude-plugin/marketplace.json
|
|
2
|
+
e5d35796110662348715d11a79e794fbbe9e61e62902cd76cd68486da635f1a3 .claude-plugin/plugin.json
|
|
3
3
|
187503e1455560d4ab5a72e3b8cd2f274abd4ccc5faa60dd66c37e44bb5f10c2 .codex-plugin/hooks.json
|
|
4
4
|
4edea851775bc3f0418f8d9cf6ead74f2767c3a9e3b8c05749eacb78ebb3b896 .codex-plugin/mcp.json
|
|
5
|
-
|
|
5
|
+
f96f490f057000cab1f5c56496c0fc3de446a637b6f954d6d853663e9b03197c .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
|
+
4716b2bc1bce3752f140f6b8f2b276f53b36960ac724eb7f03e1c93318fee4f1 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
|
+
83ba9e9cfc9ed07b404f2afd55f65c04a2716e428559c5264ceb97bdfcf3cdae copilot/plugin.json
|
|
14
14
|
832bf0d31c37a448f3904bc41c7df071777aec2f8fce9d667f1fcf5b03a52a91 fixtures/hook-roundtrip.json
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
d28e323da98711de50112f1e7a1242c22133cd3490e0109d6824732cfd494c4e gemini-extension.json
|
|
16
|
+
ccab1edf7d21b15976b3523acecca1f485f4b0822b265e27c7a0df821e097c1c 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
|
+
8dfb464afb21d1548e5c1368fac5fd8d43838a2d8111bc3ec82cac8a09c977e3 opencode/plugin.js
|
|
26
|
+
d38b8f717169353ff603f6b22ee66d25c01e1670a64583e28ccec3862f29e215 package.json
|
|
27
|
+
d8784f4a18e478f7176189d9c45ab28843e3dbfa7e4c50103c1f20036961e8d0 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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
6a8c387c281796e0f90309e730424e60191471ea0f26585dde7a4f22124c8ed4 qwen-extension.json
|
|
32
|
+
54f4ec9ac9cc26814e7e548b8bafb05bf2610eb0ed0bab2f1e9576e2c99a799d run.mjs
|
|
33
|
+
54f4ec9ac9cc26814e7e548b8bafb05bf2610eb0ed0bab2f1e9576e2c99a799d search.mjs
|
|
34
|
+
f8929b0cb819af7a2e6989efb34da39ff46a4e3a53702e717903442bdc8874b5 server.mjs
|
|
35
|
+
e5503a22a6238901484d123efc11d2d933aa9a54c6ac2018812cfa65ec4e53e3 skills/ctx-doctor/SKILL.md
|
|
36
|
+
1044587a1906c69f2467c089a25e19819a290ea5728389bd1f086c6dfc0d0c51 skills/ctx-stats/SKILL.md
|
|
37
|
+
c1cac75b7506ee0d06089ce611ac6dc9314cf12435da318ce88ad50e2c5debbf skills/ctx-upgrade/SKILL.md
|
package/cli.mjs
CHANGED
|
@@ -444,8 +444,10 @@ var JSON_INDENT_UNIT = " ";
|
|
|
444
444
|
var ZCODE_MCP_FEATURE_KEY = Object.freeze(["features", "mcp"]);
|
|
445
445
|
var CODEX_OMIT_TOOLS_FROM_FIELD = "omit_tools_from";
|
|
446
446
|
var CODEX_OMIT_DEFERRED = Object.freeze(["deferred"]);
|
|
447
|
+
var CODEX_APPROVAL_MODE_FIELD = "default_tools_approval_mode";
|
|
448
|
+
var CODEX_APPROVAL_APPROVE = "approve";
|
|
447
449
|
var OWN_MCP_ENTRY = Object.freeze({
|
|
448
|
-
codex: { file: [".codex", "config.toml"], key: ["mcp_servers", SERVER_KEY], fields: { [CODEX_OMIT_TOOLS_FROM_FIELD]: CODEX_OMIT_DEFERRED } },
|
|
450
|
+
codex: { file: [".codex", "config.toml"], key: ["mcp_servers", SERVER_KEY], fields: { [CODEX_OMIT_TOOLS_FROM_FIELD]: CODEX_OMIT_DEFERRED, [CODEX_APPROVAL_MODE_FIELD]: CODEX_APPROVAL_APPROVE } },
|
|
449
451
|
vscode: { file: [".vscode", "mcp.json"], key: ["servers", SERVER_KEY] },
|
|
450
452
|
kiro: { file: [".kiro", "settings", "mcp.json"], key: ["mcpServers", SERVER_KEY] },
|
|
451
453
|
zcode: {
|
|
@@ -832,9 +834,62 @@ function readResult4(resp) {
|
|
|
832
834
|
const isError = typeof resp === "object" && resp !== null && resp.is_error === true;
|
|
833
835
|
return { isError, bytes: Buffer.byteLength(text2), text: text2 };
|
|
834
836
|
}
|
|
837
|
+
var CAMEL_EVENTS = {
|
|
838
|
+
sessionStart: "SessionStart",
|
|
839
|
+
userPromptSubmitted: "UserPromptSubmit",
|
|
840
|
+
preToolUse: "PreToolUse",
|
|
841
|
+
postToolUse: "PostToolUse",
|
|
842
|
+
preCompact: "PreCompact"
|
|
843
|
+
};
|
|
844
|
+
var EVENT_BY_KEY2 = [
|
|
845
|
+
["toolResult", "postToolUse"],
|
|
846
|
+
["toolName", "preToolUse"],
|
|
847
|
+
["prompt", "userPromptSubmitted"],
|
|
848
|
+
["source", "sessionStart"],
|
|
849
|
+
["trigger", "preCompact"]
|
|
850
|
+
];
|
|
851
|
+
var SESSION_SOURCES = { new: "startup", startup: "startup", resume: "resume" };
|
|
852
|
+
var RESULT_SUCCESS2 = "success";
|
|
853
|
+
function isRecord2(v) {
|
|
854
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
855
|
+
}
|
|
856
|
+
function readArgs2(v) {
|
|
857
|
+
if (isRecord2(v)) return v;
|
|
858
|
+
if (typeof v !== "string") return {};
|
|
859
|
+
try {
|
|
860
|
+
const parsed = JSON.parse(v);
|
|
861
|
+
return isRecord2(parsed) ? parsed : {};
|
|
862
|
+
} catch {
|
|
863
|
+
return {};
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
function readCamelResult(v) {
|
|
867
|
+
const r2 = isRecord2(v) ? v : {};
|
|
868
|
+
const text2 = typeof r2.textResultForLlm === "string" ? r2.textResultForLlm : "";
|
|
869
|
+
return { isError: typeof r2.resultType === "string" && r2.resultType !== RESULT_SUCCESS2, bytes: Buffer.byteLength(text2), text: text2 };
|
|
870
|
+
}
|
|
871
|
+
function decodeCamel(p3, name) {
|
|
872
|
+
const event = typeof name === "string" ? CAMEL_EVENTS[name] ?? VSCODE_EVENTS.find((e) => e === name) : void 0;
|
|
873
|
+
if (event === void 0) throw new Error("vscode: unknown hook event " + String(name));
|
|
874
|
+
const ev = { event, agent: "vscode", sessionId: String(p3.sessionId ?? ""), cwd: String(p3.cwd ?? "") };
|
|
875
|
+
if (event === "SessionStart" && typeof p3.source === "string" && SESSION_SOURCES[p3.source] !== void 0) ev.source = SESSION_SOURCES[p3.source];
|
|
876
|
+
if (event === "UserPromptSubmit" && typeof p3.prompt === "string") ev.prompt = p3.prompt;
|
|
877
|
+
if (event === "PreToolUse" || event === "PostToolUse") {
|
|
878
|
+
const toolName = String(p3.toolName ?? "");
|
|
879
|
+
ev.tool = { name: toolName, canonicalName: canonicalName4(toolName), input: readArgs2(p3.toolArgs) };
|
|
880
|
+
}
|
|
881
|
+
if (event === "PostToolUse") ev.result = readCamelResult(p3.toolResult);
|
|
882
|
+
return ev;
|
|
883
|
+
}
|
|
835
884
|
function decode6(raw) {
|
|
836
885
|
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) throw new Error("vscode: hook payload is not a JSON object");
|
|
837
886
|
const p3 = raw;
|
|
887
|
+
if (p3.hookEventName !== void 0) return decodeCamel(p3, p3.hookEventName);
|
|
888
|
+
if (p3.hook_event_name === void 0) {
|
|
889
|
+
const byKey = EVENT_BY_KEY2.find(([key]) => Object.hasOwn(p3, key))?.[1];
|
|
890
|
+
if (byKey === void 0) throw new Error("vscode: missing required field hook_event_name");
|
|
891
|
+
return decodeCamel(p3, byKey);
|
|
892
|
+
}
|
|
838
893
|
const event = VSCODE_EVENTS.find((e) => e === p3.hook_event_name);
|
|
839
894
|
if (event === void 0) throw new Error("vscode: unknown hook event " + String(p3.hook_event_name));
|
|
840
895
|
const ev = { event, agent: "vscode", sessionId: String(p3.session_id ?? ""), cwd: String(p3.cwd ?? "") };
|
|
@@ -842,7 +897,7 @@ function decode6(raw) {
|
|
|
842
897
|
if (event === "UserPromptSubmit" && typeof p3.prompt === "string") ev.prompt = p3.prompt;
|
|
843
898
|
if (event === "PreToolUse" || event === "PostToolUse") {
|
|
844
899
|
const name = String(p3.tool_name ?? "");
|
|
845
|
-
const input =
|
|
900
|
+
const input = isRecord2(p3.tool_input) ? p3.tool_input : {};
|
|
846
901
|
ev.tool = { name, canonicalName: canonicalName4(name), input };
|
|
847
902
|
}
|
|
848
903
|
if (event === "PostToolUse") ev.result = readResult4(p3.tool_response);
|
|
@@ -861,12 +916,14 @@ var KIRO_EVENTS = {
|
|
|
861
916
|
PromptSubmit: "UserPromptSubmit",
|
|
862
917
|
userPromptSubmit: "UserPromptSubmit",
|
|
863
918
|
PreToolUse: "PreToolUse",
|
|
864
|
-
|
|
919
|
+
preToolUse: "PreToolUse",
|
|
920
|
+
PostToolUse: "PostToolUse",
|
|
921
|
+
postToolUse: "PostToolUse"
|
|
865
922
|
};
|
|
866
923
|
var PROMPT_ENV = "USER_PROMPT";
|
|
867
924
|
var MCP_PREFIX3 = "mcp_";
|
|
868
|
-
var
|
|
869
|
-
var NATIVE_TO_CANONICAL5 =
|
|
925
|
+
var SHELL_TOOL_NAMES = Object.freeze(["execute_bash", "execute_pwsh", "shell"]);
|
|
926
|
+
var NATIVE_TO_CANONICAL5 = Object.fromEntries(SHELL_TOOL_NAMES.map((n3) => [n3, "Bash"]));
|
|
870
927
|
var MCP_SEP3 = "_";
|
|
871
928
|
var KIRO_SOURCES = { startup: "startup", resume: "resume", clear: "clear", compact: "compact" };
|
|
872
929
|
function canonicalName5(name) {
|
|
@@ -1007,8 +1064,8 @@ var OPENCODE_EVENTS = {
|
|
|
1007
1064
|
compaction: "PreCompact",
|
|
1008
1065
|
"step-finish": "Usage"
|
|
1009
1066
|
};
|
|
1010
|
-
var
|
|
1011
|
-
var NATIVE_TO_CANONICAL7 = { webfetch: "WebFetch", [
|
|
1067
|
+
var SHELL_TOOL_NAME2 = "bash";
|
|
1068
|
+
var NATIVE_TO_CANONICAL7 = { webfetch: "WebFetch", [SHELL_TOOL_NAME2]: "Bash" };
|
|
1012
1069
|
function toCanonicalTool(name) {
|
|
1013
1070
|
if (name.startsWith(OWN_WIRE_PREFIX)) return name.slice(OWN_WIRE_PREFIX.length);
|
|
1014
1071
|
return Object.prototype.hasOwnProperty.call(NATIVE_TO_CANONICAL7, name) ? NATIVE_TO_CANONICAL7[name] : name;
|
|
@@ -1128,8 +1185,8 @@ var ADAPTERS = Object.freeze([
|
|
|
1128
1185
|
hookTimeoutMs: HOOK_TIMEOUT_MS,
|
|
1129
1186
|
denyChannel: "deny-reason",
|
|
1130
1187
|
hookChannel: { kind: "package", path: "hooks/qwen.json" },
|
|
1131
|
-
skillChannel: { kind: "
|
|
1132
|
-
// ADR-0020
|
|
1188
|
+
skillChannel: { kind: "package", path: "skills" },
|
|
1189
|
+
// ADR-0020, D-HQ-SKILLS-3: qwen loads <extension>/skills, shared with gemini
|
|
1133
1190
|
decode: decode4,
|
|
1134
1191
|
encode: encode4
|
|
1135
1192
|
},
|
|
@@ -1165,8 +1222,8 @@ var ADAPTERS = Object.freeze([
|
|
|
1165
1222
|
hookTimeoutMs: HOOK_TIMEOUT_MS,
|
|
1166
1223
|
denyChannel: "deny-reason",
|
|
1167
1224
|
hookChannel: { kind: "home-file", path: ".copilot/hooks/context-mode-vscode.json" },
|
|
1168
|
-
skillChannel: { kind: "home-dir", path: ".
|
|
1169
|
-
// ADR-0020
|
|
1225
|
+
skillChannel: { kind: "home-dir", path: ".agents/skills" },
|
|
1226
|
+
// ADR-0020, D-HQ-COPILOT-NAMES-3: Copilot CLI owns ~/.copilot/skills
|
|
1170
1227
|
decode: decode6,
|
|
1171
1228
|
encode: encode6
|
|
1172
1229
|
},
|
|
@@ -1175,9 +1232,9 @@ var ADAPTERS = Object.freeze([
|
|
|
1175
1232
|
installMode: "mcp-entry",
|
|
1176
1233
|
projectSource: "arg:--agent+cwd",
|
|
1177
1234
|
toolNamePrefix: TOOL_NAME_PREFIX7,
|
|
1178
|
-
nativeTools: { shell: [
|
|
1235
|
+
nativeTools: { shell: [...SHELL_TOOL_NAMES] },
|
|
1179
1236
|
execReadOnlyHint: false,
|
|
1180
|
-
// D-HF-KIRO-SHELL-1
|
|
1237
|
+
// D-HF-KIRO-SHELL-1, D-N7-KIRO-1
|
|
1181
1238
|
eventMap: { SessionStart: "SessionStart", UserPromptSubmit: "UserPromptSubmit", PreToolUse: "PreToolUse", PostToolUse: "PostToolUse" },
|
|
1182
1239
|
compactDelivery: "none",
|
|
1183
1240
|
compactSummary: "none",
|
|
@@ -1190,7 +1247,7 @@ var ADAPTERS = Object.freeze([
|
|
|
1190
1247
|
encode: encode7
|
|
1191
1248
|
},
|
|
1192
1249
|
{
|
|
1193
|
-
// toolNamePrefix
|
|
1250
|
+
// toolNamePrefix is the documented ZCode name mcp__<server>__<tool> (D-N7-ZCODE-NAMES-1); nativeTools are Claude names.
|
|
1194
1251
|
id: "zcode",
|
|
1195
1252
|
installMode: "hooks+mcp",
|
|
1196
1253
|
projectSource: "spawn-cwd",
|
|
@@ -1232,7 +1289,7 @@ var ADAPTERS = Object.freeze([
|
|
|
1232
1289
|
installMode: "in-process",
|
|
1233
1290
|
projectSource: "spawn-cwd",
|
|
1234
1291
|
toolNamePrefix: TOOL_NAME_PREFIX10,
|
|
1235
|
-
nativeTools: { shell: [
|
|
1292
|
+
nativeTools: { shell: [SHELL_TOOL_NAME2] },
|
|
1236
1293
|
execReadOnlyHint: false,
|
|
1237
1294
|
// D-HF-OPENCODE-SHELL-1
|
|
1238
1295
|
// Usage: step-finish cost row (DEVIATIONS D-M5-arch-2).
|
package/copilot/plugin.json
CHANGED
package/gemini-extension.json
CHANGED