export interface ControlEventBase { version: 1; idempotency_key: string; emitted_at: number; } export type ControlEvent = DispatchUndispatchedEvent | OwnerSessionDeliveryEvent | SpawnRequestEvent | ForceUnregisterEvent | DispatchNudgeEvent; export interface DispatchUndispatchedEvent extends ControlEventBase { type: "dispatch_undispatched"; undispatched_id: string; source_message_id: string; target_ref: RuntimeWorkTargetRef; delivery_intent: "external_handoff"; broker_projection_token: string; target_endpoint_id?: string; } export interface OwnerSessionTargetRef { kind: "owner_session_runtime_target"; projection_endpoint_id: string; runtime_session_id: string; runtime_session_identity_key: string; background_exchange_mode: BackgroundExchangeMode; } export interface OwnerSessionDeliveryEvent extends ControlEventBase { type: "owner_session_delivery"; owner_session_message_id: string; owner_session_delivery_attempt_id: string; owner_session_target_ref: OwnerSessionTargetRef; owner_session_delivery_token: string; content_type: "text"; text: string; } export type BackgroundExchangeMode = "resident_endpoint" | "adapter_managed_turn"; export type RuntimeWorkTargetRef = { kind: "projection_endpoint"; projection_endpoint_id: string; background_exchange_mode: "resident_endpoint"; } | { kind: "projection_endpoint"; projection_endpoint_id: string; runtime_session_id: string; background_exchange_mode: "adapter_managed_turn"; }; export interface SpawnRequestEvent extends ControlEventBase { type: "spawn_request"; prompt: string; runtime_kind: "claude-code" | "openclaw" | "codex" | "custom"; origin: "owner_initiated_spawn"; } export interface ForceUnregisterEvent extends ControlEventBase { type: "force_unregister"; endpoint_id: string; reason: string; } export interface DispatchNudgeEvent extends ControlEventBase { type: "dispatch_nudge"; undispatched_id: string; target_endpoint_id: string; } export interface ControlAck { idempotency_key: string; status: "received" | "applied" | "failed"; detail?: string; } //# sourceMappingURL=control-event-types.d.ts.map