Public API

Small surface.
Complete pipeline.

The website provides a curated guide to the stable concepts. GitHub remains authoritative for exact types, options, and prerelease changes.

Authoritative source on GitHub ↗
createGraphvalidateGraphrenderGraphmount controllers
01

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.

02

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 / darkTheme

Complete 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 },
})
03

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.

Meaning selects presentation

Lens rules contain semantic predicates and reasons—not colors, opacity, coordinates, CSS, or SVG.

04

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.

defaultSemanticDetailThresholds

Exposes the renderer-owned overview and close-scale defaults.

Progressive disclosure, not authored breakpoints

Hosts choose the explicit state. Orbweaver determines which bounded semantic details appear while keeping topology, accessibility, and interaction intact.

05

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.

Trace declared meaning

Traversal follows normalized semantic relationships in stable graph order. It never invents dependencies or changes scene geometry.

06

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.

LegendModel

Presentation-neutral entities, relationships, statuses, annotations, and active reading state for host composition.

The artifact explains itself

Authors choose whether to include the legend. Orbweaver derives its content and treatment, so it cannot drift from the rendered semantics.

07

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.

Compare meaning, not pixels

Stable identity drives the diff. Renames are never guessed, removed semantics remain accessible, and target layout stays independently derived.

08

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.

09

Queries

getIncomingEdgesgetOutgoingEdgesgetIncidentEdgesgetNeighborsgetGroupNodessummarizeGraph

Query results preserve graph order and return semantic entities rather than scene or DOM objects.

10

AI proposal boundary

validateGraphProposal(input, options?)

Validates unknown proposal data, references, forbidden geometry, executable markup, and resource limits.

graphProposalJsonSchema

Provider-neutral JSON Schema for GraphProposal version 1.

defaultProposalValidationLimits

Conservative limits for proposal size, entities, evidence, claims, text, and metadata depth.

Valid does not mean true

Proposal validation establishes contract conformance. Human or host acceptance remains responsible for factual claims.

11

Errors

OrbweaverErrorGraphValidationErrorLayoutError

No third-party layout types appear in the public signatures.