/** * `cockpit_await_events` MCP tool handler. * * Long-poll for cockpit stream events for a given epic. Cursor-based; * coalesces bursts within `coalesceWindowMs`; soft-cap at `maxBatchSize` * (returned cursor is the continuation). * * Cursor classes: * - malformed / never-issued / wrong-epic → typed `invalid-cursor` error * - expired → silent reset to head with `resetFrom: "expired"` * - discarded → silent reset to head with `resetFrom: "discarded"` * (nonce missing, cross-instance, or bus evicted) * - valid → normal path */ import type { CommandRunner } from '@generacy-ai/cockpit'; import type { CockpitStreamEvent } from '../../watch/stream-event.js'; import { type ToolResult } from '../errors.js'; import { type Acquired } from '../event-bus-registry.js'; export interface CockpitAwaitEventsData { events: CockpitStreamEvent[]; cursor: string; resetFrom?: 'expired' | 'discarded'; } export interface CockpitAwaitEventsDeps { runner?: CommandRunner; /** * Test seam: provide a pre-built acquired bus. Bypasses the registry * (poll loop not started). Handler will NOT call `release` on it. */ acquired?: Acquired; intervalMs?: number; } export declare function cockpitAwaitEvents(input: unknown, deps?: CockpitAwaitEventsDeps): Promise>; //# sourceMappingURL=cockpit_await_events.d.ts.map