import type { ContextContainer } from "#context/container.js"; import type { bindDynamicConnections } from "#execution/dynamic-connections.js"; import type { resolveEffectiveAgentRuntime } from "#execution/effective-agent-config.js"; import type { SessionEventPublisher } from "#execution/publish-session-events.js"; import type { HandleEventFn } from "#harness/types.js"; import type { ExecutionInstrumentation } from "#instrumentation/runtime.js"; import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js"; /** True when a hook on this event type may cancel the running turn. */ export declare function isHookCancellableEvent(type: string): boolean; /** * Publishes one turn event, then runs memory, hooks, and model preparation for it. * A hook's `ctx.cancel()` aborts the turn signal at once; the event's remaining * hooks still run, then the handler stops the turn before the next model call. */ export declare function createTurnEventHandler(input: { readonly abortSignal: AbortSignal; readonly bundle: CompiledBundle; /** False for clear and compact requests, which run outside any turn. */ readonly canCancelTurn: boolean; readonly hookCancellation: AbortController; readonly ctx: ContextContainer; readonly dynamicConnections: ReturnType; readonly effectiveAgent: ReturnType; readonly effectiveNode: CompiledBundle["graph"]["root"]; readonly instrumentation: ExecutionInstrumentation | undefined; readonly publisher: SessionEventPublisher; }): HandleEventFn;