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
package/dist/main-http.js CHANGED
@@ -5,6 +5,7 @@ const app_module_1 = require("./app.module");
5
5
  const bootstrap_1 = require("./bootstrap");
6
6
  const origin_validation_guard_1 = require("./http/guards/origin-validation.guard");
7
7
  const cli_1 = require("./cli");
8
+ const ngrok_service_1 = require("./services/ngrok.service");
8
9
  async function bootstrap() {
9
10
  (0, cli_1.checkForUpdates)();
10
11
  const options = (0, cli_1.parseCliArgs)();
@@ -19,10 +20,23 @@ async function bootstrap() {
19
20
  });
20
21
  app.useGlobalGuards(new origin_validation_guard_1.OriginValidationGuard());
21
22
  await app.listen(options.port, options.host);
22
- (0, cli_1.displayStartupBanner)(options);
23
+ let ngrokUrl;
24
+ if (options.ngrok) {
25
+ try {
26
+ const ngrokService = new ngrok_service_1.NgrokService();
27
+ const tunnelInfo = await ngrokService.start(options.port);
28
+ ngrokUrl = tunnelInfo.publicUrl;
29
+ }
30
+ catch (err) {
31
+ console.error("\n❌ Failed to start ngrok:");
32
+ console.error(err instanceof Error ? err.message : String(err));
33
+ console.error("\nServer is still running locally without tunnel.\n");
34
+ }
35
+ }
36
+ (0, cli_1.displayStartupBanner)(options, ngrokUrl);
23
37
  }
24
38
  bootstrap().catch((err) => {
25
- console.error('Failed to start MCP HTTP server:', err);
39
+ console.error("Failed to start MCP HTTP server:", err);
26
40
  process.exit(1);
27
41
  });
28
42
  //# sourceMappingURL=main-http.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main-http.js","sourceRoot":"","sources":["../src/main-http.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AACzC,2C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C;YAChE,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAGD,IAAA,0BAAoB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -10,11 +10,11 @@ async function bootstrap() {
10
10
  logger: loggerService,
11
11
  bufferLogs: true,
12
12
  });
13
- pinoLogger.info('MCP STDIO server started successfully');
13
+ pinoLogger.info("MCP STDIO server started successfully");
14
14
  await new Promise(() => { });
15
15
  }
16
16
  bootstrap().catch((err) => {
17
- console.error('Failed to start MCP STDIO server:', err);
17
+ console.error("Failed to start MCP STDIO server:", err);
18
18
  process.exit(1);
19
19
  });
20
20
  //# sourceMappingURL=main-stdio.js.map
@@ -11,7 +11,7 @@ class AnkiConnectError extends Error {
11
11
  super(message);
12
12
  this.action = action;
13
13
  this.originalError = originalError;
14
- this.name = 'AnkiConnectError';
14
+ this.name = "AnkiConnectError";
15
15
  }
16
16
  }
17
17
  exports.AnkiConnectError = AnkiConnectError;
@@ -1,4 +1,4 @@
1
- import type { IAnkiConfig } from '../config/anki-config.interface';
1
+ import type { IAnkiConfig } from "../config/anki-config.interface";
2
2
  export declare class AnkiConnectError extends Error {
3
3
  readonly action?: string | undefined;
4
4
  readonly originalError?: string | undefined;
@@ -57,7 +57,7 @@ class AnkiConnectError extends Error {
57
57
  super(message);
58
58
  this.action = action;
59
59
  this.originalError = originalError;
60
- this.name = 'AnkiConnectError';
60
+ this.name = "AnkiConnectError";
61
61
  }
62
62
  }
63
63
  exports.AnkiConnectError = AnkiConnectError;
@@ -75,11 +75,11 @@ let AnkiConnectClient = AnkiConnectClient_1 = class AnkiConnectClient {
75
75
  prefixUrl: config.ankiConnectUrl,
76
76
  timeout: config.ankiConnectTimeout,
77
77
  headers: {
78
- 'Content-Type': 'application/json',
78
+ "Content-Type": "application/json",
79
79
  },
80
80
  retry: {
81
81
  limit: 2,
82
- methods: ['POST'],
82
+ methods: ["POST"],
83
83
  statusCodes: [408, 413, 429, 500, 502, 503, 504],
84
84
  backoffLimit: 3000,
85
85
  },
@@ -109,7 +109,7 @@ let AnkiConnectClient = AnkiConnectClient_1 = class AnkiConnectClient {
109
109
  try {
110
110
  this.logger.log(`Invoking AnkiConnect action: ${action}`);
111
111
  const response = await this.client
112
- .post('', {
112
+ .post("", {
113
113
  json: request,
114
114
  })
115
115
  .json();
@@ -122,12 +122,12 @@ let AnkiConnectClient = AnkiConnectClient_1 = class AnkiConnectClient {
122
122
  catch (error) {
123
123
  if (error instanceof ky_1.HTTPError) {
124
124
  if (error.response.status === 403) {
125
- throw new AnkiConnectError('Permission denied. Please check AnkiConnect configuration and API key.', action);
125
+ throw new AnkiConnectError("Permission denied. Please check AnkiConnect configuration and API key.", action);
126
126
  }
127
127
  throw new AnkiConnectError(`HTTP error ${error.response.status}: ${error.message}`, action);
128
128
  }
129
- if (error instanceof Error && error.message.includes('fetch')) {
130
- throw new AnkiConnectError('Cannot connect to Anki. Please ensure Anki is running and AnkiConnect plugin is installed.', action);
129
+ if (error instanceof Error && error.message.includes("fetch")) {
130
+ throw new AnkiConnectError("Cannot connect to Anki. Please ensure Anki is running and AnkiConnect plugin is installed.", action);
131
131
  }
132
132
  if (error instanceof AnkiConnectError) {
133
133
  throw error;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ANKI_CONFIG = void 0;
4
- exports.ANKI_CONFIG = Symbol('ANKI_CONFIG');
4
+ exports.ANKI_CONFIG = Symbol("ANKI_CONFIG");
5
5
  //# sourceMappingURL=anki-config.interface.js.map
@@ -1,29 +1,29 @@
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 { SyncTool } from './tools/sync.tool';
7
- export { ListDecksTool } from './tools/list-decks.tool';
8
- export { CreateDeckTool } from './tools/create-deck.tool';
9
- export { GetDueCardsTool } from './tools/get-due-cards.tool';
10
- export { PresentCardTool } from './tools/present-card.tool';
11
- export { RateCardTool } from './tools/rate-card.tool';
12
- export { ModelNamesTool } from './tools/model-names.tool';
13
- export { ModelFieldNamesTool } from './tools/model-field-names.tool';
14
- export { ModelStylingTool } from './tools/model-styling.tool';
15
- export { CreateModelTool } from './tools/create-model.tool';
16
- export { UpdateModelStylingTool } from './tools/update-model-styling.tool';
17
- export { AddNoteTool } from './tools/add-note.tool';
18
- export { FindNotesTool } from './tools/find-notes.tool';
19
- export { NotesInfoTool } from './tools/notes-info.tool';
20
- export { UpdateNoteFieldsTool } from './tools/update-note-fields.tool';
21
- export { DeleteNotesTool } from './tools/delete-notes.tool';
22
- export { MediaActionsTool } from './tools/mediaActions';
23
- export { ReviewSessionPrompt } from './prompts/review-session.prompt';
24
- export { TwentyRulesPrompt } from './prompts/twenty-rules.prompt';
25
- export { SystemInfoResource } from './resources/system-info.resource';
26
- 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 { SyncTool } from "./tools/sync.tool";
7
+ export { ListDecksTool } from "./tools/list-decks.tool";
8
+ export { CreateDeckTool } from "./tools/create-deck.tool";
9
+ export { GetDueCardsTool } from "./tools/get-due-cards.tool";
10
+ export { PresentCardTool } from "./tools/present-card.tool";
11
+ export { RateCardTool } from "./tools/rate-card.tool";
12
+ export { ModelNamesTool } from "./tools/model-names.tool";
13
+ export { ModelFieldNamesTool } from "./tools/model-field-names.tool";
14
+ export { ModelStylingTool } from "./tools/model-styling.tool";
15
+ export { CreateModelTool } from "./tools/create-model.tool";
16
+ export { UpdateModelStylingTool } from "./tools/update-model-styling.tool";
17
+ export { AddNoteTool } from "./tools/add-note.tool";
18
+ export { FindNotesTool } from "./tools/find-notes.tool";
19
+ export { NotesInfoTool } from "./tools/notes-info.tool";
20
+ export { UpdateNoteFieldsTool } from "./tools/update-note-fields.tool";
21
+ export { DeleteNotesTool } from "./tools/delete-notes.tool";
22
+ export { MediaActionsTool } from "./tools/mediaActions";
23
+ export { ReviewSessionPrompt } from "./prompts/review-session.prompt";
24
+ export { TwentyRulesPrompt } from "./prompts/twenty-rules.prompt";
25
+ export { SystemInfoResource } from "./resources/system-info.resource";
26
+ import { DynamicModule, Provider } from "@nestjs/common";
27
27
  export interface McpPrimitivesAnkiEssentialModuleOptions {
28
28
  ankiConfigProvider: Provider;
29
29
  }
@@ -118,10 +118,7 @@ let McpPrimitivesAnkiEssentialModule = McpPrimitivesAnkiEssentialModule_1 = clas
118
118
  static forRoot(options) {
119
119
  return {
120
120
  module: McpPrimitivesAnkiEssentialModule_1,
121
- providers: [
122
- options.ankiConfigProvider,
123
- ...MCP_PRIMITIVES,
124
- ],
121
+ providers: [options.ankiConfigProvider, ...MCP_PRIMITIVES],
125
122
  exports: MCP_PRIMITIVES,
126
123
  };
127
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/primitives/essential/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,+CAA6C;AAApC,qGAAA,QAAQ,OAAA;A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;IACf,6BAAY;IACZ,iCAAc;IACd,4CAAmB;IACnB,qCAAgB;IAChB,mCAAe;IACf,kDAAsB;IACtB,2BAAW;IACX,+BAAa;IACb,+BAAa;IACb,8CAAoB;IACpB,mCAAe;IACf,+BAAgB;IAEhB,2CAAmB;IACnB,uCAAiB;IAEjB,yCAAkB;CACnB,CAAC;AAOK,IAAM,gCAAgC,wCAAtC,MAAM,gCAAgC;IAC3C,MAAM,CAAC,OAAO,CAAC,OAAgD;QAC7D,OAAO;YACL,MAAM,EAAE,kCAAgC;YACxC,SAAS,EAAE;gBACT,OAAO,CAAC,kBAAkB;gBAC1B,GAAG,cAAc;aAClB;YACD,OAAO,EAAE,cAAc;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AAXY,4EAAgC;2CAAhC,gCAAgC;IAD5C,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gCAAgC,CAW5C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/primitives/essential/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAAiE;AAAxD,oHAAA,WAAW,OAAA;AAIpB,yDAAuC;AAGvC,yDAAuC;AAGvC,yEAG2C;AAFzC,wHAAA,iBAAiB,OAAA;AACjB,uHAAA,gBAAgB,OAAA;AAIlB,+CAA6C;AAApC,qGAAA,QAAQ,OAAA;AACjB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,iEAA6D;AAApD,qHAAA,eAAe,OAAA;AACxB,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AACxB,yDAAsD;AAA7C,8GAAA,YAAY,OAAA;AACrB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,yEAAqE;AAA5D,6HAAA,mBAAmB,OAAA;AAC5B,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA;AACzB,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AACxB,+EAA2E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E,GAAG,cAAc,CAAC;YAC1D,OAAO,EAAE,cAAc;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AAVY,4EAAgC;2CAAhC,gCAAgC;IAD5C,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gCAAgC,CAU5C"}
@@ -83,12 +83,12 @@ Assistant: [Uses rate_card with rating: 2]
83
83
  - Accept user's self-assessment over your suggestion
84
84
  - Keep feedback concise and actionable`;
85
85
  return {
86
- description: 'Guidelines for conducting Anki spaced repetition review sessions',
86
+ description: "Guidelines for conducting Anki spaced repetition review sessions",
87
87
  messages: [
88
88
  {
89
- role: 'user',
89
+ role: "user",
90
90
  content: {
91
- type: 'text',
91
+ type: "text",
92
92
  text: promptText,
93
93
  },
94
94
  },
@@ -99,8 +99,8 @@ Assistant: [Uses rate_card with rating: 2]
99
99
  exports.ReviewSessionPrompt = ReviewSessionPrompt;
100
100
  __decorate([
101
101
  (0, mcp_nest_1.Prompt)({
102
- name: 'anki_review',
103
- description: 'Guidelines for conducting Anki spaced repetition review sessions',
102
+ name: "anki_review",
103
+ description: "Guidelines for conducting Anki spaced repetition review sessions",
104
104
  parameters: zod_1.z.object({}),
105
105
  }),
106
106
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"review-session.prompt.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/prompts/review-session.prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmD;AACnD,8CAAyC;AACzC,6BAAwB;AAGjB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAM9B,mBAAmB;QACjB,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAkEgB,CAAC;QAEpC,OAAO;YACL,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU;qBACjB;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAxFY,kDAAmB;AAM9B;IALC,IAAA,iBAAM,EAAC;QACN,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,kEAAkE;QAC/E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;8DAkFD;8BAvFU,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;GACxB,mBAAmB,CAwF/B"}
1
+ {"version":3,"file":"review-session.prompt.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/prompts/review-session.prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmD;AACnD,8CAAyC;AACzC,6BAAwB;AAGjB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAO9B,mBAAmB;QACjB,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAkEgB,CAAC;QAEpC,OAAO;YACL,WAAW,EACT,kEAAkE;YACpE,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU;qBACjB;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA1FY,kDAAmB;AAO9B;IANC,IAAA,iBAAM,EAAC;QACN,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,kEAAkE;QACpE,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;8DAmFD;8BAzFU,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;GACxB,mBAAmB,CA0F/B"}
@@ -50,20 +50,21 @@ const fs = __importStar(require("fs"));
50
50
  const path = __importStar(require("path"));
51
51
  const markdown_utils_1 = require("../../../../utils/markdown.utils");
52
52
  const PROMPT_SECTIONS = (() => {
53
- const markdownPath = path.join(__dirname, 'content.md');
54
- const markdown = fs.readFileSync(markdownPath, 'utf-8');
53
+ const markdownPath = path.join(__dirname, "content.md");
54
+ const markdown = fs.readFileSync(markdownPath, "utf-8");
55
55
  return (0, markdown_utils_1.parseMarkdownSections)(markdown);
56
56
  })();
57
57
  let TwentyRulesPrompt = class TwentyRulesPrompt {
58
58
  getTwentyRulesPrompt() {
59
59
  return {
60
- description: PROMPT_SECTIONS.Description || 'Twenty rules of formulating knowledge for effective Anki flashcard creation',
60
+ description: PROMPT_SECTIONS.Description ||
61
+ "Twenty rules of formulating knowledge for effective Anki flashcard creation",
61
62
  messages: [
62
63
  {
63
- role: 'user',
64
+ role: "user",
64
65
  content: {
65
- type: 'text',
66
- text: PROMPT_SECTIONS.Content || '',
66
+ type: "text",
67
+ text: PROMPT_SECTIONS.Content || "",
67
68
  },
68
69
  },
69
70
  ],
@@ -73,8 +74,9 @@ let TwentyRulesPrompt = class TwentyRulesPrompt {
73
74
  exports.TwentyRulesPrompt = TwentyRulesPrompt;
74
75
  __decorate([
75
76
  (0, mcp_nest_1.Prompt)({
76
- name: 'twenty_rules',
77
- description: PROMPT_SECTIONS.Description || 'Twenty rules of formulating knowledge for effective Anki flashcard creation',
77
+ name: "twenty_rules",
78
+ description: PROMPT_SECTIONS.Description ||
79
+ "Twenty rules of formulating knowledge for effective Anki flashcard creation",
78
80
  parameters: zod_1.z.object({}),
79
81
  }),
80
82
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mcp/primitives/essential/prompts/twenty-rules.prompt/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmD;AACnD,8CAAyC;AACzC,6BAAwB;AACxB,uCAAyB;AACzB,2CAA6B;AAC7B,qEAAmE;AAInE,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;IAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO,IAAA,sCAAqB,EAAC,QAAQ,CAAC,CAAC;AACzC,CAAC,CAAC,EAAE,CAAC;AAGE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAM5B,oBAAoB;QAClB,OAAO;YACL,WAAW,EAAE,eAAe,CAAC,WAAW,IAAI,6EAA6E;YACzH,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,eAAe,CAAC,OAAO,IAAI,EAAE;qBACpC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AApBY,8CAAiB;AAM5B;IALC,IAAA,iBAAM,EAAC;QACN,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,eAAe,CAAC,WAAW,IAAI,6EAA6E;QACzH,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;6DAcD;4BAnBU,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;GACxB,iBAAiB,CAoB7B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mcp/primitives/essential/prompts/twenty-rules.prompt/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmD;AACnD,8CAAyC;AACzC,6BAAwB;AACxB,uCAAyB;AACzB,2CAA6B;AAC7B,qEAAmE;AAInE,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;IAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO,IAAA,sCAAqB,EAAC,QAAQ,CAAC,CAAC;AACzC,CAAC,CAAC,EAAE,CAAC;AAGE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAQ5B,oBAAoB;QAClB,OAAO;YACL,WAAW,EACT,eAAe,CAAC,WAAW;gBAC3B,6EAA6E;YAC/E,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,eAAe,CAAC,OAAO,IAAI,EAAE;qBACpC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAxBY,8CAAiB;AAQ5B;IAPC,IAAA,iBAAM,EAAC;QACN,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,eAAe,CAAC,WAAW;YAC3B,6EAA6E;QAC/E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KACzB,CAAC;;;;6DAgBD;4BAvBU,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;GACxB,iBAAiB,CAwB7B"}
@@ -60,26 +60,26 @@ let SystemInfoResource = class SystemInfoResource {
60
60
  hostname: os.hostname(),
61
61
  nodeVersion: process.version,
62
62
  env: {
63
- NODE_ENV: process.env.NODE_ENV || 'development',
63
+ NODE_ENV: process.env.NODE_ENV || "development",
64
64
  },
65
65
  };
66
66
  return {
67
67
  contents: [
68
68
  {
69
69
  uri: uri,
70
- mimeType: 'application/json',
70
+ mimeType: "application/json",
71
71
  text: JSON.stringify(systemInfo, null, 2),
72
72
  },
73
73
  ],
74
74
  };
75
75
  }
76
76
  getEnvironmentVariable({ uri, name }) {
77
- const value = process.env[name.toUpperCase()] || 'undefined';
77
+ const value = process.env[name.toUpperCase()] || "undefined";
78
78
  return {
79
79
  contents: [
80
80
  {
81
81
  uri: uri,
82
- mimeType: 'text/plain',
82
+ mimeType: "text/plain",
83
83
  text: value,
84
84
  },
85
85
  ],
@@ -89,10 +89,10 @@ let SystemInfoResource = class SystemInfoResource {
89
89
  exports.SystemInfoResource = SystemInfoResource;
90
90
  __decorate([
91
91
  (0, mcp_nest_1.Resource)({
92
- name: 'system-info',
93
- description: 'Current system information and environment',
94
- mimeType: 'application/json',
95
- uri: 'system://info',
92
+ name: "system-info",
93
+ description: "Current system information and environment",
94
+ mimeType: "application/json",
95
+ uri: "system://info",
96
96
  }),
97
97
  __metadata("design:type", Function),
98
98
  __metadata("design:paramtypes", [Object]),
@@ -100,10 +100,10 @@ __decorate([
100
100
  ], SystemInfoResource.prototype, "getSystemInfo", null);
101
101
  __decorate([
102
102
  (0, mcp_nest_1.ResourceTemplate)({
103
- name: 'environment-variable',
104
- description: 'Get a specific environment variable',
105
- mimeType: 'text/plain',
106
- uriTemplate: 'env://{name}',
103
+ name: "environment-variable",
104
+ description: "Get a specific environment variable",
105
+ mimeType: "text/plain",
106
+ uriTemplate: "env://{name}",
107
107
  }),
108
108
  __metadata("design:type", Function),
109
109
  __metadata("design:paramtypes", [Object]),
@@ -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 AddNoteTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;
@@ -10,7 +10,7 @@ export declare class AddNoteTool {
10
10
  fields: Record<string, string>;
11
11
  tags?: string[];
12
12
  allowDuplicate?: boolean;
13
- duplicateScope?: 'deck' | 'collection';
13
+ duplicateScope?: "deck" | "collection";
14
14
  duplicateScopeOptions?: {
15
15
  deckName?: string;
16
16
  checkChildren?: boolean;
@@ -24,9 +24,9 @@ let AddNoteTool = AddNoteTool_1 = class AddNoteTool {
24
24
  }
25
25
  async addNote({ deckName, modelName, fields, tags, allowDuplicate, duplicateScope, duplicateScopeOptions, }, context) {
26
26
  try {
27
- const emptyFields = Object.entries(fields).filter(([_, value]) => !value || value.trim() === '');
27
+ const emptyFields = Object.entries(fields).filter(([_, value]) => !value || value.trim() === "");
28
28
  if (emptyFields.length > 0) {
29
- return (0, anki_utils_1.createErrorResponse)(new Error(`Fields cannot be empty: ${emptyFields.map(([key]) => key).join(', ')}`), {
29
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Fields cannot be empty: ${emptyFields.map(([key]) => key).join(", ")}`), {
30
30
  deckName,
31
31
  modelName,
32
32
  emptyFields: emptyFields.map(([key]) => key),
@@ -60,19 +60,19 @@ let AddNoteTool = AddNoteTool_1 = class AddNoteTool {
60
60
  noteParams.options = options;
61
61
  }
62
62
  await context.reportProgress({ progress: 50, total: 100 });
63
- const noteId = await this.ankiClient.invoke('addNote', {
63
+ const noteId = await this.ankiClient.invoke("addNote", {
64
64
  note: noteParams,
65
65
  });
66
66
  await context.reportProgress({ progress: 75, total: 100 });
67
67
  if (!noteId) {
68
- this.logger.warn('Note creation failed - possibly a duplicate');
68
+ this.logger.warn("Note creation failed - possibly a duplicate");
69
69
  await context.reportProgress({ progress: 100, total: 100 });
70
- return (0, anki_utils_1.createErrorResponse)(new Error('Failed to create note - it may be a duplicate'), {
70
+ return (0, anki_utils_1.createErrorResponse)(new Error("Failed to create note - it may be a duplicate"), {
71
71
  deckName,
72
72
  modelName,
73
73
  hint: allowDuplicate
74
- ? 'The note could not be created. Check if the model and deck names are correct.'
75
- : 'The note appears to be a duplicate. Set allowDuplicate to true if you want to add it anyway.',
74
+ ? "The note could not be created. Check if the model and deck names are correct."
75
+ : "The note appears to be a duplicate. Set allowDuplicate to true if you want to add it anyway.",
76
76
  });
77
77
  }
78
78
  await context.reportProgress({ progress: 100, total: 100 });
@@ -88,40 +88,40 @@ let AddNoteTool = AddNoteTool_1 = class AddNoteTool {
88
88
  details: {
89
89
  fieldsAdded: fieldCount,
90
90
  tagsAdded: tagCount,
91
- duplicateCheckScope: duplicateScope || 'default',
91
+ duplicateCheckScope: duplicateScope || "default",
92
92
  },
93
93
  });
94
94
  }
95
95
  catch (error) {
96
- this.logger.error('Failed to add note', error);
96
+ this.logger.error("Failed to add note", error);
97
97
  if (error instanceof Error) {
98
- if (error.message.includes('model')) {
98
+ if (error.message.includes("model")) {
99
99
  return (0, anki_utils_1.createErrorResponse)(error, {
100
100
  deckName,
101
101
  modelName,
102
- hint: 'Model not found. Use modelNames tool to see available models.',
102
+ hint: "Model not found. Use modelNames tool to see available models.",
103
103
  });
104
104
  }
105
- if (error.message.includes('deck')) {
105
+ if (error.message.includes("deck")) {
106
106
  return (0, anki_utils_1.createErrorResponse)(error, {
107
107
  deckName,
108
108
  modelName,
109
- hint: 'Deck not found. Use list_decks tool to see available decks or createDeck to create a new one.',
109
+ hint: "Deck not found. Use list_decks tool to see available decks or createDeck to create a new one.",
110
110
  });
111
111
  }
112
- if (error.message.includes('field')) {
112
+ if (error.message.includes("field")) {
113
113
  return (0, anki_utils_1.createErrorResponse)(error, {
114
114
  deckName,
115
115
  modelName,
116
116
  providedFields: Object.keys(fields),
117
- hint: 'Field mismatch. Use modelFieldNames tool to see required fields for this model.',
117
+ hint: "Field mismatch. Use modelFieldNames tool to see required fields for this model.",
118
118
  });
119
119
  }
120
120
  }
121
121
  return (0, anki_utils_1.createErrorResponse)(error, {
122
122
  deckName,
123
123
  modelName,
124
- hint: 'Make sure Anki is running and the deck/model names are correct',
124
+ hint: "Make sure Anki is running and the deck/model names are correct",
125
125
  });
126
126
  }
127
127
  }
@@ -129,13 +129,10 @@ let AddNoteTool = AddNoteTool_1 = class AddNoteTool {
129
129
  exports.AddNoteTool = AddNoteTool;
130
130
  __decorate([
131
131
  (0, mcp_nest_1.Tool)({
132
- name: 'addNote',
133
- description: 'Add a new note to Anki. Use modelNames to see available note types and modelFieldNames to see required fields. Returns the note ID on success. IMPORTANT: Only create notes that were explicitly requested by the user.',
132
+ name: "addNote",
133
+ description: "Add a new note to Anki. Use modelNames to see available note types and modelFieldNames to see required fields. Returns the note ID on success. IMPORTANT: Only create notes that were explicitly requested by the user.",
134
134
  parameters: zod_1.z.object({
135
- deckName: zod_1.z
136
- .string()
137
- .min(1)
138
- .describe('The deck to add the note to'),
135
+ deckName: zod_1.z.string().min(1).describe("The deck to add the note to"),
139
136
  modelName: zod_1.z
140
137
  .string()
141
138
  .min(1)
@@ -146,35 +143,35 @@ __decorate([
146
143
  tags: zod_1.z
147
144
  .array(zod_1.z.string())
148
145
  .optional()
149
- .describe('Optional tags to add to the note'),
146
+ .describe("Optional tags to add to the note"),
150
147
  allowDuplicate: zod_1.z
151
148
  .boolean()
152
149
  .optional()
153
150
  .default(false)
154
- .describe('Whether to allow adding duplicate notes'),
151
+ .describe("Whether to allow adding duplicate notes"),
155
152
  duplicateScope: zod_1.z
156
- .enum(['deck', 'collection'])
153
+ .enum(["deck", "collection"])
157
154
  .optional()
158
- .describe('Scope for duplicate checking'),
155
+ .describe("Scope for duplicate checking"),
159
156
  duplicateScopeOptions: zod_1.z
160
157
  .object({
161
158
  deckName: zod_1.z
162
159
  .string()
163
160
  .optional()
164
- .describe('Specific deck to check for duplicates'),
161
+ .describe("Specific deck to check for duplicates"),
165
162
  checkChildren: zod_1.z
166
163
  .boolean()
167
164
  .optional()
168
165
  .default(false)
169
- .describe('Check child decks for duplicates'),
166
+ .describe("Check child decks for duplicates"),
170
167
  checkAllModels: zod_1.z
171
168
  .boolean()
172
169
  .optional()
173
170
  .default(false)
174
- .describe('Check across all note types'),
171
+ .describe("Check across all note types"),
175
172
  })
176
173
  .optional()
177
- .describe('Advanced duplicate checking options'),
174
+ .describe("Advanced duplicate checking options"),
178
175
  }),
179
176
  }),
180
177
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"add-note.tool.js","sour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AAc,EAAE,OAAC;iBACd,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;iBAC5B,QAAQ,EAAE;iBACV,QAAQ,CAAC,8BAA8B,CAAC;YAC3C,qBAAqB,EAAE,OAAC;iBACrB,MAAM,CAAC;gBACN,QAAQ,EAAE,OAAC;qBACR,MAAM,EAAE;qBACR,QAAQ,EAAE;qBACV,QAAQ,CAAC,uCAAuC,CAAC;gBACpD,aAAa,EAAE,OAAC;qBACb,OAAO,EAAE;qBACT,QAAQ,EAAE;qBACV,OAAO,CAAC,KAAK,CAAC;qBACd,QAAQ,CAAC,kCAAkC,CAAC;gBAC/C,cAAc,EAAE,OAAC;qBACd,OAAO,EAAE;qBACT,QAAQ,EAAE;qBACV,OAAO,CAAC,KAAK,CAAC;qBACd,QAAQ,CAAC,6BAA6B,CAAC;aAC3C,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,qCAAqC,CAAC;SACnD,CAAC;KACH,CAAC;;;;0CAiKD;sBAtNU,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,WAAW,CAuNvB"}
@@ -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 CreateDeckTool {
4
4
  private readonly ankiClient;
5
5
  private readonly logger;