/**
 * Agent emitters — typed emission wrappers for AgentEvent domain.
 */
import { createEventEnvelope } from '@pellux/goodvibes-sdk/platform/runtime/events/envelope';
/** Emit AGENT_SPAWNING when an agent is being initialised. */
export function emitAgentSpawning(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_SPAWNING', { type: 'AGENT_SPAWNING', ...data }, ctx));
}
/** Emit AGENT_RUNNING when an agent starts active execution. */
export function emitAgentRunning(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_RUNNING', { type: 'AGENT_RUNNING', ...data }, ctx));
}
/** Emit AGENT_PROGRESS when an agent reports a progress string. */
export function emitAgentProgress(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_PROGRESS', { type: 'AGENT_PROGRESS', ...data }, ctx));
}
/** Emit AGENT_STREAM_DELTA when an agent streams output text. */
export function emitAgentStreamDelta(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_STREAM_DELTA', { type: 'AGENT_STREAM_DELTA', ...data }, ctx));
}
/** Emit AGENT_AWAITING_MESSAGE when an agent is waiting to send to LLM. */
export function emitAgentAwaitingMessage(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_AWAITING_MESSAGE', { type: 'AGENT_AWAITING_MESSAGE', ...data }, ctx));
}
/** Emit AGENT_AWAITING_TOOL when an agent is waiting for a tool call. */
export function emitAgentAwaitingTool(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_AWAITING_TOOL', { type: 'AGENT_AWAITING_TOOL', ...data }, ctx));
}
/** Emit AGENT_FINALIZING when an agent is assembling its final output. */
export function emitAgentFinalizing(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_FINALIZING', { type: 'AGENT_FINALIZING', ...data }, ctx));
}
/** Emit AGENT_COMPLETED when an agent finishes successfully. */
export function emitAgentCompleted(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_COMPLETED', { type: 'AGENT_COMPLETED', ...data }, ctx));
}
/** Emit AGENT_FAILED when an agent fails. */
export function emitAgentFailed(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_FAILED', { type: 'AGENT_FAILED', ...data }, ctx));
}
/** Emit AGENT_CANCELLED when an agent is cancelled. */
export function emitAgentCancelled(bus, ctx, data) {
    bus.emit('agents', createEventEnvelope('AGENT_CANCELLED', { type: 'AGENT_CANCELLED', ...data }, ctx));
}
