toon-memory 2.9.4 → 2.9.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.
package/dist/cli/setup.js CHANGED
@@ -760,23 +760,31 @@ async function init(scope, agentFilter) {
760
760
  process.exit(1);
761
761
  }
762
762
  } else if (process.stdin.isTTY) {
763
- selected = await promptAgentSelection(agents);
764
- if (selected.length === 0) {
765
- console.log("\nNo se seleccionaron agentes. Nada instalado.\n");
766
- return;
767
- }
768
- finalScope = await select({
769
- message: "Scope:",
770
- choices: [
771
- { name: "Local (project)", value: "local" },
772
- { name: "Global (~home)", value: "global" }
773
- ],
774
- default: finalScope
775
- });
776
- const ok = await confirm({ message: "Proceed?", default: true });
777
- if (!ok) {
778
- console.log("\nInstallation cancelled.\n");
779
- return;
763
+ try {
764
+ selected = await promptAgentSelection(agents);
765
+ if (selected.length === 0) {
766
+ console.log("\nNo se seleccionaron agentes. Nada instalado.\n");
767
+ return;
768
+ }
769
+ finalScope = await select({
770
+ message: "Scope:",
771
+ choices: [
772
+ { name: "Local (project)", value: "local" },
773
+ { name: "Global (~home)", value: "global" }
774
+ ],
775
+ default: finalScope
776
+ });
777
+ const ok = await confirm({ message: "Proceed?", default: true });
778
+ if (!ok) {
779
+ console.log("\nInstallation cancelled.\n");
780
+ return;
781
+ }
782
+ } catch (e) {
783
+ if (e?.name === "ExitPromptError" || e?.message?.includes("SIGINT")) {
784
+ console.log("\nInstallation cancelled.\n");
785
+ return;
786
+ }
787
+ throw e;
780
788
  }
781
789
  } else {
782
790
  selected = agents;
@@ -1096,23 +1104,34 @@ async function interactiveInstall() {
1096
1104
  console.log("Run 'toon-memory init [--agent <name>]' for non-interactive installation.\n");
1097
1105
  return;
1098
1106
  }
1099
- const agents = detectAgents();
1100
- const selected = await promptAgentSelection(agents);
1101
- if (selected.length === 0) {
1102
- console.log("\nNo agents selected. Nothing installed.\n");
1103
- return;
1104
- }
1105
- const scope = await select({
1106
- message: "Scope:",
1107
- choices: [
1108
- { name: "Local (project)", value: "local" },
1109
- { name: "Global (~home)", value: "global" }
1110
- ]
1111
- });
1112
- const ok = await confirm({ message: "Proceed?", default: true });
1113
- if (!ok) {
1114
- console.log("\nInstallation cancelled.\n");
1115
- return;
1107
+ let agents;
1108
+ let selected;
1109
+ let scope;
1110
+ try {
1111
+ agents = detectAgents();
1112
+ selected = await promptAgentSelection(agents);
1113
+ if (selected.length === 0) {
1114
+ console.log("\nNo agents selected. Nothing installed.\n");
1115
+ return;
1116
+ }
1117
+ scope = await select({
1118
+ message: "Scope:",
1119
+ choices: [
1120
+ { name: "Local (project)", value: "local" },
1121
+ { name: "Global (~home)", value: "global" }
1122
+ ]
1123
+ });
1124
+ const ok = await confirm({ message: "Proceed?", default: true });
1125
+ if (!ok) {
1126
+ console.log("\nInstallation cancelled.\n");
1127
+ return;
1128
+ }
1129
+ } catch (e) {
1130
+ if (e?.name === "ExitPromptError" || e?.message?.includes("SIGINT")) {
1131
+ console.log("\nInstallation cancelled.\n");
1132
+ return;
1133
+ }
1134
+ throw e;
1116
1135
  }
1117
1136
  console.log(`
1118
1137
  Installing (${scope}) \u2014 ${selected.map((a) => a.name).join(", ")}...
package/mcp/server.js CHANGED
@@ -30184,7 +30184,7 @@ function registerResources(server2) {
30184
30184
 
30185
30185
  // src/mcp/server.ts
30186
30186
  var server = new McpServer(
30187
- { name: "toon-memory", version: "2.9.4" },
30187
+ { name: "toon-memory", version: "2.9.5" },
30188
30188
  { capabilities: { tools: { listChanged: true }, resources: { listChanged: true } } }
30189
30189
  );
30190
30190
  registerResources(server);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toon-memory",
3
- "version": "2.9.4",
3
+ "version": "2.9.5",
4
4
  "description": "MCP server giving AI coding agents offline, token-efficient persistent memory — 21 tools, 80% fewer tool calls, recall decisions, patterns, and bugs across sessions. No LLM, no server; works with 15+ agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -69,23 +69,31 @@ export async function init(scope?: string, agentFilter?: string[]): Promise<void
69
69
  process.exit(1)
70
70
  }
71
71
  } else if (process.stdin.isTTY) {
72
- selected = await promptAgentSelection(agents)
73
- if (selected.length === 0) {
74
- console.log("\nNo se seleccionaron agentes. Nada instalado.\n")
75
- return
76
- }
77
- finalScope = await select({
78
- message: "Scope:",
79
- choices: [
80
- { name: "Local (project)", value: "local" },
81
- { name: "Global (~home)", value: "global" }
82
- ],
83
- default: finalScope as "local" | "global"
84
- })
85
- const ok = await confirm({ message: "Proceed?", default: true })
86
- if (!ok) {
87
- console.log("\nInstallation cancelled.\n")
88
- return
72
+ try {
73
+ selected = await promptAgentSelection(agents)
74
+ if (selected.length === 0) {
75
+ console.log("\nNo se seleccionaron agentes. Nada instalado.\n")
76
+ return
77
+ }
78
+ finalScope = await select({
79
+ message: "Scope:",
80
+ choices: [
81
+ { name: "Local (project)", value: "local" },
82
+ { name: "Global (~home)", value: "global" }
83
+ ],
84
+ default: finalScope as "local" | "global"
85
+ })
86
+ const ok = await confirm({ message: "Proceed?", default: true })
87
+ if (!ok) {
88
+ console.log("\nInstallation cancelled.\n")
89
+ return
90
+ }
91
+ } catch (e: any) {
92
+ if (e?.name === "ExitPromptError" || e?.message?.includes("SIGINT")) {
93
+ console.log("\nInstallation cancelled.\n")
94
+ return
95
+ }
96
+ throw e
89
97
  }
90
98
  } else {
91
99
  selected = agents
@@ -490,25 +498,36 @@ export async function interactiveInstall(): Promise<void> {
490
498
  return
491
499
  }
492
500
 
493
- const agents = detectAgents()
494
- const selected = await promptAgentSelection(agents)
495
- if (selected.length === 0) {
496
- console.log("\nNo agents selected. Nothing installed.\n")
497
- return
498
- }
501
+ let agents: ReturnType<typeof detectAgents>
502
+ let selected: Awaited<ReturnType<typeof promptAgentSelection>>
503
+ let scope: string
504
+ try {
505
+ agents = detectAgents()
506
+ selected = await promptAgentSelection(agents)
507
+ if (selected.length === 0) {
508
+ console.log("\nNo agents selected. Nothing installed.\n")
509
+ return
510
+ }
499
511
 
500
- const scope = await select({
501
- message: "Scope:",
502
- choices: [
503
- { name: "Local (project)", value: "local" },
504
- { name: "Global (~home)", value: "global" }
505
- ]
506
- })
512
+ scope = await select({
513
+ message: "Scope:",
514
+ choices: [
515
+ { name: "Local (project)", value: "local" },
516
+ { name: "Global (~home)", value: "global" }
517
+ ]
518
+ })
507
519
 
508
- const ok = await confirm({ message: "Proceed?", default: true })
509
- if (!ok) {
510
- console.log("\nInstallation cancelled.\n")
511
- return
520
+ const ok = await confirm({ message: "Proceed?", default: true })
521
+ if (!ok) {
522
+ console.log("\nInstallation cancelled.\n")
523
+ return
524
+ }
525
+ } catch (e: any) {
526
+ if (e?.name === "ExitPromptError" || e?.message?.includes("SIGINT")) {
527
+ console.log("\nInstallation cancelled.\n")
528
+ return
529
+ }
530
+ throw e
512
531
  }
513
532
 
514
533
  console.log(`\nInstalling (${scope}) — ${selected.map((a) => a.name).join(", ")}...\n`)