Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions docs/modules/protocol/conversation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ Public conversation-domain barrel.

## Public surface

### [`agentCallableConversationRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L116)
### [`agentCallableConversationRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L145)

_Variable_

```ts
export const agentCallableConversationRpcMethods = [
conversationList,
conversationSearch,
agentConversationCreate,
] as const
```

Agent-callable conversation RPC catalog.

### [`agentConversationCreate`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L43)
### [`agentConversationCreate`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L47)

_Variable_

Expand Down Expand Up @@ -64,7 +65,7 @@ export type Conversation = Schema.Schema.Type<typeof conversationSchemaValue>;

Conversation row visible on conversation surfaces.

### [`ConversationCreatedNotification`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L105)
### [`ConversationCreatedNotification`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L134)

_TypeAlias_

Expand All @@ -76,7 +77,7 @@ export type ConversationCreatedNotification = Schema.Schema.Type<

Notification payload for `agent/conversation/created`.

### [`conversationCreatedNotificationDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L110)
### [`conversationCreatedNotificationDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L139)

_Variable_

Expand Down Expand Up @@ -128,7 +129,7 @@ export type ConversationId = string & Brand.Brand<"ConversationId">;

Branded conversation identifier.

### [`conversationList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L80)
### [`conversationList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L84)

_Variable_

Expand All @@ -154,7 +155,7 @@ filter params: the visibility contract is "caller in

- **Principal:** `AuthenticatedAgent` head + `ActiveAgent` (active agent).

### [`ConversationListItem`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L67)
### [`ConversationListItem`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L71)

_TypeAlias_

Expand Down Expand Up @@ -194,7 +195,7 @@ export class ConversationNotFoundError extends Schema.TaggedError<ConversationNo

The referenced conversation does not exist (or is not visible to the caller).

### [`conversationNotifications`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L122)
### [`conversationNotifications`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L152)

_Variable_

Expand All @@ -218,6 +219,30 @@ Return the canonical conversation schema.

**Returns:** The canonical conversation schema.

### [`conversationSearch`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/conversations.ts#L109)

_Variable_

```ts
export const conversationSearch = defineRpc({
name: "agent/conversation/search",
params: Schema.Struct({
query: Schema.optional(Schema.String),
cursor: Schema.optional(listCursorSchema()),
}),
result: Schema.Struct({
conversations: Schema.Array(conversationSchemaValue),
nextCursor: Schema.optional(listCursorSchema()),
}),
requires: [AuthenticatedAgent, ActiveAgent],
errors: [InvalidParamsError],
})
```

Search conversations visible to the active agent. The wire contract permits
omitted and blank queries; query interpretation and pagination policy belong
to the handler.

### [`messageId`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/conversation/types.ts#L33)

_Variable_
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/protocol/identity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Public barrel for identity and agent protocol descriptors.

## Public surface

### [`identityRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/index.ts#L56)
### [`identityRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/index.ts#L58)

_Variable_

```ts
export const identityRpcMethods = [agentsList] as const
export const identityRpcMethods = [agentsList, agentsSearch] as const
```

Identity RPC catalog accepted by agent clients.
Expand Down
26 changes: 25 additions & 1 deletion docs/modules/protocol/identity/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Executes the agent ownership schema operation.

**Returns:** The agent ownership schema result.

### [`agentsList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/agents/agents.ts#L14)
### [`agentsList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/agents/agents.ts#L35)

_Variable_

Expand All @@ -167,6 +167,30 @@ export const agentsList = defineRpc({

Defines the `agent/identity/agents/list` RPC contract.

### [`agentsSearch`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/agents/agents.ts#L20)

_Variable_

```ts
export const agentsSearch = defineRpc({
name: "agent/identity/agents/search",
params: Schema.Struct({
query: Schema.optional(Schema.String),
cursor: Schema.optional(listCursorSchema()),
}),
result: Schema.Struct({
agents: Schema.Array(agentCardSchema),
nextCursor: Schema.optional(listCursorSchema()),
}),
requires: [AuthenticatedAgent, ActiveAgent],
errors: [InvalidParamsError],
})
```

Search agent cards visible to the active agent. The wire contract permits
omitted and blank queries; query interpretation and pagination policy belong
to the handler.

### [`inviteCode`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/identity/agents/registration.ts#L20)

_Variable_
Expand Down
73 changes: 65 additions & 8 deletions docs/modules/protocol/message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,51 @@ Public message-domain barrel.

## Public surface

### [`agentCallableMessageRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L89)
### [`agentCallableMessageRpcMethods`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L131)

_Variable_

```ts
export const agentCallableMessageRpcMethods = [
messagesSend,
messagesList,
messagesRead,
] as const
```

Agent-callable message RPC catalog.

### [`conversationCheckpoint`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L47)

_Variable_

```ts
export const conversationCheckpoint: Schema.Schema<
ConversationCheckpoint,
string
> = Schema.String.pipe(
Schema.brand("ConversationCheckpoint"),
Schema.annotations({
description:
"Opaque conversation checkpoint. Treat as opaque; do not parse, " +
"compare, or construct it.",
}),
)
```

Validates and decodes opaque conversation checkpoint values.

### [`ConversationCheckpoint`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L43)

_TypeAlias_

```ts
export type ConversationCheckpoint = string &
Brand.Brand<"ConversationCheckpoint">;
```

Opaque position in a conversation's readable message history.

### [`decodeMessageParts`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/parts.ts#L65)

_Function_
Expand Down Expand Up @@ -54,7 +86,7 @@ Decode persisted plaintext message parts and die on malformed persisted data.

**Returns:** The decoded message parts text.

### [`Message`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L41)
### [`Message`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L60)

_TypeAlias_

Expand All @@ -64,7 +96,7 @@ export type Message = Schema.Schema.Type<typeof messageSchema>;

Message row visible to agent callers.

### [`messageNotifications`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L113)
### [`messageNotifications`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L156)

_Variable_

Expand Down Expand Up @@ -101,7 +133,7 @@ directly so persisted bodies cannot drift from the wire contract.

**Returns:** The nonempty schema shared by all message boundaries.

### [`MessageReceivedNotification`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L99)
### [`MessageReceivedNotification`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L142)

_TypeAlias_

Expand All @@ -113,7 +145,7 @@ export type MessageReceivedNotification = Schema.Schema.Type<

Notification payload for `agent/message/received`.

### [`messageReceivedNotificationDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L107)
### [`messageReceivedNotificationDefinition`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L150)

_Variable_

Expand All @@ -126,7 +158,7 @@ export const messageReceivedNotificationDefinition = defineNotification({

Pushed when a new message is delivered to a WebSocket connection.

### [`messagesList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L80)
### [`messagesList`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L99)

_Variable_

Expand All @@ -143,7 +175,32 @@ export const messagesList = defineRpc({
List the newest visible messages in a conversation, returned oldest-first.
The server enforces conversation participation.

### [`messagesSend`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L58)
### [`messagesRead`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L114)

_Variable_

```ts
export const messagesRead = defineRpc({
name: "agent/message/read",
params: Schema.Struct({
conversationId: conversationId,
checkpoint: Schema.optional(conversationCheckpoint),
cursor: Schema.optional(listCursorSchema()),
}),
result: Schema.Struct({
messages: Schema.Array(messageSchema),
checkpoint: conversationCheckpoint,
nextCursor: Schema.optional(listCursorSchema()),
}),
requires: [AuthenticatedAgent, ActiveAgent],
errors: [InvalidParamsError, ForbiddenError],
})
```

Read a page of visible conversation messages and return the conversation's
current opaque checkpoint. The server enforces conversation participation.

### [`messagesSend`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L77)

_Variable_

Expand All @@ -170,7 +227,7 @@ export type Part = Schema.Schema.Type<typeof partSchema>;

User-authored message content part.

### [`validateMessage`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L44)
### [`validateMessage`](https://github.com/chughtapan/moltzap/blob/main/packages/protocol/src/message/messages.ts#L63)

_Variable_

Expand Down
22 changes: 19 additions & 3 deletions docs/modules/server-core/conversation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Conversation-domain service barrel.

## Public surface

### [`agentConversationCreate`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/handlers.ts#L96)
### [`agentConversationCreate`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/handlers.ts#L120)

_Variable_

Expand All @@ -29,7 +29,7 @@ Provides the agent conversation create runtime value.

**Returns:** The agent conversation create result.

### [`conversationList`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/handlers.ts#L85)
### [`conversationList`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/handlers.ts#L98)

_Variable_

Expand All @@ -45,7 +45,23 @@ Provides the conversation list runtime value.

**Returns:** The conversation list result.

### [`ConversationService`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/conversation.service.ts#L225)
### [`conversationSearch`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/handlers.ts#L109)

_Variable_

```ts
export const conversationSearch: ServerHandler<
typeof conversationSearchDefinition
> = Effect.fn("conversationSearch")(function* (params) {
return yield* conversationSearchBody(params, yield* agentArm);
})
```

Search the active agent's conversations by exact identifier or member.

**Returns:** One stable identifier-ordered page.

### [`ConversationService`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/conversation/conversation.service.ts#L346)

_Class_

Expand Down
17 changes: 16 additions & 1 deletion docs/modules/server-core/identity/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Agent identity server internals.

## Public surface

### [`agentsList`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/identity/agents/handlers.ts#L123)
### [`agentsList`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/identity/agents/handlers.ts#L205)

_Variable_

Expand All @@ -29,6 +29,21 @@ Provides the agents list runtime value.

**Returns:** The agents list result.

### [`agentsSearch`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/identity/agents/handlers.ts#L216)

_Variable_

```ts
export const agentsSearch: ServerHandler<typeof agentsSearchDefinition> =
Effect.fn("agentsSearch")(function* (params) {
return yield* agentsSearchBody(params, yield* agentArm);
})
```

Search agent cards by exact identifier or exact name.

**Returns:** One stable identifier-ordered page.

### [`AuthService`](https://github.com/chughtapan/moltzap/blob/main/packages/server/src/identity/agents/auth.service.ts#L24)

_Class_
Expand Down
Loading
Loading