GraphOntologyrelationship intelligence layer

package api

Stable host contract for the shared ontology explorer.

The public package surface for `@graphontology/ontology-graph-explorer`: what host apps can import, what stays internal, and how adapters, reports, plugins, and host-owned routing fit the contract.

Host Embed Example

import {
  OntologyGraphExplorer,
  defaultOntologyPlugins,
  type OntologyGraph
} from "@graphontology/ontology-graph-explorer";

const graph: OntologyGraph = {
  id: "host-graph",
  label: "Host Graph",
  nodes: [
    { id: "agent", label: "Agent", type: "agent" },
    { id: "registry", label: "Registry", type: "registry" }
  ],
  edges: [
    { id: "registry-agent", source: "registry", target: "agent", type: "authority" }
  ]
};

export function HostExplorer() {
  return (
    <OntologyGraphExplorer
      graph={graph}
      mode="authority-chain"
      initialFocusId="registry"
      plugins={defaultOntologyPlugins}
      syncUrlState={false}
    />
  );
}

Boundary Rules

Host apps own authorization, persistence, fetching, registry lookup, and runtime state.

Core package owns graph inspection behavior, canonical rendering, diagnostics, adapters, plugin hooks, and reports.

Use syncUrlState={false} when an embedded host owns mode, focus, and filters instead of the shared page URL.

Import only from the package root. Package-internal component paths are implementation details.

Use the canonical node/edge shape for every host adapter boundary.

adoption path

Open a demo, inspect it, export a report, then embed the same graph contract.

Web4 authority and provenance

A visitor can trace who asserts authority, what delegates it, and which evidence supports the claim.

CanonLink agreement graph

A visitor can inspect an agreement relationship without any CanonLink-specific UI living inside the core package.

Valgraf and Incentivis value graph

A visitor can see how value and evidence move through a mission system instead of reading an opaque score.

Components

Render the explorer, minimap, and framed panels inside host-owned application surfaces.

OntologyGraphExplorerOntologyGraphMiniMapOntologyGraphPanel

State and rendering

Transform canonical graphs, theme the explorer, and opt embedded hosts out of URL state with syncUrlState.

useOntologyGraphStateontologyToCytoscapeElementscytoscapeElementsToOntologycreateOntologyGraphThemedefaultOntologyThemedefaultOntologyLayoutsdefaultOntologyStyles

Diagnostics and algorithms

Validate graph health, trace impact, shortest paths, relationship neighborhoods, and adjacency views.

analyzeOntologyGraphvalidateOntologyGraphfindShortestOntologyPathanalyzeOntologyImpacttraceOntologyRelationshipscreateOntologyAdjacencyMatrix

Adapters

Normalize JSON, JSON-LD, Cytoscape JSON, CSV, registry/API, and Askander host fixture data.

adaptJsonOntologyadaptJsonLdOntologyadaptCytoscapeJsonadaptCsvOntologyadaptRegistryOntologyfetchRegistryOntologyadaptJSOntologySchemasadaptCanonLinkRelationshipsadaptValgrafValueGraphadaptMissionStackTreeadaptPipeFlowMapdefaultOntologyAdaptersadapterFixtureGraphs

Reports and exports

Export portable graph payloads and generate Markdown, HTML, print HTML, and structured JSON reports.

exportOntologyGraphexportOntologyReportMarkdowncreateOntologyReportrenderOntologyReportMarkdownrenderOntologyReportHtmlrenderOntologyReportPrintHtmlrenderOntologyReportJson

Plugins

Register permission-gated toolbar actions, inspector panels, and host extension metadata.

createOntologyPluginRegistrydefaultOntologyPluginsdefaultOntologyPluginPermissions

Samples

Use sampleGraphs for demos, smoke tests, documentation, and external consumer examples.

sampleGraphs