context-mode 1.0.113 → 1.0.114
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/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/build/cli.js +66 -0
- package/cli.bundle.mjs +123 -123
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -1
- package/scripts/heal-installed-plugins.mjs +129 -0
- package/scripts/postinstall.mjs +58 -0
- package/start.mjs +26 -0
|
@@ -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.114"
|
|
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.114",
|
|
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.114",
|
|
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.114",
|
|
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.114",
|
|
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/cli.js
CHANGED
|
@@ -679,9 +679,75 @@ async function upgrade() {
|
|
|
679
679
|
};
|
|
680
680
|
writeFileSync(resolve(pluginRoot, ".mcp.json"), JSON.stringify(mcpConfig, null, 2) + "\n");
|
|
681
681
|
s.stop(color.green(`Updated in-place to v${newVersion}`));
|
|
682
|
+
// v1.0.114 hotfix — pre-flight: verify the in-place copy actually
|
|
683
|
+
// wrote a plugin.json carrying newVersion BEFORE we tell the
|
|
684
|
+
// registry that's the install path. If the manifest still reports
|
|
685
|
+
// the old version (rsync race, partial write, files-array drift),
|
|
686
|
+
// updating the registry would create the silent v1.0.113-class
|
|
687
|
+
// drift Mert hit. Bail out — the next /ctx-upgrade gets to retry.
|
|
688
|
+
const pluginManifest = resolve(pluginRoot, ".claude-plugin", "plugin.json");
|
|
689
|
+
let onDiskVersion = null;
|
|
690
|
+
try {
|
|
691
|
+
const pj = JSON.parse(readFileSync(pluginManifest, "utf-8"));
|
|
692
|
+
if (pj && typeof pj.version === "string")
|
|
693
|
+
onDiskVersion = pj.version;
|
|
694
|
+
}
|
|
695
|
+
catch { /* parse error → onDiskVersion stays null */ }
|
|
696
|
+
if (onDiskVersion !== newVersion) {
|
|
697
|
+
throw new Error(`pluginRoot manifest version mismatch — disk says "${onDiskVersion ?? "<missing>"}" but newVersion is "${newVersion}". Refusing to bump registry.`);
|
|
698
|
+
}
|
|
682
699
|
// Fix registry — adapter-aware
|
|
683
700
|
adapter.updatePluginRegistry(pluginRoot, newVersion);
|
|
684
701
|
p.log.info(color.dim(" Registry synced to " + pluginRoot));
|
|
702
|
+
// v1.0.114 hotfix — post-write assertion: re-read installed_plugins.json
|
|
703
|
+
// and verify installPath/.claude-plugin/plugin.json's version matches
|
|
704
|
+
// the registry entry. Throws on mismatch — fails loudly so a future
|
|
705
|
+
// adapter regression surfaces here, not weeks later in user reports.
|
|
706
|
+
try {
|
|
707
|
+
const ipPath = resolve(resolveClaudeConfigDir(), "plugins", "installed_plugins.json");
|
|
708
|
+
if (existsSync(ipPath)) {
|
|
709
|
+
const ip = JSON.parse(readFileSync(ipPath, "utf-8"));
|
|
710
|
+
const entries = ip?.plugins?.["context-mode@context-mode"];
|
|
711
|
+
if (Array.isArray(entries)) {
|
|
712
|
+
for (const entry of entries) {
|
|
713
|
+
const ip2 = entry?.installPath;
|
|
714
|
+
if (typeof ip2 !== "string" || !ip2)
|
|
715
|
+
continue;
|
|
716
|
+
if (!existsSync(ip2)) {
|
|
717
|
+
throw new Error(`installPath does not exist on disk: ${ip2}`);
|
|
718
|
+
}
|
|
719
|
+
const pjPath = resolve(ip2, ".claude-plugin", "plugin.json");
|
|
720
|
+
if (!existsSync(pjPath)) {
|
|
721
|
+
throw new Error(`missing plugin.json manifest at ${pjPath}`);
|
|
722
|
+
}
|
|
723
|
+
const pj = JSON.parse(readFileSync(pjPath, "utf-8"));
|
|
724
|
+
if (pj?.version !== entry.version) {
|
|
725
|
+
throw new Error(`version mismatch — registry says "${entry.version}" but ${pjPath} says "${pj?.version}"`);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
catch (err) {
|
|
732
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
733
|
+
throw new Error(`Registry consistency check failed: ${message}`);
|
|
734
|
+
}
|
|
735
|
+
// v1.0.114 hotfix — marketplace post-pull assertion: clone (if
|
|
736
|
+
// present) MUST be on newVersion. Mert's case showed marketplace
|
|
737
|
+
// stuck at v1.0.89 — the sync block above swallowed that silently.
|
|
738
|
+
// Warn (don't throw) — npm-only users have no marketplace clone.
|
|
739
|
+
try {
|
|
740
|
+
const marketplaceManifest = resolve(marketplaceDir, ".claude-plugin", "plugin.json");
|
|
741
|
+
if (existsSync(marketplaceManifest)) {
|
|
742
|
+
const mpj = JSON.parse(readFileSync(marketplaceManifest, "utf-8"));
|
|
743
|
+
if (mpj?.version !== newVersion) {
|
|
744
|
+
p.log.warn(color.yellow("Marketplace clone version mismatch") +
|
|
745
|
+
` — ${marketplaceDir} reports "${mpj?.version}" but expected "${newVersion}"`);
|
|
746
|
+
p.log.info(color.dim(` Run manually: git -C "${marketplaceDir}" fetch --tags origin && git -C "${marketplaceDir}" reset --hard origin/HEAD`));
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
catch { /* best effort */ }
|
|
685
751
|
// Install production deps
|
|
686
752
|
s.start("Installing production dependencies");
|
|
687
753
|
npmExecFile(["install", "--production", "--no-audit", "--no-fund"], {
|