generated from coulomb/repo-seed
feat(views): wikilink + red-link model (WP-0010 T1)
A CommonMark wikilink extension: extract [[Target]] / [[Target|label]] from a page body (skipping fenced + inline code, preserving offsets), and resolve each target through the union — resolved is a link, unresolved is a createable red-link (never a dropped reference). CamelCase auto-linking is off by default, opt-in per space, and never double-counts a target already inside [[...]]. Link model + resolution are core; rendering stays L6. New views/ package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
21
src/shard_wiki/views/__init__.py
Normal file
21
src/shard_wiki/views/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""views/ — derived, recomputable, provenance-carrying read views over the union (§8.4).
|
||||
|
||||
All views here are *derived tier*: pure functions of the attached shards plus the coordination-log
|
||||
fold, storing nothing canonical (SHARD-WP-0011 makes them incrementally maintainable). Presentation
|
||||
stays out of core (L6) — these produce models, never rendered output. Per the dependency rule this
|
||||
package imports down (union/model/coordination/provenance) and is imported only by the orchestrator.
|
||||
"""
|
||||
|
||||
from shard_wiki.views.links import (
|
||||
ResolvedLink,
|
||||
WikiLink,
|
||||
extract_links,
|
||||
resolve_links,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"WikiLink",
|
||||
"ResolvedLink",
|
||||
"extract_links",
|
||||
"resolve_links",
|
||||
]
|
||||
Reference in New Issue
Block a user