# resolveNetwork

Canonical: https://docs.shumoku.dev/ja/library/api/resolveNetwork
Language: ja

@shumoku/core · 0.4.2 · function

# resolveNetwork

[ソース](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/observation/resolve-network.ts#L73)

APIの説明は英語のcanonical sourceを表示しています。

Merge the project's own model with what every source observed into one model of the same shape. All contributions are equal and priority-ordered; the project is just the top priority. Nodes are clustered by identity (any-key match, or a shared registry entity id) regardless of priority, and then per field the highest-priority contribution that holds a value wins (\`priority desc, capturedAt desc\`). Who won the label, type, product and group is recorded in the observation layer's \`fieldSources\`; every node, port, group and link gets a \`provenance\`. The merged network keeps a node's project id when the project wrote it, and gives a node only sources found a synthesized \`discovered:N\` id. Each source's groups, segments, routing domains, connections and redundancy sets are namespaced by its source id so they never collide. See \`apps/server/docs/design/topology-source-priority-merge.md\`.

```
resolveNetwork(project: NetworkModel, snapshots: SourceSnapshot[], options?: ResolveOptions): NetworkModel
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `project` | `NetworkModel` | 追加説明はありません。 | `—` |
| `snapshots` | `SourceSnapshot[]` | 追加説明はありません。 | `—` |
| `options` | `ResolveOptions` | 追加説明はありません。 | `{}` |

## 戻り値

```
NetworkModel
```

[`libs/@shumoku/core/src/libs/@shumoku/core/src/observation/resolve-network.ts:73`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/observation/resolve-network.ts#L73)
