feat(knowledge): Add link resolution service #105

Merged
jason.woltje merged 2 commits from feature/know-link-resolution into develop 2026-01-30 01:42:56 +00:00
Owner

Summary

Adds wiki link resolution and backlink tracking to the Knowledge Module.

New Methods

resolveLinksFromContent(content, workspaceId)

  • Parses WikiLink syntax from markdown content
  • Resolves targets to knowledge entry IDs
  • Returns ResolvedLink[] with position info and entry ID (null if unresolved)

getBacklinks(entryId)

  • Finds all entries that link TO the given entry
  • Returns source entry info (id, title, slug, link text)

Types Added

  • ResolvedLink - Parsed link with resolution status
  • Backlink - Source entry info for backlink display

Resolution Strategy

  1. Exact title match
  2. Slug match
  3. Fuzzy match (existing)

Tests

  • 27 tests passing
  • Covers parsing, resolution, backlinks, edge cases

QA Checklist

  • Links resolve to correct entries
  • Unresolved links return null (not error)
  • Backlinks query returns correct sources
  • Display text syntax works Target
## Summary Adds wiki link resolution and backlink tracking to the Knowledge Module. ## New Methods ### `resolveLinksFromContent(content, workspaceId)` - Parses [[WikiLink]] syntax from markdown content - Resolves targets to knowledge entry IDs - Returns ResolvedLink[] with position info and entry ID (null if unresolved) ### `getBacklinks(entryId)` - Finds all entries that link TO the given entry - Returns source entry info (id, title, slug, link text) ## Types Added - `ResolvedLink` - Parsed link with resolution status - `Backlink` - Source entry info for backlink display ## Resolution Strategy 1. Exact title match 2. Slug match 3. Fuzzy match (existing) ## Tests - 27 tests passing - Covers parsing, resolution, backlinks, edge cases ## QA Checklist - [ ] Links resolve to correct entries - [ ] Unresolved links return null (not error) - [ ] Backlinks query returns correct sources - [ ] Display text syntax works [[Target|Display]]
jason.woltje added 1 commit 2026-01-30 01:35:29 +00:00
- Add resolveLinksFromContent() to parse wiki links from content and resolve them
- Add getBacklinks() to find all entries that link to a target entry
- Import parseWikiLinks from utils for content parsing
- Export new types: ResolvedLink, Backlink
- Add comprehensive tests for new functionality (27 tests total)
jason.woltje added 1 commit 2026-01-30 01:42:47 +00:00
jason.woltje merged commit ac110beb4d into develop 2026-01-30 01:42:56 +00:00
jason.woltje deleted branch feature/know-link-resolution 2026-01-30 01:42:56 +00:00
Sign in to join this conversation.