anki-mcp-http
Version:
Model Context Protocol server for Anki - enables AI assistants to interact with your Anki flashcards
94 lines • 6.88 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var McpPrimitivesAnkiGuiModule_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.McpPrimitivesAnkiGuiModule = exports.GuiUndoTool = exports.GuiShowAnswerTool = exports.GuiShowQuestionTool = exports.GuiCurrentCardTool = exports.GuiDeckBrowserTool = exports.GuiDeckOverviewTool = exports.GuiEditNoteTool = exports.GuiAddCardsTool = exports.GuiSelectedNotesTool = exports.GuiSelectCardTool = exports.GuiBrowseTool = exports.AnkiConnectError = exports.AnkiConnectClient = exports.ANKI_CONFIG = void 0;
var anki_config_interface_1 = require("../../config/anki-config.interface");
Object.defineProperty(exports, "ANKI_CONFIG", { enumerable: true, get: function () { return anki_config_interface_1.ANKI_CONFIG; } });
__exportStar(require("../../types/anki.types"), exports);
__exportStar(require("../../utils/anki.utils"), exports);
var anki_connect_client_1 = require("../../clients/anki-connect.client");
Object.defineProperty(exports, "AnkiConnectClient", { enumerable: true, get: function () { return anki_connect_client_1.AnkiConnectClient; } });
Object.defineProperty(exports, "AnkiConnectError", { enumerable: true, get: function () { return anki_connect_client_1.AnkiConnectError; } });
var gui_browse_tool_1 = require("./tools/gui-browse.tool");
Object.defineProperty(exports, "GuiBrowseTool", { enumerable: true, get: function () { return gui_browse_tool_1.GuiBrowseTool; } });
var gui_select_card_tool_1 = require("./tools/gui-select-card.tool");
Object.defineProperty(exports, "GuiSelectCardTool", { enumerable: true, get: function () { return gui_select_card_tool_1.GuiSelectCardTool; } });
var gui_selected_notes_tool_1 = require("./tools/gui-selected-notes.tool");
Object.defineProperty(exports, "GuiSelectedNotesTool", { enumerable: true, get: function () { return gui_selected_notes_tool_1.GuiSelectedNotesTool; } });
var gui_add_cards_tool_1 = require("./tools/gui-add-cards.tool");
Object.defineProperty(exports, "GuiAddCardsTool", { enumerable: true, get: function () { return gui_add_cards_tool_1.GuiAddCardsTool; } });
var gui_edit_note_tool_1 = require("./tools/gui-edit-note.tool");
Object.defineProperty(exports, "GuiEditNoteTool", { enumerable: true, get: function () { return gui_edit_note_tool_1.GuiEditNoteTool; } });
var gui_deck_overview_tool_1 = require("./tools/gui-deck-overview.tool");
Object.defineProperty(exports, "GuiDeckOverviewTool", { enumerable: true, get: function () { return gui_deck_overview_tool_1.GuiDeckOverviewTool; } });
var gui_deck_browser_tool_1 = require("./tools/gui-deck-browser.tool");
Object.defineProperty(exports, "GuiDeckBrowserTool", { enumerable: true, get: function () { return gui_deck_browser_tool_1.GuiDeckBrowserTool; } });
var gui_current_card_tool_1 = require("./tools/gui-current-card.tool");
Object.defineProperty(exports, "GuiCurrentCardTool", { enumerable: true, get: function () { return gui_current_card_tool_1.GuiCurrentCardTool; } });
var gui_show_question_tool_1 = require("./tools/gui-show-question.tool");
Object.defineProperty(exports, "GuiShowQuestionTool", { enumerable: true, get: function () { return gui_show_question_tool_1.GuiShowQuestionTool; } });
var gui_show_answer_tool_1 = require("./tools/gui-show-answer.tool");
Object.defineProperty(exports, "GuiShowAnswerTool", { enumerable: true, get: function () { return gui_show_answer_tool_1.GuiShowAnswerTool; } });
var gui_undo_tool_1 = require("./tools/gui-undo.tool");
Object.defineProperty(exports, "GuiUndoTool", { enumerable: true, get: function () { return gui_undo_tool_1.GuiUndoTool; } });
const common_1 = require("@nestjs/common");
const anki_connect_client_2 = require("../../clients/anki-connect.client");
const gui_browse_tool_2 = require("./tools/gui-browse.tool");
const gui_select_card_tool_2 = require("./tools/gui-select-card.tool");
const gui_selected_notes_tool_2 = require("./tools/gui-selected-notes.tool");
const gui_add_cards_tool_2 = require("./tools/gui-add-cards.tool");
const gui_edit_note_tool_2 = require("./tools/gui-edit-note.tool");
const gui_deck_overview_tool_2 = require("./tools/gui-deck-overview.tool");
const gui_deck_browser_tool_2 = require("./tools/gui-deck-browser.tool");
const gui_current_card_tool_2 = require("./tools/gui-current-card.tool");
const gui_show_question_tool_2 = require("./tools/gui-show-question.tool");
const gui_show_answer_tool_2 = require("./tools/gui-show-answer.tool");
const gui_undo_tool_2 = require("./tools/gui-undo.tool");
const MCP_PRIMITIVES = [
anki_connect_client_2.AnkiConnectClient,
gui_browse_tool_2.GuiBrowseTool,
gui_select_card_tool_2.GuiSelectCardTool,
gui_selected_notes_tool_2.GuiSelectedNotesTool,
gui_add_cards_tool_2.GuiAddCardsTool,
gui_edit_note_tool_2.GuiEditNoteTool,
gui_deck_overview_tool_2.GuiDeckOverviewTool,
gui_deck_browser_tool_2.GuiDeckBrowserTool,
gui_current_card_tool_2.GuiCurrentCardTool,
gui_show_question_tool_2.GuiShowQuestionTool,
gui_show_answer_tool_2.GuiShowAnswerTool,
gui_undo_tool_2.GuiUndoTool,
];
let McpPrimitivesAnkiGuiModule = McpPrimitivesAnkiGuiModule_1 = class McpPrimitivesAnkiGuiModule {
static forRoot(options) {
return {
module: McpPrimitivesAnkiGuiModule_1,
providers: [options.ankiConfigProvider, ...MCP_PRIMITIVES],
exports: MCP_PRIMITIVES,
};
}
};
exports.McpPrimitivesAnkiGuiModule = McpPrimitivesAnkiGuiModule;
exports.McpPrimitivesAnkiGuiModule = McpPrimitivesAnkiGuiModule = McpPrimitivesAnkiGuiModule_1 = __decorate([
(0, common_1.Module)({})
], McpPrimitivesAnkiGuiModule);
//# sourceMappingURL=index.js.map