/** * Emit canonical V3 observations by spawning `agent-coord emit-event`. Used by * coordination commands whose durable state change also has a V3 audit event. * * Soft-fails: never throws into the caller. A failed emit logs to stderr * (visible to operators in their terminal) but never breaks the CLI flow. * * Synchronous spawn: the projector runs before the CLI returns. The child has * a 15-second safety budget; loaded-host checks normally finish in a few * seconds and record the observation before the parent command exits. */ import type { EventAdapterIdV3 } from "../events/v3/adapter-id.js"; import type { LiveCoordinationObservationV3 } from "../events/v3/live-observation.js"; import type { Heartbeat } from "./state/heartbeat-reader.js"; export type EventV3EmitObservation = LiveCoordinationObservationV3 | { event_type: "coord.lifecycle_changed"; new_state: "active" | "blocked" | "done"; reason?: string; suggested_session_name?: string; }; export interface EventV3EmitInput { owner: string; session: string; adapter: EventAdapterIdV3; observation: EventV3EmitObservation; } /** * Resolve the coord root for a canonical emit. * * Delegates to `resolveCoordRoot()`, the single resolution the hooks and the * CLI's reads also use. An observation resolved any other way can disappear * from the live V3 generation even though the command itself succeeded. */ export declare function resolveEmitRoot(start?: string): string | null; export declare function emitEventV3(input: EventV3EmitInput): boolean; /** * Normalize the heartbeat's `platform` field to the canonical Adapter type. */ export declare function normalizeAdapter(platform: string | undefined): EventAdapterIdV3; /** Producer joins use the private native session ID, never its V3 fingerprint. */ export declare function nativeSessionIdentity(row: Pick | null | undefined, fallback: string): string; //# sourceMappingURL=canonical-emit.d.ts.map