context-mode 1.0.86 → 1.0.87

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.
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Claude Code plugins by Mert Koseoğlu",
9
- "version": "1.0.86"
9
+ "version": "1.0.87"
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.86",
16
+ "version": "1.0.87",
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.86",
3
+ "version": "1.0.87",
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.86",
6
+ "version": "1.0.87",
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.86",
3
+ "version": "1.0.87",
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/README.md CHANGED
@@ -72,7 +72,7 @@ Restart Claude Code (or run `/reload-plugins`).
72
72
 
73
73
  All checks should show `[x]`. The doctor validates runtimes, hooks, FTS5, and plugin registration.
74
74
 
75
- **Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no file is written to your project. The plugin registers all hooks (PreToolUse, PostToolUse, PreCompact, SessionStart) and 6 sandbox tools (`ctx_batch_execute`, `ctx_execute`, `ctx_execute_file`, `ctx_index`, `ctx_search`, `ctx_fetch_and_index`).
75
+ **Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no file is written to your project. The plugin registers all hooks (PreToolUse, PostToolUse, PreCompact, SessionStart) and 6 sandbox tools (`ctx_batch_execute`, `ctx_execute`, `ctx_execute_file`, `ctx_index`, `ctx_search`, `ctx_fetch_and_index`) plus meta-tools (`ctx_stats`, `ctx_doctor`, `ctx_upgrade`, `ctx_purge`, `ctx_insight`).
76
76
 
77
77
  | Slash Command | What it does |
78
78
  |---|---|
@@ -80,8 +80,9 @@ All checks should show `[x]`. The doctor validates runtimes, hooks, FTS5, and pl
80
80
  | `/context-mode:ctx-doctor` | Diagnostics — runtimes, hooks, FTS5, plugin registration, versions. |
81
81
  | `/context-mode:ctx-upgrade` | Pull latest, rebuild, migrate cache, fix hooks. |
82
82
  | `/context-mode:ctx-purge` | Permanently delete all indexed content from the knowledge base. |
83
+ | `/context-mode:ctx-insight` | Personal analytics dashboard — 15+ metrics on tool usage, session activity, error rate, parallel work patterns, and mastery curve. Opens a local web UI. |
83
84
 
84
- > **Note:** Slash commands are a Claude Code plugin feature. On other platforms, type `ctx stats`, `ctx doctor`, or `ctx upgrade` in the chat — the model calls the MCP tool automatically. See [Utility Commands](#utility-commands).
85
+ > **Note:** Slash commands are a Claude Code plugin feature. On other platforms, type `ctx stats`, `ctx doctor`, `ctx upgrade`, or `ctx insight` in the chat — the model calls the MCP tool automatically. See [Utility Commands](#utility-commands).
85
86
 
86
87
  <details>
87
88
  <summary>Alternative — MCP-only install (no hooks or slash commands)</summary>
@@ -950,6 +951,7 @@ ctx stats → context savings, call counts, session report
950
951
  ctx doctor → diagnose runtimes, hooks, FTS5, versions
951
952
  ctx upgrade → update from GitHub, rebuild, reconfigure hooks
952
953
  ctx purge → permanently delete all indexed content from the knowledge base
954
+ ctx insight → personal analytics dashboard (opens local web UI)
953
955
  ```
954
956
 
955
957
  **From your terminal** — run directly without an AI session:
@@ -957,12 +959,13 @@ ctx purge → permanently delete all indexed content from the knowledge ba
957
959
  ```bash
958
960
  context-mode doctor
959
961
  context-mode upgrade
962
+ context-mode insight # opens analytics dashboard in browser
960
963
  bash scripts/ctx-debug.sh # full diagnostic report for bug reports
961
964
  ```
962
965
 
963
966
  The debug script collects OS info, runtime versions, better-sqlite3 status, adapter detection, config files (redacted), hook validation, FTS5/SQLite test, executor test, process check, session databases, and environment variables into a single pasteable markdown report.
964
967
 
965
- Works on **all platforms**. On Claude Code, slash commands (`/ctx-stats`, `/ctx-doctor`, `/ctx-upgrade`, `/ctx-purge`) are also available.
968
+ Works on **all platforms**. On Claude Code, slash commands (`/ctx-stats`, `/ctx-doctor`, `/ctx-upgrade`, `/ctx-purge`, `/ctx-insight`) are also available.
966
969
 
967
970
  ## Benchmarks
968
971
 
package/build/server.js CHANGED
@@ -1866,7 +1866,9 @@ server.registerTool("ctx_insight", {
1866
1866
  }),
1867
1867
  }, async ({ port: userPort }) => {
1868
1868
  const port = userPort || 4747;
1869
- const insightSource = resolve(__pkg_dir, "insight");
1869
+ // __pkg_dir is build/ for tsc, plugin root for bundle — resolve to plugin root
1870
+ const pluginRoot = existsSync(resolve(__pkg_dir, "package.json")) ? __pkg_dir : dirname(__pkg_dir);
1871
+ const insightSource = resolve(pluginRoot, "insight");
1870
1872
  // Use adapter-aware path: derive from sessions dir (works across all 12 adapters)
1871
1873
  const sessDir = getSessionDir();
1872
1874
  const cacheDir = join(dirname(sessDir), "insight-cache");