/**
 * Agent Behavior Log — event type definitions.
 *
 * The behavior log is a single-table append-only event store backing
 * Crewly's minimal internal metrics. Each entry is a strongly-typed
 * domain event the platform records for later analysis (delegation
 * rates, escalation patterns, Slack delivery failures, prompt size
 * trends).
 *
 * Schema lives in `observability-db.ts`. Service API in
 * `agent-behavior-log.service.ts`.
 *
 * @module services/observability/agent-behavior-log.types
 */
// ---------------------------------------------------------------------------
// Event-type discriminator
// ---------------------------------------------------------------------------
/**
 * Canonical event type strings stored in the `event_type` column of
 * `agent_behavior_log`. Adding a new event type is additive — append a
 * new constant here AND extend `BehaviorLogEvent` below; do not rename
 * existing values (downstream digests rely on stable keys).
 */
export const BEHAVIOR_LOG_EVENT_TYPES = {
    /** An agent took a top-level action (delegate, implement, ask_human, send_slack, ...). */
    AGENT_ACTION: 'agent.action',
    /** An agent escalated a decision/issue to a higher level in the chain. */
    AGENT_ESCALATION: 'agent.escalation',
    /** A Slack message could not be delivered (intended-but-not-sent or API failure). */
    SLACK_DELIVERY_FAILED: 'slack.delivery.failed',
    /** Snapshot of an agent's compiled prompt size at session/start build time. */
    PROMPT_SIZE_BYTES: 'prompt.size.bytes',
};
// ---------------------------------------------------------------------------
// Type guards
// ---------------------------------------------------------------------------
/**
 * Return true if `value` looks like a known `BehaviorLogEventType`.
 *
 * Useful at deserialisation boundaries (e.g. when querying historic
 * rows) to narrow a generic string into the discriminator union.
 *
 * @param value - any string to test
 */
export function isBehaviorLogEventType(value) {
    return (Object.values(BEHAVIOR_LOG_EVENT_TYPES).includes(value));
}
//# sourceMappingURL=agent-behavior-log.types.js.map