protocol/testing/conformance/task
packages/protocol/src/testing/conformance/task
Purpose
Public barrel for task-layer conformance properties. Task-layer conformance properties. Task / conversation / message invariants — fan-out cardinality, store-and-replay, payload opacity, task-boundary isolation, conversation lifecycle, archive lifecycle, task-close lifecycle. Eachregister* lives in its own file. This barrel re-exports them
by name AND aggregates them into TASK_PROPERTIES for the
_shared/suite.ts aggregator.
Public surface
acquireClient
Function
acquireConversation
Function
acquirePropertyConversation
Function
agent
Property
archiveConversation
Function
assertConversationRejectsMessages
Function
AssertConversationRejectsMessagesInput
Interface
awaitOneNotification
Function
NotificationBuffer populated by
the subscribeAll() pump installed at acquireClient time, so
sequential send → awaitOneNotification patterns observe frames that
arrived between the triggering RPC and the wait. Mirrors
@moltzap/server-core/test-utils → awaitOneNotification.
Surfaces a single string message on either timeout or stream
exhaustion, so call sites use an e.message-style error mapper without
a tagged error type per definition.
client
Property
CONVERSATION_FAMILY_PROPERTIES
Variable
ConversationActor
TypeAlias
ConversationFixture
Interface
DELIVERY_CATEGORY
Variable
DELIVERY_DEFAULT_PROPERTY_NUM_RUNS
Variable
DELIVERY_DEFAULT_TIMEOUT_MS
Variable
deliveryViolation
Function
firstParticipant
Function
fixtureN
Function
moderateAs
Function
appKey-Connect anAppTestClientwhose implicit registration binds it as the app’s moderator endpoint. The grant-allDispatchAuthorize+ acceptTaskCreate+ forward-allMessagesAuthorizecallbacks run on THAT app connection (all are server-initiated, app-principal round-trips). The agentownerdrivesagent/task/request+agent/message/send.
owner.client (an agent + conversation
participant): the app/conversation/created + participants/added/removed
notifications are agent broadcasts that CANNOT reach an AppConnection.
The shared in-process participantsRef bridges the owner’s subscriber to
the app’s forward-all callback.
ModeratedHandle
Interface
NotificationBuffer
Interface
awaitOneNotification. Holds
every inbound notification arriving on a single client’s
subscribeAll() Stream until a consumer pulls a matching frame.
The snapshot and closed fields are the only public surfaces;
the pump fiber that feeds them is interrupted by the enclosing
Scope finalizer installed by makeNotificationBuffer. closed is
set to true when the transport-side stream terminates (either via
TransportClosedError or normal exhaustion); awaitOneNotification
consumes it to surface “Connection closed” rather than masquerading
a missing notification as a timeout.
notifications
Property
subscribe
only emits frames arriving AFTER materialisation, so a sequential
send → awaitOneNotification races the response frame. The buffer
is fed by a long-lived
subscribeAll() pump installed at acquireClient time;
awaitOneNotification consumes the buffer so frames that arrived
between the triggering RPC and the wait are still observable. This
mirrors @moltzap/server-core/test-utils → connectTestClient (the
makeNotificationBuffer JSDoc below covers the design).
registerArchiveLifecycle
Function
registerConversationCreateAndList
Function
registerConversationLifecycle
Function
registerFanOutCardinality
Function
registerPayloadOpacity
Function
registerStoreAndReplay
Function
registerTaskBoundaryIsolation
Function
registerTaskCloseLifecycle
Function
registerTaskCreate
Function
registerTaskLeave
Function
registerTaskRequestReject
Function
sendText
Function
TASK_PROPERTIES
Variable
app/conversation/* family.
unarchiveConversation
Function
waitForArchivedEvent
Function
waitForConversationCreatedNotification
Function
waitForMessageReceivedNotification
Function
waitForUnarchivedEvent
Function
Files
_helpers.tsarchive-lifecycle.tsconversation-family.tsconversation-lifecycle.tsfan-out-cardinality.tsindex.tspayload-opacity.tsstore-and-replay.tstask-boundary-isolation.tstask-close-lifecycle.ts