import { runningExecutions } from '../../core/running-executions.js'; import { runAgent } from '../agents/index.js'; import { resolveProfileConfig } from '../agents/profile-manager.js'; import * as executionRegistry from '../executions/registry.js'; import { ctx as jobCtx } from '../scheduling/job-registry.js'; import { executionRepo } from '../../store/execution-repo.js'; import { sessionStore } from '../../store/session-registry-repo.js'; import { threadStore } from '../../store/thread-repo.js'; import { executeLifecycleHooks } from './hook-runner.js'; import { cancelThread, createThread, getTemplate, loadConfig, resolveTemplateAgents } from './index.js'; import type { runThread } from './runner.js'; export interface LocalThreadRuntimeDeps { runAgent: typeof runAgent; executionLedger: Pick; executionStore: typeof executionRepo; sessionStore: typeof sessionStore; threadStore: typeof threadStore; liveExecutions: typeof runningExecutions; resolveProfile: typeof resolveProfileConfig; loadTemplates: typeof loadConfig; getTemplate: typeof getTemplate; resolveTemplateAgents: typeof resolveTemplateAgents; emitLifecycleHooks: typeof executeLifecycleHooks; eventBus: typeof jobCtx.bus; createThread: typeof createThread; runThread: typeof runThread; cancelThread: typeof cancelThread; } export declare function createLocalThreadRuntimeDeps(defaultRunThread: typeof runThread, overrides?: Partial): LocalThreadRuntimeDeps; export declare function getLocalThreadRuntimeDeps(): LocalThreadRuntimeDeps | null; export declare function scopedLocalThreadService(fallback: T, select: (deps: LocalThreadRuntimeDeps) => T): T; export declare function withLocalThreadRuntimeDeps(deps: LocalThreadRuntimeDeps, action: () => Promise): Promise;