@ltm-blueverse/alpha-semantic-hub 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1674 -0
- package/explorer/README.md +282 -0
- package/explorer/src/App.css +0 -0
- package/explorer/src/App.tsx +2035 -0
- package/explorer/src/ErrorBoundary.tsx +112 -0
- package/explorer/src/ExploreWorkspaceTabs.tsx +29 -0
- package/explorer/src/assets/hero.png +0 -0
- package/explorer/src/assets/react.svg +1 -0
- package/explorer/src/assets/vite.svg +1 -0
- package/explorer/src/explorerCapabilities.ts +24 -0
- package/explorer/src/index.css +71 -0
- package/explorer/src/main.tsx +7 -0
- package/explorer/src/store/edgePairKeys.d.ts +2 -0
- package/explorer/src/store/edgePairKeys.js +7 -0
- package/explorer/src/store/graphStore.ts +183 -0
- package/explorer/src/store/registryStore.ts +78 -0
- package/explorer/src/types.d.ts +16 -0
- package/explorer/src/ui/primitives.css +414 -0
- package/explorer/src/ui/primitives.tsx +170 -0
- package/explorer/src/workspaces/DecisionWorkspace/DecisionWorkspace.tsx +279 -0
- package/explorer/src/workspaces/DiffMergeWorkspace/DiffMergeWorkspace.tsx +121 -0
- package/explorer/src/workspaces/EnrichWorkspace/EntityResolutionTab.tsx +454 -0
- package/explorer/src/workspaces/EnrichWorkspace/RegistryTab.tsx +285 -0
- package/explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx +2673 -0
- package/explorer/src/workspaces/GraphWorkspace/GraphInspectorPanel.tsx +771 -0
- package/explorer/src/workspaces/GraphWorkspace/GraphLoadingOverlay.tsx +410 -0
- package/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx +3584 -0
- package/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx +705 -0
- package/explorer/src/workspaces/GraphWorkspace/SigmaSceneAdapter.tsx +55 -0
- package/explorer/src/workspaces/GraphWorkspace/TimelinePanel.tsx +193 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/clickSelectionBehavior.ts +29 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/fitViewBehavior.ts +15 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/focusCameraBehavior.ts +25 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/hoverActivationBehavior.ts +15 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/pathHighlightBehavior.ts +52 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/searchFocusBehavior.ts +36 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/types.ts +41 -0
- package/explorer/src/workspaces/GraphWorkspace/behaviors/viewModeSwitchBehavior.ts +29 -0
- package/explorer/src/workspaces/GraphWorkspace/graphAnalytics.ts +779 -0
- package/explorer/src/workspaces/GraphWorkspace/graphColorLegend.ts +36 -0
- package/explorer/src/workspaces/GraphWorkspace/graphConfig.ts +102 -0
- package/explorer/src/workspaces/GraphWorkspace/graphEntityShape.ts +34 -0
- package/explorer/src/workspaces/GraphWorkspace/graphLoading.ts +84 -0
- package/explorer/src/workspaces/GraphWorkspace/graphSceneLayers.ts +775 -0
- package/explorer/src/workspaces/GraphWorkspace/graphSceneState.ts +2753 -0
- package/explorer/src/workspaces/GraphWorkspace/graphStructureLayer.ts +335 -0
- package/explorer/src/workspaces/GraphWorkspace/graphTheme.ts +1078 -0
- package/explorer/src/workspaces/GraphWorkspace/graphViewCopy.ts +41 -0
- package/explorer/src/workspaces/GraphWorkspace/localGraphTransition.ts +9 -0
- package/explorer/src/workspaces/GraphWorkspace/markdownEditorState.ts +114 -0
- package/explorer/src/workspaces/GraphWorkspace/markdownResourceClient.ts +103 -0
- package/explorer/src/workspaces/GraphWorkspace/markdownUrlSafety.ts +29 -0
- package/explorer/src/workspaces/GraphWorkspace/nodeMarkdownSync.ts +81 -0
- package/explorer/src/workspaces/GraphWorkspace/pluginRegistryPredicates.ts +24 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPlugin.tsx +353 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPluginPhaseC.tsx +522 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/index.ts +16 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/legendPlugin.tsx +120 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/neighborhoodPanelPlugin.tsx +231 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/temporalOverlayPlugin.tsx +142 -0
- package/explorer/src/workspaces/GraphWorkspace/plugins/types.ts +106 -0
- package/explorer/src/workspaces/GraphWorkspace/realtimeGraphAttributes.ts +50 -0
- package/explorer/src/workspaces/GraphWorkspace/scene.ts +79 -0
- package/explorer/src/workspaces/GraphWorkspace/sigmaNativeRendering.ts +421 -0
- package/explorer/src/workspaces/GraphWorkspace/smallGraphLayout.ts +135 -0
- package/explorer/src/workspaces/GraphWorkspace/temporalLifecyclePredicates.ts +31 -0
- package/explorer/src/workspaces/GraphWorkspace/temporalScrubberBounds.ts +46 -0
- package/explorer/src/workspaces/GraphWorkspace/temporalSnapshotGuards.ts +113 -0
- package/explorer/src/workspaces/GraphWorkspace/types.ts +395 -0
- package/explorer/src/workspaces/GraphWorkspace/useLoadGraph.ts +746 -0
- package/explorer/src/workspaces/GraphWorkspace/useMarkdownEditor.ts +177 -0
- package/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx +196 -0
- package/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx +177 -0
- package/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx +291 -0
- package/explorer/src/workspaces/ManageWorkspace/OntologySummaryTab.tsx +346 -0
- package/explorer/src/workspaces/MemoryWorkspace.tsx +464 -0
- package/explorer/src/workspaces/OntologyWorkspace/AlignmentsTab.tsx +437 -0
- package/explorer/src/workspaces/OntologyWorkspace/HealthTab.tsx +214 -0
- package/explorer/src/workspaces/OntologyWorkspace/OntologyEditor.tsx +770 -0
- package/explorer/src/workspaces/OntologyWorkspace/OntologyLoader.tsx +913 -0
- package/explorer/src/workspaces/OntologyWorkspace/OntologyManager.tsx +930 -0
- package/explorer/src/workspaces/OntologyWorkspace/OntologySearch.tsx +590 -0
- package/explorer/src/workspaces/OntologyWorkspace/ProposalReview.tsx +429 -0
- package/explorer/src/workspaces/OntologyWorkspace/SKOSVocabularyManager.tsx +696 -0
- package/explorer/src/workspaces/OntologyWorkspace/ShaclStudio.tsx +363 -0
- package/explorer/src/workspaces/OntologyWorkspace/VersionsTab.tsx +546 -0
- package/explorer/src/workspaces/OntologyWorkspace/api.ts +164 -0
- package/explorer/src/workspaces/OntologyWorkspace/index.tsx +101 -0
- package/explorer/src/workspaces/OntologyWorkspace/ontologyEditorModel.ts +87 -0
- package/explorer/src/workspaces/OntologyWorkspace/ontologyUrlState.ts +94 -0
- package/explorer/src/workspaces/OntologyWorkspace/types.ts +119 -0
- package/explorer/src/workspaces/ReasoningWorkspace.tsx +243 -0
- package/explorer/src/workspaces/SparqlWorkspace/SparqlWorkspace.tsx +271 -0
- package/explorer/src/workspaces/VocabularyWorkspace/ConceptTree.tsx +97 -0
- package/explorer/src/workspaces/VocabularyWorkspace/ImportDropzone.tsx +95 -0
- package/explorer/src/workspaces/VocabularyWorkspace/PropertyPanel.tsx +116 -0
- package/explorer/src/workspaces/VocabularyWorkspace/Sidebar.tsx +112 -0
- package/explorer/src/workspaces/VocabularyWorkspace/VocabularyWorkspace.tsx +70 -0
- package/explorer/src/workspaces/VocabularyWorkspace/queries.ts +52 -0
- package/explorer/src/workspaces/VocabularyWorkspace/types.ts +24 -0
- package/package.json +31 -0
- package/plugins/.claude-plugin/README.md +262 -0
- package/plugins/.claude-plugin/marketplace.json +20 -0
- package/plugins/.claude-plugin/plugin.json +33 -0
- package/plugins/.cline-plugin/README.md +32 -0
- package/plugins/.cline-plugin/marketplace.json +17 -0
- package/plugins/.cline-plugin/plugin.json +35 -0
- package/plugins/.codex-plugin/marketplace.json +21 -0
- package/plugins/.codex-plugin/plugin.json +35 -0
- package/plugins/.continue-plugin/README.md +34 -0
- package/plugins/.continue-plugin/marketplace.json +17 -0
- package/plugins/.continue-plugin/plugin.json +33 -0
- package/plugins/.cursor-plugin/marketplace.json +18 -0
- package/plugins/.cursor-plugin/plugin.json +32 -0
- package/plugins/.openclaw-plugin/README.md +62 -0
- package/plugins/.openclaw-plugin/marketplace.json +18 -0
- package/plugins/.openclaw-plugin/plugin.json +46 -0
- package/plugins/.pi-plugin/README.md +35 -0
- package/plugins/.vscode-plugin/README.md +48 -0
- package/plugins/.vscode-plugin/marketplace.json +17 -0
- package/plugins/.vscode-plugin/plugin.json +35 -0
- package/plugins/.windsurf-plugin/README.md +39 -0
- package/plugins/.windsurf-plugin/marketplace.json +17 -0
- package/plugins/.windsurf-plugin/plugin.json +35 -0
- package/plugins/agents/decision-advisor.md +126 -0
- package/plugins/agents/explainability.md +129 -0
- package/plugins/agents/kg-assistant.md +73 -0
- package/plugins/hooks/hooks.json +12 -0
- package/plugins/skills/causal/SKILL.md +74 -0
- package/plugins/skills/change/SKILL.md +80 -0
- package/plugins/skills/decision/SKILL.md +197 -0
- package/plugins/skills/deduplicate/SKILL.md +41 -0
- package/plugins/skills/embed/SKILL.md +230 -0
- package/plugins/skills/explain/SKILL.md +44 -0
- package/plugins/skills/export/SKILL.md +67 -0
- package/plugins/skills/extract/SKILL.md +93 -0
- package/plugins/skills/ingest/SKILL.md +38 -0
- package/plugins/skills/ontology/SKILL.md +89 -0
- package/plugins/skills/policy/SKILL.md +66 -0
- package/plugins/skills/provenance/SKILL.md +70 -0
- package/plugins/skills/query/SKILL.md +84 -0
- package/plugins/skills/reason/SKILL.md +201 -0
- package/plugins/skills/temporal/SKILL.md +164 -0
- package/plugins/skills/validate/SKILL.md +228 -0
- package/plugins/skills/visualize/SKILL.md +249 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guards for the temporal snapshot fetch/apply lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* The snapshot effect previously fetched /api/temporal/snapshot with no
|
|
5
|
+
* idempotency or ordering protection. Upstream churn (timeline recreation
|
|
6
|
+
* while bounds settle, play ticks resetting the playhead, drag events) could
|
|
7
|
+
* re-request the same `at` repeatedly, and responses could arrive after the
|
|
8
|
+
* scrubber had moved on.
|
|
9
|
+
*
|
|
10
|
+
* The guards enforce:
|
|
11
|
+
* - at most one in-flight request per scrubber position (identical `at`
|
|
12
|
+
* values are deduplicated while a request is pending, breaking the
|
|
13
|
+
* idle/play polling loop);
|
|
14
|
+
* - successful snapshots are cached per position and re-applied when the
|
|
15
|
+
* scrubber returns (play wrap-around, back-scrubbing) without a refetch;
|
|
16
|
+
* - a response is applied only while the scrubber is still on its position,
|
|
17
|
+
* so out-of-order responses cannot clobber a newer position's count;
|
|
18
|
+
* - failed, cancelled, or superseded requests release their position so it
|
|
19
|
+
* can be fetched again on the next visit;
|
|
20
|
+
* - `reset()` drops all state when the underlying graph data is replaced
|
|
21
|
+
* (reload/retry), because cached snapshots describe the previous graph.
|
|
22
|
+
*
|
|
23
|
+
* `createTemporalSnapshotGuards()` is stateful by design.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export interface TemporalSnapshotResponse {
|
|
27
|
+
active_node_ids: string[];
|
|
28
|
+
active_node_count: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TemporalSnapshotRequest {
|
|
32
|
+
/** null when the request was deduplicated because one is already in flight. */
|
|
33
|
+
seq: number | null;
|
|
34
|
+
/** The snapshot previously applied for this position, when revisiting it. */
|
|
35
|
+
cached: TemporalSnapshotResponse | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TemporalSnapshotGuards {
|
|
39
|
+
/** Begin (or dedupe) a request for `atMs`; marks it as the current position. */
|
|
40
|
+
begin(atMs: number): TemporalSnapshotRequest;
|
|
41
|
+
/** True when the response for `atMs`/`seq` may be applied (scrubber still on `atMs`). */
|
|
42
|
+
shouldApply(atMs: number, seq: number): boolean;
|
|
43
|
+
/** Record a successful application and cache its snapshot for revisits. */
|
|
44
|
+
apply(atMs: number, seq: number, data: TemporalSnapshotResponse): void;
|
|
45
|
+
/** Release a position whose request failed, was cancelled, or was superseded. */
|
|
46
|
+
finish(atMs: number, seq: number): void;
|
|
47
|
+
/** Drop all state; call when the underlying graph data is replaced (reload). */
|
|
48
|
+
reset(): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface SnapshotEntry {
|
|
52
|
+
seq: number;
|
|
53
|
+
/** null while the request is in flight (or before the first success). */
|
|
54
|
+
data: TemporalSnapshotResponse | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Upper bound on cached positions so long scrubbing sessions stay bounded. */
|
|
58
|
+
const MAX_CACHED_POSITIONS = 256;
|
|
59
|
+
|
|
60
|
+
export function createTemporalSnapshotGuards(): TemporalSnapshotGuards {
|
|
61
|
+
const entries = new Map<number, SnapshotEntry>();
|
|
62
|
+
let latestRequestSeq = 0;
|
|
63
|
+
let currentAtMs: number | null = null;
|
|
64
|
+
|
|
65
|
+
const evictOldest = () => {
|
|
66
|
+
while (entries.size > MAX_CACHED_POSITIONS) {
|
|
67
|
+
const oldestAtMs = entries.keys().next().value;
|
|
68
|
+
if (oldestAtMs === undefined) return;
|
|
69
|
+
entries.delete(oldestAtMs);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
begin(atMs) {
|
|
75
|
+
const existing = entries.get(atMs);
|
|
76
|
+
if (existing && existing.data === null) {
|
|
77
|
+
// Identical request already in flight: dedupe, but the scrubber is here now.
|
|
78
|
+
currentAtMs = atMs;
|
|
79
|
+
return { seq: null, cached: null };
|
|
80
|
+
}
|
|
81
|
+
latestRequestSeq += 1;
|
|
82
|
+
const seq = latestRequestSeq;
|
|
83
|
+
entries.set(atMs, { seq, data: existing?.data ?? null });
|
|
84
|
+
currentAtMs = atMs;
|
|
85
|
+
evictOldest();
|
|
86
|
+
return { seq, cached: existing?.data ?? null };
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
shouldApply(atMs, seq) {
|
|
90
|
+
return atMs === currentAtMs && entries.get(atMs)?.seq === seq;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
apply(atMs, seq, data) {
|
|
94
|
+
const entry = entries.get(atMs);
|
|
95
|
+
if (entry && entry.seq === seq) {
|
|
96
|
+
entry.data = data;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
finish(atMs, seq) {
|
|
101
|
+
const entry = entries.get(atMs);
|
|
102
|
+
if (entry && entry.seq === seq && entry.data === null) {
|
|
103
|
+
entries.delete(atMs);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
reset() {
|
|
108
|
+
entries.clear();
|
|
109
|
+
latestRequestSeq = 0;
|
|
110
|
+
currentAtMs = null;
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
export type GraphLayoutViewMode = "full" | "grouped";
|
|
2
|
+
export type GraphViewMode = GraphLayoutViewMode | "focused";
|
|
3
|
+
|
|
4
|
+
export type GroupedViewUnavailableReason =
|
|
5
|
+
| { code: "communities-undetected" }
|
|
6
|
+
| { code: "community-nodes-missing" }
|
|
7
|
+
| { code: "invalid-community-layout"; nodeId: string }
|
|
8
|
+
| { code: "missing-grouped-node"; edgeId: string };
|
|
9
|
+
|
|
10
|
+
export type FocusedUnavailableReason =
|
|
11
|
+
| { code: "no-selection" }
|
|
12
|
+
| { code: "grouped-unresolvable" }
|
|
13
|
+
| { code: "not-in-graph" };
|
|
14
|
+
|
|
15
|
+
export type GraphLayoutSource = "provided" | "carried" | "runtime";
|
|
16
|
+
export type GraphLayoutState = "idle" | "bootstrapping" | "running" | "stabilized" | "interactive" | "failed";
|
|
17
|
+
export type GraphLoadPhase =
|
|
18
|
+
| "bootstrapping"
|
|
19
|
+
| "fetching_nodes"
|
|
20
|
+
| "fetching_edges"
|
|
21
|
+
| "computing_styling"
|
|
22
|
+
| "hydrating_scene"
|
|
23
|
+
| "stabilizing_layout"
|
|
24
|
+
| "ready";
|
|
25
|
+
export type GraphLoadProgressKind = "determinate" | "indeterminate";
|
|
26
|
+
export type GraphNodeInteractionState = "default" | "hovered" | "selected" | "neighbor" | "path" | "inactive" | "muted";
|
|
27
|
+
export type GraphEdgeInteractionState = "default" | "backbone" | "hovered" | "selected" | "neighbor" | "path" | "inactive" | "muted";
|
|
28
|
+
export type GraphFullEdgeClass = "hidden" | "backbone" | "bridge" | "local-context" | "selected" | "path" | "muted";
|
|
29
|
+
export type GraphSelectedNodeKind = "none" | "base" | "grouped" | "unavailable";
|
|
30
|
+
export type GraphDistanceVisualMode = "off" | "ego" | "heatmap" | "structural" | "semantic";
|
|
31
|
+
export type GraphDistanceVisualStatus = "idle" | "loading" | "ready" | "unavailable" | "error";
|
|
32
|
+
|
|
33
|
+
export interface GraphDistanceBucketCounts {
|
|
34
|
+
anchor: number;
|
|
35
|
+
oneHop: number;
|
|
36
|
+
twoHop: number;
|
|
37
|
+
threeHopPlus: number;
|
|
38
|
+
outside: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type GraphHeatmapSaturationMode = "normal" | "sampled";
|
|
42
|
+
|
|
43
|
+
export interface GraphHeatmapRenderSnapshot {
|
|
44
|
+
visibleNodeIds: string[];
|
|
45
|
+
ringCounts: GraphDistanceBucketCounts;
|
|
46
|
+
renderedRingCounts: GraphDistanceBucketCounts;
|
|
47
|
+
saturationMode: GraphHeatmapSaturationMode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GraphDistanceVisualState {
|
|
51
|
+
mode: GraphDistanceVisualMode;
|
|
52
|
+
anchorNodeId: string | null;
|
|
53
|
+
anchorLabel?: string | null;
|
|
54
|
+
maxHops: number;
|
|
55
|
+
structuralDistances: Record<string, number>;
|
|
56
|
+
semanticScores: Record<string, number>;
|
|
57
|
+
distanceCounts?: GraphDistanceBucketCounts;
|
|
58
|
+
outsideCount?: number;
|
|
59
|
+
heatmapVisibleNodeIds?: string[];
|
|
60
|
+
heatmapRingCounts?: GraphDistanceBucketCounts;
|
|
61
|
+
heatmapRenderedRingCounts?: GraphDistanceBucketCounts;
|
|
62
|
+
heatmapSaturationMode?: GraphHeatmapSaturationMode;
|
|
63
|
+
semanticNeighborCount?: number;
|
|
64
|
+
status: GraphDistanceVisualStatus;
|
|
65
|
+
error?: string | null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface GraphCameraState {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
ratio: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface GraphInteractionState {
|
|
75
|
+
hoveredNodeId: string | null;
|
|
76
|
+
selectedNodeId: string;
|
|
77
|
+
selectedEdgeId: string;
|
|
78
|
+
focusedNodeId: string;
|
|
79
|
+
activePath: string[];
|
|
80
|
+
activePathEdgeIds: string[];
|
|
81
|
+
viewMode: GraphViewMode;
|
|
82
|
+
zoomTier: "overview" | "structure" | "inspection";
|
|
83
|
+
isLayoutRunning: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface GraphDisplayStateSnapshot {
|
|
87
|
+
aggregationEnabled: boolean;
|
|
88
|
+
groupedViewAvailable: boolean;
|
|
89
|
+
groupedViewReason: GroupedViewUnavailableReason | null;
|
|
90
|
+
selectedRootNodeId: string | null;
|
|
91
|
+
selectedVisibleNeighborIds: string[];
|
|
92
|
+
selectedCollapsedNeighborIds: string[];
|
|
93
|
+
selectedNodeKind: GraphSelectedNodeKind;
|
|
94
|
+
canActivateFocused: boolean;
|
|
95
|
+
resolvedFocusedNodeId: string | null;
|
|
96
|
+
focusedUnavailableReason: FocusedUnavailableReason | null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type GraphDisplayLayoutMode = "base" | "mirrored" | "owned";
|
|
100
|
+
|
|
101
|
+
export interface GraphDisplayMeta {
|
|
102
|
+
layoutMode: GraphDisplayLayoutMode;
|
|
103
|
+
positionSource: "store" | "display";
|
|
104
|
+
tracksStoreNodePositions: boolean;
|
|
105
|
+
hasSyntheticNodes: boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type GraphEffectToggle =
|
|
109
|
+
| "pathPulseEnabled"
|
|
110
|
+
| "pathFlowEnabled"
|
|
111
|
+
| "lensEnabled"
|
|
112
|
+
| "temporalEmphasisEnabled"
|
|
113
|
+
| "semanticRegionsEnabled"
|
|
114
|
+
| "contoursEnabled"
|
|
115
|
+
| "pathfindingEnabled"
|
|
116
|
+
| "communitiesEnabled"
|
|
117
|
+
| "centralityEnabled"
|
|
118
|
+
| "legendEnabled"
|
|
119
|
+
| "edgeLabelsEnabled"
|
|
120
|
+
| "diagnosticsEnabled";
|
|
121
|
+
|
|
122
|
+
export interface GraphEffectsState {
|
|
123
|
+
pathPulseEnabled: boolean;
|
|
124
|
+
pathFlowEnabled: boolean;
|
|
125
|
+
lensEnabled: boolean;
|
|
126
|
+
temporalEmphasisEnabled: boolean;
|
|
127
|
+
semanticRegionsEnabled: boolean;
|
|
128
|
+
contoursEnabled: boolean;
|
|
129
|
+
pathfindingEnabled: boolean;
|
|
130
|
+
edgeLabelsEnabled: boolean;
|
|
131
|
+
communitiesEnabled: boolean;
|
|
132
|
+
centralityEnabled: boolean;
|
|
133
|
+
legendEnabled: boolean;
|
|
134
|
+
diagnosticsEnabled: boolean;
|
|
135
|
+
lensMode: "neighborhood";
|
|
136
|
+
effectQuality: "bounded";
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface GraphEffectAvailability {
|
|
140
|
+
enabled: boolean;
|
|
141
|
+
available: boolean;
|
|
142
|
+
reason: string;
|
|
143
|
+
detail?: string;
|
|
144
|
+
visibleSegments?: number;
|
|
145
|
+
segmentCap?: number;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type GraphFullEdgeClassCounts = Record<GraphFullEdgeClass, number>;
|
|
149
|
+
|
|
150
|
+
export interface GraphFullEdgeClassDiagnostics {
|
|
151
|
+
mode: GraphViewMode;
|
|
152
|
+
zoomTier: GraphInteractionState["zoomTier"];
|
|
153
|
+
totalEdges: number;
|
|
154
|
+
visibleEdges: number;
|
|
155
|
+
counts: GraphFullEdgeClassCounts;
|
|
156
|
+
updatedAt: number;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type GraphStructureLayerDisabledReason =
|
|
160
|
+
| "non-full-mode"
|
|
161
|
+
| "layout-running"
|
|
162
|
+
| "enough-literal-edges"
|
|
163
|
+
| "no-eligible-edges"
|
|
164
|
+
| "invalid-layer"
|
|
165
|
+
| "cache-empty"
|
|
166
|
+
| "disabled";
|
|
167
|
+
|
|
168
|
+
export interface GraphStructureLayerDiagnostics {
|
|
169
|
+
enabled: boolean;
|
|
170
|
+
disabledReason: GraphStructureLayerDisabledReason | null;
|
|
171
|
+
curveCount: number;
|
|
172
|
+
bridgeCurveCount: number;
|
|
173
|
+
backboneCurveCount: number;
|
|
174
|
+
cacheKey: string;
|
|
175
|
+
lastDrawAt: number | null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface GraphRuntimeDiagnosticsSnapshot {
|
|
179
|
+
effectAvailability: GraphDiagnosticsSnapshot["effectAvailability"];
|
|
180
|
+
edgeClasses?: GraphFullEdgeClassDiagnostics;
|
|
181
|
+
structureLayer?: GraphStructureLayerDiagnostics;
|
|
182
|
+
distanceVisual?: GraphDistanceVisualState;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface GraphDiagnosticsSnapshot {
|
|
186
|
+
interactionState: GraphInteractionState;
|
|
187
|
+
activePluginIds: string[];
|
|
188
|
+
openPanelIds: string[];
|
|
189
|
+
effectsState: GraphEffectsState;
|
|
190
|
+
edgeClasses?: GraphFullEdgeClassDiagnostics;
|
|
191
|
+
structureLayer?: GraphStructureLayerDiagnostics;
|
|
192
|
+
distanceVisual?: GraphDistanceVisualState;
|
|
193
|
+
effectAvailability: {
|
|
194
|
+
pathPulse: GraphEffectAvailability;
|
|
195
|
+
pathFlow: GraphEffectAvailability;
|
|
196
|
+
lens: GraphEffectAvailability;
|
|
197
|
+
temporalEmphasis: GraphEffectAvailability;
|
|
198
|
+
semanticRegions: GraphEffectAvailability;
|
|
199
|
+
contours: GraphEffectAvailability;
|
|
200
|
+
pathfinding: GraphEffectAvailability;
|
|
201
|
+
communities: GraphEffectAvailability;
|
|
202
|
+
centrality: GraphEffectAvailability;
|
|
203
|
+
legend: GraphEffectAvailability;
|
|
204
|
+
edgeLabels: GraphEffectAvailability;
|
|
205
|
+
diagnostics: GraphEffectAvailability;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface GraphTemporalState {
|
|
210
|
+
currentTime: Date | null;
|
|
211
|
+
activeNodeCount: number | null;
|
|
212
|
+
minDate?: string;
|
|
213
|
+
maxDate?: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface GraphDirectedPathSnapshot {
|
|
217
|
+
ready: boolean;
|
|
218
|
+
reason: string;
|
|
219
|
+
sourceId: string | null;
|
|
220
|
+
targetId: string | null;
|
|
221
|
+
path: string[];
|
|
222
|
+
length: number | null;
|
|
223
|
+
verifiedAgainstActivePath: boolean;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface GraphCommunitySummary {
|
|
227
|
+
communityId: string;
|
|
228
|
+
nodeCount: number;
|
|
229
|
+
visibleNodeCount: number;
|
|
230
|
+
dominantSemanticGroup: string;
|
|
231
|
+
color: string;
|
|
232
|
+
anchorNodeId: string | null;
|
|
233
|
+
anchorLabel: string;
|
|
234
|
+
prominence: number;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface GraphSemanticRegionSummary {
|
|
238
|
+
semanticGroup: string;
|
|
239
|
+
nodeCount: number;
|
|
240
|
+
visibleNodeCount: number;
|
|
241
|
+
color: string;
|
|
242
|
+
anchorNodeId: string | null;
|
|
243
|
+
anchorLabel: string;
|
|
244
|
+
dominantCommunityId: string | null;
|
|
245
|
+
prominence: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface GraphCentralityNodeSummary {
|
|
249
|
+
id: string;
|
|
250
|
+
label: string;
|
|
251
|
+
semanticGroup: string;
|
|
252
|
+
color: string;
|
|
253
|
+
degree: number;
|
|
254
|
+
betweenness: number;
|
|
255
|
+
score: number;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface GraphOverviewBackboneSnapshot {
|
|
259
|
+
ready: boolean;
|
|
260
|
+
reason: string;
|
|
261
|
+
edgeIds: string[];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface GraphAnalyticsSnapshot {
|
|
265
|
+
generatedAt: number;
|
|
266
|
+
directedPath: GraphDirectedPathSnapshot;
|
|
267
|
+
communities: {
|
|
268
|
+
ready: boolean;
|
|
269
|
+
reason: string;
|
|
270
|
+
count: number;
|
|
271
|
+
modularity: number | null;
|
|
272
|
+
summaries: GraphCommunitySummary[];
|
|
273
|
+
};
|
|
274
|
+
centrality: {
|
|
275
|
+
ready: boolean;
|
|
276
|
+
reason: string;
|
|
277
|
+
topNodes: GraphCentralityNodeSummary[];
|
|
278
|
+
};
|
|
279
|
+
semanticRegions: {
|
|
280
|
+
ready: boolean;
|
|
281
|
+
reason: string;
|
|
282
|
+
summaries: GraphSemanticRegionSummary[];
|
|
283
|
+
};
|
|
284
|
+
overviewBackbone: GraphOverviewBackboneSnapshot;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface ApiNode {
|
|
288
|
+
id: string;
|
|
289
|
+
type: string;
|
|
290
|
+
content: string;
|
|
291
|
+
x?: number | null;
|
|
292
|
+
y?: number | null;
|
|
293
|
+
properties: Record<string, unknown>;
|
|
294
|
+
valid_from?: string | null;
|
|
295
|
+
valid_until?: string | null;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface ApiEdge {
|
|
299
|
+
id: string;
|
|
300
|
+
familyId: string;
|
|
301
|
+
source: string;
|
|
302
|
+
target: string;
|
|
303
|
+
type: string;
|
|
304
|
+
weight: number;
|
|
305
|
+
properties: Record<string, unknown>;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface GraphLoadSummary {
|
|
309
|
+
nodeCount: number;
|
|
310
|
+
edgeCount: number;
|
|
311
|
+
loadTimeMs: number;
|
|
312
|
+
hasCoordinates?: boolean;
|
|
313
|
+
layoutSource?: GraphLayoutSource;
|
|
314
|
+
layoutReady?: boolean;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface GraphLoadProgress {
|
|
318
|
+
phase: GraphLoadPhase;
|
|
319
|
+
title: string;
|
|
320
|
+
nodesLoaded: number;
|
|
321
|
+
nodesTotal: number | null;
|
|
322
|
+
edgesLoaded: number;
|
|
323
|
+
edgesTotal: number | null;
|
|
324
|
+
message: string;
|
|
325
|
+
progressKind: GraphLoadProgressKind;
|
|
326
|
+
loaded: number | null;
|
|
327
|
+
total: number | null;
|
|
328
|
+
showGraphBehind: boolean;
|
|
329
|
+
stageIndex?: number;
|
|
330
|
+
stageCount?: number;
|
|
331
|
+
layoutSource?: GraphLayoutSource;
|
|
332
|
+
layoutState?: GraphLayoutState;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface GraphDataSnapshot {
|
|
336
|
+
nodes: ApiNode[];
|
|
337
|
+
edges: ApiEdge[];
|
|
338
|
+
summary: GraphLoadSummary;
|
|
339
|
+
fetchedAt: number;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface GraphLayoutStatus {
|
|
343
|
+
state: GraphLayoutState;
|
|
344
|
+
source: GraphLayoutSource;
|
|
345
|
+
hasCoordinates: boolean;
|
|
346
|
+
layoutReady: boolean;
|
|
347
|
+
displacement: number | null;
|
|
348
|
+
elapsedMs: number;
|
|
349
|
+
stableSamples: number;
|
|
350
|
+
timedOut?: boolean;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export type GraphPath = string[];
|
|
354
|
+
|
|
355
|
+
export interface GraphSelectedNodeState {
|
|
356
|
+
id: string;
|
|
357
|
+
label: string;
|
|
358
|
+
content: string;
|
|
359
|
+
nodeType: string;
|
|
360
|
+
color?: string;
|
|
361
|
+
valid_from?: string | null;
|
|
362
|
+
valid_until?: string | null;
|
|
363
|
+
properties: Record<string, unknown>;
|
|
364
|
+
neighborCount: number;
|
|
365
|
+
visibleNeighborCount: number;
|
|
366
|
+
collapsedNeighborCount: number;
|
|
367
|
+
isNeighborhoodCollapsed: boolean;
|
|
368
|
+
canCollapseNeighborhood: boolean;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface GraphSelectedEdgeState {
|
|
372
|
+
id: string;
|
|
373
|
+
familyId: string;
|
|
374
|
+
sourceId: string;
|
|
375
|
+
sourceLabel: string;
|
|
376
|
+
targetId: string;
|
|
377
|
+
targetLabel: string;
|
|
378
|
+
edgeType: string;
|
|
379
|
+
weight: number;
|
|
380
|
+
properties: Record<string, unknown>;
|
|
381
|
+
provenanceCount: number;
|
|
382
|
+
familySize: number;
|
|
383
|
+
siblingCount: number;
|
|
384
|
+
isAggregated: boolean;
|
|
385
|
+
aggregateCount: number;
|
|
386
|
+
rawEdgeIds: string[];
|
|
387
|
+
bundleKind: "parallel" | "bidirectional" | "community" | null;
|
|
388
|
+
dominantEdgeType: string | null;
|
|
389
|
+
representativeWeight: number;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export interface GraphStageHandle {
|
|
393
|
+
fitView: () => void;
|
|
394
|
+
focusNode: (nodeId: string) => void;
|
|
395
|
+
}
|