Graph construction
createGraph(input)Defensively clones plain JSON-compatible graph input.
validateGraph(graph)Returns structural errors and non-blocking warnings.
normalizeGraph(graph)Resolves defaults and stable edge identities into a NormalizedGraph.
Layout and rendering
layoutGraph(graph, options?)Derives a renderer-independent Scene using LR, RL, TB, or BT layout.
renderSvg(scene, options?)Returns accessible SVG with themes, summaries, responsive output, and optional artifact framing.
renderGraph(graph, options?)Convenience composition of layoutGraph and renderSvg.
lightTheme / darkThemeComplete presentation-token values that can be replaced without modifying graph data.
const svg = await renderGraph(graph, {
layout: { direction: 'TB', spacing: 44 },
render: { theme: darkTheme, responsive: true },
})Semantic lenses
getSemanticLensRecipe(id)Returns a built-in risk, trust, data-flow, provenance, ownership, or modernization lens.
deriveLensProjection(graph, lens)Derives explainable match, context, and background roles without changing graph geometry.
getLensMatch(projection, ref)Returns the role and semantic reasons for one exact entity.
Lens rules contain semantic predicates and reasons—not colors, opacity, coordinates, CSS, or SVG.
Semantic detail
recommendSemanticDetailLevel(zoom, thresholds?)Recommends overview, standard, or close detail from an explicit viewport scale.
renderSvg(scene, { detailLevel })Renders a deterministic disclosure state without changing scene geometry or semantic identity.
defaultSemanticDetailThresholdsExposes the renderer-owned overview and close-scale defaults.
Hosts choose the explicit state. Orbweaver determines which bounded semantic details appear while keeping topology, accessibility, and interaction intact.
Focused path narratives
getPathNarrativeRecipe(id)Returns upstream, downstream, data-lineage, failure-propagation, or trust-crossing traversal semantics.
derivePathNarrative(graph, start, recipe, limits?)Derives stable ordered steps, reasons, summaries, and explicit truncation diagnostics.
getPathNarrativeMatch(projection, ref)Returns whether an entity is the start, a narrative step, or retained background.
Traversal follows normalized semantic relationships in stable graph order. It never invents dependencies or changes scene geometry.
Generated legends
deriveLegend(graph, context?)Inventories only semantic vocabulary present in the artifact, with stable sections and counts.
renderSvg(scene, { includeLegend: true })Appends an accessible renderer-owned legend outside unchanged scene geometry.
LegendModelPresentation-neutral entities, relationships, statuses, annotations, and active reading state for host composition.
Authors choose whether to include the legend. Orbweaver derives its content and treatment, so it cannot drift from the rendered semantics.
Architecture comparison
compareArchitectures(base, target)Matches stable node, relationship, and group IDs into unchanged, introduced, removed, and field-level changed states.
getArchitectureComparisonEntry(comparison, ref)Returns the exact before/after semantic record and changed fields for one entity.
renderSvg(scene, { comparison })Presents the target architecture as an accessible, non-color-only change overlay without inventing removed geometry.
Stable identity drives the diff. Renames are never guessed, removed semantics remain accessible, and target layout stays independently derived.
Inspection and viewport
inspectEntity(graph, ref, lens?, narrative?)Returns semantic details plus optional lens and focused-path reasons without exposing DOM elements.
mountSvgInteraction(svg, graph, options?)Adds selection, relationship emphasis, narrative stepping, keyboard behavior, and lifecycle cleanup.
mountSvgViewport(svg, options?)Adds dependency-free fit, bounded zoom, pan, pinch, centerOn, and cleanup through the SVG viewBox.
Queries
getIncomingEdgesgetOutgoingEdgesgetIncidentEdgesgetNeighborsgetGroupNodessummarizeGraphQuery results preserve graph order and return semantic entities rather than scene or DOM objects.
AI proposal boundary
validateGraphProposal(input, options?)Validates unknown proposal data, references, forbidden geometry, executable markup, and resource limits.
graphProposalJsonSchemaProvider-neutral JSON Schema for GraphProposal version 1.
defaultProposalValidationLimitsConservative limits for proposal size, entities, evidence, claims, text, and metadata depth.
Proposal validation establishes contract conformance. Human or host acceptance remains responsible for factual claims.
Errors
OrbweaverErrorGraphValidationErrorLayoutErrorNo third-party layout types appear in the public signatures.