anki-mcp-http 0.7.1 → 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 (143) hide show
  1. package/LICENSE +5 -19
  2. package/README.md +152 -35
  3. package/bin/ankimcp.js +0 -0
  4. package/dist/anki-config.service.d.ts +2 -2
  5. package/dist/anki-config.service.js +4 -4
  6. package/dist/app.module.d.ts +1 -1
  7. package/dist/app.module.js +7 -7
  8. package/dist/app.module.js.map +1 -1
  9. package/dist/bootstrap.d.ts +1 -1
  10. package/dist/bootstrap.js +4 -4
  11. package/dist/cli.d.ts +2 -1
  12. package/dist/cli.js +41 -27
  13. package/dist/cli.js.map +1 -1
  14. package/dist/http/guards/origin-validation.guard.d.ts +1 -1
  15. package/dist/http/guards/origin-validation.guard.js +5 -5
  16. package/dist/main-http.js +16 -2
  17. package/dist/main-http.js.map +1 -1
  18. package/dist/main-stdio.js +2 -2
  19. package/dist/mcp/clients/__mocks__/anki-connect.client.js +1 -1
  20. package/dist/mcp/clients/anki-connect.client.d.ts +1 -1
  21. package/dist/mcp/clients/anki-connect.client.js +7 -7
  22. package/dist/mcp/config/anki-config.interface.js +1 -1
  23. package/dist/mcp/primitives/essential/index.d.ts +26 -26
  24. package/dist/mcp/primitives/essential/index.js +1 -4
  25. package/dist/mcp/primitives/essential/index.js.map +1 -1
  26. package/dist/mcp/primitives/essential/prompts/review-session.prompt.js +5 -5
  27. package/dist/mcp/primitives/essential/prompts/review-session.prompt.js.map +1 -1
  28. package/dist/mcp/primitives/essential/prompts/twenty-rules.prompt/index.js +10 -8
  29. package/dist/mcp/primitives/essential/prompts/twenty-rules.prompt/index.js.map +1 -1
  30. package/dist/mcp/primitives/essential/resources/system-info.resource.js +12 -12
  31. package/dist/mcp/primitives/essential/tools/add-note.tool.d.ts +3 -3
  32. package/dist/mcp/primitives/essential/tools/add-note.tool.js +27 -30
  33. package/dist/mcp/primitives/essential/tools/add-note.tool.js.map +1 -1
  34. package/dist/mcp/primitives/essential/tools/create-deck.tool.d.ts +2 -2
  35. package/dist/mcp/primitives/essential/tools/create-deck.tool.js +15 -15
  36. package/dist/mcp/primitives/essential/tools/create-deck.tool.js.map +1 -1
  37. package/dist/mcp/primitives/essential/tools/create-model.tool.d.ts +3 -3
  38. package/dist/mcp/primitives/essential/tools/create-model.tool.js +20 -18
  39. package/dist/mcp/primitives/essential/tools/create-model.tool.js.map +1 -1
  40. package/dist/mcp/primitives/essential/tools/delete-notes.tool.d.ts +2 -2
  41. package/dist/mcp/primitives/essential/tools/delete-notes.tool.js +22 -22
  42. package/dist/mcp/primitives/essential/tools/delete-notes.tool.js.map +1 -1
  43. package/dist/mcp/primitives/essential/tools/find-notes.tool.d.ts +2 -2
  44. package/dist/mcp/primitives/essential/tools/find-notes.tool.js +14 -14
  45. package/dist/mcp/primitives/essential/tools/find-notes.tool.js.map +1 -1
  46. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.d.ts +2 -2
  47. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.js +17 -15
  48. package/dist/mcp/primitives/essential/tools/get-due-cards.tool.js.map +1 -1
  49. package/dist/mcp/primitives/essential/tools/list-decks.tool.d.ts +2 -2
  50. package/dist/mcp/primitives/essential/tools/list-decks.tool.js +10 -10
  51. package/dist/mcp/primitives/essential/tools/list-decks.tool.js.map +1 -1
  52. package/dist/mcp/primitives/essential/tools/mediaActions/actions/deleteMediaFile.action.d.ts +1 -1
  53. package/dist/mcp/primitives/essential/tools/mediaActions/actions/deleteMediaFile.action.js +3 -3
  54. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.d.ts +1 -1
  55. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.js +1 -1
  56. package/dist/mcp/primitives/essential/tools/mediaActions/actions/getMediaFilesNames.action.js.map +1 -1
  57. package/dist/mcp/primitives/essential/tools/mediaActions/actions/retrieveMediaFile.action.d.ts +1 -1
  58. package/dist/mcp/primitives/essential/tools/mediaActions/actions/retrieveMediaFile.action.js +3 -3
  59. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.d.ts +1 -1
  60. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.js +7 -7
  61. package/dist/mcp/primitives/essential/tools/mediaActions/actions/storeMediaFile.action.js.map +1 -1
  62. package/dist/mcp/primitives/essential/tools/mediaActions/index.d.ts +5 -5
  63. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.d.ts +3 -3
  64. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.js +23 -17
  65. package/dist/mcp/primitives/essential/tools/mediaActions/mediaActions.tool.js.map +1 -1
  66. package/dist/mcp/primitives/essential/tools/model-field-names.tool.d.ts +2 -2
  67. package/dist/mcp/primitives/essential/tools/model-field-names.tool.js +20 -17
  68. package/dist/mcp/primitives/essential/tools/model-field-names.tool.js.map +1 -1
  69. package/dist/mcp/primitives/essential/tools/model-names.tool.d.ts +3 -3
  70. package/dist/mcp/primitives/essential/tools/model-names.tool.js +13 -11
  71. package/dist/mcp/primitives/essential/tools/model-names.tool.js.map +1 -1
  72. package/dist/mcp/primitives/essential/tools/model-styling.tool.d.ts +2 -2
  73. package/dist/mcp/primitives/essential/tools/model-styling.tool.js +11 -11
  74. package/dist/mcp/primitives/essential/tools/model-styling.tool.js.map +1 -1
  75. package/dist/mcp/primitives/essential/tools/notes-info.tool.d.ts +2 -2
  76. package/dist/mcp/primitives/essential/tools/notes-info.tool.js +19 -19
  77. package/dist/mcp/primitives/essential/tools/notes-info.tool.js.map +1 -1
  78. package/dist/mcp/primitives/essential/tools/present-card.tool.d.ts +2 -2
  79. package/dist/mcp/primitives/essential/tools/present-card.tool.js +11 -11
  80. package/dist/mcp/primitives/essential/tools/present-card.tool.js.map +1 -1
  81. package/dist/mcp/primitives/essential/tools/rate-card.tool.d.ts +2 -2
  82. package/dist/mcp/primitives/essential/tools/rate-card.tool.js +19 -14
  83. package/dist/mcp/primitives/essential/tools/rate-card.tool.js.map +1 -1
  84. package/dist/mcp/primitives/essential/tools/sync.tool.d.ts +3 -3
  85. package/dist/mcp/primitives/essential/tools/sync.tool.js +8 -8
  86. package/dist/mcp/primitives/essential/tools/sync.tool.js.map +1 -1
  87. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.d.ts +2 -2
  88. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.js +19 -19
  89. package/dist/mcp/primitives/essential/tools/update-model-styling.tool.js.map +1 -1
  90. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.d.ts +3 -3
  91. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.js +32 -32
  92. package/dist/mcp/primitives/essential/tools/update-note-fields.tool.js.map +1 -1
  93. package/dist/mcp/primitives/gui/index.d.ts +17 -17
  94. package/dist/mcp/primitives/gui/index.js.map +1 -1
  95. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.d.ts +2 -2
  96. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.js +22 -22
  97. package/dist/mcp/primitives/gui/tools/gui-add-cards.tool.js.map +1 -1
  98. package/dist/mcp/primitives/gui/tools/gui-browse.tool.d.ts +3 -3
  99. package/dist/mcp/primitives/gui/tools/gui-browse.tool.js +15 -14
  100. package/dist/mcp/primitives/gui/tools/gui-browse.tool.js.map +1 -1
  101. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.d.ts +3 -3
  102. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.js +13 -13
  103. package/dist/mcp/primitives/gui/tools/gui-current-card.tool.js.map +1 -1
  104. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.d.ts +3 -3
  105. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.js +12 -12
  106. package/dist/mcp/primitives/gui/tools/gui-deck-browser.tool.js.map +1 -1
  107. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.d.ts +2 -2
  108. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.js +15 -12
  109. package/dist/mcp/primitives/gui/tools/gui-deck-overview.tool.js.map +1 -1
  110. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.d.ts +2 -2
  111. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.js +13 -12
  112. package/dist/mcp/primitives/gui/tools/gui-edit-note.tool.js.map +1 -1
  113. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.d.ts +2 -2
  114. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.js +18 -15
  115. package/dist/mcp/primitives/gui/tools/gui-select-card.tool.js.map +1 -1
  116. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.d.ts +3 -3
  117. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.js +15 -14
  118. package/dist/mcp/primitives/gui/tools/gui-selected-notes.tool.js.map +1 -1
  119. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.d.ts +3 -3
  120. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.js +15 -15
  121. package/dist/mcp/primitives/gui/tools/gui-show-answer.tool.js.map +1 -1
  122. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.d.ts +3 -3
  123. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.js +15 -15
  124. package/dist/mcp/primitives/gui/tools/gui-show-question.tool.js.map +1 -1
  125. package/dist/mcp/primitives/gui/tools/gui-undo.tool.d.ts +3 -3
  126. package/dist/mcp/primitives/gui/tools/gui-undo.tool.js +15 -15
  127. package/dist/mcp/primitives/gui/tools/gui-undo.tool.js.map +1 -1
  128. package/dist/mcp/types/anki.types.d.ts +2 -2
  129. package/dist/mcp/utils/anki.utils.d.ts +3 -3
  130. package/dist/mcp/utils/anki.utils.js +42 -38
  131. package/dist/mcp/utils/anki.utils.js.map +1 -1
  132. package/dist/mcp/utils/markdown.utils.js +16 -12
  133. package/dist/mcp/utils/markdown.utils.js.map +1 -1
  134. package/dist/mcp/utils/mcpb-workarounds.js +2 -2
  135. package/dist/mcp/utils/mcpb-workarounds.js.map +1 -1
  136. package/dist/services/ngrok.service.d.ts +15 -0
  137. package/dist/services/ngrok.service.js +120 -0
  138. package/dist/services/ngrok.service.js.map +1 -0
  139. package/dist/test-fixtures/mock-data.d.ts +2 -2
  140. package/dist/test-fixtures/mock-data.js +46 -46
  141. package/dist/test-fixtures/mock-data.js.map +1 -1
  142. package/dist/tsconfig.build.tsbuildinfo +1 -1
  143. package/package.json +12 -7
@@ -22,30 +22,30 @@ let UpdateNoteFieldsTool = UpdateNoteFieldsTool_1 = class UpdateNoteFieldsTool {
22
22
  constructor(ankiClient) {
23
23
  this.ankiClient = ankiClient;
24
24
  }
25
- async updateNoteFields({ note }, context) {
25
+ async updateNoteFields({ note, }, context) {
26
26
  try {
27
27
  const fieldCount = Object.keys(note.fields).length;
28
28
  this.logger.log(`Updating ${fieldCount} field(s) for note ID: ${note.id}`);
29
29
  if (fieldCount === 0) {
30
- return (0, anki_utils_1.createErrorResponse)(new Error('No fields provided for update'), {
30
+ return (0, anki_utils_1.createErrorResponse)(new Error("No fields provided for update"), {
31
31
  noteId: note.id,
32
- hint: 'Provide at least one field to update',
32
+ hint: "Provide at least one field to update",
33
33
  });
34
34
  }
35
35
  await context.reportProgress({ progress: 25, total: 100 });
36
- const notesInfo = await this.ankiClient.invoke('notesInfo', {
36
+ const notesInfo = await this.ankiClient.invoke("notesInfo", {
37
37
  notes: [note.id],
38
38
  });
39
39
  if (!notesInfo || notesInfo.length === 0 || !notesInfo[0]) {
40
- return (0, anki_utils_1.createErrorResponse)(new Error('Note not found'), {
40
+ return (0, anki_utils_1.createErrorResponse)(new Error("Note not found"), {
41
41
  noteId: note.id,
42
- hint: 'The note ID is invalid or the note has been deleted. Use findNotes to get valid note IDs.',
42
+ hint: "The note ID is invalid or the note has been deleted. Use findNotes to get valid note IDs.",
43
43
  });
44
44
  }
45
45
  const currentNote = notesInfo[0];
46
46
  const modelName = currentNote.modelName;
47
47
  const existingFields = Object.keys(currentNote.fields);
48
- const invalidFields = Object.keys(note.fields).filter(field => !existingFields.includes(field));
48
+ const invalidFields = Object.keys(note.fields).filter((field) => !existingFields.includes(field));
49
49
  if (invalidFields.length > 0) {
50
50
  return (0, anki_utils_1.createErrorResponse)(new Error(`Invalid fields for model "${modelName}"`), {
51
51
  noteId: note.id,
@@ -68,7 +68,7 @@ let UpdateNoteFieldsTool = UpdateNoteFieldsTool_1 = class UpdateNoteFieldsTool {
68
68
  if (note.picture) {
69
69
  updateParams.note.picture = note.picture;
70
70
  }
71
- const result = await this.ankiClient.invoke('updateNoteFields', updateParams);
71
+ await this.ankiClient.invoke("updateNoteFields", updateParams);
72
72
  await context.reportProgress({ progress: 100, total: 100 });
73
73
  this.logger.log(`Successfully updated note ID: ${note.id}`);
74
74
  const updatedFields = Object.keys(note.fields);
@@ -78,32 +78,32 @@ let UpdateNoteFieldsTool = UpdateNoteFieldsTool_1 = class UpdateNoteFieldsTool {
78
78
  updatedFields,
79
79
  fieldCount,
80
80
  modelName,
81
- message: `Successfully updated ${fieldCount} field${fieldCount === 1 ? '' : 's'} in note`,
82
- cssNote: 'HTML content is preserved. Model CSS styling remains unchanged.',
83
- warning: 'If changes don\'t appear, ensure the note wasn\'t open in Anki browser during update.',
84
- hint: 'Use notesInfo to verify the changes or findNotes to locate other notes to update.',
81
+ message: `Successfully updated ${fieldCount} field${fieldCount === 1 ? "" : "s"} in note`,
82
+ cssNote: "HTML content is preserved. Model CSS styling remains unchanged.",
83
+ warning: "If changes don't appear, ensure the note wasn't open in Anki browser during update.",
84
+ hint: "Use notesInfo to verify the changes or findNotes to locate other notes to update.",
85
85
  });
86
86
  }
87
87
  catch (error) {
88
- this.logger.error('Failed to update note fields', error);
88
+ this.logger.error("Failed to update note fields", error);
89
89
  if (error instanceof Error) {
90
- if (error.message.includes('not found')) {
90
+ if (error.message.includes("not found")) {
91
91
  return (0, anki_utils_1.createErrorResponse)(error, {
92
92
  noteId: note.id,
93
- hint: 'Note not found. It may have been deleted.',
93
+ hint: "Note not found. It may have been deleted.",
94
94
  });
95
95
  }
96
- if (error.message.includes('field')) {
96
+ if (error.message.includes("field")) {
97
97
  return (0, anki_utils_1.createErrorResponse)(error, {
98
98
  noteId: note.id,
99
99
  providedFields: Object.keys(note.fields),
100
- hint: 'Check field names match exactly (case-sensitive). Use notesInfo to see current fields.',
100
+ hint: "Check field names match exactly (case-sensitive). Use notesInfo to see current fields.",
101
101
  });
102
102
  }
103
103
  }
104
104
  return (0, anki_utils_1.createErrorResponse)(error, {
105
105
  noteId: note.id,
106
- hint: 'Make sure Anki is running and the note is not open in the browser',
106
+ hint: "Make sure Anki is running and the note is not open in the browser",
107
107
  });
108
108
  }
109
109
  }
@@ -111,35 +111,35 @@ let UpdateNoteFieldsTool = UpdateNoteFieldsTool_1 = class UpdateNoteFieldsTool {
111
111
  exports.UpdateNoteFieldsTool = UpdateNoteFieldsTool;
112
112
  __decorate([
113
113
  (0, mcp_nest_1.Tool)({
114
- name: 'updateNoteFields',
115
- description: 'Update the fields of an existing note. Supports HTML content in fields and preserves CSS styling. ' +
116
- 'WARNING: Do not view the note in Anki browser while updating, or the fields will not update properly. ' +
117
- 'Close the browser or switch to a different note before updating. IMPORTANT: Only update notes that the user explicitly asked to modify.',
114
+ name: "updateNoteFields",
115
+ description: "Update the fields of an existing note. Supports HTML content in fields and preserves CSS styling. " +
116
+ "WARNING: Do not view the note in Anki browser while updating, or the fields will not update properly. " +
117
+ "Close the browser or switch to a different note before updating. IMPORTANT: Only update notes that the user explicitly asked to modify.",
118
118
  parameters: zod_1.z.object({
119
119
  note: zod_1.z.object({
120
120
  id: zod_1.z
121
121
  .number()
122
- .describe('The ID of the note to update. Get this from findNotes or notesInfo.'),
122
+ .describe("The ID of the note to update. Get this from findNotes or notesInfo."),
123
123
  fields: zod_1.z
124
124
  .record(zod_1.z.string())
125
- .describe('Fields to update with new content. Only include fields you want to change. ' +
125
+ .describe("Fields to update with new content. Only include fields you want to change. " +
126
126
  'HTML content is supported. Example: {"Front": "<b>New question</b>", "Back": "New answer"}'),
127
127
  audio: zod_1.z
128
128
  .array(zod_1.z.object({
129
- url: zod_1.z.string().describe('URL of the audio file'),
130
- filename: zod_1.z.string().describe('Filename to save as'),
131
- fields: zod_1.z.array(zod_1.z.string()).describe('Fields to add audio to'),
129
+ url: zod_1.z.string().describe("URL of the audio file"),
130
+ filename: zod_1.z.string().describe("Filename to save as"),
131
+ fields: zod_1.z.array(zod_1.z.string()).describe("Fields to add audio to"),
132
132
  }))
133
133
  .optional()
134
- .describe('Optional audio files to add to the note'),
134
+ .describe("Optional audio files to add to the note"),
135
135
  picture: zod_1.z
136
136
  .array(zod_1.z.object({
137
- url: zod_1.z.string().describe('URL of the image'),
138
- filename: zod_1.z.string().describe('Filename to save as'),
139
- fields: zod_1.z.array(zod_1.z.string()).describe('Fields to add image to'),
137
+ url: zod_1.z.string().describe("URL of the image"),
138
+ filename: zod_1.z.string().describe("Filename to save as"),
139
+ fields: zod_1.z.array(zod_1.z.string()).describe("Fields to add image to"),
140
140
  }))
141
141
  .optional()
142
- .describe('Optional images to add to the note'),
142
+ .describe("Optional images to add to the note"),
143
143
  }),
144
144
  }),
145
145
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"update-note-fields.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/tools/update-note-fields.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;IA0CxD,AAAN,KAAK,CAAC,gBAAgB,CACpB,EACE,IAAI,EAgBL,EACD,OAAgB;QAEhB,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CA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E,CAAC,QAAQ,CAAC,kBAAkB,CAAC;oBAC5C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;oBACpD,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;iBAC/D,CAAC,CACH;qBACA,QAAQ,EAAE;qBACV,QAAQ,CAAC,oCAAoC,CAAC;aAClD,CAAC;SACH,CAAC;KACH,CAAC;;;;4DAwID;+BAtLU,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,oBAAoB,CAuLhC"}
@@ -1,20 +1,20 @@
1
- export { ANKI_CONFIG } from '../../config/anki-config.interface';
2
- export type { IAnkiConfig } from '../../config/anki-config.interface';
3
- export * from '../../types/anki.types';
4
- export * from '../../utils/anki.utils';
5
- export { AnkiConnectClient, AnkiConnectError } from '../../clients/anki-connect.client';
6
- export { GuiBrowseTool } from './tools/gui-browse.tool';
7
- export { GuiSelectCardTool } from './tools/gui-select-card.tool';
8
- export { GuiSelectedNotesTool } from './tools/gui-selected-notes.tool';
9
- export { GuiAddCardsTool } from './tools/gui-add-cards.tool';
10
- export { GuiEditNoteTool } from './tools/gui-edit-note.tool';
11
- export { GuiDeckOverviewTool } from './tools/gui-deck-overview.tool';
12
- export { GuiDeckBrowserTool } from './tools/gui-deck-browser.tool';
13
- export { GuiCurrentCardTool } from './tools/gui-current-card.tool';
14
- export { GuiShowQuestionTool } from './tools/gui-show-question.tool';
15
- export { GuiShowAnswerTool } from './tools/gui-show-answer.tool';
16
- export { GuiUndoTool } from './tools/gui-undo.tool';
17
- import { DynamicModule, Provider } from '@nestjs/common';
1
+ export { ANKI_CONFIG } from "../../config/anki-config.interface";
2
+ export type { IAnkiConfig } from "../../config/anki-config.interface";
3
+ export * from "../../types/anki.types";
4
+ export * from "../../utils/anki.utils";
5
+ export { AnkiConnectClient, AnkiConnectError, } from "../../clients/anki-connect.client";
6
+ export { GuiBrowseTool } from "./tools/gui-browse.tool";
7
+ export { GuiSelectCardTool } from "./tools/gui-select-card.tool";
8
+ export { GuiSelectedNotesTool } from "./tools/gui-selected-notes.tool";
9
+ export { GuiAddCardsTool } from "./tools/gui-add-cards.tool";
10
+ export { GuiEditNoteTool } from "./tools/gui-edit-note.tool";
11
+ export { GuiDeckOverviewTool } from "./tools/gui-deck-overview.tool";
12
+ export { GuiDeckBrowserTool } from "./tools/gui-deck-browser.tool";
13
+ export { GuiCurrentCardTool } from "./tools/gui-current-card.tool";
14
+ export { GuiShowQuestionTool } from "./tools/gui-show-question.tool";
15
+ export { GuiShowAnswerTool } from "./tools/gui-show-answer.tool";
16
+ export { GuiUndoTool } from "./tools/gui-undo.tool";
17
+ import { DynamicModule, Provider } from "@nestjs/common";
18
18
  export interface McpPrimitivesAnkiGuiModuleOptions {
19
19
  ankiConfigProvider: Provider;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/primitives/gui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAAiE;AAAxD,oHAAA,WAAW,OAAA;AAIpB,yDAAuC;AAGvC,yDAAuC;AAGvC,yEAAwF;AAA/E,wHAAA,iBAAiB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAG5C,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,qEAAiE;AAAxD,yHAAA,iBAAiB,OAAA;AAC1B,2EAAuE;AAA9D,+HAAA,oBAAoB,OAAA;AAG7B,iEAA6D;AAApD,qHAAA,eAAe,OAAA;AACxB,iEAA6D;AAApD,qHAAA,eAAe,OAAA;AACxB,yEAAqE;AAA5D,6HAAA,mBAAmB,OAAA;AAC5B,uEAAmE;AAA1D,2HAAA,kBAAkB,OAAA;AAG3B,uEAAmE;AAA1D,2HAAA,kBAAkB,OAAA;AAC3B,yEAAqE;AAA5D,6HAAA,mBAAmB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,eAAe,OAAA;AACxB,iEAA6D;AAApD,qHAAA,eAAe,OAAA;AACxB,yEAAqE;AAA5D,6HAAA,mBAAmB,OAAA;AAC5B,uEAAmE;AAA1D,2HAAA,kBAAkB,OAAA;AAG3B,uEAAmE;AAA1D,2HAAA,kBAAkB,OAAA;AAC3B,yEAAqE;AAA5D,6HAAA,mBAAmB,OAAA;AAC5B,qEAAiE;AAAxD,yHAAA,iBAAiB,OAAA;AAC1B,uDAAoD;AAA3C,4GAAA,WAAW,OAAA;AAGpB,2CAAiE;AACjE,2EAAsE;AACtE,6DAAwD;AACxD,uEAAiE;AACjE,6EAAuE;AACvE,mEAA6D;AAC7D,mEAA6D;AAC7D,2EAAqE;AACrE,yEAAmE;AACnE,yEAAmE;AACnE,2EAAqE;AACrE,uEAAiE;AACjE,yDAAoD;AAEpD,MAAM,cAAc,GAAG;IAErB,uCAAiB;IAEjB,+BAAa;IACb,wCAAiB;IACjB,8CAAoB;IAEpB,oCAAe;IACf,oCAAe;IACf,4CAAmB;IACnB,0CAAkB;IAElB,0CAAkB;IAClB,4CAAmB;IACnB,wCAAiB;IACjB,2BAAW;CACZ,CAAC;AAOK,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IACrC,MAAM,CAAC,OAAO,CAAC,OAA0C;QACvD,OAAO;YACL,MAAM,EAAE,4BAA0B;YAClC,SAAS,EAAE,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,cAAc,CAAC;YAC1D,OAAO,EAAE,cAAc;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AARY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,0BAA0B,CAQtC"}
@@ -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 GuiAddCardsTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -26,16 +26,16 @@ let GuiAddCardsTool = GuiAddCardsTool_1 = class GuiAddCardsTool {
26
26
  try {
27
27
  this.logger.log(`Opening Add Cards dialog for deck "${note.deckName}"`);
28
28
  await context.reportProgress({ progress: 25, total: 100 });
29
- const emptyFields = Object.entries(note.fields).filter(([_, value]) => !value || value.trim() === '');
29
+ const emptyFields = Object.entries(note.fields).filter(([_, value]) => !value || value.trim() === "");
30
30
  if (emptyFields.length > 0) {
31
- return (0, anki_utils_1.createErrorResponse)(new Error(`Fields cannot be empty: ${emptyFields.map(([key]) => key).join(', ')}`), {
31
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Fields cannot be empty: ${emptyFields.map(([key]) => key).join(", ")}`), {
32
32
  deckName: note.deckName,
33
33
  modelName: note.modelName,
34
34
  emptyFields: emptyFields.map(([key]) => key),
35
35
  });
36
36
  }
37
37
  await context.reportProgress({ progress: 50, total: 100 });
38
- const noteId = await this.ankiClient.invoke('guiAddCards', { note });
38
+ const noteId = await this.ankiClient.invoke("guiAddCards", { note });
39
39
  await context.reportProgress({ progress: 100, total: 100 });
40
40
  this.logger.log(`Add Cards dialog opened, potential note ID: ${noteId}`);
41
41
  return (0, anki_utils_1.createSuccessResponse)({
@@ -44,37 +44,37 @@ let GuiAddCardsTool = GuiAddCardsTool_1 = class GuiAddCardsTool {
44
44
  deckName: note.deckName,
45
45
  modelName: note.modelName,
46
46
  message: `Add Cards dialog opened with preset details for deck "${note.deckName}"`,
47
- hint: 'The user can now review and finalize the note in the Anki GUI. The note will be created when they click Add.',
47
+ hint: "The user can now review and finalize the note in the Anki GUI. The note will be created when they click Add.",
48
48
  });
49
49
  }
50
50
  catch (error) {
51
- this.logger.error('Failed to open Add Cards dialog', error);
51
+ this.logger.error("Failed to open Add Cards dialog", error);
52
52
  if (error instanceof Error) {
53
53
  const errorMessage = error.message.toLowerCase();
54
- if (errorMessage.includes('field')) {
54
+ if (errorMessage.includes("field")) {
55
55
  return (0, anki_utils_1.createErrorResponse)(error, {
56
56
  modelName: note.modelName,
57
57
  providedFields: Object.keys(note.fields),
58
- hint: 'Field mismatch. Use modelFieldNames tool to see required fields.',
58
+ hint: "Field mismatch. Use modelFieldNames tool to see required fields.",
59
59
  });
60
60
  }
61
- if (errorMessage.includes('model')) {
61
+ if (errorMessage.includes("model")) {
62
62
  return (0, anki_utils_1.createErrorResponse)(error, {
63
63
  modelName: note.modelName,
64
- hint: 'Model not found. Use modelNames tool to see available models.',
64
+ hint: "Model not found. Use modelNames tool to see available models.",
65
65
  });
66
66
  }
67
- if (errorMessage.includes('deck')) {
67
+ if (errorMessage.includes("deck")) {
68
68
  return (0, anki_utils_1.createErrorResponse)(error, {
69
69
  deckName: note.deckName,
70
- hint: 'Deck not found. Use list_decks tool to see available decks.',
70
+ hint: "Deck not found. Use list_decks tool to see available decks.",
71
71
  });
72
72
  }
73
73
  }
74
74
  return (0, anki_utils_1.createErrorResponse)(error, {
75
75
  deckName: note.deckName,
76
76
  modelName: note.modelName,
77
- hint: 'Make sure Anki is running and the deck/model names are correct',
77
+ hint: "Make sure Anki is running and the deck/model names are correct",
78
78
  });
79
79
  }
80
80
  }
@@ -82,21 +82,21 @@ let GuiAddCardsTool = GuiAddCardsTool_1 = class GuiAddCardsTool {
82
82
  exports.GuiAddCardsTool = GuiAddCardsTool;
83
83
  __decorate([
84
84
  (0, mcp_nest_1.Tool)({
85
- name: 'guiAddCards',
86
- description: 'Open Anki Add Cards dialog with preset note details (deck, model, fields, tags). Returns potential note ID. ' +
87
- 'IMPORTANT: Only use when user explicitly requests opening the Add Cards dialog. ' +
88
- 'This tool is for note editing/creation workflows. Use this when user wants to manually review and finalize note creation in the GUI.',
85
+ name: "guiAddCards",
86
+ description: "Open Anki Add Cards dialog with preset note details (deck, model, fields, tags). Returns potential note ID. " +
87
+ "IMPORTANT: Only use when user explicitly requests opening the Add Cards dialog. " +
88
+ "This tool is for note editing/creation workflows. Use this when user wants to manually review and finalize note creation in the GUI.",
89
89
  parameters: zod_1.z.object({
90
90
  note: zod_1.z.object({
91
- deckName: zod_1.z.string().min(1).describe('Deck to add the note to'),
92
- modelName: zod_1.z.string().min(1).describe('Note type/model (e.g., "Basic", "Cloze")'),
91
+ deckName: zod_1.z.string().min(1).describe("Deck to add the note to"),
92
+ modelName: zod_1.z
93
+ .string()
94
+ .min(1)
95
+ .describe('Note type/model (e.g., "Basic", "Cloze")'),
93
96
  fields: zod_1.z
94
97
  .record(zod_1.z.string())
95
98
  .describe('Field values to pre-fill (e.g., {"Front": "question", "Back": "answer"})'),
96
- tags: zod_1.z
97
- .array(zod_1.z.string())
98
- .optional()
99
- .describe('Optional tags to add'),
99
+ tags: zod_1.z.array(zod_1.z.string()).optional().describe("Optional tags to add"),
100
100
  }),
101
101
  }),
102
102
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-add-cards.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-add-cards.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;IAsBxD,AAAN,KAAK,CAAC,WAAW,CACf,EACE,IAAI,GAQL,EACD,OAAgB;QAEhB,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sCAAsC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YACxE,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAG3D,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI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vE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAlHY,0CAAe;AA2BpB;IAtBL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,8GAA8G;YAC9G,kFAAkF;YAClF,sIAAsI;QACxI,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;gBACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;gBAC/D,SAAS,EAAE,OAAC;qBACT,MAAM,EAAE;qBACR,GAAG,CAAC,CAAC,CAAC;qBACN,QAAQ,CAAC,0CAA0C,CAAC;gBACvD,MAAM,EAAE,OAAC;qBACN,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;qBAClB,QAAQ,CACP,0EAA0E,CAC3E;gBACH,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;aACtE,CAAC;SACH,CAAC;KACH,CAAC;;;;kDAuFD;0BAjHU,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,eAAe,CAkH3B"}
@@ -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 GuiBrowseTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -7,7 +7,7 @@ export declare class GuiBrowseTool {
7
7
  guiBrowse({ query, reorderCards, }: {
8
8
  query: string;
9
9
  reorderCards?: {
10
- order: 'ascending' | 'descending';
10
+ order: "ascending" | "descending";
11
11
  columnId: string;
12
12
  };
13
13
  }, context: Context): Promise<{
@@ -30,7 +30,7 @@ let GuiBrowseTool = GuiBrowseTool_1 = class GuiBrowseTool {
30
30
  if (reorderCards) {
31
31
  params.reorderCards = reorderCards;
32
32
  }
33
- const cardIds = await this.ankiClient.invoke('guiBrowse', params);
33
+ const cardIds = await this.ankiClient.invoke("guiBrowse", params);
34
34
  await context.reportProgress({ progress: 100, total: 100 });
35
35
  this.logger.log(`Card Browser opened with ${cardIds.length} card(s) found`);
36
36
  return (0, anki_utils_1.createSuccessResponse)({
@@ -40,14 +40,15 @@ let GuiBrowseTool = GuiBrowseTool_1 = class GuiBrowseTool {
40
40
  query,
41
41
  message: `Card Browser opened with ${cardIds.length} card(s) matching query "${query}"`,
42
42
  hint: cardIds.length === 0
43
- ? 'No cards found. Try adjusting your search query.'
44
- : 'Use guiSelectCard to select a specific card, or guiSelectedNotes to get selected notes.',
43
+ ? "No cards found. Try adjusting your search query."
44
+ : "Use guiSelectCard to select a specific card, or guiSelectedNotes to get selected notes.",
45
45
  });
46
46
  }
47
47
  catch (error) {
48
- this.logger.error('Failed to open Card Browser', error);
48
+ this.logger.error("Failed to open Card Browser", error);
49
49
  if (error instanceof Error) {
50
- if (error.message.includes('query') || error.message.includes('syntax')) {
50
+ if (error.message.includes("query") ||
51
+ error.message.includes("syntax")) {
51
52
  return (0, anki_utils_1.createErrorResponse)(error, {
52
53
  query,
53
54
  hint: 'Invalid search query. Check Anki search syntax. Examples: "deck:MyDeck", "tag:important", "is:due"',
@@ -56,7 +57,7 @@ let GuiBrowseTool = GuiBrowseTool_1 = class GuiBrowseTool {
56
57
  }
57
58
  return (0, anki_utils_1.createErrorResponse)(error, {
58
59
  query,
59
- hint: 'Make sure Anki is running and the GUI is visible',
60
+ hint: "Make sure Anki is running and the GUI is visible",
60
61
  });
61
62
  }
62
63
  }
@@ -64,11 +65,11 @@ let GuiBrowseTool = GuiBrowseTool_1 = class GuiBrowseTool {
64
65
  exports.GuiBrowseTool = GuiBrowseTool;
65
66
  __decorate([
66
67
  (0, mcp_nest_1.Tool)({
67
- name: 'guiBrowse',
68
- description: 'Open Anki Card Browser and search for cards using Anki query syntax. Returns array of card IDs found. ' +
69
- 'IMPORTANT: Only use when user explicitly requests opening the browser. ' +
70
- 'This tool is for note editing/creation workflows, NOT for review sessions. ' +
71
- 'Use this to find and select cards/notes that need editing.',
68
+ name: "guiBrowse",
69
+ description: "Open Anki Card Browser and search for cards using Anki query syntax. Returns array of card IDs found. " +
70
+ "IMPORTANT: Only use when user explicitly requests opening the browser. " +
71
+ "This tool is for note editing/creation workflows, NOT for review sessions. " +
72
+ "Use this to find and select cards/notes that need editing.",
72
73
  parameters: zod_1.z.object({
73
74
  query: zod_1.z
74
75
  .string()
@@ -77,14 +78,14 @@ __decorate([
77
78
  reorderCards: zod_1.z
78
79
  .object({
79
80
  order: zod_1.z
80
- .enum(['ascending', 'descending'])
81
- .describe('Sort order for the cards in browser'),
81
+ .enum(["ascending", "descending"])
82
+ .describe("Sort order for the cards in browser"),
82
83
  columnId: zod_1.z
83
84
  .string()
84
85
  .describe('Column to sort by (e.g., "noteFld", "noteCrt", "cardDue")'),
85
86
  })
86
87
  .optional()
87
- .describe('Optional reordering of cards in the browser'),
88
+ .describe("Optional reordering of cards in the browser"),
88
89
  }),
89
90
  }),
90
91
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-browse.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-browse.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGK;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IAEzD,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IA6BxD,AAAN,KAAK,CAAC,SAAS,CACb,EACE,K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,QAAQ,CAAC,EAAE,CAAC;oBACxE,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;wBAChC,KAAK;wBACL,IAAI,EAAE,oGAAoG;qBAC3G,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,KAAK;gBACL,IAAI,EAAE,kDAAkD;aACzD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAxFY,sCAAa;AAgClB;IA3BL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,wGAAwG;YACxG,yEAAyE;YACzE,6EAA6E;YAC7E,4DAA4D;QAC9D,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,KAAK,EAAE,OAAC;iBACL,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CACP,8FAA8F,CAC/F;YACH,YAAY,EAAE,OAAC;iBACZ,MAAM,CAAC;gBACN,KAAK,EAAE,OAAC;qBACL,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;qBACjC,QAAQ,CAAC,qCAAqC,CAAC;gBAClD,QAAQ,EAAE,OAAC;qBACR,MAAM,EAAE;qBACR,QAAQ,CAAC,2DAA2D,CAAC;aACzE,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,6CAA6C,CAAC;SAC3D,CAAC;KACH,CAAC;;;;8CAwDD;wBAvFU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,aAAa,CAwFzB"}
1
+ {"version":3,"file":"gui-browse.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-browse.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAGgC;AAMzB,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGK;IAFZ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p/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 GuiCurrentCardTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiCurrentCard(_args: {}, context: Context): Promise<{
7
+ guiCurrentCard(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;
@@ -24,18 +24,18 @@ let GuiCurrentCardTool = GuiCurrentCardTool_1 = class GuiCurrentCardTool {
24
24
  }
25
25
  async guiCurrentCard(_args, context) {
26
26
  try {
27
- this.logger.log('Getting current card information from GUI');
27
+ this.logger.log("Getting current card information from GUI");
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- const cardInfo = await this.ankiClient.invoke('guiCurrentCard');
29
+ const cardInfo = await this.ankiClient.invoke("guiCurrentCard");
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
31
  if (!cardInfo) {
32
- this.logger.log('Not currently in review mode');
32
+ this.logger.log("Not currently in review mode");
33
33
  return (0, anki_utils_1.createSuccessResponse)({
34
34
  success: true,
35
35
  cardInfo: null,
36
36
  inReview: false,
37
- message: 'Not currently in review mode',
38
- hint: 'Open a deck in Anki and start reviewing to see current card information.',
37
+ message: "Not currently in review mode",
38
+ hint: "Open a deck in Anki and start reviewing to see current card information.",
39
39
  });
40
40
  }
41
41
  this.logger.log(`Retrieved current card: ${cardInfo.cardId} from deck "${cardInfo.deckName}"`);
@@ -44,13 +44,13 @@ let GuiCurrentCardTool = GuiCurrentCardTool_1 = class GuiCurrentCardTool {
44
44
  cardInfo,
45
45
  inReview: true,
46
46
  message: `Current card: ${cardInfo.cardId} from deck "${cardInfo.deckName}"`,
47
- hint: 'Use guiEditNote to edit the note associated with this card.',
47
+ hint: "Use guiEditNote to edit the note associated with this card.",
48
48
  });
49
49
  }
50
50
  catch (error) {
51
- this.logger.error('Failed to get current card information', error);
51
+ this.logger.error("Failed to get current card information", error);
52
52
  return (0, anki_utils_1.createErrorResponse)(error, {
53
- hint: 'Make sure Anki is running and the GUI is visible',
53
+ hint: "Make sure Anki is running and the GUI is visible",
54
54
  });
55
55
  }
56
56
  }
@@ -58,11 +58,11 @@ let GuiCurrentCardTool = GuiCurrentCardTool_1 = class GuiCurrentCardTool {
58
58
  exports.GuiCurrentCardTool = GuiCurrentCardTool;
59
59
  __decorate([
60
60
  (0, mcp_nest_1.Tool)({
61
- name: 'guiCurrentCard',
62
- description: 'Get information about the current card displayed in review mode. Returns card details (question, answer, deck, model, etc.) or null if not in review. ' +
63
- 'CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to check what card is currently displayed in the GUI. ' +
64
- 'NEVER use this for conducting review sessions. Use the dedicated review tools (get_due_cards, present_card, rate_card) instead. ' +
65
- 'IMPORTANT: Only use when user explicitly requests current card information.',
61
+ name: "guiCurrentCard",
62
+ description: "Get information about the current card displayed in review mode. Returns card details (question, answer, deck, model, etc.) or null if not in review. " +
63
+ "CRITICAL: This tool is ONLY for note editing/creation workflows when user needs to check what card is currently displayed in the GUI. " +
64
+ "NEVER use this for conducting review sessions. Use the dedicated review tools (get_due_cards, present_card, rate_card) instead. " +
65
+ "IMPORTANT: Only use when user explicitly requests current card information.",
66
66
  parameters: zod_1.z.object({}),
67
67
  }),
68
68
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-current-card.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-current-card.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AAEtE,0DAAoF;AAM7E,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAGA;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAE9D,YAA6B,UAA6B;QAA7B,eAAU,G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iConnectClient } 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 GuiDeckBrowserTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
6
6
  constructor(ankiClient: AnkiConnectClient);
7
- guiDeckBrowser(_args: {}, context: Context): Promise<{
7
+ guiDeckBrowser(_args: Record<string, never>, context: Context): Promise<{
8
8
  [x: string]: unknown;
9
9
  content: ({
10
10
  [x: string]: unknown;
@@ -24,21 +24,21 @@ let GuiDeckBrowserTool = GuiDeckBrowserTool_1 = class GuiDeckBrowserTool {
24
24
  }
25
25
  async guiDeckBrowser(_args, context) {
26
26
  try {
27
- this.logger.log('Opening Deck Browser');
27
+ this.logger.log("Opening Deck Browser");
28
28
  await context.reportProgress({ progress: 50, total: 100 });
29
- await this.ankiClient.invoke('guiDeckBrowser');
29
+ await this.ankiClient.invoke("guiDeckBrowser");
30
30
  await context.reportProgress({ progress: 100, total: 100 });
31
- this.logger.log('Deck Browser opened');
31
+ this.logger.log("Deck Browser opened");
32
32
  return (0, anki_utils_1.createSuccessResponse)({
33
33
  success: true,
34
- message: 'Deck Browser opened successfully',
35
- hint: 'All decks are now visible in the Anki GUI. User can select a deck to study or manage.',
34
+ message: "Deck Browser opened successfully",
35
+ hint: "All decks are now visible in the Anki GUI. User can select a deck to study or manage.",
36
36
  });
37
37
  }
38
38
  catch (error) {
39
- this.logger.error('Failed to open Deck Browser', error);
39
+ this.logger.error("Failed to open Deck Browser", error);
40
40
  return (0, anki_utils_1.createErrorResponse)(error, {
41
- hint: 'Make sure Anki is running and the GUI is visible',
41
+ hint: "Make sure Anki is running and the GUI is visible",
42
42
  });
43
43
  }
44
44
  }
@@ -46,11 +46,11 @@ let GuiDeckBrowserTool = GuiDeckBrowserTool_1 = class GuiDeckBrowserTool {
46
46
  exports.GuiDeckBrowserTool = GuiDeckBrowserTool;
47
47
  __decorate([
48
48
  (0, mcp_nest_1.Tool)({
49
- name: 'guiDeckBrowser',
50
- description: 'Open Anki Deck Browser dialog showing all decks. ' +
51
- 'IMPORTANT: Only use when user explicitly requests opening the deck browser. ' +
52
- 'This tool is for deck management and organization workflows, NOT for review sessions. ' +
53
- 'Use this when user wants to see all decks or manage deck structure.',
49
+ name: "guiDeckBrowser",
50
+ description: "Open Anki Deck Browser dialog showing all decks. " +
51
+ "IMPORTANT: Only use when user explicitly requests opening the deck browser. " +
52
+ "This tool is for deck management and organization workflows, NOT for review sessions. " +
53
+ "Use this when user wants to see all decks or manage deck structure.",
54
54
  parameters: zod_1.z.object({}),
55
55
  }),
56
56
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"gui-deck-browser.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-deck-browser.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAAoF;AAM7E,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAGA;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAE9D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAWxD,AAAN,KAAK,CAAC,cAAc,CAAC,KAAS,EAAE,OAAgB;QAC9C,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YACxC,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAG3D,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAO,gBAAgB,CAAC,CAAC;YAErD,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YAEvC,OAAO,IAAA,kCAAqB,EAAC;gBAC3B,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,kCAAkC;gBAC3C,IAAI,EAAE,uFAAuF;aAC9F,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YAExD,OAAO,IAAA,gCAAmB,EAAC,KAAK,EAAE;gBAChC,IAAI,EAAE,kDAAkD;aACzD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAtCY,gDAAkB;AAcvB;IATL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,mDAAmD;YACnD,8EAA8E;YAC9E,wFAAwF;YACxF,qEAAqE;QACvE,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;wDAwBD;6BArCU,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,kBAAkB,CAsC9B"}
1
+ {"version":3,"file":"gui-deck-browser.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/gui/tools/gui-deck-browser.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AACtE,0DAGgC;AAMzB,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAGA;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAE9D,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAWxD,AAAN,KAAK,CAAC,cAAc,CAAC,KAA4B,EAAE,OAAgB;QACjE,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sB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