import type { AgentConfig } from '../types/agentConfig.js'; import type { AnyTool } from '../types/effectTool.js'; import type { Flow } from '../types/flow.js'; import type { LanguageModel } from 'ai'; import type { NlPredicateProvider } from './authoring/compileNlPredicate.js'; import type { AuthoringFlowDefinition } from './definition/authoring.js'; import type { FlowRegistryIndex } from './definition/validate/types.js'; import type { FlowDefinition } from './definition/types.js'; import type { FlowDefinitionsStore } from './definition/store.js'; import { LiveFlowCatalog } from './liveFlowCatalog.js'; export interface AgentFlowToolSurface { lookup: (id: string) => AnyTool | undefined; index: NonNullable; } export declare function agentToolSurface(agent: AgentConfig, configTools?: Record): AgentFlowToolSurface; export declare function nestedFlowReferences(def: FlowDefinition): string[]; export declare function topoSortFlowDefinitions(defs: readonly FlowDefinition[]): FlowDefinition[]; export interface RegisterDynamicFlowBundleOptions { defs: readonly AuthoringFlowDefinition[]; catalog: LiveFlowCatalog; tools: (id: string) => AnyTool | undefined; toolIndex: NonNullable; store?: FlowDefinitionsStore; replace?: boolean; compiler?: NlPredicateProvider | LanguageModel; } /** * Atomically register a bundle of flow definitions on a live catalog. * * Persistence is not transactional across rows. On failure the in-memory * catalog rolls back this bundle's registrations (unregister added names; * restore replaced ones). Members that already persisted are compensated so * a later `loadDynamicFlows` matches that rollback: added names are archived; * replaced names restore the prior active version (or archive when there was * none). A secondary compensation failure is logged and does not mask the * original error. */ export declare function registerDynamicFlowBundle(options: RegisterDynamicFlowBundleOptions): Promise; export interface LoadDynamicFlowsOptions { catalog: LiveFlowCatalog; store: FlowDefinitionsStore; tools: (id: string) => AnyTool | undefined; toolIndex: NonNullable; } export declare function loadDynamicFlowsIntoCatalog(options: LoadDynamicFlowsOptions): Promise;