import { ArtifactStore } from '../artifacts/index.js'; import { ConfigManager } from '../config/manager.js'; import type { SecretsManager } from '../config/secrets.js'; import { ServiceRegistry } from '../config/service-registry.js'; import type { ControlPlaneGateway } from '../control-plane/gateway.js'; import { AgentDeliveryRegistry } from './delivery/strategies-agent.js'; import type { ChannelDeliveryRequest, ChannelDeliveryRouterConfig, ChannelDeliveryStrategy } from './delivery/types.js'; export type { ChannelDeliveryResult, ChannelDeliveryRouteBinding, ChannelDeliveryRouterConfig, ChannelDeliveryStrategy, ChannelDeliverySurfaceKind, ChannelDeliveryTarget, ChannelDeliveryTargetKind, } from './delivery/types.js'; export { CHANNEL_DELIVERY_SURFACE_KINDS } from './delivery/types.js'; export { AGENT_DELIVERY_STRATEGY_ID, AgentDeliveryRegistry, createAgentDeliveryStrategy, } from './delivery/strategies-agent.js'; export type { AgentConversationMessage, AgentConversationSender, } from './delivery/strategies-agent.js'; export { resolveChannelDeliverySurfaceKind } from './delivery/shared.js'; /** * `secretsManager` is REQUIRED, not optional, and that is the whole point. * * Half the surfaces here read their credential from a `goodvibes://secrets/...` * reference, which only resolves when a local secret resolver is supplied. * While this parameter was optional, a composition root that forgot it still * type-checked, still constructed, still delivered on every surface whose * credential happens to live in config or the environment, and failed ONLY on * the surfaces that use a secret reference, at send time, as * "Missing Telegram bot token". Two shipped composition roots (goodvibes-tui * and goodvibes-agent) drifted into exactly that state while the SDK's own * composition passed it, so the defect was invisible from inside the SDK and * its tests. Required here means a fork that forgets fails to compile instead * of failing to answer someone. */ export declare function createDefaultChannelDeliveryStrategies(configManager: ConfigManager, serviceRegistry: ServiceRegistry, artifactStore: ArtifactStore, getControlPlaneGateway: () => ControlPlaneGateway | null, secretsManager: Pick): ChannelDeliveryStrategy[]; export declare class ChannelDeliveryRouter { private readonly strategies; private controlPlaneGateway; /** * Where the agent product plugs its conversation sender in. * * Router-owned rather than a constructor argument, so the destination exists * from the moment the router does and the agent can register whenever it * starts. The strategy that reads it is appended to EVERY strategy list, * including an explicitly supplied one: `agent` being deliverable is a * property of the router, and an embed that hand-picks its transports has no * reason to lose the one surface that is not a transport. */ readonly agentDelivery: AgentDeliveryRegistry; constructor(config?: ChannelDeliveryRouterConfig); /** Append the agent strategy unless the caller already supplied one. */ private ensureAgentStrategy; setControlPlaneGateway(gateway: ControlPlaneGateway | null): void; listStrategies(): readonly ChannelDeliveryStrategy[]; registerStrategy(strategy: ChannelDeliveryStrategy, options?: { readonly replace?: boolean; }): void; unregisterStrategy(strategyId: string): boolean; deliver(request: ChannelDeliveryRequest): Promise; } //# sourceMappingURL=delivery-router.d.ts.map