@membank/cli 0.0.4 → 0.1.1
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/dist/index.mjs +3 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -128,13 +128,16 @@ async function importCommand(filePath, db, formatter, prompt) {
|
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/commands/inject.ts
|
|
131
|
+
const MEMORY_GUIDANCE = "[Memory Guidance]: query_memory before answering on topics where past preferences, corrections, or decisions may apply; save_memory when user corrects you, states a preference, makes a decision, or shares something worth retaining across sessions; update_memory to refine an existing memory (query first to find it) or to set pinned=true/false; delete_memory when a memory is wrong or no longer relevant; pin high-value memories that should always appear at session start";
|
|
131
132
|
function formatContext(ctx) {
|
|
132
133
|
const lines = [];
|
|
133
134
|
const statParts = Object.entries(ctx.stats).filter(([, count]) => count > 0).map(([type, count]) => `${count} ${type}${count !== 1 ? "s" : ""}`);
|
|
134
135
|
if (statParts.length > 0) lines.push(`[Memory Stats]: ${statParts.join(", ")}`);
|
|
136
|
+
else lines.push("[Memory Stats]: no memories saved yet");
|
|
135
137
|
const formatMemory = (m) => `"${m.content}" (${m.type})`;
|
|
136
138
|
for (const m of ctx.pinnedGlobal) lines.push(`[Pinned Global]: ${formatMemory(m)}`);
|
|
137
139
|
for (const m of ctx.pinnedProject) lines.push(`[Pinned Project]: ${formatMemory(m)}`);
|
|
140
|
+
lines.push(MEMORY_GUIDANCE);
|
|
138
141
|
return lines.join("\n");
|
|
139
142
|
}
|
|
140
143
|
async function injectCommand(opts) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@membank/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"@huggingface/transformers": "^4.2.0",
|
|
18
18
|
"commander": "^14.0.3",
|
|
19
19
|
"ora": "^9.4.0",
|
|
20
|
-
"@membank/
|
|
21
|
-
"@membank/
|
|
20
|
+
"@membank/core": "0.1.1",
|
|
21
|
+
"@membank/mcp": "0.1.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^25.6.0",
|