@memrosetta/cli 0.4.8 → 0.5.0

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.
@@ -0,0 +1,57 @@
1
+ import {
2
+ buildRelationCreatedOp,
3
+ openCliSyncContext
4
+ } from "./chunk-2MO65JLK.js";
5
+ import {
6
+ optionalOption,
7
+ requireOption
8
+ } from "./chunk-SYPVELIW.js";
9
+ import {
10
+ getEngine,
11
+ resolveDbPath
12
+ } from "./chunk-VAVUPQZA.js";
13
+ import {
14
+ output,
15
+ outputError
16
+ } from "./chunk-ET6TNQOJ.js";
17
+ import "./chunk-SEPYQK3J.js";
18
+
19
+ // src/commands/relate.ts
20
+ var VALID_RELATION_TYPES = /* @__PURE__ */ new Set([
21
+ "updates",
22
+ "extends",
23
+ "derives",
24
+ "contradicts",
25
+ "supports"
26
+ ]);
27
+ async function run(options) {
28
+ const { args, format, db, noEmbeddings } = options;
29
+ const src = requireOption(args, "--src", "source memory ID");
30
+ const dst = requireOption(args, "--dst", "destination memory ID");
31
+ const relationType = requireOption(args, "--type", "relation type");
32
+ const reason = optionalOption(args, "--reason");
33
+ if (!VALID_RELATION_TYPES.has(relationType)) {
34
+ outputError(
35
+ `Invalid relation type: ${relationType}. Must be one of: updates, extends, derives, contradicts, supports`,
36
+ format
37
+ );
38
+ process.exitCode = 1;
39
+ return;
40
+ }
41
+ const engine = await getEngine({ db, noEmbeddings });
42
+ const relation = await engine.relate(
43
+ src,
44
+ dst,
45
+ relationType,
46
+ reason
47
+ );
48
+ const sync = await openCliSyncContext(resolveDbPath(db));
49
+ if (sync.enabled) {
50
+ sync.enqueue(buildRelationCreatedOp(sync, relation));
51
+ sync.close();
52
+ }
53
+ output(relation, format);
54
+ }
55
+ export {
56
+ run
57
+ };
@@ -0,0 +1,129 @@
1
+ import {
2
+ removeAgentsMdSection,
3
+ removeClaudeCodeHooks,
4
+ removeClaudeMdSection,
5
+ removeCodexMCP,
6
+ removeCursorMCP,
7
+ removeCursorRulesSection,
8
+ removeGeminiMCP,
9
+ removeGeminiMdSection,
10
+ removeGenericMCP
11
+ } from "./chunk-5PH2RDAS.js";
12
+ import {
13
+ hasFlag
14
+ } from "./chunk-SYPVELIW.js";
15
+ import {
16
+ output
17
+ } from "./chunk-ET6TNQOJ.js";
18
+
19
+ // src/commands/reset.ts
20
+ async function run(options) {
21
+ const { args, format } = options;
22
+ const wantClaudeCode = hasFlag(args, "--claude-code");
23
+ const wantCursor = hasFlag(args, "--cursor");
24
+ const wantCodex = hasFlag(args, "--codex");
25
+ const wantGemini = hasFlag(args, "--gemini");
26
+ const wantMCP = hasFlag(args, "--mcp");
27
+ const wantAll = hasFlag(args, "--all");
28
+ const noFlags = !wantClaudeCode && !wantCursor && !wantCodex && !wantGemini && !wantMCP && !wantAll;
29
+ if (noFlags) {
30
+ const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--codex] [--gemini] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --codex Remove Codex MCP configuration and AGENTS.md section\n --gemini Remove Gemini MCP configuration and GEMINI.md section\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
31
+ if (format === "text") {
32
+ process.stdout.write(msg);
33
+ } else {
34
+ output({ error: "No flags specified. Use --claude-code, --cursor, --codex, --gemini, --mcp, or --all." }, format);
35
+ }
36
+ return;
37
+ }
38
+ const result = {
39
+ removed: {
40
+ claudeCodeHooks: false,
41
+ claudeMd: false,
42
+ mcp: false,
43
+ cursor: false,
44
+ cursorRules: false,
45
+ codex: false,
46
+ agentsMd: false,
47
+ gemini: false,
48
+ geminiMd: false
49
+ }
50
+ };
51
+ if (wantClaudeCode || wantAll) {
52
+ const hooksRemoved = removeClaudeCodeHooks();
53
+ const mdRemoved = removeClaudeMdSection();
54
+ const mcpRemoved = removeGenericMCP();
55
+ result.removed.claudeCodeHooks = hooksRemoved;
56
+ result.removed.claudeMd = mdRemoved;
57
+ if (!wantMCP) {
58
+ result.removed.mcp = mcpRemoved;
59
+ }
60
+ }
61
+ if (wantCursor || wantAll) {
62
+ const removed = removeCursorMCP();
63
+ result.removed.cursor = removed;
64
+ const rulesRemoved = removeCursorRulesSection();
65
+ result.removed.cursorRules = rulesRemoved;
66
+ }
67
+ if (wantCodex || wantAll) {
68
+ const removed = removeCodexMCP();
69
+ result.removed.codex = removed;
70
+ const mdRemoved = removeAgentsMdSection();
71
+ result.removed.agentsMd = mdRemoved;
72
+ }
73
+ if (wantGemini || wantAll) {
74
+ const removed = removeGeminiMCP();
75
+ result.removed.gemini = removed;
76
+ const mdRemoved = removeGeminiMdSection();
77
+ result.removed.geminiMd = mdRemoved;
78
+ }
79
+ if (wantMCP || wantAll) {
80
+ const removed = removeGenericMCP();
81
+ result.removed.mcp = removed;
82
+ }
83
+ if (format === "text") {
84
+ printTextOutput(result);
85
+ return;
86
+ }
87
+ output(result, format);
88
+ }
89
+ function printTextOutput(result) {
90
+ const w = (s) => process.stdout.write(s);
91
+ const removed = result.removed;
92
+ if (removed.claudeCodeHooks) {
93
+ w("Removed Claude Code hooks from ~/.claude/settings.json\n");
94
+ }
95
+ if (removed.claudeMd) {
96
+ w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
97
+ }
98
+ if (removed.mcp) {
99
+ w("Removed MCP server from ~/.mcp.json\n");
100
+ }
101
+ if (removed.cursor) {
102
+ w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
103
+ }
104
+ if (removed.cursorRules) {
105
+ w("Removed MemRosetta section from ~/.cursorrules\n");
106
+ }
107
+ if (removed.codex) {
108
+ w("Removed Codex MCP from ~/.codex/config.toml\n");
109
+ }
110
+ if (removed.agentsMd) {
111
+ w("Removed MemRosetta section from AGENTS.md\n");
112
+ }
113
+ if (removed.gemini) {
114
+ w("Removed Gemini MCP from ~/.gemini/settings.json\n");
115
+ }
116
+ if (removed.geminiMd) {
117
+ w("Removed MemRosetta section from GEMINI.md\n");
118
+ }
119
+ const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules || removed.codex || removed.agentsMd || removed.gemini || removed.geminiMd;
120
+ if (!anyRemoved) {
121
+ w("Nothing to remove (no integrations were configured).\n");
122
+ }
123
+ w(
124
+ "\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
125
+ );
126
+ }
127
+ export {
128
+ run
129
+ };
@@ -0,0 +1,129 @@
1
+ import {
2
+ removeAgentsMdSection,
3
+ removeClaudeCodeHooks,
4
+ removeClaudeMdSection,
5
+ removeCodexMCP,
6
+ removeCursorMCP,
7
+ removeCursorRulesSection,
8
+ removeGeminiMCP,
9
+ removeGeminiMdSection,
10
+ removeGenericMCP
11
+ } from "./chunk-PMQKXYS6.js";
12
+ import {
13
+ hasFlag
14
+ } from "./chunk-SYPVELIW.js";
15
+ import {
16
+ output
17
+ } from "./chunk-ET6TNQOJ.js";
18
+
19
+ // src/commands/reset.ts
20
+ async function run(options) {
21
+ const { args, format } = options;
22
+ const wantClaudeCode = hasFlag(args, "--claude-code");
23
+ const wantCursor = hasFlag(args, "--cursor");
24
+ const wantCodex = hasFlag(args, "--codex");
25
+ const wantGemini = hasFlag(args, "--gemini");
26
+ const wantMCP = hasFlag(args, "--mcp");
27
+ const wantAll = hasFlag(args, "--all");
28
+ const noFlags = !wantClaudeCode && !wantCursor && !wantCodex && !wantGemini && !wantMCP && !wantAll;
29
+ if (noFlags) {
30
+ const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--codex] [--gemini] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --codex Remove Codex MCP configuration and AGENTS.md section\n --gemini Remove Gemini MCP configuration and GEMINI.md section\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
31
+ if (format === "text") {
32
+ process.stdout.write(msg);
33
+ } else {
34
+ output({ error: "No flags specified. Use --claude-code, --cursor, --codex, --gemini, --mcp, or --all." }, format);
35
+ }
36
+ return;
37
+ }
38
+ const result = {
39
+ removed: {
40
+ claudeCodeHooks: false,
41
+ claudeMd: false,
42
+ mcp: false,
43
+ cursor: false,
44
+ cursorRules: false,
45
+ codex: false,
46
+ agentsMd: false,
47
+ gemini: false,
48
+ geminiMd: false
49
+ }
50
+ };
51
+ if (wantClaudeCode || wantAll) {
52
+ const hooksRemoved = removeClaudeCodeHooks();
53
+ const mdRemoved = removeClaudeMdSection();
54
+ const mcpRemoved = removeGenericMCP();
55
+ result.removed.claudeCodeHooks = hooksRemoved;
56
+ result.removed.claudeMd = mdRemoved;
57
+ if (!wantMCP) {
58
+ result.removed.mcp = mcpRemoved;
59
+ }
60
+ }
61
+ if (wantCursor || wantAll) {
62
+ const removed = removeCursorMCP();
63
+ result.removed.cursor = removed;
64
+ const rulesRemoved = removeCursorRulesSection();
65
+ result.removed.cursorRules = rulesRemoved;
66
+ }
67
+ if (wantCodex || wantAll) {
68
+ const removed = removeCodexMCP();
69
+ result.removed.codex = removed;
70
+ const mdRemoved = removeAgentsMdSection();
71
+ result.removed.agentsMd = mdRemoved;
72
+ }
73
+ if (wantGemini || wantAll) {
74
+ const removed = removeGeminiMCP();
75
+ result.removed.gemini = removed;
76
+ const mdRemoved = removeGeminiMdSection();
77
+ result.removed.geminiMd = mdRemoved;
78
+ }
79
+ if (wantMCP || wantAll) {
80
+ const removed = removeGenericMCP();
81
+ result.removed.mcp = removed;
82
+ }
83
+ if (format === "text") {
84
+ printTextOutput(result);
85
+ return;
86
+ }
87
+ output(result, format);
88
+ }
89
+ function printTextOutput(result) {
90
+ const w = (s) => process.stdout.write(s);
91
+ const removed = result.removed;
92
+ if (removed.claudeCodeHooks) {
93
+ w("Removed Claude Code hooks from ~/.claude/settings.json\n");
94
+ }
95
+ if (removed.claudeMd) {
96
+ w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
97
+ }
98
+ if (removed.mcp) {
99
+ w("Removed MCP server from ~/.mcp.json\n");
100
+ }
101
+ if (removed.cursor) {
102
+ w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
103
+ }
104
+ if (removed.cursorRules) {
105
+ w("Removed MemRosetta section from ~/.cursorrules\n");
106
+ }
107
+ if (removed.codex) {
108
+ w("Removed Codex MCP from ~/.codex/config.toml\n");
109
+ }
110
+ if (removed.agentsMd) {
111
+ w("Removed MemRosetta section from AGENTS.md\n");
112
+ }
113
+ if (removed.gemini) {
114
+ w("Removed Gemini MCP from ~/.gemini/settings.json\n");
115
+ }
116
+ if (removed.geminiMd) {
117
+ w("Removed MemRosetta section from GEMINI.md\n");
118
+ }
119
+ const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules || removed.codex || removed.agentsMd || removed.gemini || removed.geminiMd;
120
+ if (!anyRemoved) {
121
+ w("Nothing to remove (no integrations were configured).\n");
122
+ }
123
+ w(
124
+ "\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
125
+ );
126
+ }
127
+ export {
128
+ run
129
+ };
@@ -0,0 +1,129 @@
1
+ import {
2
+ removeAgentsMdSection,
3
+ removeClaudeCodeHooks,
4
+ removeClaudeMdSection,
5
+ removeCodexMCP,
6
+ removeCursorMCP,
7
+ removeCursorRulesSection,
8
+ removeGeminiMCP,
9
+ removeGeminiMdSection,
10
+ removeGenericMCP
11
+ } from "./chunk-IS4IKWPL.js";
12
+ import {
13
+ hasFlag
14
+ } from "./chunk-SYPVELIW.js";
15
+ import {
16
+ output
17
+ } from "./chunk-ET6TNQOJ.js";
18
+
19
+ // src/commands/reset.ts
20
+ async function run(options) {
21
+ const { args, format } = options;
22
+ const wantClaudeCode = hasFlag(args, "--claude-code");
23
+ const wantCursor = hasFlag(args, "--cursor");
24
+ const wantCodex = hasFlag(args, "--codex");
25
+ const wantGemini = hasFlag(args, "--gemini");
26
+ const wantMCP = hasFlag(args, "--mcp");
27
+ const wantAll = hasFlag(args, "--all");
28
+ const noFlags = !wantClaudeCode && !wantCursor && !wantCodex && !wantGemini && !wantMCP && !wantAll;
29
+ if (noFlags) {
30
+ const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--codex] [--gemini] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --codex Remove Codex MCP configuration and AGENTS.md section\n --gemini Remove Gemini MCP configuration and GEMINI.md section\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
31
+ if (format === "text") {
32
+ process.stdout.write(msg);
33
+ } else {
34
+ output({ error: "No flags specified. Use --claude-code, --cursor, --codex, --gemini, --mcp, or --all." }, format);
35
+ }
36
+ return;
37
+ }
38
+ const result = {
39
+ removed: {
40
+ claudeCodeHooks: false,
41
+ claudeMd: false,
42
+ mcp: false,
43
+ cursor: false,
44
+ cursorRules: false,
45
+ codex: false,
46
+ agentsMd: false,
47
+ gemini: false,
48
+ geminiMd: false
49
+ }
50
+ };
51
+ if (wantClaudeCode || wantAll) {
52
+ const hooksRemoved = removeClaudeCodeHooks();
53
+ const mdRemoved = removeClaudeMdSection();
54
+ const mcpRemoved = removeGenericMCP();
55
+ result.removed.claudeCodeHooks = hooksRemoved;
56
+ result.removed.claudeMd = mdRemoved;
57
+ if (!wantMCP) {
58
+ result.removed.mcp = mcpRemoved;
59
+ }
60
+ }
61
+ if (wantCursor || wantAll) {
62
+ const removed = removeCursorMCP();
63
+ result.removed.cursor = removed;
64
+ const rulesRemoved = removeCursorRulesSection();
65
+ result.removed.cursorRules = rulesRemoved;
66
+ }
67
+ if (wantCodex || wantAll) {
68
+ const removed = removeCodexMCP();
69
+ result.removed.codex = removed;
70
+ const mdRemoved = removeAgentsMdSection();
71
+ result.removed.agentsMd = mdRemoved;
72
+ }
73
+ if (wantGemini || wantAll) {
74
+ const removed = removeGeminiMCP();
75
+ result.removed.gemini = removed;
76
+ const mdRemoved = removeGeminiMdSection();
77
+ result.removed.geminiMd = mdRemoved;
78
+ }
79
+ if (wantMCP || wantAll) {
80
+ const removed = removeGenericMCP();
81
+ result.removed.mcp = removed;
82
+ }
83
+ if (format === "text") {
84
+ printTextOutput(result);
85
+ return;
86
+ }
87
+ output(result, format);
88
+ }
89
+ function printTextOutput(result) {
90
+ const w = (s) => process.stdout.write(s);
91
+ const removed = result.removed;
92
+ if (removed.claudeCodeHooks) {
93
+ w("Removed Claude Code hooks from ~/.claude/settings.json\n");
94
+ }
95
+ if (removed.claudeMd) {
96
+ w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
97
+ }
98
+ if (removed.mcp) {
99
+ w("Removed MCP server from ~/.mcp.json\n");
100
+ }
101
+ if (removed.cursor) {
102
+ w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
103
+ }
104
+ if (removed.cursorRules) {
105
+ w("Removed MemRosetta section from ~/.cursorrules\n");
106
+ }
107
+ if (removed.codex) {
108
+ w("Removed Codex MCP from ~/.codex/config.toml\n");
109
+ }
110
+ if (removed.agentsMd) {
111
+ w("Removed MemRosetta section from AGENTS.md\n");
112
+ }
113
+ if (removed.gemini) {
114
+ w("Removed Gemini MCP from ~/.gemini/settings.json\n");
115
+ }
116
+ if (removed.geminiMd) {
117
+ w("Removed MemRosetta section from GEMINI.md\n");
118
+ }
119
+ const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules || removed.codex || removed.agentsMd || removed.gemini || removed.geminiMd;
120
+ if (!anyRemoved) {
121
+ w("Nothing to remove (no integrations were configured).\n");
122
+ }
123
+ w(
124
+ "\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
125
+ );
126
+ }
127
+ export {
128
+ run
129
+ };
@@ -0,0 +1,129 @@
1
+ import {
2
+ removeAgentsMdSection,
3
+ removeClaudeCodeHooks,
4
+ removeClaudeMdSection,
5
+ removeCodexMCP,
6
+ removeCursorMCP,
7
+ removeCursorRulesSection,
8
+ removeGeminiMCP,
9
+ removeGeminiMdSection,
10
+ removeGenericMCP
11
+ } from "./chunk-UOT33X3Q.js";
12
+ import {
13
+ hasFlag
14
+ } from "./chunk-SYPVELIW.js";
15
+ import {
16
+ output
17
+ } from "./chunk-ET6TNQOJ.js";
18
+
19
+ // src/commands/reset.ts
20
+ async function run(options) {
21
+ const { args, format } = options;
22
+ const wantClaudeCode = hasFlag(args, "--claude-code");
23
+ const wantCursor = hasFlag(args, "--cursor");
24
+ const wantCodex = hasFlag(args, "--codex");
25
+ const wantGemini = hasFlag(args, "--gemini");
26
+ const wantMCP = hasFlag(args, "--mcp");
27
+ const wantAll = hasFlag(args, "--all");
28
+ const noFlags = !wantClaudeCode && !wantCursor && !wantCodex && !wantGemini && !wantMCP && !wantAll;
29
+ if (noFlags) {
30
+ const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--codex] [--gemini] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --codex Remove Codex MCP configuration and AGENTS.md section\n --gemini Remove Gemini MCP configuration and GEMINI.md section\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
31
+ if (format === "text") {
32
+ process.stdout.write(msg);
33
+ } else {
34
+ output({ error: "No flags specified. Use --claude-code, --cursor, --codex, --gemini, --mcp, or --all." }, format);
35
+ }
36
+ return;
37
+ }
38
+ const result = {
39
+ removed: {
40
+ claudeCodeHooks: false,
41
+ claudeMd: false,
42
+ mcp: false,
43
+ cursor: false,
44
+ cursorRules: false,
45
+ codex: false,
46
+ agentsMd: false,
47
+ gemini: false,
48
+ geminiMd: false
49
+ }
50
+ };
51
+ if (wantClaudeCode || wantAll) {
52
+ const hooksRemoved = removeClaudeCodeHooks();
53
+ const mdRemoved = removeClaudeMdSection();
54
+ const mcpRemoved = removeGenericMCP();
55
+ result.removed.claudeCodeHooks = hooksRemoved;
56
+ result.removed.claudeMd = mdRemoved;
57
+ if (!wantMCP) {
58
+ result.removed.mcp = mcpRemoved;
59
+ }
60
+ }
61
+ if (wantCursor || wantAll) {
62
+ const removed = removeCursorMCP();
63
+ result.removed.cursor = removed;
64
+ const rulesRemoved = removeCursorRulesSection();
65
+ result.removed.cursorRules = rulesRemoved;
66
+ }
67
+ if (wantCodex || wantAll) {
68
+ const removed = removeCodexMCP();
69
+ result.removed.codex = removed;
70
+ const mdRemoved = removeAgentsMdSection();
71
+ result.removed.agentsMd = mdRemoved;
72
+ }
73
+ if (wantGemini || wantAll) {
74
+ const removed = removeGeminiMCP();
75
+ result.removed.gemini = removed;
76
+ const mdRemoved = removeGeminiMdSection();
77
+ result.removed.geminiMd = mdRemoved;
78
+ }
79
+ if (wantMCP || wantAll) {
80
+ const removed = removeGenericMCP();
81
+ result.removed.mcp = removed;
82
+ }
83
+ if (format === "text") {
84
+ printTextOutput(result);
85
+ return;
86
+ }
87
+ output(result, format);
88
+ }
89
+ function printTextOutput(result) {
90
+ const w = (s) => process.stdout.write(s);
91
+ const removed = result.removed;
92
+ if (removed.claudeCodeHooks) {
93
+ w("Removed Claude Code hooks from ~/.claude/settings.json\n");
94
+ }
95
+ if (removed.claudeMd) {
96
+ w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
97
+ }
98
+ if (removed.mcp) {
99
+ w("Removed MCP server from ~/.mcp.json\n");
100
+ }
101
+ if (removed.cursor) {
102
+ w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
103
+ }
104
+ if (removed.cursorRules) {
105
+ w("Removed MemRosetta section from ~/.cursorrules\n");
106
+ }
107
+ if (removed.codex) {
108
+ w("Removed Codex MCP from ~/.codex/config.toml\n");
109
+ }
110
+ if (removed.agentsMd) {
111
+ w("Removed MemRosetta section from AGENTS.md\n");
112
+ }
113
+ if (removed.gemini) {
114
+ w("Removed Gemini MCP from ~/.gemini/settings.json\n");
115
+ }
116
+ if (removed.geminiMd) {
117
+ w("Removed MemRosetta section from GEMINI.md\n");
118
+ }
119
+ const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules || removed.codex || removed.agentsMd || removed.gemini || removed.geminiMd;
120
+ if (!anyRemoved) {
121
+ w("Nothing to remove (no integrations were configured).\n");
122
+ }
123
+ w(
124
+ "\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
125
+ );
126
+ }
127
+ export {
128
+ run
129
+ };
@@ -0,0 +1,48 @@
1
+ import {
2
+ optionalOption,
3
+ requireOption
4
+ } from "./chunk-SYPVELIW.js";
5
+ import {
6
+ getEngine
7
+ } from "./chunk-VAVUPQZA.js";
8
+ import {
9
+ output,
10
+ outputError
11
+ } from "./chunk-ET6TNQOJ.js";
12
+ import {
13
+ getDefaultUserId
14
+ } from "./chunk-SEPYQK3J.js";
15
+
16
+ // src/commands/search.ts
17
+ async function run(options) {
18
+ const { args, format, db, noEmbeddings } = options;
19
+ const userId = optionalOption(args, "--user") ?? getDefaultUserId();
20
+ const query = requireOption(args, "--query", "query");
21
+ const limitRaw = optionalOption(args, "--limit");
22
+ const namespace = optionalOption(args, "--namespace");
23
+ const typesRaw = optionalOption(args, "--types");
24
+ const minConfidenceRaw = optionalOption(args, "--min-confidence");
25
+ const limit = limitRaw ? parseInt(limitRaw, 10) : 5;
26
+ if (isNaN(limit) || limit < 1) {
27
+ outputError("Invalid limit value", format);
28
+ process.exitCode = 1;
29
+ return;
30
+ }
31
+ const memoryTypes = typesRaw ? typesRaw.split(",") : void 0;
32
+ const minConfidence = minConfidenceRaw ? parseFloat(minConfidenceRaw) : void 0;
33
+ const engine = await getEngine({ db, noEmbeddings });
34
+ const response = await engine.search({
35
+ userId,
36
+ query,
37
+ namespace,
38
+ limit,
39
+ filters: {
40
+ memoryTypes,
41
+ minConfidence
42
+ }
43
+ });
44
+ output(response, format);
45
+ }
46
+ export {
47
+ run
48
+ };