@mnemo-mcp/cli 1.1.6 → 1.2.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwBrD"}
|
package/dist/commands/forget.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Mnemo } from '@mnemo-mcp/core';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
+
import { writeJsonResult } from '../json-mode.js';
|
|
3
4
|
export function registerForget(program) {
|
|
4
5
|
program
|
|
5
6
|
.command('forget <id>')
|
|
@@ -9,13 +10,18 @@ export function registerForget(program) {
|
|
|
9
10
|
const embedderType = (process.env.MNEMO_EMBEDDER === 'hash' ? 'hash' : 'onnx');
|
|
10
11
|
const m = await Mnemo.open({ dataDir: opts.dataDir, embedderType });
|
|
11
12
|
try {
|
|
12
|
-
const candidates = await m.list({});
|
|
13
|
+
const candidates = await m.list({ includeExpired: true });
|
|
13
14
|
const match = candidates.find(r => r.id === id || r.id.startsWith(id));
|
|
14
15
|
if (!match) {
|
|
16
|
+
if (writeJsonResult({ error: 'not_found', query: id }))
|
|
17
|
+
return;
|
|
15
18
|
console.log(chalk.yellow(`no memory matches "${id}"`));
|
|
19
|
+
process.exitCode = 1;
|
|
16
20
|
return;
|
|
17
21
|
}
|
|
18
22
|
await m.forget(match.id);
|
|
23
|
+
if (writeJsonResult({ forgotten: match.id }))
|
|
24
|
+
return;
|
|
19
25
|
console.log(chalk.green('forgotten'), chalk.dim(match.id.slice(0, 8)));
|
|
20
26
|
}
|
|
21
27
|
finally {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,+CAA+C,CAAC;SAC5D,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;SACtD,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,IAAU,EAAE,EAAE;QACvC,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAoB,CAAC;QAClG,MAAM,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;YACvE,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,IAAI,eAAe,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;oBAAE,OAAO;gBAC/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC,CAAC;gBACvD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;YACD,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACzB,IAAI,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;gBAAE,OAAO;YACrD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkBrD"}
|
package/dist/commands/import.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { Mnemo } from '@mnemo-mcp/core';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import { writeJsonResult } from '../json-mode.js';
|
|
4
5
|
export function registerImport(program) {
|
|
5
6
|
program
|
|
6
7
|
.command('import <file>')
|
|
@@ -13,6 +14,8 @@ export function registerImport(program) {
|
|
|
13
14
|
const raw = await readFile(file, 'utf8');
|
|
14
15
|
const records = JSON.parse(raw);
|
|
15
16
|
await m.import(records);
|
|
17
|
+
if (writeJsonResult({ imported: records.length, file }))
|
|
18
|
+
return;
|
|
16
19
|
console.log(chalk.green('imported'), records.length, 'memories');
|
|
17
20
|
}
|
|
18
21
|
finally {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;SACtD,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,IAAU,EAAE,EAAE;QACzC,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAoB,CAAC;QAClG,MAAM,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACxB,IAAI,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;gBAAE,OAAO;YAChE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnemo-mcp/cli",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Mnemo CLI — install Mnemo into Claude Code, capture and recall memories from your terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omer Maksuti",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test": "vitest run"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@mnemo-mcp/core": "1.1
|
|
40
|
+
"@mnemo-mcp/core": "1.2.1",
|
|
41
41
|
"commander": "^12.0.0",
|
|
42
42
|
"chalk": "^5.3.0"
|
|
43
43
|
},
|