import type { SessionHelloAck as _memoflow_v1_SessionHelloAck, SessionHelloAck__Output as _memoflow_v1_SessionHelloAck__Output } from '../../memoflow/v1/SessionHelloAck.js'; import type { WorkflowTask as _memoflow_v1_WorkflowTask, WorkflowTask__Output as _memoflow_v1_WorkflowTask__Output } from '../../memoflow/v1/WorkflowTask.js'; import type { ActivityTask as _memoflow_v1_ActivityTask, ActivityTask__Output as _memoflow_v1_ActivityTask__Output } from '../../memoflow/v1/ActivityTask.js'; import type { DurableAck as _memoflow_v1_DurableAck, DurableAck__Output as _memoflow_v1_DurableAck__Output } from '../../memoflow/v1/DurableAck.js'; import type { CancelNotice as _memoflow_v1_CancelNotice, CancelNotice__Output as _memoflow_v1_CancelNotice__Output } from '../../memoflow/v1/CancelNotice.js'; import type { Evicted as _memoflow_v1_Evicted, Evicted__Output as _memoflow_v1_Evicted__Output } from '../../memoflow/v1/Evicted.js'; import type { CapacityState as _memoflow_v1_CapacityState, CapacityState__Output as _memoflow_v1_CapacityState__Output } from '../../memoflow/v1/CapacityState.js'; import type { WorkerDrainRequest as _memoflow_v1_WorkerDrainRequest, WorkerDrainRequest__Output as _memoflow_v1_WorkerDrainRequest__Output } from '../../memoflow/v1/WorkerDrainRequest.js'; export interface ServerFrame { 'hello_ack'?: (_memoflow_v1_SessionHelloAck | null); /** * Task push — identical payloads to the old poll streams. */ 'workflow_task'?: (_memoflow_v1_WorkflowTask | null); 'activity_task'?: (_memoflow_v1_ActivityTask | null); /** * Durability acknowledgment for mutating WorkerFrames (invariant 2). */ 'durable_ack'?: (_memoflow_v1_DurableAck | null); /** * Cancellation notice for a run this worker holds a task for (replaces * the cancel_requested piggyback on the unary heartbeat response). */ 'cancel'?: (_memoflow_v1_CancelNotice | null); /** * The server is evicting this worker (e.g. a newer build_id registered — * P11 will refine this to soft pinning). The worker should drain and * reconnect; the stream closes after this frame. */ 'evicted'?: (_memoflow_v1_Evicted | null); /** * Applied server-side admission state for an AvailabilityUpdate or * ReleaseTask. applied_seq correlates it with the worker frame. */ 'capacity_state'?: (_memoflow_v1_CapacityState | null); /** * Operator-requested graceful drain. The server has already fenced both * routing lanes before sending this frame. A supporting worker stops * accepting local work, completes in-flight tasks, then closes cleanly. */ 'drain_request'?: (_memoflow_v1_WorkerDrainRequest | null); 'kind'?: "hello_ack" | "workflow_task" | "activity_task" | "durable_ack" | "cancel" | "evicted" | "capacity_state" | "drain_request"; } export interface ServerFrame__Output { 'hello_ack'?: (_memoflow_v1_SessionHelloAck__Output | null); /** * Task push — identical payloads to the old poll streams. */ 'workflow_task'?: (_memoflow_v1_WorkflowTask__Output | null); 'activity_task'?: (_memoflow_v1_ActivityTask__Output | null); /** * Durability acknowledgment for mutating WorkerFrames (invariant 2). */ 'durable_ack'?: (_memoflow_v1_DurableAck__Output | null); /** * Cancellation notice for a run this worker holds a task for (replaces * the cancel_requested piggyback on the unary heartbeat response). */ 'cancel'?: (_memoflow_v1_CancelNotice__Output | null); /** * The server is evicting this worker (e.g. a newer build_id registered — * P11 will refine this to soft pinning). The worker should drain and * reconnect; the stream closes after this frame. */ 'evicted'?: (_memoflow_v1_Evicted__Output | null); /** * Applied server-side admission state for an AvailabilityUpdate or * ReleaseTask. applied_seq correlates it with the worker frame. */ 'capacity_state'?: (_memoflow_v1_CapacityState__Output | null); /** * Operator-requested graceful drain. The server has already fenced both * routing lanes before sending this frame. A supporting worker stops * accepting local work, completes in-flight tasks, then closes cleanly. */ 'drain_request'?: (_memoflow_v1_WorkerDrainRequest__Output | null); 'kind'?: "hello_ack" | "workflow_task" | "activity_task" | "durable_ack" | "cancel" | "evicted" | "capacity_state" | "drain_request"; }