@sofianedjerbi/knowledge-tree-mcp
Version:
MCP server for hierarchical project knowledge management
57 lines • 1.81 kB
TypeScript
/**
* JSON export utilities for Knowledge Tree MCP
* Handles conversion of knowledge entries to JSON format
*/
import type { KnowledgeEntry } from '../../types/index.js';
import type { ExportEntry } from './markdown.js';
/**
* Export metadata structure
*/
export interface ExportMetadata {
exported_at: string;
total_entries: number;
include_links: boolean;
version?: string;
}
/**
* Complete JSON export structure
*/
export interface JSONExport {
metadata: ExportMetadata;
entries: Array<{
path: string;
priority: KnowledgeEntry['priority'];
problem: string;
solution: string;
code?: string;
examples?: Record<string, any>;
related_to?: KnowledgeEntry['related_to'];
}>;
}
/**
* Exports knowledge entries to JSON format
* @param entries - Array of entries to export
* @param includeLinks - Whether to include relationship links
* @returns JSON formatted string
*/
export declare function exportToJSON(entries: ExportEntry[], includeLinks: boolean): string;
/**
* Exports entries grouped by category
* @param entries - Array of entries to export
* @param includeLinks - Whether to include links
* @returns JSON string with hierarchical structure
*/
export declare function exportToJSONByCategory(entries: ExportEntry[], includeLinks: boolean): string;
/**
* Creates a minimal JSON export with just essential fields
* @param entries - Array of entries
* @returns Minimal JSON string
*/
export declare function exportToMinimalJSON(entries: ExportEntry[]): string;
/**
* Creates a JSON export optimized for searching
* @param entries - Array of entries
* @returns Search-optimized JSON string
*/
export declare function exportToSearchJSON(entries: ExportEntry[]): string;
//# sourceMappingURL=json.d.ts.map