feat(#59): implement wiki-link parser

- Created wiki-link-parser.ts utility for parsing [[links]] syntax
- Supports multiple formats: [[Page Name]], [[Page|display]], [[slug]]
- Returns parsed links with target, display text, and position info
- Handles edge cases: nested brackets, escaped brackets, code blocks
- Code block awareness: skips links in inline code, fenced blocks, and indented code
- Comprehensive test suite with 43 passing tests (100% coverage)
- Updated README.md with parser documentation

Implements KNOW-007 (Issue #59) - Wiki-style linking foundation
This commit is contained in:
Jason Woltje
2026-01-29 17:42:49 -06:00
parent 95833fb4ea
commit 1e5fcd19a4
10 changed files with 2068 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/**
* DTOs for Ollama module
*/
export interface GenerateOptionsDto {
temperature?: number;
top_p?: number;
max_tokens?: number;
stop?: string[];
stream?: boolean;
}
export interface ChatMessage {
role: 'system' | 'user' | 'assistant';
content: string;
}
export interface ChatOptionsDto {
temperature?: number;
top_p?: number;
max_tokens?: number;
stop?: string[];
stream?: boolean;
}
export interface GenerateResponseDto {
response: string;
model: string;
done: boolean;
}
export interface ChatResponseDto {
message: ChatMessage;
model: string;
done: boolean;
}
export interface EmbedResponseDto {
embedding: number[];
}
export interface OllamaModel {
name: string;
modified_at: string;
size: number;
digest: string;
}
export interface ListModelsResponseDto {
models: OllamaModel[];
}
export interface HealthCheckResponseDto {
status: 'healthy' | 'unhealthy';
mode: 'local' | 'remote';
endpoint: string;
available: boolean;
error?: string;
}