@miniaxolotl/grove-opencode-plugin 0.2.6 → 0.3.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,46 @@
1
+ # @miniaxolotl/grove-opencode-plugin
2
+
3
+ ## [0.3.2](https://github.com/miniaxolotl/grove/compare/grove-opencode-plugin-v0.3.1...grove-opencode-plugin-v0.3.2) (2026-04-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update MCPClient URL to correct default for importance engine ([0e0ab02](https://github.com/miniaxolotl/grove/commit/0e0ab02f91866285f4b3cecf06ad634ed3e51355))
9
+ * update MCPClient URL to correct default for plugin components ([28315b2](https://github.com/miniaxolotl/grove/commit/28315b2a4e54921b347e7350aefc20fe1e28093a))
10
+ * update MCPClient URL to correct default for staleness engine ([5446c17](https://github.com/miniaxolotl/grove/commit/5446c1780228ea82fbd76ba9a7e795ad1be1b862))
11
+
12
+ ## [0.3.1](https://github.com/miniaxolotl/grove/compare/grove-opencode-plugin-v0.3.0...grove-opencode-plugin-v0.3.1) (2026-04-26)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * update release workflow to include production branch and adjust publish steps ([9ac62b0](https://github.com/miniaxolotl/grove/commit/9ac62b0459c4144aaff71a1f9ca6382c3bdb9c22))
18
+
19
+ ## [0.3.0](https://github.com/miniaxolotl/grove/compare/grove-opencode-plugin-v0.2.8...grove-opencode-plugin-v0.3.0) (2026-04-26)
20
+
21
+
22
+ ### Features
23
+
24
+ * add Grove Deployment Guide and update plugin configurations ([c8351ea](https://github.com/miniaxolotl/grove/commit/c8351ea074148d584eabdee5287c4835e0613c20))
25
+ * add shared library dependency to Grove OpenCode Plugin and MCP package ([3b7fd9e](https://github.com/miniaxolotl/grove/commit/3b7fd9e986b70212a40180adfc85e5a4b831fcd5))
26
+ * add updateMemory method to MCPClient and refactor importance decay logic ([ff206a4](https://github.com/miniaxolotl/grove/commit/ff206a4c127a10a3cc678a2fa107c1d90669d967))
27
+ * implement MCP client and integrate memory management features across the plugin ([f2a7317](https://github.com/miniaxolotl/grove/commit/f2a731740822a0c83871139eee0e3b61b6f93745))
28
+ * **mcp:** add memory management tools and refactor repository methods ([70753f0](https://github.com/miniaxolotl/grove/commit/70753f054e54e6627b17651fc32b9392b7f50288))
29
+ * update package.json and improve plugin structure with enhanced error handling and logging ([547a469](https://github.com/miniaxolotl/grove/commit/547a469c7cf63044d9878a09ad83dbedcee2a46c))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * correct plugin name in documentation and scripts to match repository naming ([c3ef067](https://github.com/miniaxolotl/grove/commit/c3ef067f7f82a00e793735502669aaef8e215390))
35
+ * update dependency versioning to use tilde for consistency in package.json ([f2d29d1](https://github.com/miniaxolotl/grove/commit/f2d29d1c941502f6b246dbe5c97d07a55062abc1))
36
+
37
+ ## 0.2.8 (2026-04-25)
38
+
39
+ ### Features
40
+
41
+ - Release-please automated versioning and releases
42
+ - npm package published via CI
43
+
44
+ ### Documentation
45
+
46
+ - Updated README with plugin configuration instructions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miniaxolotl/grove-opencode-plugin",
3
- "version": "0.2.6",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Grove - captures memories, injects hot context, manages importance tiers",
6
6
  "main": "dist/index.js",
@@ -25,13 +25,13 @@
25
25
  "@opencode-ai/plugin": "~1.14.20",
26
26
  "@opencode-ai/sdk": "~1.14.20",
27
27
  "effect": "~3.21.2",
28
- "zod": "~4.1.8",
29
- "@lib/shared": "0.0.0"
28
+ "zod": "~4.1.8"
30
29
  },
31
30
  "devDependencies": {
32
31
  "@tsconfig/node22": "~22.0.2",
33
32
  "@types/node": "~22.13.9",
34
- "typescript": "~5.8.2"
33
+ "typescript": "~5.8.2",
34
+ "@lib/shared": "0.0.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc",
@@ -23,11 +23,8 @@ function computeImportance(type: CaptureType): number {
23
23
  return BASE_IMPORTANCE[type];
24
24
  }
25
25
 
26
- export function createCaptureHooks(
27
- directory: string,
28
- opts: GrovePluginOptions,
29
- ) {
30
- const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:3100/mcp" });
26
+ export function createCaptureHooks(opts: GrovePluginOptions) {
27
+ const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:26080/mcp" });
31
28
 
32
29
  async function captureMemory(input: CaptureInput): Promise<void> {
33
30
  const importance = input.importance ?? computeImportance(input.type);
@@ -1,27 +1,8 @@
1
1
  import type { GrovePluginOptions } from "../index.js";
2
2
  import { MCPClient } from "../client/index.js";
3
3
 
4
- const HOT_THRESHOLD = 0.8;
5
-
6
- export function createContextEngine(
7
- _directory: string,
8
- opts: GrovePluginOptions,
9
- ) {
10
- const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:3100/mcp" });
11
-
12
- async function queryHotMemories(): Promise<MemorySearchResult[]> {
13
- try {
14
- const memories = await mcp.searchMemories({
15
- query: "important decision error resolution",
16
- limit: 10,
17
- });
18
-
19
- return memories.filter((m) => m.score >= HOT_THRESHOLD);
20
- } catch (err) {
21
- console.error("[grove] Failed to query hot memories:", err);
22
- return [];
23
- }
24
- }
4
+ export function createContextEngine(opts: GrovePluginOptions) {
5
+ const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:26080/mcp" });
25
6
 
26
7
  async function onSessionCompacting(
27
8
  input: { sessionID: string },
@@ -4,7 +4,7 @@ import { MCPClient } from "../client/index.js";
4
4
  const DECAY_RATE = 0.01;
5
5
 
6
6
  export function createImportanceEngine(opts: GrovePluginOptions) {
7
- const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:3100/mcp" });
7
+ const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:26080/mcp" });
8
8
 
9
9
  function applyDecay(currentImportance: number, daysSinceAccess: number): number {
10
10
  const decayed = currentImportance - daysSinceAccess * DECAY_RATE;
@@ -12,7 +12,7 @@ interface StaleMemory {
12
12
  }
13
13
 
14
14
  export function createStalenessEngine(opts: GrovePluginOptions) {
15
- const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:3100/mcp" });
15
+ const mcp = new MCPClient({ url: opts.mcpUrl ?? "http://localhost:26080/mcp" });
16
16
 
17
17
  async function findStaleMemories(daysThreshold: number): Promise<StaleMemory[]> {
18
18
  const staleMemories: StaleMemory[] = [];
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@ export interface GrovePluginOptions {
17
17
  export const grovePlugin: Plugin = async (ctx) => {
18
18
  const directory = ctx.directory || ".";
19
19
 
20
- const mcpUrl = process.env.GROVE_MCP_URL || "http://localhost:3100/mcp";
20
+ const mcpUrl = process.env.GROVE_MCP_URL || "http://localhost:26080/mcp";
21
21
  const project = process.env.GROVE_PROJECT;
22
22
 
23
23
  const opts: GrovePluginOptions = {
@@ -27,8 +27,8 @@ export const grovePlugin: Plugin = async (ctx) => {
27
27
  stalenessDays: 7,
28
28
  };
29
29
 
30
- const capture = createCaptureHooks(directory, opts);
31
- const contextEngine = createContextEngine(directory, opts);
30
+ const capture = createCaptureHooks(opts);
31
+ const contextEngine = createContextEngine(opts);
32
32
  const stalenessEngine = createStalenessEngine(opts);
33
33
  const importanceEngine = createImportanceEngine(opts);
34
34
  const mcp = new MCPClient({ url: mcpUrl });
@@ -75,15 +75,23 @@ export const grovePlugin: Plugin = async (ctx) => {
75
75
  }),
76
76
  },
77
77
  async "tool.execute.after"(input: { tool: string; sessionID: string; args: unknown }, output: { title: string; output: string }) {
78
- await capture.onToolExecuted(input, output);
78
+ try {
79
+ await capture.onToolExecuted(input, output);
80
+ } catch (err) {
81
+ console.error("[grove] tool.execute.after hook failed:", err);
82
+ }
79
83
  },
80
84
  async "experimental.session.compacting"(input: { sessionID: string }, output: { context: string[]; prompt?: string }) {
81
- await contextEngine.onSessionCompacting(input, output);
82
- await importanceEngine.decayMemories(input.sessionID);
85
+ try {
86
+ await contextEngine.onSessionCompacting(input, output);
87
+ await importanceEngine.decayMemories(input.sessionID);
83
88
 
84
- const staleResult = await stalenessEngine.onStalenessCheck();
85
- if (staleResult.staleCount > 0) {
86
- output.context.push(`[grove] ${staleResult.message}`);
89
+ const staleResult = await stalenessEngine.onStalenessCheck();
90
+ if (staleResult.staleCount > 0) {
91
+ output.context.push(`[grove] ${staleResult.message}`);
92
+ }
93
+ } catch (err) {
94
+ console.error("[grove] session.compacting hook failed:", err);
87
95
  }
88
96
  },
89
97
  };