@mathew-cf/opencode-memory 0.3.0 → 0.4.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.
@@ -26,21 +26,49 @@ export declare function resolveHome(env?: NodeJS.ProcessEnv): string;
26
26
  * Normalize a filesystem path to use forward slashes.
27
27
  *
28
28
  * On Windows, ripgrep emits paths with backslashes even when invoked with
29
- * forward-slash arguments. When our code strips a forward-slash MEMORY_DIR
30
- * prefix from a backslash-separated rg output line, the replace silently
31
- * fails and the prefix is left in place — which breaks every downstream
32
- * file read. Normalizing rg output through this helper restores the
33
- * invariant that paths handled inside the tool always use /.
29
+ * forward-slash arguments. When our code strips a forward-slash
30
+ * OPENCODE_MEMORY_DIR prefix from a backslash-separated rg output line,
31
+ * the replace silently fails and the prefix is left in place — which
32
+ * breaks every downstream file read. Normalizing rg output through this
33
+ * helper restores the invariant that paths handled inside the tool
34
+ * always use /.
34
35
  *
35
36
  * On macOS/Linux this is a no-op: paths already use forward slashes.
36
37
  */
37
38
  export declare function normPath(p: string): string;
38
39
  /**
39
- * Resolve the root memory directory. Honors `$MEMORY_DIR` (used by tests
40
- * and by users who keep their knowledge base in a non-default location),
41
- * falling back to `$HOME/opencode-memory`.
40
+ * Normalize a directory path and drop redundant trailing separators. Uses
41
+ * `path.posix.join` so the result keeps the plugin's forward-slash invariant.
42
+ */
43
+ export declare function normalizeDirPath(p: string): string;
44
+ /**
45
+ * Expand a leading `~` in user-provided paths. Shells usually expand
46
+ * this before setting OPENCODE_MEMORY_DIR, but JSON-based host configs
47
+ * often pass it through literally. Supporting it here lets users write
48
+ * the same intuitive value in either place.
49
+ */
50
+ export declare function expandHomePath(p: string, env?: NodeJS.ProcessEnv): string;
51
+ /**
52
+ * Resolve the root memory directory. Honors `$OPENCODE_MEMORY_DIR` (used
53
+ * by tests and by users who keep their knowledge base in a non-default
54
+ * location), falling back to `$HOME/opencode-memory`.
55
+ *
56
+ * The env var is namespaced with the package's prefix to avoid collisions
57
+ * with generic `MEMORY_DIR` values that other tools or LLM frameworks
58
+ * sometimes set.
42
59
  */
43
60
  export declare function resolveMemoryDir(env?: NodeJS.ProcessEnv): string;
61
+ /**
62
+ * Render a memory root for LLM-facing prompts and tool output. If the path
63
+ * lives under the user's home, collapse that prefix to `~` so custom dirs
64
+ * like `/Users/alex/.config/opencode/memory` become the concise, accurate
65
+ * `~/.config/opencode/memory` instead of the misleading default path.
66
+ */
67
+ export declare function formatMemoryDirForDisplay(memoryDir: string, env?: NodeJS.ProcessEnv): string;
68
+ /**
69
+ * Render a memory file path for LLM-facing prompts and tool output.
70
+ */
71
+ export declare function formatMemoryPathForDisplay(memoryDir: string, relPath: string, env?: NodeJS.ProcessEnv): string;
44
72
  /**
45
73
  * Convenience: the rag index directory for a given memory root.
46
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CASxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAG7E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CASxE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAOtF;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAK7E;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAczG;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAIR;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * The memory root is resolved lazily via `resolveMemoryDir()` so that
5
5
  * tests can point the whole plugin at a temp directory by setting
6
- * `$MEMORY_DIR` before importing.
6
+ * `$OPENCODE_MEMORY_DIR` before importing.
7
7
  */
8
+ import { type ToolDefinition } from "@opencode-ai/plugin";
8
9
  /**
9
10
  * Build a ripgrep argument list for OR-matching multiple terms.
10
11
  * Kept as a pure function so tests can verify the exact args shape.
@@ -25,17 +26,11 @@ export declare function parseRagHits(ragText: string): Array<{
25
26
  * result map.
26
27
  */
27
28
  export declare function toRelPath(memoryDir: string, absPath: string): string;
28
- export declare const search: {
29
- description: string;
30
- args: {
31
- query: import("zod").ZodString;
32
- category: import("zod").ZodOptional<import("zod").ZodString>;
33
- };
34
- execute(args: {
35
- query: string;
36
- category?: string | undefined;
37
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
38
- };
29
+ export declare function memorySearchDescription(memoryDir?: string): string;
30
+ export declare function memoryListDescription(memoryDir?: string): string;
31
+ export declare function memoryAccessPathDescription(memoryDir?: string): string;
32
+ export declare function memorySaveDescription(memoryDir?: string): string;
33
+ export declare const search: ToolDefinition;
39
34
  /**
40
35
  * Pure entry point for memory search. Exposed separately from the `tool()`
41
36
  * wrapper so tests can call it with plain arguments and assert against the
@@ -45,40 +40,16 @@ export declare function runSearch(input: {
45
40
  query: string;
46
41
  category?: string;
47
42
  }): Promise<string>;
48
- export declare const list: {
49
- description: string;
50
- args: {
51
- category: import("zod").ZodOptional<import("zod").ZodString>;
52
- };
53
- execute(args: {
54
- category?: string | undefined;
55
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
56
- };
43
+ export declare const list: ToolDefinition;
57
44
  export declare function runList(input: {
58
45
  category?: string;
59
46
  }): Promise<string>;
60
- export declare const access: {
61
- description: string;
62
- args: {
63
- path: import("zod").ZodString;
64
- };
65
- execute(args: {
66
- path: string;
67
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
68
- };
47
+ export declare const access: ToolDefinition;
69
48
  export declare function runAccess(input: {
70
49
  path: string;
71
50
  }): Promise<string>;
72
- export declare const save: {
73
- description: string;
74
- args: {};
75
- execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
76
- };
51
+ export declare const save: ToolDefinition;
77
52
  export declare function runSave(): Promise<string>;
78
- export declare const setup: {
79
- description: string;
80
- args: {};
81
- execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
82
- };
53
+ export declare const setup: ToolDefinition;
83
54
  export declare function runSetup(): Promise<string>;
84
55
  //# sourceMappingURL=memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AAAA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AAO,MAAM,IAAI,EAAE,cAMjB,CAAC;AAEH,wBAAsB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CA6B/C;AAED,eAAO,MAAM,KAAK,EAAE,cASlB,CAAC;AAEH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAwBhD"}
@@ -5,6 +5,7 @@
5
5
  * concurrently while OpenCode is running). The database path is resolved
6
6
  * lazily so tests can override it with `$OPENCODE_DB`.
7
7
  */
8
+ import { type ToolDefinition } from "@opencode-ai/plugin";
8
9
  /**
9
10
  * Build an `<col> LIKE <pattern>` OR clause. When there's a single term we
10
11
  * return a bare expression; multi-term queries get parenthesized so they
@@ -33,40 +34,14 @@ export interface SessionListRow {
33
34
  created: string;
34
35
  updated: string;
35
36
  }
36
- export declare const search: {
37
- description: string;
38
- args: {
39
- query: import("zod").ZodString;
40
- limit: import("zod").ZodOptional<import("zod").ZodNumber>;
41
- directory: import("zod").ZodOptional<import("zod").ZodString>;
42
- };
43
- execute(args: {
44
- query: string;
45
- limit?: number | undefined;
46
- directory?: string | undefined;
47
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
48
- };
37
+ export declare const search: ToolDefinition;
49
38
  export declare function runSessionSearch(input: {
50
39
  query: string;
51
40
  limit?: number;
52
41
  directory?: string;
53
42
  currentSessionId?: string;
54
43
  }): Promise<string>;
55
- export declare const list: {
56
- description: string;
57
- args: {
58
- from: import("zod").ZodOptional<import("zod").ZodString>;
59
- to: import("zod").ZodOptional<import("zod").ZodString>;
60
- directory: import("zod").ZodOptional<import("zod").ZodString>;
61
- limit: import("zod").ZodOptional<import("zod").ZodNumber>;
62
- };
63
- execute(args: {
64
- from?: string | undefined;
65
- to?: string | undefined;
66
- directory?: string | undefined;
67
- limit?: number | undefined;
68
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
69
- };
44
+ export declare const list: ToolDefinition;
70
45
  export declare function runSessionList(input: {
71
46
  from?: string;
72
47
  to?: string;
@@ -74,25 +49,7 @@ export declare function runSessionList(input: {
74
49
  limit?: number;
75
50
  currentSessionId?: string;
76
51
  }): Promise<string>;
77
- export declare const read: {
78
- description: string;
79
- args: {
80
- session_id: import("zod").ZodString;
81
- limit: import("zod").ZodOptional<import("zod").ZodNumber>;
82
- offset: import("zod").ZodOptional<import("zod").ZodNumber>;
83
- role: import("zod").ZodOptional<import("zod").ZodEnum<{
84
- all: "all";
85
- user: "user";
86
- assistant: "assistant";
87
- }>>;
88
- };
89
- execute(args: {
90
- session_id: string;
91
- limit?: number | undefined;
92
- offset?: number | undefined;
93
- role?: "all" | "user" | "assistant" | undefined;
94
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
95
- };
52
+ export declare const read: ToolDefinition;
96
53
  export declare function runSessionRead(input: {
97
54
  sessionId: string;
98
55
  limit?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/tools/session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAI9D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAIhE;AAID,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;I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AAC,MAAM,CAAC,CAqDlB;AAED,eAAO,MAAM,IAAI,EAAE,cAiCjB,CAAC;AAEH,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,WAAW,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC,MAAM,CAAC,CA0ElB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathew-cf/opencode-memory",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Persistent cross-session memory for OpenCode — a hybrid keyword + semantic search layer over a local markdown knowledge base, plus session history tools and guardrails that nudge agents to use them.",
5
5
  "author": "mat",
6
6
  "license": "Apache-2.0",
@@ -11,6 +11,17 @@
11
11
  "type": "module",
12
12
  "main": "dist/index.js",
13
13
  "types": "dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./cli": {
20
+ "types": "./dist/cli.d.ts",
21
+ "default": "./dist/cli.js"
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
14
25
  "bin": {
15
26
  "opencode-memory": "dist/cli.js"
16
27
  },
@@ -36,7 +47,8 @@
36
47
  ],
37
48
  "dependencies": {
38
49
  "@mathew-cf/rag-cli": "^0.4.0",
39
- "@vscode/ripgrep": "^1.17.1"
50
+ "@vscode/ripgrep": "^1.17.1",
51
+ "zod": "^3.25.0"
40
52
  },
41
53
  "devDependencies": {
42
54
  "@opencode-ai/plugin": "^1.1.49",