context-mode 0.9.22 → 1.0.0

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.
Files changed (100) hide show
  1. package/.claude-plugin/hooks/hooks.json +46 -4
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/.claude-plugin/plugin.json +4 -4
  4. package/README.md +370 -185
  5. package/build/adapters/claude-code/config.d.ts +8 -0
  6. package/build/adapters/claude-code/config.js +8 -0
  7. package/build/adapters/claude-code/hooks.d.ts +53 -0
  8. package/build/adapters/claude-code/hooks.js +88 -0
  9. package/build/adapters/claude-code/index.d.ts +50 -0
  10. package/build/adapters/claude-code/index.js +523 -0
  11. package/build/adapters/codex/config.d.ts +8 -0
  12. package/build/adapters/codex/config.js +8 -0
  13. package/build/adapters/codex/hooks.d.ts +21 -0
  14. package/build/adapters/codex/hooks.js +27 -0
  15. package/build/adapters/codex/index.d.ts +44 -0
  16. package/build/adapters/codex/index.js +223 -0
  17. package/build/adapters/detect.d.ts +26 -0
  18. package/build/adapters/detect.js +131 -0
  19. package/build/adapters/gemini-cli/config.d.ts +8 -0
  20. package/build/adapters/gemini-cli/config.js +8 -0
  21. package/build/adapters/gemini-cli/hooks.d.ts +44 -0
  22. package/build/adapters/gemini-cli/hooks.js +64 -0
  23. package/build/adapters/gemini-cli/index.d.ts +57 -0
  24. package/build/adapters/gemini-cli/index.js +468 -0
  25. package/build/adapters/opencode/config.d.ts +8 -0
  26. package/build/adapters/opencode/config.js +8 -0
  27. package/build/adapters/opencode/hooks.d.ts +38 -0
  28. package/build/adapters/opencode/hooks.js +50 -0
  29. package/build/adapters/opencode/index.d.ts +52 -0
  30. package/build/adapters/opencode/index.js +386 -0
  31. package/build/adapters/types.d.ts +218 -0
  32. package/build/adapters/types.js +13 -0
  33. package/build/adapters/vscode-copilot/config.d.ts +8 -0
  34. package/build/adapters/vscode-copilot/config.js +8 -0
  35. package/build/adapters/vscode-copilot/hooks.d.ts +49 -0
  36. package/build/adapters/vscode-copilot/hooks.js +76 -0
  37. package/build/adapters/vscode-copilot/index.d.ts +58 -0
  38. package/build/adapters/vscode-copilot/index.js +512 -0
  39. package/build/cli.d.ts +7 -5
  40. package/build/cli.js +127 -421
  41. package/build/db-base.d.ts +84 -0
  42. package/build/db-base.js +128 -0
  43. package/build/executor.d.ts +6 -7
  44. package/build/executor.js +111 -51
  45. package/build/opencode-plugin.d.ts +37 -0
  46. package/build/opencode-plugin.js +118 -0
  47. package/build/runtime.js +1 -1
  48. package/build/server.js +436 -117
  49. package/build/session/db.d.ts +110 -0
  50. package/build/session/db.js +285 -0
  51. package/build/session/extract.d.ts +51 -0
  52. package/build/session/extract.js +407 -0
  53. package/build/session/snapshot.d.ts +70 -0
  54. package/build/session/snapshot.js +309 -0
  55. package/build/store.d.ts +4 -22
  56. package/build/store.js +67 -55
  57. package/build/truncate.d.ts +59 -0
  58. package/build/truncate.js +157 -0
  59. package/build/types.d.ts +101 -0
  60. package/build/types.js +20 -0
  61. package/configs/claude-code/CLAUDE.md +62 -0
  62. package/configs/codex/AGENTS.md +58 -0
  63. package/configs/codex/config.toml +5 -0
  64. package/configs/gemini-cli/GEMINI.md +58 -0
  65. package/configs/gemini-cli/mcp.json +7 -0
  66. package/configs/gemini-cli/settings.json +49 -0
  67. package/configs/opencode/AGENTS.md +58 -0
  68. package/configs/opencode/opencode.json +10 -0
  69. package/configs/vscode-copilot/copilot-instructions.md +58 -0
  70. package/configs/vscode-copilot/hooks.json +16 -0
  71. package/configs/vscode-copilot/mcp.json +8 -0
  72. package/hooks/core/formatters.mjs +86 -0
  73. package/hooks/core/routing.mjs +262 -0
  74. package/hooks/core/stdin.mjs +19 -0
  75. package/hooks/formatters/claude-code.mjs +57 -0
  76. package/hooks/formatters/gemini-cli.mjs +55 -0
  77. package/hooks/formatters/vscode-copilot.mjs +55 -0
  78. package/hooks/gemini-cli/aftertool.mjs +58 -0
  79. package/hooks/gemini-cli/beforetool.mjs +25 -0
  80. package/hooks/gemini-cli/precompress.mjs +51 -0
  81. package/hooks/gemini-cli/sessionstart.mjs +117 -0
  82. package/hooks/hooks.json +46 -4
  83. package/hooks/posttooluse.mjs +53 -0
  84. package/hooks/precompact.mjs +55 -0
  85. package/hooks/pretooluse.mjs +23 -266
  86. package/hooks/routing-block.mjs +19 -6
  87. package/hooks/session-directive.mjs +353 -0
  88. package/hooks/session-helpers.mjs +112 -0
  89. package/hooks/sessionstart.mjs +123 -16
  90. package/hooks/userpromptsubmit.mjs +58 -0
  91. package/hooks/vscode-copilot/posttooluse.mjs +58 -0
  92. package/hooks/vscode-copilot/precompact.mjs +51 -0
  93. package/hooks/vscode-copilot/pretooluse.mjs +25 -0
  94. package/hooks/vscode-copilot/sessionstart.mjs +115 -0
  95. package/package.json +20 -17
  96. package/skills/context-mode/SKILL.md +49 -49
  97. package/skills/ctx-stats/SKILL.md +1 -1
  98. package/start.mjs +47 -0
  99. package/hooks/pretooluse.sh +0 -147
  100. package/server.bundle.mjs +0 -341
@@ -1,6 +1,28 @@
1
1
  {
2
- "description": "Context-mode PreToolUseintercepts data-fetching tools, nudges toward sandbox execution",
2
+ "description": "Context-mode hooksPreToolUse routing, PostToolUse session capture, PreCompact snapshot, SessionStart context injection",
3
3
  "hooks": {
4
+ "PostToolUse": [
5
+ {
6
+ "matcher": "",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.mjs"
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "PreCompact": [
16
+ {
17
+ "matcher": "",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/precompact.mjs"
22
+ }
23
+ ]
24
+ }
25
+ ],
4
26
  "PreToolUse": [
5
27
  {
6
28
  "matcher": "Bash",
@@ -38,6 +60,15 @@
38
60
  }
39
61
  ]
40
62
  },
63
+ {
64
+ "matcher": "Agent",
65
+ "hooks": [
66
+ {
67
+ "type": "command",
68
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse.mjs"
69
+ }
70
+ ]
71
+ },
41
72
  {
42
73
  "matcher": "Task",
43
74
  "hooks": [
@@ -48,7 +79,7 @@
48
79
  ]
49
80
  },
50
81
  {
51
- "matcher": "mcp__plugin_context-mode_context-mode__execute",
82
+ "matcher": "mcp__plugin_context-mode_context-mode__ctx_execute",
52
83
  "hooks": [
53
84
  {
54
85
  "type": "command",
@@ -57,7 +88,7 @@
57
88
  ]
58
89
  },
59
90
  {
60
- "matcher": "mcp__plugin_context-mode_context-mode__execute_file",
91
+ "matcher": "mcp__plugin_context-mode_context-mode__ctx_execute_file",
61
92
  "hooks": [
62
93
  {
63
94
  "type": "command",
@@ -66,7 +97,7 @@
66
97
  ]
67
98
  },
68
99
  {
69
- "matcher": "mcp__plugin_context-mode_context-mode__batch_execute",
100
+ "matcher": "mcp__plugin_context-mode_context-mode__ctx_batch_execute",
70
101
  "hooks": [
71
102
  {
72
103
  "type": "command",
@@ -75,6 +106,17 @@
75
106
  ]
76
107
  }
77
108
  ],
109
+ "UserPromptSubmit": [
110
+ {
111
+ "matcher": "",
112
+ "hooks": [
113
+ {
114
+ "type": "command",
115
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/userpromptsubmit.mjs"
116
+ }
117
+ ]
118
+ }
119
+ ],
78
120
  "SessionStart": [
79
121
  {
80
122
  "matcher": "",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "claude-context-mode",
2
+ "name": "context-mode",
3
3
  "owner": {
4
4
  "name": "Mert Koseoğlu",
5
5
  "email": "code.bm.ksglu@gmail.com"
@@ -13,7 +13,7 @@
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": "0.9.22",
16
+ "version": "1.0.0",
17
17
  "author": {
18
18
  "name": "Mert Koseoğlu"
19
19
  },
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "context-mode",
3
- "version": "0.9.22",
4
- "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.",
3
+ "version": "1.0.0",
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",
7
7
  "url": "https://github.com/mksglu"
8
8
  },
9
- "homepage": "https://github.com/mksglu/claude-context-mode#readme",
10
- "repository": "https://github.com/mksglu/claude-context-mode",
9
+ "homepage": "https://github.com/mksglu/context-mode#readme",
10
+ "repository": "https://github.com/mksglu/context-mode",
11
11
  "license": "Elastic-2.0",
12
12
  "keywords": [
13
13
  "mcp",