@mnemo-mcp/cli 1.1.4 → 1.1.5
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":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8BnD"}
|
package/dist/commands/list.js
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import { Mnemo } from '@mnemo-mcp/core';
|
|
1
|
+
import { Mnemo, CHANNELS } from '@mnemo-mcp/core';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { formatRecord } from '../output.js';
|
|
4
|
+
import { writeJsonResult } from '../json-mode.js';
|
|
4
5
|
export function registerList(program) {
|
|
5
6
|
program
|
|
6
7
|
.command('list')
|
|
7
8
|
.description('List memories (most recent first)')
|
|
8
|
-
.option('-s, --scope <scope>', 'project | global', 'global')
|
|
9
|
+
.option('-s, --scope <scope>', 'project | global | team', 'global')
|
|
9
10
|
.option('-l, --limit <n>', 'Max records to show', '20')
|
|
11
|
+
.option('-c, --channel <channels>', `Filter by channel (${CHANNELS.join('|')})`)
|
|
10
12
|
.option('--data-dir <path>', 'Data directory override')
|
|
11
13
|
.action(async (opts) => {
|
|
12
14
|
const embedderType = (process.env.MNEMO_EMBEDDER === 'hash' ? 'hash' : 'onnx');
|
|
13
15
|
const m = await Mnemo.open({ dataDir: opts.dataDir, embedderType });
|
|
14
16
|
try {
|
|
17
|
+
const channel = opts.channel
|
|
18
|
+
? opts.channel.split(',').map(s => s.trim()).filter(Boolean)
|
|
19
|
+
: undefined;
|
|
15
20
|
const list = await m.list({
|
|
16
21
|
scope: opts.scope,
|
|
17
22
|
limit: Number(opts.limit),
|
|
23
|
+
channel,
|
|
18
24
|
});
|
|
25
|
+
if (writeJsonResult(list))
|
|
26
|
+
return;
|
|
19
27
|
if (list.length === 0) {
|
|
20
28
|
console.log(chalk.dim('no memories yet — try `mnemo remember "..."`'));
|
|
21
29
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,qBAAqB,EAAE,yBAAyB,EAAE,QAAQ,CAAC;SAClE,MAAM,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,IAAI,CAAC;SACtD,MAAM,CAAC,0BAA0B,EAAE,sBAAsB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;SAC/E,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;SACtD,MAAM,CAAC,KAAK,EAAE,IAAU,EAAE,EAAE;QAC3B,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,OAAO,GAAG,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAqB;gBACjF,CAAC,CAAC,SAAS,CAAC;YACd,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC;gBACxB,KAAK,EAAE,IAAI,CAAC,KAAsC;gBAClD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;gBACzB,OAAO;aACR,CAAC,CAAC;YACH,IAAI,eAAe,CAAC,IAAI,CAAC;gBAAE,OAAO;YAClC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC,CAAC;gBACvE,OAAO;YACT,CAAC;YACD,KAAK,MAAM,CAAC,IAAI,IAAI;gBAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgBpD"}
|
package/dist/commands/stats.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Mnemo } from '@mnemo-mcp/core';
|
|
2
2
|
import { formatStats } from '../output.js';
|
|
3
|
+
import { writeJsonResult } from '../json-mode.js';
|
|
3
4
|
export function registerStats(program) {
|
|
4
5
|
program
|
|
5
6
|
.command('stats')
|
|
@@ -9,7 +10,10 @@ export function registerStats(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
|
-
|
|
13
|
+
const s = await m.stats();
|
|
14
|
+
if (writeJsonResult(s))
|
|
15
|
+
return;
|
|
16
|
+
console.log(formatStats(s));
|
|
13
17
|
}
|
|
14
18
|
finally {
|
|
15
19
|
await m.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,8BAA8B,CAAC;SAC3C,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;SACtD,MAAM,CAAC,KAAK,EAAE,IAAU,EAAE,EAAE;QAC3B,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,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;YAC1B,IAAI,eAAe,CAAC,CAAC,CAAC;gBAAE,OAAO;YAC/B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnemo-mcp/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
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.1.5",
|
|
41
41
|
"commander": "^12.0.0",
|
|
42
42
|
"chalk": "^5.3.0"
|
|
43
43
|
},
|