opencode-memtomem 0.1.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.
- package/LICENSE +17 -0
- package/README.md +52 -0
- package/dist/generated.d.ts +30 -0
- package/dist/generated.js +35 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.js +127 -0
- package/package.json +46 -0
- package/skills/memtomem-recall/SKILL.md +16 -0
- package/skills/memtomem-search/SKILL.md +16 -0
- package/skills/memtomem-status/SKILL.md +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2025-2026 memtomem contributors
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# opencode-memtomem
|
|
2
|
+
|
|
3
|
+
Safe, configuration-only memtomem integration for OpenCode 1.17.18 through the
|
|
4
|
+
current v1 line. It adds an exact-pinned local MCP server, six slash commands,
|
|
5
|
+
and three read-only skills. It does not add event hooks or automatic indexing.
|
|
6
|
+
|
|
7
|
+
## Current status
|
|
8
|
+
|
|
9
|
+
`opencode-memtomem` is present in this source repository but is not currently
|
|
10
|
+
published to npm. Do not use an `opencode plugin add` command; OpenCode loads
|
|
11
|
+
npm plugins from the singular `plugin` array in `opencode.json`.
|
|
12
|
+
|
|
13
|
+
For a released memtomem installation, configure the local MCP server now:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"$schema": "https://opencode.ai/config.json",
|
|
18
|
+
"mcp": {
|
|
19
|
+
"memtomem": {
|
|
20
|
+
"type": "local",
|
|
21
|
+
"command": ["uvx", "--isolated", "--from", "memtomem[all]==0.3.10", "memtomem-server"],
|
|
22
|
+
"enabled": true,
|
|
23
|
+
"timeout": 60000,
|
|
24
|
+
"environment": {"MEMTOMEM_TOOL_MODE": "core"}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
After the npm package is published, the plugin form will be:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{"plugin": ["opencode-memtomem@0.1.0"]}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Restart OpenCode, then run `/memtomem-status` or `/memtomem-search topic`.
|
|
37
|
+
`uvx` must be available on `PATH`. The manual configuration above starts the
|
|
38
|
+
exact-pinned `memtomem[all]==0.3.10` runtime on demand.
|
|
39
|
+
|
|
40
|
+
The plugin supports macOS, Linux, and Windows through WSL. Native Windows has
|
|
41
|
+
not been verified.
|
|
42
|
+
|
|
43
|
+
## Safety and precedence
|
|
44
|
+
|
|
45
|
+
- Search, recall, status, stats, list, and read tools are allowed.
|
|
46
|
+
- Add and index require confirmation.
|
|
47
|
+
- The broad `mem_do` dispatcher is denied.
|
|
48
|
+
- An existing `mcp.memtomem`, command of the same name, same-named user skill,
|
|
49
|
+
or memtomem-specific permission rule wins over the plugin default.
|
|
50
|
+
|
|
51
|
+
OpenCode's `--auto` mode approves `ask` decisions, and agent-level permissions
|
|
52
|
+
can override global settings. Review those settings before using write commands.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const CORE_VERSION = "0.3.10";
|
|
2
|
+
export declare const TOOL_MODE = "core";
|
|
3
|
+
export declare const MCP_TIMEOUT_MS = 60000;
|
|
4
|
+
export declare const OPENCODE_COMMANDS: {
|
|
5
|
+
readonly "memtomem-search": {
|
|
6
|
+
readonly description: "Search indexed memtomem memories by topic. Use for past decisions, notes, findings, or project context that may exist in the memory index.";
|
|
7
|
+
readonly template: "Use the memtomem search workflow.\n\nUser input: $ARGUMENTS\n\nCall `memtomem_mem_search` with the requested topic and use the compact output unless machine-readable details are necessary.\n\nPresent the strongest matches concisely with their source path, heading, and relevance score. Explain that memtomem uses BM25 by default and adds dense retrieval only when embeddings are configured. If nothing matches, suggest a broader query or the status workflow; do not write or index anything automatically.";
|
|
8
|
+
};
|
|
9
|
+
readonly "memtomem-recall": {
|
|
10
|
+
readonly description: "Recall memtomem memories created in a date range. Use for recent memories or requests scoped by day, week, month, source, or namespace.";
|
|
11
|
+
readonly template: "Use the memtomem recall workflow.\n\nUser input: $ARGUMENTS\n\nTranslate relative dates such as “last week” into `since` and `until` values when possible, then call `memtomem_mem_recall`. Preserve any source, namespace, scope, or result-limit constraint from the request.\n\nPresent memories newest first with their creation date and source. Ask for a date range only when the request provides no usable temporal constraint. Use topic search, not recall, when the user is asking what a memory says rather than when it was created.";
|
|
12
|
+
};
|
|
13
|
+
readonly "memtomem-status": {
|
|
14
|
+
readonly description: "Check memtomem configuration, storage, index counts, dense coverage, and warnings. Use when search is empty, degraded, or needs diagnosis.";
|
|
15
|
+
readonly template: "Use the memtomem status workflow.\n\nCall `memtomem_mem_status` once. Report the storage backend and database path, embedding state, source and chunk counts, dense-vector coverage, and warnings that the tool actually returns.\n\nTreat `provider=none` and BM25-only coverage as a supported default, not a failed setup. Do not claim namespace totals or other fields absent from the response.";
|
|
16
|
+
};
|
|
17
|
+
readonly "memtomem-remember": {
|
|
18
|
+
readonly description: "Save an explicit user-requested memory with memtomem. Use only when the user clearly asks to remember, record, or persist information for later.";
|
|
19
|
+
readonly template: "Use the memtomem remember workflow.\n\nUser input: $ARGUMENTS\n\nConfirm that the user explicitly requested persistence, then call `memtomem_mem_add` with the requested content. Add a natural title and a small set of useful tags only when they are clear from the content.\n\nUse `scope=\"user\"` by default and leave `force_unsafe=false`. Use `project_shared` only after explicit confirmation and set `confirm_project_shared=true`. Report the written file and indexed chunk count. If the tool reports a similar memory, surface the warning rather than silently creating another variant.";
|
|
20
|
+
};
|
|
21
|
+
readonly "memtomem-index": {
|
|
22
|
+
readonly description: "Index or re-index an explicitly selected file or directory with memtomem. Use for initial ingestion or intentional refresh after file changes.";
|
|
23
|
+
readonly template: "Use the memtomem index workflow.\n\nUser input: $ARGUMENTS\n\nRequire an explicit file or directory path before calling `memtomem_mem_index`; never rely on its `.` default. Resolve ambiguity with the user before indexing a broad directory.\n\nUse `force=false` and `auto_tag=false` unless the user explicitly requests otherwise. Report scanned, indexed, skipped, deleted, and blocked counts. Explain redaction or embedding-mismatch failures without bypassing them automatically.";
|
|
24
|
+
};
|
|
25
|
+
readonly "memtomem-setup": {
|
|
26
|
+
readonly description: "Set up and verify a first memtomem memory source. Use for onboarding, choosing an index path, or confirming that search works.";
|
|
27
|
+
readonly template: "Use the memtomem setup workflow.\n\nUser input: $ARGUMENTS\n\n1. Call `memtomem_mem_status` and treat the default `provider=none` BM25-only configuration as healthy.\n2. Obtain an explicit notes or memory directory from the request; ask for one when absent.\n3. Call `memtomem_mem_index` on that path with `force=false` and `auto_tag=false`.\n4. Choose a representative phrase from the indexed material and call `memtomem_mem_search` to verify retrieval.\n5. Report the first-success path and mention embeddings only as an optional relevance enhancement.\n\nDo not install Ollama, enable automation hooks, or edit host instruction files unless the user separately requests those actions.";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const OPENCODE_READ_SKILLS: readonly ["memtomem-search", "memtomem-recall", "memtomem-status"];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Generated by tools/render_plugin_assets.py. Do not edit.
|
|
2
|
+
export const CORE_VERSION = "0.3.10";
|
|
3
|
+
export const TOOL_MODE = "core";
|
|
4
|
+
export const MCP_TIMEOUT_MS = 60000;
|
|
5
|
+
export const OPENCODE_COMMANDS = {
|
|
6
|
+
"memtomem-search": {
|
|
7
|
+
"description": "Search indexed memtomem memories by topic. Use for past decisions, notes, findings, or project context that may exist in the memory index.",
|
|
8
|
+
"template": "Use the memtomem search workflow.\n\nUser input: $ARGUMENTS\n\nCall `memtomem_mem_search` with the requested topic and use the compact output unless machine-readable details are necessary.\n\nPresent the strongest matches concisely with their source path, heading, and relevance score. Explain that memtomem uses BM25 by default and adds dense retrieval only when embeddings are configured. If nothing matches, suggest a broader query or the status workflow; do not write or index anything automatically."
|
|
9
|
+
},
|
|
10
|
+
"memtomem-recall": {
|
|
11
|
+
"description": "Recall memtomem memories created in a date range. Use for recent memories or requests scoped by day, week, month, source, or namespace.",
|
|
12
|
+
"template": "Use the memtomem recall workflow.\n\nUser input: $ARGUMENTS\n\nTranslate relative dates such as “last week” into `since` and `until` values when possible, then call `memtomem_mem_recall`. Preserve any source, namespace, scope, or result-limit constraint from the request.\n\nPresent memories newest first with their creation date and source. Ask for a date range only when the request provides no usable temporal constraint. Use topic search, not recall, when the user is asking what a memory says rather than when it was created."
|
|
13
|
+
},
|
|
14
|
+
"memtomem-status": {
|
|
15
|
+
"description": "Check memtomem configuration, storage, index counts, dense coverage, and warnings. Use when search is empty, degraded, or needs diagnosis.",
|
|
16
|
+
"template": "Use the memtomem status workflow.\n\nCall `memtomem_mem_status` once. Report the storage backend and database path, embedding state, source and chunk counts, dense-vector coverage, and warnings that the tool actually returns.\n\nTreat `provider=none` and BM25-only coverage as a supported default, not a failed setup. Do not claim namespace totals or other fields absent from the response."
|
|
17
|
+
},
|
|
18
|
+
"memtomem-remember": {
|
|
19
|
+
"description": "Save an explicit user-requested memory with memtomem. Use only when the user clearly asks to remember, record, or persist information for later.",
|
|
20
|
+
"template": "Use the memtomem remember workflow.\n\nUser input: $ARGUMENTS\n\nConfirm that the user explicitly requested persistence, then call `memtomem_mem_add` with the requested content. Add a natural title and a small set of useful tags only when they are clear from the content.\n\nUse `scope=\"user\"` by default and leave `force_unsafe=false`. Use `project_shared` only after explicit confirmation and set `confirm_project_shared=true`. Report the written file and indexed chunk count. If the tool reports a similar memory, surface the warning rather than silently creating another variant."
|
|
21
|
+
},
|
|
22
|
+
"memtomem-index": {
|
|
23
|
+
"description": "Index or re-index an explicitly selected file or directory with memtomem. Use for initial ingestion or intentional refresh after file changes.",
|
|
24
|
+
"template": "Use the memtomem index workflow.\n\nUser input: $ARGUMENTS\n\nRequire an explicit file or directory path before calling `memtomem_mem_index`; never rely on its `.` default. Resolve ambiguity with the user before indexing a broad directory.\n\nUse `force=false` and `auto_tag=false` unless the user explicitly requests otherwise. Report scanned, indexed, skipped, deleted, and blocked counts. Explain redaction or embedding-mismatch failures without bypassing them automatically."
|
|
25
|
+
},
|
|
26
|
+
"memtomem-setup": {
|
|
27
|
+
"description": "Set up and verify a first memtomem memory source. Use for onboarding, choosing an index path, or confirming that search works.",
|
|
28
|
+
"template": "Use the memtomem setup workflow.\n\nUser input: $ARGUMENTS\n\n1. Call `memtomem_mem_status` and treat the default `provider=none` BM25-only configuration as healthy.\n2. Obtain an explicit notes or memory directory from the request; ask for one when absent.\n3. Call `memtomem_mem_index` on that path with `force=false` and `auto_tag=false`.\n4. Choose a representative phrase from the indexed material and call `memtomem_mem_search` to verify retrieval.\n5. Report the first-success path and mention embeddings only as an optional relevance enhancement.\n\nDo not install Ollama, enable automation hooks, or edit host instruction files unless the user separately requests those actions."
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export const OPENCODE_READ_SKILLS = [
|
|
32
|
+
"memtomem-search",
|
|
33
|
+
"memtomem-recall",
|
|
34
|
+
"memtomem-status",
|
|
35
|
+
];
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config, PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
type PermissionValue = "allow" | "ask" | "deny";
|
|
3
|
+
export declare const SAFE_PERMISSIONS: Record<string, PermissionValue>;
|
|
4
|
+
declare const plugin: {
|
|
5
|
+
id: string;
|
|
6
|
+
server(input: PluginInput): Promise<{
|
|
7
|
+
config(config: Config): Promise<void>;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export default plugin;
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { access } from "node:fs/promises";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { CORE_VERSION, MCP_TIMEOUT_MS, OPENCODE_COMMANDS, OPENCODE_READ_SKILLS, TOOL_MODE, } from "./generated.js";
|
|
6
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
7
|
+
export const SAFE_PERMISSIONS = {
|
|
8
|
+
"memtomem_*": "ask",
|
|
9
|
+
memtomem_mem_search: "allow",
|
|
10
|
+
memtomem_mem_recall: "allow",
|
|
11
|
+
memtomem_mem_status: "allow",
|
|
12
|
+
memtomem_mem_stats: "allow",
|
|
13
|
+
memtomem_mem_list: "allow",
|
|
14
|
+
memtomem_mem_read: "allow",
|
|
15
|
+
memtomem_mem_do: "deny",
|
|
16
|
+
};
|
|
17
|
+
function mergePermissions(existing) {
|
|
18
|
+
if (typeof existing === "string") {
|
|
19
|
+
if (existing === "deny")
|
|
20
|
+
return { "*": "deny" };
|
|
21
|
+
if (existing === "ask")
|
|
22
|
+
return { "*": "ask", memtomem_mem_do: "deny" };
|
|
23
|
+
return { "*": existing, ...SAFE_PERMISSIONS };
|
|
24
|
+
}
|
|
25
|
+
const generic = {};
|
|
26
|
+
const memtomem = {};
|
|
27
|
+
for (const [pattern, value] of Object.entries(existing ?? {})) {
|
|
28
|
+
(pattern.startsWith("memtomem_") ? memtomem : generic)[pattern] = value;
|
|
29
|
+
}
|
|
30
|
+
if (generic["*"] === "deny")
|
|
31
|
+
return { ...generic, ...memtomem };
|
|
32
|
+
if (generic["*"] === "ask") {
|
|
33
|
+
return { ...generic, memtomem_mem_do: "deny", ...memtomem };
|
|
34
|
+
}
|
|
35
|
+
return { ...generic, ...SAFE_PERMISSIONS, ...memtomem };
|
|
36
|
+
}
|
|
37
|
+
function ancestors(start) {
|
|
38
|
+
const result = [];
|
|
39
|
+
let current = resolve(start);
|
|
40
|
+
for (;;) {
|
|
41
|
+
result.push(current);
|
|
42
|
+
const parent = dirname(current);
|
|
43
|
+
if (parent === current)
|
|
44
|
+
return result;
|
|
45
|
+
current = parent;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function exists(path) {
|
|
49
|
+
try {
|
|
50
|
+
await access(path);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function hasUserSkill(name, input, configuredPaths) {
|
|
58
|
+
const roots = new Set();
|
|
59
|
+
for (const start of [input.directory, input.worktree].filter((item) => !!item)) {
|
|
60
|
+
for (const parent of ancestors(start)) {
|
|
61
|
+
for (const relative of [
|
|
62
|
+
".opencode/skills",
|
|
63
|
+
".opencode/skill",
|
|
64
|
+
".claude/skills",
|
|
65
|
+
".agents/skills",
|
|
66
|
+
])
|
|
67
|
+
roots.add(join(parent, relative));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
for (const relative of [
|
|
71
|
+
".config/opencode/skills",
|
|
72
|
+
".config/opencode/skill",
|
|
73
|
+
".claude/skills",
|
|
74
|
+
".agents/skills",
|
|
75
|
+
])
|
|
76
|
+
roots.add(join(homedir(), relative));
|
|
77
|
+
for (const configured of configuredPaths) {
|
|
78
|
+
const absolute = resolve(configured);
|
|
79
|
+
if (absolute === packageRoot || absolute.startsWith(`${packageRoot}${sep}`))
|
|
80
|
+
continue;
|
|
81
|
+
if (basename(absolute) === name && await exists(join(absolute, "SKILL.md")))
|
|
82
|
+
return true;
|
|
83
|
+
roots.add(absolute);
|
|
84
|
+
}
|
|
85
|
+
for (const root of roots) {
|
|
86
|
+
if (await exists(join(root, name, "SKILL.md")))
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
async function configure(config, input) {
|
|
92
|
+
config.mcp ??= {};
|
|
93
|
+
if (!("memtomem" in config.mcp)) {
|
|
94
|
+
config.mcp.memtomem = {
|
|
95
|
+
type: "local",
|
|
96
|
+
command: ["uvx", "--from", `memtomem==${CORE_VERSION}`, "memtomem-server"],
|
|
97
|
+
enabled: true,
|
|
98
|
+
timeout: MCP_TIMEOUT_MS,
|
|
99
|
+
environment: { MEMTOMEM_TOOL_MODE: TOOL_MODE },
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
config.command ??= {};
|
|
103
|
+
for (const [name, command] of Object.entries(OPENCODE_COMMANDS)) {
|
|
104
|
+
if (!(name in config.command))
|
|
105
|
+
config.command[name] = command;
|
|
106
|
+
}
|
|
107
|
+
config.skills ??= {};
|
|
108
|
+
config.skills.paths ??= [];
|
|
109
|
+
for (const name of OPENCODE_READ_SKILLS) {
|
|
110
|
+
const path = join(packageRoot, "skills", name);
|
|
111
|
+
if (!config.skills.paths.includes(path) && !(await hasUserSkill(name, input, config.skills.paths))) {
|
|
112
|
+
config.skills.paths.push(path);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
config.permission = mergePermissions(config.permission);
|
|
116
|
+
}
|
|
117
|
+
const plugin = {
|
|
118
|
+
id: "opencode-memtomem",
|
|
119
|
+
async server(input) {
|
|
120
|
+
return {
|
|
121
|
+
async config(config) {
|
|
122
|
+
await configure(config, input);
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
export default plugin;
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-memtomem",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Safe memtomem MCP, commands, and read skills for OpenCode",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/memtomem/memtomem.git",
|
|
11
|
+
"directory": "packages/opencode-memtomem"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/memtomem/memtomem/tree/main/packages/opencode-memtomem",
|
|
14
|
+
"bugs": "https://github.com/memtomem/memtomem/issues",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20",
|
|
17
|
+
"opencode": ">=1.17.18 <2"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
"./server": {
|
|
21
|
+
"types": "./dist/server.d.ts",
|
|
22
|
+
"import": "./dist/server.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"skills",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -p tsconfig.json",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
34
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
35
|
+
"pack:check": "npm pack --dry-run"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@opencode-ai/plugin": "1.17.18",
|
|
39
|
+
"@types/node": "26.1.1",
|
|
40
|
+
"typescript": "5.9.3"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public",
|
|
44
|
+
"provenance": true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memtomem-recall
|
|
3
|
+
description: Recall memtomem memories created in a date range. Use for recent memories or requests scoped by day, week, month, source, or namespace.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: OpenCode >=1.17.18 <2
|
|
6
|
+
metadata:
|
|
7
|
+
provider: memtomem
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Recall memories
|
|
11
|
+
|
|
12
|
+
Derive the date range or recent-memory request from the current user request.
|
|
13
|
+
If the request does not clearly specify the date range or recent-memory request, ask before calling a tool.
|
|
14
|
+
Translate relative dates such as “last week” into `since` and `until` values when possible, then call `memtomem_mem_recall`. Preserve any source, namespace, scope, or result-limit constraint from the request.
|
|
15
|
+
|
|
16
|
+
Present memories newest first with their creation date and source. Ask for a date range only when the request provides no usable temporal constraint. Use topic search, not recall, when the user is asking what a memory says rather than when it was created.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memtomem-search
|
|
3
|
+
description: Search indexed memtomem memories by topic. Use for past decisions, notes, findings, or project context that may exist in the memory index.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: OpenCode >=1.17.18 <2
|
|
6
|
+
metadata:
|
|
7
|
+
provider: memtomem
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Search memories
|
|
11
|
+
|
|
12
|
+
Derive the search query from the current user request.
|
|
13
|
+
If the request does not clearly specify the search query, ask before calling a tool.
|
|
14
|
+
Call `memtomem_mem_search` with the requested topic and use the compact output unless machine-readable details are necessary.
|
|
15
|
+
|
|
16
|
+
Present the strongest matches concisely with their source path, heading, and relevance score. Explain that memtomem uses BM25 by default and adds dense retrieval only when embeddings are configured. If nothing matches, suggest a broader query or the status workflow; do not write or index anything automatically.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memtomem-status
|
|
3
|
+
description: Check memtomem configuration, storage, index counts, dense coverage, and warnings. Use when search is empty, degraded, or needs diagnosis.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: OpenCode >=1.17.18 <2
|
|
6
|
+
metadata:
|
|
7
|
+
provider: memtomem
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Check memory status
|
|
11
|
+
Call `memtomem_mem_status` once. Report the storage backend and database path, embedding state, source and chunk counts, dense-vector coverage, and warnings that the tool actually returns.
|
|
12
|
+
|
|
13
|
+
Treat `provider=none` and BM25-only coverage as a supported default, not a failed setup. Do not claim namespace totals or other fields absent from the response.
|