---
title: "@vltpkg/graph: index — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/graph/module_index"
image: "https://docs.vlt.io/og/client/api-reference/graph/module_index"
lang: "en"
---

# index

## Classes

### Diff

Defined in: graph/src/diff.ts:34

A Diff object is a representation of a set of changes from one graph to another, typically from the actual graph as it is reified on disk, to an intended ideal graph.

The naming convention can get a bit confusing here, because it's a set of directed changes from one set of directed objects to another.

Within the context the Diff object, `from` is the Graph we're coming from, and `to` is the Graph we're trying to create.

#### Constructors

##### new Diff()

```ts
new Diff(from, to): Diff
```

Defined in: graph/src/diff.ts:75

###### Parameters

| Parameter | Type                                                                            |
| --------- | ------------------------------------------------------------------------------- |
| `from`    | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) |
| `to`      | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) |

###### Returns

[`Diff`](https://docs.vlt.io/client/api-reference/graph/module_index.md#diff)

#### Properties

| Property              | Type                                                                                 | Default value | Description                                                                                                                                |
| --------------------- | ------------------------------------------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `edges`               | `object`                                                                             | `undefined`   | Collection of nodes to add and delete                                                                                                      |
| `edges.add`           | `Set`<[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)> | `undefined`   | Edges in the `to` graph that are not found in the `from` graph                                                                             |
| `edges.delete`        | `Set`<[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)> | `undefined`   | Edges in the `from` graph that are not found in the `to` graph                                                                             |
| `from`                | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)      | `undefined`   | -                                                                                                                                          |
| `hadOptionalFailures` | `boolean`                                                                            | `false`       | If changes need to be made later for failures of optional nodes, set this flag so that we know to call graph.gc() at the appropriate time. |
| `nodes`               | `object`                                                                             | `undefined`   | Collection of nodes to add and delete                                                                                                      |
| `nodes.add`           | `Set`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)> | `undefined`   | Nodes in the `to` graph that are not in the `from` graph                                                                                   |
| `nodes.delete`        | `Set`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)> | `undefined`   | Nodes in the `from` graph that are not in the `to` graph                                                                                   |
| `optionalOnly`        | `boolean`                                                                            | `true`        | True if every added node/edge is confined to an optional subtree                                                                           |
| `projectRoot`         | `string`                                                                             | `undefined`   | -                                                                                                                                          |
| `to`                  | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)      | `undefined`   | -                                                                                                                                          |

#### Accessors

##### \[toStringTag]

###### Get Signature

```ts
get toStringTag: string
```

Defined in: graph/src/diff.ts:71

###### Returns

`string`

#### Methods

##### \[kCustomInspect]\()

```ts
kCustomInspect: string
```

Defined in: graph/src/diff.ts:135

###### Parameters

| Parameter  | Type             |
| ---------- | ---------------- |
| `_`        | `number`         |
| `options`? | `InspectOptions` |

###### Returns

`string`

##### hasChanges()

```ts
hasChanges(): boolean
```

Defined in: graph/src/diff.ts:175

###### Returns

`boolean`

##### toJSON()

```ts
toJSON(): object
```

Defined in: graph/src/diff.ts:184

###### Returns

`object`

| Name           | Type        |
| -------------- | ----------- |
| `edges`        | `object`    |
| `edges.add`    | `object`\[] |
| `edges.delete` | `object`\[] |
| `nodes`        | `object`    |
| `nodes.add`    | `object`\[] |
| `nodes.delete` | `object`\[] |

---

### Edge

Defined in: graph/src/edge.ts:10

#### Implements

- [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike)

#### Constructors

##### new Edge()

```ts
new Edge(
   type, 
   spec, 
   from, 
   to?): Edge
```

Defined in: graph/src/edge.ts:48

###### Parameters

| Parameter | Type                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `type`    | [`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) |
| `spec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                             |
| `from`    | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                            |
| `to`?     | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                            |

###### Returns

[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)

#### Properties

| Property | Type                                                                                                     | Description                                                               |
| -------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `from`   | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                            | The Node this Edge is connecting from, this is usually the dependent.     |
| `spec`   | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                             | The defined spec value for `to` as parsed from the dependent metadata.    |
| `to?`    | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                            | The node this Edge is connecting to, this is usually a direct dependency. |
| `type`   | [`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) | What type of dependency relationship `from` and `to` nodes have.          |

#### Accessors

##### \[toStringTag]

###### Get Signature

```ts
get toStringTag: string
```

Defined in: graph/src/edge.ts:11

###### Returns

`string`

##### dev

###### Get Signature

```ts
get dev(): boolean
```

Defined in: graph/src/edge.ts:70

This edge was defined as part of a `devDependencies` in `package.json`

###### Returns

`boolean`

##### name

###### Get Signature

```ts
get name(): string
```

Defined in: graph/src/edge.ts:63

The name of the dependency `to` as defined in the dependent metadata.

###### Returns

`string`

###### Implementation of

```ts
EdgeLike.name
```

##### optional

###### Get Signature

```ts
get optional(): boolean
```

Defined in: graph/src/edge.ts:74

###### Returns

`boolean`

###### Implementation of

```ts
EdgeLike.optional
```

##### peer

###### Get Signature

```ts
get peer(): boolean
```

Defined in: graph/src/edge.ts:78

###### Returns

`boolean`

###### Implementation of

```ts
EdgeLike.peer
```

##### peerOptional

###### Get Signature

```ts
get peerOptional(): boolean
```

Defined in: graph/src/edge.ts:82

###### Returns

`boolean`

#### Methods

##### \[kCustomInspect]\()

```ts
kCustomInspect: string
```

Defined in: graph/src/edge.ts:15

###### Parameters

| Parameter | Type             |
| --------- | ---------------- |
| `_`       | `number`         |
| `options` | `InspectOptions` |

###### Returns

`string`

##### toJSON()

```ts
toJSON(): object
```

Defined in: graph/src/edge.ts:97

###### Returns

`object`

| Name   | Type                                                                                                     |
| ------ | -------------------------------------------------------------------------------------------------------- |
| `from` | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                              |
| `spec` | `string`                                                                                                 |
| `to`   | `undefined` \| [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)               |
| `type` | [`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) |

##### toString()

```ts
toString(): string
```

Defined in: graph/src/edge.ts:106

Returns a string representation of an object.

###### Returns

`string`

##### valid()

```ts
valid(): boolean
```

Defined in: graph/src/edge.ts:86

###### Returns

`boolean`

---

### Graph

Defined in: graph/src/graph.ts:90

#### Implements

- [`GraphLike`](https://docs.vlt.io/client/api-reference/types/reference.md#graphlike)

#### Constructors

##### new Graph()

```ts
new Graph(options): Graph
```

Defined in: graph/src/graph.ts:231

###### Parameters

| Parameter | Type                                                                                          |
| --------- | --------------------------------------------------------------------------------------------- |
| `options` | [`GraphOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphoptions) |

###### Returns

[`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)

#### Properties

| Property                  | Type                                                                                                                                                                   | Default value | Description                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `currentPeerContextIndex` | `number`                                                                                                                                                               | `0`           | Tracks the current peer context index.                                                                                                                                                                                                                                                                                                                                       |
| `edges`                   | `Set`<[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)>                                                                                   | `undefined`   | A set of all edges in this graph.                                                                                                                                                                                                                                                                                                                                            |
| `extraneousDependencies`  | `Set`<[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)>                                                                                   | `undefined`   | A set of extraneous dependencies found when building the graph.                                                                                                                                                                                                                                                                                                              |
| `importers`               | `Set`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)>                                                                                   | `undefined`   | A set of importer nodes in this graph.                                                                                                                                                                                                                                                                                                                                       |
| `lockedResolutions?`      | `Map`<`string`, [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)>                                                                           | `undefined`   | Lockfile edge targets captured immediately before `resetEdges()`. Used by the ideal builder to reuse locked resolutions across a rebuild.                                                                                                                                                                                                                                    |
| `lockfileStale`           | `boolean`                                                                                                                                                              | `false`       | Whether the lockfile on disk no longer matches this graph even though no node changed, e.g. an importer edge spec was rewritten to the value saved to `package.json`, a node dev/optional flag was re-derived, or the config options the graph was built with differ from the ones stored in the lockfile. Reify saves the lockfiles from its no-diff early return when set. |
| `mainImporter`            | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                                                                                          | `undefined`   | The [Node](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) that represents the project root `package.json`.                                                                                                                                                                                                                                             |
| `manifests`               | [`ManifestInventory`](https://docs.vlt.io/client/api-reference/graph/module_index.md#manifestinventory)                                                                | `undefined`   | An inventory with all manifests related to an install.                                                                                                                                                                                                                                                                                                                       |
| `monorepo?`               | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                                                                                | `undefined`   | A [Monorepo](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo) instance, used for managing workspaces.                                                                                                                                                                                                                                              |
| `mutations`               | `number`                                                                                                                                                               | `0`           | Count of structural writes: nodes placed or removed, edges reset, created or re-pointed. Never reset; callers snapshot it and compare, so the ideal builder can tell whether a rebuild touched anything the peer identities depend on.                                                                                                                                       |
| `nodes`                   | `Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)>      | `undefined`   | Map registered dep ids to the node that represent them in the graph.                                                                                                                                                                                                                                                                                                         |
| `nodesByName`             | `Map`<`string`, `Set`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)>>                                                                  | `undefined`   | Map of nodes by their name                                                                                                                                                                                                                                                                                                                                                   |
| `optionsChanged`          | `boolean`                                                                                                                                                              | `false`       | Whether the options used to create this graph differ from the options stored in the lockfile it was loaded from. When true, the ideal builder must reset edges and rebuild the graph.                                                                                                                                                                                        |
| `optionsChanges`          | [`OptionsChange`](https://docs.vlt.io/client/api-reference/graph/module_index.md#optionschange)\[]                                                                     | `[]`          | The individual differences behind `optionsChanged`, in the order they are reported to the user. Empty when nothing changed.                                                                                                                                                                                                                                                  |
| `peerContextForkCache`    | `Map`<`string`, `PeerContext`>                                                                                                                                         | `undefined`   | Cache of forked peer contexts so identical fork operations can reuse previously created contexts instead of duplicating them. Key format is internal and constructed in `ideal/peers.ts`.                                                                                                                                                                                    |
| `peerContexts`            | `PeerContext`\[]                                                                                                                                                       | `undefined`   | The peer context sets used to resolve peer dependencies within this graph.                                                                                                                                                                                                                                                                                                   |
| `projectRoot`             | `string`                                                                                                                                                               | `undefined`   | The root of the project this graph represents                                                                                                                                                                                                                                                                                                                                |
| `repin?`                  | `Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), [`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest)> | `undefined`   | Git nodes dropped from the starting graph to pin them: base id → the manifest they re-resolved to, placed instead of fetching.                                                                                                                                                                                                                                               |
| `resolutions`             | `Map`<`string`, [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)>                                                                         | `undefined`   | Cached resolutions for spec lookups                                                                                                                                                                                                                                                                                                                                          |
| `resolutionsReverse`      | `Map`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node), `Set`<`string`>>                                                                  | `undefined`   | Reverse map of resolutions                                                                                                                                                                                                                                                                                                                                                   |
| `unlockedEdges?`          | `Set`<`string`>                                                                                                                                                        | `undefined`   | `baseDepID(fromId)\0name` keys of edges `vlt update <pkg>` re-resolves: the rebuild reuses no detached (locked) node for them.                                                                                                                                                                                                                                               |
| `unpinnedNpmRegistry?`    | `string`                                                                                                                                                               | `undefined`   | The configured `registries.npm` URL, when the lockfile this graph was loaded from left `npm` at the built-in default (vlt's public npm mirror). Saving leaves it out of the lockfile until a node resolves through it, so installing from such a lockfile with another `registries.npm` (e.g. an account mirror) does not rewrite it.                                        |

#### Accessors

##### \[toStringTag]

###### Get Signature

```ts
get toStringTag: string
```

Defined in: graph/src/graph.ts:91

###### Returns

`string`

#### Methods

##### \[kCustomInspect]\()

```ts
kCustomInspect: string
```

Defined in: graph/src/graph.ts:810

###### Parameters

| Parameter | Type             |
| --------- | ---------------- |
| `_`       | `number`         |
| `options` | `InspectOptions` |

###### Returns

`string`

##### addEdge()

```ts
addEdge(
   type, 
   spec, 
   from, 
   to?): Edge
```

Defined in: graph/src/graph.ts:432

Create a new edge between two nodes of the graph in case both exist, in case the destination node does not exists, then a dangling edge, pointing to nothing will be created to represent that missing dependency.

###### Parameters

| Parameter | Type                                                                                                   |
| --------- | ------------------------------------------------------------------------------------------------------ |
| `type`    | [`DependencySaveType`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencysavetype) |
| `spec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                           |
| `from`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)                     |
| `to`?     | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)                     |

###### Returns

[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)

###### Implementation of

```ts
GraphLike.addEdge
```

##### addNode()

```ts
addNode(
   id?, 
   manifest?, 
   spec?, 
   name?, 
   version?): Node
```

Defined in: graph/src/graph.ts:538

Create a new node in the graph.

###### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`?       | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                                                                                                                                                                                                   |
| `manifest`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |
| `spec`?     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                                                                                                                                                                  |
| `name`?     | `string`                                                                                                                                                                                                                                                                      |
| `version`?  | `string`                                                                                                                                                                                                                                                                      |

###### Returns

[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)

###### Implementation of

```ts
GraphLike.addNode
```

##### findResolution()

```ts
findResolution(
   spec, 
   fromNode, 
   extra): undefined | Node
```

Defined in: graph/src/graph.ts:492

Find an existing node to satisfy a dependency

###### Parameters

| Parameter  | Type                                                                          | Default value |
| ---------- | ----------------------------------------------------------------------------- | ------------- |
| `spec`     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)  | `undefined`   |
| `fromNode` | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) | `undefined`   |
| `extra`    | `string`                                                                      | `''`          |

###### Returns

`undefined` | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)

##### gc()

```ts
gc(): Map<DepID, Node>
```

Defined in: graph/src/graph.ts:357

Delete all nodes and edges that are unreachable from the importers. The collection of deleted nodes is returned.

Marking is O(N+E) and always runs, but when nothing is unreachable and every reachable node is registered under its own id, `nodes` is left alone — no rebuild, no sort, and an empty map is returned. Only call when it is known that some unreachable nodes may have been created, for example when deleting the unneeded subgraph when an optional node fails to resolve/install.

###### Returns

`Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)>

##### nextPeerContextIndex()

```ts
nextPeerContextIndex(): number
```

Defined in: graph/src/graph.ts:313

Get the next peer context index.

###### Returns

`number`

##### placePackage()

```ts
placePackage(
   fromNode, 
   depType, 
   spec, 
   manifest?, 
   id?, 
   extra?): undefined | Node
```

Defined in: graph/src/graph.ts:578

Place a new package into the graph representation, creating the new edges and possibly new nodes that are to be expected when traversing the graph in a top-down direction, e.g: from importers to leafs.

For different uses that are not a direct top-down traversal of the graph consider using `addNode()` and `addEdge()` instead.

###### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fromNode`  | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                                                                                                                                                                                                 |
| `depType`   | [`DependencySaveType`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencysavetype)                                                                                                                                                                        |
| `spec`      | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                                                                                                                                                                  |
| `manifest`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |
| `id`?       | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                                                                                                                                                                                                   |
| `extra`?    | `string`                                                                                                                                                                                                                                                                      |

###### Returns

`undefined` | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)

##### recomputeFlags()

```ts
recomputeFlags(): void
```

Defined in: graph/src/graph.ts:323

Re-derive node `dev`/`optional` flags: a node is dev/optional only when every importer path crosses a dev/optional edge. Placement only ever lowers these flags, so removed or retyped edges leave them stale. Sets `lockfileStale` when any flag changes.

###### Returns

`void`

##### removeEdgeResolution()

```ts
removeEdgeResolution(edge, extra): void
```

Defined in: graph/src/graph.ts:758

Removes the resolved node of a given edge.

###### Parameters

| Parameter | Type                                                                          | Default value |
| --------- | ----------------------------------------------------------------------------- | ------------- |
| `edge`    | [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge) | `undefined`   |
| `extra`   | `string`                                                                      | `''`          |

###### Returns

`void`

##### removeNode()

```ts
removeNode(
   node, 
   replacement?, 
   keepEdges?): void
```

Defined in: graph/src/graph.ts:719

Removes a node and its relevant edges from the graph.

Use the `keepEdges` option to keep the edges that were pointing to this node and only removes their `to` property value.

If a replacement is provided, then any edges that were previously pointing to the removed node will be directed to the replacement, if it is valid to do so.

###### Parameters

| Parameter      | Type                                                                          |
| -------------- | ----------------------------------------------------------------------------- |
| `node`         | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |
| `replacement`? | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |
| `keepEdges`?   | `boolean`                                                                     |

###### Returns

`void`

###### Implementation of

```ts
GraphLike.removeNode
```

##### resetEdges()

```ts
resetEdges(): void
```

Defined in: graph/src/graph.ts:782

Remove all edges from the graph while preserving nodes and resolution caches. This allows the graph to be reconstructed efficiently using the existing nodes.

###### Returns

`void`

##### sortNodes()

```ts
sortNodes(): void
```

Defined in: graph/src/graph.ts:399

Rebuild `nodes` so importers come first, then remaining nodes in DepID order. Matches lockfile save so a built graph and a save→load round-trip iterate the same way.

A graph coming from the lockfile loader is already in that order, so the pass below detects it and keeps the map as-is.

###### Returns

`void`

##### toJSON()

```ts
toJSON(): LockfileData
```

Defined in: graph/src/graph.ts:802

###### Returns

[`LockfileData`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfiledata-1)

---

### GraphModifier

Defined in: graph/src/modifiers.ts:177

Class representing loaded modifiers configuration for a project.

Instances of this class can be used as a helper to modify the graph during the graph build ideal traversal time.

```
const modifier = new GraphModifier(options)
modifier.load(options)
```

The `tryImporter` method can be used to register the initial importer node along with any modifier that includes an importer selector, e.g: `modifier.tryImporter(graph.mainImporter)`

When traversing the graph, use the `tryNewDependency` method to check if a given dependency spec to the current traversed node has matching registered modifiers, e.g: `const entries = modifier.tryNewDependency(fromNode, depSpec)`

Use `updateActiveEntry` to update a given active modifier entry state with the current node of the graph being traversed. e.g:

```
for (const entry of entries)
  modifier.updateActiveEntry(fromNode, entry)
```

A trailing `:workspace` right after an importer selector, e.g. `:project > :workspace`, is expanded into one `#<name>` entry per named workspace of the graph, on its first `tryImporter` or `importerEdgeModifier` call.

#### Constructors

##### new GraphModifier()

```ts
new GraphModifier(options): GraphModifier
```

Defined in: graph/src/modifiers.ts:228

###### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

###### Returns

[`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)

#### Properties

| Property          | Type                                                                                                               | Description                                                  |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| `activeModifiers` | `Set`<[`ModifierActiveEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry)> | A set of currently active modifiers, which are being parsed. |
| `modifierNames`   | `Set`<`string`>                                                                                                    | A set of all modifier string values loaded from vlt.json     |

#### Accessors

##### config

###### Get Signature

```ts
get config(): GraphModifierConfigObject
```

Defined in: graph/src/modifiers.ts:236

Load the modifiers definitions from vlt.json, converting the result into a GraphModifierConfigObject

###### Returns

[`GraphModifierConfigObject`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifierconfigobject)

#### Methods

##### deregisterModifier()

```ts
deregisterModifier(modifier): void
```

Defined in: graph/src/modifiers.ts:623

Removes a previously registered modifier from the active entries.

###### Parameters

| Parameter  | Type                                                                                            |
| ---------- | ----------------------------------------------------------------------------------------------- |
| `modifier` | [`ModifierEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifierentry) |

###### Returns

`void`

##### expandWorkspaceNames()

```ts
expandWorkspaceNames(names): void
```

Defined in: graph/src/modifiers.ts:412

Expands `<importer> > :workspace` modifiers for these workspace names, for callers that read importer edges before there is a graph, see [GraphModifier.importerEdgeModifier](https://docs.vlt.io/client/api-reference/graph/module_index.md#importeredgemodifier).

###### Parameters

| Parameter | Type                 |
| --------- | -------------------- |
| `names`   | `Iterable`<`string`> |

###### Returns

`void`

##### importerEdgeModifier()

```ts
importerEdgeModifier(importer, spec): undefined | ModifierEntry
```

Defined in: graph/src/modifiers.ts:262

The modifier governing the direct `importer -> spec.name` edge, see [GraphModifier.targetsImporterEdge](https://docs.vlt.io/client/api-reference/graph/module_index.md#targetsimporteredge). The most specific one wins, same as during the graph build. Without a graph node, `<importer> > :workspace` modifiers only cover the names given to [GraphModifier.expandWorkspaceNames](https://docs.vlt.io/client/api-reference/graph/module_index.md#expandworkspacenames).

###### Parameters

| Parameter  | Type                                                                                                                                                                                                        |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `importer` | \| [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) \| `Pick`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node), `"importer"` \| `"mainImporter"`> |
| `spec`     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                                                                                                |

###### Returns

`undefined` | [`ModifierEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifierentry)

##### load()

```ts
load(options): void
```

Defined in: graph/src/modifiers.ts:326

Loads the modifiers defined in `vlt.json` into memory.

###### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

###### Returns

`void`

##### newModifier()

```ts
newModifier(from, modifier): ModifierActiveEntry
```

Defined in: graph/src/modifiers.ts:609

Creates a new active modifier.

###### Parameters

| Parameter  | Type                                                                                            |
| ---------- | ----------------------------------------------------------------------------------------------- |
| `from`     | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                   |
| `modifier` | [`ModifierEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifierentry) |

###### Returns

[`ModifierActiveEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry)

##### removesEdge()

```ts
removesEdge(name): boolean
```

Defined in: graph/src/modifiers.ts:315

Whether any `-` modifier targets an edge named `name`, anywhere in the graph.

###### Parameters

| Parameter | Type     |
| --------- | -------- |
| `name`    | `string` |

###### Returns

`boolean`

##### removesImporterEdge()

```ts
removesImporterEdge(importer, spec): undefined | string
```

Defined in: graph/src/modifiers.ts:290

Selector of the modifier that wins the direct `importer -> spec.name` edge, if it removes it (value `-`). Same pick as tryNewDependency: complete entries whose qualifier accepts the spec, highest specificity, importer-anchored before lone on ties.

###### Parameters

| Parameter  | Type                                                                                                                    |
| ---------- | ----------------------------------------------------------------------------------------------------------------------- |
| `importer` | `Pick`<[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node), `"importer"` \| `"mainImporter"`> |
| `spec`     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                            |

###### Returns

`undefined` | `string`

##### rollbackActiveEntries()

```ts
rollbackActiveEntries(): void
```

Defined in: graph/src/modifiers.ts:650

Operates in previously registered nodes and edges in order to put back in place any of the original edges that were referenced to in active (ongoing) breadcrumb parsing entries that were never completed.

This method can be used to easily rollback any pending operations once the graph traversal is done.

###### Returns

`void`

##### targetsImporterEdge()

```ts
targetsImporterEdge(importer, spec): boolean
```

Defined in: graph/src/modifiers.ts:251

Whether a modifier governs the direct `importer -> spec.name` edge, i.e. whether its value comes from config rather than from the manifest that declares it. Only a breadcrumb whose whole scope is that edge counts, and only if its qualifier accepts the spec: `:root > #a > #b` names b but governs an edge under a, and `#b:semver(^1)` leaves a `^2` edge alone, so in both cases the root's own b edge is still the manifest's to validate and heal.

###### Parameters

| Parameter  | Type                                                                          |
| ---------- | ----------------------------------------------------------------------------- |
| `importer` | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |
| `spec`     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)  |

###### Returns

`boolean`

##### tryDependencies()

```ts
tryDependencies(from, dependencies): Map<string, ModifierActiveEntry>
```

Defined in: graph/src/modifiers.ts:548

Returns the set of [ModifierActiveEntry](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry) instances that matches the provided [Dependency](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency) specs for a given node.

This method is mostly a helper to [GraphModifier.tryNewDependency](https://docs.vlt.io/client/api-reference/graph/module_index.md#trynewdependency) that handles the registered modifiers traversal lookup.

###### Parameters

| Parameter      | Type                                                                                                                                                                                |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from`         | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                                                                                                       |
| `dependencies` | \| [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)\[] \| [`Dependency`](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency)\[] |

###### Returns

`Map`<`string`, [`ModifierActiveEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry)>

##### tryImporter()

```ts
tryImporter(importer): void
```

Defined in: graph/src/modifiers.ts:442

Try matching the provided node against the top-level selectors. In case a match is found it will also register the active entry modifier and update the active entry to the current importer node.

###### Parameters

| Parameter  | Type                                                                          |
| ---------- | ----------------------------------------------------------------------------- |
| `importer` | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |

###### Returns

`void`

##### tryNewDependency()

```ts
tryNewDependency(from, spec): 
  | undefined
  | ModifierActiveEntry
```

Defined in: graph/src/modifiers.ts:478

Try matching the provided node and spec to the current active parsing modifier entries along with possible starting-level modifiers.

Entries whose qualifier rejects the spec are skipped. Of the rest, the complete entry (breadcrumb at its last element) with the highest specificity is returned, or the partial entry with the highest specificity if no complete entry is found. The other partial entries are advanced along with it by [GraphModifier.updateActiveEntry](https://docs.vlt.io/client/api-reference/graph/module_index.md#updateactiveentry), so modifiers sharing a path each reach their own target. Returns `undefined` if no matching entry is found.

This method works with the assumption that it's going to be called during a graph traversal, such that any ascendent has been checked and the active modifier entry state has been updated in the previous iteration.

###### Parameters

| Parameter | Type                                                                          |
| --------- | ----------------------------------------------------------------------------- |
| `from`    | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |
| `spec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)  |

###### Returns

\| `undefined` | [`ModifierActiveEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry)

##### updateActiveEntry()

```ts
updateActiveEntry(from, active): void
```

Defined in: graph/src/modifiers.ts:569

Updates an active entry state keeping track of items in the multi-level active entries map. If the current breadcrumb state shows there's no more items left, then we deregister the modifier. Partial entries that matched the same dependency in [GraphModifier.tryNewDependency](https://docs.vlt.io/client/api-reference/graph/module_index.md#trynewdependency) are updated along with it.

###### Parameters

| Parameter | Type                                                                                                        |
| --------- | ----------------------------------------------------------------------------------------------------------- |
| `from`    | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                               |
| `active`  | [`ModifierActiveEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifieractiveentry) |

###### Returns

`void`

##### load()

```ts
static load(options): GraphModifier
```

Defined in: graph/src/modifiers.ts:679

Convenience method to instantiate and load in one call. Throws if called on a directory that does not have a vlt.json file.

###### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

###### Returns

[`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)

##### maybeLoad()

```ts
static maybeLoad(options): undefined | GraphModifier
```

Defined in: graph/src/modifiers.ts:669

Convenience method to instantiate and load in one call. Returns undefined if the project does not have a vlt.json file, otherwise returns the loaded Modifiers instance.

###### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

###### Returns

`undefined` | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)

---

### Node

Defined in: graph/src/node.ts:53

#### Implements

- [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)

#### Constructors

##### new Node()

```ts
new Node(
   options, 
   id?, 
   manifest?, 
   spec?, 
   name?, 
   version?): Node
```

Defined in: graph/src/node.ts:377

###### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options`   | [`NodeOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#nodeoptions)                                                                                                                                                                                   |
| `id`?       | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                                                                                                                                                                                                   |
| `manifest`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |
| `spec`?     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                                                                                                                                                                  |
| `name`?     | `string`                                                                                                                                                                                                                                                                      |
| `version`?  | `string`                                                                                                                                                                                                                                                                      |

###### Returns

[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)

#### Properties

| Property               | Type                                                                                                                                                                                                                                                                          | Default value | Description                                                                                                                                                                                                                                                                |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bindingGyp?`          | `boolean`                                                                                                                                                                                                                                                                     | `undefined`   | True if the package has a root binding.gyp, when known without a disk check (placed from the global store). Not persisted.                                                                                                                                                 |
| `bins?`                | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | `undefined`   | Record of binary names to their paths in the package, if any.                                                                                                                                                                                                              |
| `buildState`           | `"none"` \| `"needed"` \| `"built"` \| `"failed"`                                                                                                                                                                                                                             | `'none'`      | Build state of this node - tracks whether it needs building, has been built, or failed. - 'none': No build state (default) - 'needed': Node needs to be built - 'built': Node has been successfully built - 'failed': Node build has failed                                |
| `built`                | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if this node has been built as part of the reify step.                                                                                                                                                                                                                |
| `confused`             | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if there's a manifest-confused package name.                                                                                                                                                                                                                          |
| `detached`             | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if this node is detached from the graph. This is used to indicate that the node is not part of the graph although the node is still available as part of the resolution process. Allows for skipping fetching manifests for detached nodes.                           |
| `edgesIn`              | `Set`<[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)>                                                                                                                                                                                          | `undefined`   | List of edges coming into this node.                                                                                                                                                                                                                                       |
| `edgesOut`             | `Map`<`string`, [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)>                                                                                                                                                                                | `undefined`   | List of edges from this node into other nodes. This usually represents that the connected node is a direct dependency of this node.                                                                                                                                        |
| `extracted`            | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if this node has been extracted to the file system.                                                                                                                                                                                                                   |
| `graph`                | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                                                                                                                                                                               | `undefined`   | A reference to the graph this node is a part of.                                                                                                                                                                                                                           |
| `id`                   | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                                                                                                                                                                                                   | `undefined`   | A reference to the [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) this node represents in the graph.                                                                                                                                            |
| `importer`             | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if this node is an importer node.                                                                                                                                                                                                                                     |
| `integrity?`           | `` `sha512-${string}` ``                                                                                                                                                                                                                                                      | `undefined`   | The manifest integrity value.                                                                                                                                                                                                                                              |
| `mainImporter`         | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True if this node is the project root node.                                                                                                                                                                                                                                |
| `manifest?`            | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> | `undefined`   | The manifest this node represents in the graph.                                                                                                                                                                                                                            |
| `modifier`             | `undefined` \| `string`                                                                                                                                                                                                                                                       | `undefined`   | If this node has been modified as part of applying a [GraphModifier](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier) then this field will contain the modifier query that was applied. Otherwise, it will be `undefined`.                    |
| `peerSetHash?`         | `string`                                                                                                                                                                                                                                                                      | `undefined`   | Deterministic unique string used to identify (and ultimately duplicate) nodes that are affected by a peer context set modified resolution. These are appended to the node [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) as the `extra` suffix. |
| `platform?`            | `object`                                                                                                                                                                                                                                                                      | `undefined`   | Platform requirements (engines, os, cpu) extracted from manifest. Stored separately for optional dependencies to enable platform checks when manifest is not loaded.                                                                                                       |
| `platform.cpu?`        | `string` \| `string`\[]                                                                                                                                                                                                                                                       | `undefined`   | -                                                                                                                                                                                                                                                                          |
| `platform.engines?`    | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | `undefined`   | -                                                                                                                                                                                                                                                                          |
| `platform.libc?`       | `string` \| `string`\[]                                                                                                                                                                                                                                                       | `undefined`   | -                                                                                                                                                                                                                                                                          |
| `platform.os?`         | `string` \| `string`\[]                                                                                                                                                                                                                                                       | `undefined`   | -                                                                                                                                                                                                                                                                          |
| `projectRoot`          | `string`                                                                                                                                                                                                                                                                      | `undefined`   | Project where this node resides                                                                                                                                                                                                                                            |
| `resolved?`            | `string`                                                                                                                                                                                                                                                                      | `undefined`   | An address [PackageInfoClient](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) may use to extract this package.                                                                                                                      |
| `resolvedFromLockfile` | `boolean`                                                                                                                                                                                                                                                                     | `false`       | True when `integrity` and `resolved` came from a lockfile, i.e. they were verified by the install that wrote them.                                                                                                                                                         |
| `typeTarget?`          | `string`                                                                                                                                                                                                                                                                      | `undefined`   | target package name, retained when the package is removed.                                                                                                                                                                                                                 |
| `version?`             | `string`                                                                                                                                                                                                                                                                      | `undefined`   | The version of the package represented by this node, this is usually equivalent to `manifest.version` but in a few ways it may differ such as nodes loaded from a lockfile that lacks a loaded manifest. This field should be used to retrieve package versions instead.   |
| `workspaces`           | `undefined` \| `Map`<`string`, [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)>                                                                                                                                                                 | `undefined`   | A `mainImporter` node may have workspace connected to it, equivalent to its `edgesOut` linked deps.                                                                                                                                                                        |

#### Accessors

##### \[toStringTag]

###### Get Signature

```ts
get toStringTag: string
```

Defined in: graph/src/node.ts:54

###### Returns

`string`

##### brotli

###### Get Signature

```ts
get brotli(): boolean
```

Defined in: graph/src/node.ts:198

True when this node's artifact is the registry's Brotli (`.tar.br`) tarball rather than the gzip `.tgz`, which makes `integrity` that artifact's hash. `resolved` is authoritative whenever it is set, so the two can never drift; the stored bit only carries the lockfile's answer across to `setResolved()`, which has to know the extension before it can build the URL.

###### Returns

`boolean`

###### Set Signature

```ts
set brotli(brotli): void
```

Defined in: graph/src/node.ts:204

This node's artifact is the registry's Brotli (`.tar.br`) tarball rather than the gzip `.tgz`, so `resolved` and `integrity` both describe that artifact. Persisted in the lockfile as a flag bit, which is what lets `setResolved()` rebuild the `.tar.br` URL for a node whose `resolved` is not written out.

###### Parameters

| Parameter | Type      |
| --------- | --------- |
| `brotli`  | `boolean` |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.brotli
```

##### dev

###### Get Signature

```ts
get dev(): boolean
```

Defined in: graph/src/node.ts:96

True if a node is only reachable via dev edges from any importer.

Setting this to false, if previously set to true, will also unset the flag on any dev-flagged non-dev dependencies.

###### Returns

`boolean`

###### Set Signature

```ts
set dev(dev): void
```

Defined in: graph/src/node.ts:99

###### Parameters

| Parameter | Type      |
| --------- | --------- |
| `dev`     | `boolean` |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.dev
```

##### location

###### Get Signature

```ts
get location(): string
```

Defined in: graph/src/node.ts:301

The file system location for this node.

###### Returns

`string`

###### Set Signature

```ts
set location(location): void
```

Defined in: graph/src/node.ts:311

###### Parameters

| Parameter  | Type     |
| ---------- | -------- |
| `location` | `string` |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.location
```

##### name

###### Get Signature

```ts
get name(): string
```

Defined in: graph/src/node.ts:227

###### Returns

`string`

###### Implementation of

```ts
NodeLike.name
```

##### optional

###### Get Signature

```ts
get optional(): boolean
```

Defined in: graph/src/node.ts:71

True if a node is only reachable via optional or peerOptional edges from any importer.

Setting this to false, if previously set to true, will also unset the flag on any optional-flagged non-optional dependencies.

###### Returns

`boolean`

###### Set Signature

```ts
set optional(optional): void
```

Defined in: graph/src/node.ts:74

###### Parameters

| Parameter  | Type      |
| ---------- | --------- |
| `optional` | `boolean` |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.optional
```

##### options

###### Get Signature

```ts
get options(): SpecOptions
```

Defined in: graph/src/node.ts:457

###### Returns

[`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions)

###### Set Signature

```ts
set options(_opts): void
```

Defined in: graph/src/node.ts:462

###### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `_opts`   | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.options
```

##### rawManifest

###### Get Signature

```ts
get rawManifest(): 
  | undefined
| Override<Manifest, NormalizedFields>
```

Defined in: graph/src/node.ts:592

The raw manifest before any modifications. If not set, falls back to the current manifest.

###### Returns

\| `undefined` | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)>

###### Implementation of

```ts
NodeLike.rawManifest
```

#### Methods

##### addEdgesTo()

```ts
addEdgesTo(
   type, 
   spec, 
   node?): Edge
```

Defined in: graph/src/node.ts:581

Add an edge from this node connecting it to a direct dependency.

###### Parameters

| Parameter | Type                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `type`    | [`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) |
| `spec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                             |
| `node`?   | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                            |

###### Returns

[`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)

##### equals()

```ts
equals(other): boolean
```

Defined in: graph/src/node.ts:464

###### Parameters

| Parameter | Type                                                                          |
| --------- | ----------------------------------------------------------------------------- |
| `other`   | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |

###### Returns

`boolean`

##### inVltStore()

```ts
inVltStore(): boolean
```

Defined in: graph/src/node.ts:420

return true if this node is located in the vlt store memoized the first time it's called, since the store location doesn't change within the context of a single operation.

###### Returns

`boolean`

##### isDev()

```ts
isDev(): this is Node & { dev: true }
```

Defined in: graph/src/node.ts:110

###### Returns

`this is Node & { dev: true }`

##### isOptional()

```ts
isOptional(): this is Node & { optional: true }
```

Defined in: graph/src/node.ts:85

###### Returns

`this is Node & { optional: true }`

##### maybeSetConfusedManifest()

```ts
maybeSetConfusedManifest(spec, confused?): void
```

Defined in: graph/src/node.ts:613

Sets this node as having a manifest-confused manifest.

###### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `spec`      | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                                                                                                                                                                  |
| `confused`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.maybeSetConfusedManifest
```

##### nodeModules()

```ts
nodeModules(scurry): string
```

Defined in: graph/src/node.ts:368

The location of the node_modules folder where this node's edgesOut should be linked into. For nodes in the store, this is the parent directory, since they're extracted into a node_modules folder side by side with links to their deps. For nodes outside of the store (ie, importers and arbitrary link deps) this is the node_modules folder directly inside the node's directory.

###### Parameters

| Parameter | Type                                                  |
| --------- | ----------------------------------------------------- |
| `scurry`  | [`PathScurry`](https://isaacs.github.io/path-scurry/) |

###### Returns

`string`

##### resolvedLocation()

```ts
resolvedLocation(scurry): string
```

Defined in: graph/src/node.ts:323

The resolved location of the node in the file system. Memoized per location and scurry cwd.

###### Parameters

| Parameter | Type                                                  |
| --------- | ----------------------------------------------------- |
| `scurry`  | [`PathScurry`](https://isaacs.github.io/path-scurry/) |

###### Returns

`string`

##### setConfusedManifest()

```ts
setConfusedManifest(fixed, confused?): void
```

Defined in: graph/src/node.ts:599

Sets this node as having a manifest-confused manifest.

###### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fixed`     | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)                                                                                                                                                                                         |
| `confused`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |

###### Returns

`void`

###### Implementation of

```ts
NodeLike.setConfusedManifest
```

##### setDefaultLocation()

```ts
setDefaultLocation(): void
```

Defined in: graph/src/node.ts:564

###### Returns

`void`

##### setImporterLocation()

```ts
setImporterLocation(location): void
```

Defined in: graph/src/node.ts:475

Sets the node as an importer along with its location.

###### Parameters

| Parameter  | Type     |
| ---------- | -------- |
| `location` | `string` |

###### Returns

`void`

##### setPeerIdentity()

```ts
setPeerIdentity(id, peerSetHash): void
```

Defined in: graph/src/node.ts:537

Update this node's DepID and peer suffix after canonicalization. Resets name/location memos that were derived from the previous id.

###### Parameters

| Parameter     | Type                                                                        |
| ------------- | --------------------------------------------------------------------------- |
| `id`          | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) |
| `peerSetHash` | `string`                                                                    |

###### Returns

`void`

##### setResolved()

```ts
setResolved(): void
```

Defined in: graph/src/node.ts:485

Sets the appropriate resolve / integrity value for this node. Note that other places might also set these values, like for example the lockfile that might have already have this info.

###### Returns

`void`

###### Implementation of

```ts
NodeLike.setResolved
```

##### toJSON()

```ts
toJSON(): object
```

Defined in: graph/src/node.ts:628

###### Returns

`object`

| Name           | Type                                                                                                                                                                                                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `buildState`   | `"none"` \| `"needed"` \| `"built"` \| `"failed"`                                                                                                                                                                                                                                               |
| `confused`     | `boolean`                                                                                                                                                                                                                                                                                       |
| `dev`          | `boolean`                                                                                                                                                                                                                                                                                       |
| `id`           | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                                                                                                                                                                                                                     |
| `importer`     | `boolean`                                                                                                                                                                                                                                                                                       |
| `integrity`    | `undefined` \| `` `sha512-${string}` ``                                                                                                                                                                                                                                                         |
| `location`     | `string`                                                                                                                                                                                                                                                                                        |
| `manifest`     | \| `undefined` \| [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |
| `modifier`     | `undefined` \| `string`                                                                                                                                                                                                                                                                         |
| `name`         | `string`                                                                                                                                                                                                                                                                                        |
| `optional`     | `boolean`                                                                                                                                                                                                                                                                                       |
| `peerSetHash`? | `string`                                                                                                                                                                                                                                                                                        |
| `platform`     | \| `undefined` \| { `cpu`: `string` \| `string`\[]; `engines`: `Record`<`string`, `string`>; `libc`: `string` \| `string`\[]; `os`: `string` \| `string`\[]; }                                                                                                                                  |
| `projectRoot`  | `string`                                                                                                                                                                                                                                                                                        |
| `rawManifest`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)>                   |
| `resolved`     | `undefined` \| `string`                                                                                                                                                                                                                                                                         |
| `typeTarget`?  | `string`                                                                                                                                                                                                                                                                                        |
| `version`      | `undefined` \| `string`                                                                                                                                                                                                                                                                         |

###### Implementation of

```ts
NodeLike.toJSON
```

##### toString()

```ts
toString(): string
```

Defined in: graph/src/node.ts:659

###### Returns

`string`

###### Implementation of

```ts
NodeLike.toString
```

## Interfaces

### BuildOptions

Defined in: graph/src/build.ts:21

Options for the build process

#### Extends

- [`ActualLoadOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#actualloadoptions)

#### Properties

| Property                             | Type                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Overrides              | Inherited from                                  |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------- |
| `catalog?`                           | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | -                      | `LoadOptions.catalog`                           |
| `catalogs?`                          | `Record`<`string`, `Record`<`string`, `string`>>                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | -                      | `LoadOptions.catalogs`                          |
| `default-registry-alias?`            | `string`                                                                                                                                                                                                                                                                      | The name of the registry alias (a key in `registries`) that bare specs (e.g. `foo@latest`) and transitive deps without an explicit registry protocol resolve through, when no `registry` or `scoped-registries` entry applies. Defaults to `'npm'`, whose built-in URL is vlt's public, read-only npm mirror (`https://registry.vlt.io/upstream/npm/`). `vlt setup` or `registries.npm` point it elsewhere. An alias with no URL makes bare specs resolve with `spec.registry === undefined`.                                                                                                | -                      | `LoadOptions.default-registry-alias`            |
| `expectLockfile?`                    | `boolean`                                                                                                                                                                                                                                                                     | If set to `true`, fail if lockfile is missing or out of date. Used by ci command to enforce lockfile integrity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                      | `LoadOptions.expectLockfile`                    |
| `frozenLockfile?`                    | `boolean`                                                                                                                                                                                                                                                                     | If set to `true`, fail if lockfile is missing or out of sync with package.json. Prevents any lockfile modifications and is stricter than expectLockfile.                                                                                                                                                                                                                                                                                                                                                                                                                                     | -                      | `LoadOptions.frozenLockfile`                    |
| `git-host-archives?`                 | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | tarball hosting services for hosts listed in git-hosts                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | -                      | `LoadOptions.git-host-archives`                 |
| `git-hosts?`                         | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | shorthand prefix names for known git hosts                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                      | `LoadOptions.git-hosts`                         |
| `jsr-registries?`                    | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | registries that work like [https://npm.jsr.io](https://npm.jsr.io/)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                      | `LoadOptions.jsr-registries`                    |
| `loadManifests?`                     | `boolean`                                                                                                                                                                                                                                                                     | If set to `false`, `actual.load` will not load any `package.json` files while traversing the file system. The resulting [Graph](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) from loading with `loadManifests=false` has no information on dependency types or the specs defined and no information on missing and extraneous dependencies.                                                                                                                                                                                                                         | -                      | `LoadOptions.loadManifests`                     |
| `lockfileData?`                      | [`LockfileData`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfiledata-1)                                                                                                                                                                               | Already-parsed main lockfile data. When set, ideal build skips re-reading `vlt-lock.json`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                      | `LoadOptions.lockfileData`                      |
| `lockfileOnly?`                      | `boolean`                                                                                                                                                                                                                                                                     | If set to `true`, only update the lockfile without performing any node_modules operations. Skips package extraction, filesystem operations, and hidden lockfile saves.                                                                                                                                                                                                                                                                                                                                                                                                                       | -                      | `LoadOptions.lockfileOnly`                      |
| `mainManifest?`                      | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> | The project root manifest.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                      | `LoadOptions.mainManifest`                      |
| `modifiers?`                         | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)                                                                                                                                                                               | The graph modifiers helper object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | -                      | `LoadOptions.modifiers`                         |
| `monorepo?`                          | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                                                                                                                                                                                       | Optional monorepo configuration. If not provided, will attempt to load from project.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | `LoadOptions.monorepo` | -                                               |
| `packageJson`                        | [`PackageJson`](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson)                                                                                                                                                                               | A [PackageJson](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson) object, for sharing manifest caches                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                      | `LoadOptions.packageJson`                       |
| `projectRoot`                        | `string`                                                                                                                                                                                                                                                                      | The project root dirname.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | -                      | `LoadOptions.projectRoot`                       |
| `registries?`                        | `Record`<`string`, `string`>                                                                                                                                                                                                                                                  | shorthand prefix names for known registries                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                      | `LoadOptions.registries`                        |
| `registry?`                          | `string`                                                                                                                                                                                                                                                                      | The registry where a spec should be resolved against. There is **no default**: when unset, bare specs resolve through the `default-registry-alias` (the built-in `npm` alias, vlt's public npm mirror, unless configured). Only when that alias has no URL do registry-type specs get `spec.registry === undefined`, and anything that needs to build a registry URL fails. Named registry aliases (`gh:`, `jsr:`) and `scoped-registries` are unaffected. For bare specs, this takes precedence over the `default-registry-alias` lookup but not over a matching `scoped-registries` entry. | -                      | `LoadOptions.registry`                          |
| `scoped-registries?`                 | `Record`<`` `@${string}` ``, `string`>                                                                                                                                                                                                                                        | registries mapped to a `@scope`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | -                      | `LoadOptions.scoped-registries`                 |
| `scurry`                             | [`PathScurry`](https://isaacs.github.io/path-scurry/)                                                                                                                                                                                                                         | A [PathScurry](https://isaacs.github.io/path-scurry/) object, for use in globs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | -                      | `LoadOptions.scurry`                            |
| `skipHiddenLockfile?`                | `boolean`                                                                                                                                                                                                                                                                     | If set to `true`, then do not shortcut the process by reading the hidden lockfile at `node_modules/.vlt-lock.json`                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | -                      | `LoadOptions.skipHiddenLockfile`                |
| `skipLoadingNodesOnModifiersChange?` | `boolean`                                                                                                                                                                                                                                                                     | Load only importers into the graph if the modifiers have changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | -                      | `LoadOptions.skipLoadingNodesOnModifiersChange` |
| `specCache?`                         | [`SpecCache`](https://docs.vlt.io/client/api-reference/graph/module_index.md#speccache-1)                                                                                                                                                                                     | Shared intern cache for parsed lockfile specs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | -                      | `LoadOptions.specCache`                         |
| `target`                             | `string`                                                                                                                                                                                                                                                                      | DSS query string to filter which nodes to build.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | -                      | -                                               |

## Type Aliases

### ActualLoadOptions

```ts
type ActualLoadOptions = SpecOptions & object;
```

Defined in: graph/src/actual/load.ts:36

#### Type declaration

| Name                                 | Type                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `expectLockfile`?                    | `boolean`                                                                                              | If set to `true`, fail if lockfile is missing or out of date. Used by ci command to enforce lockfile integrity.                                                                                                                                                                                                                                                      |
| `frozenLockfile`?                    | `boolean`                                                                                              | If set to `true`, fail if lockfile is missing or out of sync with package.json. Prevents any lockfile modifications and is stricter than expectLockfile.                                                                                                                                                                                                             |
| `loadManifests`?                     | `boolean`                                                                                              | If set to `false`, `actual.load` will not load any `package.json` files while traversing the file system. The resulting [Graph](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) from loading with `loadManifests=false` has no information on dependency types or the specs defined and no information on missing and extraneous dependencies. |
| `lockfileData`?                      | [`LockfileData`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfiledata-1)        | Already-parsed main lockfile data. When set, ideal build skips re-reading `vlt-lock.json`.                                                                                                                                                                                                                                                                           |
| `lockfileOnly`?                      | `boolean`                                                                                              | If set to `true`, only update the lockfile without performing any node_modules operations. Skips package extraction, filesystem operations, and hidden lockfile saves.                                                                                                                                                                                               |
| `mainManifest`?                      | [`NormalizedManifest`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedmanifest) | The project root manifest.                                                                                                                                                                                                                                                                                                                                           |
| `modifiers`?                         | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)        | The graph modifiers helper object.                                                                                                                                                                                                                                                                                                                                   |
| `monorepo`?                          | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                | A [Monorepo](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo) object, for managing workspaces                                                                                                                                                                                                                                              |
| `packageJson`                        | [`PackageJson`](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson)        | A [PackageJson](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson) object, for sharing manifest caches                                                                                                                                                                                                                                  |
| `projectRoot`                        | `string`                                                                                               | The project root dirname.                                                                                                                                                                                                                                                                                                                                            |
| `scurry`                             | [`PathScurry`](https://isaacs.github.io/path-scurry/)                                                  | A [PathScurry](https://isaacs.github.io/path-scurry/) object, for use in globs                                                                                                                                                                                                                                                                                       |
| `skipHiddenLockfile`?                | `boolean`                                                                                              | If set to `true`, then do not shortcut the process by reading the hidden lockfile at `node_modules/.vlt-lock.json`                                                                                                                                                                                                                                                   |
| `skipLoadingNodesOnModifiersChange`? | `boolean`                                                                                              | Load only importers into the graph if the modifiers have changed.                                                                                                                                                                                                                                                                                                    |
| `specCache`?                         | [`SpecCache`](https://docs.vlt.io/client/api-reference/graph/module_index.md#speccache-1)              | Shared intern cache for parsed lockfile specs.                                                                                                                                                                                                                                                                                                                       |

---

### AddImportersDependenciesMap

```ts
type AddImportersDependenciesMap = Map<DepID, Map<string, Dependency>> & object;
```

Defined in: graph/src/dependencies.ts:77

A `Map` in which keys are [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) linking to another `Map` in which keys are the dependency names and values are [Dependency](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency). This structure represents dependencies that need to be added to the importer represented by [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid).

The `modifiedDependencies` property can be used to indicate that there are added dependencies to any of the importer nodes.

#### Type declaration

| Name                   | Type                                                                                                | Description                                                                                                                    |
| ---------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `explicit`?            | `Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), `Set`<`string`>> | The names the caller asked to add, snapshotted before the entries read from the manifests are merged in. Only these are saved. |
| `modifiedDependencies` | `boolean`                                                                                           | -                                                                                                                              |

---

### BaseModifierEntry

```ts
type BaseModifierEntry = object;
```

Defined in: graph/src/modifiers.ts:41

Info needed to define a graph modifier.

#### Type declaration

| Name         | Type                                                                                                                  |
| ------------ | --------------------------------------------------------------------------------------------------------------------- |
| `breadcrumb` | [`ModifierBreadcrumb`](https://docs.vlt.io/client/api-reference/dss-breadcrumb/reference.md#modifierbreadcrumb)       |
| `query`      | `string`                                                                                                              |
| `refs`       | `Set`<{ `from`: [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node); `name`: `string`; }>   |
| `type`       | `"edge"` \| `"node"`                                                                                                  |
| `value`      | \| `string` \| [`NormalizedManifest`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedmanifest) |

---

### BuildIdealOptions

```ts
type BuildIdealOptions = ActualLoadOptions & object;
```

Defined in: graph/src/ideal/build.ts:28

#### Type declaration

| Name             | Type                                                                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `actual`?        | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                                   | An actual graph                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `add`?           | [`AddImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#addimportersdependenciesmap)       | A `Map` in which keys are [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) linking to another `Map` in which keys are the dependency names and values are [Dependency](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency). This structure represents dependencies that need to be added to the importer represented by [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid). |
| `lockfileGraph`? | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                                   | A graph already loaded from `vlt-lock.json` with these options and no `actual` graph (e.g. by the frozen-lockfile check), used as the starting graph instead of loading the lockfile again. Not for use with `actual`.                                                                                                                                                                                                                             |
| `packageInfo`    | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient)                       | A [PackageInfoClient](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) instance to read manifest info from.                                                                                                                                                                                                                                                                                                   |
| `remove`?        | [`RemoveImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#removeimportersdependenciesmap) | A `Map` object representing nodes to be removed from the ideal graph. Each [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) key represents an importer node and the `Set` of dependency names to be removed from its dependency list.                                                                                                                                                                                     |
| `remover`        | [`RollbackRemove`](https://docs.vlt.io/client/api-reference/rollback-remove/reference.md#rollbackremove)                          | A [RollbackRemove](https://docs.vlt.io/client/api-reference/rollback-remove/reference.md#rollbackremove) instance to handle extraction rollbacks                                                                                                                                                                                                                                                                                                   |

---

### BuildResult

```ts
type BuildResult = object;
```

Defined in: graph/src/reify/build.ts:22

Returns an object mapping registries to the names of the packages built.

#### Type declaration

| Name             | Type                                                                             | Description                                                                                               |
| ---------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `failure`        | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)\[] | -                                                                                                         |
| `skipped`?       | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)\[] | needed builds skipped as they have no security data                                                       |
| `skippedReason`? | `"timeout"` \| `"unscanned"`                                                     | why `skipped` builds have no security data: the request timed out, or socket.dev has not scanned them yet |
| `success`        | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)\[] | -                                                                                                         |

---

### CheckedInstallResult

```ts
type CheckedInstallResult = Omit<InstallResult, "graph"> & object;
```

Defined in: graph/src/install.ts:76

Result of [install](https://docs.vlt.io/client/api-reference/graph/module_index.md#install) with `upToDateCheck`: no graph when the tree was up to date.

#### Type declaration

| Name        | Type                                                                                  | Description                                             |
| ----------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `graph`?    | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)       | -                                                       |
| `upToDate`? | [`UpToDate`](https://docs.vlt.io/client/api-reference/graph/module_index.md#uptodate) | set when the tree was up to date and no graph was built |

---

### Dependency

```ts
type Dependency = object;
```

Defined in: graph/src/dependencies.ts:56

Parsed dependency entries info.

#### Type declaration

| Name   | Type                                                                                                   | Description                                                                                                                                                                        |
| ------ | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `spec` | [`Spec`](https://docs.vlt.io/client/api-reference/spec/browser.md#spec)                                | The parsed [Spec](https://docs.vlt.io/client/api-reference/spec/browser.md#spec) object describing the dependency requirements.                                                    |
| `type` | [`DependencySaveType`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencysavetype) | The [DependencySaveType](https://docs.vlt.io/client/api-reference/types/reference.md#dependencysavetype), describing the way this dependency should be saved back to the manifest. |

---

### DiscoveredSkills

```ts
type DiscoveredSkills = object;
```

Defined in: graph/src/skills/discover.ts:49

Result of `discoverSkills`.

#### Type declaration

| Name      | Type                                                                                                                                                                                                  | Description                                                  |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `scanned` | `Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), `Pick`<[`Skill`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skill), `"skill"` \| `"path"`>\[]> | every scanned package version, w/ the skills it ships        |
| `skills`  | [`Skill`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skill)\[]                                                                                                                    | skills of the picked version of each package, sorted by name |

---

### EdgeMap

```ts
type EdgeMap = Map<NodeLike | undefined, TreeItem>;
```

Defined in: graph/src/visualization/human-readable-output.ts:40

---

### EdgeModifierEntry

```ts
type EdgeModifierEntry = BaseModifierEntry & object;
```

Defined in: graph/src/modifiers.ts:55

Extra info to define specifically a graph edge modifier.

#### Type declaration

| Name    | Type                                                                         |
| ------- | ---------------------------------------------------------------------------- |
| `spec`  | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec) |
| `type`  | `"edge"`                                                                     |
| `value` | `string`                                                                     |

---

### GraphModifierConfigObject

```ts
type GraphModifierConfigObject = Record<string, string>;
```

Defined in: graph/src/modifiers.ts:36

Type definition for the modifiers configuration object

---

### GraphModifierLoadedConfig

```ts
type GraphModifierLoadedConfig = object;
```

Defined in: graph/src/modifiers.ts:28

Loaded modifiers configuration as described in the `vlt.json` file.

#### Type declaration

| Name        | Type                                                                                                                    |
| ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| `modifiers` | [`GraphModifierConfigObject`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifierconfigobject) |

---

### GraphOptions

```ts
type GraphOptions = SpecOptions & object;
```

Defined in: graph/src/graph.ts:71

#### Type declaration

| Name           | Type                                                                                                    | Description                                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `mainManifest` | [`NormalizedManifest`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedmanifest)  | The main importer manifest info.                                                                                        |
| `manifests`?   | [`ManifestInventory`](https://docs.vlt.io/client/api-reference/graph/module_index.md#manifestinventory) | An inventory of seen manifests.                                                                                         |
| `monorepo`?    | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                 | A [Monorepo](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo) object, for managing workspaces |
| `projectRoot`  | `string`                                                                                                | Root of the project this graph represents                                                                               |

---

### HumanReadableOutputGraph

```ts
type HumanReadableOutputGraph = object;
```

Defined in: graph/src/visualization/human-readable-output.ts:33

#### Type declaration

| Name                  | Type                                                                                      |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `edges`               | [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike)\[]     |
| `highlightSelection`? | `boolean`                                                                                 |
| `importers`           | `Set`<[`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)> |
| `nodes`               | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)\[]     |

---

### InstallOptions

```ts
type InstallOptions = ActualLoadOptions & object;
```

Defined in: graph/src/install.ts:40

#### Type declaration

| Name            | Type                                                                                                        | Description                                                                                                                                                       |
| --------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowScripts`  | `string`                                                                                                    | -                                                                                                                                                                 |
| `allowSkills`?  | `string`                                                                                                    | DSS query: packages whose agent skills get linked into the project's agent skill dirs after install. Selectors may end with `:skill()`. Unset or `:not(*)`: none. |
| `cleanInstall`? | `boolean`                                                                                                   | -                                                                                                                                                                 |
| `keepNodes`?    | `ReadonlySet`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)>                  | store dirs of these nodes are never removed, eg the running vlt                                                                                                   |
| `packageInfo`   | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) | -                                                                                                                                                                 |
| `saveExact`?    | `boolean`                                                                                                   | -                                                                                                                                                                 |
| `savePrefix`?   | `string`                                                                                                    | -                                                                                                                                                                 |
| `skillsDirs`?   | `string`\[]                                                                                                 | agent skill dirs, relative to projectRoot. Unset: detect; `[]`: none                                                                                              |

---

### InstallResult

```ts
type InstallResult = object;
```

Defined in: graph/src/install.ts:64

Result of [install](https://docs.vlt.io/client/api-reference/graph/module_index.md#install).

#### Type declaration

| Name          | Type                                                                                                  | Description                          |
| ------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `buildQueue`? | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)\[]                        | -                                    |
| `diff`?       | [`Diff`](https://docs.vlt.io/client/api-reference/graph/module_index.md#diff)                         | -                                    |
| `graph`       | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                       | -                                    |
| `skills`?     | [`LinkSkillsResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskillsresult) | skill links added or removed, if any |

---

### JSONOutputGraph

```ts
type JSONOutputGraph = object;
```

Defined in: graph/src/visualization/json-output.ts:35

#### Type declaration

| Name        | Type                                                                                      |
| ----------- | ----------------------------------------------------------------------------------------- |
| `edges`     | [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike)\[]     |
| `importers` | `Set`<[`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)> |
| `nodes`     | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)\[]     |

---

### JSONOutputItem

```ts
type JSONOutputItem = object;
```

Defined in: graph/src/visualization/json-output.ts:8

A JSON output item describes a package that is present in the install graph. It represents an edge plus it's linking Node.

#### Type declaration

| Name         | Type                                                                                          | Description                                                           |
| ------------ | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `fromID`?    | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)                   | A reference to the id of the Node that this package is linked from.   |
| `name`       | `string`                                                                                      | The name of the package.                                              |
| `overridden` | `boolean`                                                                                     | Whether this edge was overridden by a graph modifier.                 |
| `spec`?      | `string`                                                                                      | The dependency spec definition for this package.                      |
| `to`?        | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)            | A representation of the package object that fulfills this dependency. |
| `type`?      | [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike)\[`"type"`] | The package type.                                                     |

---

### LinkSkillsOptions

```ts
type LinkSkillsOptions = SkillsOptions & object;
```

Defined in: graph/src/skills/index.ts:59

Options for [linkSkills](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskills).

#### Type declaration

| Name     | Type      | Description                                                                                                                                                                |
| -------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apply`? | `boolean` | also remove every vlt link this selection does not make, in every scanned dir (`vlt skills link`). Default: only add links and remove links whose skill is gone (installs) |
| `target` | `string`  | DSS query selecting packages                                                                                                                                               |

---

### LinkSkillsResult

```ts
type LinkSkillsResult = UnscannedSkills & object;
```

Defined in: graph/src/skills/index.ts:109

Result of [linkSkills](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskills).

#### Type declaration

| Name         | Type                                                                                                     | Description                                                                                                           |
| ------------ | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `conflicts`  | `string`\[]                                                                                              | skipped per dir: path in use (`<mount>`), or name taken by another package (`<mount> (<package>)`)                    |
| `dirs`       | `string`\[]                                                                                              | target dirs                                                                                                           |
| `gitignore`? | `string`\[]                                                                                              | `<dir>/.gitignore` files not updated: not a regular file, fs error                                                    |
| `linked`     | [`SkillRow`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skillrow)\[]                 | links created or re-pointed                                                                                           |
| `removed`    | `string`\[]                                                                                              | vlt links removed (skill gone, or with `apply`: not selected or dir no longer a target): `/`-separated relative paths |
| `skipped`?   | `string`\[]                                                                                              | targets dropped: `<dir> (<reason>)`                                                                                   |
| `unchanged`  | [`SkillRow`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skillrow)\[]                 | selected skills already linked                                                                                        |
| `unmatched`? | [`UnmatchedPattern`](https://docs.vlt.io/client/api-reference/graph/module_index.md#unmatchedpattern)\[] | `:skill()` patterns that matched no skill of their packages                                                           |

---

### ListSkillsResult

```ts
type ListSkillsResult = UnscannedSkills & object;
```

Defined in: graph/src/skills/index.ts:94

Result of [listSkills](https://docs.vlt.io/client/api-reference/graph/module_index.md#listskills).

#### Type declaration

| Name       | Type                                                                               | Description                         |
| ---------- | ---------------------------------------------------------------------------------- | ----------------------------------- |
| `dirs`     | `string`\[]                                                                        | target dirs                         |
| `graph`    | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)    | the graph the skills were found in  |
| `project`  | `string`                                                                           | main importer name, the tree root   |
| `skills`   | [`Skill`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skill)\[] | -                                   |
| `skipped`? | `string`\[]                                                                        | targets dropped: `<dir> (<reason>)` |

---

### LockfileBuildState

```ts
type LockfileBuildState = undefined | 1 | 2 | 3;
```

Defined in: graph/src/lockfile/types.ts:125

Build state for a node - tracks whether it needs building, has been built, or failed

---

### LockfileData

```ts
type LockfileData = object;
```

Defined in: graph/src/lockfile/types.ts:28

This is the main type definition for the contents of the `vlt-lock.json` file.

The nodes and edges information from the lockfile are used to reconstruct a [Graph](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) representing a previous install.

#### Type declaration

| Name              | Type                                                                                                                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `edges`           | [`LockfileEdges`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfileedges)                                                                                      |
| `lockfileVersion` | `number`                                                                                                                                                                             |
| `nodes`           | `Record`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), [`LockfileNode`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfilenode)> |
| `options`         | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) & `object`                                                                                |

---

### LockfileEdgeKey

```ts
type LockfileEdgeKey = `${DepID} ${string}`;
```

Defined in: graph/src/lockfile/types.ts:188

`${from} ${dep name}`

---

### LockfileEdges

```ts
type LockfileEdges = object;
```

Defined in: graph/src/lockfile/types.ts:183

Lockfile edges are stored as a record object where the key is `${from.id} ${spec.name}` and the value is `${type} ${spec.bareSpec} ${to.id | 'MISSING'}`

Storing them in a record like this means that we are guaranteed to never end up with duplicates, and a standard `JSON.stringify()` will nicely print them out one line per edge.

#### Index Signature

```ts
[key: 
  | `~${string}~${string}~${string} ${string}`
  | `git~${string}~${string}~${string} ${string}`
  | `~${string}~${string} ${string}`
  | `git~${string}~${string} ${string}`
  | `file~${string}~${string} ${string}`
  | `remote~${string}~${string} ${string}`
  | `workspace~${string}~${string} ${string}`
  | `file~${string} ${string}`
  | `remote~${string} ${string}`
  | `workspace~${string} ${string}`]: 
  | `dev ${string} ~${string}~${string}~${string}`
  | `dev ${string} git~${string}~${string}~${string}`
  | `dev ${string} ~${string}~${string}`
  | `dev ${string} git~${string}~${string}`
  | `dev ${string} file~${string}~${string}`
  | `dev ${string} remote~${string}~${string}`
  | `dev ${string} workspace~${string}~${string}`
  | `dev ${string} file~${string}`
  | `dev ${string} remote~${string}`
  | `dev ${string} workspace~${string}`
  | `dev ${string} MISSING`
  | `optional ${string} ~${string}~${string}~${string}`
  | `optional ${string} git~${string}~${string}~${string}`
  | `optional ${string} ~${string}~${string}`
  | `optional ${string} git~${string}~${string}`
  | `optional ${string} file~${string}~${string}`
  | `optional ${string} remote~${string}~${string}`
  | `optional ${string} workspace~${string}~${string}`
  | `optional ${string} file~${string}`
  | `optional ${string} remote~${string}`
  | `optional ${string} workspace~${string}`
  | `optional ${string} MISSING`
  | `peer ${string} ~${string}~${string}~${string}`
  | `peer ${string} git~${string}~${string}~${string}`
  | `peer ${string} ~${string}~${string}`
  | `peer ${string} git~${string}~${string}`
  | `peer ${string} file~${string}~${string}`
  | `peer ${string} remote~${string}~${string}`
  | `peer ${string} workspace~${string}~${string}`
  | `peer ${string} file~${string}`
  | `peer ${string} remote~${string}`
  | `peer ${string} workspace~${string}`
  | `peer ${string} MISSING`
  | `peerOptional ${string} ~${string}~${string}~${string}`
  | `peerOptional ${string} git~${string}~${string}~${string}`
  | `peerOptional ${string} ~${string}~${string}`
  | `peerOptional ${string} git~${string}~${string}`
  | `peerOptional ${string} file~${string}~${string}`
  | `peerOptional ${string} remote~${string}~${string}`
  | `peerOptional ${string} workspace~${string}~${string}`
  | `peerOptional ${string} file~${string}`
  | `peerOptional ${string} remote~${string}`
  | `peerOptional ${string} workspace~${string}`
  | `peerOptional ${string} MISSING`
  | `prod ${string} ~${string}~${string}~${string}`
  | `prod ${string} git~${string}~${string}~${string}`
  | `prod ${string} ~${string}~${string}`
  | `prod ${string} git~${string}~${string}`
  | `prod ${string} file~${string}~${string}`
  | `prod ${string} remote~${string}~${string}`
  | `prod ${string} workspace~${string}~${string}`
  | `prod ${string} file~${string}`
  | `prod ${string} remote~${string}`
  | `prod ${string} workspace~${string}`
  | `prod ${string} MISSING`
```

---

### LockfileEdgeValue

```ts
type LockfileEdgeValue = `${DependencyTypeShort} ${Spec["bareSpec"]} ${DepID | "MISSING"}`;
```

Defined in: graph/src/lockfile/types.ts:191

`${type} ${spec} ${to}`

---

### LockfileLoadOptions

```ts
type LockfileLoadOptions = SpecOptions & object;
```

Defined in: graph/src/lockfile/load.ts:28

#### Type declaration

| Name                      | Type                                                                                                   | Description                                                                                                                         |
| ------------------------- | ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `actual`?                 | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                        | An optional [Graph](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) object to hydrate extra data from.        |
| `lockfileData`?           | [`LockfileData`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfiledata-1)        | Already-parsed lockfile data. When set, skips the filesystem read.                                                                  |
| `mainManifest`            | [`NormalizedManifest`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedmanifest) | The project root manifest.                                                                                                          |
| `modifiers`?              | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)        | The graph modifiers helper object.                                                                                                  |
| `monorepo`?               | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                | A [Monorepo](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo) object, for managing workspaces             |
| `packageJson`?            | [`PackageJson`](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson)        | A [PackageJson](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson) object, for sharing manifest caches |
| `projectRoot`             | `string`                                                                                               | The project root dirname.                                                                                                           |
| `scurry`?                 | [`PathScurry`](https://isaacs.github.io/path-scurry/)                                                  | A [PathScurry](https://isaacs.github.io/path-scurry/) object, for use in globs                                                      |
| `specCache`?              | [`SpecCache`](https://docs.vlt.io/client/api-reference/graph/module_index.md#speccache-1)              | Shared intern cache for parsed lockfile specs.                                                                                      |
| `throwOnMissingManifest`? | `boolean`                                                                                              | Whether to throw an error if a manifest is missing when loading nodes.                                                              |

---

### LockfileNode

```ts
type LockfileNode = [LockfileNodeFlags, string | null, Integrity | null, string | null, string | null, NormalizedManifest | null, NormalizedManifest | null, LockfilePlatform | null, Record<string, string> | null, LockfileBuildState | null, string | null];
```

Defined in: graph/src/lockfile/types.ts:160

Lockfile representation of a node from the install graph.

---

### LockfileNodeFlags

```ts
type LockfileNodeFlags = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
```

Defined in: graph/src/lockfile/types.ts:112

Bit flags indicating whether a node is optional, dev, and/or served as a Brotli tarball.

---

### LockfilePlatform

```ts
type LockfilePlatform = object;
```

Defined in: graph/src/lockfile/types.ts:14

Platform requirements for a lockfile node

#### Type declaration

| Name       | Type                         |
| ---------- | ---------------------------- |
| `cpu`?     | `string`\[] \| `string`      |
| `engines`? | `Record`<`string`, `string`> |
| `libc`?    | `string`\[] \| `string`      |
| `os`?      | `string`\[] \| `string`      |

---

### ManifestInventory

```ts
type ManifestInventory = Map<DepID, NormalizedManifest>;
```

Defined in: graph/src/graph.ts:38

---

### MermaidChild

```ts
type MermaidChild = object;
```

Defined in: graph/src/visualization/mermaid-output.ts:7

A leaf drawn under a graph node: node label, optional edge label.

#### Type declaration

| Name    | Type     |
| ------- | -------- |
| `edge`? | `string` |
| `label` | `string` |

---

### MermaidOutputGraph

```ts
type MermaidOutputGraph = object;
```

Defined in: graph/src/visualization/mermaid-output.ts:9

#### Type declaration

| Name                  | Type                                                                                                                                                                                 | Description                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| `children`?           | `Map`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid), [`MermaidChild`](https://docs.vlt.io/client/api-reference/graph/module_index.md#mermaidchild)\[]> | leaves to draw under included nodes (class `b`), eg: skills |
| `edges`               | [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike)\[]                                                                                                | -                                                           |
| `highlightSelection`? | `boolean`                                                                                                                                                                            | -                                                           |
| `importers`           | `Set`<[`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)>                                                                                            | -                                                           |
| `nodes`               | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)\[]                                                                                                | -                                                           |

---

### ModifierActiveEntry

```ts
type ModifierActiveEntry = object;
```

Defined in: graph/src/modifiers.ts:80

An object to track modifiers that have matched an initial part of the breadcrumb. It holds pointers to both nodes and edges matched in the current traversed graph on top of the modifier info and the breadcrumb state that is used to track the current state of the parsing.

#### Type declaration

| Name                    | Type                                                                                                                                  | Description                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `interactiveBreadcrumb` | [`ModifierInteractiveBreadcrumb`](https://docs.vlt.io/client/api-reference/dss-breadcrumb/reference.md#modifierinteractivebreadcrumb) | The breadcrumb that is used to track the current state of the parsing. |
| `modifiedEdge`?         | [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)                                                         | The modified edge that is being used to replace the original edge.     |
| `modifier`              | [`ModifierEntry`](https://docs.vlt.io/client/api-reference/graph/module_index.md#modifierentry)                                       | The modifier this active entry is working with.                        |
| `originalEdge`?         | [`Edge`](https://docs.vlt.io/client/api-reference/graph/module_index.md#edge)                                                         | The original edge that is being replaced with this entry.              |
| `originalFrom`          | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)                                                         | The first node to be affected by this modifier.                        |

---

### ModifierEntry

```ts
type ModifierEntry = 
  | EdgeModifierEntry
  | NodeModifierEntry;
```

Defined in: graph/src/modifiers.ts:72

A graph modifier entry, which can be either an edge or a node modifier.

---

### MountResult

```ts
type MountResult = "linked" | "unchanged" | "conflict";
```

Defined in: graph/src/skills/mounts.ts:53

Outcome of mounting a single skill.

---

### NodeModifierEntry

```ts
type NodeModifierEntry = BaseModifierEntry & object;
```

Defined in: graph/src/modifiers.ts:64

Extra info to define the graph node modifier.

#### Type declaration

| Name       | Type                                                                                                   |
| ---------- | ------------------------------------------------------------------------------------------------------ |
| `manifest` | [`NormalizedManifest`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedmanifest) |
| `type`     | `"node"`                                                                                               |

---

### NodeOptions

```ts
type NodeOptions = SpecOptions & object;
```

Defined in: graph/src/node.ts:34

#### Type declaration

| Name               | Type                                                                                 | Description                                                                                                                                  |
| ------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `brotli-tarballs`? | `boolean`                                                                            | Resolve to a version's Brotli (`.tar.br`) alternate when its manifest advertises one. Defaults to true; false always resolves to the `.tgz`. |
| `graph`            | [`GraphLike`](https://docs.vlt.io/client/api-reference/types/reference.md#graphlike) | -                                                                                                                                            |
| `projectRoot`      | `string`                                                                             | -                                                                                                                                            |

---

### OptionsChange

```ts
type OptionsChange = object;
```

Defined in: graph/src/lockfile/types.ts:41

A single difference between the config a graph was built with and the `options` block stored in the lockfile it was loaded from.

#### Type declaration

| Name      | Type     | Description                                                                                                         |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `from`?   | `string` | the value stored in the lockfile, absent when the entry is new                                                      |
| `key`?    | `string` | the entry inside that section, e.g. the catalog name. Absent for scalar sections; `<catalog> <dep>` for `catalogs`. |
| `section` | `string` | the `options` key the difference was found in, e.g. `catalog`                                                       |
| `to`?     | `string` | the current value, absent when the entry is gone                                                                    |

---

### RawDependency

```ts
type RawDependency = object;
```

Defined in: graph/src/dependencies.ts:47

Dependency entries info as defined in a package.json file.

#### Type declaration

| Name       | Type                                                                                                   |
| ---------- | ------------------------------------------------------------------------------------------------------ |
| `bareSpec` | `string`                                                                                               |
| `name`     | `string`                                                                                               |
| `type`     | [`DependencyTypeLong`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypelong) |

---

### ReifyOptions

```ts
type ReifyOptions = ActualLoadOptions & object;
```

Defined in: graph/src/reify/index.ts:53

#### Type declaration

| Name            | Type                                                                                                                              | Description                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `actual`?       | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                                   | -                                                               |
| `add`?          | [`AddImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#addimportersdependenciesmap)       | -                                                               |
| `allowScripts`  | `string`                                                                                                                          | -                                                               |
| `graph`         | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                                   | -                                                               |
| `installState`? | `InstallState`                                                                                                                    | records the tree for the next install's up-to-date check        |
| `keepNodes`?    | `ReadonlySet`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)>                                        | store dirs of these nodes are never removed, eg the running vlt |
| `modifiers`?    | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier)                                   | -                                                               |
| `packageInfo`   | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient)                       | -                                                               |
| `remove`?       | [`RemoveImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#removeimportersdependenciesmap) | -                                                               |
| `remover`       | [`RollbackRemove`](https://docs.vlt.io/client/api-reference/rollback-remove/reference.md#rollbackremove)                          | -                                                               |
| `saveExact`?    | `boolean`                                                                                                                         | -                                                               |
| `savePrefix`?   | `string`                                                                                                                          | -                                                               |
| `update`?       | `boolean`                                                                                                                         | -                                                               |

---

### RemoveImportersDependenciesMap

```ts
type RemoveImportersDependenciesMap = Map<DepID, Set<string>> & object;
```

Defined in: graph/src/dependencies.ts:97

A `Map` object representing nodes to be removed from the ideal graph. Each [DepID](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) key represents an importer node and the `Set` of dependency names to be removed from its dependency list.

The `modifiedDependencies` property can be used to indicate that there are added dependencies to any of the importer nodes.

#### Type declaration

| Name                   | Type      |
| ---------------------- | --------- |
| `modifiedDependencies` | `boolean` |

---

### SaveOptions

```ts
type SaveOptions = SpecOptions & object;
```

Defined in: graph/src/lockfile/save.ts:41

#### Type declaration

| Name                      | Type                                                                                            | Description                                        |
| ------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| `graph`                   | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                 | The graph to be stored in the lockfile.            |
| `modifiers`?              | [`GraphModifier`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graphmodifier) | The graph modifiers helper object.                 |
| `saveBuildData`?          | `boolean`                                                                                       | Should it save build state data in the lockfile?   |
| `saveManifests`?          | `boolean`                                                                                       | Should it save manifest data in the lockfile?      |
| `throwOnMissingManifest`? | `boolean`                                                                                       | Should it throw an error if a manifest is missing? |

---

### Skill

```ts
type Skill = object;
```

Defined in: graph/src/skills/discover.ts:16

An agent skill (a dir with a `SKILL.md`) shipped by an installed package. See <https://agentskills.io/specification>

#### Type declaration

| Name               | Type                                                                        | Description                                                                                                         |
| ------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `alias`?           | `string`                                                                    | name a direct dep is installed under, when not `name`, as `vlt ls` shows it                                         |
| `description`?     | `string`                                                                    | frontmatter description (folded to one line, control chars stripped)                                                |
| `frontmatterName`? | `string`                                                                    | `SKILL.md` frontmatter `name`, when it differs from `skill` (matched by `:skill()`)                                 |
| `id`               | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid) | package DepID                                                                                                       |
| `linked`           | `string`\[]                                                                 | dirs holding a vlt link named `skill` to `path`                                                                     |
| `name`             | `string`                                                                    | package name, e.g. `@s/bar`                                                                                         |
| `path`             | `string`                                                                    | realpath of the dir holding SKILL.md                                                                                |
| `skill`            | `string`                                                                    | skill name: its dir name (`skills/<dir>`, `dist/skills/<dir>`, `.agents/skills/<dir>`), or the root SKILL.md `name` |
| `version`?         | `string`                                                                    | package version                                                                                                     |

---

### SkillFrontmatter

```ts
type SkillFrontmatter = object;
```

Defined in: graph/src/skills/discover.ts:59

The `SKILL.md` frontmatter fields vlt reads.

#### Type declaration

| Name           | Type     |
| -------------- | -------- |
| `description`? | `string` |
| `name`?        | `string` |

---

### SkillMount

```ts
type SkillMount = object;
```

Defined in: graph/src/skills/mounts.ts:26

A vlt link in an agent skills dir.

#### Type declaration

| Name     | Type                                                                                    | Description                                              |
| -------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `dir`    | [`SkillsDir`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skillsdir) | the dir holding the link                                 |
| `link`   | `string`                                                                                | absolute link path, in the real dir                      |
| `mount`  | `string`                                                                                | `<dir>/<name>`, `/`-separated, relative to projectRoot   |
| `name`   | `string`                                                                                | entry name                                               |
| `owner`? | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)             | DepID of the store dir or workspace the link points into |
| `target` | `string`                                                                                | absolute resolved link target                            |

---

### SkillRow

```ts
type SkillRow = Skill & object;
```

Defined in: graph/src/skills/index.ts:73

A skill linked in one dir.

#### Type declaration

| Name    | Type     | Description     |
| ------- | -------- | --------------- |
| `dir`   | `string` | the dir         |
| `mount` | `string` | `<dir>/<skill>` |

---

### SkillsDir

```ts
type SkillsDir = object;
```

Defined in: graph/src/skills/dirs.ts:80

An agent skills dir.

#### Type declaration

| Name   | Type     | Description                                            |
| ------ | -------- | ------------------------------------------------------ |
| `dir`  | `string` | `/`-separated, relative to projectRoot                 |
| `id`?  | `string` | `<dev>:<ino>` (no inode: the path); unset when missing |
| `real` | `string` | realpath (a missing tail appended as is)               |

---

### SkillsOptions

```ts
type SkillsOptions = ActualLoadOptions & object;
```

Defined in: graph/src/skills/index.ts:39

Options for [listSkills](https://docs.vlt.io/client/api-reference/graph/module_index.md#listskills) and [linkSkills](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskills).

#### Type declaration

| Name          | Type                                                                            | Description                                                                  |
| ------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `env`?        | `Record`<`string`, `string` \| `undefined`>                                     | env read by detection; default `process.env`                                 |
| `graph`?      | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) | graph to use instead of loading the actual one                               |
| `skillsDirs`? | `string`\[]                                                                     | agent skill dirs, relative to projectRoot. Unset: detect; `[]`: none         |
| `target`?     | `string`                                                                        | DSS query selecting packages, selectors may end with `:skill()`; default `*` |

---

### SpecCache

```ts
type SpecCache = Map<string, Spec>;
```

Defined in: graph/src/lockfile/types.ts:60

Per-install intern cache for parsed lockfile specs. Shared across hidden + main lockfile loads so identical (name, bareSpec) pairs reuse one Spec instance.

---

### TreeItem

```ts
type TreeItem = object;
```

Defined in: graph/src/visualization/human-readable-output.ts:21

#### Type declaration

| Name         | Type                                                                                                 |
| ------------ | ---------------------------------------------------------------------------------------------------- |
| `edge`       | [`EdgeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#edgelike) \| `undefined`    |
| `hasSibling` | `boolean`                                                                                            |
| `include`    | `boolean`                                                                                            |
| `name`?      | `string` \| `null`                                                                                   |
| `node`       | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike) \| `undefined`    |
| `padding`    | `string`                                                                                             |
| `parent`     | [`TreeItem`](https://docs.vlt.io/client/api-reference/graph/module_index.md#treeitem) \| `undefined` |
| `prefix`     | `string`                                                                                             |
| `seen`       | `boolean`                                                                                            |

---

### TreeMap

```ts
type TreeMap = Map<EdgeLike | undefined, EdgeMap>;
```

Defined in: graph/src/visualization/human-readable-output.ts:42

---

### UninstallOptions

```ts
type UninstallOptions = ActualLoadOptions & object;
```

Defined in: graph/src/uninstall.ts:21

#### Type declaration

| Name           | Type                                                                                                        | Description                                                                                                                                                         |
| -------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowScripts` | `string`                                                                                                    | -                                                                                                                                                                   |
| `allowSkills`? | `string`                                                                                                    | DSS query: packages whose agent skills get linked into the project's agent skill dirs after uninstall. Selectors may end with `:skill()`. Unset or `:not(*)`: none. |
| `keepNodes`?   | `ReadonlySet`<[`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)>                  | store dirs of these nodes are never removed, eg the running vlt                                                                                                     |
| `packageInfo`  | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) | -                                                                                                                                                                   |
| `skillsDirs`?  | `string`\[]                                                                                                 | agent skill dirs, relative to projectRoot. Unset: detect; `[]`: none                                                                                                |

---

### UninstallResult

```ts
type UninstallResult = object;
```

Defined in: graph/src/uninstall.ts:42

Result of [uninstall](https://docs.vlt.io/client/api-reference/graph/module_index.md#uninstall).

#### Type declaration

| Name      | Type                                                                                                  | Description                          |
| --------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `diff`?   | `ReifyResult`                                                                                         | -                                    |
| `graph`   | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                       | -                                    |
| `skills`? | [`LinkSkillsResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskillsresult) | skill links added or removed, if any |

---

### UnmatchedPattern

```ts
type UnmatchedPattern = object;
```

Defined in: graph/src/skills/mask.ts:9

A `:skill()` pattern that matched no skill of its selector's packages.

#### Type declaration

| Name      | Type        | Description                                                    |
| --------- | ----------- | -------------------------------------------------------------- |
| `pattern` | `string`    | -                                                              |
| `skills`? | `string`\[] | skills those packages ship, sorted; unset: no package selected |

---

### UnscannedSkills

```ts
type UnscannedSkills = object;
```

Defined in: graph/src/skills/index.ts:84

Skills left out as their packages have no security data (fail closed).

#### Type declaration

| Name               | Type                         | Description                                                    |
| ------------------ | ---------------------------- | -------------------------------------------------------------- |
| `unscanned`?       | `string`\[]                  | `<skill> (<package>)`                                          |
| `unscannedReason`? | `"timeout"` \| `"unscanned"` | why: the request timed out, or socket.dev has not scanned them |

---

### UpdateOptions

```ts
type UpdateOptions = ActualLoadOptions & object;
```

Defined in: graph/src/update.ts:29

#### Type declaration

| Name           | Type                                                                                                        | Description                                                                                                                                                      |
| -------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowScripts` | `string`                                                                                                    | -                                                                                                                                                                |
| `allowSkills`? | `string`                                                                                                    | DSS query: packages whose agent skills get linked into the project's agent skill dirs after update. Selectors may end with `:skill()`. Unset or `:not(*)`: none. |
| `packageInfo`  | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) | -                                                                                                                                                                |
| `skillsDirs`?  | `string`\[]                                                                                                 | agent skill dirs, relative to projectRoot. Unset: detect; `[]`: none                                                                                             |
| `target`?      | `string`                                                                                                    | DSS query: only matching deps re-resolve, everything else keeps its locked version. Unset: update all.                                                           |

---

### UpdateResult

```ts
type UpdateResult = object;
```

Defined in: graph/src/update.ts:53

Result of [update](https://docs.vlt.io/client/api-reference/graph/module_index.md#update).

#### Type declaration

| Name          | Type                                                                                                  | Description                          |
| ------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `buildQueue`? | [`DepID`](https://docs.vlt.io/client/api-reference/dep-id/browser.md#depid)\[]                        | -                                    |
| `diff`?       | [`Diff`](https://docs.vlt.io/client/api-reference/graph/module_index.md#diff)                         | -                                    |
| `graph`       | [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                       | -                                    |
| `skills`?     | [`LinkSkillsResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskillsresult) | skill links added or removed, if any |

---

### UpToDate

```ts
type UpToDate = object;
```

Defined in: graph/src/install-state.ts:70

What a full no-op install reports, for an up-to-date tree.

#### Type declaration

| Name    | Type                                      | Description                                               |
| ------- | ----------------------------------------- | --------------------------------------------------------- |
| `add`   | (\[`string`] \| \[`string`, `string`])\[] | locked nodes that are not installed, as `[name, version]` |
| `nodes` | `number`                                  | nodes in the ideal graph                                  |

## Variables

### actual

```ts
const actual: object;
```

Defined in: graph/src/index.ts:40

#### Type declaration

| Name   | Type                                                                                           | Default value |
| ------ | ---------------------------------------------------------------------------------------------- | ------------- |
| `load` | (`options`) => [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph) | actualLoad    |

---

### BuildStateBuilt

```ts
const BuildStateBuilt: 2 = 2;
```

Defined in: graph/src/lockfile/types.ts:119

---

### BuildStateFailed

```ts
const BuildStateFailed: 3 = 3;
```

Defined in: graph/src/lockfile/types.ts:120

---

### BuildStateNeeded

```ts
const BuildStateNeeded: 1 = 1;
```

Defined in: graph/src/lockfile/types.ts:118

---

### BuildStateNone

```ts
const BuildStateNone: undefined = undefined;
```

Defined in: graph/src/lockfile/types.ts:117

Build state constants for lockfile nodes

---

### ideal

```ts
const ideal: object;
```

Defined in: graph/src/index.ts:64

#### Type declaration

| Name    | Type                                                                                                      |
| ------- | --------------------------------------------------------------------------------------------------------- |
| `build` | (`options`) => `Promise`<[`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)> |

---

### lockfile

```ts
const lockfile: object;
```

Defined in: graph/src/index.ts:50

#### Type declaration

| Name        | Type                                                                                                                               | Default value    |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `load`      | (`options`) => [`Graph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#graph)                                     | lockfileLoad     |
| `loadData`  | (`projectRoot`, `lockfilePath`) => [`LockfileData`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfiledata-1) | lockfileLoadData |
| `loadEdges` | (`graph`, `edges`, `options`, `cache`?) => `void`                                                                                  | -                |
| `loadNodes` | (`graph`, `nodes`, `options`, `actual`?, `throwOnMissingManifest`?) => `void`                                                      | -                |
| `save`      | (`options`) => `void`                                                                                                              | -                |

---

### LOCKFILE_VERSION

```ts
const LOCKFILE_VERSION: 1 = 1;
```

Defined in: graph/src/lockfile/types.ts:67

Current lockfile format version. Only lockfiles with matching version are considered valid. Bump when making breaking format changes.

---

### LockfileNodeFlagBrotli

```ts
const LockfileNodeFlagBrotli: 4 = 4;
```

Defined in: graph/src/lockfile/types.ts:106

This node's artifact is the registry's Brotli (`.tar.br`) tarball, so `integrity` is that artifact's hash. Carried as a flag bit rather than a field because a default-registry node writes no `resolved` at all -- `Node.setResolved()` rebuilds the URL, and this is what tells it which extension to rebuild.

---

### LockfileNodeFlagDev

```ts
const LockfileNodeFlagDev: 2 = 2;
```

Defined in: graph/src/lockfile/types.ts:97

---

### LockfileNodeFlagDevOptional

```ts
const LockfileNodeFlagDevOptional: 3 = 3;
```

Defined in: graph/src/lockfile/types.ts:98

---

### LockfileNodeFlagNone

```ts
const LockfileNodeFlagNone: 0 = 0;
```

Defined in: graph/src/lockfile/types.ts:95

---

### LockfileNodeFlagOptional

```ts
const LockfileNodeFlagOptional: 1 = 1;
```

Defined in: graph/src/lockfile/types.ts:96

---

### longDependencyTypeNames

```ts
const longDependencyTypeNames: Record<DependencyTypeShort, DependencyTypeLong>;
```

Defined in: graph/src/dependencies.ts:228

Maps short dependency types to the `package.json` field declaring them.

---

### VIRTUAL_ROOT_ID

```ts
const VIRTUAL_ROOT_ID: DepID;
```

Defined in: graph/src/virtual-root.ts:9

An unique DepID to identify the virtual root node.

## Functions

### addKey()

```ts
function addKey(spec): string
```

Defined in: graph/src/dependencies.ts:126

The key an added dependency is filed under. A nameless spec (`github:u/r`, `file:../x`, a tarball url) has no name to key by, so the CLI uses its stringified form; every reader of an `add` map has to derive the key the same way.

#### Parameters

| Parameter | Type                                                                    |
| --------- | ----------------------------------------------------------------------- |
| `spec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/browser.md#spec) |

#### Returns

`string`

---

### asDependency()

```ts
function asDependency(obj): Dependency
```

Defined in: graph/src/dependencies.ts:113

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `obj`     | `unknown` |

#### Returns

[`Dependency`](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency)

---

### asDependencySpecError()

```ts
function asDependencySpecError(
   er, 
   from, 
   type, 
   source?): unknown
```

Defined in: graph/src/dependencies.ts:249

Point an `ECONFIG` spec error (eg: an undefined `catalog:`) at the package.json & dependency type that declared it. `source` names the file the spec was read from when not the manifest (eg: a lockfile). Other values are returned as is.

#### Parameters

| Parameter | Type                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `er`      | `unknown`                                                                                                |
| `from`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)                       |
| `type`    | [`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) |
| `source`? | `string`                                                                                                 |

#### Returns

`unknown`

---

### asDependencyTypeShort()

```ts
function asDependencyTypeShort(obj): DependencyTypeShort
```

Defined in: graph/src/dependencies.ts:32

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `obj`     | `unknown` |

#### Returns

[`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort)

---

### asNode()

```ts
function asNode(value): Node
```

Defined in: graph/src/node.ts:695

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `value`   | `unknown` |

#### Returns

[`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node)

---

### assertQuery()

```ts
function assertQuery(
   selector, 
   flag, 
partSelectors?): Promise<void>
```

Defined in: graph/src/filter-nodes-by-query.ts:123

Throw `EUSAGE` unless `selector` is a valid DSS query. Runs it on an empty graph: no fs, network or security data needed. `partSelectors` allows e.g. `:skill()`.

#### Parameters

| Parameter        | Type                  |
| ---------------- | --------------------- |
| `selector`       | `string`              |
| `flag`           | `string`              |
| `partSelectors`? | readonly `"skill"`\[] |

#### Returns

`Promise`<`void`>

---

### build()

```ts
function build(options): Promise<BuildResult>
```

Defined in: graph/src/build.ts:103

Build the project based on actual graph state and build state from lockfile

This function:

1. Loads the actual graph from node_modules
2. Loads build data from lockfile and transfers it to the actual graph
3. Constructs a Diff object representing what needs to be built
4. Filters nodes based on buildState === 'needed'
5. Calls the reify build process with the constructed diff
6. Persists build results to the hidden lockfile, when the vlt store exists

#### Parameters

| Parameter | Type                                                                                          |
| --------- | --------------------------------------------------------------------------------------------- |
| `options` | [`BuildOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#buildoptions) |

#### Returns

`Promise`<[`BuildResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#buildresult)>

---

### copyPackageMetadata()

```ts
function copyPackageMetadata(to, from): void
```

Defined in: graph/src/node.ts:674

Copy the tarball metadata `to` is missing from another node for the same package version. `integrity` is one artifact's hash, so it never crosses onto a node bound for the other kind of tarball: a node with no metadata of its own takes `from`'s kind along with it, one that already has a url or a hash only fills in what matches its own. Lockfile provenance only carries over once both `integrity` and `resolved` are set, since that pair is what makes it usable without refetching.

#### Parameters

| Parameter | Type                                                                          |
| --------- | ----------------------------------------------------------------------------- |
| `to`      | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |
| `from`    | [`Node`](https://docs.vlt.io/client/api-reference/graph/module_index.md#node) |

#### Returns

`void`

---

### createVirtualRoot()

```ts
function createVirtualRoot(
   name, 
   options, 
   mainImporters): undefined | NodeLike
```

Defined in: graph/src/virtual-root.ts:22

A virtual root used to aggregate multiple importers into a single graph.

This is meant to be used with visual tools that want a single root node starting point to represent the graph.

Returns undefined if a virtual root is not needed.

#### Parameters

| Parameter       | Type                                                                                       | Default value    |
| --------------- | ------------------------------------------------------------------------------------------ | ---------------- |
| `name`          | `string`                                                                                   | `'virtual-root'` |
| `options`       | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) | `undefined`      |
| `mainImporters` | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)\[]      | `undefined`      |

#### Returns

`undefined` | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)

---

### fixupAddedNames()

```ts
function fixupAddedNames(
   add, 
   manifest, 
   options, 
   spec): Spec
```

Defined in: graph/src/fixup-added-names.ts:21

When adding new dependencies, it's very common to not have a dependency name directly available to reference, e.g: `file:local/folder` or `remote:tarball-url.tgz`. In these cases, a placeholder `(unknown)` name is used in the `Spec` object and the `add` Map structure that holds references to added dependencies will use the stringified spec as a key.

This helper function fixes unknown names in the `add` map by replacing placeholder specs with the correct names from the provided manifest.

It also fixes empty bareSpec values (from CLI args like `vlt install foo`) by calculating the proper semver range from the resolved manifest version.

#### Parameters

| Parameter  | Type                                                                                                                                  |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `add`      | \| `undefined` \| `Map`<`string`, [`Dependency`](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency)>          |
| `manifest` | \| `undefined` \| `Pick`<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), `"name"` \| `"version"`> |
| `options`  | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions)                                            |
| `spec`     | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)                                                          |

#### Returns

[`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec)

---

### generateShortId()

```ts
function generateShortId(index): string
```

Defined in: graph/src/visualization/mermaid-output.ts:41

Generates a short identifier for a given index following the pattern: 0 -> a, 1 -> b, ..., 25 -> z, 26 -> A, ..., 51 -> Z, 52 -> aa, 53 -> ab, etc. This implements a bijective base-52 numbering system where a-z = 0-25, A-Z = 26-51

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `index`   | `number` |

#### Returns

`string`

---

### getBooleanFlagsFromNum()

```ts
function getBooleanFlagsFromNum(flags): object
```

Defined in: graph/src/lockfile/types.ts:89

#### Parameters

| Parameter | Type                                                                                                    |
| --------- | ------------------------------------------------------------------------------------------------------- |
| `flags`   | [`LockfileNodeFlags`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfilenodeflags) |

#### Returns

`object`

| Name       | Type      |
| ---------- | --------- |
| `brotli`   | `boolean` |
| `dev`      | `boolean` |
| `optional` | `boolean` |

---

### getBuildStateFromNode()

```ts
function getBuildStateFromNode(node): LockfileBuildState
```

Defined in: graph/src/lockfile/types.ts:127

#### Parameters

| Parameter          | Type                                                                 |
| ------------------ | -------------------------------------------------------------------- |
| `node`             | { `buildState`: `"none"` \| `"needed"` \| `"built"` \| `"failed"`; } |
| `node.buildState`? | `"none"` \| `"needed"` \| `"built"` \| `"failed"`                    |

#### Returns

[`LockfileBuildState`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfilebuildstate)

---

### getBuildStateFromNum()

```ts
function getBuildStateFromNum(state): "none" | "needed" | "built" | "failed"
```

Defined in: graph/src/lockfile/types.ts:142

#### Parameters

| Parameter | Type                                                                                                      |
| --------- | --------------------------------------------------------------------------------------------------------- |
| `state`   | [`LockfileBuildState`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfilebuildstate) |

#### Returns

`"none"` | `"needed"` | `"built"` | `"failed"`

---

### getDependencies()

```ts
function getDependencies(node, options): Map<string, Dependency>
```

Defined in: graph/src/dependencies.ts:282

Retrieves a map of all dependencies, of all types, that can be inferred from a given node manifest, including missing dependencies.

#### Parameters

| Parameter | Type                                                                                       |
| --------- | ------------------------------------------------------------------------------------------ |
| `node`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)         |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) |

#### Returns

`Map`<`string`, [`Dependency`](https://docs.vlt.io/client/api-reference/graph/module_index.md#dependency)>

---

### getFlagNumFromNode()

```ts
function getFlagNumFromNode(node): LockfileNodeFlags
```

Defined in: graph/src/lockfile/types.ts:80

#### Parameters

| Parameter        | Type                                                              |
| ---------------- | ----------------------------------------------------------------- |
| `node`           | { `brotli`: `boolean`; `dev`: `boolean`; `optional`: `boolean`; } |
| `node.brotli`?   | `boolean`                                                         |
| `node.dev`?      | `boolean`                                                         |
| `node.optional`? | `boolean`                                                         |

#### Returns

[`LockfileNodeFlags`](https://docs.vlt.io/client/api-reference/graph/module_index.md#lockfilenodeflags)

---

### getRawDependencies()

```ts
function getRawDependencies(node): Map<string, RawDependency>
```

Defined in: graph/src/dependencies.ts:179

#### Parameters

| Parameter | Type                                                                               |
| --------- | ---------------------------------------------------------------------------------- |
| `node`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike) |

#### Returns

`Map`<`string`, [`RawDependency`](https://docs.vlt.io/client/api-reference/graph/module_index.md#rawdependency)>

---

### hasSkills()

```ts
function hasSkills(node): Promise<boolean>
```

Defined in: graph/src/skills/lazy.ts:16

`:skills` provider: loads the skills code on first `Node`.

#### Parameters

| Parameter | Type                                                                               |
| --------- | ---------------------------------------------------------------------------------- |
| `node`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike) |

#### Returns

`Promise`<`boolean`>

---

### humanReadableOutput()

```ts
function humanReadableOutput(options, __namedParameters): string
```

Defined in: graph/src/visualization/human-readable-output.ts:125

Returns a human-readable output of the graph.

#### Parameters

| Parameter                   | Type                                                                                                                  |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `options`                   | [`HumanReadableOutputGraph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#humanreadableoutputgraph) |
| `__namedParameters`         | { `colors`: `boolean`; }                                                                                              |
| `__namedParameters.colors`? | `boolean`                                                                                                             |

#### Returns

`string`

---

### install()

#### Call Signature

```ts
function install(options, add?): Promise<CheckedInstallResult>
```

Defined in: graph/src/install.ts:88

With `upToDateCheck`, an install whose inputs and tree are as the last one left them returns what a full no-op reports, without loading or building any graph, and every other install records the tree for the next one. `vlt install` sets it.

##### Parameters

| Parameter | Type                                                                                                                        |
| --------- | --------------------------------------------------------------------------------------------------------------------------- |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) & …                              |
| `add`?    | [`AddImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#addimportersdependenciesmap) |

##### Returns

`Promise`<[`CheckedInstallResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#checkedinstallresult)>

#### Call Signature

```ts
function install(options, add?): Promise<InstallResult>
```

Defined in: graph/src/install.ts:92

With `upToDateCheck`, an install whose inputs and tree are as the last one left them returns what a full no-op reports, without loading or building any graph, and every other install records the tree for the next one. `vlt install` sets it.

##### Parameters

| Parameter | Type                                                                                                                        |
| --------- | --------------------------------------------------------------------------------------------------------------------------- |
| `options` | [`SpecOptions`](https://docs.vlt.io/client/api-reference/spec/module_index.md#specoptions) & …                              |
| `add`?    | [`AddImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#addimportersdependenciesmap) |

##### Returns

`Promise`<[`InstallResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#installresult)>

---

### isDependency()

```ts
function isDependency(o): o is Dependency
```

Defined in: graph/src/dependencies.ts:106

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `o`       | `unknown` |

#### Returns

`o is Dependency`

---

### isDependencySaveType()

```ts
function isDependencySaveType(obj): obj is DependencyTypeShort
```

Defined in: graph/src/dependencies.ts:26

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `obj`     | `unknown` |

#### Returns

`obj is DependencyTypeShort`

---

### isDependencyTypeShort()

```ts
function isDependencyTypeShort(obj): obj is DependencyTypeShort
```

Defined in: graph/src/dependencies.ts:21

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `obj`     | `unknown` |

#### Returns

`obj is DependencyTypeShort`

---

### isNode()

```ts
function isNode(value): value is Node
```

Defined in: graph/src/node.ts:685

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `value`   | `unknown` |

#### Returns

`value is Node`

---

### jsonOutput()

```ts
function jsonOutput(__namedParameters): JSONOutputItem[]
```

Defined in: graph/src/visualization/json-output.ts:44

Returns a JSON string representation of the graph.

#### Parameters

| Parameter           | Type                                                                                                |
| ------------------- | --------------------------------------------------------------------------------------------------- |
| `__namedParameters` | [`JSONOutputGraph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#jsonoutputgraph) |

#### Returns

[`JSONOutputItem`](https://docs.vlt.io/client/api-reference/graph/module_index.md#jsonoutputitem)\[]

---

### linkSkills()

```ts
function linkSkills(o): Promise<LinkSkillsResult>
```

Defined in: graph/src/skills/lazy.ts:12

`linkSkills`, loading the skills code on first use.

#### Parameters

| Parameter | Type                                                                                                    |
| --------- | ------------------------------------------------------------------------------------------------------- |
| `o`       | [`LinkSkillsOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskillsoptions) |

#### Returns

`Promise`<[`LinkSkillsResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#linkskillsresult)>

---

### listSkills()

```ts
function listSkills(o): Promise<ListSkillsResult>
```

Defined in: graph/src/skills/lazy.ts:8

`listSkills`, loading the skills code on first use.

#### Parameters

| Parameter | Type                                                                                            |
| --------- | ----------------------------------------------------------------------------------------------- |
| `o`       | [`SkillsOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#skillsoptions) |

#### Returns

`Promise`<[`ListSkillsResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#listskillsresult)>

---

### mermaidOutput()

```ts
function mermaidOutput(options): string
```

Defined in: graph/src/visualization/mermaid-output.ts:218

Returns a mermaid string representation of the graph.

#### Parameters

| Parameter | Type                                                                                                      |
| --------- | --------------------------------------------------------------------------------------------------------- |
| `options` | [`MermaidOutputGraph`](https://docs.vlt.io/client/api-reference/graph/module_index.md#mermaidoutputgraph) |

#### Returns

`string`

---

### reify()

```ts
function reify(options): Promise<ReifyResult>
```

Defined in: graph/src/reify/index.ts:86

Make the current project match the supplied graph.

#### Parameters

| Parameter | Type                                                                                          |
| --------- | --------------------------------------------------------------------------------------------- |
| `options` | [`ReifyOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#reifyoptions) |

#### Returns

`Promise`<`ReifyResult`>

---

### scopeRegistryDefaults()

```ts
function scopeRegistryDefaults(jsrRegistries): Record<string, string>
```

Defined in: graph/src/lockfile/types.ts:73

The `scoped-registries` entries that are defaults, not user routing: `@jsr` follows `jsr-registries.jsr`, as `getOptions` maps it.

#### Parameters

| Parameter       | Type                                        |
| --------------- | ------------------------------------------- |
| `jsrRegistries` | `undefined` \| `Record`<`string`, `string`> |

#### Returns

`Record`<`string`, `string`>

---

### shorten()

```ts
function shorten(
   typeLong, 
   name?, 
   manifest?): DependencyTypeShort
```

Defined in: graph/src/dependencies.ts:132

Get the [DependencyTypeShort](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort) from a [DependencyTypeLong](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypelong).

#### Parameters

| Parameter   | Type                                                                                                                              |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `typeLong`  | [`DependencyTypeLong`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypelong)                            |
| `name`?     | `string`                                                                                                                          |
| `manifest`? | \| `null` \| `Pick`<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), `"peerDependenciesMeta"`> |

#### Returns

[`DependencyTypeShort`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypeshort)

---

### shouldInstallDepType()

```ts
function shouldInstallDepType(node, depType): boolean
```

Defined in: graph/src/dependencies.ts:167

Only install devDeps for git dependencies and importers Everything else always gets installed

Deliberately stricter than [getRawDependencies](https://docs.vlt.io/client/api-reference/graph/module_index.md#getrawdependencies), which also keeps devDeps of `file:` nodes: this is the rule the ideal build places with, so peer checks use it to match what actually lands in the graph.

#### Parameters

| Parameter | Type                                                                                                   |
| --------- | ------------------------------------------------------------------------------------------------------ |
| `node`    | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike)                     |
| `depType` | [`DependencyTypeLong`](https://docs.vlt.io/client/api-reference/types/reference.md#dependencytypelong) |

#### Returns

`boolean`

---

### stringifyNode()

```ts
function stringifyNode(node?): string
```

Defined in: graph/src/stringify-node.ts:5

#### Parameters

| Parameter | Type                                                                               |
| --------- | ---------------------------------------------------------------------------------- |
| `node`?   | [`NodeLike`](https://docs.vlt.io/client/api-reference/types/reference.md#nodelike) |

#### Returns

`string`

---

### uninstall()

```ts
function uninstall(options, remove?): Promise<UninstallResult>
```

Defined in: graph/src/uninstall.ts:49

#### Parameters

| Parameter | Type                                                                                                                              |
| --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `options` | [`UninstallOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#uninstalloptions)                             |
| `remove`? | [`RemoveImportersDependenciesMap`](https://docs.vlt.io/client/api-reference/graph/module_index.md#removeimportersdependenciesmap) |

#### Returns

`Promise`<[`UninstallResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#uninstallresult)>

---

### update()

```ts
function update(options): Promise<UpdateResult>
```

Defined in: graph/src/update.ts:141

#### Parameters

| Parameter | Type                                                                                            |
| --------- | ----------------------------------------------------------------------------------------------- |
| `options` | [`UpdateOptions`](https://docs.vlt.io/client/api-reference/graph/module_index.md#updateoptions) |

#### Returns

`Promise`<[`UpdateResult`](https://docs.vlt.io/client/api-reference/graph/module_index.md#updateresult)>
