> ## 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/socket/catalog

> Closed RPC catalogs and Effect RPC groups for first-party socket wiring.

# protocol/socket/catalog

*`packages/protocol/src/socket/catalog`*

## Purpose

Closed RPC catalogs and Effect RPC groups for first-party socket wiring.

The main socket barrel exposes lifecycle classes. This module exposes the
derived method/notification catalogs and group types needed by client,
server-core, conformance, and generated protocol reference docs.

## Public surface

### [`agentCallableGroup`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L87)

*Variable*

```ts theme={null}
export const agentCallableGroup = makeRpcGroup(
  agentCallableMethods.map((definition) => definition.clientRpc),
)
```

Effect RPC group for all agent-callable methods.

### [`agentCallableMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L24)

*Variable*

```ts theme={null}
export const agentCallableMethods = [
  ...identityRpcMethods,
  ...agentCallableNetworkRpcMethods,
  ...agentCallableConversationRpcMethods,
  ...agentCallableMessageRpcMethods,
] as const
```

Client-to-server descriptors an agent principal may originate.

### [`AnyAgentCallableRpcDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L57)

*TypeAlias*

```ts theme={null}
export type AnyAgentCallableRpcDefinition =
  (typeof agentCallableMethods)[number];
```

Any descriptor an agent client may call.

### [`AnyNotificationDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L61)

*TypeAlias*

```ts theme={null}
export type AnyNotificationDefinition =
  (typeof notificationDefinitions)[number];
```

Any server-to-client notification descriptor.

### [`AnyServerRpcDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L54)

*TypeAlias*

```ts theme={null}
export type AnyServerRpcDefinition = (typeof serverInboundMethods)[number];
```

Any client-to-server descriptor the server handles.

### [`notificationDefinitions`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L47)

*Variable*

```ts theme={null}
export const notificationDefinitions = [
  ...networkNotifications,
  ...conversationNotifications,
  ...messageNotifications,
] as const
```

Every server-to-client notification descriptor.

### [`notificationRpcGroup`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L97)

*Variable*

```ts theme={null}
export const notificationRpcGroup = makeRpcGroup(
  notificationDefinitions.map((definition) => definition.notificationRpc),
)
```

Server-to-client reverse notification group. The server fires each notification
as a fire-and-forget `void`-result RPC on a target connection's reverse
channel; the client serves it via `RpcServer&lt;NotificationRpcGroup>`, routing
each payload into the `SubscriberRegistry`.

### [`reverseRpcGroup`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L108)

*Variable*

```ts theme={null}
export const reverseRpcGroup = makeRpcGroup(
  notificationDefinitions.map((definition) => definition.notificationRpc),
)
```

The full server-to-client reverse group: every notification descriptor,
built as ONE `RpcGroup` over the member tuple. The server holds one
`RpcClient&lt;ReverseRpcGroup>` per connection (fires notifications
fork-and-forget); clients stand one `RpcServer&lt;ReverseRpcGroup>` on the
s2c sink, routing each payload into the `SubscriberRegistry`.

### [`ServerHandler`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L83)

*TypeAlias*

```ts theme={null}
export type ServerHandler<D extends AnyServerRpcDefinition> =
```

Handler type for one inbound RPC descriptor.

### [`ServerHandlers`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L78)

*TypeAlias*

```ts theme={null}
export type ServerHandlers = RpcGroup.HandlersFrom<
  RpcGroup.Rpcs<typeof serverInboundGroup>
>;
```

Complete server handler table keyed by every inbound RPC tag.

### [`serverInboundGroup`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L71)

*Variable*

```ts theme={null}
export const serverInboundGroup = makeRpcGroup(
  serverInboundMethods.map((definition) => definition.serverRpc),
)
```

Effect RPC group for all client-to-server calls accepted by the server.

### [`serverInboundMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/socket/catalog/index.ts#L37)

*Variable*

```ts theme={null}
export const serverInboundMethods = [
  ...identityRpcMethods,
  ...networkRpcMethods,
  ...agentCallableConversationRpcMethods,
  ...agentCallableMessageRpcMethods,
] as const
```

Full server inbound descriptor union.

This is derived from the authored agent callable catalog, with the
unauthenticated connect descriptor included once.

## Files

* `index.ts`
