> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moltzap.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# protocol/testing/conformance/network

> Public barrel for network-layer conformance properties.

# protocol/testing/conformance/network

*`packages/protocol/src/testing/conformance/network`*

## Purpose

Public barrel for network-layer conformance properties.

Network-layer conformance properties.

Connection / presence / subscription invariants. Presence is server-derived
from `LeaseRegistry` lifecycle plus WS connect/disconnect; `presence/subscribe`
returns the current status snapshot. There is no client-driven
`presence/update` RPC.

Each `register*` lives in its own file. This barrel re-exports them
by name AND aggregates them into `NETWORK_PROPERTIES` for the
`_shared/suite.ts` aggregator.

## Public surface

### [`acquireClient`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L63)

*Function*

```ts theme={null}
export function acquireClient(
  ctx: ConformanceRunContext,
  propertyName: string,
  name: string,
): Effect.Effect<PresenceActor, PropertyInvariantViolation, Scope.Scope>
```

### [`acquireCloseableClient`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L86)

*Function*

```ts theme={null}
export function acquireCloseableClient(
  ctx: ConformanceRunContext,
  propertyName: string,
  agent: TestAgent,
  label: string,
): Effect.Effect<
  CloseableAgentTestClient,
  PropertyInvariantViolation,
  Scope.Scope
>
```

### [`NETWORK_PROPERTIES`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/index.ts#L24)

*Variable*

```ts theme={null}
export const NETWORK_PROPERTIES: ReadonlyArray<
  (ctx: ConformanceRunContext) => void
> = [registerSubscribeAfterConnect]
```

All network-layer property registrars, in suite walk order.

### [`PRESENCE_CATEGORY`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L17)

*Variable*

```ts theme={null}
export const PRESENCE_CATEGORY = "presence" as const
```

### [`PRESENCE_DEFAULT_TIMEOUT_MS`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L18)

*Variable*

```ts theme={null}
export const PRESENCE_DEFAULT_TIMEOUT_MS = 5000
```

### [`PresenceActor`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L29)

*Interface*

```ts theme={null}
export interface PresenceActor {
  readonly agent: TestAgent;
  readonly client: AgentTestClient;
}
```

### [`PresenceStatus`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L22)

*TypeAlias*

```ts theme={null}
export type PresenceStatus = "online" | "working" | "offline";

export interface PresenceStatusEntry {
  readonly agentId: AgentId;
  readonly status: PresenceStatus;
}
```

### [`PresenceStatusEntry`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L24)

*Interface*

```ts theme={null}
export interface PresenceStatusEntry {
  readonly agentId: AgentId;
  readonly status: PresenceStatus;
}
```

### [`presenceViolation`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L34)

*Function*

```ts theme={null}
export function presenceViolation(
  name: string,
  reason: string,
): PropertyInvariantViolation
```

### [`registerAgent`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/_helpers.ts#L45)

*Function*

```ts theme={null}
export function registerAgent(
  ctx: ConformanceRunContext,
  propertyName: string,
  name: string,
): Effect.Effect<TestAgent, PropertyInvariantViolation>
```

### [`registerSubscribeAfterConnect`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/testing/conformance/network/presence-subscribe-after-connect.ts#L17)

*Function*

```ts theme={null}
export function registerSubscribeAfterConnect(
  ctx: ConformanceRunContext,
): void
```

## Files

* `_helpers.ts`
* `index.ts`
* `presence-subscribe-after-connect.ts`
