Interface: TopologyConfigBuilder<TPartition>
Defined in: builders/topology-config-builder.ts:15
Fluent builder for relational system topologies (P.topology(id)), extending TopologyBuilder<TPartition>.
Binds the backing TopologyStoreASTNode, statically validates the partition dependency DAG via .partitions(...), and configures signal-driven overlay commits.
Extends
TopologyBuilder<TPartition>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPartition extends string | string | Literal string union of partition identifiers in the topology DAG. |
Methods
affectedBy()
affectedBy(partitionId): readonly TPartition[];Defined in: ast/topology-builder.ts:39
Returns [partitionId, ...dependentsOf(partitionId)], representing all partitions affected by a contract change in partitionId.
Places partitionId first followed by all strict transitive dependents in deterministic topological order so scoped rules and cross-verifiers can inspect the full impact cone.
Parameters
| Parameter | Type | Description |
|---|---|---|
partitionId | TPartition | Source partition identifier in the topology DAG. |
Returns
readonly TPartition[]
partitionId followed by its strict transitive dependents.
Inherited from
commitOverlayWhen()
commitOverlayWhen<TOnSig, TDiscardSig>(config): TopologyConfigBuilder<TPartition>;Defined in: builders/topology-config-builder.ts:61
Configures signal-correlated overlay commit and discard triggers for PR-based lanes.
Extracts any SignalBuilder instances inside config into passive SignalNode references.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TOnSig | unknown | Commit signal payload type. |
TDiscardSig | unknown | Discard signal payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
config | TopologyCommitOverlayBuilderInput<TOnSig, TDiscardSig> | Overlay commit/discard trigger configuration. |
Returns
TopologyConfigBuilder<TPartition>
New immutable topology builder.
dependentsOf()
dependentsOf(partitionId): readonly TPartition[];Defined in: ast/topology-builder.ts:27
Returns all strict transitive dependent partitions that depend (directly or indirectly) on partitionId.
Traverses the reverse dependency edges of the topology DAG in deterministic topological order, excluding partitionId itself from the returned array.
Parameters
| Parameter | Type | Description |
|---|---|---|
partitionId | TPartition | Source partition identifier in the topology DAG. |
Returns
readonly TPartition[]
Deterministically ordered list of strict transitive dependent partitions.
Inherited from
partitions()
partitions<TNextPartition>(partitionMap): TopologyConfigBuilder<TNextPartition>;Defined in: builders/topology-config-builder.ts:43
Declares and statically validates the directed acyclic graph (DAG) of partitions and their dependsOn edges.
Verifies at builder call time that partitionMap is non-empty, references only known keys, and is acyclic.
Type Parameters
| Type Parameter | Description |
|---|---|
TNextPartition extends string | Literal string union of partition keys in partitionMap. |
Parameters
| Parameter | Type | Description |
|---|---|---|
partitionMap | Readonly<Record<TNextPartition, TopologyPartitionConstraint<NoInfer<TNextPartition>>>> | Partition dependency map. |
Returns
TopologyConfigBuilder<TNextPartition>
New immutable topology builder narrowed to TNextPartition.
Throws
If partitionMap is empty, references unknown partitions, or contains a dependency cycle.
store()
store(topologyStore): TopologyConfigBuilder<TPartition>;Defined in: builders/topology-config-builder.ts:26
Binds the backing TopologyStoreASTNode (sqlite.topologyStore or postgres.topologyStore).
Replaces any previously bound store while preserving declared partitions and overlay rules.
Parameters
| Parameter | Type | Description |
|---|---|---|
topologyStore | MaybeBuilder<TopologyStoreASTNode> | Topology store AST node or builder. |
Returns
TopologyConfigBuilder<TPartition>
New immutable topology builder.
toAST()
toAST(): TopologyNode;Defined in: ast/ast-builder.ts:20
Compiles the current builder configuration into a deeply frozen passive AST node.
Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.
Returns
Deeply frozen passive AST node.
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
id | readonly | string | Unique identifier of the relational topology. | TopologyBuilder.id | ast/topology-builder.ts:15 |