@shumoku/core · 0.4.0 · function
resolve
Resolve the project's own (intrinsic) NetworkGraph against any number of source snapshots into a single graph whose every entity carries `provenance`. Model: **all sources are equal, priority-ordered contributions.** The intrinsic (project-owned) graph is just the top-priority contribution; observed snapshots carry their own priority (mirroring `topology_data_sources.priority`). resolve clusters contributions by identity (any-key match — orthogonal to priority) and then, **per field**, the highest-priority contribution that actually holds a value wins (`priority desc, capturedAt desc`). A field nobody holds is omitted. This is the "Git-like" merge: an edit that only renamed a node keeps the observed ports/community flowing through untouched. There is intentionally NO `=== 'intrinsic'` special-casing in the field merge — "the project's edits win" falls out of "intrinsic has the highest priority". The reserved id `'intrinsic'` survives only as that contribution's source *label*, so the UI can tell a project-set value from an observed one (per-field `fieldSources`, per-attachment `provenance`). It is ownership (intrinsic vs external), NOT a human-vs-machine layer. See `apps/server/docs/design/topology-source-priority-merge.md`.
resolve(authored: NetworkGraph, snapshots: SnapshotEntry[], options?: ResolveOptions): NetworkGraph Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
authored | NetworkGraph | No additional description. | — |
snapshots | SnapshotEntry[] | No additional description. | — |
options | ResolveOptions | No additional description. | {} |
Returns
NetworkGraph