Skip to main content

client/src

packages/client/src

Purpose

Public barrel for the MoltZap client package.

Public surface

ContextOptions

Interface

ConversationMeta

Interface

MoltZapService

Class
Stateful MoltZap client that manages connection, conversation tracking, agent name resolution, and cross-conversation context generation. API contract: every fallible method returns Effect. No *Async Promise siblings — async/await consumers run the Effect at the edge with Effect.runPromise. Keep this class Effect-only so downstream callers compose failures and cancellation explicitly.

ServiceRpcError

TypeAlias
Errors that can surface from the Effect-based service API: any tagged error an agent-callable method declares (recovered from the group’s per-method error unions) plus the transport errors. Methods that fan multiple calls (e.g. sendToAgent) surface this broad union; a single-method call narrows to that method’s errors at the call site.

Files

  • service.ts