/** * Event registry — every typed `agentfootprint.*` event (see ALL_EVENT_TYPES; * the event/domain counts in the docs are asserted against this file by * test/events/unit/registry.test.ts, so don't hardcode counts here). * * Pattern: Discriminated Union + Typed Factory (Gang of Four adapted for TS). * Role: The stable public event contract — the "ports" of the hexagonal * architecture (Cockburn, 2005). * Emits: N/A — this file DEFINES event types and factory helpers. * * Consumers subscribe via `.on(type, listener)`. Emitters construct events * via typed helpers (e.g. `makeContextInjected(payload)`) rather than raw * strings — compile-time safety prevents typos and payload drift. * * Events are additive within a major version; breaking changes require a * major bump. See agentfootprint_v2_detailed_design.md for rules. */ import type { AgentfootprintEventEnvelope } from './types.js'; import type { AgentHandoffPayload, AgentIterationEndPayload, AgentIterationStartPayload, AgentRouteDecidedPayload, AgentTurnEndPayload, AgentTurnStartPayload, CompositionEnterPayload, CompositionExitPayload, ConditionalRouteDecidedPayload, ContextBudgetPressurePayload, ContextEvaluatedPayload, ContextEvictedPayload, ContextInjectedPayload, ContextSlotComposedPayload, CostLimitHitPayload, CostTickPayload, EmbeddingGeneratedPayload, ErrorFatalPayload, ErrorRecoveredPayload, ErrorRetriedPayload, EvalScorePayload, EvalThresholdCrossedPayload, AgentOutputSchemaValidationFailedPayload, AgentThinkingParseFailedPayload, StreamThinkingDeltaPayload, StreamThinkingEndPayload, FallbackTriggeredPayload, LLMEndPayload, LLMStartPayload, LLMTokenPayload, LoopIterationExitPayload, LoopIterationStartPayload, MemoryAttachedPayload, MemoryDetachedPayload, MemoryStrategyAppliedPayload, MemoryWrittenPayload, ParallelBranchCompletePayload, ParallelForkStartPayload, ParallelMergeEndPayload, PauseRequestPayload, PauseResumePayload, CheckInRequestPayload, CheckInDecisionPayload, PermissionCheckPayload, PermissionGateClosedPayload, PermissionHaltPayload, PermissionGateOpenedPayload, CredentialRequestedPayload, CredentialAcquiredPayload, CredentialAuthorizationRequiredPayload, CredentialFailedPayload, ReliabilityFailFastPayload, ReliabilityRetriedPayload, ReliabilityRecoveredPayload, RiskFlaggedPayload, SkillActivatedPayload, SkillDeactivatedPayload, SkillRejectedPayload, ToolEndPayload, ToolsActivatedPayload, ToolsDeactivatedPayload, ToolsDiscoveryStartedPayload, ToolsDiscoveryCompletedPayload, ToolsDiscoveryFailedPayload, ToolsOfferedPayload, ToolStartPayload, ValidationArgsInvalidPayload } from './payloads.js'; export declare const EVENT_NAMES: { readonly composition: { readonly enter: "agentfootprint.composition.enter"; readonly exit: "agentfootprint.composition.exit"; readonly forkStart: "agentfootprint.composition.fork_start"; readonly branchComplete: "agentfootprint.composition.branch_complete"; readonly mergeEnd: "agentfootprint.composition.merge_end"; readonly routeDecided: "agentfootprint.composition.route_decided"; readonly iterationStart: "agentfootprint.composition.iteration_start"; readonly iterationExit: "agentfootprint.composition.iteration_exit"; }; readonly agent: { readonly turnStart: "agentfootprint.agent.turn_start"; readonly turnEnd: "agentfootprint.agent.turn_end"; readonly iterationStart: "agentfootprint.agent.iteration_start"; readonly iterationEnd: "agentfootprint.agent.iteration_end"; readonly routeDecided: "agentfootprint.agent.route_decided"; readonly handoff: "agentfootprint.agent.handoff"; readonly outputSchemaValidationFailed: "agentfootprint.agent.output_schema_validation_failed"; readonly thinkingParseFailed: "agentfootprint.agent.thinking_parse_failed"; }; readonly stream: { readonly llmStart: "agentfootprint.stream.llm_start"; readonly llmEnd: "agentfootprint.stream.llm_end"; readonly token: "agentfootprint.stream.token"; readonly toolStart: "agentfootprint.stream.tool_start"; readonly toolEnd: "agentfootprint.stream.tool_end"; readonly thinkingDelta: "agentfootprint.stream.thinking_delta"; readonly thinkingEnd: "agentfootprint.stream.thinking_end"; }; readonly context: { readonly injected: "agentfootprint.context.injected"; readonly evicted: "agentfootprint.context.evicted"; readonly slotComposed: "agentfootprint.context.slot_composed"; readonly budgetPressure: "agentfootprint.context.budget_pressure"; readonly evaluated: "agentfootprint.context.evaluated"; }; readonly memory: { readonly strategyApplied: "agentfootprint.memory.strategy_applied"; readonly attached: "agentfootprint.memory.attached"; readonly detached: "agentfootprint.memory.detached"; readonly written: "agentfootprint.memory.written"; }; readonly tools: { readonly offered: "agentfootprint.tools.offered"; readonly activated: "agentfootprint.tools.activated"; readonly deactivated: "agentfootprint.tools.deactivated"; readonly discoveryStarted: "agentfootprint.tools.discovery_started"; readonly discoveryCompleted: "agentfootprint.tools.discovery_completed"; readonly discoveryFailed: "agentfootprint.tools.discovery_failed"; }; readonly skill: { readonly activated: "agentfootprint.skill.activated"; readonly deactivated: "agentfootprint.skill.deactivated"; readonly rejected: "agentfootprint.skill.rejected"; }; readonly validation: { readonly argsInvalid: "agentfootprint.validation.args_invalid"; }; readonly permission: { readonly check: "agentfootprint.permission.check"; readonly gateOpened: "agentfootprint.permission.gate_opened"; readonly gateClosed: "agentfootprint.permission.gate_closed"; readonly halt: "agentfootprint.permission.halt"; }; readonly credential: { readonly requested: "agentfootprint.credential.requested"; readonly acquired: "agentfootprint.credential.acquired"; readonly authorizationRequired: "agentfootprint.credential.authorization_required"; readonly failed: "agentfootprint.credential.failed"; }; readonly risk: { readonly flagged: "agentfootprint.risk.flagged"; }; readonly fallback: { readonly triggered: "agentfootprint.fallback.triggered"; }; readonly cost: { readonly tick: "agentfootprint.cost.tick"; readonly limitHit: "agentfootprint.cost.limit_hit"; }; readonly eval: { readonly score: "agentfootprint.eval.score"; readonly thresholdCrossed: "agentfootprint.eval.threshold_crossed"; }; readonly error: { readonly retried: "agentfootprint.error.retried"; readonly recovered: "agentfootprint.error.recovered"; readonly fatal: "agentfootprint.error.fatal"; }; readonly reliability: { readonly failFast: "agentfootprint.reliability.fail_fast"; readonly retried: "agentfootprint.reliability.retried"; readonly recovered: "agentfootprint.reliability.recovered"; }; readonly pause: { readonly request: "agentfootprint.pause.request"; readonly resume: "agentfootprint.pause.resume"; }; readonly checkin: { readonly request: "agentfootprint.checkin.request"; readonly decision: "agentfootprint.checkin.decision"; }; readonly embedding: { readonly generated: "agentfootprint.embedding.generated"; }; }; export interface AgentfootprintEventMap { 'agentfootprint.composition.enter': AgentfootprintEventEnvelope<'agentfootprint.composition.enter', CompositionEnterPayload>; 'agentfootprint.composition.exit': AgentfootprintEventEnvelope<'agentfootprint.composition.exit', CompositionExitPayload>; 'agentfootprint.composition.fork_start': AgentfootprintEventEnvelope<'agentfootprint.composition.fork_start', ParallelForkStartPayload>; 'agentfootprint.composition.branch_complete': AgentfootprintEventEnvelope<'agentfootprint.composition.branch_complete', ParallelBranchCompletePayload>; 'agentfootprint.composition.merge_end': AgentfootprintEventEnvelope<'agentfootprint.composition.merge_end', ParallelMergeEndPayload>; 'agentfootprint.composition.route_decided': AgentfootprintEventEnvelope<'agentfootprint.composition.route_decided', ConditionalRouteDecidedPayload>; 'agentfootprint.composition.iteration_start': AgentfootprintEventEnvelope<'agentfootprint.composition.iteration_start', LoopIterationStartPayload>; 'agentfootprint.composition.iteration_exit': AgentfootprintEventEnvelope<'agentfootprint.composition.iteration_exit', LoopIterationExitPayload>; 'agentfootprint.agent.turn_start': AgentfootprintEventEnvelope<'agentfootprint.agent.turn_start', AgentTurnStartPayload>; 'agentfootprint.agent.turn_end': AgentfootprintEventEnvelope<'agentfootprint.agent.turn_end', AgentTurnEndPayload>; 'agentfootprint.agent.iteration_start': AgentfootprintEventEnvelope<'agentfootprint.agent.iteration_start', AgentIterationStartPayload>; 'agentfootprint.agent.iteration_end': AgentfootprintEventEnvelope<'agentfootprint.agent.iteration_end', AgentIterationEndPayload>; 'agentfootprint.agent.route_decided': AgentfootprintEventEnvelope<'agentfootprint.agent.route_decided', AgentRouteDecidedPayload>; 'agentfootprint.agent.handoff': AgentfootprintEventEnvelope<'agentfootprint.agent.handoff', AgentHandoffPayload>; 'agentfootprint.agent.output_schema_validation_failed': AgentfootprintEventEnvelope<'agentfootprint.agent.output_schema_validation_failed', AgentOutputSchemaValidationFailedPayload>; 'agentfootprint.agent.thinking_parse_failed': AgentfootprintEventEnvelope<'agentfootprint.agent.thinking_parse_failed', AgentThinkingParseFailedPayload>; 'agentfootprint.stream.llm_start': AgentfootprintEventEnvelope<'agentfootprint.stream.llm_start', LLMStartPayload>; 'agentfootprint.stream.llm_end': AgentfootprintEventEnvelope<'agentfootprint.stream.llm_end', LLMEndPayload>; 'agentfootprint.stream.token': AgentfootprintEventEnvelope<'agentfootprint.stream.token', LLMTokenPayload>; 'agentfootprint.stream.tool_start': AgentfootprintEventEnvelope<'agentfootprint.stream.tool_start', ToolStartPayload>; 'agentfootprint.stream.tool_end': AgentfootprintEventEnvelope<'agentfootprint.stream.tool_end', ToolEndPayload>; 'agentfootprint.stream.thinking_delta': AgentfootprintEventEnvelope<'agentfootprint.stream.thinking_delta', StreamThinkingDeltaPayload>; 'agentfootprint.stream.thinking_end': AgentfootprintEventEnvelope<'agentfootprint.stream.thinking_end', StreamThinkingEndPayload>; 'agentfootprint.context.injected': AgentfootprintEventEnvelope<'agentfootprint.context.injected', ContextInjectedPayload>; 'agentfootprint.context.evicted': AgentfootprintEventEnvelope<'agentfootprint.context.evicted', ContextEvictedPayload>; 'agentfootprint.context.slot_composed': AgentfootprintEventEnvelope<'agentfootprint.context.slot_composed', ContextSlotComposedPayload>; 'agentfootprint.context.budget_pressure': AgentfootprintEventEnvelope<'agentfootprint.context.budget_pressure', ContextBudgetPressurePayload>; 'agentfootprint.context.evaluated': AgentfootprintEventEnvelope<'agentfootprint.context.evaluated', ContextEvaluatedPayload>; 'agentfootprint.memory.strategy_applied': AgentfootprintEventEnvelope<'agentfootprint.memory.strategy_applied', MemoryStrategyAppliedPayload>; 'agentfootprint.memory.attached': AgentfootprintEventEnvelope<'agentfootprint.memory.attached', MemoryAttachedPayload>; 'agentfootprint.memory.detached': AgentfootprintEventEnvelope<'agentfootprint.memory.detached', MemoryDetachedPayload>; 'agentfootprint.memory.written': AgentfootprintEventEnvelope<'agentfootprint.memory.written', MemoryWrittenPayload>; 'agentfootprint.tools.offered': AgentfootprintEventEnvelope<'agentfootprint.tools.offered', ToolsOfferedPayload>; 'agentfootprint.tools.activated': AgentfootprintEventEnvelope<'agentfootprint.tools.activated', ToolsActivatedPayload>; 'agentfootprint.tools.deactivated': AgentfootprintEventEnvelope<'agentfootprint.tools.deactivated', ToolsDeactivatedPayload>; 'agentfootprint.tools.discovery_started': AgentfootprintEventEnvelope<'agentfootprint.tools.discovery_started', ToolsDiscoveryStartedPayload>; 'agentfootprint.tools.discovery_completed': AgentfootprintEventEnvelope<'agentfootprint.tools.discovery_completed', ToolsDiscoveryCompletedPayload>; 'agentfootprint.tools.discovery_failed': AgentfootprintEventEnvelope<'agentfootprint.tools.discovery_failed', ToolsDiscoveryFailedPayload>; 'agentfootprint.skill.activated': AgentfootprintEventEnvelope<'agentfootprint.skill.activated', SkillActivatedPayload>; 'agentfootprint.skill.deactivated': AgentfootprintEventEnvelope<'agentfootprint.skill.deactivated', SkillDeactivatedPayload>; 'agentfootprint.skill.rejected': AgentfootprintEventEnvelope<'agentfootprint.skill.rejected', SkillRejectedPayload>; 'agentfootprint.validation.args_invalid': AgentfootprintEventEnvelope<'agentfootprint.validation.args_invalid', ValidationArgsInvalidPayload>; 'agentfootprint.permission.check': AgentfootprintEventEnvelope<'agentfootprint.permission.check', PermissionCheckPayload>; 'agentfootprint.permission.gate_opened': AgentfootprintEventEnvelope<'agentfootprint.permission.gate_opened', PermissionGateOpenedPayload>; 'agentfootprint.permission.gate_closed': AgentfootprintEventEnvelope<'agentfootprint.permission.gate_closed', PermissionGateClosedPayload>; 'agentfootprint.permission.halt': AgentfootprintEventEnvelope<'agentfootprint.permission.halt', PermissionHaltPayload>; 'agentfootprint.credential.requested': AgentfootprintEventEnvelope<'agentfootprint.credential.requested', CredentialRequestedPayload>; 'agentfootprint.credential.acquired': AgentfootprintEventEnvelope<'agentfootprint.credential.acquired', CredentialAcquiredPayload>; 'agentfootprint.credential.authorization_required': AgentfootprintEventEnvelope<'agentfootprint.credential.authorization_required', CredentialAuthorizationRequiredPayload>; 'agentfootprint.credential.failed': AgentfootprintEventEnvelope<'agentfootprint.credential.failed', CredentialFailedPayload>; 'agentfootprint.risk.flagged': AgentfootprintEventEnvelope<'agentfootprint.risk.flagged', RiskFlaggedPayload>; 'agentfootprint.fallback.triggered': AgentfootprintEventEnvelope<'agentfootprint.fallback.triggered', FallbackTriggeredPayload>; 'agentfootprint.cost.tick': AgentfootprintEventEnvelope<'agentfootprint.cost.tick', CostTickPayload>; 'agentfootprint.cost.limit_hit': AgentfootprintEventEnvelope<'agentfootprint.cost.limit_hit', CostLimitHitPayload>; 'agentfootprint.eval.score': AgentfootprintEventEnvelope<'agentfootprint.eval.score', EvalScorePayload>; 'agentfootprint.eval.threshold_crossed': AgentfootprintEventEnvelope<'agentfootprint.eval.threshold_crossed', EvalThresholdCrossedPayload>; 'agentfootprint.error.retried': AgentfootprintEventEnvelope<'agentfootprint.error.retried', ErrorRetriedPayload>; 'agentfootprint.error.recovered': AgentfootprintEventEnvelope<'agentfootprint.error.recovered', ErrorRecoveredPayload>; 'agentfootprint.error.fatal': AgentfootprintEventEnvelope<'agentfootprint.error.fatal', ErrorFatalPayload>; 'agentfootprint.reliability.fail_fast': AgentfootprintEventEnvelope<'agentfootprint.reliability.fail_fast', ReliabilityFailFastPayload>; 'agentfootprint.reliability.retried': AgentfootprintEventEnvelope<'agentfootprint.reliability.retried', ReliabilityRetriedPayload>; 'agentfootprint.reliability.recovered': AgentfootprintEventEnvelope<'agentfootprint.reliability.recovered', ReliabilityRecoveredPayload>; 'agentfootprint.pause.request': AgentfootprintEventEnvelope<'agentfootprint.pause.request', PauseRequestPayload>; 'agentfootprint.pause.resume': AgentfootprintEventEnvelope<'agentfootprint.pause.resume', PauseResumePayload>; 'agentfootprint.checkin.request': AgentfootprintEventEnvelope<'agentfootprint.checkin.request', CheckInRequestPayload>; 'agentfootprint.checkin.decision': AgentfootprintEventEnvelope<'agentfootprint.checkin.decision', CheckInDecisionPayload>; 'agentfootprint.embedding.generated': AgentfootprintEventEnvelope<'agentfootprint.embedding.generated', EmbeddingGeneratedPayload>; } /** Union of every typed event. Consumers use this for exhaustive `switch`. */ export type AgentfootprintEvent = AgentfootprintEventMap[keyof AgentfootprintEventMap]; /** Every known event-type string, useful for runtime lookups / lints. */ export type AgentfootprintEventType = keyof AgentfootprintEventMap; /** * Complete list of every registered event type, for lint / runtime validation. * A new event MUST be added here or the exhaustiveness tests fail. */ export declare const ALL_EVENT_TYPES: readonly AgentfootprintEventType[]; //# sourceMappingURL=registry.d.ts.map