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 +1 -1
- package/src/index.ts +7 -1
- package/src/tools.ts +3 -3
package/package.json
CHANGED
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
|
-
"
|
|
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
|
-
"
|
|
662
|
-
"
|
|
663
|
-
"
|
|
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()
|