context-mode 1.0.82 → 1.0.84
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 +1 -1
- package/cli.bundle.mjs +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/ctx-insight/SKILL.md +29 -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.84"
|
|
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.84",
|
|
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.84",
|
|
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.84",
|
|
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.84",
|
|
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
|
@@ -462,7 +462,7 @@ async function upgrade() {
|
|
|
462
462
|
// Old version dirs are cleaned lazily by sessionstart.mjs (age-gated >1h)
|
|
463
463
|
// to avoid breaking active sessions that still reference them (#181).
|
|
464
464
|
const items = [
|
|
465
|
-
"build", "src", "hooks", "skills", "scripts", ".claude-plugin",
|
|
465
|
+
"build", "src", "hooks", "skills", "scripts", "insight", ".claude-plugin",
|
|
466
466
|
"start.mjs", "server.bundle.mjs", "cli.bundle.mjs", "package.json",
|
|
467
467
|
];
|
|
468
468
|
for (const item of items) {
|
package/cli.bundle.mjs
CHANGED
|
@@ -582,7 +582,7 @@ ${Se("gray",d+ig.repeat(c+2)+Ew)}
|
|
|
582
582
|
Run: /context-mode:ctx-upgrade`)):I.info(`${e.name}: v${p}`+E.default.dim(" \u2014 could not verify against npm registry")),r>0?($i(E.default.red(`Diagnostics failed \u2014 ${r} critical issue(s) found`)),1):($i(s.length>=4?E.default.green("Diagnostics complete!"):E.default.yellow("Some checks need attention \u2014 see above for details")),0)}async function Qj(t){let{execSync:e,spawn:r}=await import("node:child_process"),{statSync:n,mkdirSync:o,cpSync:s}=await import("node:fs"),i=Ne(__dirname,"insight"),a=vr(Qc(),".claude","context-mode","insight-cache");Un(vr(i,"server.mjs"))||(console.error("Error: Insight source not found. Try upgrading context-mode."),process.exit(1)),o(a,{recursive:!0});let c=n(vr(i,"server.mjs")).mtimeMs,u=Un(vr(a,"server.mjs"))?n(vr(a,"server.mjs")).mtimeMs:0;c>u&&(console.log("Copying Insight source..."),s(i,a,{recursive:!0,force:!0})),Un(vr(a,"node_modules"))||(console.log("Installing dependencies (first run)..."),e("npm install --production=false",{cwd:a,stdio:"inherit",timeout:12e4})),console.log("Building dashboard..."),e("npx vite build",{cwd:a,stdio:"pipe",timeout:3e4});let l=`http://localhost:${t}`;console.log(`
|
|
583
583
|
context-mode Insight
|
|
584
584
|
${l}
|
|
585
|
-
`);let d=r("node",[vr(a,"server.mjs")],{cwd:a,env:{...process.env,PORT:String(t)},stdio:"inherit"}),m=process.platform;try{m==="darwin"?e(`open "${l}"`,{stdio:"pipe"}):m==="win32"?e(`start "" "${l}"`,{stdio:"pipe"}):e(`xdg-open "${l}" 2>/dev/null || sensible-browser "${l}" 2>/dev/null`,{stdio:"pipe"})}catch{}process.on("SIGINT",()=>{d.kill(),process.exit(0)}),process.on("SIGTERM",()=>{d.kill(),process.exit(0)})}async function eM(){process.stdout.isTTY&&console.clear();let t=Xn(),e=await Li(t.platform);pu(E.default.bgCyan(E.default.black(" context-mode upgrade "))),I.info(`Platform: ${E.default.cyan(e.name)}`+E.default.dim(` (${t.confidence} confidence)`));let r=eu(),n=[],o=fu();I.step("Pulling latest from GitHub...");let s=Vk(),i=vr(Hj(),`context-mode-upgrade-${Date.now()}`);o.start("Cloning mksglu/context-mode");try{Zn("git",["clone","--depth","1","https://github.com/mksglu/context-mode.git",i],{stdio:"pipe",timeout:3e4}),o.stop("Downloaded");let d=i,f=JSON.parse(Hh(Ne(d,"package.json"),"utf-8")).version??"unknown";if(f===s){I.success(E.default.green("Already on latest")+` \u2014 v${s}`),Xc(i,{recursive:!0,force:!0});return}else I.info(`Update available: ${E.default.yellow("v"+s)} \u2192 ${E.default.green("v"+f)}`);o.start("Installing dependencies & building"),Zn("npm",["install","--no-audit","--no-fund"],{cwd:d,stdio:"pipe",timeout:12e4}),Zn("npm",["run","build"],{cwd:d,stdio:"pipe",timeout:6e4}),o.stop("Built successfully"),o.start("Updating files in-place");let p=["build","src","hooks","skills","scripts",".claude-plugin","start.mjs","server.bundle.mjs","cli.bundle.mjs","package.json"];for(let g of p)try{Xc(Ne(r,g),{recursive:!0,force:!0}),Hk(Ne(d,g),Ne(r,g),{recursive:!0})}catch{}let h={mcpServers:{"context-mode":{command:"node",args:[Ne(r,"start.mjs")]}}};if(Mj(Ne(r,".mcp.json"),JSON.stringify(h,null,2)+`
|
|
585
|
+
`);let d=r("node",[vr(a,"server.mjs")],{cwd:a,env:{...process.env,PORT:String(t)},stdio:"inherit"}),m=process.platform;try{m==="darwin"?e(`open "${l}"`,{stdio:"pipe"}):m==="win32"?e(`start "" "${l}"`,{stdio:"pipe"}):e(`xdg-open "${l}" 2>/dev/null || sensible-browser "${l}" 2>/dev/null`,{stdio:"pipe"})}catch{}process.on("SIGINT",()=>{d.kill(),process.exit(0)}),process.on("SIGTERM",()=>{d.kill(),process.exit(0)})}async function eM(){process.stdout.isTTY&&console.clear();let t=Xn(),e=await Li(t.platform);pu(E.default.bgCyan(E.default.black(" context-mode upgrade "))),I.info(`Platform: ${E.default.cyan(e.name)}`+E.default.dim(` (${t.confidence} confidence)`));let r=eu(),n=[],o=fu();I.step("Pulling latest from GitHub...");let s=Vk(),i=vr(Hj(),`context-mode-upgrade-${Date.now()}`);o.start("Cloning mksglu/context-mode");try{Zn("git",["clone","--depth","1","https://github.com/mksglu/context-mode.git",i],{stdio:"pipe",timeout:3e4}),o.stop("Downloaded");let d=i,f=JSON.parse(Hh(Ne(d,"package.json"),"utf-8")).version??"unknown";if(f===s){I.success(E.default.green("Already on latest")+` \u2014 v${s}`),Xc(i,{recursive:!0,force:!0});return}else I.info(`Update available: ${E.default.yellow("v"+s)} \u2192 ${E.default.green("v"+f)}`);o.start("Installing dependencies & building"),Zn("npm",["install","--no-audit","--no-fund"],{cwd:d,stdio:"pipe",timeout:12e4}),Zn("npm",["run","build"],{cwd:d,stdio:"pipe",timeout:6e4}),o.stop("Built successfully"),o.start("Updating files in-place");let p=["build","src","hooks","skills","scripts","insight",".claude-plugin","start.mjs","server.bundle.mjs","cli.bundle.mjs","package.json"];for(let g of p)try{Xc(Ne(r,g),{recursive:!0,force:!0}),Hk(Ne(d,g),Ne(r,g),{recursive:!0})}catch{}let h={mcpServers:{"context-mode":{command:"node",args:[Ne(r,"start.mjs")]}}};if(Mj(Ne(r,".mcp.json"),JSON.stringify(h,null,2)+`
|
|
586
586
|
`),o.stop(E.default.green(`Updated in-place to v${f}`)),e.updatePluginRegistry(r,f),I.info(E.default.dim(" Registry synced to "+r)),o.start("Installing production dependencies"),Zn("npm",["install","--production","--no-audit","--no-fund"],{cwd:r,stdio:"pipe",timeout:6e4}),o.stop("Dependencies ready"),t.platform!=="opencode"&&t.platform!=="kilo"){o.start("Rebuilding native addons");try{Zn("npm",["rebuild","better-sqlite3"],{cwd:r,stdio:"pipe",timeout:6e4}),o.stop(E.default.green("Native addons rebuilt")),n.push("Rebuilt better-sqlite3 for current Node.js")}catch(g){let _=g instanceof Error?g.message:String(g);o.stop(E.default.yellow("Native addon rebuild warning")),I.warn(E.default.yellow("better-sqlite3 rebuild issue")+` \u2014 ${_}`+E.default.dim(`
|
|
587
587
|
Try manually: cd "${r}" && npm rebuild better-sqlite3`))}}o.start("Updating npm global package");try{Zn("npm",["install","-g",r,"--no-audit","--no-fund"],{stdio:"pipe",timeout:3e4}),o.stop(E.default.green("npm global updated")),n.push("Updated npm global package")}catch{o.stop(E.default.yellow("npm global update skipped")),I.info(E.default.dim(" Could not update global npm \u2014 may need sudo or standalone install"))}Xc(i,{recursive:!0,force:!0});try{let g=Ne(Qc(),".claude","plugins","installed_plugins.json");if(Un(g)){let y=JSON.parse(Hh(g,"utf-8"))?.plugins?.["context-mode@context-mode"];if(Array.isArray(y))for(let x of y){let w=x.installPath;if(w&&w!==r&&Un(w)){let T=Ne(d,"skills");Un(T)&&(Hk(T,Ne(w,"skills"),{recursive:!0}),n.push("Synced skills to active install path"))}}}}catch{}n.push(f!==s?`Updated v${s} \u2192 v${f}`:`Reinstalled v${s} from GitHub`),I.success(E.default.green("Plugin reinstalled from GitHub!")+E.default.dim(` \u2014 v${f}`))}catch(d){let m=d instanceof Error?d.message:String(d);o.stop(E.default.red("Update failed")),I.error(E.default.red("GitHub pull failed")+` \u2014 ${m}`),I.info(E.default.dim("Continuing with hooks/settings fix..."));try{Xc(i,{recursive:!0,force:!0})}catch{}}I.step(`Backing up ${e.name} settings...`);let a=e.backupSettings();a?.endsWith(".bak")?(I.success(E.default.green("Backup created")+E.default.dim(" -> "+a)),n.push("Backed up settings")):a?I.success(E.default.green("Backup skipped")+E.default.dim(" \u2014 no changes needed")):I.warn(E.default.yellow("No existing settings to backup")+" \u2014 a new one will be created"),I.step(`Configuring ${e.name} hooks...`);let c=e.configureAllHooks(r);for(let d of c)I.info(E.default.dim(` ${d}`)),n.push(d);I.success(E.default.green("Hooks configured")+E.default.dim(` \u2014 ${e.name}`)),I.step("Setting hook script permissions...");let u=e.setHookPermissions(r);if(process.platform!=="win32")for(let d of["build/cli.js","cli.bundle.mjs"]){let m=Ne(r,d);try{qk(m,Bk.F_OK),Fj(m,493),u.push(m)}catch{}}u.length>0?(I.success(E.default.green("Permissions set")+E.default.dim(` \u2014 ${u.length} hook script(s)`)),n.push(`Set ${u.length} hook scripts as executable`)):I.error(E.default.red("No hook scripts found")+E.default.dim(" \u2014 expected in "+Ne(r,"hooks"))),n.length>0?mu(n.map(d=>E.default.green(" + ")+d).join(`
|
|
588
588
|
`),"Changes Applied"):I.info(E.default.dim("No changes were needed."));let l=e.name==="Claude Code"?"/reload-plugins, new terminal, or restart session":"new terminal or restart session";I.warn(E.default.yellow("Restart for new MCP tools to take effect.")+E.default.dim(` (${l})`)),I.step("Running doctor to verify..."),console.log();try{let d=Ne(r,"cli.bundle.mjs"),m=Ne(r,"build","cli.js"),f=Un(d)?d:m;Zn("node",[f,"doctor"],{stdio:"inherit",timeout:3e4,cwd:r})}catch{I.warn(E.default.yellow("Doctor had warnings")+E.default.dim(` \u2014 restart your ${e.name} session to pick up the new version`))}}export{x9 as toUnixPath};
|
package/openclaw.plugin.json
CHANGED
|
@@ -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.84",
|
|
7
7
|
"sandbox": {
|
|
8
8
|
"mode": "permissive",
|
|
9
9
|
"filesystem_access": "full",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-mode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.84",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP plugin that saves 98% of your context window. Works with Claude Code, Gemini CLI, VS Code Copilot, OpenCode, and Codex CLI. Sandboxed code execution, FTS5 knowledge base, and intent-driven search.",
|
|
6
6
|
"author": "Mert Koseoğlu",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ctx-insight
|
|
3
|
+
description: |
|
|
4
|
+
Open the context-mode Insight analytics dashboard in the browser.
|
|
5
|
+
Shows personal metrics: session activity, tool usage, error rate,
|
|
6
|
+
parallel work patterns, project focus, and actionable insights.
|
|
7
|
+
First run installs dependencies (~30s). Subsequent runs open instantly.
|
|
8
|
+
Trigger: /context-mode:ctx-insight
|
|
9
|
+
user-invocable: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Context Mode Insight
|
|
13
|
+
|
|
14
|
+
Open the personal analytics dashboard in the browser.
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
1. Call the `ctx_insight` MCP tool (no parameters needed, or pass `port: 4747` to customize).
|
|
19
|
+
2. The tool will:
|
|
20
|
+
- Copy source files to cache (first run only)
|
|
21
|
+
- Install dependencies (first run only, ~30s)
|
|
22
|
+
- Build the dashboard (~1s)
|
|
23
|
+
- Start a local server
|
|
24
|
+
- Open the browser
|
|
25
|
+
3. Display the tool's output to the user — it contains progress steps and the dashboard URL.
|
|
26
|
+
4. Tell the user:
|
|
27
|
+
- "Dashboard is running at http://localhost:4747"
|
|
28
|
+
- "Refresh the page to see updated metrics"
|
|
29
|
+
- "To stop: kill the PID shown above, or close the terminal"
|