openrecall 0.2.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrecall",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Cross-session memory plugin for OpenCode with full-text search, tagging, and auto-recall",
5
5
  "module": "src/index.ts",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -179,7 +179,13 @@ export default async function OpenRecallPlugin(
179
179
  "experimental.chat.system.transform": async (input, output) => {
180
180
  const lines: string[] = [
181
181
  "IMPORTANT: You have persistent cross-session memory tools (memory_store, memory_search, memory_list, memory_update, memory_delete, memory_tag, memory_link, memory_refresh, memory_stats, memory_export, memory_import, memory_cleanup, memory_file_check).",
182
- "CRITICAL: Before reading any file, call memory_file_check with the file path. If the file is unchanged, use the stored memory content directly — do NOT re-read it. Only read files that memory_file_check reports as modified or not found.",
182
+ "MANDATORY FILE ACCESS RULE: You MUST call memory_file_check(file_path) BEFORE every file read. " +
183
+ "If memory_file_check returns content (\"File unchanged\"), you MUST use that content and MUST NOT call read/Read on that file. " +
184
+ "Only call read/Read if memory_file_check returns \"No memory found\" or \"File has been modified\". " +
185
+ "Calling read on a file after memory_file_check already returned its content is FORBIDDEN — it wastes tokens and time. " +
186
+ "This rule applies to ALL files, every time, with no exceptions.",
187
+ "MANDATORY SAVE RULE: Before giving your final response to the user, call memory_store to save a concise summary of your key findings, conclusions, or answers. " +
188
+ "This ensures the knowledge is persisted for future sessions. Do this EVERY time you research, explore, or analyze something — not just when the user explicitly asks you to remember.",
183
189
  "When the user asks you to remember, save, store, or note something, you MUST call memory_store immediately.",
184
190
  "Use memory_store to save important findings, decisions, user preferences, and patterns.",
185
191
  ]
package/src/tools.ts CHANGED
@@ -658,9 +658,9 @@ export function createTools(projectId: string) {
658
658
 
659
659
  memory_file_check: tool({
660
660
  description:
661
- "Check if a file's content is already stored in memory and whether it is still current. " +
662
- "Call this BEFORE reading any file. If the file is unchanged, use the returned memory content " +
663
- "directly instead of re-reading the file. Only read files that this tool reports as modified or not found.",
661
+ "MANDATORY: Call this BEFORE every file read. Returns cached file content if the file is unchanged, " +
662
+ "saving a read call. If this returns 'File unchanged' with content, you MUST use that content and " +
663
+ "MUST NOT call read on the file. Only read the file if this returns 'No memory found' or 'File has been modified'.",
664
664
  args: {
665
665
  file_path: tool.schema
666
666
  .string()