import type { StoreEventEmitter } from '../store/event-emitter.js'; import type { ActivationArtifactReadModel, ActivationDecision, ActivationStateReadModel, ApprovalQueueStore, ChannelWriter, DispatchInput } from './activation-types.js'; import { type LedgerIdentityLookupDeps } from './ledger-identity.js'; export interface DispatcherConfig { writers: Iterable; approvalQueueStore?: ApprovalQueueStore; /** * Optional telemetry sink for observable degradation. When provided, the * dispatcher emits a `degradation_triggered` event when * `ChannelWriter.canActivate` throws, carrying the artifactId and original * error message (rc-9-no-silent-fallback; ERR-002). Optional so existing * callers continue to work; the structured `details` field on the returned * refused decision is the authoritative record regardless. */ eventEmitter?: StoreEventEmitter; /** * I3 upgrade (Owner review of PR #1856, P1 ×3) — ledger-aware identity * resolution. When provided, BOTH dispatch paths (enqueueForApproval and * activateArtifact) verify the artifact's principle identity against the * LEDGER before the approval record is enqueued and before the activation * commit: a UUID-shaped `source_principle_id` must also be present in the * ledger (`hasPrinciple`), and an unstamped artifact may resolve through * candidate lineage (dreamer artifact → dreamer task seed candidateId → * ledger principle). When omitted, the dispatcher falls back to the strict * UUID-shape-only boundary (legacy callers, unchanged behavior). */ ledgerIdentity?: LedgerIdentityLookupDeps; } export declare class ActivationDispatcher { private readonly artifactReadModel; private readonly stateReadModel; private readonly writers; private readonly approvalQueueStore?; private readonly eventEmitter?; private readonly ledgerIdentity?; constructor(artifactReadModel: ActivationArtifactReadModel, stateReadModel: ActivationStateReadModel, config: DispatcherConfig); /** * Resolve the principle identity an activation may carry, BEFORE any state * change (approval enqueue or activation commit). * * With `ledgerIdentity` deps: the identity must resolve against the ledger — * either a stamped UUID that the ledger actually contains * (`direct_validated`) or an unstamped artifact's candidate lineage. A * stamped-but-unknown UUID is data drift (`principle_not_in_ledger`) and is * refused — it never falls through to lineage guessing. * * Without `ledgerIdentity` deps (legacy callers): strict UUID shape only. */ private resolveActivationIdentity; dispatch(input: DispatchInput): Promise; private enqueueForApproval; private activateArtifact; /** R-B3: resolve the artifact of a live prompt activation (supersede target). */ private verifyApprovedDispatch; private readSupersedeApprovalOwner; private readSupersededArtifactId; private readArtifact; private checkIdempotency; } //# sourceMappingURL=activation-dispatcher.d.ts.map