tangl.story.analysis¶
Projection and rendering helpers for inspecting StoryTangl graphs as explicit graph views.
These helpers are observational only. They do not participate in traversal or become a second source of truth.
Related design docs
Projected graph model¶
- class ProjectedNode(id: 'str', label: 'str', source_id: 'str | None', source_kind: 'str | None', synthetic: 'bool' = False, origin_node_ids: 'list[str]' = <factory>, attrs: 'dict[str, object]' = <factory>)[source]¶
- class ProjectedEdge(id: 'str', source_id: 'str', target_id: 'str', label: 'str', source_edge_id: 'str | None', source_kind: 'str | None', edge_role: 'str', synthetic: 'bool' = False, origin_edge_ids: 'list[str]' = <factory>, attrs: 'dict[str, object]' = <factory>)[source]¶
- class ProjectedGroup(id: 'str', label: 'str', group_kind: 'str', member_node_ids: 'list[str]', source_id: 'str | None', source_kind: 'str | None', synthetic: 'bool' = False, origin_node_ids: 'list[str]' = <factory>, attrs: 'dict[str, object]' = <factory>)[source]¶
- class ProjectedGraph(nodes: 'list[ProjectedNode]', edges: 'list[ProjectedEdge]', groups: 'list[ProjectedGroup]', _source_nodes_by_id: 'dict[str, Any]' = <factory>, _source_edges_by_id: 'dict[str, Any]' = <factory>, _projected_node_id_by_source_id: 'dict[str, str]' = <factory>, _origin_source_nodes_by_id: 'dict[str, Any]' = <factory>)[source]¶
Projection APIs¶
- project_story_graph(graph, *, selector=None, node_selector=None, edge_selector=None, processors=())[source]¶
Project one live
StoryGraphinto a filtered deterministic graph view.
Processors¶
- attach_media_preview(media_role=None)[source]¶
Return one processor that annotates nodes with previewable media paths.
- annotate_runtime(ledger, *, include_availability=True)[source]¶
Return one processor that stamps runtime attrs from one live ledger.
- focus_runtime_window(ledger, *, history_steps=6, include_current_successors=True, include_current_predecessors=False)[source]¶
Return one processor that filters one projection to the active runtime slice.