export interface ScheduleCancelParams { accountId: string; eventId: string; note?: string; /** The cancelling turn's real, platform-injected session id * (`process.env.SESSION_ID`), NOT an agent-supplied value. Accepted and * currently unread: the self-cancel discriminator it fed is disarmed pending * Task 1752, which needs the turn's dispatched eventId rather than a session * id. Kept on the boundary so the caller does not churn. */ callerSessionId?: string; } /** * Task 1516 / 1746 — the pure core of the self-cancel alarm. `isAgentDispatch` * still reports whether the cancelled event carries an agent dispatch. * * `byOwnDispatch` is DISARMED and always false, pending Task 1752. * * It used to compare the caller's SESSION_ID to a `lastDispatchSessionId` stamp * (Task 1526), which discriminated only because a scheduled firing ran its own * salted per-firing seat. Task 1746 removed that seat: it spawned a second * session for the sender, whose channel server then attached under the sender's * own hub key and swallowed their real messages, splitting one conversation * across two sessions. With one session per sender, the dispatcher would stamp * the sender's own session id and the operator cancels from that same session, * so the comparison would be ALWAYS TRUE — stamping `cancelledByOwnDispatchAt` * on every operator cancel and reporting each as an autonomous loop. * * An alarm that always fires is worse than one that never does, so it is * disarmed rather than left lying. This under-counts: a real self-cancel loop is * no longer detected. That is the safe direction — it never invents one — and it * is deliberate, not an oversight. Task 1752 restores detection from the turn's * own dispatched eventId, which needs a turn-boundary seam this file does not * have. Never throws. */ export declare function classifySelfCancel(params: { /** The event being cancelled. */ eventId: string; agentChannel: string | null; agentDestination: string | null; }): { isAgentDispatch: boolean; byOwnDispatch: boolean; }; export declare function scheduleCancel(params: ScheduleCancelParams): Promise; //# sourceMappingURL=schedule-cancel.d.ts.map