feat(spaces): implement Phase 3 Persistent Transclusion Context
Implements persistent transclusion context for Information Spaces: - ScopedVariables: Variable scope layers (request > document > space) - SpaceTransclusionContext: Extends TransclusionContext with DB persistence - CrossSpaceResolver: Resolve references across space boundaries - ReferenceGraph: Track document dependencies for cache invalidation - PersistentReferenceGraph: Repository-backed reference tracking - RenderCache: Cache rendered output with invalidation support - CacheInvalidator: Event-driven cache invalidation using reference graph Key features: - Variable precedence: request overrides document overrides space - Reference tracking during transclusion processing - Transitive dependent calculation for cache invalidation - Event bus integration for automatic invalidation on content changes 47 unit tests covering all components. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,40 @@ This package extends the existing TransclusionContext with:
|
||||
- Cross-space reference resolution
|
||||
- Reference graph for dependency tracking
|
||||
- Variable scope layers (space, document, request)
|
||||
- Event-driven cache invalidation
|
||||
"""
|
||||
|
||||
# Transclusion extensions will be implemented in Phase 3
|
||||
__all__ = []
|
||||
from .persistent_context import (
|
||||
SpaceTransclusionContext,
|
||||
ScopedVariables,
|
||||
VariableScope,
|
||||
CrossSpaceResolver,
|
||||
)
|
||||
from .reference_graph import (
|
||||
ReferenceGraph,
|
||||
PersistentReferenceGraph,
|
||||
DependencyNode,
|
||||
)
|
||||
from .cache_invalidation import (
|
||||
RenderCache,
|
||||
CacheEntry,
|
||||
CacheInvalidator,
|
||||
create_invalidation_handler,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Persistent context
|
||||
"SpaceTransclusionContext",
|
||||
"ScopedVariables",
|
||||
"VariableScope",
|
||||
"CrossSpaceResolver",
|
||||
# Reference graph
|
||||
"ReferenceGraph",
|
||||
"PersistentReferenceGraph",
|
||||
"DependencyNode",
|
||||
# Cache invalidation
|
||||
"RenderCache",
|
||||
"CacheEntry",
|
||||
"CacheInvalidator",
|
||||
"create_invalidation_handler",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user