/**
 * IAgentMessageBus — Output port for the agent message bus (spec 093).
 *
 * Hub-and-spoke topology: agents communicate via this bus rather than
 * addressing peers directly. Permitted `toKind` values are:
 *   - 'agent'      — a specific agent run id (used only for replies via
 *                    `correlationId`; never as a primary fan-out target).
 *   - 'broadcast'  — fan out to all subscribers in the same scope.
 *   - 'supervisor' — addressed at the supervisor for the current scope.
 *   - 'user'       — addressed at the human user.
 *
 * Peer addressing (`toKind === 'peer'`) is REJECTED at publish time. All
 * inter-agent traffic flows through the supervisor (or a logical hub when
 * none is configured), preserving central audit and policy enforcement
 * (research decision 3).
 *
 * Cross-app isolation (NFR-7): every `subscribe` filter and `listFor`
 * query is scoped by `appId`. Implementations MUST refuse to fan messages
 * across app boundaries.
 *
 * @example
 * ```ts
 * const bus: IAgentMessageBus = container.resolve('IAgentMessageBus');
 *
 * // Publish a lifecycle status broadcast.
 * await bus.publish({
 *   id: crypto.randomUUID(),
 *   appId: 'app-1',
 *   featureId: 'feat-42',
 *   fromAgentRunId: 'run-7',
 *   fromActor: 'agent:run-7',
 *   toTarget: 'broadcast',
 *   toKind: 'broadcast',
 *   messageKind: AgentMessageKind.status,
 *   payload: JSON.stringify({ phase: 'started' }),
 *   createdAt: new Date(),
 *   updatedAt: new Date(),
 * });
 *
 * // Subscribe within an app/feature scope.
 * const unsubscribe = bus.subscribe({ appId: 'app-1', featureId: 'feat-42' }, (m) => {
 *   console.log('agent message', m.messageKind, m.payload);
 * });
 * ```
 */
/**
 * Set of accepted `toKind` values. `peer` is intentionally absent — research
 * decision 3 forbids peer addressing in v1.
 */
export const ALLOWED_AGENT_MESSAGE_TARGET_KINDS = ['agent', 'broadcast', 'supervisor', 'user'];
