anki-mcp-http 0.8.0 → 0.8.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.
Files changed (140) hide show
  1. package/LICENSE +5 -19
  2. package/README.md +74 -35
  3. package/dist/anki-config.service.d.ts +2 -2
  4. package/dist/anki-config.service.js +4 -4
  5. package/dist/app.module.d.ts +1 -1
  6. package/dist/app.module.js +7 -7
  7. package/dist/app.module.js.map +1 -1
  8. package/dist/bootstrap.d.ts +1 -1
  9. package/dist/bootstrap.js +4 -4
  10. package/dist/cli.js +13 -13
  11. package/dist/cli.js.map +1 -1
  12. package/dist/http/guards/origin-validation.guard.d.ts +1 -1
  13. package/dist/http/guards/origin-validation.guard.js +5 -5
  14. package/dist/main-http.js +3 -3
  15. package/dist/main-http.js.map +1 -1
  16. package/dist/main-stdio.js +2 -2
  17. package/dist/mcp/clients/__mocks__/anki-connect.client.js +1 -1
  18. package/dist/mcp/clients/anki-connect.client.d.ts +1 -1
  19. package/dist/mcp/clients/anki-connect.client.js +7 -7
  20. package/dist/mcp/config/anki-config.interface.js +1 -1
  21. package/dist/mcp/primitives/essential/index.d.ts +26 -26
  22. package/dist/mcp/primitives/essential/index.js +1 -4
  23. package/dist/mcp/primitives/essential/index.js.map +1 -1
  24. package/dist/mcp/primitives/essential/prompts/review-session.prompt.js +5 -5
  25. package/dist/mcp/primitives/essential/prompts/review-session.prompt.js.map +1 -1
  26. package/dist/mcp/primitives/essential/prompts/twenty-rules.prompt/index.js +10 -8
  27. package/dist/mcp/primitives/essential/prompts/twenty-rules.prompt/index.js.map +1 -1
  28. package/dist/mcp/primitives/essential/resources/system-info.resource.js +12 -12
  29. package/dist/mcp/primitives/essential/tools/add-note.tool.d.ts +3 -3
  30. package/dist/mcp/primitives/essential/tools/add-note.tool.js +27 -30
  31. package/dist/mcp/primitives/essential/tools/add-note.tool.js.map +1 -1
  32. package/dist/mcp/primitives/essential/tools/create-deck.tool.d.ts +2 -2
  33. package/dist/mcp/primitives/essential/tools/create-deck.tool.js +15 -15
  34. package/dist/mcp/primitives/essential/tools/create-deck.tool.js.map +1 -1
  35. package/dist/mcp/primitives/essential/tools/create-model.tool.d.ts +3 -3
  36. package/dist/mcp/primitives/essential/tools/create-model.tool.js +20 -18
  37. package/dist/mcp/primitives/essential/tools/create-model.tool.js.map +1 -1
  38. package/dist/mcp/primitives/essential/tools/delete-notes.tool.d.ts +2 -2
  39. package/dist/mcp/primitives/essential/tools/delete-notes.tool.js +22 -22
  40. package/dist/mcp/primitives/essential/tools/delete-notes.tool.js.map +1 -1
  41. package/dist/mcp/primitives/essential/tools/find-notes.tool.d.ts +2 -2
  42. package/dist/mcp/primitives/essential/tools/find-notes.tool.js +14 -14
  43. package/dist/mcp/primitives/essential/tools/find-notes.tool.js.map +1 -1
  44. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.d.ts +2 -2
  45. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.js +17 -15
  46. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.js.map +1 -1
  47. package/dist/mcp/primitives/essential/tools/list-decks.tool.d.ts +2 -2
  48. package/dist/mcp/primitives/essential/tools/list-decks.tool.js +10 -10
  49. package/dist/mcp/primitives/essential/tools/list-decks.tool.js.map +1 -1
  50. package/dist/mcp/primitives/essential/tools/mediaActions/actions/deleteMediaFile.action.d.ts +1 -1
  51. package/dist/mcp/primitives/essential/tools/mediaActions/actions/deleteMediaFile.action.js +3 -3
  52. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.d.ts +1 -1
  53. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.js +1 -1
  54. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.js.map +1 -1
  55. package/dist/mcp/primitives/essential/tools/mediaActions/actions/retrieveMediaFile.action.d.ts +1 -1
  56. package/dist/mcp/primitives/essential/tools/mediaActions/actions/retrieveMediaFile.action.js +3 -3
  57. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.d.ts +1 -1
  58. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.js +7 -7
  59. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.js.map +1 -1
  60. package/dist/mcp/primitives/essential/tools/mediaActions/index.d.ts +5 -5
  61. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.d.ts +3 -3
  62. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.js +23 -17
  63. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.js.map +1 -1
  64. package/dist/mcp/primitives/essential/tools/model-field-names.tool.d.ts +2 -2
  65. package/dist/mcp/primitives/essential/tools/model-field-names.tool.js +20 -17
  66. package/dist/mcp/primitives/essential/tools/model-field-names.tool.js.map +1 -1
  67. package/dist/mcp/primitives/essential/tools/model-names.tool.d.ts +3 -3
  68. package/dist/mcp/primitives/essential/tools/model-names.tool.js +13 -11
  69. package/dist/mcp/primitives/essential/tools/model-names.tool.js.map +1 -1
  70. package/dist/mcp/primitives/essential/tools/model-styling.tool.d.ts +2 -2
  71. package/dist/mcp/primitives/essential/tools/model-styling.tool.js +11 -11
  72. package/dist/mcp/primitives/essential/tools/model-styling.tool.js.map +1 -1
  73. package/dist/mcp/primitives/essential/tools/notes-info.tool.d.ts +2 -2
  74. package/dist/mcp/primitives/essential/tools/notes-info.tool.js +19 -19
  75. package/dist/mcp/primitives/essential/tools/notes-info.tool.js.map +1 -1
  76. package/dist/mcp/primitives/essential/tools/present-card.tool.d.ts +2 -2
  77. package/dist/mcp/primitives/essential/tools/present-card.tool.js +11 -11
  78. package/dist/mcp/primitives/essential/tools/present-card.tool.js.map +1 -1
  79. package/dist/mcp/primitives/essential/tools/rate-card.tool.d.ts +2 -2
  80. package/dist/mcp/primitives/essential/tools/rate-card.tool.js +19 -14
  81. package/dist/mcp/primitives/essential/tools/rate-card.tool.js.map +1 -1
  82. package/dist/mcp/primitives/essential/tools/sync.tool.d.ts +3 -3
  83. package/dist/mcp/primitives/essential/tools/sync.tool.js +8 -8
  84. package/dist/mcp/primitives/essential/tools/sync.tool.js.map +1 -1
  85. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.d.ts +2 -2
  86. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.js +19 -19
  87. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.js.map +1 -1
  88. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.d.ts +3 -3
  89. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.js +32 -32
  90. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.js.map +1 -1
  91. package/dist/mcp/primitives/gui/index.d.ts +17 -17
  92. package/dist/mcp/primitives/gui/index.js.map +1 -1
  93. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.d.ts +2 -2
  94. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.js +22 -22
  95. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.js.map +1 -1
  96. package/dist/mcp/primitives/gui/tools/gui-browse.tool.d.ts +3 -3
  97. package/dist/mcp/primitives/gui/tools/gui-browse.tool.js +15 -14
  98. package/dist/mcp/primitives/gui/tools/gui-browse.tool.js.map +1 -1
  99. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.d.ts +3 -3
  100. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.js +13 -13
  101. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.js.map +1 -1
  102. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.d.ts +3 -3
  103. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.js +12 -12
  104. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.js.map +1 -1
  105. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.d.ts +2 -2
  106. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.js +15 -12
  107. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.js.map +1 -1
  108. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.d.ts +2 -2
  109. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.js +13 -12
  110. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.js.map +1 -1
  111. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.d.ts +2 -2
  112. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.js +18 -15
  113. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.js.map +1 -1
  114. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.d.ts +3 -3
  115. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.js +15 -14
  116. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.js.map +1 -1
  117. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.d.ts +3 -3
  118. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.js +15 -15
  119. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.js.map +1 -1
  120. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.d.ts +3 -3
  121. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.js +15 -15
  122. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.js.map +1 -1
  123. package/dist/mcp/primitives/gui/tools/gui-undo.tool.d.ts +3 -3
  124. package/dist/mcp/primitives/gui/tools/gui-undo.tool.js +15 -15
  125. package/dist/mcp/primitives/gui/tools/gui-undo.tool.js.map +1 -1
  126. package/dist/mcp/types/anki.types.d.ts +2 -2
  127. package/dist/mcp/utils/anki.utils.d.ts +3 -3
  128. package/dist/mcp/utils/anki.utils.js +42 -38
  129. package/dist/mcp/utils/anki.utils.js.map +1 -1
  130. package/dist/mcp/utils/markdown.utils.js +16 -12
  131. package/dist/mcp/utils/markdown.utils.js.map +1 -1
  132. package/dist/mcp/utils/mcpb-workarounds.js +2 -2
  133. package/dist/mcp/utils/mcpb-workarounds.js.map +1 -1
  134. package/dist/services/ngrok.service.js +30 -30
  135. package/dist/services/ngrok.service.js.map +1 -1
  136. package/dist/test-fixtures/mock-data.d.ts +2 -2
  137. package/dist/test-fixtures/mock-data.js +46 -46
  138. package/dist/test-fixtures/mock-data.js.map +1 -1
  139. package/dist/tsconfig.build.tsbuildinfo +1 -1
  140. package/package.json +12 -7
@@ -1,5 +1,5 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiDeckOverviewTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -26,13 +26,15 @@ let GuiDeckOverviewTool = GuiDeckOverviewTool_1 = class GuiDeckOverviewTool {
26
26
  try {
27
27
  this.logger.log(`Opening Deck Overview for deck "${name}"`);
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const success = await this.ankiClient.invoke('guiDeckOverview', { name });
29
+ const success = await this.ankiClient.invoke("guiDeckOverview", {
30
+ name,
31
+ });
30
32
  await context.reportProgress({ progress: 100, total: 100 });
31
33
  if (!success) {
32
34
  this.logger.warn(`Failed to open Deck Overview for deck "${name}"`);
33
35
  return (0, anki_utils_1.createErrorResponse)(new Error(`Failed to open Deck Overview for deck "${name}"`), {
34
36
  deckName: name,
35
- hint: 'Deck not found or Anki GUI is not responding. Use list_decks to see available decks.',
37
+ hint: "Deck not found or Anki GUI is not responding. Use list_decks to see available decks.",
36
38
  });
37
39
  }
38
40
  this.logger.log(`Deck Overview opened for deck "${name}"`);
@@ -40,22 +42,23 @@ let GuiDeckOverviewTool = GuiDeckOverviewTool_1 = class GuiDeckOverviewTool {
40
42
  success: true,
41
43
  deckName: name,
42
44
  message: `Deck Overview opened for deck "${name}"`,
43
- hint: 'The deck statistics and study options are now visible in the Anki GUI.',
45
+ hint: "The deck statistics and study options are now visible in the Anki GUI.",
44
46
  });
45
47
  }
46
48
  catch (error) {
47
- this.logger.error('Failed to open Deck Overview', error);
49
+ this.logger.error("Failed to open Deck Overview", error);
48
50
  if (error instanceof Error) {
49
- if (error.message.includes('not found') || error.message.includes('invalid')) {
51
+ if (error.message.includes("not found") ||
52
+ error.message.includes("invalid")) {
50
53
  return (0, anki_utils_1.createErrorResponse)(error, {
51
54
  deckName: name,
52
- hint: 'Deck not found. Use list_decks to see available decks.',
55
+ hint: "Deck not found. Use list_decks to see available decks.",
53
56
  });
54
57
  }
55
58
  }
56
59
  return (0, anki_utils_1.createErrorResponse)(error, {
57
60
  deckName: name,
58
- hint: 'Make sure Anki is running and the deck name is correct',
61
+ hint: "Make sure Anki is running and the deck name is correct",
59
62
  });
60
63
  }
61
64
  }
@@ -63,15 +66,15 @@ let GuiDeckOverviewTool = GuiDeckOverviewTool_1 = class GuiDeckOverviewTool {
63
66
  exports.GuiDeckOverviewTool = GuiDeckOverviewTool;
64
67
  __decorate([
65
68
  (0, mcp_nest_1.Tool)({
66
- name: 'guiDeckOverview',
67
- description: 'Open Anki Deck Overview dialog for a specific deck. Shows deck statistics and study options. Returns true if succeeded. ' +
68
- 'IMPORTANT: Only use when user explicitly requests opening deck overview. ' +
69
- 'This tool is for deck management and note organization workflows, NOT for review sessions.',
69
+ name: "guiDeckOverview",
70
+ description: "Open Anki Deck Overview dialog for a specific deck. Shows deck statistics and study options. Returns true if succeeded. " +
71
+ "IMPORTANT: Only use when user explicitly requests opening deck overview. " +
72
+ "This tool is for deck management and note organization workflows, NOT for review sessions.",
70
73
  parameters: zod_1.z.object({
71
74
  name: zod_1.z
72
75
  .string()
73
76
  .min(1)
74
- .describe('Deck name to open (get from list_decks)'),
77
+ .describe("Deck name to open (get from list_decks)"),
75
78
  }),
76
79
  }),
77
80
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-deck-overview.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-deck-overview.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;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AAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YAEzD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;oBAC7E,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;wBAChC,QAAQ,EAAE,IAAI;wBACd,IAAI,EAAE,wDAAwD;qBAC/D,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,wDAAwD;aAC/D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAjEY,kDAAmB;AAkBxB;IAbL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,0HAA0H;YAC1H,2EAA2E;YAC3E,4FAA4F;QAC9F,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC;iBACJ,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,yCAAyC,CAAC;SACvD,CAAC;KACH,CAAC;;;;0DA+CD;8BAhEU,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,mBAAmB,CAiE/B"}
1
+ {"version":3,"file":"gui-deck-overview.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-deck-overview.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAGgC;AAMzB,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAGD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EAAE,KAAK,CAAC,CAAC;YAEzD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IACE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACnC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EACjC,CAAC;oBACD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;wBAChC,QAAQ,EAAE,IAAI;wBACd,IAAI,EAAE,wDAAwD;qBAC/D,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,wDAAwD;aAC/D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAtEY,kDAAmB;AAkBxB;IAbL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,0HAA0H;YAC1H,2EAA2E;YAC3E,4FAA4F;QAC9F,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC;iBACJ,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,yCAAyC,CAAC;SACvD,CAAC;KACH,CAAC;;;;0DAoDD;8BArEU,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,mBAAmB,CAsE/B"}
@@ -1,5 +1,5 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiEditNoteTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -26,29 +26,30 @@ let GuiEditNoteTool = GuiEditNoteTool_1 = class GuiEditNoteTool {
26
26
  try {
27
27
  this.logger.log(`Opening note editor for note ${note}`);
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- await this.ankiClient.invoke('guiEditNote', { note });
29
+ await this.ankiClient.invoke("guiEditNote", { note });
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
31
  this.logger.log(`Note editor opened for note ${note}`);
32
32
  return (0, anki_utils_1.createSuccessResponse)({
33
33
  success: true,
34
34
  noteId: note,
35
35
  message: `Note editor opened for note ${note}`,
36
- hint: 'The user can now edit the note fields, tags, and cards in the Anki GUI. Changes will be saved when they close the editor.',
36
+ hint: "The user can now edit the note fields, tags, and cards in the Anki GUI. Changes will be saved when they close the editor.",
37
37
  });
38
38
  }
39
39
  catch (error) {
40
- this.logger.error('Failed to open note editor', error);
40
+ this.logger.error("Failed to open note editor", error);
41
41
  if (error instanceof Error) {
42
- if (error.message.includes('not found') || error.message.includes('invalid')) {
42
+ if (error.message.includes("not found") ||
43
+ error.message.includes("invalid")) {
43
44
  return (0, anki_utils_1.createErrorResponse)(error, {
44
45
  noteId: note,
45
- hint: 'Note not found. Use findNotes to search for notes and get valid note IDs.',
46
+ hint: "Note not found. Use findNotes to search for notes and get valid note IDs.",
46
47
  });
47
48
  }
48
49
  }
49
50
  return (0, anki_utils_1.createErrorResponse)(error, {
50
51
  noteId: note,
51
- hint: 'Make sure Anki is running and the note ID is valid',
52
+ hint: "Make sure Anki is running and the note ID is valid",
52
53
  });
53
54
  }
54
55
  }
@@ -56,16 +57,16 @@ let GuiEditNoteTool = GuiEditNoteTool_1 = class GuiEditNoteTool {
56
57
  exports.GuiEditNoteTool = GuiEditNoteTool;
57
58
  __decorate([
58
59
  (0, mcp_nest_1.Tool)({
59
- name: 'guiEditNote',
60
- description: 'Open Anki note editor dialog for a specific note ID. Allows manual editing of note fields, tags, and cards in the GUI. ' +
61
- 'IMPORTANT: Only use when user explicitly requests editing a note via GUI. ' +
62
- 'This tool is for note editing workflows when user wants to manually edit in Anki interface. ' +
63
- 'For programmatic editing, use updateNoteFields instead.',
60
+ name: "guiEditNote",
61
+ description: "Open Anki note editor dialog for a specific note ID. Allows manual editing of note fields, tags, and cards in the GUI. " +
62
+ "IMPORTANT: Only use when user explicitly requests editing a note via GUI. " +
63
+ "This tool is for note editing workflows when user wants to manually edit in Anki interface. " +
64
+ "For programmatic editing, use updateNoteFields instead.",
64
65
  parameters: zod_1.z.object({
65
66
  note: zod_1.z
66
67
  .number()
67
68
  .positive()
68
- .describe('Note ID to edit (get from findNotes or notesInfo)'),
69
+ .describe("Note ID to edit (get from findNotes or notesInfo)"),
69
70
  }),
70
71
  }),
71
72
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-edit-note.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-edit-note.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,eAAe,uBAArB,MAAM,eAAe;IAGG;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;IAE3D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAgBxD,AAAN,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,EAAoB,EAAE,OAAgB;QAC5D,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gCAAgC,IAAI,EAAE,CAAC,CAAC;YACxD,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAG3D,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAO,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;YAE5D,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,MAAM,CAAC,GAAG,C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Q,CAAC,WAAW,CAAC;oBACnC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EACjC,CAAC;oBACD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;wBAChC,MAAM,EAAE,IAAI;wBACZ,IAAI,EAAE,2EAA2E;qBAClF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,MAAM,EAAE,IAAI;gBACZ,IAAI,EAAE,oDAAoD;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAzDY,0CAAe;AAmBpB;IAdL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,yHAAyH;YACzH,4EAA4E;YAC5E,8FAA8F;YAC9F,yDAAyD;QAC3D,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,mDAAmD,CAAC;SACjE,CAAC;KACH,CAAC;;;;kDAsCD;0BAxDU,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,eAAe,CAyD3B"}
@@ -1,5 +1,5 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiSelectCardTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -26,13 +26,15 @@ let GuiSelectCardTool = GuiSelectCardTool_1 = class GuiSelectCardTool {
26
26
  try {
27
27
  this.logger.log(`Selecting card ${card} in Card Browser`);
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const success = await this.ankiClient.invoke('guiSelectCard', { card });
29
+ const success = await this.ankiClient.invoke("guiSelectCard", {
30
+ card,
31
+ });
30
32
  await context.reportProgress({ progress: 100, total: 100 });
31
33
  if (!success) {
32
- this.logger.warn('Card Browser is not open');
33
- return (0, anki_utils_1.createErrorResponse)(new Error('Card Browser is not open'), {
34
+ this.logger.warn("Card Browser is not open");
35
+ return (0, anki_utils_1.createErrorResponse)(new Error("Card Browser is not open"), {
34
36
  cardId: card,
35
- hint: 'Use guiBrowse to open the Card Browser first, then try selecting the card again.',
37
+ hint: "Use guiBrowse to open the Card Browser first, then try selecting the card again.",
36
38
  });
37
39
  }
38
40
  this.logger.log(`Successfully selected card ${card} in Card Browser`);
@@ -41,22 +43,23 @@ let GuiSelectCardTool = GuiSelectCardTool_1 = class GuiSelectCardTool {
41
43
  cardId: card,
42
44
  browserOpen: true,
43
45
  message: `Successfully selected card ${card} in Card Browser`,
44
- hint: 'The card is now selected. Use guiEditNote to edit the associated note, or guiSelectedNotes to get note IDs.',
46
+ hint: "The card is now selected. Use guiEditNote to edit the associated note, or guiSelectedNotes to get note IDs.",
45
47
  });
46
48
  }
47
49
  catch (error) {
48
- this.logger.error('Failed to select card in browser', error);
50
+ this.logger.error("Failed to select card in browser", error);
49
51
  if (error instanceof Error) {
50
- if (error.message.includes('not found') || error.message.includes('invalid')) {
52
+ if (error.message.includes("not found") ||
53
+ error.message.includes("invalid")) {
51
54
  return (0, anki_utils_1.createErrorResponse)(error, {
52
55
  cardId: card,
53
- hint: 'Card ID not found. Make sure the card exists and is visible in the current browser search.',
56
+ hint: "Card ID not found. Make sure the card exists and is visible in the current browser search.",
54
57
  });
55
58
  }
56
59
  }
57
60
  return (0, anki_utils_1.createErrorResponse)(error, {
58
61
  cardId: card,
59
- hint: 'Make sure Anki is running, the Card Browser is open, and the card ID is valid',
62
+ hint: "Make sure Anki is running, the Card Browser is open, and the card ID is valid",
60
63
  });
61
64
  }
62
65
  }
@@ -64,16 +67,16 @@ let GuiSelectCardTool = GuiSelectCardTool_1 = class GuiSelectCardTool {
64
67
  exports.GuiSelectCardTool = GuiSelectCardTool;
65
68
  __decorate([
66
69
  (0, mcp_nest_1.Tool)({
67
- name: 'guiSelectCard',
68
- description: 'Select a specific card in an open Card Browser window. Returns true if browser is open and card was selected, false if browser is not open. ' +
69
- 'IMPORTANT: Only use when user explicitly requests selecting a card in the browser. ' +
70
- 'This tool is for note editing/creation workflows, NOT for review sessions. ' +
71
- 'The Card Browser must already be open (use guiBrowse first).',
70
+ name: "guiSelectCard",
71
+ description: "Select a specific card in an open Card Browser window. Returns true if browser is open and card was selected, false if browser is not open. " +
72
+ "IMPORTANT: Only use when user explicitly requests selecting a card in the browser. " +
73
+ "This tool is for note editing/creation workflows, NOT for review sessions. " +
74
+ "The Card Browser must already be open (use guiBrowse first).",
72
75
  parameters: zod_1.z.object({
73
76
  card: zod_1.z
74
77
  .number()
75
78
  .positive()
76
- .describe('Card ID to select in the browser (get from guiBrowse results)'),
79
+ .describe("Card ID to select in the browser (get from guiBrowse results)"),
77
80
  }),
78
81
  }),
79
82
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-select-card.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-select-card.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAGC;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAE7D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAgBxD,AAAN,KAAK,CAAC,aAAa,CAAC,EAAE,IAAI,EAAoB,EAAE,OAAgB;QAC9D,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,CAAC;YAC1D,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EA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C;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAvEY,8CAAiB;AAqBtB;IAhBL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,8IAA8I;YAC9I,qFAAqF;YACrF,6EAA6E;YAC7E,8DAA8D;QAChE,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,+DAA+D,CAChE;SACJ,CAAC;KACH,CAAC;;;;sDAkDD;4BAtEU,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,iBAAiB,CAuE7B"}
@@ -1,10 +1,10 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiSelectedNotesTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiSelectedNotes(_args: {}, context: Context): Promise<{
7
+ guiSelectedNotes(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;
@@ -24,9 +24,9 @@ let GuiSelectedNotesTool = GuiSelectedNotesTool_1 = class GuiSelectedNotesTool {
24
24
  }
25
25
  async guiSelectedNotes(_args, context) {
26
26
  try {
27
- this.logger.log('Getting selected notes from Card Browser');
27
+ this.logger.log("Getting selected notes from Card Browser");
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const noteIds = await this.ankiClient.invoke('guiSelectedNotes');
29
+ const noteIds = await this.ankiClient.invoke("guiSelectedNotes");
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
31
  this.logger.log(`Retrieved ${noteIds.length} selected note(s) from Card Browser`);
32
32
  if (noteIds.length === 0) {
@@ -34,8 +34,8 @@ let GuiSelectedNotesTool = GuiSelectedNotesTool_1 = class GuiSelectedNotesTool {
34
34
  success: true,
35
35
  noteIds: [],
36
36
  noteCount: 0,
37
- message: 'No notes are currently selected in the Card Browser',
38
- hint: 'Open the Card Browser (guiBrowse) and select some cards/notes first.',
37
+ message: "No notes are currently selected in the Card Browser",
38
+ hint: "Open the Card Browser (guiBrowse) and select some cards/notes first.",
39
39
  });
40
40
  }
41
41
  return (0, anki_utils_1.createSuccessResponse)({
@@ -43,20 +43,21 @@ let GuiSelectedNotesTool = GuiSelectedNotesTool_1 = class GuiSelectedNotesTool {
43
43
  noteIds,
44
44
  noteCount: noteIds.length,
45
45
  message: `Retrieved ${noteIds.length} selected note ID(s) from Card Browser`,
46
- hint: 'Use notesInfo to get details about these notes, or updateNoteFields/deleteNotes to modify them.',
46
+ hint: "Use notesInfo to get details about these notes, or updateNoteFields/deleteNotes to modify them.",
47
47
  });
48
48
  }
49
49
  catch (error) {
50
- this.logger.error('Failed to get selected notes', error);
50
+ this.logger.error("Failed to get selected notes", error);
51
51
  if (error instanceof Error) {
52
- if (error.message.includes('browser') || error.message.includes('not open')) {
52
+ if (error.message.includes("browser") ||
53
+ error.message.includes("not open")) {
53
54
  return (0, anki_utils_1.createErrorResponse)(error, {
54
- hint: 'Card Browser is not open. Use guiBrowse to open it first.',
55
+ hint: "Card Browser is not open. Use guiBrowse to open it first.",
55
56
  });
56
57
  }
57
58
  }
58
59
  return (0, anki_utils_1.createErrorResponse)(error, {
59
- hint: 'Make sure Anki is running and the Card Browser is open',
60
+ hint: "Make sure Anki is running and the Card Browser is open",
60
61
  });
61
62
  }
62
63
  }
@@ -64,11 +65,11 @@ let GuiSelectedNotesTool = GuiSelectedNotesTool_1 = class GuiSelectedNotesTool {
64
65
  exports.GuiSelectedNotesTool = GuiSelectedNotesTool;
65
66
  __decorate([
66
67
  (0, mcp_nest_1.Tool)({
67
- name: 'guiSelectedNotes',
68
- description: 'Get the IDs of notes currently selected in the Card Browser. Returns array of note IDs (empty if no selection). ' +
69
- 'IMPORTANT: Only use when user explicitly requests getting selected notes. ' +
70
- 'This tool is for note editing/creation workflows, NOT for review sessions. ' +
71
- 'The Card Browser must be open with cards selected.',
68
+ name: "guiSelectedNotes",
69
+ description: "Get the IDs of notes currently selected in the Card Browser. Returns array of note IDs (empty if no selection). " +
70
+ "IMPORTANT: Only use when user explicitly requests getting selected notes. " +
71
+ "This tool is for note editing/creation workflows, NOT for review sessions. " +
72
+ "The Card Browser must be open with cards selected.",
72
73
  parameters: zod_1.z.object({}),
73
74
  }),
74
75
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-selected-notes.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-selected-notes.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAGF;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEhE,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAWxD,AAAN,KAAK,CAAC,gBAAgB,CAAC,KAAS,EAAE,OAAgB;QAChD,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;YAC5D,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAG3D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAW,kBAAkB,CAAC,CAAC;YAE3E,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,MA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AAE,sEAAsE;iBAC7E,CAAC,CAAC;YACL,CAAC;YAED,OAAO,IAAA,kCAAqB,EAAC;gBAC3B,OAAO,EAAE,IAAI;gBACb,OAAO;gBACP,SAAS,EAAE,OAAO,CAAC,MAAM;gBACzB,OAAO,EAAE,aAAa,OAAO,CAAC,MAAM,wCAAwC;gBAC5E,IAAI,EAAE,iGAAiG;aACxG,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YAEzD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IACE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;oBACjC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAClC,CAAC;oBACD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;wBAChC,IAAI,EAAE,2DAA2D;qBAClE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,IAAI,EAAE,wDAAwD;aAC/D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAhEY,oDAAoB;AAczB;IATL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,kHAAkH;YAClH,4EAA4E;YAC5E,6EAA6E;YAC7E,oDAAoD;QACtD,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;4DAkDD;+BA/DU,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,oBAAoB,CAgEhC"}
@@ -1,10 +1,10 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiShowAnswerTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiShowAnswer(_args: {}, context: Context): Promise<{
7
+ guiShowAnswer(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;
@@ -24,31 +24,31 @@ let GuiShowAnswerTool = GuiShowAnswerTool_1 = class GuiShowAnswerTool {
24
24
  }
25
25
  async guiShowAnswer(_args, context) {
26
26
  try {
27
- this.logger.log('Showing answer side of current card');
27
+ this.logger.log("Showing answer side of current card");
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const inReview = await this.ankiClient.invoke('guiShowAnswer');
29
+ const inReview = await this.ankiClient.invoke("guiShowAnswer");
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
31
  if (!inReview) {
32
- this.logger.warn('Not in review mode');
32
+ this.logger.warn("Not in review mode");
33
33
  return (0, anki_utils_1.createSuccessResponse)({
34
34
  success: true,
35
35
  inReview: false,
36
- message: 'Not in review mode - answer cannot be shown',
37
- hint: 'Start reviewing a deck in Anki to use this tool.',
36
+ message: "Not in review mode - answer cannot be shown",
37
+ hint: "Start reviewing a deck in Anki to use this tool.",
38
38
  });
39
39
  }
40
- this.logger.log('Answer side shown');
40
+ this.logger.log("Answer side shown");
41
41
  return (0, anki_utils_1.createSuccessResponse)({
42
42
  success: true,
43
43
  inReview: true,
44
- message: 'Answer side is now displayed',
45
- hint: 'Use guiCurrentCard to get full card details including the answer content.',
44
+ message: "Answer side is now displayed",
45
+ hint: "Use guiCurrentCard to get full card details including the answer content.",
46
46
  });
47
47
  }
48
48
  catch (error) {
49
- this.logger.error('Failed to show answer', error);
49
+ this.logger.error("Failed to show answer", error);
50
50
  return (0, anki_utils_1.createErrorResponse)(error, {
51
- hint: 'Make sure Anki is running, GUI is visible, and you are in review mode',
51
+ hint: "Make sure Anki is running, GUI is visible, and you are in review mode",
52
52
  });
53
53
  }
54
54
  }
@@ -56,11 +56,11 @@ let GuiShowAnswerTool = GuiShowAnswerTool_1 = class GuiShowAnswerTool {
56
56
  exports.GuiShowAnswerTool = GuiShowAnswerTool;
57
57
  __decorate([
58
58
  (0, mcp_nest_1.Tool)({
59
- name: 'guiShowAnswer',
60
- description: 'Show the answer side of the current card in review mode. Returns true if in review mode, false otherwise. ' +
61
- 'CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to view the answer side to verify content. ' +
62
- 'NEVER use this for conducting review sessions. Use the dedicated review tools (present_card) instead. ' +
63
- 'IMPORTANT: Only use when user explicitly requests showing the answer.',
59
+ name: "guiShowAnswer",
60
+ description: "Show the answer side of the current card in review mode. Returns true if in review mode, false otherwise. " +
61
+ "CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to view the answer side to verify content. " +
62
+ "NEVER use this for conducting review sessions. Use the dedicated review tools (present_card) instead. " +
63
+ "IMPORTANT: Only use when user explicitly requests showing the answer.",
64
64
  parameters: zod_1.z.object({}),
65
65
  }),
66
66
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-show-answer.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-show-answer.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAGC;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAE7D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAWxD,AAAN,KAAK,CAAC,aAAa,CAAC,KAAS,EAAE,OAAgB;QAC7C,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACvD,MAAM,OAAO,CAAC,cAAc,CAAC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BAC3B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,8BAA8B;gBACvC,IAAI,EAAE,2EAA2E;aAClF,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YAElD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,IAAI,EAAE,uEAAuE;aAC9E,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAlDY,8CAAiB;AActB;IATL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,4GAA4G;YAC5G,6HAA6H;YAC7H,wGAAwG;YACxG,uEAAuE;QACzE,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;sDAoCD;4BAjDU,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,iBAAiB,CAkD7B"}
@@ -1,10 +1,10 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiShowQuestionTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiShowQuestion(_args: {}, context: Context): Promise<{
7
+ guiShowQuestion(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;
@@ -24,31 +24,31 @@ let GuiShowQuestionTool = GuiShowQuestionTool_1 = class GuiShowQuestionTool {
24
24
  }
25
25
  async guiShowQuestion(_args, context) {
26
26
  try {
27
- this.logger.log('Showing question side of current card');
27
+ this.logger.log("Showing question side of current card");
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const inReview = await this.ankiClient.invoke('guiShowQuestion');
29
+ const inReview = await this.ankiClient.invoke("guiShowQuestion");
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
31
  if (!inReview) {
32
- this.logger.warn('Not in review mode');
32
+ this.logger.warn("Not in review mode");
33
33
  return (0, anki_utils_1.createSuccessResponse)({
34
34
  success: true,
35
35
  inReview: false,
36
- message: 'Not in review mode - question cannot be shown',
37
- hint: 'Start reviewing a deck in Anki to use this tool.',
36
+ message: "Not in review mode - question cannot be shown",
37
+ hint: "Start reviewing a deck in Anki to use this tool.",
38
38
  });
39
39
  }
40
- this.logger.log('Question side shown');
40
+ this.logger.log("Question side shown");
41
41
  return (0, anki_utils_1.createSuccessResponse)({
42
42
  success: true,
43
43
  inReview: true,
44
- message: 'Question side is now displayed',
45
- hint: 'Use guiCurrentCard to get the card details, or guiShowAnswer to reveal the answer.',
44
+ message: "Question side is now displayed",
45
+ hint: "Use guiCurrentCard to get the card details, or guiShowAnswer to reveal the answer.",
46
46
  });
47
47
  }
48
48
  catch (error) {
49
- this.logger.error('Failed to show question', error);
49
+ this.logger.error("Failed to show question", error);
50
50
  return (0, anki_utils_1.createErrorResponse)(error, {
51
- hint: 'Make sure Anki is running, GUI is visible, and you are in review mode',
51
+ hint: "Make sure Anki is running, GUI is visible, and you are in review mode",
52
52
  });
53
53
  }
54
54
  }
@@ -56,11 +56,11 @@ let GuiShowQuestionTool = GuiShowQuestionTool_1 = class GuiShowQuestionTool {
56
56
  exports.GuiShowQuestionTool = GuiShowQuestionTool;
57
57
  __decorate([
58
58
  (0, mcp_nest_1.Tool)({
59
- name: 'guiShowQuestion',
60
- description: 'Show the question side of the current card in review mode. Returns true if in review mode, false otherwise. ' +
61
- 'CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to view the question side to verify content. ' +
62
- 'NEVER use this for conducting review sessions. Use the dedicated review tools (present_card) instead. ' +
63
- 'IMPORTANT: Only use when user explicitly requests showing the question.',
59
+ name: "guiShowQuestion",
60
+ description: "Show the question side of the current card in review mode. Returns true if in review mode, false otherwise. " +
61
+ "CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to view the question side to verify content. " +
62
+ "NEVER use this for conducting review sessions. Use the dedicated review tools (present_card) instead. " +
63
+ "IMPORTANT: Only use when user explicitly requests showing the question.",
64
64
  parameters: zod_1.z.object({}),
65
65
  }),
66
66
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-show-question.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-show-question.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAGD;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAE/D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAWxD,AAAN,KAAK,CAAC,eAAe,CAAC,KAAS,EAAE,OAAgB;QAC/C,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;YACzD,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAG3D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAU,iBAAiB,CAAC,CAAC;YAE1E,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAE5D,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBACvC,OAAO,IAAA,kCAAqB,EAAC;oBAC3B,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,+CAA+C;oBACxD,IAAI,EAAE,kDAAkD;iBACzD,CAAC,CAAC;YACL,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YAEvC,OAAO,IAAA,kCAAqB,EAAC;gBAC3B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,gCAAgC;gBACzC,IAAI,EAAE,oFAAoF;aAC3F,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAEpD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,IAAI,EAAE,uEAAuE;aAC9E,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAlDY,kDAAmB;AAcxB;IATL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,8GAA8G;YAC9G,+HAA+H;YAC/H,wGAAwG;YACxG,yEAAyE;QAC3E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;0DAoCD;8BAjDU,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,mBAAmB,CAkD/B"}
1
+ {"version":3,"file":"gui-show-question.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-show-question.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAGgC;AAMzB,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAGD;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAE/D,YAA6B,UAA6B;QAA7B,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AA,eAAI,EAAC;QACJ,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,8GAA8G;YAC9G,+HAA+H;YAC/H,wGAAwG;YACxG,yEAAyE;QAC3E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;0DAoCD;8BAjDU,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,mBAAmB,CAkD/B"}
@@ -1,10 +1,10 @@
1
- import type { Context } from '@rekog/mcp-nest';
2
- import { AnkiConnectClient } from '@/mcp/clients/anki-connect.client';
1
+ import type { Context } from "@rekog/mcp-nest";
2
+ import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
3
3
  export declare class GuiUndoTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiUndo(_args: {}, context: Context): Promise<{
7
+ guiUndo(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;